Google published the first version of Brillo, and as IoT researchers, the first thing that we want to do is to quickly compile and run it in order to get a feel for it, investigate it and learn as much as possible about the system…
At the beginning of our work we made some assumptions, which we found to have been correct:
- Instead of installing a new environment, it will be easier to install it on our AppUse VM which already has a lot of stuff on it.
- Google probably built it similarly to Android (both are Unix-based), so we took the Android compilation guide (links below).
Despite these shortcuts, we still came across a lot of trouble… I know for sure that you don’t want to waste your time to find and fix some stupid errors, so let me give you the shortest way to install it in a few steps and one script ?
- Download AppUse (links below), unzip it and open it in vmware workstation/vmware player.
- This is an important step – in the VM settings, increase the number of the CPUs to 4, otherwise you won’t understand why it doesn’t work, and a workaround will take you a few days minimum. This is a tip coming from sad experience…
- Verify that the partition you installed AppUse on has 40 GB free.
- Run AppUse, open the terminal, press sudo -I and run the following script (it will take a few hours, be patient):
#install required packages
apt-get install openjdk-7-jdk
apt-get -y -qq install git-core gnupg flex bison gperf build-essential \
zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 \
lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache \
libgl1-mesa-dev libxml2-utils xsltproc unzip
#download the source
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
git config –global user.name ‘appuse user’
git config –global user.email ‘email@example.com’
git config –global color.ui false
repo init -q -u https://android.googlesource.com/brillo/manifest
repo sync -q
- Now it is compiled, you just need to run it, use the following commands:
- Inside Brillo, if you want to see where you are all the time, use the command:
export PS1=’$(whoami)@$(hostname):$(pwd)> ‘
Now it’s your time to explore! ? You can find the weaved service, and adbd service. Adb should run for you as usual and will be detected by AppUse with the adb devices, adb pull/push commands etc.
Download AppUse VM – https://appsec-labs.com/appuse/
Android download & compilation guide – http://source.android.com/source/downloading.html
Brillo source – https://android.googlesource.com/brillo/manifest
Avahi service – https://en.wikipedia.org/wiki/Avahi_(software)