yashsingh1/xdaforums huggingface dataset:
[Android Software Development] wcoast:
Thanks bro, I deleted apktool/framework/1.apk and upon re-installing framework again I got below

C:\apktools>cmd
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\apktools>
C:\apktools>java -jar apktool.jar if framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x010800ce drawable/background_holo_dark, config=-nodpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:201)

at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:11
0)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource
s.java:562)
at brut.androlib.Androlib.installFramework(Androlib.java:473)
at brut.apktool.Main.cmdInstallFramework(Main.java:250)
at brut.apktool.Main.main(Main.java:81)

C:\apktools>
[Android Software Development] iBotPeaches:
O duplicate resources. I misread the error first time. I'm obviously too tired right now to be responding to anything. I'll just grab CM10.1 tomorrow and look into it. CM shouldn't be given duplicate resource errors.
[Android Software Development] wcoast:
Thanks a lot mate
[Android Software Development] :
I'm trying to apply the CRT animation ( Link ). I have FrameworkFlasher is not working for me, if gives an echo off error when recompiling. Instead I have manually pulled framework-res.apk (and systemUI.apk) with ADB and decompiled it with apktool. I then changed the line in bools.xml from 'false' to 'true and recompiled it with apktool. I merged the new framework-res with the old one (resources.arsc, where the values reside). That goes well.

The problems start when I try to push framework-res.apk with ADB. I need to have /system/ set as rw and I have to give framework-res.apk on the phone all permissions with ES file explorer in order to push. Otherwise ADB gives errors like 'Read only file system' or 'permission denied'.

When I have pushed the moddified framework-res.apk with ADB, the phone reboots but gets stuck on booting on the ASUS logo (loading logo is turning but it hangs).

I now have to restore my ROM with CWRM for the second time. I thought I would start with something easy (before moving on to transpart statusbar and battery icons) like the CRT mod but that doesn't even work.

Any advice?
[Android Software Development] djmatt604:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

Try swapping in the signatures and AndroidManifest from the original apk file and then re-push the framework.

Sent from my 4.2.GSII
[Android Software Development] :
Thank you for your answer!

So after I modded the framework apk, I'll put AndroidManifest from the unmodded apk in the modded one. But which files do I need to swap for the signatures of the unmodded apk?
[Android Software Development] plegdroid:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

another way.

in your apktool folder you'll have a folder called build, in your case, take the arsc from that folder, delete the arsc from the original apk,and replace with the arsc from the build folder. your only then having to replace the file you've modded.

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] RomWiz:
Sv: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

Bump?
[Android Software Development] wcoast:
Link is CM framework with this issue should you need it mate

CM10.1 framework from RootBox Nighties

---------- Post added at 04:14 AM ---------- Previous post was at 04:01 AM ----------

Did you add META-INF and AndroidManifest.xml to build/apk folder before recompile
[Android Software Development] djmatt604:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

In addition to what plegdroid said, if you do it how I suggested earlier, you basically want the entire META-INF folder from the original apk. That plus AndroidManifest usually does it.

Sent from my 4.2.GSII
[Android Software Development] RomWiz:
Sv: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

I'll try that :)
[Android Software Development] :
Got it working, thanks guys!
[Android Software Development] :
Another problem:

I can decompile SystemUI.apk but when I recompile it (without any changes to it) apktool gives this error:

Microsoft Windows [versie 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Alle rechten voorbehouden.

C:\Users\René>cd /android/apktool

C:\Android\apktool>apktool b SystemUI SystemUI
I: Checking whether sources has changed...
I: Checking whether resources has changed...
I: Building apk file...
ERROR: output file 'C:\Android\apktool\SystemUI' exists but is not regular file
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 16, --target-sdk-ver
sion, 16, -F, C:\Android\apktool\SystemUI, -0, arsc, -A, C:\Android\apktool\Syst
emUI\assets, C:\Android\apktool\SystemUI\build\apk]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:357)
at brut.androlib.Androlib.buildApk(Androlib.java:455)
at brut.androlib.Androlib.build(Androlib.java:209)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 16, --target-sdk-version, 16, -F, C:\Android\apktool\SystemUI, -0, ar
sc, -A, C:\Android\apktool\SystemUI\assets, C:\Android\apktool\SystemUI\build\ap
k]
at brut.util.OS.exec(OS.java:89)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:355)
... 5 more

C:\Android\apktool>

I've used "apktool if framework-res.apk" and "apktool if SystemUI.apk".

What can be the cause of this?

Thank you in advance!:)
[Android Software Development] asrock37:
No need to install SystemUI, just the framework-res

and in compiling it should be like this

apktool b SystemUI SystemUI.apk

or

apktool b SystemUI NewSystemUI.apk
[Android Software Development] plegdroid:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

apktool b SystemUI newSystemUI.apk

you missed the apk extension :)

I got beat to It :D

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] :
Thanks guys!

I read somewhere that SystemUI needs to be compiled without the apk extentsion in the command. I guess they were wrong. Anyway, pretty noobish...
[Android Software Development] plegdroid:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

the first part compiles the systemui folder the second tells it to output it as a apk file :)

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] CosmicDan:
The target APK parameter is entirely optional. It will be placed in SystemUI/dist/SystemUI.apk by default.
[Android Software Development] ssojyeti2:
I've been getting the same error on rootbox 4.2.2 for evo lte

Thanks!
[Android Software Development] djdarkknight96:
Ok I usually don't post issues here because I usually find the problem and fix it myself but this one has me boggled. I'm trying to theme Google currents but it says Parsing error on install. I tried to just decompile and compile the original apk without any edits but get the same result...so I swapped out the manifest, classes.dex into the original stock untouched apk..signed it and it installs BUT if I swap out the resources.arsc I compiled "without editing anything" to the untouched stock, I get the error again. Comparing the files properties on stock it has 37 folders and 733 files - the compiled has 31 folders and 728 files inside the resources.arsc. This is the only difference I can find that might be causing the issue on decompile or compile.

APK's:

Currents.apk-Compiled only

Currents Stock

Hopefully someone has a fix for this or can tell me where to look..

Thanks!!

DJ
[Android Software Development] srsdani:
C:\apktool>apktool d systemui.apk systemui
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\srsdani\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x
01080647
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x
01080647
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x
01080648
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01040553
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:62)
at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46
)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlValueExt(ResScalarValue.java:
86)
at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlValue(ResScalarValue.java:55)

at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlItemValue(ResScalarValue.java
:48)
at brut.androlib.res.data.value.ResArrayValue.serializeToResValuesXml(ResArrayValue.java:6
1)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:440)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:243)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)

Little help... Everything works to decompile, except systemui.apk

Thanks.:)
[Android Software Development] Bejda:
About this I guess the multiple resources issue coming back is maybe due to this new feature http://slimroms.net/index.php/news/275-trds

The way it works apk's are build with inverted folders within,that makes the app switchable to inverted display and so is the framework above.

It seems the error always involve background_holo_dark and progress_horizontal and there's a drawable-inverted folder with background_holo_dark.xml and progress_horizontal.xml in those kind of switch-ready framework's.
[Android Software Development] iBotPeaches:
Yeah adding a new qualifier isn't fun. I don't know where I should stand with this. I can't keep adding 3rd party qualifiers into Apktool, because eventually they will start conflicting and start causing problems. I need to sleep on this and think of something.
[Android Software Development] vijendrahs:
For such third party qualifiers it would be better to keep a separate patch in this forum and don't publish it.
[Android Software Development] iBotPeaches:
I agree. For one, this SlimROM change was purely incremental and added simply 1 to the previous ID. They should choose a higher number like 20+ so that no future AOSP commits would get near it. However, they didn't. For all we know the next version of Android will have a new qualifier with an ID of 7. This would create major problems, a lot more for their ROM then Apktool but same rules apply.

For this reason, I'm not merging these changes in. I might release a patched apktool for it, but I'm not rushing to do that. Changes like this require their own aapt and apktool. In Apktool 2.0, aapt is built in, but currently it is not. So supporting 2 separate builds of Apktool and aapt would be difficult.
[Android Software Development] djmatt604:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

Try installing tw-frameworkres.apk in addition to framework-res.apk.

Sent from my Infamous Tab.
[Android Software Development] zelendel:
Your problem lies here

W: Cant find 9patch chunk in file: "drawable-xhdpi/tw_quick_panel_quick_setting_ button_bg_normal.9.png". Renaming it to *.png.

Track this png down and fix the .9 patch and then recompile
[Android Software Development] kufikugel:
Hey,

yes and no....from rom side to be honest it is not a major problem to push it again one up on next AOSP api update if needed. Custom roms are permanently work in progress and are doing exactly that....customize AOSP. Whatever....but your idea just to use a higher value for the qualifier is indeed simple and logical :D I just did not thought about it....especially on such things like apktool which would be easier.

A lot roms kanged this feature already so that the do not need to do still inverted gapps. We already have compiled our own apktool on you awesome work. It is not a big change as you know.

We merged today the change into our gitHub to push the qualifier from 6 too 69. Should be far enough. So if you like you can add it into apktool. If not we would be happy that we can take you code as base and we provide a seperat apktool for this feature.

As you like.

Please keep up the good work!! and thanks again for this idea

cheers

Lars
[Android Software Development] aikons:
Oh, can you share the apktool that can decompile the new rom that merged the "dark slim"?

I just want to add some translation to some ROM.

Thx!!
[Android Software Development] iBotPeaches:
If you could make a pull request with only the changes to aapt to my android_frameworks_base that would speed things up. https://github.com/iBotPeaches/android_frameworks_base , I don't imagine the Apktool changes being more than 2-3 lines but you can also make a pull request against my master branch of Apktool for that.

I would of just cherry-picked your changes, but you changed a lot more in the commits than just aapt and I try and keep that repo with only changes to AAPT. Kudos :)
[Android Software Development] bgcngm:
Hey iBotPeaches, did you see my post? Is your solution similar to mine?
[Android Software Development] iBotPeaches:
My solution is a fixed Apktool. I just don't know if it worked yet, but yes I did get your post and download the APKs.
[Android Software Development] abo hani:
problem in apktool
[Android Software Development] plegdroid:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

there just warnings, not errors. if its built the apk, it should be good. :)

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] :
Help

hi guys i try to recompile phone.apk but i have errors like this

note:-I remove the .apk extention on the cmd-
[Android Software Development] abo hani:
no decompile apk and this will show every time

tried different apps and same problem and didn’t find dist folder
[Android Software Development] plegdroid:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

sorry my bad.need to sleep :) take it your using the latest apktool, and aapt from the OP? :)

could you also post any errors, before or after the warnings you posted, makes it easier. :)

are you using some kind of scripting tool also, other than command prompt?

ⓐⓝⓓⓡⓞⓢⓘⓓⓔ ⓘⓢ ⓝⓞⓣ ⓐ ⓢⓘⓝ
[Android Software Development] iBotPeaches:
As Apktool 2.0 comes in closer (We are still talking 2-3 months here). I need some help from people who

1) Use Apktool on Windows and are around Android a lot, and preferably online frequently and can respond to emails within 24-48 hours.

2) Same ^ except with Mac OS X.

(Probably would be a few emails here and there just making sure all is working on those OSes). I do have Windows so I could probably do the Windows and Linux testing, but I'd rather have one person for each OS (me on unix).

I've setup a system which allows me to build aapt binaries for Windows, Mac and Linux very quickly. Mainly just a bunch of bash scripts, but nonetheless it works, since aapt plays a crucial role in Apktool 2.0. It needs to be tested, which I unfortunately don't have the time to develop and extensively test.
[Android Software Development] djmatt604:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

I have some projects in mind where apktool will come in handy over the next several weeks. Feel free to drop me a line if I can help, I do apk mods in a Win7 enviro. Would be happy to test against some specific use cases and help where I can. :)

Sent from my 4.2.GSII
[Android Software Development] abo hani:
before it Decompile apk and after it shows this warning but Decompile apk not completed because of that

nothing just command prompt

sorry for my bad english
[Android Software Development] mgbotoe:
for some reason I the smali folder is not decompile when I decomple the secapk...anyone else is having this issue?
[Android Software Development] Jamison904:
Re: [UTIL][Feb 02 2013] Apktool v1.5.2 - a tool for reverse engineering apk files

