Multi-picture warning!!
Something you need to use
Windows 7 or Windows 10:
- The Virtualbox installation package can be downloaded from the official website.
- Ubuntu system image, can go to the Open Source software, Tsinghua university Mirror station | Tsinghua Open Source download Mirror. I downloaded Ubuntu-16.04.6, amD64 for a 64-bit computer, i386 for a 32-bit computer.
Linux: Download in Ubuntu!! Recommend to AndroidDevTools download, faster, but also more assured.
- Android-sdk-Linux
- Android Studio
Install the VM -Ubuntu
Some Settings for Virtualbox
Once you enter the system, you will notice that Ubuntu does not adapt when zooming in and out of the Virtualbox window.
Configure the JDK
Ctrl + Alt + T open terminal, type:
java
sudo apt install openjdk-8-jre-headless # JRE
Copy the code
Input password will not be displayed, directly enter and press Enter.
java
Copy the code
javac
sudo apt install openjdk-8-jdk-headless # JDK installation
Copy the code
Configure the SDK – Tool
Tip: When the terminal enters the file name, press Tab to automatically complete the file. ↓↓↓ Decompress the downloaded SDK.
sudo mv android-studio /opt/android-studio/ # Mobile Android Studio
sudo mv android-sdk-linux /opt/android-sdk-linux/ # mobile SDK
Copy the code
sodu gedit /etc/profile
Copy the code
export ANDROID_HOME=/opt/android-sdk-linux
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
Copy the code
source /etc/profile
Copy the code
/opt/android-sdk-linux/tools
./android
Copy the code
The Android SDK Manager will open and select the SDK version to download on demand.
Install the Android Studio
↓↓↓ Open the terminal at /opt/ Android-studio /bin and enter:
./studio.sh
Copy the code
Real machine commissioning
↓↓↓ Terminal input
lsusb
Copy the code
The real machine is not identified at this time.
/opt/android-sdk-linux/platform-tools
sudo su Enter superuser mode
Copy the code
adb devices
apt install adb
./adb kill-server
./adb start-server
adb devices
Copy the code
conclusion
Based on this tutorial, the success rate should be 99.9%. I used to configure it on Windows 10, but for this blog I re-configured it on Windows 7 on my old computer, and have avoided the pits. Linux environment has what advantage, that is to see AOSP (Android Open Source Project) Source code than convenient, later free to write down the configuration of Linux AOSP environment.
The resources
No permissions is displayed when the Android Studio Ubuntu VM is connected to the mobile device in Ubuntu 18.04