Closed Bug 965180 Opened 10 years ago Closed 6 years ago

reboot loop on ZTE Open when flashing custom build

Categories

(Firefox OS Graveyard :: Hardware, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: diafygi, Unassigned)

References

Details

Attachments

(1 file)

Attached file logcat.log
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 (Beta/Release)
Build ID: 20131206145143

Steps to reproduce:

1) Recover ZTE Open (US ebay version) to latest 1.1 version (US_DEV_FFOS_V1.1.0B06_UNFUS_SD_For_V1.1, see below for details)[1].

2) Build B2G according to docs[2].

3) Attempt to flash build to phone.
./flash.sh
< waiting for device >
erasing 'cache'...
OKAY [  0.533s]
finished. total time: 0.533s
erasing 'userdata'...
OKAY [  1.415s]
finished. total time: 1.415s
sending 'userdata' (43766 KB)...
OKAY [  3.677s]
writing 'userdata'...
OKAY [  8.294s]
finished. total time: 11.971s
sending 'boot' (4158 KB)...
OKAY [  0.350s]
writing 'boot'...
OKAY [  0.753s]
finished. total time: 1.103s
sending 'system' (116302 KB)...
OKAY [  9.784s]
writing 'system'...
OKAY [ 20.455s]
finished. total time: 30.239s
rebooting...

finished. total time: 0.002s
Attempting to set the time on the device

4) Experience infinite wait when "Attempting to set the time on the device" (the phone appears to be stuck in fastboot?).

5) After 5min, remove battery to turn phone off.

6) Recover ZTE Open (US ebay version) to latest 1.1 version, again.

7) Copy boot_adapted_for_zte_open_commercial_editions.img[3] to out/target/product/inari/boot.img

8) Attempt to flash with modified boot.img.
< waiting for device >
erasing 'cache'...
OKAY [  0.533s]
finished. total time: 0.533s
erasing 'userdata'...
OKAY [  1.415s]
finished. total time: 1.415s
sending 'userdata' (43766 KB)...
OKAY [  3.677s]
writing 'userdata'...
OKAY [  8.294s]
finished. total time: 11.971s
sending 'boot' (4158 KB)...
OKAY [  0.350s]
writing 'boot'...
OKAY [  0.753s]
finished. total time: 1.103s
sending 'system' (116302 KB)...
OKAY [  9.784s]
writing 'system'...
OKAY [ 20.455s]
finished. total time: 30.239s
rebooting...

finished. total time: 0.002s
Attempting to set the time on the device
time 1390987681 -> 1390987681.0
error: device not found

7) Reboot loop begins. When booting gets to the fox image, it freezes and reboots.

8) Attempt to access adb via "adb wait-for-device && adb logcat | tee logcat.log"

9) No adb access durin reboots.

10) Take battery out for a few seconds.

11) Put battery back in and attempt to boot phone (still goes into reboot loop).

12) Attempt to access adb via "adb wait-for-device && adb logcat | tee logcat.log", again.

13) adb has a tiny fraction of access before the reboot (logcat.log attached to this bug).

[1] - http://download.ztedevices.com/UpLoadFiles/product/643/3601/soft/2014012010173938.zip
[2] - https://developer.mozilla.org/en-US/Firefox_OS/Building_and_installing_Firefox_OS
[3] - http://sl.edujose.org/2013/10/adapted-boot-image-for-use-with-b2g.html


Actual results:

See logcat.log


Expected results:

Boot normally into Firefox OS
How to recover to official ZTE 1.1 with fastboot (NOTE: this will factory reset your phone).

1) Determine your current version by going to Settings > Device Information > Software
2) Download all the subsequent update images:

* If version is OPEN_US_DEV_FFOS_V1.0.0B01, download V1.0.0B02 (http://www.mediafire.com/download/8ltm6lm8jvsr756/ztedevices_official_2013092610235139.zip) and V1.1.0B02_for_1.0 (http://download.ztedevices.com/UpLoadFiles/product/643/3601/soft/2014012010160832.zip).

* If version is OPEN_US_DEV_FFOS_V1.0.0B02, download V1.1.0B02_For_1.0 (http://download.ztedevices.com/UpLoadFiles/product/643/3601/soft/2014012010160832.zip).

* If version is OPEN_US_DEV_FFOS_V1.1.0B01, download V1.1.0B01_For_1.1 (http://download.ztedevices.com/UpLoadFiles/product/643/3601/soft/2014012010173938.zip).

* If version is OPEN_US_DEV_FFOS_V1.1.0B02, download V1.1.0B01_for_1.1 (http://download.ztedevices.com/UpLoadFiles/product/643/3601/soft/2014012010173938.zip).

3) Obtain a microSD card and format it to FAT32.
4) Put the newly formatted microSD card into your phone.
5) Boot your phone normally (this will automatically put some files on your microSD card).
6) Turn off your phone and remove the microSD card.
7) Extract US_DEV_FFOS_XXXX.zip from the download (two download is if your current version is V1.0.0B01).
8) Copy US_DEV_FFOS_XXXX.zip to the root folder of your microSD card (two zips is if your current version is V1.0.0B01).
9) Put the microSD card back into your phone.
10) Boot the phone into recovery (hold POWER + VOL-UP simultaneously for 5sec when turning the phone on).
11) Select "apply update from external storage" by using the VOL keys to navigate up and down and the POWER button to select.
12) Select US_DEV_FFOS_XXXX on the directory listing:
* If current version is V1.0.0B01, select US_DEV_FFOS_V1.0.0B02_USER_SD
* If current version is V1.0.0B02, select US_DEV_FFOS_V1.1.0B06_USER_SD_For_V1.0
* If current version is V1.1.0B01, select US_DEV_FFOS_V1.1.0B06_USER_SD_For_V1.1
* If current version is V1.1.0B02, select US_DEV_FFOS_V1.1.0B06_USER_SD_For_V1.1
13) The phone will proceed to update.
14) If you get a "E:signature verification failed" error during the update, comment on this bug.
15) If you were at V1.0.0B01, you will have updated to V1.0.0B02. Go back to step 1 and flash again to 1.1 version.
16) Your phone should now have the latest official 1.1 version with fastboot enabled.
From the mailing list:

On Wed, Jan 29, 2014 at 2:49 AM, Alexandre Lissy wrote:
>
> This log shows that Gecko boots and that it cannot read a bootanimation
> (not blocking):
> W/Gonk    (  112): Could not open boot animation
>
> You might want to push bootanimation.zip from gonk-misc/ to your
> system/media/ directory (or ENABLE_DEFAULT_BOOTANIMATION=true in
> .userconfig).
>
> Meanwhile, the log also shows that the last line is about the RIL. Could
> you get |adb logcat -b radio| output ?
>
$ adb wait-for-device && adb logcat -b radio | tee radiologcat.log
E/RILD    (  115): **RIL Daemon Started**
E/RILD    (  115): **RILd param count=1**
E/RILD    (  115): RIL_Init argc = 4 client = 0
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to Daniel Roesler from comment #2)
> From the mailing list:
> 
> On Wed, Jan 29, 2014 at 2:49 AM, Alexandre Lissy wrote:
> >
> > This log shows that Gecko boots and that it cannot read a bootanimation
> > (not blocking):
> > W/Gonk    (  112): Could not open boot animation
> >
> > You might want to push bootanimation.zip from gonk-misc/ to your
> > system/media/ directory (or ENABLE_DEFAULT_BOOTANIMATION=true in
> > .userconfig).
> >
> > Meanwhile, the log also shows that the last line is about the RIL. Could
> > you get |adb logcat -b radio| output ?
> >

This was private communication, not posted on the list. Thanks for respecting my privacy.

Anyway, since you are able to get adb access, then you can probably stop b2g when it starts:
$ adb wait-for-device && adb shell stop b2g

Then get a shell and start b2g by hand:
# /system/bin/b2g.sh

Any output at this point could help.
> This was private communication, not posted on the list. Thanks for respecting my privacy.

Apologies, I did not realize it was not reply-all.
FWIW:
I followed the steps in http://pof.eslack.org/2013/07/05/zte-open-firefoxos-phone-root-and-first-impressions/#comment-1749
and now my ZTE Open boots fine with my own build of Firefox OS 1.2.

My Steps:
1) Flash ZTE Open US 1.1B02 Official
2) Flash CWM recovery
3) Build Firefox OS 1.2
4) Run ./flash, now the phone won't boot
5) Use boot.img in ZTE Open US 1.1B02 Official zip file and follow steps in http://pof.eslack.org/2013/07/05/zte-open-firefoxos-phone-root-and-first-impressions/#comment-1749 to build boot.img
Note:
I did
"gunzip -c ../initrd.img | cpio -i"
For default.prop, I added persist.usb.serialno=full_inari
Not sure if it is useful.
6) Boot into CWM, push your boot.img to /sdcard, and run adb shell flash_image boot /sdcard/boot.img
7) Reboot, it works for me.

HTH.
(In reply to Ginn Chen from comment #6)
> FWIW:
> I followed the steps in
> http://pof.eslack.org/2013/07/05/zte-open-firefoxos-phone-root-and-first-
> impressions/#comment-1749
> and now my ZTE Open boots fine with my own build of Firefox OS 1.2.
> 
> My Steps:
> 1) Flash ZTE Open US 1.1B02 Official
> 2) Flash CWM recovery
> 3) Build Firefox OS 1.2
> 4) Run ./flash, now the phone won't boot
> 5) Use boot.img in ZTE Open US 1.1B02 Official zip file and follow steps in
> http://pof.eslack.org/2013/07/05/zte-open-firefoxos-phone-root-and-first-
> impressions/#comment-1749 to build boot.img
> Note:
> I did
> "gunzip -c ../initrd.img | cpio -i"
> For default.prop, I added persist.usb.serialno=full_inari
> Not sure if it is useful.
> 6) Boot into CWM, push your boot.img to /sdcard, and run adb shell
> flash_image boot /sdcard/boot.img
> 7) Reboot, it works for me.
> 
> HTH.

Thanks for those explanations. So it would just mean that one has to extract kernel and blobs from a ZTE 1.1B02 system and then it's possible to rebuild a full working system.

Daniel, can you try to brick your device again to confirm this? Being able to understand and document clearly this issue would be a very nice step!
Flags: needinfo?(diafygi)
I did some other tries with my own build of Firefox OS 1.2 and Firefox OS 1.3.
I found the steps in comment #6 is incorrect.

Instead I found following steps work for me:

1) Flash ZTE Open US 1.1B02 Official
2) Flash CWM recovery
3) Build Firefox OS 1.2 or 1.3
4) Run ./flash
5) Now the phone won't boot, it shows a stand fox, I have to remove the battery.
6) Boot into CWM, push boot.img from 1.1B01 firmware. Run adb shell flash_image boot /sdcard/boot.img and reboot.
(or maybe I used boot.img from http://sl.edujose.org/2013/10/adapted-boot-image-for-use-with-b2g.html)
7) Now it gets into a reboot loop
8) Boot into CMW, push boot.img from 1.1B02 firmware. Run adb shell flash_image boot /sdcard/boot.img and reboot.
9) The screen will be blank for several seconds for first boot, but it works.

Note:
If you clean the cache partition in CMW, you will get back to 5).

./flash will clean the cache, so it won't boot.

It seems some additional changes are required for boot.img.
I did some tests yesterday.

According to the page on edujose.org[1], it changes 3 things (the boot.img on the page is based on 1.0B02 stock boot.img, which boots fine if you have installed 1.0B02 or 1.1B01 firmware update, but it won't boot with 1.1B02 firmware installed.)
1) default.prop
-ro.secure=1
-ro.allow.mock.location=0
-ro.debuggable=0
+ro.secure=0
+ro.allow.mock.location=1
+ro.debuggable=1
+persist.usb.serialno=full_inari
+persist.sys.usb.config=adb

2) init.b2g.rc
-service rilproxy /system/bin/rilproxy
-    class main
-    socket rilproxy stream 660 root system
-    user root
-    group radio
+# rilproxy is not used because kernel was created with rilproxy built-in
+#service rilproxy /system/bin/rilproxy
+#    class main
+#    socket rilproxy stream 660 root system
+#    user root
+#    group radio

3) init.rc
+	# Make executable b2g core files
+	chmod 0755 /system/b2g/b2g
+	chmod 0755 /system/b2g/updater
+	chmod 0755 /system/b2g/plugin-container
+	# ready, b2g and plugin-container become executable

I found for ZTE Open US 1.1B02 stock boot.img, the changes for 2) and 3) are necessary.

If I don't do 3), it will not boot and hang. (why we can't set exec for them in system.img?)
If I don't do 2), I will boot but no SIM card.

For 1), the only different of the stock version is it adds
persist.usb.serialno=full_inari
If I add this line, it will boot, but I got "no SIM card" and I can't see it in adb (be warned, you should have CWM as recovery otherwise you may not be able to flash it again).

The summary, I applied 2) and 3) to 1.1B02 boot.img and creates my own boot.img, flash it to boot partition and then run ./flash.sh. It reboots fine and set time works fine.

BTW: I have only tested with my own build of 1.3 prerelease.

HTH.

[1] http://sl.edujose.org/2013/10/adapted-boot-image-for-use-with-b2g.html
Depends on: 967713
No matter which build I download from ZTE, I get the signature verification failed error.
anything new ?
I tried building my own and then went back to the v1.1b02 build.
I have the same problem, boot loop =/
There is a suggestion that 945124 is the same issue and http://blog.chellinsky.net/putting-firefox-os-v1-4-on-a-zte-open/ has a fix. I haven't verified yet, but it sounds quite possible. Figured I should post here as there's no mention yet.
Flags: needinfo?(diafygi)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: