yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] Hatman41:
Ok so I tried xdaautotool to recompile honeycomb 3.2 and get the following errors

-----------------------------------------------------
[*] framework-res.apk
-----------------------------------------------------
Recompiling framework-res.apk folder...
W: Could not find sources
I: Building resources...
invalid resource directory name: D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\res/layout-sw600dp
invalid resource directory name: D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\res/layout-w600dp-v13
invalid resource directory name: D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-h720dp-v13
invalid resource directory name: D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-sw600dp
invalid resource directory name: D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-w1280dp-v13
invalid resource directory name: D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\res/values-w720dp-v13
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Jeffrey\AppData\Local\Temp\APKTOOL997206524284175884.tmp, -x, -S, D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\res, -M, D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)
at brut.androlib.Androlib.buildResources(Androlib.java:248)
at brut.androlib.Androlib.build(Androlib.java:171)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:174)
at brut.apktool.Main.main(Main.java:59)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\Jeffrey\AppData\Local\Temp\APKTOOL997206524284175884.tmp, -x, -S, D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\res, -M, D:\android-sdk-windows\tools\xdaAutoTool\_INPUT_APK\framework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
Done!

Now I was told that it was because the aapt was not v13. I have updated it in the bin folder as well as the fixed apktool and still get this error. Now when I put those files into it's own dir and recompile it works fine. So it has to be something with the xdaautool. I have attached the updated aapt and apktool.jar
[Desire Android Development] Hatman41:
So I tried autoapktool and I was trying to sign apk's...it said that it signed it..but when I opened it up with winrar it does not show signed. I know that when I used apkmanager and when I signed it from there it showed that it has been signed. Also can I use XDAAutotool to sign apk's? Can I do a batch sign?
[Desire Android Development] xavierjohn22:
Fyi, line error is 312 per your posted error.

Just after. Xml it will specify which line.
[Desire Android Development] xavierjohn22:
If you can install non system apk signed then its signed.

Batch sign not yet implemented.
[Desire Android Development] 1982Strand:
Yes, it does say line 312, but that's the last line in the xml, that's what confused me, also as that tag was correct :)

It turned out that one of the other strings had a bad ending tag, like this: /string>, missing the first "<". Somewhere around line 150 or so, hehe..
[Desire Android Development] xavierjohn22:
Ah okay.

Fyi these bad tags can easily be caught with notepad ++, it usually will break the resources tag with a plus sign on where there is an error.

Internet explorer can also show broken tags.
[Desire Android Development] WormDoes:
I can't get auto apk tool to recognize my framework-res.apk to save my life. I've put it and numerous other fw-res just to test and the tool never sees my f/w. Any ideas?
[Desire Android Development] xavierjohn22:
Folder path, is there a space in the path of autoapktool?

Just try in c:/autoapktool

Then put framework apk in input folder as usual

ot,

By the way i think theres already option 13 in the latest version, dont know if i have uploaded it
[Desire Android Development] WormDoes:
I haven't setup apk tool to run from command. I open autoapktoolmain.bat up each time I want to use it. A buddy of mine has done the same, with the same version of apk tool and used my framework and he has no issues with it :confused:
[Desire Android Development] 3rdstring:
xavierjohn is saying that the path to where autoapktool is can't have a space in it. Try moving the autoapktool folder to the root of your c: drive e.g. c:\autoapktool
[Desire Android Development] WormDoes:
Oh, I misunderstood what he meant. Thank you for clearing that up. I will try that

edit: still isn't working. i'm not sure what the problem is. here's a screen shot
[Desire Android Development] xavierjohn22:
I cant see tha path? is that only C:/_INPUT_APK?

Where's the whole folder?
[Desire Android Development] WormDoes:
Yea, it's on the root of my c:/ drive. my c:/ looks exactly as your with the files and such, I just haven't extracted the autoapktool2.0.0.rar. I have tried numerous ROM fw-res.apk in the apk_input folder and none work
[Desire Android Development] xavierjohn22:
That is so wrong man, the script will really error out

The autoapktool is a RAR File containing all the structures and the scripts,

It should be extracted into a folder

C:\autoapktool as i have demonstrated

And all folder structures and files will be inside it

Then inside C:\autoapktool too is the _INPUT_APK folder and the rest of the folder

And inside C:\autoapktool is the main batch file
[Desire Android Development] WormDoes:
I apologize, I didn't fully understand how to install and thought keeping it in rar form was fine :o I thank you for the help. I have it setup like you said and my framework installed just fine :)
[Desire Android Development] xavierjohn22:
okay no problem dude
[Desire Android Development] xavierjohn22:
Deodex framework first so you isolate provlem

Put all framework odex file and jar in source framework,

Choose custom deodex framework

Key in bootclass

