Hi ! 🙂 I guess you have collected all required source codes by now. (If not please refer the Buidl OS guide) In order to proceed further you need to communicate with your device through ADB (Android Debug Bridge). So let’s go ahead and download Android SDK to our Linux VM and enable adb.
Step 1. Download Android SDK
- We have a Linux environment. So get the android-sdk-r24.0.2-linux.tgz from android developer site here. Extract the files.
- Goto android–>sdk—>android-sdk-linux –> tools.
You will see the android executable file. This is the Andorid SDK Manager. Execute the file.
- Select Android SDK platform-tools, Build-tools and Install them. In order to get adb tool, fastboot tool these two should be installed on your machine.
Step 2. Update PATH variables
- Add path to platform-tools and tools to PATH
Command: $ gedit ~/.bashrc
Command: $ adb
Note: Some required build packages are missing.
Step 3. Get required build packages
Command: $ sudo apt-get install g++-multilib
This will suggest you to add some additional packages. Install them as well.
New packages installed: g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev
Step 4. Run adb command
Now the adb is enabled 🙂 Yesss
Command: $ adb devices
This will check for running android devices. Seems like we have no devices currently.
Never mind Lets check with some android virtual devices (emulators) 🙂
Step 5. Create an emulator and run the device.
- Create emulator using avd
Command: $ android create avd -n <given name> -t <target ID> –abi <specify CPU>
Ex: $android create avd -n TestAVD -t 1 –abi armeabi-v7a
- Run the emulator
Command: $ emulator -avd TestAVD
Running Emulator……
Step 6. Check for running devices through ADB
Command : $ adb devices
You can see the emulator is listed under the running android devices. 🙂
Cheers ! 🙂