Skip to content

Commit

Permalink
Document new commands; alphabetize commands
Browse files Browse the repository at this point in the history
  • Loading branch information
kumar303 committed Jun 14, 2013
1 parent b972021 commit 3e3a86a
Showing 1 changed file with 110 additions and 46 deletions.
156 changes: 110 additions & 46 deletions README.rst
Expand Up @@ -118,6 +118,14 @@ Run this for a quick reference::

ezboot --help

Using Ezboot To Work With Marketplace Payments
----------------------------------------------

To whet your appetite, here is a full example of ezboot's intended use.
This `documentation <https://webpay.readthedocs.org/en/latest/use_hosted_webpay.html#set-up-a-device-with-ezboot>`_
shows you how to make a local config file and use ezboot to quickly prepare a B2G
device for hacking on the Firefox Marketplace payments system.

Config file
-----------

Expand All @@ -137,9 +145,28 @@ For example::
flash_user = ...
flash_pass = ...

Using a config file greatly simplifies ezboot because you won't have to set
commonly used option values.

Commands
========

dl
--

This downloads a build and saves the Zip file to a custom directory.
The build will not be flashed to a
device and any subsequent ``reflash`` command will not attempt to use
it. This is just a convenient way to grab a build without logging in;
the same user/pass options from ``flash`` apply here.

Here is a full reference::

ezboot dl --help

You can set a custom location with ``ezboot dl --location=...``.
By default it will save builds to ``~/Downloads``.

flash
-----

Expand Down Expand Up @@ -181,63 +208,64 @@ them in an ``ezboot.ini`` config file::

Captain Obvious says don't commit your password to a public repo.

setup
-----
http
----

This sets up your flashed device for usage. Here is the full reference::
This restarts your phone with HTTP logging *temporarily* enabled.
Here is the full reference::

ezboot setup --help
ezboot http --help

It can do the following:
This runs B2G on the device until you interrupt it (^C). After you're
finished the console will tell you where to find a log of all HTTP
requests/responses. When you view the file it might warn you that it
has binary content but that's typically just at the beginning of the file.
Keep paging.

* configure WiFi
* pre-install some apps
* put custom prefs on the device
install
-------

The ``--apps`` argument takes multiple values. In a config file, add them
one per line in an ``ezboot.ini`` config file like this::
Install an app from the Firefox Marketplace.

[setup]
apps = https://marketplace-dev.allizom.org/manifest.webapp
https://marketplace.allizom.org/manifest.webapp
wifi_ssid = ...
wifi_key = WPA-PSK
wifi_pass = ...
::

By convention, if you put a custom prefs file in ``./ezboot/custom-prefs.js``
where dot is the working directory then it will be pushed to
``/data/local/user.js`` on the device. Any existing custom prefs are not
preserved.
ezboot install --help

dl
--
This is an alternative to specifying manifest URLs in ``setup`` and will let
you install an app by name. Example::

This downloads a build and saves the Zip file to a custom directory.
The build will not be flashed to a
device and any subsequent ``reflash`` command will not attempt to use
it. This is just a convenient way to grab a build without logging in;
the same user/pass options from ``flash`` apply here.
ezboot install --app 'Sliding Puzzle' --browser

Here is a full reference::
install_mkt
-----------

ezboot dl --help
Install a pre-production version of the `packaged Marketplace`_ app.
This requires you to run ``mkt_certs`` first.

You can set a custom location with ``ezboot dl --location=...``.
By default it will save builds to ``~/Downloads``.
::

http
ezboot install_mkt --help

Example::

ezboot install_mkt --dev

Because some bootstrapping is necessary this will install the app from your
B2G browser.

.. _`packaged Marketplace`: https://github.com/mozilla/fireplace

kill
----

This restarts your phone with HTTP logging *temporarily* enabled.
Here is the full reference::
This kills all running apps which may be useful when you need to reload
styles, js or other assets.

ezboot http --help
::

This runs B2G on the device until you interrupt it (^C). After you're
finished the console will tell you where to find a log of all HTTP
requests/responses. When you view the file it might warn you that it
has binary content but that's typically just at the beginning of the file.
Keep paging.
ezboot kill --help

The ``recss`` command might be faster.

login
-----
Expand All @@ -254,17 +282,25 @@ but for development you'll be typing new accounts all the time for testing.

.. _Persona: https://login.persona.org/

kill
----
mkt_certs
---------

This kills all running apps which may be useful when you need to reload
styles, js or other assets.
This pushes the cert files to your device so that you can install the
Marketplace packaged app (dev version) with elevated privileges and install
signed apps from that Marketplace. You obviously don't need this if you simply
want to use the production version of Marketplace that is pre-installed on
device.

::

ezboot kill --help
ezboot mkt_certs --help

The ``recss`` command might be faster.
Ask someone for a cert file
(see `this issue <https://github.com/briansmith/marketplace-certs/issues/1>`_),
download it, and unzip it.
You can install certs for the Marketplace dev packaged app like this::

ezboot mkt_certs --dev --certs_path ~/Downloads/certdb.tmp/

recss
-----
Expand All @@ -273,6 +309,34 @@ This reloads all stylesheets on the current frame. More info::

ezboot recss --help

setup
-----

This sets up your flashed device for usage. Here is the full reference::

ezboot setup --help

It can do the following:

* configure WiFi
* pre-install some apps
* put custom prefs on the device

The ``--apps`` argument takes multiple values. In a config file, add them
one per line in an ``ezboot.ini`` config file like this::

[setup]
apps = https://marketplace-dev.allizom.org/manifest.webapp
https://marketplace.allizom.org/manifest.webapp
wifi_ssid = ...
wifi_key = WPA-PSK
wifi_pass = ...

By convention, if you put a custom prefs file in ``./ezboot/custom-prefs.js``
where dot is the working directory then it will be pushed to
``/data/local/user.js`` on the device. Any existing custom prefs are not
preserved.

Why?
====

Expand Down

0 comments on commit 3e3a86a

Please sign in to comment.