android 10 app 获取 imei
app 中修改
需要在 xml 文件中增加 system 相关设置,编译的时候,会有红字提示不能安装,这个提示不用管。
aosp 中修改
- 找到as编译出的 app,
\项目名\app\build\outputs\apk\debug\app_debug.apk
- 在AOSP源码
packages/apps/
下新建一个文件夹GetImei
- 拷入附件的
android.mk
拷入as 编译的app_debug.apk
,改名为GetImei.apk
- 源码
\device\qcom\common\base.mk
中添加一行PRODUCT_PACKAGES += GetImei
- 源码编译:
source build/envsetup.sh
lunch
(选择项目)
mmm packages/apps/GetImei/
-
拿到
\out\target\product\msm8937_32\system\app\GetImei\GetImei.apk
- 设备
root remount
:
adb root
adb disable-verity
adb reboot
adb root
adb remount
adb shell
#mkdir system/app/GetImei
#chmod 777 system/app/GetImei
#exit
adb push D:\GetImei.apk system/app/GetImei/
adb shell
#chmod 777 system/app/GetImei/GetImei.apk
#reboot
参考:
RK3399 Android7.1系统 自定义号码CMEI信息写入vendor_storage
https://blog.csdn.net/yafeixi/article/details/95626903
[RK3399][Android7.1] Vendor Storage区域知识及探讨
https://blog.csdn.net/kris_fei/article/details/79580845