环境变量:
source build/envsetup.sh
注:
有了环境变量,我就可以用android的mgrep来寻找.mk中的变量
寻找不要的Package的名称:
mgrep Music
注:
发现有各种Music,其中还存在各种迭代关系,把他们都干掉。
增加.mk配置:
mkdir device/overlay
增加Android.mk,内容如下:
$(warning build overlay...... ) LOCAL_PATH:= $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-java-files-under, src) LOCAL_JAVA_LIBRARIES := framework LOCAL_PACKAGE_NAME := overlay LOCAL_OVERRIDES_PACKAGES += \ Music \ MusicFX \ RandomMusicPlayer \ RkMusic LOCAL_SDK_VERSION := current include $(BUILD_PACKAGE) # Use the folloing include to make our test apk. include $(call all-makefiles-under,$(LOCAL_PATH))
从out目录删除原来编译的apk等:
sudo rm -rf ~/firefly-rk3399-jd4/out/target/product/rk3399_firefly_aiojd4/system/
重新编译:
source build/envsetup.sh
lunch rk3399_firefly_aiojd4-userdebug
make -j32
./mkimage.sh
./FFTools/mkupdate/mkupdate.sh -l rk3399_firefly_aiojd4-userdebug
结果:
发现成功去除了想去除的apk