Version: Smart Feature Phone 3.0

OS ENV Setup

Instructions for users who have access to a debug device

Windows

Install Firefox

Download firefox nightly build version

Install ADB

  1. Visit this Google page to Download the ADB ZIP file for Windows.

  2. Unzip the folder on your Windows C Drive (C:\platform-tools).

Connecting to Device

  1. Connect your device with the laptop using USB cable. Make sure it is in debug mode.

  2. Open the Settings app and follow this flow:

Device > Developer > Debugger > ADB and DevTools

  1. Open command prompt of your laptop.

  2. Run

$ cd /path/to/extracted/folder/
  1. Run
$ adb devices

You should see your device has been detected.

  1. Run
$ adb root
$ adb forward tcp:6000 localfilesystem:/data/local/debugger-socket

This is to establish a path between your device and the laptop.

adb-windows
  1. Open Firefox Web IDE. Click on “Remote Runtime” on the right side. Press “OK”. A warning about old connected runtime version would pop up. Ignore it.

  2. You are ready to install an app on your device

macOS

Install ADB

You can follow this link install ADB tools for macOS.

Install and Run app

  1. Download firefox nightly build version

  2. open terminal and run these commands

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew cask install android-platform-tools

connect device and run

adb devices

You should see 1 device connected.

  1. disconnect from internet, install downloaded firefox, go to prefferences and disable updates (download or check): Connect to internet

  2. Go to about:config, turn the following preferences: xpinstall.signatures.required = false, extensions.legacy.enabled = true

  3. Go to this link and download install adb helper

  4. In Firefox Tools > Add on > Extension and add the downloaded adb_helper.xpi file

  5. In firefox go to Tools > Web Developer > WebIDE

  6. On right should see "USB Devices" and should have one device

  7. On the left have "Open Packaged App" - click it, and choose some app (a folder)

  8. Middle top click the play button... that's it, app should be on your phone and you should notice it.

Linux

Install Firefox

Download firefox nightly build version.

Installing make(Optional)

Make is a necessary tool to run KaiOS. Execute the following commands on the terminal to install it.

$ wget http://ftp.us.debian.org/debian/pool/main/m/make-dfsg/make_3.81-8.2_amd64.deb
$ sudo dpkg -i make_3.81-8.2_amd64.deb
$ sudo apt-mark hold make

Setting the required architectures(Optional)

$ sudo dpkg --add-architecture i386
$ sudo dpkg --add-architecture amd64

Installing dependencies(Optional)

There are some necessary dependencies to complete your environment for running Gaia. Execute the command below on your terminal and all these dependencies will be installed.

$ sudo apt install --no-install-recommends autoconf2.13 bison bzip2 ccache curl flex gawk gcc g++ g++-multilib git lib32ncurses5-dev lib32z1-dev libgconf2-dev zlib1g:amd64 zlib1g-dev:amd64 zlib1g:i386 zlib1g-dev:i386 libgl1-mesa-dev libx11-dev make zip lzop libxml2-utils openjdk-8-jdk nodejs unzip python

Setting ccache(Optional)

$ ccache -M 10G

Installing ADB and fastboot

$ sudo apt install android-tools-adb android-tools-fastboot

Setting USB access

$ wget -S -O - https://raw.githubusercontent.com/cm-b2g/B2G/1230463/tools/51-android.rules | sudo tee >/dev/null /etc/udev/rules.d/51-android.rules; sudo udevadm control --reload-rules
  • Plug the device in your computer using a USB cable

  • Use the command

$ lsusb

on the terminal to get the Vendor ID. Example of a result: Bus 001 Device 014: ID 22b8:2e76 Motorola PCS ===> vendor ID is 22b8

  • Log in as root and edit this file: /etc/udev/rules.d/51-android.rules

  • In the file above put a new line using the vendor ID that you got before. Example: SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", MODE="0666", GROUP="plugdev"

  • Now execute:

$ sudo chmod a+r /etc/udev/rules.d/51-android.rules
  • Create the following file in your HOME dir (not as root)
$ nano ~/.android/adb_usb.ini
  • Put the value of vendor ID on this file using hex format. Example: 0x22b8, where 22b8 is the vendor ID that you got before.

  • Use the command 'adb devices' on the terminal to list all devices connected on your PC. Your device should be listed and is ready to receive Gaia apps or use it on WebIDE.

Runs and Debug

For Runs and Debug