I am an owner of a Lenovo K2; due to having a lot of reboots and application crashes, I flashed the official Lenovo Nougat ROM from their recovery tool, performed system factory reset, cleared cache of everything...
Doing so did not resolve the problem at all, so I replicated the crashes and reboots while logging via adb logcat (treshold level Warning).
Here is the complete log: https://www.dropbox.com/s/c9955zdinyemezx/log4.txt?dl=0
I am no expert so I'd appreciate if someone could help me analyse the log I'd be very thankful; here are the most recurring errors:
07-22 19:34:36.375 5135 5135 W PackageManager: Not granting permission android.permission.WRITE_EXTERNAL_STORAGE to package com.lenovo.leos.cloud.sync.row because it was previously installed without
07-22 19:34:36.375 5135 5135 W PackageManager: Unknown permission android.permission.ACCESS_SUPERUSER in package com.lenovo.leos.cloud.sync.row
07-22 19:34:39.504 5135 5135 E DeviceIdleController: Bad device idle settings
07-22 19:34:39.504 5135 5135 E DeviceIdleController: java.lang.IllegalArgumentException: 'null' in 'null' is not a valid key-value pair
And Fatal exceptions thrown when apps crash:
07-22 19:33:56.796 1422 1516 F art : art/runtime/gc/collector/mark_sweep.cc:413] Tried to mark 0x40 not contained by any spaces
07-22 19:34:28.815 4933 4933 F DEBUG : pid: 665, tid: 665, name: fingerprintd >>> /system/bin/fingerprintd <<<
There is a solution for this.
Go to the Settings Page.
Go to 'Apps' Settings.
Find the app package causing this problem and click into it.
Go to 'Permissions' settings and allow all the permissions shown there.
Hope the issue is now solved.
Related
An Android function (APP A in the log) sent alerts to another application (APP B in the log).
We are facing one issue. APP B application is being blocked from restarting by MARsPolicyManager because of an autorun policy.
In Samsung S8, Smart Manager application is available. This application optimizes the device and kills the unnecessary background application from the device.
Below are the ADB logs:
05-30 01:03:33.481 1592 2291 D MARsPolicyManager: Blocked by Policy:2 -- Caller is not samsung!!
05-30 01:03:33.481 1592 2291 D MARsPolicyManager: Package: com.nielsen.appb, userid: 0, hostingType: provider is Restricted by policy: autorun(2) caller is: ProcessRecord{7da5e2d0 11579:com.nielsen.appa/u0a207}
05-30 01:03:33.482 1592 1654 I ActivityManager: Displayed com.nielsen.appa/md5ddf5d0d55652744930eac3d8d34aaa0c.SurveyPerform: +209ms
05-30 01:03:33.482 11579 11579 E ActivityThread: Failed to find provider info for com.nielsen.qct.contentprovider.EventsProvider
05-30 01:03:33.492 1592 2291 D EdgeLightingManager: isCallingUserSupported : callingUserId=0, mUserId=0, isDualAppId=false
05-30 01:03:33.492 1592 2291 D EdgeLightingManager: showForToast : packageName = com.nielsen.appa
05-30 01:03:33.492 1592 2291 D EdgeLightingClientManager: isAvailableEdgeLighting: condition=1 mCondition=3 mIsConnected=false0
05-30 01:03:33.492 1592 2291 D EdgeLightingPolicyManager: isAcceptableApplication: pkg=com.nielsen.appa
, range=512 , includeAllApp=false , userId=0 , infoRange=0 , infoCategory=0
05-30 01:03:33.492 1592 2291 D EdgeLightingManager: showForToast : return false by isAcceptableApplication.
When the app is force stopped all notifications are removed from the notification shade. Force stop / force killed also means the app can't receive any push notifications or any other Intents while the app is in this state.
The device is:
Samsung Galaxy S8
Model No-SM G9500
Android 8,9.
Processor- Snapdragon
This device model only available in the United States and China.
We need your support here. We have a couple of questions as well.
What the MARsPolicyManager is?
Is it something related to KNOX ?
How we can avoid this issue ?
Is this android specific ?
This app instantiates a WebView on app launch without adding it to the UI tree. This is done for preloading purposes.
When finally adding the WebView to the UI tree later on, the app crashes without a stack trace.
At the time the WebView gets added to the UI tree, logcat shows the following on an emulator running API level 22:
D <last app event before adding preloaded webview to ui tree>
W ResourceType: No known package when getting name for resource number 0xffffffff
E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
E eglCodecCommon: glUtilsParamSize: unknow param 0x00008b49
E eglCodecCommon: glUtilsParamSize: unknow param 0x00008b4b
E eglCodecCommon: glUtilsParamSize: unknow param 0x00008b4a
D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 10059 <<<<<<
D AndroidRuntime: CheckJNI is ON
E cutils-trace: Error opening trace file: Permission denied (13)
E memtrack: Couldn't load memtrack module (No such file or directory)
E android.os.Debug: failed to load memtrack module: -2
D AndroidRuntime: Calling main entry org.chromium.components.crash.browser.CrashpadMain
W linker : libwebviewchromium.so: unused DT entry: type 0x6ffffef5 arg 0x4c34
W linker : libwebviewchromium.so: unused DT entry: type 0x6ffffffe arg 0x4bd4
W linker : libwebviewchromium.so: unused DT entry: type 0x6fffffff arg 0x3
E chromium: [0722/152535.383241:ERROR:elf_dynamic_array_reader.h(61)] tag not found
E chromium: [0722/152535.394807:ERROR:file_io_posix.cc(140)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
E chromium: [0722/152535.394897:ERROR:file_io_posix.cc(140)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
E chromium: [0722/152535.401624:ERROR:system_snapshot_linux.cc(125)] Couldn't read property ro.product.board
D AndroidRuntime: Shutting down VM
I WindowState: WIN DEATH: Window{2507ca0c u0 com.myapp.debug}
Does this point to the root cause of the crash?
I'm wondering if they are instead part of a crash recovery/dump mechanism (due to the reference to "CrashpadMain" before the errors), and if I would be able to find a stack trace elsewhere. While I can use adb bugreport, I don't know where to look in the report for information on the crash instance.
Of note, I've only been able to reproduce this crash (though consistently) on emulators, and only running API levels 22, 25, 27 and 29. A physical device, and an emulator running API level 23, do not reproduce it.
From the crash output it looks like the builds you're using have is_official_build=true set? (which makes sense for perf I guess)
This basically prevents Android from generating useful crash dump output at all, because the unwind tables are omitted from the binary. The only way to debug crashes in this kind of binary is to use Crashpad dumps, but those are unlikely to be hooked up usefully in a test environment?
Build with exclude_unwind_tables=false to override the default. This will increase binary size quite a bit, but should result in you getting a meaningful stack backtrace with more than one frame. You should then be able to symbolise the stack trace addresses to find out what's crashing.
exclude_unwind_tables
Current value (from the default) = true
From //build/config/compiler/compiler.gni:103
Exclude unwind tables by default for official builds as unwinding can be
done from stack dumps produced by Crashpad at a later time "offline" in the
crash server. Since this increases binary size, we don't recommend including
them in shipping builds.
For unofficial (e.g. development) builds and non-Chrome branded (e.g. Cronet
which doesn't use Crashpad, crbug.com/479283) builds it's useful to be able
to unwind at runtime.
TL;DR: When updating system apps on android, the updated app is only started after reboot.
I am developing a custom ROM based on Android 8.1.2 for a custom device based on Rockchip RK3126c. I took the AOSP source from the board manufacturer and only modified the platform key and added two custom apps as system apps; one is privileged (shared system user), and one isn't, i.e. the first is located in /system/priv-app and signed with the platform key, and the second in /system/app and signed with its own key.
Both apps work, but when I try to update any of the two (via adb shell pm install -r ... or via Android Studio) the update doesn't take effect; the old version still runs, even after killing (adb shell kill -9 ... or throwing a null pointer exception) and restarting it. Only after a full reboot is the new version started. I did increment the versionCode. Before the reboot, getPackageManager().getPackageInfo(...).versionCode yields the new version number, while BuildConfig.VERSION_CODE gives the old one. This is both for eng and user builds.
While updating, adb logcat shows:
10-17 15:45:19.706 1048 1048 D AndroidRuntime: Calling main entry com.android.commands.pm.Pm
10-17 15:45:19.725 1058 1058 E asset : setgid: Operation not permitted
10-17 15:45:22.563 336 362 I ActivityManager: Start proc 1062:com.android.defcontainer/u0a11 for service com.android.defcontainer/.DefaultContainerService
10-17 15:45:22.617 1062 1062 I zygote : The ClassLoaderContext is a special shared library.
10-17 15:45:22.739 336 362 I chatty : uid=1000(system) PackageManager expire 1 line
10-17 15:45:22.820 1077 1077 I dex2oat : /system/bin/dex2oat --input-vdex-fd=-1 --output-vdex-fd=14 --compiler-filter=quicken --classpath-dir=/data/app/com.example.myapp-cdF84NESHVxl5UTZHVbRdg== --class-loader-context=PCL[]
10-17 15:45:22.832 1077 1077 W dex2oat : Could not reserve sentinel fault page
10-17 15:45:26.117 1077 1080 W dex2oat : Verification of boolean ao0.a(java.lang.String, long) took 130.568ms
10-17 15:45:28.960 1077 1077 I dex2oat : dex2oat took 6.142s (10.744s cpu) (threads: 4) arena alloc=17KB (17568B) java alloc=4MB (4274432B) native alloc=6MB (6543768B) free=1801KB (1844840B)
10-17 15:45:28.997 336 350 I ActivityManager: Force stopping com.example.myapp appid=1000 user=-1: installPackageLI
10-17 15:45:29.009 336 362 W PackageManager: Trying to update system app code path from /system/priv-app/MyApp to /data/app/MyApp-cdF84NESHVxl5UTZHVbRdg==
10-17 15:45:29.010 336 362 W PackageManager: Code path for com.example.myapp changing from /system/priv-app/MyApp to /data/app/MyApp-cdF84NESHVxl5UTZHVbRdg==
10-17 15:45:29.010 336 362 W PackageManager: Resource path com.example.myapp changing from /system/priv-app/MyApp to /data/app/MyApp-cdF84NESHVxl5UTZHVbRdg==
10-17 15:45:29.205 242 242 E : Couldn't opendir /data/app/vmdl1968223466.tmp: No such file or directory
10-17 15:45:29.205 242 242 E installd: Failed to delete /data/app/vmdl1968223466.tmp: No such file or directory
10-17 15:45:29.213 336 362 I ActivityManager: Force stopping com.example.myapp appid=1000 user=0: pkg removed
10-17 15:45:29.214 1048 1048 I Pm : Package com.example.myapp installed in 9500 ms
10-17 15:45:29.239 1048 1048 I app_process: System.exit called, status: 0
10-17 15:45:29.239 1048 1048 I AndroidRuntime: VM exiting with result code 0.
After the reboot, further updates to the app do work - apparently, the problem only exists when changing the code path from /system/[priv-]app to /data/app, but not when the path is already /data/app.
The same thing worked fine on Android 7.1.2. Deep within the android framework there is probably some cache for the code paths of the apps which doesn't get updated after the app is overwritten. Anyone knows where that is located and how to fix this problem?
After a lot of fiddling, I found it myself: The app was marked as persistent in the manifest, which causes the mentioned behaviour. It only worked on Android 7.1.2 because there was a vendor-specific modification that ignored the persistent flag.
I have an app, in testing, written in Xamarin which I release to google play. Up until recently all updates had gone in fine - but one specific update fails to install on my client devices. The error on the client is simply "cant install appname" and there is no additional information.
Initially I thought it was a device problem but the play stats show that the version has not updated on any of the devices - and usually they auto update.
I have since released 3 different incremental versions (with few unimportant changes) but none of them have managed to install.
Are there any logs or techniques for diagnosing why an application wont install?
The only clue I have at the moment is that during the download of the APK the download progress bar goes way over the 12mb that the app is - up to around 16-20mb before the app attempts to install and then fails.
I have no idea where to start looking - is this a failure of my APK, my code? google play services?
Any help appreciated
Edit:
Errors from the ADB log, thanks to SushiHangover include several errors like this:
E Finsky : [3671] oqt.run(4): Couldn't create session for <appname>: Cannot automatically move <appname> from af01404a-b700-4834-8d5c-b2bcac411834 to internal storage
E Finsky : java.io.IOException: Cannot automatically move <appname> from af01404a-b700-4834-8d5c-b2bcac411834 to internal storage
E Finsky : at java.lang.reflect.Constructor.newInstance0(Native Method)
E Finsky : at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
E Finsky : at android.os.ParcelableException.readFromParcel(ParcelableException.java:56)
E Finsky : at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:82)
E Finsky : at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:80)
E Finsky : at android.os.Parcel.readParcelable(Parcel.java:2852)
E Finsky : at android.os.Parcel.readException(Parcel.java:2000)
E Finsky : at android.os.Parcel.readException(Parcel.java:1951)
E Finsky : at android.content.pm.IPackageInstaller$Stub$Proxy.createSession(IPackageInstaller.java:254)
E Finsky : at android.content.pm.PackageInstaller.createSession(PackageInstaller.java:324)
E Finsky : at opy.b(SourceFile:7)
E Finsky : at oqt.run(Unknown Source:3)
E Finsky : at android.os.Handler.handleCallback(Handler.java:790)
E Finsky : at android.os.Handler.dispatchMessage(Handler.java:99)
E Finsky : at android.os.Looper.loop(Looper.java:164)
E Finsky : at android.os.HandlerThread.run(HandlerThread.java:65)
This second one appears to be unrelated, I cleared the log and retried and the only consistent errors were the one above.
BugleRcsEngine: [2] qbe.a: Unable to get Cs Apk version: android.content.pm.PackageManager$NameNotFoundException: com.google.android.ims
Not sure what either of these mean though - any additional insight appreciated.
This isn't an answer so much as a workaround that may help others.
I uninstalled the application, then reinstalled it from the play store from scratch and the new version came down straight away. I think that the play store must have had an error and cached that locally - despite clearing the play store files, and even reinstalling the play store itself.
I don't know really what the fix is here - but uninstall the app and reinstall worked for me - and I can only hope that it does not affect my app users as they are less likely to try that.
Thanks to SushiHangover and JackHua for their help and guidance
I am using a kitkat device to debug my app,when i run the app i am getting this error.
PackageManager: mismatched uid for com.ex.app_name, try to erase old data
PackageManager: Package com.compny.app_name has mismatched uid: 10258 on disk, 10259 in settings
E/PackageManager: Unable to copy native libraries
java.io.IOException: Cannot create /mismatched_uid/settings_10259/fs_10258
at com.android.server.pm.PackageManagerService.copyNativeLibrariesForInternalApp(PackageManagerService.java:5328)
at com.android.server.pm.PackageManagerService.scanPackageLI(PackageManagerService.java:4810)
at com.android.server.pm.PackageManagerService.installNewPackageLI(PackageManagerService.java:9348)
at com.android.server.pm.PackageManagerService.installPackageLI(PackageManagerService.java:9794)
at com.android.server.pm.PackageManagerService.access$2300(PackageManagerService.java:182)
at com.android.server.pm.PackageManagerService$5.run(PackageManagerService.java:7512)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.os.HandlerThread.run(HandlerThread.java:61)
I have searched for this ,but i could not find a solution .Can anyone help?