android 零星笔记不定期更新 v5
note1: Android查看源代码的版本号
1. 编译的时候在终端中一开始就会打印出来:
PLATFORM_VERSION:2.3.1
2. 直接去make文件中去看:
build\core\version_defaults.mk // 搜索该文件中的 PLATFORM_VERSION值
note2:编译cm9时 OutOfMemoryError
在编译cm9代码的时候到了Signing package总是会java.lang.OutOfMemoryError:
虚拟机参数在 vendor/cm/tools/squisher设定
终端执行
sed -i 's/Xmx512m/Xmx1024m/g' vendor/cm/tools/squisher
当然,堆大小看你心情设置了
note3: android:sharedUserId=”android.uid.system”
使用此sharedUserId的时候需要platform签名,mk文件中设置
拿过来一个apk,如果里面用了sharedUserId,那么需要先签名成platform,然后push进去reboot即可
install -r会提示错误**** has no signatures that match those in shared user android.uid.system; ignoring!
note4:android系统给进程分配内存情况(4.0 ics)
adb shell getprop | grep heap
[dalvik.vm.heapgrowthlimit]: [64m]
[dalvik.vm.heapsize]: [256m]
[dalvik.vm.heapstartsize]: [8m]
I have read and agree with the terms and conditions (printable version) My certificate's MD5 fingerprint: