反编译华为U8825D“framework-res.apk”出现的错误提示(2)

Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.

C:\apk>apktool if f.apk
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: string-ERR0
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: string-ERR1
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: string-ERR2
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: string-zh-rHK-ERR3
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: string-zh-rHK-ERR4
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: string-zh-rHK-ERR5
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: string-zh-rCN-ERR6
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: string-zh-rCN-ERR7
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: string-zh-rCN-ERR8
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: string-zh-rTW-ERR9
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: string-zh-rTW-ERR10
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: string-zh-rTW-ERR11
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: plurals-ERR12
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: plurals-ERR13
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: plurals-ERR14
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: plurals-zh-rHK-ERR15
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: plurals-zh-rHK-ERR16
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: plurals-zh-rHK-ERR17
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: plurals-zh-rCN-ERR18
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: plurals-zh-rCN-ERR19
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
W: Invalid config flags detected: plurals-zh-rCN-ERR20
W: Config flags size > 36. Exceeding bytes: 0x11009C00.
W: Invalid config flags detected: plurals-zh-rTW-ERR21
W: Config flags size > 36. Exceeding bytes: 0x5C009C00.
W: Invalid config flags detected: plurals-zh-rTW-ERR22
W: Config flags size > 36. Exceeding bytes: 0xE7039C00.
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 identical to original one.  We can't do much about this until Google release new SDK tools and docs. Just ignore these warnings.
 
大概的意思是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.
  * alter resources.arsc after building by original aapt.

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 memberBrut.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 ids and then divide public.xml into 3 parts, preceded by comments for apktool users:    * real public resources - don't touch this!   * resources found in the code - you probably don't want to modify this.   * others - they are commented out by default, so you could remove resources without problems.  If you decode apk with -s switch, then maybe there should be a switch to generate public.xml fully (divide into above groups) or treat all non-public resources 
as "maybe they are in the code" - similarly to current solution.If you decode apk without classes.dex file, then by default apktool will assume, that it's pure-res, 
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 ID (ID larger then previous element but smaller then the following element) then you will get an error. - Any file you take out of the res folder and forget to put back in, will give you this error. - Any XML file that you edit badly and cannot compile, will give you this error.  

 

 

http://bbs.myoppo.com/forum.php?mod=viewthread&tid=777721

这里有段apktool现任维护者和oppo某版主的鸡同鸭讲,很搞笑。

你可能感兴趣的:(Android)