Stuck in boot loop even after flashing stock ROM

Search This thread

dasmanul

Senior Member
Feb 4, 2013
60
15
Last Wednesday, my Nexus 4 (running a rooted but otherwise stock 4.4) got stuck on "Android is starting – starting apps" during a regular boot. Since then I've been through numerous iterations of

- trying to reboot into recovery and safe mode
- wiping cache and Dalvik cache
- trying to reflash the latest stock image while preserving my user data
- trying to reflash the latest stock image while wiping everything
- relocking and re-unlocking the boot loader

in every imaginable order, both via fastboot and the Nexus root toolkit, without success. The phone gets stuck either on the boot animation or, of I'm lucky, on "Android is starting – starting apps". I also tried flashing a 4.2 image with the same result.

I've seen two threads describing the same problem (https://xdaforums.com/showthread.php?t=3374611 and https://xdaforums.com/showthread.php?t=3355216) and tried the suggestion given there of erasing/formatting and subsequently flashing all partitions by hand, then – immediately after flashing userdata – rebooting into stock recovery and doing a factory reset from there. This was my last try and the phone is right now sitting next to me and has been stuck on the boot animation for a solid four hours. Something, somehow, seems to have survived all my attempts at starting from scratch.

Is there anything else I could try? Any total nuke solution as a last resort? I'm currently at my wit's end in this matter. I'd hate to give up the phone since the hardware seems to be working fine and before going back to stock I could still adb in and see that the system was up and running in principle. Any help would be greatly appreciated! Thanks a bunch in advance!
 

dasmanul

Senior Member
Feb 4, 2013
60
15
Wouldn't this require that adb debugging was enabled? That's of course not the case with the factory images and since they don't boot there's no way for me to reenable it. Can you recommend an image to try that has adb debugging enabled from the start? Or is there any other way to enable it?
 

dasmanul

Senior Member
Feb 4, 2013
60
15
Thanks a lot, this does actually work!

Seems the phone is stuck in a loop of

Code:
W/AudioSystem(  552): AudioPolicyService not published, waiting...
I/ServiceManager(  552): Waiting for service media.audio_policy...
I/ServiceManager(  552): Waiting for service media.audio_policy...
I/ServiceManager(  552): Waiting for service media.audio_policy...
I/ServiceManager(  552): Waiting for service media.audio_policy...
I/ServiceManager(  552): Waiting for service media.audio_policy...
W/AudioSystem(  552): AudioPolicyService not published, waiting...
I/ServiceManager(  552): Waiting for service media.audio_policy...
I/ServiceManager(  552): Waiting for service media.audio_policy...
I/ServiceManager(  552): Waiting for service media.audio_policy...

I googled for this but so far didn't find anything helpful. Any advice?
 

orangek3nny

Member
Nov 9, 2013
48
37
At line 294 Zygote crashes but seems to start up fine afterwards. Does it crash again after a while or is the log endlessly spammed with the audio policy messages?
According to [1] the system might wait for the mediaserver to start. Try to force stop it if it's running and watch the log, see [2]. Maybe you get some more info this way.

Sorry to ask but are you sure you made a full wipe? The official image contains scripts for Windows and Linux that erase everything if I remember correctly.

This is all I can do, I hope this helps.

EDIT:
You can also try [3] and [4].

1: https://books.google.de/books?id=KE...iting for service media.audio_policy"&f=false
2: https://stackoverflow.com/questions/8132273
3: http://araceliaraceli1.blogspot.de/2012/09/waiting-for-service-mediaaudiopolicy-on.html
4: http://android.wekeepcoding.com/art...or+service+media.audio_policy+on+android+boot
 
  • Like
Reactions: dasmanul

nitin.chobhe

Recognized Contributor
Jan 3, 2013
8,298
19,955
India
Google Pixel 2 XL
Google Pixel 7 Pro
Last Wednesday, my Nexus 4 (running a rooted but otherwise stock 4.4) got stuck on "Android is starting – starting apps" during a regular boot. Since then I've been through numerous iterations of

