首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >从apk文件中读取Strings.xml文件

从apk文件中读取Strings.xml文件
EN

Stack Overflow用户
提问于 2012-07-21 17:31:27
回答 3查看 23.8K关注 0票数 21

有没有办法从apk file中读取strings.xml文件

我对库或类/代码文件不感兴趣,只对strings.xml中定义的字符串感兴趣

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-07-21 17:42:29

可以,您可以使用apktool提取所有资源文件

步骤-

代码语言:javascript
复制
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

代码语言:javascript
复制
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.
票数 43
EN

Stack Overflow用户

发布于 2012-07-21 17:42:17

下载android-apktool (如果需要,还可以下载依赖项),将所有内容解压缩到同一目录中并运行apktool d application.apk

票数 7
EN

Stack Overflow用户

发布于 2016-02-11 06:15:09

除了apktool之外,另一个选项是aapt,但它不会以原始的XML形式重现字符串。

代码语言:javascript
复制
$ 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"
  ...
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11591044

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档