当前位置:网站首页>修改frameworks资源文件如何单编
修改frameworks资源文件如何单编
2022-07-27 14:08:00 【c%書呆】
一 : 编译framework资源文件
如果修改android framework资源文件,需要先编译资源文件,然后再编译framework才可以正常引用,
进入项目目录 cd xxx工程目录/frameworks/base/core/res/ 执行mm 编译 framework-res.apk(原生或高通,如果只是修改了core目录下的资源代码,到这一步就可以了!)
1、编译完后com.android.internal.R中会生成资源的引用。
2、在目录 work/source/frameworks/base/ 下执行mm 编译 framework.jar
3、如果 frameworks/base/services 下有修改,则也要编译,在目录 work/source/frameworks/base/services/java/ 执行mm 编译services.jar
编译生成的文件都位于你的out/target/product/k630/system/frameworks/目录下
注:若不生成新的apk、jar包文件,请将旧的.apk、.jar包删除
二 : 验证修改后的效果
adb root
adb remount
adb push framework-res.apk /system/framework/
adb push framework.jar /system/framework/
adb push secondary_framework.jar /system/framework/ (如果存在secondary_framework.jar,需要push)
adb push services.jar /system/framework/ (如果service有修改,需要push)
adb reboot 重启设备。
三 : 总结
在开发过程中,尤其是framework相关开发时,有时候需要重新编译资源文件.编译顺序和注意事项如下(均在源码根目录):
资源文件位置:frameworks/base/core/res,编译后生成的文件:framework-res.apk 另外com.android.internal.R会更新这个R.java所在目录/out/target/common/R/com/android/internal.
编译资源后,必须重新编译framework.jar.
如果在frameworks/base/core/res执行mm时并不重新编译,请使用toutch filename(文件名)或者mm -B
资源文件要小写
边栏推荐
- 微信小程序实现音乐搜索页面
- The database uses PSQL and JDBC to connect remotely and disconnect automatically from time to time
- Get the data of the first frame of unity's open camera
- An example of building 3D effects on the web based on three.js
- Detailed explanation of Telnet remote login AAA mode [Huawei ENSP]
- OBS advanced DXGI acquisition screen process, and how to modify it to its own cursor
- C语言基础练习题目
- [cache series] completely solve the problems of cache avalanche, breakdown and penetration
- Lecture 4: Longest ascending substring
- Passive income: return to the original and safe two ways to earn
猜你喜欢

【STM32】EXTI

Understand the evolution of redis architecture in one article

图解 SQL,这也太形象了吧

FPGA timing constraint sharing 04_ Output delay constraint

Research on multi label patent classification based on pre training model

Finally, someone finished all the dynamic planning, linked list, binary tree and string required for the interview

How to do well in enterprise system vulnerability assessment

Graphic SQL of giant image

如果我们是那晚负责修复 B 站崩了的开发人员

DirectX 入门知识
随机推荐
Visual system design example (Halcon WinForm) -10. PLC communication
LeetCode 341.扁平化嵌套列表迭代器 dfs,栈/ Medium
Construction and empirical research of post talent demand analysis framework based on recruitment advertisement
aac 和 h264等的时间戳
Win11壁纸变黑怎么办?Win11壁纸变黑了的解决方法
DVWA full level customs clearance tutorial
【STM32】EXTI
Is there a regular and safe account opening platform for gold speculation
Is it safe for Guosen Securities to open a mobile account? Is Zhongshan securities reliable
Timestamp of AAC, h264, etc
网络设备硬核技术内幕 路由器篇 20 DPDK (五)
炒黄金开户平台有没有正规,安全的
Txt replace line breaks with spaces or cancel line breaks
Hdu3117 Fibonacci numbers [mathematics]
Docker practical experience: deploy mysql8 master-slave replication on docker
FPGA timing constraint sharing 04_ Output delay constraint
internship:其他配置类的编写
Stm32f103c8t6 drives ssd1306 0.96 "IIC OLED display under Arduino frame
于不确定中见“安全感” 沃尔沃2022年中问道
自动化配置SSH免密登录和取消SSH免密配置脚本