1.下載repo工具
(1).創(chuàng)建bin,并加入到PATH中
mkdir ~/bin PATH=~/bin:$PATH(2).安裝依賴庫(kù)
sudoapt-getinstallbisong++-multilibgitgperflibxml2-utilsmakezlib1g-dev:i386zipliblz4-toollibncurses5libssl-devbcflexcurlpython-is-python3
sudoapt-getinstallgit-coregnupgflexbisonbuild-essentialzipcurlzlib1g-devgcc-multilibg++-multiliblibc6-dev-i386libncurses5lib32ncurses5-devx11proto-core-devlibx11-devlib32z1-devlibgl1-mesa-devlibxml2-utilsxsltprocunzipfontconfig
bc bison build-essential ccache curl flex g++-multilib gcc-multilib git gnupg gperf imagemagick lib32ncurses5-dev lib32readline-dev lib32z1-dev libelf-dev liblz4-tool libncurses5 libncurses5-dev libsdl1.2-dev libssl-dev libxml2 libxml2-utils lzop pngcrush rsync schedtool squashfs-tools xsltproc zip zlib1g-dev python
apt install bison tree dpkg --add-architecture i386 apt update apt install libc6:i386 libncurses5:i386 libstdc++6:i386 apt install libxml2-utils sudo apt-get install libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-dev g++-multilib sudo apt-get install -y git flex bison gperf build-essential libncurses5-dev:i386 sudo apt-get install tofrodos python-markdown libxml2-utils xsltproc zlib1g-dev:i386 sudo apt-get install dpkg-dev libsdl1.2-dev libesd0-dev sudo apt-get install git-core gnupg flex bison gperf build-essential sudo apt-get install zip curl zlib1g-dev gcc-multilib g++-multilib sudo apt-get install libc6-dev-i386 sudo apt-get install lib32ncurses5-dev x11proto-core-dev libx11-dev sudo apt-get install libgl1-mesa-dev libxml2-utils xsltproc unzip m4 sudo apt-get install lib32z-dev ccache
(3).下載repo并設(shè)置權(quán)限
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo chmod a+x ~/bin/repo
2.下載源碼
(1).創(chuàng)建工作目錄
mkdir aosp cd aosp
vim ~/.bashrc export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
git config --global user.email "gyp@gmail.com" git config --global user.name "gyp"
(2).初始化倉(cāng)庫(kù)(不指定版本,默認(rèn)下載最近的代碼)
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest
(3).初始化并指定版本
repo init -u https://aosp.tuna.tsinghua.edu.cn/platform/manifest -b android-11.0.0_r1
repoinit-uhttps://mirrors.tuna.tsinghua.edu.cn/git/AOSP/platform/manifest-bandroid-11.0.0_r46
repoinit-ugit://mirrors.ustc.edu.cn/aosp/platform/manifest-bandroid-12.0.0_r3
(4).同步源碼
repo sync
3.驅(qū)動(dòng)下載
https://source.android.google.cn/setup/build/downloading#obtaining-proprietary-binaries https://developers.google.cn/android/blobs-preview https://developers.google.cn/android/drivers repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-12.0.0_r3 https://developers.google.cn/android/drivers
4.下載內(nèi)核源碼
AOSP源碼中并不包括內(nèi)核源碼,需要單獨(dú)下載,內(nèi)核源碼有很多版本,比如common是通用的Linux內(nèi)核,msm是用于使用高通MSM芯片的Android設(shè)備,goldfish是用于Android模擬器的內(nèi)核源碼。
(1).goldfish
mkdir kernel cd kernel
git clone https://aosp.tuna.tsinghua.edu.cn/kernel/goldfish.git
cd goldfish git branch -a
git checkout remotes/origin/android-goldfish-3.4
5.AOSP Android系統(tǒng)源碼及內(nèi)核源碼
https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions https://developer.sony.com/develop/open-devices/guides/aosp-build-instructions/build-aosp-android-android-11-0-0 https://source.android.google.cn/setup/start/build-numbers http://source.android.com/setup/start/build-numbers#source-code-tags-and-builds https://android.googlesource.com/kerne https://android.googlesource.com/kernel/msm/
Android studio導(dǎo)入AOSP系統(tǒng)源碼及源碼Debug調(diào)試
https://developer.android.google.cn/studio/debug#breakPoints Androidstudio導(dǎo)入Android系統(tǒng)源碼 https://blog.csdn.net/qq_23327993/article/details/100932496 Android Studio導(dǎo)入系統(tǒng)源碼 https://blog.csdn.net/m0_58241002/article/details/126543948 Android Studio導(dǎo)入Android平臺(tái)源碼 https://blog.csdn.net/xiaosayidao/article/details/79023369 Android Studio調(diào)試系統(tǒng)源碼的方法 https://blog.csdn.net/dc3120/article/details/112384879?spm=1001.2014.3001.5502 AndroidStudio導(dǎo)入系統(tǒng)源碼并對(duì)源碼進(jìn)行debug調(diào)試 https://blog.csdn.net/u014078003/article/details/123842413 Android Studio調(diào)試系統(tǒng)源碼的三種方式 http://liuwangshu.cn/framework/aosp/5-debug-aosp.html
審核編輯:劉清
-
Android
+關(guān)注
關(guān)注
12文章
3935瀏覽量
127337 -
LINUX內(nèi)核
+關(guān)注
關(guān)注
1文章
316瀏覽量
21644 -
msm芯片
+關(guān)注
關(guān)注
0文章
5瀏覽量
7745 -
BIN文件
+關(guān)注
關(guān)注
0文章
26瀏覽量
8282 -
AOSP
+關(guān)注
關(guān)注
0文章
16瀏覽量
6195
原文標(biāo)題:AOSP Android11系統(tǒng)源碼和內(nèi)核源碼
文章出處:【微信號(hào):哆啦安全,微信公眾號(hào):哆啦安全】歡迎添加關(guān)注!文章轉(zhuǎn)載請(qǐng)注明出處。
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
評(píng)論