yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] xavierjohn22:
Confuse and wrong.

Remember that when you use 1.4.22 there are other strings that you will miss and might have been deleted.

You will have a hard time recompiling. Best is to compare 1.4.22 with 1.4.29 strings by:

Decompiling the new OTA 1.4.29 APKS

After decompiling you can compare the new strings generated in in the input folder, for Settings as example.

After decompiling all go to

\_INPUT_APK\Settings\res\values\strings.xml

You can compare that English Strings to your DA string in 1.4.22

you will see there are many changes so you cant use the 1.4.22 strings especially if they got deleted.

You will update your strings in values-da then to match what is in values strings.xml and translate it.

Then you will have a successful recompile and fully translated settings.apk

That is the work i do every week.

I added the new strings to your DA strings.xml

Then i copy that to values-da

Then recompile all the APKS
[Desire Android Development] xavierjohn22:
@1982strand

W/ResourceType( 2712): Bad XML block: header size 261 or total size 0 is larger than data size 0
C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\res\menu-da\media_context_menu.xml:14: error: Error: No resource found that matches the given name (at 'id' with value '@id/set_or_cancel_cover').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL8651035744520181830.tmp, -I, C:\Users\Administrator\apktool\framework\1.apk, -S, C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\res, -M, C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(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)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL8651035744520181830.tmp, -I, C:\Users\Administrator\apktool\framework\1.apk, -S, C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\res, -M, C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more

The Gallery has a change in the menu xml file

This one "\_INPUT_APK\Gallery\res\menu-da\media_context_menu.xml"

What you need to do.

After DEcompile of the Gallery

Go to that file, compare it with your 1.4.22 string, you will see that something has change, only the "rename" string needs to be change, use the newest xml and created your menu-da to put that new xml

In miuimusic

There's also a string difference

This error mean that music_picker item is not found anywhere in the APK public, no use for it.

I suggest compare the strings.xml in values over your values-da

recompiling MiuiMusic.apk...
I: Smaling...
I: Building resources...
aapt: warning: string 'music_picker' has no default translation in C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\MiuiMusic\res; found: de
I: Building apk file...

WHEnever you get errors of " has no default translation ", often you have use a string that is not needed

ALSO YOU CAN DECOMPILE AND RECOMPILE A SINGLE APK SO IT IS FASTER, ONLY THE APKS WITH ERRORS.
[Desire Android Development] Devildog8791:
Just when I started to have problems with APK Manager, you bring this tool out. It is a little different interface, but at least I'm able to decompile and recompile the apk's that I was having trouble with.

Will you be adding features like optimizing images and zipaligning in the future? If not, that's cool. It does what I can't get APK Manager to do anymore. Thanks.
[Desire Android Development] xavierjohn22:
I am adding features after i posted this for i am using it in MIUI translation, mass production, LOL, yeah that would come, the auto deodexer was also in my working folder now so they are all there, i just need to get confirmation with autodeodexer for i am modding some of the scripts, if ever i will post it.

but i could update with the optimizing, and zipalign

right now it has optimization MX3 level only on the flashable zip, so we build less file size updater.

it would not be that difficult to put those functions my friend. yes i'll update it once i am over the miui fever this weekend, every friday is like hell
[Desire Android Development] Devildog8791:
Okay, the first two apk's that I decompiled and recompiled worked fine. Now I am trying to invert the Dropbox app, but I am getting this error:

[*] C:\Users\Tim\AutoAPKTool1.0.2\_INPUT_APK\Dropbox.apk

decompiling C:\Users\Tim\AutoAPKTool1.0.2\_INPUT_APK\Dropbox.apk...

I: Baksmaling...

I: Loading resource table...

I: Decoding resources...

I: Loading resource table from file: G:\apktool\framework\1.apk

W: Could not decode attr value, using undecoded value instead: ns=android, name=hardwareAccelerated, value=0xffffffff

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010102d3

at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)

at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)

at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)

at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)

at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)

at brut.androlib.res.AndrolibResources.decode(Unknown Source)

at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)

at brut.androlib.ApkDecoder.decode(Unknown Source)

at brut.apktool.Main.cmdDecode(Unknown Source)

at brut.apktool.Main.main(Unknown Source)​

I was getting this with APK Manager, but I thought it was something to do with the program. Do you have any ideas? I am using Windows Home Premium-64 bit and APK Tool 1.3.1. I thought someone said the new .NET update was screwing things up, but I don't know.
[Desire Android Development] Devildog8791:
Sounds good, thanks.
[Desire Android Development] xavierjohn22:
You can try to switch to 1.3.2 with this tool or 1.3.1, have you tried decompiling the app in 1.3.2?

Also is this for GB or FROYO, aapt can be change from froyo to gingerbread, just need to put it in the same directory, later i'll add feature to switch too.

