Edits and logcats below.
What Happenned:
A few days back it left my phone (Mediatek chipset) to charge overnight. What I did not notice was that the charger was loose and the charge was at around 2%. Next morning I woke up to find my phone's battery drained completely.
When I tried to start it (after charging), it was taking a bit too much time, and the phone was heating up. However the boot didn't complete nor did the phone reboot (like a bootloop).
What I Did:
I went to the recovery, took backups and cleared the /data
partition and got the phone to start. However I require the application data (more than the phone) and just formatting the partition didn't seem to take me closer to my goal and hence I restored the backups.
I then cleared the data of several programs which might have caused the problem:
rm -rf com.android.captiveportallogin com.android.carrierconfig com.android.cellbroadcastreceiver com.android.certinstaller com.android.defcontainer com.android.development com.android.documentsui com.android.externalstorage com.android.frameworks.telresources com.android.keychain com.android.managedprovisioning com.android.mms.service com.android.noisefield com.android.pacprocessor com.android.printspooler com.android.proxyhandler com.android.server.telecom com.android.statementservice com.android.stk com.android.vpndialogs com.android.webview com.gametion.ludo com.google.android.configupdater com.grarak.kerneladiutor com.jrummy.app.managerfree com.lexa.fakegps com.makeinfo.androididchanger com.one24.deviceid com.ores.hash com.phoneinfo.changer com.resurrection.otacom.sanctuaire.netswisstool com.unique.mobilefaker com.zimperium.zanti cyanogenmod.platform de.robv.android.xposed.installer it.evilsocket.dsploit net.fidanov.landroid org.cyanogenmod.livelockscreen.service org.cyanogenmod.providers.datausage
rm -rf org.cyanogenmod.snap org.cyanogenmod.theme.chooser org.cyanogenmod.themes.provider org.cyanogenmod.wallpapers.photophase org.cyanogenmod.weather.provider org.omnirom.omniswitch tursky.jan.settings
rm -rf com.android.settings com.android.systemui
Didn't help...
So I accessed logcat
and extracted some of the possibly juicy bits (in random order):
page record for 0xb6e4301c was not found
AndroidRuntime:
at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:1873)
ServiceManager: service 'batterystats' died
01-01 07:33:29.583 8300 8300 D AndroidRuntime: Shutting down VM
01-01 07:33:29.584 8300 8300 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
01-01 07:37:16.064 15437 15437 E AndroidRuntime: Error reporting crash
01-01 07:37:16.064 15437 15437 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.IActivityManager.handleApplicationCrash(android.os.IBinder, android.app.ApplicationErrorReport$CrashInfo)' on a null object reference
01-01 07:37:16.064 15437 15437 I Process : Sending signal. PID: 15437 SIG: 9
01-01 07:37:16.088
189
189 I ServiceManager: service 'batterystats' died
01-01 07:37:16.088
189
189 I ServiceManager: service 'appops' died
01-01 07:37:16.088
189
189 I ServiceManager: service 'power' died
01-01 07:37:16.088
189
189 I ServiceManager: service 'display' died
01-01 07:37:16.093
217
217 E installd: eof
01-01 07:37:16.093
217
217 E installd: failed to read size
01-01 07:37:16.093
217
217 I installd: closing connection
01-01 07:37:16.404 12127 12127 I Zygote : Process 12239 exited cleanly (13)
01-01 07:37:16.405 12127 12127 E Zygote : Exit zygote because system server (15437) has terminated
01-01 07:37:16.446
189
189 I ServiceManager: service 'user.xposed.app' died
01-01 07:37:16.453
189
189 I ServiceManager: service 'media.audio_flinger' died
01-01 07:37:16.453
189
189 I ServiceManager: service 'media.player' died
01-01 07:37:16.453
189
189 I ServiceManager: service 'media.resource_manager' died
01-01 07:37:35.780 17500 17500 E cutils-trace: Error opening trace file: No such file or directory (2)
01-01 07:32:20.048 3896 3896 E AndroidRuntime: Error reporting WTF
01-01 07:32:20.048 3896 3896 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.app.IActivityManager.handleApplicationWtf(android.os.IBinder, java.lang.String, boolean, android.app.ApplicationErrorReport$CrashInfo)' on a null object reference
01-01 07:32:20.048 3896 3896 E AndroidRuntime:
at com.android.internal.os.RuntimeInit.wtf(RuntimeInit.java:353)
01-01 07:32:20.048 3896 3896 E AndroidRuntime:
at android.util.Log$1.onTerribleFailure(Log.java:104)
01-01 07:32:20.048 3896 3896 E AndroidRuntime:
at android.util.Log.wtf(Log.java:297)
01-01 07:32:20.048 3896 3896 E AndroidRuntime:
at android.util.Slog.wtf(Slog.java:82)
01-01 07:32:41.126 5786 5786 E AndroidRuntime: android.util.Log$TerribleFailure: No start tag found in package manager settings
01-01 07:32:41.161 5786 5786 W PackageManager: Library not found: /system/framework/org.apache.http.legacy.jar
01-01 07:32:41.247 5786 5786 E System : ******************************************
01-01 07:32:41.249 5786 5786 E System : ************ Failure starting system services
01-01 07:32:41.249 5786 5786 E System : java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.android.server.pm.Settings$VersionInfo.fingerprint' on a null object reference
Then I got an idea and did rm -rf /data/data
and mkdir /data/data
. Didn't help but showed that the problem was not due to app data but something else in the data partition.
Soon, I noticed a repeating pattern in logcat
, indicating my phone was stuck in a loop (not bootloop) and not a blocking call to a process or thread.
The looping logcat
:
01-01 07:32:53.191 6368 6368 E System : ******************************************
01-01 07:32:53.191 6368 6368 E System : ************ Failure starting system services
01-01 07:32:53.191 6368 6368 E System : java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.android.server.pm.Settings$VersionInfo.fingerprint' on a null object reference
01-01 07:32:53.191 6368 6368 E System :
at com.android.server.pm.PackageManagerService.<init>(PackageManagerService.java:2170)
01-01 07:32:53.191 6368 6368 E System :
at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:1873)
01-01 07:32:53.191 6368 6368 E System :
at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:387)
01-01 07:32:53.191 6368 6368 E System :
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
01-01 07:32:53.191 6368 6368 E System :
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:334)
01-01 07:32:53.191 6368 6368 E System :
at com.android.server.SystemServer.startBootstrapServices(<Xposed>)
01-01 07:32:53.191 6368 6368 E System :
at com.android.server.SystemServer.run(SystemServer.java:289)
01-01 07:32:53.191 6368 6368 E System :
at com.android.server.SystemServer.main(SystemServer.java:176)
01-01 07:32:53.191 6368 6368 E System :
at java.lang.reflect.Method.invoke(Native Method)
01-01 07:32:53.191 6368 6368 E System :
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-01 07:32:53.191 6368 6368 E System :
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-01 07:32:53.191 6368 6368 E System :
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
01-01 07:32:53.192 6368 6368 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
01-01 07:32:53.192 6368 6368 E AndroidRuntime: java.lang.NullPointerException: Attempt to read from field 'java.lang.String com.android.server.pm.Settings$VersionInfo.fingerprint' on a null object reference
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at com.android.server.pm.PackageManagerService.<init>(PackageManagerService.java:2170)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:1873)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:387)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:334)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at com.android.server.SystemServer.startBootstrapServices(<Xposed>)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at com.android.server.SystemServer.run(SystemServer.java:289)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at com.android.server.SystemServer.main(SystemServer.java:176)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at java.lang.reflect.Method.invoke(Native Method)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-01 07:32:53.192 6368 6368 E AndroidRuntime:
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
01-01 07:32:53.193 6368 6368 E AndroidRuntime: Error reporting crash
01-01 07:32:53.193 6368 6368 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'void android.app.IActivityManager.handleApplicationCrash(android.os.IBinder, android.app.ApplicationErrorReport$CrashInfo)' on a null object reference
01-01 07:32:53.193 6368 6368 E AndroidRuntime:
at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:95)
01-01 07:32:53.193 6368 6368 E AndroidRuntime:
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)
01-01 07:32:53.193 6368 6368 E AndroidRuntime:
at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)
01-01 07:32:53.411 6438 6438 F libc
: page record for 0xb6d8301c was not found (block_size=16)
01-01 07:32:57.925 6682 6682 F libc
: page record for 0xb6e5b01c was not found (block_size=16)
01-01 07:33:03.304 6930 6930 F libc
: page record for 0xb6de901c was not found (block_size=16)
01-01 07:33:05.758 7050 7050 I InstallerConnection: connecting...
01-01 07:33:05.772 7050 7050 I InstallerConnection: disconnecting...
01-01 07:33:05.790 7050 7050 I SystemServer: Entered the Android system server!
01-01 07:33:05.896 7050 7050 I SystemServiceManager: Starting com.android.server.pm.Installer
01-01 07:33:05.897 7050 7050 I Installer: Waiting for installd to be ready.
01-01 07:33:05.897 7050 7050 I InstallerConnection: connecting...
01-01 07:33:05.897 7050 7050 I SystemServiceManager: Starting com.android.server.am.ActivityManagerService$Lifecycle
01-01 07:33:05.908 7050 7050 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:05.908 7050 7050 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:05.908 7050 7050 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:05.908 7050 7050 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:05.908 7050 7050 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:05.908 7050 7050 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:06.027 7050 7050 I ActivityManager: Memory class: 96
01-01 07:33:06.101 7050 7050 D BatteryStatsImpl: Reading daily items from /data/system/batterystats-daily.xml
01-01 07:33:06.254 7050 7050 W ProcessCpuTracker: Skipping unknown process pid 7075
01-01 07:33:06.265 7050 7050 I IntentFirewall: Read new rules (A:0 B:0 S:0)
01-01 07:33:06.279 7050 7050 D AppOps : AppOpsService published
01-01 07:33:06.279 7050 7050 I SystemServiceManager: Starting com.android.server.power.PowerManagerService
01-01 07:33:06.287 7050 7050 I SystemServiceManager: Starting com.android.server.lights.LightsService
01-01 07:33:06.290 7050 7050 I SystemServiceManager: Starting com.android.server.display.DisplayManagerService
01-01 07:33:06.293 7050 7050 I SystemServiceManager: Starting phase 100
01-01 07:33:06.301 7050 7094 I DisplayManagerService: Display device added: DisplayDeviceInfo{
"Built-in Screen": uniqueId="local:0", 720 x 1280, modeId 1, defaultModeId 1, supportedModes [{
id=1, width=720, height=1280, fps=55.9
}
], colorTransformId 1, defaultColorTransformId 1, supportedColorTransforms [{
id=1, colorTransform=0
}
], density 320, 294.967 x 295.563 dpi, appVsyncOff 0, presDeadline 18889087, touch INTERNAL, rotation 0, type BUILT_IN, state UNKNOWN, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS
}
01-01 07:33:06.304 7050 7050 I SystemServer: Package Manager
01-01 07:33:06.309 7050 7094 I DisplayManagerService: Display device changed state: "Built-in Screen", ON
01-01 07:33:08.137 7201 7201 F libc
: page record for 0xb6e5701c was not found (block_size=16)
01-01 07:33:13.103 7467 7467 F libc
: page record for 0xb6de801c was not found (block_size=16)
01-01 07:33:17.544 7700 7700 I InstallerConnection: connecting...
01-01 07:33:17.552 7700 7700 I InstallerConnection: disconnecting...
01-01 07:33:17.579 7700 7700 I SystemServer: Entered the Android system server!
01-01 07:33:17.750 7700 7700 I SystemServiceManager: Starting com.android.server.pm.Installer
01-01 07:33:17.750 7700 7700 I Installer: Waiting for installd to be ready.
01-01 07:33:17.750 7700 7700 I InstallerConnection: connecting...
01-01 07:33:17.751 7700 7700 I SystemServiceManager: Starting com.android.server.am.ActivityManagerService$Lifecycle
01-01 07:33:17.760 7700 7700 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:17.760 7700 7700 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:17.760 7700 7700 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:17.760 7700 7700 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:17.760 7700 7700 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:17.760 7700 7700 I XXXXXX : choosing minFree values for 32 Bit
01-01 07:33:17.836 7700 7700 I ActivityManager: Memory class: 96
01-01 07:33:17.914 7700 7700 D BatteryStatsImpl: Reading daily items from /data/system/batterystats-daily.xml
01-01 07:33:18.187 7700 7700 W ProcessCpuTracker: Skipping unknown process pid 7732
01-01 07:33:18.196 7700 7700 I IntentFirewall: Read new rules (A:0 B:0 S:0)
01-01 07:33:18.333 7700 7700 D AppOps : AppOpsService published
01-01 07:33:18.334 7700 7700 I SystemServiceManager: Starting com.android.server.power.PowerManagerService
01-01 07:33:18.353 7700 7700 I SystemServiceManager: Starting com.android.server.lights.LightsService
01-01 07:33:18.356 7700 7700 I SystemServiceManager: Starting com.android.server.display.DisplayManagerService
01-01 07:33:18.370 7700 7761 I DisplayManagerService: Display device added: DisplayDeviceInfo{
"Built-in Screen": uniqueId="local:0", 720 x 1280, modeId 1, defaultModeId 1, supportedModes [{
id=1, width=720, height=1280, fps=55.9
}
], colorTransformId 1, defaultColorTransformId 1, supportedColorTransforms [{
id=1, colorTransform=0
}
], density 320, 294.967 x 295.563 dpi, appVsyncOff 0, presDeadline 18889087, touch INTERNAL, rotation 0, type BUILT_IN, state UNKNOWN, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS
}
01-01 07:33:18.373 7700 7700 I SystemServiceManager: Starting phase 100
01-01 07:33:18.374 7700 7761 I DisplayManagerService: Display device changed state: "Built-in Screen", ON
01-01 07:33:18.375 7700 7700 I SystemServer: Package Manager
01-01 07:33:18.496 7700 7700 D SELinuxMMAC: Using policy file /system/etc/security/mac_permissions.xml
01-01 07:33:18.504 7700 7700 W PackageManager: No start tag found in package manager settings
01-01 07:33:18.507 7700 7700 E PackageManager: No start tag found in package manager settings
01-01 07:33:18.509 7700 7700 E AndroidRuntime: Error reporting WTF
01-01 07:33:18.509 7700 7700 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.app.IActivityManager.handleApplicationWtf(android.os.IBinder, java.lang.String, boolean, android.app.ApplicationErrorReport$CrashInfo)' on a null object reference
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.internal.os.RuntimeInit.wtf(RuntimeInit.java:353)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at android.util.Log$1.onTerribleFailure(Log.java:104)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at android.util.Log.wtf(Log.java:297)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at android.util.Slog.wtf(Slog.java:82)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.pm.Settings.readLPw(Settings.java:2829)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.pm.PackageManagerService.<init>(PackageManagerService.java:2030)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:1873)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:387)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:334)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.SystemServer.startBootstrapServices(<Xposed>)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.SystemServer.run(SystemServer.java:289)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.SystemServer.main(SystemServer.java:176)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at java.lang.reflect.Method.invoke(Native Method)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
01-01 07:33:18.509 7700 7700 E AndroidRuntime: Original WTF:
01-01 07:33:18.509 7700 7700 E AndroidRuntime: android.util.Log$TerribleFailure: No start tag found in package manager settings
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at android.util.Log.wtf(Log.java:291)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at android.util.Slog.wtf(Slog.java:82)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.pm.Settings.readLPw(Settings.java:2829)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.pm.PackageManagerService.<init>(PackageManagerService.java:2030)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.pm.PackageManagerService.main(PackageManagerService.java:1873)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.SystemServer.startBootstrapServices(SystemServer.java:387)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at de.robv.android.xposed.XposedBridge.invokeOriginalMethodNative(Native Method)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at de.robv.android.xposed.XposedBridge.handleHookedMethod(XposedBridge.java:334)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.SystemServer.startBootstrapServices(<Xposed>)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.SystemServer.run(SystemServer.java:289)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.server.SystemServer.main(SystemServer.java:176)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at java.lang.reflect.Method.invoke(Native Method)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
01-01 07:33:18.509 7700 7700 E AndroidRuntime:
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:102)
01-01 07:33:18.527 7700 7700 W PackageManager: Library not found: /system/framework/org.apache.http.legacy.jar
01-01 07:33:18.580 7700 7700 E System : ******************************************
01-01 07:33:18.581 7700 7700 E System : ************ Failure starting system services
Note tha the first and last 2 lines are the same, indicating a loop.
Edit:
/data/system # rm -rf *
helps starts the phone, so the problen is there. But running the command results in a partial loss of the application data (so I restored the backups of the faulty /data
partition).