有没有办法从apk file
中读取strings.xml
文件
我对库或类/代码文件不感兴趣,只对strings.xml
中定义的字符串感兴趣
发布于 2012-07-21 17:42:29
可以,您可以使用apktool
提取所有资源文件
步骤-
1.) Download files from above links and extract them in a folder.
2.) Open cmd -> run
3.) Run command as
apktool.bat d source.apk destination_path
或
1.) Put apktool.jar and test.apk in same folder
2.) Go to the jar and .apk path by command line
3.) And fire the command java -jar apktool.jar d test.apk
4.) It will generate a folder with the name "test" in the same folder.
发布于 2012-07-21 17:42:17
下载android-apktool (如果需要,还可以下载依赖项),将所有内容解压缩到同一目录中并运行apktool d application.apk
发布于 2016-02-11 06:15:09
除了apktool
之外,另一个选项是aapt
,但它不会以原始的XML形式重现字符串。
$ aapt dump --values resources app.apk |
grep '^ *resource.*:string/' --after-context=1
resource 0x7f04011a com.example:string/hello: t=0x03 d=0x0000039e (s=0x0008 r=0x00)
(string8) "Hello"
...
https://stackoverflow.com/questions/11591044
复制相似问题