Try apktool if framework-res.apk and apktool if twframework-res.apk ( make sure you have these two apk's in the folder you are working out of.) Now try to decompile the Sec apk again. Also which one is it? There are a few giving us some issues over in the S3 section. (Like the SecPhone.apk)

Also assuming Linux here.

Sent from my dark hole called an office.
[Android Software Development] mgbotoe:
Everything infact because I tried to see if it was just one (original was mms)...smali folder simply does not show up and I am trying through windows 7

It states I need the proper framework...but I already grabbed the framwork from my folder...so im not sure what gives
[Android Software Development] jmbillings:
I'm sure this is known, but I'm testing out some APKs from my HTC One (Sense 5). Decompiling gives me some messages that actually come from the resources - let me know if there's anything I can do to help out!

C:\Users\jamesb\Downloads\apktool-install-windows-r05-ibot>apktool d Weather.apk

I: Loading resource table...
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected. Dropping resources: dimen-xhdpi-ERR0
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected. Dropping resources: dimen-xhdpi-ERR1
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected. Dropping resources: dimen-xhdpi-ERR2
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected. Dropping resources: dimen-xxhdpi-ERR3
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected. Dropping resources: dimen-xxhdpi-ERR4
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected. Dropping resources: dimen-xxhdpi-ERR5
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\jamesb\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\jamesb\apktool\framework\2.apk
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-hdpi-ERR6
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-hdpi-ERR7
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-hdpi-ERR8
W: Config flags size > 36. Exceeding bytes: 0x6000000.
W: Invalid config flags detected: dimen-hdpi-ERR9
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: dimen-xhdpi-ERR10
W: Config flags size > 36. Exceeding bytes: 0x4000000.
W: Invalid config flags detected: dimen-xhdpi-ERR11
W: Config flags size > 36. Exceeding bytes: 0x5000000.
W: Invalid config flags detected: dimen-xhdpi-ERR12
[Android Software Development] creeve4:
Deleted, figured it out
[Android Software Development] bgcngm:
You seem to be confusing apktool with baksmali/smali. If your goal is to edit .jar files you should be using baksmali/smali instead.
[Android Software Development] iBotPeaches:
If you want a finer level of control, yes your are correct, but Apktool does handles jar(s) just fine.
[Android Software Development] kufikugel:
Hey

so sorry had so much work last weeks.....I pushed today a pull request to your github @inverted qualifier

If I can do something just shout

cheers and thanks

Lars :)
[Android Software Development] iBotPeaches:
Its been merged in both parts (apktool and frameworks/base). Currently my system is building aapt for all 3 operating systems (since 2.0 has aapt built in). If you need this fix, building master branch will yield the change. Its also been cherry-picked into 2.0 which might see a public release in about 2 months.
[Android Software Development] adulfo:
Can somebody help me with this?

Thanks...
[Android Software Development] raziel23x:
You have white spaces in your directories which causes errors
[Android Software Development] adulfo:
That could be it.. I will try.. But I have modded using this directory for a few months... Just this one apk.. This is actually a JB Conversations.apk...

Edit: Sorry for bothering, I found the solution by installing the framework-res from Xperia Z.. Thanks btw...
[Android Software Development] raziel23x:
I am looking foreword to the 2.0 release
[Android Software Development] djmatt604:
+1.

Sent from my Infamous Tab.
[Android Software Development] varun.chitre15:
@iBotPeaches

Why exactly APKTool adds dummy public identifiers in public.xml?

e.g: <public type="array" name="APKTOOL_DUMMY_002a" id="0x7f07002a" />

Is it safe to remove them and the target resources ?

i.e the above line and the array in array.xml that is

<item type="array" name="APKTOOL_DUMMY_002a">false</item>
[Android Software Development] iBotPeaches:
Its a feature that helps prevent broken apk's. Example. run "aapt dump resources name_of_that.apk", there will be at least one line that says

"INVALID TYPE CONFIG FOR RESOURCE 0x7f02002a"

If aapt doesn't understand the resource, then neither can Apktool. So to prevent a gapping hole in the resource table, it inserts its own dummy one using that resource id.