Post error here.
[Desire Android Development] steal25:
will do, ill be back.
[Desire Android Development] steal25:
Heres the suplog for deodexing just the framework. Again i appreciate your help.

http://dl.dropbox.com/u/28511905/suplog.log
[Desire Android Development] xavierjohn22:
Is com.htc.resources.apk also in source framework?

Something is wrong with the bootclass files and the files may not be complete. You sure the strings you entered are correct? And custom bootclass string is right?
[Desire Android Development] Hatman41:
XDA Autotool. I updated the aapt and apktook.jar to the new version for Honeycomb 3.2..I am having an issue with email.apk. I decompile it fine. Then I make no changes at all and just recompile and get these errors. http://pastebin.com/TMK41rR2 not sure if it is a problem with the apktool or not. I also have a problem with systemui.apk. I recompile it and it recompiles with no errors but when I flash it...it does not show up in the theme or ROM. I have to reflash the ROM to get the status bar to show up.
[Desire Android Development] xavierjohn22:
gunther has same issue before, i am not sure how he get around it, i think it has something to do with installing the resources for honeycomb as well, lets wait for his reply. i've never decompiled a honeycomb apk, lol
[Desire Android Development] Gunthermic:
On my ROM, we had to zipalign apk to get status bar to show up. I always, always create a standard flashable that has systemui, framework, com.HTC.resources on SD card so I don't have to reflash ROM.

I had some issues with mail.apk, vending.apk.. there is a beta 1.4.2b of apktool that solved my problems on those, and believe it or not I had to use 1.3.1 as well. Makes no sense but for me, I replaced(renamed) 1.3.2 and made 1.4.2b into 1.3.2 instead. 1.3.2 had to many problems.
[Desire Android Development] exorcist26:
:( what I'm doing wrong. Please help me.
[Desire Android Development] xavierjohn22:
Can you remove that folder path in program files and just place it in c drive or somewhere without space
[Desire Android Development] exorcist26:
[*] C:\AutoAPKTool2.0.1\_INPUT_APK\Zeam_Launcher_v3.0.7
recompiling C:\AutoAPKTool2.0.1\_INPUT_APK\Zeam_Launcher_v3.0.7...
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(Unknown Source)
at org.jf.smali.smaliFlexLexer.getSourceName(Unknown Source)
at org.antlr.runtime.CommonTokenStream.getSourceName(Unknown Source)
at org.antlr.runtime.tree.CommonTreeNodeStream.getSourceName(Unknown Source)
at org.antlr.runtime.tree.TreeParser.getSourceName(Unknown Source)
at org.jf.smali.smaliTreeWalker.getErrorHeader(Unknown Source)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(Unknown Source)
at org.antlr.runtime.BaseRecognizer.reportError(Unknown Source)
at org.jf.smali.smaliTreeWalker.smali_file(Unknown Source)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
at brut.androlib.Androlib.buildSources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)