- trying to reboot into recovery and safe mode
- wiping cache and Dalvik cache
- trying to reflash the latest stock image while preserving my user data
- trying to reflash the latest stock image while wiping everything
- relocking and re-unlocking the boot loader

in every imaginable order, both via fastboot and the Nexus root toolkit, without success. The phone gets stuck either on the boot animation or, of I'm lucky, on "Android is starting – starting apps". I also tried flashing a 4.2 image with the same result.

I've seen two threads describing the same problem (https://xdaforums.com/showthread.php?t=3374611 and https://xdaforums.com/showthread.php?t=3355216) and tried the suggestion given there of erasing/formatting and subsequently flashing all partitions by hand, then – immediately after flashing userdata – rebooting into stock recovery and doing a factory reset from there. This was my last try and the phone is right now sitting next to me and has been stuck on the boot animation for a solid four hours. Something, somehow, seems to have survived all my attempts at starting from scratch.

Is there anything else I could try? Any total nuke solution as a last resort? I'm currently at my wit's end in this matter. I'd hate to give up the phone since the hardware seems to be working fine and before going back to stock I could still adb in and see that the system was up and running in principle. Any help would be greatly appreciated! Thanks a bunch in advance!

If you have only this issue: "Android is starting – starting apps", then you could have just flashed the launcher zip as mentioned in this thread.

How are you wiping everything on the phone while flashing the stock images?

Nitin
 

dasmanul

Senior Member
Feb 4, 2013
60
15
First of all, thank you again for your continued support! I really feel like I'm banging my head against a wall here, it's good to have some help.

At line 294 Zygote crashes but seems to start up fine afterwards. Does it crash again after a while or is the log endlessly spammed with the audio policy messages?

As long as I watched up to now, the log is just endlessly spammed with the same messages.

According to [1] the system might wait for the mediaserver to start. Try to force stop it if it's running and watch the log, see [2]. Maybe you get some more info this way.

Did that. Couple of messages about (if I interpret correctly) restarting the mediaserver and then back to the loop. Log is at https://gist.github.com/c67342f304b6a7399084d603e186e834. The messages at the end are probably from rebooting into the bootloader via adb.

Sorry to ask but are you sure you made a full wipe? The official image contains scripts for Windows and Linux that erase everything if I remember correctly.

Well, I *do* suspect that something from the old install somehow survived despite all my attempts to nuke the phone. However, I wouldn't know how to do a fuller wipe than I've already done. I've done a factory reset via the Nexus root toolkit, I've run the flash-base.sh and flash-all.sh scripts included in the official image, and I've manually, via fastboot, erased/formated and subsequently flashed the bootloader, radio, boot, system, recovery, cache, and userdata partitions. Most of these steps have been performed multiple times.

If there's anything I've missed, I'd be grateful for suggestions. /proc/partitions suggests there's a total of 25 partitions on /dev/mmcblk0, but I don't know whether any of these are not included in the image files mentioned and, if that is the case, how to wipe them back to factory state.


I don't seem to have a libsecnativefeature.so anywhere on my system:

Code:
130|root@mako:/ # ls -lR / 2>/dev/null |grep secnative
1|root@mako:/ #


Permissions for /system/lib/libaudioflinger.so already seem to be 755 on my system:

Code:
1|root@mako:/ # ls -l /system/lib/libaudioflinger.so
-rwxr-xr-x root     root       267544 2015-09-08 20:51 libaudioflinger.so
 

dasmanul

Senior Member
Feb 4, 2013
60
15
If you have only this issue: "Android is starting – starting apps", then you could have just flashed the launcher zip as mentioned in this thread.

Thanks for the suggestion! Are you the developer of this? I'm a bit sceptical that installing a different launcher could indeed solve my problems. Could you explain a bit more what the launcher does and how that is supposed to help me?

How are you wiping everything on the phone while flashing the stock images?

