Skip to content

Instantly share code, notes, and snippets.

@vuldin
Last active December 22, 2015 18:29
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save vuldin/6513333 to your computer and use it in GitHub Desktop.
Save vuldin/6513333 to your computer and use it in GitHub Desktop.
Install latest dev build of FxOS on ZTE Open
ro.secure=0
ro.allow.mock.location=1
ro.debuggable=1
persist.usb.serialno=full_inari
persist.sys.usb.config=adb
cd ~/downloads/fxos/boot # create a folder where you can work with the boot image
adb shell
su
cat /dev/mtd/mtd1 > /sdcard/boot.img # create copy of boot image on sdcard
exit;exit # exit from su and adb
adb pull /sdcard/boot.img # copy boot image to desktop
abootimg -x boot.img # extract boot image contents
mkdir initrd;cd initrd # create initrd folder where you can work with initrd image
mv ../initrd.img initrd.gz # change extension to gz (for gunzip tool)
gunzip initrd.gz; cpio -id < initrd # extract initrd contents
vi build.prop # change default.prop to the same as the attached default.prop file
cd ..
# mkbootfs and mkbootimg tools are found in your B2G directory
export B2G_HOME=/path/to/b2g
export PATH=$PATH:$B2G_HOME/out/host/linux-x86/bin
cd initrd; mkbootfs . | gzip > ../newinitramfs.cpio.gz
cd ..
mkbootimg --kernel zImage --ramdisk newinitramfs.cpio.gz --base 0x200000 --cmdline 'androidboot.hardware=roamer2' -o newboot.img # create new boot image
adb push ./newboot.img /sdcard/newboot.img # copy new boot image to sdcard
adb reboot recovery # boot into clockwork mod recovery
#mount /sdcard from settings
adb shell # connect to phone
flash_image boot /sdcard/newboot.img # install new boot image
exit
# restart phone using clockwork mod settings
# now your phone should be ready to install dev builds of FxOS:
cd ~/git/b2g # change directory to where you have downloaded and built B2G
./flash.sh gaia # phone automatically restarts into unusable state
./flash.sh gecko # automatically restarts and works
@vladikoff
Copy link

Had to do the last steps a bit different:
This part:

# now your phone should be ready to install dev builds of FxOS:
cd ~/git/b2g # change directory to where you have downloaded and built B2G
./flash.sh gaia # phone automatically restarts into unusable state
./flash.sh gecko # automatically restarts and works

I wiped cache and data from recovery and ran the ./flash commands from recovery as well. Otherwise it didn't work.
Thanks for the gist!

@tufei
Copy link

tufei commented Sep 21, 2013

Works perfect for me on the eBay ZTE Open. Thanks a million!

@dimitri-rebrikov
Copy link

I had to issue "adb root" before "./flash.sh gaia" otherwise there was a permission exception. (ZTE Open Orange from the eBay@UK)

Copy link

ghost commented Oct 10, 2013

After ./flash.sh gecko I always get:

Attempting to set the time on the device
time 1381424366 -> 1381424366.0
settimeofday failed Bad file number

And the phone hangs with a static fox image (no fire tail animation)

@cimourdain
Copy link

Hi,

My current system is not powerful enough to compile FirfefoxOS, do you know how i could get a pre-compiled version and flash gaia and gecko?

thanks in advance (and sorry if it is a dumb question),

@jimdoescode
Copy link

@rvaliant were you able to flash the new image? I am experiencing the same issue you are.

@4001982248998
Copy link

same here as with @rvaliant and @jimdoescode. No boot, stuck at fox image with no tail animation.

I can open an adb shell, though am a noob.

@gianpaj
Copy link

gianpaj commented Oct 26, 2013

In the 2nd last step, as written in Installing Firefox OS on a mobile device - Mozilla | MDN, if you are not interested on test apps and/or require optimization, you can update gaia using:

VARIANT=user ./flash.sh gaia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment