PageRenderTime 18ms CodeModel.GetById 15ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/Run-FTK-On-Android-Emulator.txt

http://ftk.googlecode.com/
Plain Text | 70 lines | 57 code | 13 blank | 0 comment | 0 complexity | e7662f289d197db3ce550229bae39c14 MD5 | raw file
 11.download android source and make sdk.
 2  mkdir android-eclair
 3  cd android-eclair/
 4  repo init -u git://android.git.kernel.org/platform/manifest.git -b eclair
 5  repo sync
 6  make sdk
 7  cd ..
 8  unzip android-eclair/out/host/linux-x86/sdk/android-sdk_eng.lixianjing_linux-x86.zip
 9  mv android-sdk_eng.lixianjing_linux-x86 ftk_emu
10
11recompile it:
12  cd -;make
13
142.unpack platforms/android-1.5/images/ramdisk.img in SDK, edit init.rc to forbit system server.
15  
16  cd ftk_emu/platforms/android-Eclair/images/
17
18unpack ramdisk:
19  mv ramdisk.img ramdisk.img.gz;
20  gunzip ramdisk.img.gz;
21  mkdir initrd;
22  cd initrd;
23  cpio -i <../ramdisk.img
24
25edit init.rc, comment this following lines:
26#service zygote /system/bin/app_process -Xzygote /system/bin --zygote
27--start-system-server
28#    socket zygote stream 666
29#    onrestart write /sys/android_power/request_state wake
30#    onrestart write /sys/power/state on
31#    onrestart restart media
32
33repack ramdisk.img
34  find . | cpio -c -o > ../ramdisk
35  cd ..
36  gzip ramdisk
37  mv ramdisk.gz ramdisk.img
38
393.edit ftk/src/Android-build.sh, set the ANDROID_ROOT to android source dir.
40the run Android-build.sh
41
42  ./Android-build.sh
43
444.create a virtual machine
45  ./ftk_emu/tools/android create avd -t 1 -n ftk
46  ./ftk_emu/tools/emulator -avd ftk
47
485.upload demo* to /data
49  enter android-eclair directory, then:
50  for f in out/target/product/generic/system/bin/demo_*;do adb push $f
51/data;done
52
536.upload data/theme/testdata to /data/ftk
54  entry ftk directory, then
55  adb shell mkdir /data/ftk 
56  adb shell mkdir /data/ftk/base
57  adb shell mkdir /data/ftk/base/data
58  adb shell mkdir /data/ftk/base/theme
59  adb shell mkdir /data/ftk/base/theme/default
60  for f in theme/default/*;do adb push $f /data/ftk/base/theme/default;done
61  for f in data/*;do adb push $f /data/ftk/base/data;done
62  for f in src/demos/*.xul;do adb push $f /data/ftk/;done
63  ...
64
657.run the demos.
66  adb shell
67  cd /data
68  chmod 775 demo*
69  ./demo_button
70