See my previous post which overlapped with yours. As stated there, I'd be very grateful if somebody could provide me with a "wipier" way of wiping the phone.
 
Last edited:

orangek3nny

Member
Nov 9, 2013
48
37
@dasmanul:
Sounds like it can't get any wipier than that. At this point I would say this is a hardware issue.

If nothing else helps, you can try to disassemble the device and clean all contacts. It's not very hard and I did it myself recently to fix bad reception and unresponsive buttons.
 

nitin.chobhe

Recognized Contributor
Jan 3, 2013
8,298
19,955
India
Google Pixel 2 XL
Google Pixel 7 Pro
Thanks for the suggestion! Are you the developer of this? I'm a bit sceptical that installing a different launcher could indeed solve my problems. Could you explain a bit more what the launcher does and how that is supposed to help me?



See my previous post which overlapped with yours. As stated there, I'd be very grateful if somebody could provide me with a "wipier" way of wiping the phone.

No, that is not my zip; but I've used it. Again, it is useful in case you are stuck with "Android is starting..." Generally it is shown while it prepares the app drawer to be shown, after restarting the phone/ clearing the cache. But if the launcher is missing, it is not able to show the app drawer and this message is shown continuously.

If you have used flash-all.bat then it would have cleaned up everything on your phone (assuming that you have not modified that batch file).

Nitin
 
Last edited:

dasmanul

Senior Member
Feb 4, 2013
60
15
@orangek3nny: Thanks! Not exactly what I hoped to hear, but I'll give disassembling the device a try. I installed a new battery about half a year ago, so I guess I'll get it open again. I'll also try disconnecting the battery for some time. Not much hope anymore, though. Real pity, since otherwise the phone seems to work fine. I mean, Android is apparently able to boot, just not to a point where there's a usable UI.

@nitin.chobhe: Thank you! I gave the zip a try, but as I feared, it didn't change the behaviour.

Looks like I might be in the market for a new phone...
 

nitin.chobhe

Recognized Contributor
Jan 3, 2013
8,298
19,955
India
Google Pixel 2 XL
Google Pixel 7 Pro
@orangek3nny: Thanks! Not exactly what I hoped to hear, but I'll give disassembling the device a try. I installed a new battery about half a year ago, so I guess I'll get it open again. I'll also try disconnecting the battery for some time. Not much hope anymore, though. Real pity, since otherwise the phone seems to work fine. I mean, Android is apparently able to boot, just not to a point where there's a usable UI.

@nitin.chobhe: Thank you! I gave the zip a try, but as I feared, it didn't change the behaviour.

Looks like I might be in the market for a new phone...

I doubt that it is a hardware issue... May be try downloading the stock images from Google once again and flash using fastboot instead of any toolkit. I always refer this nice video from youtube to flash factory images :)

Nitin
 

dasmanul

Senior Member
Feb 4, 2013
60
15
As stated earlier, I did flash with fastboot several times with no different result. Thanks anyway for the suggestion!
 

dasmanul

Senior Member
Feb 4, 2013
60
15
Update: I just tried flashing the oldest available factory image (4.2.2) and the phone booted successfully with that. I'll try an update now.
 
  • Like
Reactions: orangek3nny

dasmanul

Senior Member
Feb 4, 2013
60
15
'Nother update: While booting in 4.2.2 the phone doesn't recognise its IMEI. My research suggests that might be due to a corrupted EFS partition. mmcblk0p10 is indeed full of zeros. I doubt that's correct.

I'm now restoring a Nandroid backup and hoping I did actually backup the EFS partition with that. I guess I'm screwed otherwise, right?
 

dasmanul

Senior Member
Feb 4, 2013
60
15
Unfortunately, still no success. EFS was apparently not in the Nandroid backup. I cloned the whole mmcblk0 from my wife's Nexus 4 which is still on 4.2, hoping that would restore the phone to life. However, situation is still the same: Phone boots but reports its IMEI as unknown and doesn't connect to cellular. I'm close to giving up at this point.
 

Top Liked Posts