I got this from bruts thread with a user reply from me, here's where you get the files if switching from 1.3.1 to 1.3.2 did not help

FROYO

C:\android-sdk-windows\platforms\android-8\tools\aapt.exe

GB

C:\android-sdk-windows\platform-tools\aapt.exe
[Desire Android Development] Devildog8791:
Okay, I'll try that.
[Desire Android Development] Raffie75:
@XJ What is the fastest and most simple way to compare the deleted and added strings?

Do i have to walk thu all the strings to compare or is there an other way that is faster and easier to do?

Do i have to check the "bugfixlist" and open only the strings that are mentioned there?
[Desire Android Development] 1982Strand:
Don't know if it's the best/fastest way, but what i did was download a programm called Diffmerge (Google it) and then compared the latest english source we have (APP-EN_BASE_1.4.22_20110423.rar) with a decompiled version of newest en/zh rom upgrade.

This way i could "quickly" find changes/additions/removal of strings and then apply them to my language pack :)

But again, i'm also a newbie at this, so i'm not sure if this is the correct thing to do..
[Desire Android Development] Raffie75:
Thnx, will try that maybe it will work indeed...

Sound like it's working nice and fast so i will try it and wait if XJ has another way (better and or faster)

Thnx 1982Strand!
[Desire Android Development] xavierjohn22:
Yeah and on top of that if you have users like me who are chinese using english they want the Online Backup too, the PreferenceCloudBackup.smali

and ProgressResultActivity.smali also has those to be changed

\smali\com\miui\backup\ui\LocalBackupMain.smali

\smali\com\miui\milk\ui\PreferenceCloudBackup.smali

\smali\com\miui\milk\ui\ProgressResultActivity.smali
[Desire Android Development] 1982Strand:
Geez! and it's even posted on first page :) Sorry guys, i should have seen that, haha!
[Desire Android Development] Chaqmol:
I got a problem with decompiling an apk

what's wrong?what should i do?
[Desire Android Development] xavierjohn22:
Java version error. Consider reverting ro previous or java version if written in bruts thread. cant even see, mobile, lol, do you have the right framework?

Sent from Singapore
[Desire Android Development] xavierjohn22:
Here's the partial fullfillment on the autoAPKtool commandline automation version

===================================================================================

Version 1.0.8

===================================================================================

9:46 PM 7/7/2011

- Added option to toggle copying of apk from DIST folder of apktool gen directory

- Added zip align apks (generated apk from _OUT_APK to _OUT_APK_ZIPALIGN)

- Added setting of compression level

- Added Delete "folder name" of mod file text file

___If you have "Mod1" folder the file should be "Delete_Mod1.txt"

___Sample line in the text file is "AppShare\res\drawable-hdpi\installed.png"

___No need to specify the _INPUT_APK folder

___It will delete any file in that path once listed in the text file

- Fixed code jumping over optimization of pngs
[Desire Android Development] Kalashnikitty:
cool new toy... :) testing it right now for german 1.7.8 strings for your multi,..
[Desire Android Development] 1982Strand:
Don't know if i'm the only one getting this, but since 1.7.1, when decompiling settings.apk, i get a warning about the 9.png "miui_logo". It had bad 9-patch chunk, so is renamed to just .png.

I fixed the 9.png and made correct patches, then recompiled it, put it back in settings.apk overwriting the old one. Now it decompiles fine. Otherwise i would get tons of errors when recompiling also.

I attached the fixed 9.png if anyone has same problem.

Btw, XJ, the new zipalign option in 1.0.8 tool, can you explain what that does? And does it make any difference using the apks from OUT_APK_ZIPALIGN in a rom package, instead of the "normal" ones?
[Desire Android Development] xavierjohn22:
I dont get the miui logo error when using the deodexed chinese rom?

You are using 1.3.2 apk tool right?

Havent had the decompile error since that logo came. The one you attached is my already modded one?

Anyways try again next week if youll have the error on recompiling, use the stock framework of miui as well

Yeah, i do zipalign on all of my releases, though it was not here before, i just oneclick on my sdk folder, then gunther requests it to be here.

Ah okay,

here, i look this up for you why ZIPALIGN is being done for APKs

http://developer.android.com/resources/articles/zipalign.html

So after you build usable you get _OUT_APK apks and _OUT_APK_ZIPALIGN apks

Grab the ones in _OUT_APK_ZIPALIGN and overwrite the content of _OUT_APK apks

Then buildflashable (5) so you use zipaligned apks

P.S.

Now I am using mainly

_OUT_APK_ZIPALIGN for MIUI, before i have a batch that zipaligns all in _OUT_APK (the zipalign is included in sdk)

These below are being use by other devs or users (apks here are straight coming from bruts apktool recompile)

_OUT_APKTOOL_DIST

