1. Doc
SEE https://source.android.com/compatibility/cts/setup
2. Install JDK 8 & adb & python
sudo apt-get update
sudo apt-get install openjdk-8-jre adb python python-pip python-virtualenv
3. Install Chrome
Download deb from https://www.google.com/chrome/
Install
sudo dpkg -i google-chrome-stable_current_amd64.deb
4. Install Android SDK
SEE https://developer.android.com/studio/
Download sdk from chatper "Command line tools only"
Extract SDK from downloaded zip file to local path. i.e. ~/android/sdk
Add SDK to PATH. i.e.
echo "export PATH=~/android/sdk/tools/bin:\$PATH" >> ~/.bashrc
Start a new terminal
sdkmanager --list
Find latest build-tools. i.e. "build-tools;28.0.3"
sdkmanager --install "build-tools;28.0.3"
add build-tools to PATH
echo "export PATH=~/android/sdk/build-tools/28.0.3:\$PATH" >> ~/.bashrc
5. ADB permission
sudo usermod -aG plugdev $LOGNAME
echo "SUBSYSTEM==\"usb\", ATTR{idVendor}==\"05c6\", MODE=\"0666\", GROUP=\"plugdev\"" | sudo tee -a /etc/udev/rules.d/51-andorid.rules
sudo service udev restart
NOTE: Value of ATTR{idVendor} is from lsusb
网友评论