安卓系统定制脱壳(第一章)_飘雪,飘雪的博客-爱代码爱编程
文章目录
前言
学习系统编译,更好了解安卓系统dex 加载时机。给个关注呗!
一、先安装Ubuntu 环境并且设置中文
退出重新进入
退出重新进入就可以了
二、安装python3.x版本
apt-get install python //安装版本python 3.几以上版本
echo alias python=python3 >> ~/.bashrc //修改默认python
source ~/.bashrc //重新加载
ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3 //添加python3的软链接
ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3 //添加 pip3 的软链接
三、 安装git和配置
sudo apt-get install git //root权限下载
git config --global user.email 1543682357@qq.com //设置邮箱
git config --global user.name renxuepiao //设置名字
git config --global --list //查看配置
四、 下载curl
sudo apt-get install curl //下载curl root权限下载
五、下载 repo 工具
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
六、创建aosp文件
mkdir /home/renxuepiao/aosp
cd /home/renxuepiao/aosp
七、初始化仓库
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest
解决办法:
vim /home/renxuepiao/bin/repo
编辑REPO_URL 修改地址 https://gerrit-googlesource.proxy.ustclug.org/git-repo
设置完以后接着输入下面命令:
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest
repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-4.0.1_r1
repo sync
第二种方案:Android源码的方式是先下载个初始包,然后在执行repo sync进行代码同步
除了第七步骤不用外其他都要
wget -c -t 0 https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar
tar -xvf aosp-latest.tar
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-cts-7.0_r22
repo sync
总结
针对系统定制脱壳机,学习交流使用。编译环境非常重要。
作者:任雪飘