ım copy folder c: ; but give same error :(
[Desire Android Development] xavierjohn22:
have you tried recompiling that manually with your apktool version using your framework files?
[Desire Android Development] exorcist26:
C:\AutoAPKTool2.0.1>apktool d Zeam_Launcher_v3.0.7.apk
Unable to access jarfile C:\AutoAPKTool2.0.1\

ım not know give a path ı path aapt and apktool.jar but again give this error. can you tell me which folder path. and sory my bad english :(
[Desire Android Development] exorcist26:
ok ı manually trying apktool and give me same unknown source mistake.

C:\Users\ertugrul>cd C:\APKTool and the Template

C:\APKTool and the Template>apktool d Zeam_Launcher_v3.0.7.apk
I: Baksmaling...
I: Loading resource table...
W: Skipping "android" package group
I: Decoding resources...
I: Loading resource table from file: C:\Users\ertugrul\apktool\framework\1.apk
I: Copying assets and libs...

C:\APKTool and the Template>apktool b Zeam_Launcher_v3.0.7
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(Unknown Source)
at org.jf.smali.smaliFlexLexer.getSourceName(Unknown Source)
at org.antlr.runtime.CommonTokenStream.getSourceName(Unknown Source)
at org.antlr.runtime.tree.CommonTreeNodeStream.getSourceName(Unknown Sou
rce)
at org.antlr.runtime.tree.TreeParser.getSourceName(Unknown Source)
at org.jf.smali.smaliTreeWalker.getErrorHeader(Unknown Source)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(Unknown Sour
ce)
at org.antlr.runtime.BaseRecognizer.reportError(Unknown Source)
at org.jf.smali.smaliTreeWalker.smali_file(Unknown Source)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.DexFileBuilder.addSmaliFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.buildFile(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.src.SmaliBuilder.build(Unknown Source)
at brut.androlib.Androlib.buildSourcesSmali(Unknown Source)
at brut.androlib.Androlib.buildSources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
[Desire Android Development] xavierjohn22:
The tool only automates recompiling and compiling, It does not solve error problems because of bad set-up.

You have to determine why you have errors manually first, do you have the right aapt and framework files?

Over at brut's thread are people who can help you out
[Desire Android Development] chudy34:
Im use xdaAutoTool. Decompile apk is good but when I recompile this apk in the log i see Done and 0 errors but file is no save on the disk. Whats is it?
[Desire Android Development] Kameo:
Sometimes it's on another sub folder, can't recall the name.

Just check the apk's date, you'll get the latest compiled one.
[Desire Android Development] xavierjohn22:
APK folder name

\dist

\build

if build usable

\_OUTPUT_APK
[Desire Android Development] -viperboy-:
I didn't see an explaination anywhere for this, but when you want to recompile and build all, for the build usable apk options, if all I did was remove some folders out of an app, do I need to have any of those checkboxes checked? All I did was decompile and remove some of the language folders. Thanks and great work on this!!
[Desire Android Development] xavierjohn22:
overwrite resource.arsc (yes, sometimes no if no smali related edits to apk)

overwrite classes.dex (yes)

copy added resources (no need)

overwrite custom res (no need)

zipalign apk (needed if apk needs to be aligned - not yet uploaded version 2.0.0)
[Desire Android Development] -viperboy-:
Thank you for your answer! Can't wait for 2.0.0!
[Desire Android Development] xavierjohn22:
LOL might be this weekend, Sunday

- i'm still testing the deodex bug first run if its gone already.

- And the zipalign features if it performs same as the commandline automation version
[Desire Android Development] Hatman41:
So It looks like Google did something to the new vending that just dropped. I am getting the following error while trying to decompile using the latest apktool.

-----------------------------------------------------
[*] Vending.apk
-----------------------------------------------------
Decompiling Vending.apk...
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Jeffrey\apktool\framework\1.apk
I: Loaded.
W: Could not decode attr value, using undecoded value instead: ns=android, name=hardwareAccelerated, value=0xffffffff
I: Decoding file-resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=showAsAction, value=0x00000006
W: Could not decode attr value, using undecoded value instead: ns=android, name=showAsAction, value=0x00000002
W: Could not decode attr value, using undecoded value instead: ns=android, name=actionViewClass, value=0x0000000c
Exception in thread "main" java.lang.NullPointerException
at java.io.Writer.write(Writer.java:140)
at brut.androlib.res.util.ExtMXSerializer.writeAttributeValue(ExtMXSerializer.java:38)
at org.xmlpull.mxp1_serializer.MXSerializer.attribute(MXSerializer.java:673)
at org.xmlpull.v1.wrapper.classic.XmlSerializerDelegate.attribute(XmlSerializerDelegate.java:106)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:46)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:86)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:132)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
Done!

I have attached the newest market.
[Desire Android Development] Hatman41:
I got it to decompile using the framework from http://xdaforums.com/show....php?t=1191936 I am guessing that this new market is for gingerbread.

D:\android-sdk-windows\tools\apktool.3.2>apktool d Vending.apk ./Vendingnew
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Jeffrey\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...

D:\android-sdk-windows\tools\apktool.3.2>
[Desire Android Development] xavierjohn22:
Cool

Thanks for the info

Sent from my phone, please bear with message brevity
[Desire Android Development] 1982Strand:
Interesting, but, err... I get a NOT FOUND error when clicking your link..?
[Desire Android Development] a user:
hello xj,

i have some big trouble with apktool and miui apks. i saw that your autotool uses several version of apktool.jar and thus i think your autotool uses them to solve my issue.

now it would be easy if i cuold simply use your tool but this actually is really an option because it is for windows.

but here my issue giving a simple example:

using apktool.jar 1.4.2 (the only one that seems to decompile and recompile any apk without errors that i found):

apktool d -s DeskClock.apk test

apktool b test outdir/DeskClock.apk

so i changed nothing in between de- and recompiling and i get no errors or warnings.

the recompiled apk gives force closes on adding an alarm while the original does not. for this reproducable example i used DeskClock.apk from miui 1.8.26 desire hd.

my intention is only to copy the language ressource from your desire pack to create a multilang pack for my desire hd rom (you already allowed me this ;) ).

any idea how to fix this without using windows?
[Desire Android Development] xavierjohn22:
Use 1.3.2 apktool

Sent from xda mobile app
[Desire Android Development] a user:
thank you very much!
[Desire Android Development] a user:
ok. decompiling works on all apks (needed for the multilang pack) but after i copied the translated ressource the compiling gives errors for some apks.

could i use a different apktool version to fix that for me or am i forced to fix the errors manually?
[Desire Android Development] xavierjohn22:
that depends on the errors, Is it string related?

apktool does not fix wrong values in strings.

