Embedded GUI ftk introduction (9)-run ftk on Android Simulator
Indicate the source and author's contact information during reprinting.
ArticleSource: http://www.limodev.cn/blog
Contact information of the author: Li xianjing <xianjimli at Hotmail dot com>
The android simulator uses qemu to implement the arm virtual machine, which can simulate the real running environment to a large extent. The ftk can be run on the android simulator. The method is as follows:
1. Download Android source and make SDK.
Mkdir Android-eclair
CD Android-eclair/
Repo init-u git: // android.git.kernel.org/platform/manifest.git-B eclair
Repo sync
Make SDK
CD ..
Unzip Android-eclair/out/host/linux-x86/SDK/android-sdk_eng.lixianjing_linux-x86.zip
Music android-sdk_eng.lixianjing_linux-x86 ftk_emu
Recompile it:
CD-; make
2. Unpack platforms/Android-1.5/images/ramdisk. IMG In SDK, edit init. RC to forbit system server.
CD ftk_emu/platforms/Android-eclair/images/
Unpack ramdisk:
MV ramdisk. IMG ramdisk.img.gz;
Gunzip ramdisk.img.gz;
Mkdir initrd;
CD initrd;
Cpio-I <../ramdisk. img
Edit init. RC, comment this following lines:
# Service zygote/system/bin/app_process-xzygote/system/bin -- zygote
-- Start-system-Server
# Socket zygote stream 666
# Onrestart write/sys/android_power/request_state wake
# Onrestart write/sys/power/State on
# Onrestart restart Media
Repack ramdisk. img
Find. | cpio-c-o> ../ramdisk
CD ..
Gzip ramdisk
MV ramdisk.gz ramdisk. img
3. Edit ftk/src/Android-build.sh, set the android_root to Android source dir.
The run Android-build.sh
/Android-build.sh
4. Create a virtual machine and run it:
./Ftk_emu/tools/Android create AVD-T 1-N ftk
./Ftk_emu/tools/emulator-AVD ftk
5. Upload demo * To/Data
Enter Android-eclair directory, then:
For f in out/target/product/generic/system/bin/demo _ *; do ADB push $ F
/Data; done
6. Upload data/theme/testdata to/data/ftk
Entry ftk directory, then
ADB shell mkdir/data/ftk
ADB shell mkdir/data/ftk/base
ADB shell mkdir/data/ftk/base/Data
ADB shell mkdir/data/ftk/base/theme
ADB shell mkdir/data/ftk/base/theme/Default
For f in theme/default/*; do ADB push $ F/data/ftk/base/theme/default; done
For f in data/*; do ADB push $ F/data/ftk/base/data; done
For f in src/demos/*. XUL; do ADB push $ F/data/ftk/; done
...
7. Run the demos.
ADB shell
Cd/Data
chmod 775 demo *
./demo_button