_OUT_APKTOOL_DIST_ZIPALIGN
[Desire Android Development] jukyO:
Hey all,

stupid question. How do I translate XMLs to my language in this tool? I used to do it manually by editing XML file, can you give some guidelines. I guess I need to point to the full rom locally on my Harddrive or?

Thanks,

jukyO
[Desire Android Development] wagner51:
Won't install output APK

Hi all,

I try to use this great tool to change some labels in an app.

I don't know why, but when sending the new APK to my HD2, it says it doesn't install it.

I put the modified xml in _CUSTOM_RES then, right-click on my apk in the list and chose "Single Recompile then Build". The log file seems to be good :

Updating archive C:\xdaAutoTool\_OUTPUT_APK\XXXXXX.apk
...
Everything is Ok
Done!

I tried to sign APK with no more success... Is ti because I bought this app and cannot modify it by mylself?

Any help appreciated :)

Thank you !
[Desire Android Development] yajinni:
I am trying to use the xdaautotool to create a flashable zip that installs 2 apks for me.

Is there a guide or advice i can get to do this?
[Desire Android Development] yajinni:
ok figured how to make a flashable zip. Only thing is it seems i need an update-script file. And idk how to have it make one for me.
[Desire Android Development] xavierjohn22:
Do not sign system apk.

Push it to your device or flash in recovery. Better flash since it might be use by system

Sent from Singapore
[Desire Android Development] xavierjohn22:
in the download with the tool there is a template file called flashable_update.zip, you can use that and edit to your needs.

Its in the _flashables folder

Sent from Singapore
[Desire Android Development] xavierjohn22:
I still use notepad++ to translate, this tool does not handle translation.

Sent from Singapore
[Desire Android Development] theviruz:
---------------------------

xdaAutoTool

---------------------------

System Error Number 339 : Component 'Richtx32.ocx' or one of its dependencies not correctly registered: a file is missing or invalid

---------------------------

OK

---------------------------

can't fix this error tried everything

i'm using win 7 64 home premiuim
[Desire Android Development] xavierjohn22:
Download latest richtx32.ocx in microsoft or web matching your pc. Then register using regsvr....

Sent from Singapore
[Desire Android Development] CdTDroiD:
Hey mate, i cant get it to overwrite .png's after recompiled,

e.g. if i change a dialer button in HtcDialer.apk and put it in the folder it wont change it. I have overwrite res on also, any ideas?
[Desire Android Development] 3rdstring:
You have to put your updated image in the _custom_res folder with the correct folder structure.

HTH
[Desire Android Development] CdTDroiD:
Hi thanks for the reply,

EDIT: I am a dooche bag lol, i forgot to put the app name folder first, ive been up since 2.30 am so bit tierd lol

Thanks anyway man
[Desire Android Development] SWFlyerUK:
Whats the proper routine for compiling a framework-res.apk?

I just tried it and my device now requires a re-format due to it no turning on.
[Desire Android Development] xavierjohn22:
Just flash your old framework in recovery and it would be fine.

Proper way as sample in op.

Put in input.

Hit 1. Install franewirk res.

Hit 2 or just the single decompile

Then do edits. It might be here that you have the not booting.

Yiur post is very general, whats being edited.in the framework res? Images. Xmls?

Then recompile. Either use the one generated by apktool itself or use my build usable apks.

Do not sign

Flash in recovery

Sent from Singapore
[Desire Android Development] SWFlyerUK:
Hi there,

I'm not sure what is meant by recovery to be honest, I'm using the Archos 70.

I changed some of the images in the res > drawable-hdpi folder.

I then copied and pasted the new framework-res.apk from the SDCard to the System > Framework folder, and the device restarted and stopped at the boot screen.

I changed a few images in the folder above, then re-compiled using the program choosing option 4.
[Desire Android Development] xavierjohn22:
You used root explorer to do that?

You cant do that as the framework is being use by the system.

Anything the system use as a rule for me i flash in recovery

Sent from Singapore
[Desire Android Development] SWFlyerUK:
Yep Root Explorer, I don't believe that I'm able to flash it, do you flash the APK then I assume, as I dont believe the Archos 70 can do that?
[Desire Android Development] xavierjohn22:
Same as how we inatall rom. We have a flashable zip template and script that does it for us.

Sent from Singapore
[Desire Android Development] SWFlyerUK:
Thats not possible with the Archos 70 I believe.
[Desire Android Development] xavierjohn22:
i dont know about archos, you are the best to know that, anyways that is not related to the tool anymore. i dont know how users flash in archos
[Desire Android Development] xavierjohn22:
Version 2.0.0

- Added adb reboot commands

- Added script to save apktool version after changing and use that on start of app

- Added option to only zipalign apks placed in the _OUT_APK folder

- Added move apks from _OUT_APK_ZIPALIGN to _OUT_APK

