After you add a resource file under Framework/base/core/res/res, you need to compile the resource and then compile the framework to reference it properly.
Go to Project root CD frameworks/base/core/res/execute mm command (native or Qualcomm), compile framework-res.apk
Or./mk mm Frameworks/base/core/res (MTK varies depending on the platform compilation command)
A reference to the resource is generated when the COM.ANDROID.INTERNAL.R is compiled.
Execute mm compile Framework.jar (native or Qualcomm) under directory frameworks/base/
Or./mk mm Frameworks/base (MTK varies depending on the platform compilation command)
If there are changes under Frameworks/base/services, you also need to compile
frameworks/base/services/java/Execute mm Compilation Services.jar
Or./mk mm Frameworks/base/services/java
Execute the following command
ADB remount
ADB push framework-res.apk/system/framework/
ADB push framework.jar/system/framework/
ADB push services.jar/system/framework/(if modified)
Some systems also generate Secondary_framework.jar after the framework has been compiled
also push.
After push is complete, you can enter the directory by CD System/framework
Then ll two a lowercase l command to confirm whether the push succeeded
ADB reboot restart the device.
How to compile a resource file after Android modifies the framework