Version: Smart Feature Phone 3.0

Testing your apps

There are two ways to test your application. with Simulator or a real device.

With Simulator

For more info please refer to this doc .

With Real Device

Install App via appscmd

Verify device information

  adb devices
  adb root  

Download appscmd

Download appscmd from Github

Verify appscmd

Before you use it, you can change the name of the binary file to appscmd

  • MAC
cd appscmd
mv appscmd-x86_64-apple-darwin appscmd
chmod +x appscmd
./appscmd --help

The output should be like below

appscmd 0.3.1
Manages apps installed on a b2g device, simulator or desktop.

USAGE:
    appscmd [FLAGS] [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -j, --json       Set output as json format
    -V, --version    Prints version information

OPTIONS:
        --socket <socket>    Socket path to connect

SUBCOMMANDS:
    choose-install-folder    Install an application via file explorer
    help                     Prints this message or the help of the given subcommand(s)
    install                  Install an application
    install-pwa              Install a progressive web app
    list                     List installed applications
    show-warnings            Show warnings of non-fatal errors
    uninstall                Uninstall an application
    wait                     Wait for the api-daemon to be ready

appscmd script usage

  • List all apps installed in device

    appscmd_path/appscmd list  
    
  • Connect your device to your computer using a USB port, then run the following command from your terminal:

    $ adb root && adb forward tcp:6000 localfilesystem:/data/local/debugger-socket
    

Note: You can change the port, changing the tcp value of the command (tcp:PORT).

  • Install app
    appscmd_path/appscmd install your_app_path
    
  • Uninstall app
    appscmd_path/appscmd uninstall your_app_name
    

Debug App via firefox

  • Download firefox nightly build version
  • Connect your device to your computer with a USB cable
  • Verify device information
    adb devices
    adb root  
    
  • Open firefox RemoteDebugger
  • Device should be visible in left panel of the RemoteDebugger
  • Click the Connect button right of your device. The device should be connected with the Firefox RemoteDebugger
WebIDE - Remote runtime
  • The Tabs show all apps running in device except System App, which can be found in the bottom of the page)

    • Apps running in device
    WebIDE - Remote runtime
    • System apps running in device
    WebIDE - Remote runtime
  • Click Inspect button will go to app. Then you can debug and modify via RemoteDebugger

WebIDE - Remote runtime