分类: LINUX
2011-08-04 10:03:39
For one, we discovered that Android already has two product “policies” in its code. Product policies are operating system directions aimed at specific uses. The two policies are for 1) phones and 2) mobile internet devices, or MID for short. MID is Intel’s name for ‘mobile internet devices,’ which include devices like the Asus netbook we got Android running on.
The context for our finding can be found . The important line is this one:
PRODUCT_POLICY
android.policy_phone
android.policy_mid
http://blog.csdn.net/yili_xie/article/details/4848018
关于Android下,修改frameworks/policies/xxx...文件后的编译问题
习惯性的编译操作: mm frameworks/policies/base/
编译之后没有出现出错,但是没有出现 install out/....... .apk或者 system.img什么的东西。
mm frameworks/policies/base/phone/ 执行该命令之后信息如下:
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=beagleboard
TARGET_BUILD_VARIANT=tests
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ECLAIR
============================================
make: Entering directory `/home/android/rowboat-android-eclair'
target Java: android.policy_phone (out/target/common/obj/JAVA_LIBRARIES/android.policy_phone_intermediates/classes)
注意:某些输入文件使用或覆盖了已过时的 API。
注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。
make: Leaving directory `/home/android/rowboat-android-eclair'
用make android.policy
这个文件需要修改下Phone目录下的Android.mk文件: 1、 将 android.policy_phone中的_phone删掉 2、注释掉LOCAL_UNINSTALLABLE_MODULE := true 这句 修改后的文件内容如下: LOCAL_MODULE := android.policy #LOCAL_UNINSTALLABLE_MODULE := true |
如果要全局编译,记得还要改回来,否则会报错
mm一下就OK,然后把最后生成的javalib.jar改为android.policy.jar放到system/framework目录下就可以了
http://blog.csdn.net/yiyaaixuexi/article/details/6232881