设为首页 收藏本站
查看: 1067|回复: 0

[经验分享] 反编译华为U8825D“framework-res.apk”出现的错误提示(2)

[复制链接]

尚未签到

发表于 2018-7-26 09:00:14 | 显示全部楼层 |阅读模式
  Microsoft Windows XP [版本 5.1.2600]
  
(C) 版权所有 1985-2001 Microsoft Corp.
  C:\apk>apktool if f.apk

  
W: Config flags>  
W: Invalid config flags detected: string-ERR0

  
W: Config flags>  
W: Invalid config flags detected: string-ERR1

  
W: Config flags>  
W: Invalid config flags detected: string-ERR2

  
W: Config flags>  
W: Invalid config flags detected: string-zh-rHK-ERR3

  
W: Config flags>  
W: Invalid config flags detected: string-zh-rHK-ERR4

  
W: Config flags>  
W: Invalid config flags detected: string-zh-rHK-ERR5

  
W: Config flags>  
W: Invalid config flags detected: string-zh-rCN-ERR6

  
W: Config flags>  
W: Invalid config flags detected: string-zh-rCN-ERR7

  
W: Config flags>  
W: Invalid config flags detected: string-zh-rCN-ERR8

  
W: Config flags>  
W: Invalid config flags detected: string-zh-rTW-ERR9

  
W: Config flags>  
W: Invalid config flags detected: string-zh-rTW-ERR10

  
W: Config flags>  
W: Invalid config flags detected: string-zh-rTW-ERR11

  
W: Config flags>  
W: Invalid config flags detected: plurals-ERR12

  
W: Config flags>  
W: Invalid config flags detected: plurals-ERR13

  
W: Config flags>  
W: Invalid config flags detected: plurals-ERR14

  
W: Config flags>  
W: Invalid config flags detected: plurals-zh-rHK-ERR15

  
W: Config flags>  
W: Invalid config flags detected: plurals-zh-rHK-ERR16

  
W: Config flags>  
W: Invalid config flags detected: plurals-zh-rHK-ERR17

  
W: Config flags>  
W: Invalid config flags detected: plurals-zh-rCN-ERR18

  
W: Config flags>  
W: Invalid config flags detected: plurals-zh-rCN-ERR19

  
W: Config flags>  
W: Invalid config flags detected: plurals-zh-rCN-ERR20

  
W: Config flags>  
W: Invalid config flags detected: plurals-zh-rTW-ERR21

  
W: Config flags>  
W: Invalid config flags detected: plurals-zh-rTW-ERR22

  
W: Config flags>  
W: Invalid config flags detected: plurals-zh-rTW-ERR23
  
I: Framework installed to: C:\Documents and Settings\Administrator\apktool\frame
  
work\1.apk
  C:\apk>
  -----------------------------------------------------------------
  apktool作者Brut.alll的2处解释
  Issue 195:    Status: Fixed
  Add support for API level 13 (Android 3.2) resources   Jul 13, 2011
  http://code.google.com/p/android-apktool/issues/detail?id=195
  

There are some new qualifiers introduced in API Level 13. If you look into framework-res.apk you'll find layout-sw600dp and layout-w600dp dirs.   

Even if you decode them, you won't be able to build apk back, because we don't have aapt with support for new resources.  Actually apktool does what it should - it removes these resources, so you are able to build apk back and resulting apk should be nearly>  

  

大概的意思是aapt不能支持新api中出现的资源,这些资源将被丢弃,编译后会尽量接近原版。作者也做不了什么除非google能给出新的SDK工具,所以无视这些提示吧。  

  

  Issue 128:        
  
Add support for non-standard res-qualifiers  Jan 21, 2011
  http://code.google.com/p/android-apktool/issues/detail?id=128
  Some framework-res.apk files contains unknown, non-standard resource qualifiers. It's not possible to support them while retaining my assumption that decoded apk is normal Android project. Original SDK can't build such an app, I think some manufacturers use modified versions of SDK to accomplish that.
  

  
We could store non-standard res-qualifiers in a binary form while decoding and use them when building. We could do this in following ways:
  

  
  * create our own build system (aapt) - but that wouldn't be easy.

  
  *>  

  
For now it's not possible to rebuild such apk fully. Apktool automatically removes unknown resources when decoding to make app valid - in most cases you should be able to rebuild it and if you're lucky, it will work almost normally. If not, you could try to decode apk with --keep-broken-res switch - then you won't be able to build it, but you will see "broken" resources and you could try to fix them manually.
  

  

  Comment 1 by project member Brut.alll, Jan 21, 2011
  

Let's take for example framework from this post: http://forum.xda-developers.com/showthread.php?p=10764510#post10764510  

  
We try to decode it, we get warnings about broken arrays - apktool removes these arrays. Then we try to build it back, but we get error:
  

"entry index is larger than available symbols". So we decode apk again, but with --keep-broken-res switch - we get app with invalid values-ERR* directories.   

We look into these dirs and see there is array/default_locales resource declared. If we look into default arrays (values/arrays.xml)   

we'll see there is no default_locales there - this is the reason, why we can't build apk after apktool has removed broken arrays.Fix is simple: we have to add   

default_locales to values/arrays.xml. What is proper value for this res? We don't know. There are 4 different values in values-ERR* dirs, but we don't know,   

what exactly they mean. We could try to add empty array, array with one of values-ERR* values or merge all of them. Also we could try to find out what is this default_locales   

resource - then we'll be able to set proper value.   

  

  

  Issue 80:        
  
Better generation of public.xml file.
  Reported by project member Brut.alll, Jul 28, 2010
  

We could scan application code for res>  

as "maybe they are in the code" - similarly to current solution.If you decode apk without>  

so it will treat all resources as "others" group - they will be commented out. But there should be a switch to treat them as "maybe they are in the code" group.    

  Issue 113:        
  
Problems while compile framework files
  

I was having similar problems compiling a SKIN I modified. It was giving public.xml element not defined errors.  Well, my friends, you're about to benifit from 20hrs of debugging and messing around... :)   I ended up finding the source of the error after having set up Eclipse and the Android SDK and learned how to use them.  - It has nothing to do with apktools - it's purely operator error.  - In my case, the .9.png were miss drawn. The guides that go around the transparent frames (the ones that define the stretchable and text areas) were not perfectly black (take color picker in GIMP and if it doesn't register as 000000, you need to fix it). This was throwing aapt into giving me public.xml undefined errors.  - If you add an element in public.xml but don't put the right>  

  http://bbs.myoppo.com/forum.php?mod=viewthread&tid=777721
  这里有段apktool现任维护者和oppo某版主的鸡同鸭讲,很搞笑

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-541417-1-1.html 上篇帖子: 华为ENSP模拟器,启动AR/WLAN设备时,提示“…错误代码40…” 下篇帖子: 华为S9300、s5700交换机端口镜像配置
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表