Fuzz Android Framework ONE: How to port Android StageFright to Linux?
Modify Linux kernel to enable Android binder and ashmem
- download kernel source code
$ sudo apt install linux-source
- extract source code
$ cd kernel $ tar jxvf /usr/src/linux/linux-source-4.8.0.tar.bz2 $ cd linux-source-4.8.0
- copy .config
$ cp -vi /boot/config-`uname -r` .config $ make oldconfig
- enable binder and ashmem
make menuconfig
Binder: goto Device Drivers->Android, selectAndoid Drivers
andAndroid Binder IPC Driver
.
ashmem: goto Device Drivers->Staging drivers->Android, selectEnable the Anonymous Shared Memory Subsystem
. - compile
$ make -j16 $ sudo make modules_install $ sudo make install
- config udev
$ echo -e "KERNEL==\"binder\", MODE=\"0666\"\nKERNEL==\"ashmem\", MODE=\"0666\"" | sudo tee /etc/udev/rules.d/android.rules
- restart
Modify Stagefright
- download AOSP
- apply patch. If apply failure, please update the patch file according to your downloaded AOSP.
- compile