Overview

Ohmni runs on OhmniLabs' custom version of Android-x86 that we call Ohmni OS. It is our unique hybrid between Android and Ubuntu that combines the nice features of Android such as the familiar interface and optimized boot process with the power and flexibility of a full Ubuntu system.

Ohmni OS runs a more recent, standard, Linux kernel rather than on some super specific/old kernel version for a highly embedded board.

We find that this makes adding drivers and recompiling the kernel (for robot development) much easier. This becomes super important when you try and add support for things like depth cameras, custom vision or other sensors, etc.

Software stack

alt_text

Accessing the shell

Using the Android Debug Bridge (ADB)

To access the shell on the device, go to the Ohmni app's settings button (on the blue screen), and tap on the "Version Name" item 7 times. This will show all of the hidden items.

Next, scroll to the bottom and turn on the "Enable ADB" option. This will turn on the ADB daemon which will allow you to connect from the local network.

Now, download and install the Android platform tools for your platform:

https://developer.android.com/studio/releases/platform-tools

This should give you the ability to run "adb" in a Terminal window or Command Prompt. Once you can do that, find the IP of the robot (this is also displayed in the Ohmni app settings menu), and simply run:

adb connect <robot_ip>

Once it says connected, you can use commands like:

adb shell
adb push
adb pull

to start a shell, or push or pull files to the robot. See the ADB documentation for more details on the available commands.

If you have a developer unit and/or the developer software package enabled, you can elevate to superuser on the shell simply by typing "su" in the shell.

Using OpenSSH Server

An alternative to using ADB is SSH. OpenSSH server is enabled on Ohmni developer edition. Add your SSH public key to the list of authorized keys in the bot page settings under the Developer Settings tab.

alt_text

Paste your public SSH key in the Key field (your key should start with ssh-rsa...), and enter a label for that key then click the Add button to save the key. Now you can ssh to your bot by command below:

ssh root@<robot_ip>

Do not manually add a key into the bot using command line interface, because the key list will be reloaded from our database every time you restart your bot.

If you no longer use any SSH key, you can easily remove it by coming back to Developer Settings page and deleting the key on the list.

Filesystem overview

The filesystem is a fairly standard Android layout. Most of the root partition is stored as a compressed, gzipped image in the boot partition. This is for safety and for upgradeability. Some other notable paths are as follows:

  • /dev - your standard Linux devices
  • /system - most of the key Android system stuff
  • /data/local/tmp - a good place to use as a "scratch area" to push and pull or store random stuff during development
  • /data/data/com.ohmnilabs.telebot_rtc/files/assets/node-files - the unpacked JS portion of our control software

We'll go into these in greater detail in the relevant sections below.