adb shell cmd overlay调试命令方便查看系统framework字符资源值

cmd overlay调试命令方便查看系统framework字符资源值

由于有overlay的存在,有可能字符资源被overlay了,

所以,之前调试framework中的字符资源的值实际上是多少时,

都是使用 apktool进行反编译调试。今天发现cmd overlay命令更方便一些。

apktool d -f framework-res.apk -o out

格式为:apktool d [-s] -f -o ,参数具体的意思可以直接打apktool回车(windows)查看帮助

$ cmd overlay --help

lookup [–verbose] PACKAGE-TO-LOAD PACKAGE:TYPE/NAME
Load a package and print the value of a given resource
applying the current configuration and enabled overlays.
For a more fine-grained alernative, use ‘idmap2 lookup’.

例子:

$ cmd overlay lookup android android:integer/config_screenBrightnessSettingMaximum
255

$ cmd overlay lookup android android:integer/config_screenBrightnessSettingMinimum

$ cmd overlay lookup android android:integer/config_screenBrightnessSettingDefault

$ cmd overlay lookup android android:dimen/config_screenBrightnessSettingMinimumFloat

$ cmd overlay lookup android android:dimen/config_screenBrightnessSettingMaximumFloat

$ cmd overlay lookup android android:dimen/config_screenBrightnessSettingDefaultFloat

其他Package,例如Bluetooth:
$ cmd overlay lookup com.android.bluetooth com.android.bluetooth:bool/profile_supported_a2dp_sink
true

你可能感兴趣的:(Android,Android,Framework,android,android,studio)