这是做framework开发时我未team member写的training doc,与大家分享一下
1. compile froyo source code use make
#cd froyo
#make #wait 3 hours
2. use the new system.img and userdata.img instead of the sdk's img,backup first
#mv /yournamedir/android-sdk-linux_86/platforms/android-8/images/system.img /yournamedir/android-sdk-linux_86/platforms/android-8/images/system.img.old
#mv /yournamedir/android-sdk-linux_86/platforms/android-8/images/userdata.img
/yournamedir/android-sdk-linux_86/platforms/android-8/images/userdata.img.old
#ln -s 7015/out/target/product/generic/system.img /yournamedir/android-sdk-linux_86/platforms/android-8/images/system.img
#ln -s 7015/out/target/product/generic/userdata.img /yournamedir/android-sdk-linux_86/platforms/android-8/images/userdata.img
then create a avd in eclipse, this avd will use the new system.img.
Start it!
3. modify apps
Change Contacts for example,change java files in packages and save.
#cd 7015
#mmm packages/apps/Contacts #wait sevaral minutes
#adb remount #after remount the /symstem in emulator will be mounted writable
use the new generated apk replace the same apk in emulator dir /system/app,you can use adb push command or push file in ddms.
#adb push out/target/product/generic/system/app/Contacts.apk /system/app
#adb push out/target/product/generic/data/app/ContactsTests.apk /system/app
4. modify framework files
Change frameworks/base/core/res/ for example
edit String.xml and save
#mmm frameworks/base/core/res/
this will generate out/target/product/generic/system/framework/framework-res.apk, then use mkyaffs2image make new system.img
#out/host/linux-x86/bin/mkyaffs2image -f out/target/product/generic/system out/target/product/generic/system.img
restart the emulator, the new system.img will be used.