[Android] Compile a CWM recovery from JellyBean

# 0.环境配置(64位,貌似在32bit不能编译)
sudo apt-get install git-core gnupg flex bison python rar original-awk gawk p7zip-full gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev pngcrush schedtool
sudo apt-get install libc6-dev x11proto-core-dev libx11-dev libgl1-mesa-dev mingw32 tofrodos python-markdown libxml2-utils
sudo apt-get install g++-multilib lib32z1-dev ia32-libs lib32ncurses5-dev lib32readline-gplv2-dev gcc-multilib g++-multilib
# 1.sync jb code 
cd /path/to/jellybean
sync -j4 && make -j4 otatools
# 2. 修改要编译product(不然一开始就报xxx文件不存在...)
gvim /vendor/cyanogen/products/AndroidProducts.mk
# 内容修改为
PRODUCT_MAKEFILES := \
    $(LOCAL_DIR)/common.mk
# 3. 修改系统声音文件
gvim frameworks/base/data/sounds/AudioPackage4.mk
# 内容修改为(声音文件为无,需要的自行添加..)
LOCAL_PATH:= frameworks/base/data/sounds
# 4. 配置环境
source build/envsetup.sh
# 5. 下载可用的unpackbootimg拖放到~/bin/目录下
cp unpackbootimg ~/bin/unpackbootimg
# 6. 提取配置自己手机的内核
build/tools/device/mkvendor.sh Lenovo LePhone ~/k860/1226/boot.img
# 7. 开工进行编译
lunch full_LePhone-eng
. build/tools/device/makerecoveries.sh full_LePhone-eng
# 或者是 make -j4 recoveryimage,make -j4 recoveryzip
# 8. 最后输出结果 Recovery FakeFlash is now available at /media/scue/Source/JellyBean/out/target/product/LePhone/utilities/update.zip

 汉化:bootable/recovery/default_recovery_ui.c 

 注:假如unpackbootimg在64位下不可运行,请下载unpackbootimg

你可能感兴趣的:(android)