版權聲明:您好,轉載請留下本人部落格的位址,謝謝 https://blog.csdn.net/hongbochen1223/article/details/44839149
對于SeAndroid的學習和研究剛剛開始,還沒有了解什麼是真正的SeAndroid,是以也不敢妄加評判,等學習之後再好好聊聊對于SeAndroid的看法,對于她的學習我是先從編譯開始的,下面就是我的擷取和編譯的過程。從頭到尾編譯了差不多得17,8個小時,因為中間有一次出現錯誤,改正之後重新編譯的。
在64位ubuntu系統中,編譯SeAndroid的過程
1:安裝openjdk 1.7.x
2:
http://seandroid.bitbucket.org/官網
git clone https://bitbucket.org/seandroid/manifests.git
mkdir seandroid-5.1.0
cd seandroid-5.1.0
repo init -u https://android.googlesource.com/platform/manifest -b android-5.1.0_r3
repo sync
mkdir .repo/local_manifests
cp ../manifests/seandroid-5.1.0.xml .repo/local_manifests
repo sync
3:安裝所需要的庫
git gnupg flex bison gperf build-essential
zip curl libc6-dev libncurses5-dev:i386
x11proto-core-dev libx11-dev:i386
libreadline6-dev:i386 g++-multilib
mingw32 tofrodos python-markdown
libxml2-utils xsltproc
zlib1g-dev:i386
4:Building for the Emulator
//PREFIX是源碼根目錄
export PREFIX=/path/to/your/aospclone
cd $PREFIX
source build/envsetup.sh
lunch aosp_arm-eng
make
5:編譯完成之後,找到emulator,在~/.bashrc中配置 export
Export ANDROID_PRODUCT_OUT_BIN=/home/embedded/seandroid/seandroid-5.1.0/prebuilts/android-emulator/linux-x86_64
export ANDROID_PRODUCT_OUT=/home/embedded/seandroid/seandroid-5.1.0/out/target/product/generic
export PATH=${PATH}:${ANDROID_PRODUCT_OUT_BIN}:${ANDROID_PRODUCT_OUT};
6:配置完成之後 source ~/.bashrc
7: 運作虛拟機
emulator -qemu -append androidboot.selinux=permissive
note:
//當關閉虛拟機,重新啟動的時候,可能會出現下面問題
/**
* emulator:ERROR:You did not specify a virtual
* device name,and the system directory could
* not be found.
*/
///解決辦法就是
source build/envsetup.sh
lunch sdk-eng
emulator