User:Clouserw/Flashing: Difference between revisions
mNo edit summary |
(Add some info on working around eng builds preinstalled apps + payments prefs + installing hidden mkt apps.) |
||
| Line 25: | Line 25: | ||
Enable the checkbox: Settings -> Developer -> Use Marketplace reviewer certs | Enable the checkbox: Settings -> Developer -> Use Marketplace reviewer certs | ||
=== Working around not being able to install -dev or stage on eng builds === | |||
Eng builds (As of 16th Oct 2014) have old -dev and stage marketplace apps installed and you can't remove them. | |||
To work around this we need the root abilities of the eng image (otherwise we can't push custom prefs e.g. for payments) + the UI and apps from the user build. | |||
First flash a full eng image first (Referred to as "images" as opposed to "gaia+gecko") | |||
Once that's complete, flash a user build of just "gaia+gecko" of the same build. | |||
As this is the user build the developers menu is not visible by default. To remedy this (once it boots) go to "Device Information -> More information". Scroll to bottom and enable developer menu. Then enable USB Debugging in the dev menu + check console enabled + enable Marketplace reviewer certs. Then reboot. | |||
=== Prefs file for payments === | |||
Here's an example prefs file for payments testing: https://gist.github.com/muffinresearch/9a7c3d3d632a9a9922f0 | |||
Push this to your device with: | |||
adb push path/to/custom-prefs.js /data/local/user.js | |||
Then reboot for the changes to take effect: | |||
adb reboot | |||
=== Installing -dev + stage + payments-alt === | |||
These apps are on the marketplace in a hidden location. Metaplace can be installed which should allow you to install the apps from the "jump" menu. (see https://metaplace.paas.allizom.org). | |||
If you have trouble with this then you can directly go to the apps in the prod marketplace from the browser on device. | |||
* dev: https://marketplace.firefox.com/app/dev | |||
* stage: https://marketplace.firefox.com/app/marketplace-6 | |||
* payments-alt: https://marketplace.firefox.com/app/marketplace-payments-alt | |||
Revision as of 11:26, 16 October 2014
There is some confusion over how to flash a device so I wanted to make a wiki page we could use with best practices *for Marketplace devs*. I'm doing it in my namespace because Andy wants to put it in the official docs sometime.
So...
I have a Flame. I want to flash the latest trunk build.
Plug your phone into your USB cable. If you run `adb devices` you should see a device ID. If you don't say something on IRC as you'll need to do that before anything below works.
Run the right kernel
There are base builds (this is "gonk"), which is your kernel and such, and there are FirefoxOS builds which we run on top of that base build. Flames shipped with a base build on an old Android kernel (v123) which we don't support anymore. Let's make sure we're running the new v180 build. Here are easy directions. Note that you will lose everything on the device when you do this.
Once you are running v180 you don't need to do this step again until we update to a new kernel (probably a year or two).
Run the right FirefoxOS build
git clone https://github.com/Mozilla-TWQA/B2G-flash-tool cd B2G-flash-tool ./flash_pvt.py --help # Shallow flash an engineering build off the master branch onto the Flame v180 device. In theory you won't lose anything... ./flash_pvt.py -d flame-kk -v mozilla-central --eng -g -G --keep_profile
Enable dev/stage certificates
Enable the checkbox: Settings -> Developer -> Use Marketplace reviewer certs
Working around not being able to install -dev or stage on eng builds
Eng builds (As of 16th Oct 2014) have old -dev and stage marketplace apps installed and you can't remove them.
To work around this we need the root abilities of the eng image (otherwise we can't push custom prefs e.g. for payments) + the UI and apps from the user build.
First flash a full eng image first (Referred to as "images" as opposed to "gaia+gecko") Once that's complete, flash a user build of just "gaia+gecko" of the same build.
As this is the user build the developers menu is not visible by default. To remedy this (once it boots) go to "Device Information -> More information". Scroll to bottom and enable developer menu. Then enable USB Debugging in the dev menu + check console enabled + enable Marketplace reviewer certs. Then reboot.
Prefs file for payments
Here's an example prefs file for payments testing: https://gist.github.com/muffinresearch/9a7c3d3d632a9a9922f0
Push this to your device with:
adb push path/to/custom-prefs.js /data/local/user.js
Then reboot for the changes to take effect:
adb reboot
Installing -dev + stage + payments-alt
These apps are on the marketplace in a hidden location. Metaplace can be installed which should allow you to install the apps from the "jump" menu. (see https://metaplace.paas.allizom.org).
If you have trouble with this then you can directly go to the apps in the prod marketplace from the browser on device.