Skip to main content

B2G Utilities

Project description

https://travis-ci.org/askeing/b2g-util-python.svg?branch=master

B2G python utilities library, and some tools.

Installation

To install b2g_util, simply:

$ pip install b2g_util

Tools Usages

There are some available b2g tools.

b2g_backup_restore_profile

Note: This is a workaround backup/restore solution due to b2g doesn’t have tool to backup/restore profile.

usage: b2g_backup_restore_profile [-h] [-s SERIAL] (-b | -r) [--sdcard]
                                  [--no-reboot] [-p PROFILE_DIR] [-v]

Workaround for backing up and restoring Firefox OS profiles. (BETA)

optional arguments:
  -h, --help            show this help message and exit
  -s SERIAL, --serial SERIAL
                        Directs command to the device or emulator with the
                        given serial number. Overrides ANDROID_SERIAL
                        environment variable. (default: None)
  -b, --backup          Backup user profile. (default: False)
  -r, --restore         Restore user profile. (default: False)
  --sdcard              Also backup/restore SD card. (default: False)
  --no-reboot           Do not reboot B2G after backup/restore. (default:
                        False)
  -p PROFILE_DIR, --profile-dir PROFILE_DIR
                        Specify the profile folder. (default: mozilla-profile)
  -v, --verbose         Turn on verbose output, with all the debug logger.
                        (default: False)

b2g_check_versions

usage: b2g_check_versions [-h] [--no-color] [-s SERIAL] [--log-text LOG_TEXT]
                          [--log-json LOG_JSON] [-v]

Check the version information of Firefox OS.

optional arguments:
  -h, --help            show this help message and exit
  --no-color            Do not print with color. NO_COLOR will overrides this
                        option. (default: False)
  -s SERIAL, --serial SERIAL
                        Directs command to the device or emulator with the
                        given serial number. Overrides ANDROID_SERIAL
                        environment variable. (default: None)
  --log-text LOG_TEXT   Text ouput. (default: None)
  --log-json LOG_JSON   JSON output. (default: None)
  -v, --verbose         Turn on verbose output, with all the debug logger.
                        (default: False)

b2g_enable_certapps_devtools

usage: b2g_enable_certapps_devtools [-h] [-s SERIAL] [--disable] [-v]

Enable Certified Apps Debugging.

optional arguments:
  -h, --help            show this help message and exit
  -s SERIAL, --serial SERIAL
                        Directs command to the device or emulator with the
                        given serial number. Overrides ANDROID_SERIAL
                        environment variable. (default: None)
  --disable             Disable the privileges. (default: False)
  -v, --verbose         Turn on verbose output, with all the debug logger.
                        (default: False)

Please enable "ADB and Devtools" of device.
Ref:
- https://developer.mozilla.org/en-US/docs/Tools/WebIDE
- https://developer.mozilla.org/en-US/docs/Tools/WebIDE/Running_and_debugging_apps#Debugging_apps

b2g_get_crashreports

usage: b2g_get_crashreports [-h] [-s SERIAL] [-v]

Get the Crash Reports from Firefox OS Phone.

optional arguments:
  -h, --help            show this help message and exit
  -s SERIAL, --serial SERIAL
                        Directs command to the device or emulator with the
                        given serial number. Overrides ANDROID_SERIAL
                        environment variable. (default: None)
  -v, --verbose         Turn on verbose output, with all the debug logger.
                        (default: False)

b2g_reset_phone

usage: b2g_reset_phone [-h] [-s SERIAL] [-v]

Reset Firefox OS Phone.

optional arguments:
  -h, --help            show this help message and exit
  -s SERIAL, --serial SERIAL
                        Directs command to the device or emulator with the
                        given serial number. Overrides ANDROID_SERIAL
                        environment variable. (default: None)
  -v, --verbose         Turn on verbose output, with all the debug logger.
                        (default: False)

Release History

0.0.5 (2015-08-13)

Features and Improvements

  • Add b2g_enable_certapps_devtools tool.

  • Add B2GHelper class for Firefox OS operations.

bugfixes

  • some command will stop device with no returncode. e.g. adb shell reboot recovery.

0.0.4 (2015-08-12)

Features and Improvements

  • Add b2g_get_crashreports tool

  • Refactoring the ADBWrapper, it will raise exception when command failed.

  • Return stdout and return code from device when running adb shell command.

bugfixes

  • Set backup/restore arguments as required and put them into same group.

  • Wait a moment when restarting adbd.

0.0.3 (2015-08-06)

Features and Improvements

  • Added the method AdbHelper.get_serial() for getting the adb serial number

  • Modified the classes of adb_helper

  • Modified the code of tools for making them clear

bugfixes

  • Fixed the list index out of range when adb server doesn’t start

  • Fixed the logger handle issue of tools

0.0.2 (2015-08-05)

  • Rename the tools
    • Added the prefix b2g_ of tools

  • Write the README file

0.0.1 (2015-08-05)

  • Initiate the project
    • Basic ADB commands support

    • The b2g_backup_restore_profile (workaround) tool

    • The b2g_check_versions tool

    • The b2g_reset_phone tool

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

b2g_util-0.0.5.tar.gz (20.0 kB view details)

Uploaded Source

File details

Details for the file b2g_util-0.0.5.tar.gz.

File metadata

  • Download URL: b2g_util-0.0.5.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for b2g_util-0.0.5.tar.gz
Algorithm Hash digest
SHA256 071c77048879e9b82f7bcacc2b18bf099eb509c91154db78cb292b4a49153e17
MD5 45a81fb36ecebf9388ca98b7b6edc3d3
BLAKE2b-256 bd28cb3841a38535a6cfb87f8b3d94adc4e69f734e169d7b56a926c42809aff9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page