(useful before building flashable zip)
[Desire Android Development] Gunthermic:
Your my hero!!!!
[Desire Android Development] Jwtiyar:
is that work for linux?
[Desire Android Development] xavierjohn22:
Only for windows. Sorry.
[Desire Android Development] TylerDurben:
Heya xavierjohn22

Today i found your autoAPK tool and must say thats the tool ive long waited for thx verry mutch for developing sutch a great tool !!!!!

Did u think about add a patch to decompile .m10 files also to decompile sense 3.0 files?

Will be great if it is possible
[Desire Android Development] xavierjohn22:
HAvent encountered .m10 files yet. You can email me at gmail for details. I hvent had much time browsing forum lately.

3.0 gunther and i are having conversations with that too.

Thanks buddy.
[Desire Android Development] CdTDroiD:
could someone please help me...

I used to be able to edit xml's, but now when i do and recompile the apk it just goes back to normal, and its driving me nuts

whats happened? any ideas? i can edit images fine but it just wont save xmls, i dont understand why it would just revert back to normal if i have changed it
[Desire Android Development] xavierjohn22:
If you are using the build usable not the apktool dist apks you need to copy the xml binaries in custom res after recompile before doing a build usable.
[Desire Android Development] xavierjohn22:
And manually do you have any issues?

Is this system ui requires only one framework file?

I remember someone posted he needed two framework file for a sense 3.0 systemui.

You may need the same.
[Desire Android Development] Hatman41:
I do not have the issues that he has when I decompile and recompile the same file. The only difference between me and him is were I have xdaautotool installed. I have mine in the tools dir. I was trying to help him figure it out but it is beyond my expertise.
[Desire Android Development] Bassdj427:
I just moved mine into the platform-tools folder also, still no luck.
[Desire Android Development] xavierjohn22:
The location should have no space in path. Thats all.

Your problem might not be location. Do you have aapt from android sdk tools installed?
[Desire Android Development] Bassdj427:
Yes, I do.
[Desire Android Development] xavierjohn22:
Try to manually decompile and recompile using dos command. If it works, this tool has the bug
[Desire Android Development] Bassdj427:
It still didn't work. None of my changes were kept and I got the same log of errors.
[Desire Android Development] xavierjohn22:
Your recompile has the resource error. What are you changing? Nothing? Is the folder path correct? Or is this systemui already altered apk or modded already?

If you send me your systemui and framework apk i can try this tomorrow
[Desire Android Development] hypnz:
Xavier auto tool doesn't work at xp? I have some issues with it at xp. Wich program language u used?
[Desire Android Development] Bassdj427:
I took the framework and system ui from the Prime ROM for the asus transformer and edited like 3 .9 images, the navigation controls for honeycomb, and the wifi indicators. thats it.
[Desire Android Development] xavierjohn22:
Vb6 win32, it should work with xp provided the ocx and dependencies are registered.
[Desire Android Development] absolutzero1906:
I apologize if this is a noob question but need some help. I am trying to decompile a framework-res.apk and I keep getting this error. Any help would be appreciated. Thanks.

[*] _INPUT_APK\framework-res.apk

decompiling _INPUT_APK\framework-res.apk...

Unable to access jarfile C:\Users[*] _INPUT_APK\framework-res.apk

decompiling _INPUT_APK\framework-res.apk...

Unable to access jarfile C:\Users\absolut_zero1906\Downloads\AutoAPKTool\AutoAPKTool\\apktool.jar\\apktool.jar
[Desire Android Development] Bassdj427:
You may need a different apk tool. Go to settings and change the apk tool
[Desire Android Development] absolutzero1906:
Yup that was it I had just figured it out when I read your message thanks.
[Desire Android Development] Bassdj427:
You're welcome
[Desire Android Development] absolutzero1906:
I was having the same issue. I replaced the aapt in the tool folder and I was able to get passed that. Give it this a shot. http://db.tt/Sg1gmmV

Now if someone can tell me how to get the framework-res.apk to install on this thing. I tried creating a flashable zip and got a status 0 error. Also tried adb install. Nothing works. I know I am doing something wrong maybe I just need to sleep and try again tomorrow. Thanks.
[Desire Android Development] AndroidGraphix:
Thanks. I'm downloading now.

EDIT:

wow, this looks very user friendly. I just may end up donating on this one. Thanks again.
[Desire Android Development] xavierjohn22:
It says you are missing a resource, clickreceiver, etc, see the build folder and also the original if it was removed
[Desire Android Development] xavierjohn22:
Framework res needs to be flash in recovery

Theres a template in the flashable folder for this. Error will show if flashable update zip file is not there
[Desire Android Development] Hatman41:
The build folder only has classes.dex in it. I do not have this issue on any other apk just the music2.apk which I find very weird. This is honeycomb that I am having this issue on.