光说不练非好汉,现在就让我们开启自己编译的系统测试!其实懂得这些过程,就知道了Android手机系统定制的整个流程。现有的智能机都是使用Google的android开源的系统然后添加一些自己的东西,就成为公司的系统!
我们前面讲了如何编译,编译的成功的标识就是生成system.img文件,如下图:
sdk替换
拷贝system.img镜像文件,替换掉sdk中的镜像,如下图:
对于AVD创建很简单,这里几张图就可以看懂!
点击start就可以启动该虚拟机。Api一定是调用18的,因为该接口是我们编译生成的system.img
运行TaintDroid!这里我对该应用进行了修改,使其可以生成日志文件!
已经测试成功!
% cd ~/tdroid/tdroid-4.3_r1 % wget https://dl.google.com/dl/android/aosp/broadcom-maguro-jwr66y-5fa7715b.tgz % tar -zxvf broadcom-maguro-jwr66y-5fa7715b.tgz % ./extract-broadcom-maguro.sh # (view the license and then type "I ACCEPT") ... % wget https://dl.google.com/dl/android/aosp/imgtec-maguro-jwr66y-b0a4a1ef.tgz % tar -zxvf imgtec-maguro-jwr66y-b0a4a1ef.tgz % ./extract-imgtec-maguro.sh # (view the license and then type "I ACCEPT") ... % wget https://dl.google.com/dl/android/aosp/invensense-maguro-jwr66y-e0d2e531.tgz % tar -zxvf invensense-maguro-jwr66y-e0d2e531.tgz % ./extract-invensense-maguro.sh # (view the license and then type "I ACCEPT") ... % wget https://dl.google.com/dl/android/aosp/nxp-maguro-jwr66y-d8ac2804.tgz % tar -zxvf nxp-maguro-jwr66y-d8ac2804.tgz % ./extract-nxp-maguro.sh # (view the license and then type "I ACCEPT") ... % wget https://dl.google.com/dl/android/aosp/samsung-maguro-jwr66y-fb8f93b6.tgz % tar -zxvf samsung-maguro-jwr66y-fb8f93b6.tgz % ./extract-samsung-maguro.sh # (view the license and then type "I ACCEPT") ... % wget https://dl.google.com/dl/android/aosp/widevine-maguro-jwr66y-c49927ce.tgz % tar -zxvf widevine-maguro-jwr66y-c49927ce.tgz % ./extract-widevine-maguro.sh # (view the license and then type "I ACCEPT")建立 buildspec.mk文件并输入以下内容!
% cd ~/tdroid/tdroid-4.3_r1 % edit/create buildspec.mk # Enable core taint tracking logic (always add this) WITH_TAINT_TRACKING := true # Enable taint tracking for ODEX files (always add this) WITH_TAINT_ODEX := true # Enable taint tracking in the "fast" (aka ASM) interpreter (recommended) WITH_TAINT_FAST := true # Enable additional output for tracking JNI usage (not recommended) #TAINT_JNI_LOG := true # Enable byte-granularity tracking for IPC parcels WITH_TAINT_BYTE_PARCEL := true开始进行编译!
PRODUCT_PACKAGES += \ BasicDreams \ ... voip-common \ TaintDroidNotify重新编译
% . build/envsetup.sh % lunch 12 % make clean % make -j4开始进行刷机
% cd out/target/product/maguro % fastboot flash boot boot.img % fastboot flash system system.img % fastboot flash userdata userdata.img