FORUMS
Remove All Ads from XDA

Stuck in boot loop even after flashing stock ROM

60 posts
Thanks Meter: 15
 
By dasmanul, Member on 19th September 2017, 01:57 PM
Post Reply Email Thread
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://forum.xda-developers.com/sho....php?t=3374611 and https://forum.xda-developers.com/sho....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!
 
 
19th September 2017, 02:55 PM |#2  
Member
Thanks Meter: 36
 
More
Run 'adb logcat' during boot, record the output and post it here / try to find the cause of the boot loop.
The Following User Says Thank You to orangek3nny For This Useful Post: [ View ] Gift orangek3nny Ad-Free
19th September 2017, 03:02 PM |#3  
OP Member
Thanks Meter: 15
 
More
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?
19th September 2017, 03:08 PM |#4  
Member
Thanks Meter: 36
 
More
You're right of course, didn't think about that. I don't know any ROMs with pre-enabled debugging but in theory it should be possible to boot into TWRP and activate it by editing some file via ADB since it works there. Afterwards you should be able to run logcat.

This seems to be a good guide but I can't confirm if it really works: https://gist.github.com/varhub/7b955...fde2300fcfd0bd
The Following User Says Thank You to orangek3nny For This Useful Post: [ View ] Gift orangek3nny Ad-Free
19th September 2017, 04:17 PM |#5  
OP Member
Thanks Meter: 15
 
More
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?
19th September 2017, 06:00 PM |#6  
Member
Thanks Meter: 36
 
More
You should upload the full log just in case. Those are info and warning messages but no errors.
19th September 2017, 08:20 PM |#7  
OP Member
Thanks Meter: 15
 
More
Fair enough. Full log is attached and can also be found at https://pastebin.com/apL0SWa5.
Attached Files
File Type: log boot.log - [Click for QR Code] (169.6 KB, 18 views)
19th September 2017, 10:19 PM |#8  
Member
Thanks Meter: 36
 
More
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=KER...icy%22&f=false
2: https://stackoverflow.com/questions/8132273
3: http://araceliaraceli1.blogspot.de/2...policy-on.html
4: http://android.wekeepcoding.com/arti...n+android+boot
The Following User Says Thank You to orangek3nny For This Useful Post: [ View ] Gift orangek3nny Ad-Free
20th September 2017, 10:01 AM |#9  
nitin.chobhe's Avatar
Recognized Contributor
Flag Pune
Thanks Meter: 13,808
 
Donate to Me
More
Quote:
Originally Posted by dasmanul

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://forum.xda-developers.com/sho....php?t=3374611 and https://forum.xda-developers.com/sho....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
20th September 2017, 10:34 AM |#10  
OP Member
Thanks Meter: 15
 
More
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.

Quote:
Originally Posted by orangek3nny

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.

Quote:
Originally Posted by orangek3nny

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/c67342f304b6...84d603e186e834. The messages at the end are probably from rebooting into the bootloader via adb.

Quote:
Originally Posted by orangek3nny

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.

Quote:
Originally Posted by orangek3nny

3: http://araceliaraceli1.blogspot.de/2...policy-on.html

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:/ #
Quote:
Originally Posted by orangek3nny

4: http://android.wekeepcoding.com/arti...n+android+boot

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
20th September 2017, 11:19 AM |#11  
OP Member
Thanks Meter: 15
 
More
Quote:
Originally Posted by nitin.chobhe

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?

Quote:
Originally Posted by nitin.chobhe

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.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes