We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Προσοχή: Αυτή είναι μία ημιτελής μετάφραση

Μόλις  χτίσετε το Boot to Gecko για μια κινητή συσκευή, μπορείτε να το εγκαταστήσετε. Αυτό το άρθρο θα σας οδηγήσει στην διαδικασία.

Σημείωση: Την πρώτη φορά που θα φλασάρετε το κινητό σας, πρέπει να έχει εγκατεστημένο το Android 4 (Ice Cream Sandwich)

Flashing your phone

To flash everything to your phone, simply connect your phone and type:


That's it. The B2G you've currently got built will flash onto your device.

Configuring the udev rule for your device

On Linux, if you get this,

< waiting for device >

that probably means that you haven't added a udev rule for the fastboot device, which is not the same as the one for adb. You can get the USB vendor ID by running lsusb now, but typically it's Google's: 18d1, so adding this line in your /etc/udev/rules.d/51-android.rules would work:

SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666", GROUP="plugdev"
Note: If you get a very helpful libusb error "-3" on Linux, it means you need to be root to have the needed access to the USB device. Run the script again using sudo.
Note 2: If you have a Unagi phone, you need two lines like this - one for the original phone vendor's ID, and one for Google's.

Special notes for the Samsung Galaxy S2

If your phone is a Galaxy S2 and you are using heimdall 1.3.2 (the latest version; use heimdall version to check), you may see an alarming error "FACTORYFS upload failed!" followed by "Heimdall flashing failed" and some additional information. This is actually a success condition, and you can ignore the advice.

To get rid of this strange behavior, grab a source copy of heimdall, downgrading to the 1.3.1 release ("git checkout fbbed42c1e5719cc7a4dceeba098981f19f37c06"), then compile it  according to the README, then install that to make the error go away. However, this isn't strictly necessary.

All versions of heimdall are unable to flash a system.img larger than 100MB. Do:

ls -l ./out/target/product/galaxys2/system.img

to see how big yours is. If it's too large, ask in IRC for advice; there are ways to do it in two stages.

Added step for the Samsung Galaxy S2

If you're flashing onto the Galaxy S2, there is an additional step to follow. Gaia does not get flashed automatically by the flash.sh script; you'll need to also do:

./flash.sh gaia

Flashing specific partitions to fastboot phones

You can flash specific partitions to fastboot phones (that is, any phone other than the Samsung Galaxy S2). For example:

./flash.sh system
./flash.sh boot
./flash.sh user

Updating specific modules

You can update specific components of B2G by specifying their names when flashing. For example:

./flash.sh gaia
./flash.sh gecko

In order to update only one application you can use BUILD_APP_NAME environment variable:

BUILD_APP_NAME=calendar ./flash.sh gaia

Next steps

At this point, your phone should be running Boot to Gecko! It's time to experiment, write some code, test, or do some debugging!

Note: A helpful usage tip: if your build of B2G starts up with the lock screen requesting a pass code to unlock the phone, the default code is 0000.


Here are a some tips for what to do if your device doesn't work right after installing B2G, or updating it to a new version

If the UI doesn't start up

If you update your phone and the user interface doesn't start up, you can reset it to clear out out-of-date configuration and the like. This may bring it back to life. Here's how:

cd gaia
make reset-gaia

"image is too large" error message on ./flash.sh execution

It might mean that you phone needs to be rooted first before flashing it. As b2g needs to be written on root partition, your phone needs to be rooted in order to install it.


Εθελοντές και ετικέτες εγγράφου

Συνεισφέροντες σε αυτή τη σελίδα: chrisdavidmills, linuxlalala
Τελευταία ενημέρωση από: chrisdavidmills,