• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root flash-all.sh fails to complete

hstroph

Android Expert
It's been a painful two days trying to update to 4.4, but I feel I'm almost there. Like others I encountered the boot loop, and have been following the suggestions offered in those threads with varying degrees of success,both with Debian Linux and Microsoft XP. The phone was unlocked and rooted.

The md5sum agrees on the .tgz download, and the 20131031 Android SDK is being used on both OS, with the CWM usb drivers on the XP, which crashes whenever fastboot starts to transfer data other than "fastboot devices" which succeeds.

So I've managed to work my way through the flash-all.sh on Debian line-by-line with eventual success at each step, and am at the very last line which seems to hang, so far for a full 3 hours! Does that seem right for only 700 MB? What can be the problem?

# fastboot devices
004323648951e5d9 fastboot
# fastboot -w update image-occam-krt16s.zip
archive does not contain 'boot.sig'
archive does not contain 'recovery.sig'
archive does not contain 'system.sig'
--------------------------------------------
Bootloader Version...: MAKOZ30d
Baseband Version.....: M9615A-CEFWMAZM-2.0.1700.97
Serial Number........: 004323648951e5d9
--------------------------------------------
checking product...
OKAY [ 0.002s]
checking version-bootloader...
OKAY [ 0.002s]
checking version-baseband...
OKAY [ 0.002s]
sending 'boot' (6360 KB)...
OKAY [ 0.347s]
writing 'boot'...
OKAY [ 0.354s]
sending 'recovery' (6908 KB)...
OKAY [ 0.395s]
writing 'recovery'...
OKAY [ 0.398s]
erasing 'system'...
OKAY [ 0.040s]
sending 'system' (700496 KB)...
... 3 hours later, no green "Downloading" stated on the device ...
 
shouldn't take that long. two minutes tops to flash it.

On your suggestion, I interrupted the flash operation on Debian 7.2 after 5 hrs. and tried the XP experience again, where fastboot now seems to work w/o crashing the OS.

It's been > 20 min. so far, image attached. At least the device bootloader screen still states in green "Downloading ...", but there's very little disk activity. I'll just let it run overnight in case this 2.2 GHz processor is too slow for modern operations like this one, with only 448 MB ram which seems a bit shy.

[edit 22:03 PST] One hour later, no change in the attached image, although device still states in green "Downloading ..." [/edit]

[edit 09:12 next day] 12 hours later and still green "Downloading ...", same as attached image. [/edit]
jek3F9kwAAAABJRU5ErkJggg==
 

Attachments

  • Screenshot from 2013-11-26 21:36:53.png
    Screenshot from 2013-11-26 21:36:53.png
    12 KB · Views: 203
I had a similar problem, it was the fastboot file that came from the Android SDK 64-Bit..something was wrong with it..it would get as far as installing the Radio, than stop...with fastboot not responding.
I download just Fastboot 32-Bit & replaced the file in the SDK & it was done in under 3 min.
 
I had a similar problem, it was the fastboot file that came from the Android SDK 64-Bit..something was wrong with it..it would get as far as installing the Radio, than stop...with fastboot not responding. I download just Fastboot 32-Bit & replaced the file in the SDK & it was done in under 3 min.

Thanks for that suggestion, and I'm sorely tempted to try it. However, good computer hygiene dictates that one not run programs from unknown sources, especially one requiring root or administrator privilege such as fastboot.

This is a perfect setup for a "trojan horse" type of program from an anonymous file-sharing site ... are you really confident that it didn't install some other tool as well? Not only on the computer, but at the root level on the phone too? If I were a hacker/cracker/pirate I couldn't do better than to wrap such tools within a program such as fastboot.

Glad it worked for you, but I'm not willing to chance it.
 
Are you using a usb 1.0 or 3.0 port? fastboot doens't play nice with them and you should try a 2.0 port.
 
Thanks for that suggestion, and I'm sorely tempted to try it. However, good computer hygiene dictates that one not run programs from unknown sources, especially one requiring root or administrator privilege such as fastboot.

This is a perfect setup for a "trojan horse" type of program from an anonymous file-sharing site ... are you really confident that it didn't install some other tool as well? Not only on the computer, but at the root level on the phone too? If I were a hacker/cracker/pirate I couldn't do better than to wrap such tools within a program such as fastboot.

Glad it worked for you, but I'm not willing to chance it.

So install the 32-bit version of the SDK and use that 32-bit fastboot binary?
 
You can always extract it and push them one by one. Fastboot flash x x.img

Yes indeed, and that's the only reason why I've gotten as far as I have. Even so, numerous failures have occurred (usually protocol errors) even with two different OSs and two different OEM usb cables from Google.

It's odd that e.g. "fastboot -w flash boot boot.img" worked on all components except the largest, system.img where it just hangs forever ... 12 hours sure seems like forever.

The XP is crashing again when fastboot flashes anything, so I'm back to Debian with a packaged fastboot (instead of the most recent SDK) and have the same results as before.

I couldn't get anywhere with the initial OTA update until I used the TWRP custom recovery to wipe everything. Even clearing the cache was asking for a password which I never set, and the tiny print said /cache couldn't be decrypted, so I wiped and formatted in the hope of starting with a clean slate. It almost feels like a clean brick though.

So now I'm wondering ... on the bootloader screen, what is this "SECURE BOOT - enabled" that I'm seeing, and might that be the problem? I spent a cople hours this morning with web search results, but haven't yet found any reliable information about it, or how to "disable" it as a desperation move.

Any ideas about it, please?
 
So now I'm wondering ... on the bootloader screen, what is this "SECURE BOOT - enabled" that I'm seeing, and might that be the problem? I spent a cople hours this morning with web search results, but haven't yet found any reliable information about it, or how to "disable" it as a desperation move.

Any ideas about it, please?

From efrant over at XDA:
Secure boot is enabled on all Nexus 4's, and you cannot disable it. By the way, Secure boot has nothing to do with the lock state of the bootloader -- it has to do with the secure boot chain of the AQP8064 chipset.
 
As stated in my OP, that's what I've been using on both Linux and XP.

The OP doesn't contain "32" anywhere in it. The fact that you replied to the original 32-bit suggestion with security concerns made me assume you had been using the 64-bit one. Sorry for the confusion.

PS - have you tried "fastboot flash system system.img" without the -w?
 
... have you tried "fastboot flash system system.img" without the -w?

Many times, on both OS ... currently doing it again on Linux, and "downloading ..." is displayed on the N4, so I'll let it stew for a while since it's a large file.:

# fastboot flash system system.img
erasing 'system'...
OKAY [ 0.027s]
sending 'system' (700496 KB)...

Previously:
# fastboot flash bootloader bootloader-mako-makoz20i.img
sending 'bootloader' (2203 KB)...
OKAY [ 15.695s]
writing 'bootloader'...
OKAY [ 0.296s]

16 sec for 2.2 MB means it should take about 4991 secs. for the 700.5 MB system.img ... that's about 1 hr. 23 mins. Those people that said two or three minutes "tops" must have some really, really fast transfer rates over usb.
 
It sounds like there must be something going on with your USB interface. It absolutely should not take over an hour to flash system.img. It's been a bit since I did it on mine, but I'm pretty sure it was well under 5 minutes.
 
Thanks for that suggestion, and I'm sorely tempted to try it. However, good computer hygiene dictates that one not run programs from unknown sources, especially one requiring root or administrator privilege such as fastboot.

This is a perfect setup for a "trojan horse" type of program from an anonymous file-sharing site ... are you really confident that it didn't install some other tool as well? Not only on the computer, but at the root level on the phone too? If I were a hacker/cracker/pirate I couldn't do better than to wrap such tools within a program such as fastboot.

Glad it worked for you, but I'm not willing to chance it.

I almost posted the original link to the post I grabbed it from, but didn't.
Root Nexus 4 on Android 4.4 KRT16S KitKat and Install CWMTWRP Recovery Guide.
 
It sounds like there must be something going on with your USB interface. It absolutely should not take over an hour to flash system.img. It's been a bit since I did it on mine, but I'm pretty sure it was well under 5 minutes.

Indeed you are correct ... I unplugged the Buetooth dongle and plugged the phone's usb into that port:

# fastboot flash system system.img
erasing 'system'...
OKAY [ 0.026s]
sending 'system' (700496 KB)...
OKAY [ 27.735s]
writing 'system'...
OKAY [ 40.386s]
finished. total time: 68.147s

... and the phone is up and running. Just for the record, I decided to redo the entire flash-all.sh and time it:

# time ./flash-all.sh
...
real 2m25.659s
user 0m12.729s
sys 0m4.836s

Thanks for your feedback. Apparently the usb ports on both machines were USB 1.1 and were causing the problem. The 2.0 ports were hidden in the back.
 
Back
Top Bottom