Skip to content
MichaelKang edited this page Jun 25, 2014 · 6 revisions

1. Clone android_s2e repository

git clone https://github.com/michaekang/android_s2e.git

2. Build android_s2e

2.1 Build original arm_s2e

2.2 Modify Makefile.target to fit your build environment

2.3 Build android_s2e

    ` ./android-configure.sh --enable-s2e`
     `make`

2.4 build op_helper.bc under qemu_android

 `    sh build_ophelper.sh`
     `cp op_helper.bc objs/`

3. Download android image

The image URL: http://sourceforge.net/projects/skyeye/files/misc/android_build.tar.gz/download And uncompress the android image as the following: tar xzvf android_build.tar.gz

4. Set the variable and run android

 `  mkdir s2e_out`
   `export ANDROID_PRODUCT_OUT= android_build/out/target/product/generic/`
   `cp qemu_android/tests/config.lua s2e_out`
   `cd s2e_out`
   `qemu_android/objs/emulator -shell`

5. Run s2e testcase

After android shell is prompted, type the following command:

   `cd /data`
    `su`
   `./s2e_t2`

The output as the video: http://youtu.be/3cTaeo8_izs Or on the Chinese video site: http://v.youku.com/v_show/id_XNzMxNTE5MzE2.html

Issues

Segmentation fault will trigger after run s2e_t2 testcase in some time. The workaround patch is located at: android_s2e/patch/0005-Workaround-the-segfault-of-fb-update.patch.