java.lang.SecurityException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

Android SDK 23 introduced a new way to handle permissions, so as a temporary workaround you can set it to build for SDK below 23. As a permanent solution you have to ask user during runtime for permissions with checkSelfPermission() or requestPermissions()

tip

You need the permission android.permission.READ_EXTERNAL_STORAGE. Write on the Android Manifest

tip

MANAGE_USERS has a protection level of signature|system, so your application must be signed with the platform key. Take a look on this https://goo.gl/nXsTvH for more information about it.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • Warn on USB Permission issue
    via GitHub by mik3y
    ,
  • Android usb enumeration
    via Stack Overflow by Britto
    ,
  • UserManager getUserCount() (Jelly Bean)
    via Stack Overflow by Kedi
    ,
  • Fatal exception error
    via Stack Overflow by user2850116
    ,
  • Dealing with Download Listener in Android
    via Stack Overflow by Alok Kumar
    ,
    • java.lang.SecurityException: User has not given permission to device UsbDevice[mName=/dev/bus/usb/002/002,mVendorId=9025,mProductId=67,mClass=2,mSubclass=0,mProtocol=0,mInterfaces=[Landroid.hardware.usb.UsbInterface;@41b1a0b0] at android.os.Parcel.readException(Parcel.java:1425) at android.os.Parcel.readException(Parcel.java:1379) at android.hardware.usb.IUsbManager$Stub$Proxy.openDevice(IUsbManager.java:366) at android.hardware.usb.UsbManager.openDevice(UsbManager.java:265) at com.hoho.android.usbserial.driver.UsbSerialProber$2.getDevice(UsbSerialProber.java:64) at com.hoho.android.usbserial.driver.UsbSerialProber.acquire(UsbSerialProber.java:115) at com.hoho.android.usbserial.driver.UsbSerialProber.acquire(UsbSerialProber.java:95) at org.kegbot.core.KegboardManager.acquireSerialDevice(KegboardManager.java:255) at org.kegbot.core.KegboardManager.runInBackground(KegboardManager.java:212) at org.kegbot.core.BackgroundManager$1.run(BackgroundManager.java:38) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) at java.lang.Thread.run(Thread.java:856)

    Users with the same issue

    Unknown visitor1 times, last one,
    filipebatista
    12 times, last one,
    Hiren Amaliyar
    8 times, last one,
    Aravind
    86 times, last one,
    Indri Yunita
    199 times, last one,
    229 more bugmates