Kali 系统编译源码步骤:
- 文件:
# 查看分区
fdisk -l
mount /dev/sda3 Compile/
fiz 上传文件到对应目录
对比md5
7z x 文件 开始解压
apt update
git config --global user.email "cangming666@gmail.com"
git config --global user.name "cangming"
apt install bison tree
dpkg --add-architecture i386
apt update
apt install libc6:i386 libncurses5:i386 libstdc++6:i386
apt install libxml2-utils
# install
update-alternatives --install /usr/bin/java java /root/Desktop/Compile/aosp810r1/prebuilts/jdk/jdk8/linux-x86/bin/java 1
update-alternatives --install /usr/bin/javac javac /root/Desktop/Compile/aosp810r1/prebuilts/jdk/jdk8/linux-x86/bin/javac 1
# 切换 java
update-alternatives --set java /root/Desktop/Compile/aosp810r1/prebuilts/jdk/jdk8/linux-x86/bin/java
update-alternatives --set javac /root/Desktop/Compile/aosp810r1/prebuilts/jdk/jdk8/linux-x86/bin/javac
# 对比 java
java -version
javac -version
# 环境变量配置
vim ~/.bashrc
export JAVA_HOME=/root/Desktop/Compile/aosp810r1/prebuilts/jdk/jdk8/linux-x86/
export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
source ~/.bashrc
// 编译源码前执行这条明明
编译前要保证执行
# 保证是系统的python 2.7
pyenv local system
# 执行编译的时候,确认执行
export LC_ALL=C
# 开始编译
. build/envsetup.sh
lanch
```bash
刷入真机的方法
肉丝的教程:
https://www.anquanke.com/post/id/199898#h3-8