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.

  • Themes crashing when opening themes See also attached zip 06-19 15:46:55.082: I/ActivityManager(2294): Start proc org.cyanogenmod.themes.provider for content provider org.cyanogenmod.themes.provider/.ThemesProvider: pid=5540 uid=10081 gids={50081, 3003} 06-19 15:46:55.107: D/libEGL(2833): loaded /system/lib/egl/libEGL_mali.so 06-19 15:46:55.112: D/libEGL(2833): loaded /system/lib/egl/libGLESv1_CM_mali.so 06-19 15:46:55.112: D/libEGL(2833): loaded /system/lib/egl/libGLESv2_mali.so 06-19 15:46:55.117: D/ActivityThread(5540): handleBindApplication:org.cyanogenmod.themes.provider 06-19 15:46:55.117: D/ActivityThread(5540): setTargetHeapUtilization:0.75 06-19 15:46:55.117: D/ActivityThread(5540): setTargetHeapMinFree:2097152 06-19 15:46:55.117: E/(2833): Device driver API match 06-19 15:46:55.117: E/(2833): Device driver API version: 23 06-19 15:46:55.117: E/(2833): User space API version: 23 06-19 15:46:55.117: E/(2833): mali: REVISION=Linux-r3p2-01rel3 BUILD_DATE=Wed Oct 9 21:05:57 KST 2013 06-19 15:46:55.182: D/OpenGLRenderer(2833): Enabling debug mode 0 06-19 15:46:55.227: W/dalvikvm(5540): threadid=11: thread exiting with uncaught exception (group=0x4194cce0) 06-19 15:46:55.227: E/AndroidRuntime(5540): FATAL EXCEPTION: Thread-294 06-19 15:46:55.227: E/AndroidRuntime(5540): Process: org.cyanogenmod.themes.provider, PID: 5540 06-19 15:46:55.227: E/AndroidRuntime(5540): java.lang.SecurityException: Neither user 10081 nor current process has android.permission.ACCESS_THEME_MANAGER. 06-19 15:46:55.227: E/AndroidRuntime(5540): at android.os.Parcel.readException(Parcel.java:1465) 06-19 15:46:55.227: E/AndroidRuntime(5540): at android.os.Parcel.readException(Parcel.java:1419) 06-19 15:46:55.227: E/AndroidRuntime(5540): at android.content.res.IThemeService$Stub$Proxy.requestThemeChange(IThemeService.java:176) 06-19 15:46:55.227: E/AndroidRuntime(5540): at android.content.res.ThemeManager.requestThemeChange(ThemeManager.java:120) 06-19 15:46:55.227: E/AndroidRuntime(5540): at org.cyanogenmod.themes.provider.ThemesProvider$VerifyInstalledThemesThread.verifyPackages(ThemesProvider.java:377) 06-19 15:46:55.227: E/AndroidRuntime(5540): at org.cyanogenmod.themes.provider.ThemesProvider$VerifyInstalledThemesThread.run(ThemesProvider.java:288) 06-19 15:46:55.347: I/ActivityManager(2294): Displayed org.cyanogenmod.theme.chooser/.ChooserActivity: +389ms 06-19 15:46:55.407: I/Timeline(2833): Timeline: Activity_idle id: android.os.BinderProxy@41c1cbb8 time:160429 06-19 15:46:55.672: I/Timeline(2294): Timeline: Activity_windows_visible id: ActivityRecord{41c36d48 u0 org.cyanogenmod.theme.chooser/.ChooserActivity t1} time:160690 06-19 15:46:56.557: I/dalvikvm(2294): Jit: resizing JitTable from 8192 to 16384
    via by RoadXY,
  • Themes crashing when opening themes See also attached zip 06-19 15:46:55.082: I/ActivityManager(2294): Start proc org.cyanogenmod.themes.provider for content provider org.cyanogenmod.themes.provider/.ThemesProvider: pid=5540 uid=10081 gids={50081, 3003} 06-19 15:46:55.107: D/libEGL(2833): loaded /system/lib/egl/libEGL_mali.so 06-19 15:46:55.112: D/libEGL(2833): loaded /system/lib/egl/libGLESv1_CM_mali.so 06-19 15:46:55.112: D/libEGL(2833): loaded /system/lib/egl/libGLESv2_mali.so 06-19 15:46:55.117: D/ActivityThread(5540): handleBindApplication:org.cyanogenmod.themes.provider 06-19 15:46:55.117: D/ActivityThread(5540): setTargetHeapUtilization:0.75 06-19 15:46:55.117: D/ActivityThread(5540): setTargetHeapMinFree:2097152 06-19 15:46:55.117: E/(2833): Device driver API match 06-19 15:46:55.117: E/(2833): Device driver API version: 23 06-19 15:46:55.117: E/(2833): User space API version: 23 06-19 15:46:55.117: E/(2833): mali: REVISION=Linux-r3p2-01rel3 BUILD_DATE=Wed Oct 9 21:05:57 KST 2013 06-19 15:46:55.182: D/OpenGLRenderer(2833): Enabling debug mode 0 06-19 15:46:55.227: W/dalvikvm(5540): threadid=11: thread exiting with uncaught exception (group=0x4194cce0) 06-19 15:46:55.227: E/AndroidRuntime(5540): FATAL EXCEPTION: Thread-294 06-19 15:46:55.227: E/AndroidRuntime(5540): Process: org.cyanogenmod.themes.provider, PID: 5540 06-19 15:46:55.227: E/AndroidRuntime(5540): java.lang.SecurityException: Neither user 10081 nor current process has android.permission.ACCESS_THEME_MANAGER. 06-19 15:46:55.227: E/AndroidRuntime(5540): at android.os.Parcel.readException(Parcel.java:1465) 06-19 15:46:55.227: E/AndroidRuntime(5540): at android.os.Parcel.readException(Parcel.java:1419) 06-19 15:46:55.227: E/AndroidRuntime(5540): at android.content.res.IThemeService$Stub$Proxy.requestThemeChange(IThemeService.java:176) 06-19 15:46:55.227: E/AndroidRuntime(5540): at android.content.res.ThemeManager.requestThemeChange(ThemeManager.java:120) 06-19 15:46:55.227: E/AndroidRuntime(5540): at org.cyanogenmod.themes.provider.ThemesProvider$VerifyInstalledThemesThread.verifyPackages(ThemesProvider.java:377) 06-19 15:46:55.227: E/AndroidRuntime(5540): at org.cyanogenmod.themes.provider.ThemesProvider$VerifyInstalledThemesThread.run(ThemesProvider.java:288) 06-19 15:46:55.347: I/ActivityManager(2294): Displayed org.cyanogenmod.theme.chooser/.ChooserActivity: +389ms 06-19 15:46:55.407: I/Timeline(2833): Timeline: Activity_idle id: android.os.BinderProxy@41c1cbb8 time:160429 06-19 15:46:55.672: I/Timeline(2294): Timeline: Activity_windows_visible id: ActivityRecord{41c36d48 u0 org.cyanogenmod.theme.chooser/.ChooserActivity t1} time:160690 06-19 15:46:56.557: I/dalvikvm(2294): Jit: resizing JitTable from 8192 to 16384
    via by RoadXY,
  • UserManager getUserCount() (Jelly Bean)
    via Stack Overflow by Kedi
    ,
  • Dealing with Download Listener in Android
    via Stack Overflow by Alok Kumar
    ,
  • securityexception
    via by Unknown author,
    • java.lang.SecurityException: Neither user 10081 nor current process has android.permission.ACCESS_THEME_MANAGER. at android.os.Parcel.readException(Parcel.java:1465) at android.os.Parcel.readException(Parcel.java:1419) at android.content.res.IThemeService$Stub$Proxy.requestThemeChange(IThemeService.java:176) at android.content.res.ThemeManager.requestThemeChange(ThemeManager.java:120) at org.cyanogenmod.themes.provider.ThemesProvider$VerifyInstalledThemesThread.verifyPackages(ThemesProvider.java:377) at org.cyanogenmod.themes.provider.ThemesProvider$VerifyInstalledThemesThread.run(ThemesProvider.java:288)

    Users with the same issue

    filipebatistafilipebatista
    1 times, last one,
    Hiren AmaliyarHiren Amaliyar
    46 times, last one,
    AravindAravind
    86 times, last one,
    Indri YunitaIndri Yunita
    199 times, last one,
    Unknown UserUnknown User
    4 times, last one,
    229 more bugmates