Sent from xda mobile app
[Desire Android Development] a user:
yes. i think i found the issue:

http://stackoverflow.com/questions/4414389/android-xml-percent-symbol

it is related to %.

i am currently making a prog and script to automatically fix that. aynway, i thank your very much. at least i know now what's going on.
[Desire Android Development] a user:
sorry to bother you again but i don't know what to do anymore...

1. i wonder why using your multilang pack for the desire building fails on this. i mean the strings should be correct as you already did it or?

2. it seems some "%" needed to be escaped other need to be translated to positional variables (like %1$).

isn't there really something easier than using trial and error to fix all this again and hoping that no other issues appear during rom usage?

i mean whos fault is that the strings are not working? the auther of the translation but then this shoudl already have been fixed in your build. apktool then? i don't get it. this looks like a mystical mess to me.

sorry, but after fighting 2 days with this i am frustrated. if you can give me some help on this if you have the time that would be great. if not i understand it.

greetings,

a (tired) user.
[Desire Android Development] 1982Strand:
Use apktool 1.3.2

Try using an older aapt.exe, i had similar issues a while back, but had the newest version of the android-sdk. Going back a version did the trick for me :)

The multi-lang packs decompile/recompile fine here. It must be something on your end that cramps it.

Post your logs if you still have issues :)
[Desire Android Development] a user:
that could help. an older aapt as it is aapt that makes the trouble about non positional variables.

do you have a link or at least a version number to look for?

would some hassle to allways switch aapt because i am also developing some apps here on this machine, but better than nothing.
[Desire Android Development] a user:
haleluja... i found an aapt in apkmanager that seems to work.

not yet flashed the pack but at least it compiles now. thank you very much!

but it is quite annyoing to be forced using outdated apps/software to work on recent android roms -.-
[Desire Android Development] xavierjohn22:
Apktool 1.4.2 or 1.4.1 come alive because of honeycomb. Apktool is for general usr, you still have to figure out what it needs to work not just use it. 1.4.2 should work too with matching aapt for it. I ahvent jump into that since i havent tried it yet.

All those 1$s you posted does not make sense. those are important for the apk.

We dont do trial and error. We look at logcats. We compare strings. We translate. Thats it.

If you are just getting some strings from an apk to use it be sure you decompile it correctly. Its been working so its not the authors fault.

Anyways cheers that its ok.
[Desire Android Development] affmalg:
hi xj,

i'm compiling again :D

but using xdaAutoTool 2.0.0 i always get an error while building the apks, framework-res and SystemUi.

The suplog:

-----------------------------------------------------
[*] framework-res.apk
-----------------------------------------------------
Building usable framework-res.apk ...

7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Scanning

Updating archive D:\Daten\Downloads\Android\Programme\xdaAutoTool2\_OUTPUT_APK\framework-res.apk

Compressing resources.arsc

Everything is Ok

7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Scanning

D:\Daten\Downloads\Android\Programme\xdaAutoTool2\_INPUT_APK\framework-res\build\apk\classes.dex: WARNING: Das System kann die angegebene Datei nicht finden.

Updating archive D:\Daten\Downloads\Android\Programme\xdaAutoTool2\_OUTPUT_APK\framework-res.apk

WARNINGS for files:

D:\Daten\Downloads\Android\Programme\xdaAutoTool2\_INPUT_APK\framework-res\build\apk\classes.dex : Das System kann die angegebene Datei nicht finden.

----------------
WARNING: Cannot find 1 file

7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Scanning

Updating archive D:\Daten\Downloads\Android\Programme\xdaAutoTool2\_OUTPUT_APK\framework-res.apk

Everything is Ok

7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18

Processing archive: D:\Daten\Downloads\Android\Programme\xdaAutoTool2\_INPUT_APK\framework-res.apk

file D:\Daten\Downloads\Android\Programme\xdaAutoTool2\_TEMP\framework-res\META-INF\MANIFEST.MF
already exists. Overwrite with
META-INF\MANIFEST.MF?
(Y)es / (N)o / (A)lways / (S)kip all / A(u)to rename all / (Q)uit?

My procedure: Installing the framework. Decompiling then Recompiling and build apk.
[Desire Android Development] xavierjohn22:
Lol

Some of the errors are german. Is that german?

The framework res does not have classes.dex, that one is ok

Clear the _TEMP folder first, thats why theres error. The manifest is already existing and prompting to overwrite. Delete all inside it and do it again.
[Desire Android Development] affmalg:
Its german :) Do you speak some german?

Thx for your help, everything is working apart from that theres still no classes.dex... But aren't the values from the framework-res.apk coded in the classes.dex?

Edit: all of my framework-res.apk files have no classes.dex so the xdaAutoTool is just looking for it and don't find it.
[Desire Android Development] xavierjohn22:
That's fine I mentioned.

Resource.arsc are the values