Hello together,
I recently made an update of LineageOS for my LG G5 (LineageOS 14.1) as well as my Samsung Galaxy S5 (LineageOS 15.1). They both seem to have serious issues afterwards and I don't know what happened. I assume something has changed within the last month or so and my problem appears with both devices.
It appears as if the permissions for all GApps have changed (or the uids perhaps). All other apps work perfectly fine so far. I also downloaded the latest GApps and installed them via TWRP but that doesn't seem to solve any problem. However I'm not sure that overwrites the old applications or only installs currently not installed ones.
So when ever I use one of these apps (Gmail, Playstore, Maps, some of the system processes), it always crashes and I see the log messages looking like this:
Code:
com.google.android.gms.persistent, PID: 13071
java.lang.RuntimeException: Unable to create application
com.google.android.gms.common.app.GmsApplication:
java.lang.SecurityException: addOnPermissionsChangeListener:
Neither user 10039 nor current process has android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS.
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5451)
at android.app.ActivityThread.-wrap2(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1564)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6186)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
or
Code:
java.lang.SecurityException: Permission Denial: opening provider
com.google.android.gsf.gservices.GservicesProvider from
ProcessRecord{22a7d3b 23968:com.google.android.youtube/u0a108}
(pid=23968, uid=10108) requires com.google.android.providers.gsf.permission.READ_GSERVICES or com.google.android.providers.gsf.permission.WRITE_GSERVICES
at android.os.Parcel.readException(Parcel.java:1684)
at android.os.Parcel.readException(Parcel.java:1637)
at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4199)
or
Code:
java.lang.SecurityException: tname=Sensors - Permission Denial: opening provider com.google.android.gsf.gservices.GservicesProvider from ProcessRecord{3745b29 6048:com.google.android.apps.maps/u0a179} (pid=6048, uid=10179) requires com.google.android.providers.gsf.permission.READ_GSERVICES or com.google.android.providers.gsf.permission.WRITE_GSERVICES
They all have in common that they tell me that "Neither user [???] nor current process has android.permission.[???] "
It seems to work uninstalling the specific app and reinstalling it. However this is a lot of work and isn't really easy for some apps that are closer to the system.
So what can I do? What exactly is the problem here? Did the UIDs change? Any suggestions please!
Related
com.bn.cloud.svc permission issue: What does a healthy ''packages.xml" look like?
I'm running a rooted Nook 1.4.3, and somewhere in my customization, I've run into an odd permissions issue.
Main question: Can anyone with a Nook 1.4.3 whose B&N Shop is working paste their /data/system/packages.xml here so I can check mine against it?
Main problem: The B&N Shop can't connect to anything. Basically my device has no access to the B&N cloud.
Looking at the logs, I see this a lot:
Code:
W/ActivityManager( 1294): Unable to start service Intent { act=com.bn.cloud.IRequestHandler }: not found
Looking at logcat while the tablet boots, I see this related section:
Code:
I/PackageManagerService( 1294): /system/app/BnCloudRequestSvc.apk changed; collecting certs
W/PackageManagerService( 1294): Signature mismatch for shared user : SharedUserSetting{40597710 com.bn.cloud/10032}
E/PackageManagerService( 1294): Package com.bn.cloud.svc has no signatures that match those in shared user com.bn.cloud; ignoring!
...
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.EXECUTE_REQUEST in package com.bn.nook.drpreader
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.RECEIVE_NOTIFICATION in package com.bn.nook.drpreader
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.EXECUTE_REQUEST in package com.bn.nook.social
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.EXECUTE_REQUEST in package com.bn.nook.quickstart
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.RECEIVE_NOTIFICATION in package com.bn.nook.quickstart
W/PackageManagerService( 1294): Unknown permission com.bn.cloud.EXECUTE_REQUEST in package com.bn.nook.reader.activities
So my best guess is that I borked something in my packages.xml so PackageManager thinks my 'BnCloudRequestSvc.apk' is wrong and completely disables the cloud service that the shop (and other com.bn.* apps) need.
I've tried wiping my dalvik cache and running 'fix_permissions' from the bootable CWM sdcard I used to root the thing, but still no luck.
I'd love to compare my packages.xml to someone who has a working shop, or hear any other suggestions anyone may have about what may be going wrong here, like why does the Package Manager say "/system/app/BnCloudRequestSvc.apk changed; collecting certs"?
Solved!
I solved this issue by doing the following:
Delete /data/system/packages.xml
Reboot -> This regenerates /data/system/packages.xml (ignore all force-closes, they are expected)
Power off
Power on with CWM SD Card, go into "advanced" and "Fix Permissions" (Built my SD Card using these instructions: http://forum.xda-developers.com/showthread.php?t=1466583)
Reboot
Once it came back up, everything was working great!(*)
(*) One small caveat-> After that last reboot, it came up with the 'Homecatcher" app doing something incredibly weird: It was flickering and I couldn't actually choose a launcher... Thankfully I happened to reorient from portrait to landscape, then back to portrait, and it came out of it and began working just fine.
Now that I have the thing working again, I've compared my prevous "broken" packages.xml to the new working packages.xml, and found that my actual original problem was that I was missing a <packace> section for the com.bn.cloud.svc library.
That wasn't *quite* all...
Noting further steps here I had to take to get everything working again after this issue... escapde.
Removing packages.xml and running 'fix permissions' isn't quite the whole story. I also had to:
Reinstall all local apps to re-request their permissions:
Code:
[in adb shell]:
for app in /data/apps/*.apk; do pm install -r $app; done
Modify the permissions of all existing downloaded books and magazines in /data/media so it matches the new B&N UID:
Code:
[in adb shell]:
busybox ps
... Find the UID that all the com.bn.* apps are running with
... In my case this was '10020', aka 'app_20'
busybox chmod 10020.10020 -R /data/media/Books/*
busybox chmod 10020.10020 -R /data/media/Magazines/*
hi guys, I hope you can help.. I really googled a lot about this, and also made many tests on my phone and waste a lot of time, but couldn't find a solution yet.. also this seems to be affecting many other people, so I don't understand how is possible nobody found a fix for that until now..
(I'm posting in general section because this seems to affect any kind of phones running cm10.1 + gapps)
the problem is that if I go to manage apps > running apps, I see Media process (DownloadService) always running! that could drain my battery and/or download data, in any case I don't see a point in having it always running, so I would like to get rid of it!
what I discovered so far is that the process is related to both gapps and Downloadprovider.apk package included in any CM10.1 build, in fact:
1. the process starts appearing only after installing the gapps (I use a very minimal 4.2 gapps package, about 10mb only)
2. if I delete Downloadprovider.apk package from /System/App, the process doesn't appear anymore
The problem is that if I delete the Downloadprovider.apk package then I start getting gapps related FC's and phone becomes unstable (and very probably will not be possible to download anymore things from the browser and/or play store)!
So what could I do to safely get rid of that process? Maybe disable or freeze some other apps/processes? But I wouldn't know what to disable exactly..
guys please help me I am really getting crazy with that! also that could help many other people :good:
thanks a lot in advance
EDIT: maybe it was related to Maps since I installed maps 7.x I don't see that process anymore!
moly82 said:
hi guys, I hope you can help.. I really googled a lot about this, and also made many tests on my phone and waste a lot of time, but couldn't find a solution yet.. also this seems to be affecting many other people, so I don't understand how is possible nobody found a fix for that until now..
(I'm posting in general section because this seems to affect any kind of phones running cm10.1 + gapps)
the problem is that if I go to manage apps > running apps, I see Media process (DownloadService) always running! that could drain my battery and/or download data, in any case I don't see a point in having it always running, so I would like to get rid of it!
what I discovered so far is that the process is related to both gapps and Downloadprovider.apk package included in any CM10.1 build, in fact:
1. the process starts appearing only after installing the gapps (I use a very minimal 4.2 gapps package, about 10mb only)
2. if I delete Downloadprovider.apk package from /System/App, the process doesn't appear anymore
The problem is that if I delete the Downloadprovider.apk package then I start getting gapps related FC's and phone becomes unstable (and very probably will not be possible to download anymore things from the browser and/or play store)!
So what could I do to safely get rid of that process? Maybe disable or freeze some other apps/processes? But I wouldn't know what to disable exactly..
guys please help me I am really getting crazy with that! also that could help many other people :good:
thanks a lot in advance
Click to expand...
Click to collapse
Maybe you have some program/app installed which uses the download manager? Some app trying to download an update outside of the regular mechanism? I don't see DownloadService running on my phone unless I instructed it to download something. Do you notice anything downloadmanager/media related in logcat? If in doubt, attach the phone to a PC, run the following commands and attach the resulting file ('attach_me.txt') here:
Code:
adb shell 'ps; echo -----------;logcat -v time -b main -b system -b events -d;echo -----------;dumpsys;' > attach_me.txt
Use the full path to adb if you need to.
This shows the currently running processes (ps), the contents of the main, system and event logs (logcat) and a snapshot of the current state of your phone (dumpsys). If there is anything there you don't want to show to the whole world edit the resulting file before attaching it here.
thanks a lot for the reply my friend
tonight at home I think I will be able to run the adb command you suggested me (in my home computer I have sdk installed)
so far I checked logcat in terminal ("logcat |grep edia" and "logcat |grep ownload") and this is what I got:
$ su
# logcat |grep edia
D/Vold ( 1197): Volume sdcard state changing -1 (Initializing) -> 0 (No-Media)
D/Vold ( 1197): Volume sdcard state changing 0 (No-Media) -> 2 (Pending)
W/PackageParser( 1626): No actions in intent filter at /data/app/org.wikipedia-1.apk Binary XML file line #39
I/ActivityManager( 1626): Start proc android.process.media for broadcast com.android.providers.media/.MtpReceiver: pid=1765 uid=10011 gids={50011, 1015, 1023, 1024, 1028, 2001, 3003, 3007}
V/ActivityThread( 1765): android.process.media white listed for hwui
D/SystemUIService( 1701): loading: class com.android.systemui.media.RingtonePlayer
D/SystemUIService( 1701): running: [email protected]
W/ContextImpl( 1626): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1458 android.bluetooth.BluetoothHeadset.:273 android.bluetooth.BluetoothAdapter.getProfileProxy:1155 android.media.AudioService.getBluetoothHeadset:2198 android.media.AudioService.access$2800:104
W/ContextImpl( 1626): Calling a method in the system process without a qualified user: android.app.ContextImpl.bindService:1458 android.bluetooth.BluetoothA2dp.:160 android.bluetooth.BluetoothAdapter.getProfileProxy:1158 android.media.AudioService$AudioServiceBroadcastReceiver.onReceive:4087 android.app.LoadedApk$ReceiverDispatcher$Args.run:758
$ su
# logcat|grep ownload
I/ActivityManager( 1624): Start proc com.google.android.youtube for broadcast com.google.android.youtube/.core.transfer.DownloadService$BootReceiver: pid=2305 uid=10050 gids={50050, 3003, 1015, 1006, 1028}
W/ActivityManager( 1624): No content provider found for permission revoke: file:///data/data/com.android.providers.downloads/cache/downloadfile.apk
W/ActivityManager( 1624): No content provider found for permission revoke: file:///data/data/com.android.providers.downloads/cache/downloadfile.apk
I'm attaching also screenshots of the process I'm talking about
EDIT: I reinstalled everyting from scratch as a new build by quarx came out.. it seems that installing only cm build + minimal gapps, that process doesn't show up. Later after I installed back all my apps (via app2zip flashable zip) the process showed up again.. so probably you are right and there is a certain app using that process.. but how can I understand which one has relation with that service? maybe YouTube as i see it mentioned in logcat?
delete
i could generate the logs you asked without using the pc but using the phone terminal and multiple commands.. i'm uploading them to my dropbox links are below thanks in advance..
http://db.tt/gJLBYeT7
http://db.tt/OahQ8Zf7
http://db.tt/KPUTy4et
YAFU what happened to you?
it seems to me after I installed latest maps 7.x the media > download process is not appearing anymore in running processes.. maybe it was related to sh*tty maps??? :fingers-crossed:
Hello,
I have recently purchased a refurb Lenovo K6, it came with an Android 6.0 rom.
Off the bat it had some weird reboots and app crashes, updating and system restore solved nothing; the problem worsened, so I ended up using the official Lenovo tools to perform a system recovery, which flashed a stock Nougat rom (K33_USR_S223_1706101140_Q00440_ROW).
This didn't stop sudden app crashes and system restarts however; even at initial system setup, many apps including Google Play Services would stop responding.
Since then I've lost count of re-flashes, data and cache wipes, permission resets etc. that I've performed.
I've attempted to root the phone with KingRoot in order to wipe the Dalvik Cache but could not complete the process.
I got plenty of logs via logcat, wish you could help me understand what's going on using them; here is a small one (Error level treshold) that I got, includes crashes of Firefox, Lenovo Launcher and I think Google Play Services.
pastebin. com/sZkDYPXi
I got other bigger ones, as well.
Mainly I notice a lot of "no such file or directory" errors, such as:
Code:
07-24 14:46:13.852 1447 1667 E QCOM PowerHAL: Error opening sys/devices/system/cpu/cpu0/cpufreq/scaling_governor: No such file or directory
and a lot of SELinux permission denials:
Code:
07-24 14:31:22.373 474 474 E SELinux : avc: denied { find } for service=android.hardware.fingerprint.IFingerprintDaemon pid=2905 uid=10112 scontext=u:r:untrusted_app:s0:c512,c768 tcontext=u:object_r:fingerprintd_service:s0 tclass=service_manager permissive=0
In another log with Warning treshold I was getting a lot of PackageManager warnings such as these:
Code:
07-22 19:34:36.255 5135 5135 W PackageManager: Not granting permission android.permission.ACCESS_FINE_LOCATION to package com.skype.raider because it was previously installed without
Code:
07-22 19:31:12.912 1422 1595 W PackageManager: Permission com.google.android.googleapps.permission.GOOGLE_AUTH from package com.google.android.gsf in an unknown group android.permission-group.ACCOUNTS
I'd rather try to fix the problem myself if at all possible, rather than returning the phone...
Thanks a lot for your help.
I now suspect there has been a failed root attempt on this device, as many errors have to do with denied permissions.
Also I managed to get a new logcat from many Firefox/Google Play Services and a system reboot, and the following line appears:
Code:
07-24 19:12:21.346 10637 10647 F art : art/runtime/gc/collector/mark_sweep.cc:448] Attempting see if it's a bad root
Also firefox crashes report this:
Code:
07-24 19:10:16.979 6598 6954 E InputDispatcher: channel '28475f0 org.mozilla.firefox/org.mozilla.gecko.BrowserApp (server)' ~ Channel is unrecoverably broken and will be disposed!
and apparently can't read session files:
Code:
07-24 19:10:42.340 10412 10426 E GeckoApp: An error occurred during restore, switching to backup file
07-24 19:10:42.340 10412 10426 E GeckoApp: org.mozilla.gecko.GeckoApp$SessionRestoreException: Could not read from session file
and the backtrace reports failure of some sort with async threads...
I really am banging my head against a wall here :crying:
bumpity bump bump
hi there, i have a redmi note 7 (global), running RR 7.0.2 on android 9. I have magisk installed and was playing around with it, adding modules that seemed interesting. Then i found this zip online for the smart lock trusted face feature so i installed it, thinking face unlocking is cool, since stock MIUI has it. After i installed it i searched around in settings to find smart lock but to no avail, so i dug up some more info and found out that smart lock had to be enabled under "trust agents". It showed up in security, but the trusted face feature keeps crashing right before the face capture screen. I've tried reflashing gapps using aroma package since i could choose what to install and that seemed cool. Didn't work, tried removing smart lock from trust agents, restarting, then enabling it again. Here's the crash report:
time: 1566930758519
msg: java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/app/FaceLock/lib/arm64/libfacenet.so" needed or dlopened by "/system/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namespace"
stacktrace: java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/app/FaceLock/lib/arm64/libfacenet.so" needed or dlopened by "/system/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namespace"
at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
at java.lang.System.loadLibrary(System.java:1669)
at com.google.android.libraries.vision.facenet.FaceNet.<clinit>(FaceNet.java:67)
at com.google.android.libraries.vision.facenet.FaceNet.createFromAssets(FaceNet.java:118)
at com.android.facelock.FaceLockUtil.initialize(FaceLockUtil.java:148)
at com.android.facelock.SetupEnrollmentScreen.onCreate(SetupEnrollmentScreen.java:517)
at android.app.Activity.performCreate(Activity.java:7144)
at android.app.Activity.performCreate(Activity.java:7135)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2932)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3087)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1817)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6724)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:495)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Click to expand...
Click to collapse
I fear that it may not work for my device specifically so if anyone knows if there are alternatives to trusted face please list them.
Thank you.
Edit: And I have the solution. It seems as though trusted face is not working with magisk root installed, strange. Just did a clean flash of RR 7.0.2 and gapps and trusted face worked. But just when I installed magisk it started crashing again. Any ideas?
When I would add an app and select the add button it crashes with the following error.
```
type: crash
osVersion: google/sunfish/sunfish:13/TP1A.220905.004/2022091400:user/release-keys
package: com.oasisfeng.greenify:47500
process: com.oasisfeng.greenify
java.lang.RuntimeException: An error occurred while executing doInBackground()
at android.os.AsyncTask$4.done(AsyncTask.java:415)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
at java.util.concurrent.FutureTask.run(FutureTask.java:269)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
at java.lang.Thread.run(Thread.java:1012)
Caused by: java.lang.SecurityException: Permission Denial: getUidProcessState from com.oasisfeng.greenify asks to run as user 11 but is calling from uid u0a242; this requires android.permission.INTERACT_ACROSS_USERS_FULL
at android.os.Parcel.createExceptionOrNull(Parcel.java:3012)
at android.os.Parcel.createException(Parcel.java:2996)
at android.os.Parcel.readException(Parcel.java:2979)
at android.os.Parcel.readException(Parcel.java:2921)
at android.app.IActivityManager$Stub$Proxy.getUidProcessState(IActivityManager.java:4838)
at android.app.ActivityManager.getUidImportance(ActivityManager.java:3792)
at java.lang.reflect.Method.invoke(Native Method)
at lq1$c0.a(SourceFile:1)
at lq1$e0.a(SourceFile:3)
at lq1$k.a(SourceFile:2)
at df1.a(SourceFile:164)
at df1.a(SourceFile:113)
at na1.a(SourceFile:5)
at oa1$e.doInBackground(SourceFile:2)
at android.os.AsyncTask$3.call(AsyncTask.java:394)
at java.util.concurrent.FutureTask.run(FutureTask.java:264)
... 4 more
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.am.UserController.handleIncomingUser(UserController.java:2243)
at com.android.server.am.ActivityManagerService.getUidProcessState(ActivityManagerService.java:7340)
at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2060)
at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2641)
at android.os.Binder.execTransactInternal(Binder.java:1302)
```
I think you'll find active support on the GrapheneOS Element chat. The people there have been very helpful for me in the past.
GrapheneOS contact information
Contact information for GrapheneOS.
grapheneos.org
hopeless.unknown said:
Caused by: java.lang.SecurityException: Permission Denial: getUidProcessState from com.oasisfeng.greenify asks to run as user 11 but is calling from uid u0a242; this requires android.permission.INTERACT_ACROSS_USERS_FULL
Click to expand...
Click to collapse
User 11 is related to your work profile. You may be using Island/Insular and Greenify tries to access the state of a process belonging to that work profile user. But it lacks the necessary permission INTERACT_ACROSS_USERS_FULL.
You can try to grant it via ADB:
Code:
pm grant om.oasisfeng.greenify android.permission.INTERACT_ACROSS_USERS_FULL
4ndr0x said:
User 11 is related to your work profile. You may be using Island/Insular and Greenify tries to access the state of a process belonging to that work profile user. But it lacks the necessary permission INTERACT_ACROSS_USERS_FULL.
You can try to grant it via ADB:
Code:
pm grant om.oasisfeng.greenify android.permission.INTERACT_ACROSS_USERS_FULL
Click to expand...
Click to collapse
Thanks @4ndr0x for your answer. I tried the adb command, but I got only the following message:
Exception occurred while executing 'grant':
java.lang.SecurityException: Permission android.permission.INTERACT_ACROSS_USERS_FULL is managed by role
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermissionInternal(PermissionManagerServiceImpl.java:1390)
at com.android.server.pm.permission.PermissionManagerServiceImpl.grantRuntimePermission(PermissionManagerServiceImpl.java:1321)
at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:547)
at android.permission.PermissionManager.grantRuntimePermission(PermissionManager.java:602)
at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2546)
at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:292)
at com.android.modules.utils.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:97)
at android.os.ShellCommand.exec(ShellCommand.java:38)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onShellCommand(PackageManagerService.java:5959)
at android.os.Binder.shellCommand(Binder.java:1058)
at android.os.Binder.onTransact(Binder.java:886)
at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4397)
at com.android.server.pm.PackageManagerService$IPackageManagerImpl.onTransact(PackageManagerService.java:5943)
at android.os.Binder.execTransactInternal(Binder.java:1307)
at android.os.Binder.execTransact(Binder.java:1265)
Click to expand...
Click to collapse