B2G/QA/Device

From MozillaWiki
< B2G‎ | QA
Jump to: navigation, search

Full flash to the latest base image

This needs to be done before you do anything else to your phone (see Base image and Base image installation if you require more details.) Prerequisites: Make sure you have adb and fastboot installed and available in your system's PATH (see Installing ADB and Fastboot.)

  • Download the latest base image Base image v18D_night_v4 to your computer.
  • On your Flame device, enable remote debugging by navigating to Settings > Developer and enabling the Debugging via USB option.
  • Connect your Flame to your computer via a USB cable.
  • Verify that the computer is connected to the device by typing this command:
   adb devices  
  • You should see something like the following:
   List of devices attached
   94f7ce4c    device
  • If you don't see your device attached (no second line), then try unplugging and replugging the USB cable and trying again; also check that Debugging via USB is enabled on the phone as mentioned in step 2. If you get a message saying that adb could not be found, you probably haven't set your path correctly (see prerequisites.)
  • Extract the base image zip file and navigate to the new directory, using for example:
   cd v18D_nightly_v4

Run the flashing script by running the correct below command for your system

Windows

   flash.bat

Linux / OSX

   ./flash.sh

Alternative

For Linux/OSX users, you can just use b2g_quick_flash of B2G python tools to flash your flame.

   sudo pip install -U b2g_util
   taskcluster_login
   b2g_quick_flash

Shallow Flashing your flame reference device

You will need to get certain files for shallow flashing

  1. shallow flashing shell script open and hit ctr+s will save as the shallow_flash.sh. from there you will have to set it as executable by left clicking on it, selecting properties, then going to permissions tab, and select allow executing file as program.
  2. you will need the gaia.zip
  3. you will need the new gecko


The steps for shallow flashing once you have those:

  1. Connect Flame device to computer and make sure that adb and devtools are enabled in developer settings
  2. Put the gaia.zip, the gecko (b2g.XX.XX.en-us.android-arm.tar.gz) and the shallow flashing script into the same floder/ directory
  3. You will need to open the terminal and cd into where you have the files stored
  4. Run
   # For shell script tool
   ./shallow_flash.sh --gaia=gaia.zip --gecko=b2g-XX.XX.en-US.android-arm.tar.gz # replacing the XX.XX
   # For Python version tool
   b2g_shallow_flash --gaia=gaia.zip --gecko=b2g-XX.XX.en-US.android-arm.tar.gz # replacing the XX.XX

with the ones coresponding to your files. Eg.

   # For shell script tool
   ./shallow_flash.sh --gaia=gaia.zip --gecko=b2g-44.0a1.en-US.android-arm.tar.gz
   # For Python version tool
   b2g_shallow_flash --gaia=gaia.zip --gecko=b2g-44.0a1.en-US.android-arm.tar.gz

(this is example, may not be actual naming)

Now you wait for the device to be updated and partialy restart. Do not dissconnect device untill shallow flash is complete.


Further Information