Java.lang.SecurityException:under UID 10090 But it is really 10060

Source: Internet
Author: User

E/databaseutils (1255): Java.lang.SecurityException:Package Com.flyaudio.skin does not belong to 10090
E/databaseutils (1255): at Android.app.AppOpsManager.checkPackage (appopsmanager.java:1133)
E/databaseutils (1255): at Android.content.ContentProvider.getCallingPackage (contentprovider.java:570)
E/databaseutils (1255): at Com.android.providers.settings.SettingsProvider.call (settingsprovider.java:635)
E/databaseutils (1255): at Android.content.contentprovider$transport.call (contentprovider.java:325)
E/databaseutils (1255): at Android.content.ContentProviderNative.onTransact (contentprovidernative.java:275)
E/databaseutils (1255): at Android.os.Binder.execTransact (binder.java:404)
E/databaseutils (1255): at Dalvik.system.NativeStart.run (Native Method)
W/appops (1255): Bad call:specified package Com.flyaudio.skin under UID 10090 but it's really 10060



This problem occurs with the android4.4.4 Qualcomm platform.

The tracking code knows it is Settings.System.putInt (resolver, Settings.System.SCREEN_BRIGHTNESS, brightness);

Find a solution from the Web:

Modify /frameworks/base/core/java/android/app/contextimpl.java


Private Contextimpl (Contextimpl container, Activitythread mainthread, loadedapk packageinfo, IBinder Activitytoken, Userhandle user, Boolean restricted, display display, Configuration overrideconfiguration) are changed to the following:


Private Contextimpl (Contextimpl container, Activitythread mainthread, loadedapk packageinfo, IBinder Activityto Ken, Userhandle User, Boolean restricted, display display, Configuration overrideconfiguration) {Mouter        Context = this;        Mmainthread = Mainthread;        Mactivitytoken = Activitytoken;        mrestricted = restricted;        if (user = = null) {user = Process.myuserhandle ();        } muser = user;                Mpackageinfo = PackageInfo;        Mresourcesmanager = Resourcesmanager.getinstance ();        Mdisplay = display;        Moverrideconfiguration = overrideconfiguration;        Final int displayid = Getdisplayid ();        Compatibilityinfo compatinfo = null;        if (container! = null) {Compatinfo = Container.getdisplayadjustments (Displayid). Getcompatibilityinfo (); } if (Compatinfo = = NULL && Displayid = = display.default_display) {compatinfo = PACKAGEINFO.G EtcompatibiliTyinfo ();        } mdisplayadjustments.setcompatibilityinfo (Compatinfo);        Mdisplayadjustments.setactivitytoken (Activitytoken);        Resources resources = packageinfo.getresources (Mainthread);                    if (resources = null) {if (Activitytoken! = NULL | | Displayid! = Display.default_display || Overrideconfiguration! = NULL | | (Compatinfo! = NULL && Compatinfo.applicationscale! = Resources.getcompatibilityinfo (). Applicationscale)) {resources = Mresourcesmanager.gettoplevelresources (PackageInfo            . Getresdir (), Displayid, Overrideconfiguration, Compatinfo, Activitytoken);        }} mresources = resources;            if (container! = null) {mbasepackagename = Container.mbasepackagename;        Moppackagename = Container.moppackagename; } else {mbasepackagename = PackaGeinfo.mpackagename;            ApplicationInfo ainfo = Packageinfo.getapplicationinfo (); if (Ainfo.uid = = Process.system_uid && ainfo.uid! = Process.myuid ()) {//Special Case:system Comp  Onents allow themselves to is loaded in to other//processes. For purposes of apps ops, we must then consider the context as//belonging to the package of this process,                Not the system itself, otherwise//the Package+uid verifications in App ops would fail.            Moppackagename = Activitythread.currentpackagename ();            } else {moppackagename = Mbasepackagename;    }}mcontentresolver = new Applicationcontentresolver (this, mainthread, user); }
Recompile the framework

Java.lang.SecurityException:under UID 10090 But it is really 10060

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.