增加磁盘
gparted
更换源 不用upgrade
vim /etc/apt/sources.list
中科大源
deb http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali-rolling main non-free contrib
apt update
安装依赖
sudo apt install git-core gnupg flex bison build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z1-dev libgl1-mesa-dev libxml2-utils xsltproc unzip fontconfig htop tree p7zip-full jnettop python python3 openjdk-8-jdk
proxychains 配置
vim /etc/proxychains4.conf
切换zsh 为 bash 第一行内容 重启
vim /etc/passwd
/usr/bin/zsh -> /bin/bash
reboot
下载java8
wget https://download.java.net/openjdk/jdk8u41/ri/openjdk-8u41-b04-linux-x64-14_jan_2020.tar.gz
编写~/.bashrc
export JAVA_HOME=/root/Desktop/openjdk8/java-se-8u41-ri
export PATH=PATH
export CLASSPATH=.:JAVA_HOME/lib/tools.jar
去除本地化设置
export LC_ALL=C
安装repo 同步源码
curl -sSL 'https://gerrit-googlesource.proxy.ustclug.org/git-repo/+/master/repo?format=TEXT' |base64 -d > /usr/bin/repo
chmod 777 /usr/bin/repo
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
初始化仓库
repo init -u https://android.googlesource.com/platform/manifest
proxychains repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest
版本号地址
https://source.android.com/setup/start/build-numbers#source-code-tags-and-builds
下载特定版本
repo init -u https://android.googlesource.com/platform/manifest -b android-8.1.0_r1 --depth=1
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-8.1.0_r1 --depth=1
repo sync
下载驱动
https://developers.google.com/android/drivers
wget https://dl.google.com/dl/android/aosp/lge-bullhead-opm1.171019.011-2c4b1025.tgz
wget https://dl.google.com/dl/android/aosp/qcom-bullhead-opm1.171019.011-79a898aa.tgz
解压 驱动
./extract-qcom-bullhead.sh
./extract-lge-bullhead.sh
准备
source build/envsetup.sh
lunch
一把梭
make -j4