我正在尝试在Linux上设置https://github.com/Fuzion24/AndroidKernelExploitationPlayground,该存储库包含3.4金鱼内核的易受攻击的补丁。我已经设置了一个android SDK版本19环境,如下所示: -
mkdir -p android-sdk-19/platforms
cd android-sdk-19/platforms
wget https://dl-ssl.google.com/android/repository/android-19_r04.zip
unzip *
rm android-19_r04.zip
cd ../
wget http://dl-ssl.google.com/android/repository/platform-tools_r19.0.1-linux.zip
unzip platform-tools_r19.0.1-linux.zip
rm platform-tools_r19.0.1-linux.zip
wget http://dl-ssl.google.com/android/repository/build-tools_r19.0.1-linux.zip
unzip build-tools_r19.0.1-linux.zip
rm build-tools_r19.0.1-linux.zip
wget http://dl-ssl.google.com/android/repository/tools_r19-linux.zip
unzip tools_r19-linux.zip
rm tools_r19-linux.zip
mkdir -p system-images/android-19
cd system-images/android-19
wget http://dl-ssl.google.com/android/repository/sys-img/x86/sysimg_x86-19_r02.zip
unzip sysimg_x86-19_r02.zip
rm *.zip
mkdir -p ../../sources/android-19
cd ../../sources/android-19
wget https://dl-ssl.google.com/android/repository/sources-19_r02.zip
unzip sources-19_r02.zip
rm sources-19_r02.zip
cd ../../
tools/android create avd --force -t "android-19" -n kernel_challenges --abi "x86"
应用补丁并构建内核映像后,我使用以下命令在模拟器上运行它: -
android-sdk-19/tools/emulator \
-show-kernel -kernel goldfish/arch/arm/boot/zImage \
-avd kernel_challenges -no-boot-anim -no-skin -no-audio -no-window \
-qemu -monitor unix:/tmp/qemuSocket,server,nowait -s
但是我收到以下错误:
qemu: linux kernel too old to load a ram disk
goldfish/arch/arm/boot/zImage,
android-sdk-19/system-images/android-19/x86//ramdisk.img,
qemu.gles=0 qemu=1 console=ttyS0 android.qemud=ttyS1 androidboot.hardware=goldfish
clocksource=pit android.checkjni=1 android.bootanim=0 ndns=1