yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] wd20293:
Well I have about 3 hours into attempting to get this to run. I am on XP 32, latest Java. Here is the error:

[*] Processing framework-res folder...

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

Recompiling framework-res.apk...

W: Could not find sources

I: Building resources...

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\DOCUME~1\Wayne\LOCALS~1\Temp\APKTOOL7166771598244735972.tmp, -x, -S, C:\xdaAutoTool\_INPUT_APK\framework-res\res, -M, C:\xdaAutoTool\_INPUT_APK\framework-res\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:\DOCUME~1\Wayne\LOCALS~1\Temp\APKTOOL7166771598244735972.tmp, -x, -S, C:\xdaAutoTool\_INPUT_APK\framework-res\res, -M, C:\xdaAutoTool\_INPUT_APK\framework-res\AndroidManifest.xml]

at brut.util.OS.exec(Unknown Source)

... 7 more

Caused by: java.io.IOException: Cannot run program "aapt": CreateProcess error=2, The system cannot find the file specified

at java.lang.ProcessBuilder.start(Unknown Source)

at java.lang.Runtime.exec(Unknown Source)

at java.lang.Runtime.exec(Unknown Source)

... 8 more

Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified

at java.lang.ProcessImpl.create(Native Method)

at java.lang.ProcessImpl.<init>(Unknown Source)

at java.lang.ProcessImpl.start(Unknown Source)

... 11 more

DONE!

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

HELP lol
[Desire Android Development] xavierjohn22:
Cannot run program "aapt":

do you have aapt
[Desire Android Development] wd20293:
It is showing as an exe in the bin dir of apktools, I even double clicked it thinking it had to start a service.
[Desire Android Development] xavierjohn22:
No, you should install it,

its just there for replacement on those who have it

Easiest way is to install adroid sdk, see net for installation, also go over bruts thread for aapt related posts
[Desire Android Development] MvSt:
Search for the ocx files (or download them here: Link)

Then register them as shown:

Copy these files into: C:\windows\SysWOW64\

Start the commandlineeditor (cmd) as administrator

Type the following for each ocx file:

regsvr32.exe C:\windows\SysWOW64\FILENAME.OCX

Done
[Desire Android Development] wd20293:
Hey Xavier, can you link me to Bruts thread? Thought I bookmarked it. And btw, awesome job.
[Desire Android Development] 3rdstring:
ApkTool
[Desire Android Development] xavierjohn22:
It is also in the OP, under the cmd line version with credits to brut. thanks

Thanks dude
[Desire Android Development] Aust S5:
Hi Guys,

I have a problem that I need help with. I was having the ocx problems and downloaded the ocx's from the link in this thread. Only now when I load xdaAuto tool and try to install framework I get a "System Error Number 7: Out of Memory" Failure??? Has anyone experienced this before or knows of the fix?
[Desire Android Development] xavierjohn22:
Goto task manager, see if some of the exe in the bin of auto tool is running then kill it.

ill handle checking those net release
[Desire Android Development] Aust S5:
Ok, tried that, only one extra process stays open. Which is main application exe
[Desire Android Development] xavierjohn22:
Try it again once every ocx is registered and see if it has errors
[Desire Android Development] Aust S5:
I had to manually register the ocx's to start with. Followed steps in this thread. No problems with the registration, all successful. Then when still didn't work tried the downloaded ones. Restart, but I still get the memory error.
[Desire Android Development] xavierjohn22:
I'll make an installer next release to capture all my required files i've used in my pc.

that may solve it

post some screenshot too of the error if you dont mind and highlight there what was pressed, thanks buddy
[Desire Android Development] 1982Strand:
I got tired of all the errors and formatted my laptop, reinstalled win 7 and now everything works fast and smooth again ;-)

Sent from my HTC Desire
[Desire Android Development] xavierjohn22:
lol. must be something messing it up when windows updates?
[Desire Android Development] Gunthermic:
Now that is dedication to get this program to run!
[Desire Android Development] 1982Strand:
Yeah i think so.. It was after i got a notification about updates were done, then all hell broke loose.. Not just with the tool, i started having trouble with all kinds of programs not running well.. So thought it was time to do a cleanup :)

Weird thing is, right after install of Win7, i did a complete update, before installing any other programs and now everything works :)

Gotta love windows! Ha!
[Desire Android Development] 1982Strand:
He, yeah, mostly because i'd hate going back to decompile/recompile of apk's one at a time, haha :D
[Desire Android Development] zergburger:
looks like the infamous markhuk from miuiandroid is at it again.

it seems to be a retardedly inefficient manual way of running this tool, except its now copyrighted and forbidden to be used without consent LOL

http://forums.miuiandroid.com/showt...ive-guide-for-APK-editing-on-miuiuandroid.com
[Desire Android Development] MvSt:
Someone should tell him about this threat and its age.

XJ, you should copyright you MINI HOW TO too *lol*
[Desire Android Development] xavierjohn22:
nyahaha, was that just posted today? wahahaha. Anyways, really weird stuffs over there.
[Desire Android Development] warttack:
His guide was posted today and its already outdated by at least a month.

1. Backup just needs one line change.

2. File Explorer doesn't need smali change anymore.

3. Music App does not require smali changes, just need layout change and doing it like this allow chinese users to use online feature if chinese language is selected.

Whatever that clown is doing by hand we automated long ago.

what's gonna be his next copyright attempt? MIUI? ;)
[Desire Android Development] warttack:
Btw xavierjohn22 thanks for the great script. Even tho I didnt use it I used the idea behind it and that was a great one. Thanks for been part of the android community. :)
[Desire Android Development] xavierjohn22:
mine is like so so outdated already, LOL

welcome dude, thanks too, miui is really cool.
[Desire Android Development] Aust S5:
Ok will do. Interesting re the laptop wipe... Not sure I'm able to go that far to much reinstalling to do for a work lappy. Maybe a whole new home system time, now that's got me thinking ;)
[Desire Android Development] 1982Strand:
Hey folks, i encountered this "new" error today.

I was trying to recompile, using all the default settings in the tool.

This is the info on the error, i searched the internet for a description:

-Multiple substitutions specified in non-positional format

Since Android SDK 2.3 there's a new error:

error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?

Description:

This error indicates you're using a string resource with %s in it. See how to use it here under 'Formatting strings'. In general, instead of:

Hello, %s! You have %d new messages.

Should be:

Hello, %1$s! You have %2$d new messages.

..............

I guess i get this error because i just updated my android sdk tools, so i wanted to ask people exactly which version and packages they have installed via the SDK Manager, so i can delete my tools and only reinstall those which will work..

Well, unless there is another (better) solution?
[Desire Android Development] warttack:
Which version of apktool are you using? That happened to me after updating to apktool 1.4.x I went back to 1.3.2 and it works perfectly. Or you can update all you strings to that format. Tho I doubt you want to do that :p
[Desire Android Development] 1982Strand:
I just used default settings, so it's using 1.3.2... And no, really not in the mood for changing all the strings :D Got like a thousand of those errors in 65 apks.. Sheez!

Would it work, if someone "just" zipped up their sdk tools folder and uploaded it, then i could try replacing mine with that?? Or are there files installed elsewhere in the system?

EDIT: Or maybe just the apktool/aapt?? Not sure, i thought xdaAutoTool used the ones that comes with it??

EDIT2: Is the SDK Tools related at all? He, pretty confused here.. It must be the apktool and all that comes with it, right?

EDIT3: OK, got it working again! Pretty weird though. I switched to tool 1.4.2, recompiled 1 apk, switched back to 1.3.2, now it works again.... Said it before, GOTTA LOVE WINDOWS! :D

And sorry for spamming the thread! ;)
[Desire Android Development] xavierjohn22:
just for info since you got it running again.

the tool uses the aapt that sdk installs. there is no call anywhere for that aapt in bin folder.

the one that comes with it is only for when this was release and wad working with gb 1.3.2. sdk tools is related. when you hit recompile all, open task manager, gi to processes, you will see what exes and aapt it will be grabbing to run.

anyways, i have most of the sdk tools in my workstation.

1.4.2 of brut is new. i havent read th thread so much but it will decompile and compile upto honeycomb so it should work.

yeah 1.3.2 is tested with miui. use that.
[Desire Android Development] xinfinityoO:
does this work with samsung galaxy s2.. if not any plans to support it or anyone knows of any tools which works with samsung galaxy s2.. would really appreciate the help..

thanks
[Desire Android Development] Gunthermic:
Question.

1.3.1 Works flawless with Froyo

1.4.1 Works flawless with GB.

Here is the problem, and maybe your program can handle it, or maybe I am just not seeing things.

I have the Froyo and GB Framework file loaded.

1.apk = Froyo

1-GB.apk = GB

System can't not recompile errors without giving errors. Can your tool be written where we can right click the and we can select which framework to use? If I use the command line and do it manually It works.

Make sense?
[Desire Android Development] Brut.all:
About "Multiple substitutions" problem: newer aapt is more restrictive, so it throws errors for apps which works with older aapt. Apktool >=v1.4.0 automatically fixes this, but it does this at decode time, so:

Old aapt, decode & build with v1.3.2 - works

Old aapt, decode & build with v1.4.1 - works

New aapt, decode & build with v1.4.1 - works

New aapt, decode & build with v1.3.2 - doesn't work

New aapt, decode with v1.3.2 and build with v1.4.1 - doesn't work

If you updated to v1.4.1 and you still get these errors, then I think you didn't redecode apk, but was trying to build already decoded one.
[Desire Android Development] xavierjohn22:
yes.

post in here the commands to recompile using specific framework.

ill return to this post when im home.
[Desire Android Development] Gunthermic:
I miss spoke. The key is the adding the framework file to begin with. Like so.

apktool if com.htc.resources.apk hero I: Framework installed to: /home/brutall/apktool/framework/2-hero.apk

$ apktool if com.htc.resources.apk desire I: Framework installed to: /home/brutall/apktool/framework/2-desire.apk

Then:

$ apktool d -f -t hero HtcContacts.apk

I: Loading resource table...

I: Decoding resources...

I: Loading resource table from file: /home/brutall/apktool/framework/1.apk

I: Loading resource table from file: /home/brutall/apktool/framework/2-hero.apk I: Copying assets and libs...

$ apktool d -f -t desire HtcContacts.apk

I: Loading resource table...

I: Decoding resources...

I: Loading resource table from file: /home/brutall/apktool/framework/1.apk

I: Loading resource table from file: /home/brutall/apktool/framework/2-desire.apk

I: Copying assets and libs...

So the key is when you allow us to add another framework that in your program we can add the tag.. according to Brut then the compiling will automatically use the same frameworkfile to compile.

Link for info:

http://code.google.com/p/android-apktool/wiki/FrameworkFiles
[Desire Android Development] xavierjohn22:
ah tagging. got it.
[Desire Android Development] xavierjohn22:
wowa we were visited by the dev responsible for this offspring. lol. thanks dude.
[Desire Android Development] 1982Strand:
Yeah, got it working again. But then i got curious and tried several setups..

It seems the 1.4.2 tool with newest aapt is actually working very well :) But it does some funny business in the strings when decompiling/recompiling. But that must be if what i'm decompiling is compiled in another version (older) than 1.4.0 and up.

For now, i switched back to the aapt that was out the same time as the 1.3.2 tool. This is working flawlessly for me, in regards to what ROM i'm working with ;)

And thanks for the info btw and just wanna say thanks for your work, we're many who couldn't do what we do if you weren't around! :D :D
[Desire Android Development] xavierjohn22:
just to let you know that i havent forgot about this, LOL, just staring at my development workstation and thinking what make sense

BUTTON or RIGHT CLICK and how to rememeber installed TAG, LOL
[Desire Android Development] 1982Strand:
Okay, i have used the tool for some time now and would like to give some feedback on it :)

First of all, i'd like to thank you for the program and all the efforts you put in it, great job man :D

Here's the feedback:

1.

I found something that to me is a bug..

When i decompile while using selection, accidently clicking the middle explorer window in the top, makes the decompiling stop..

But then i came to think, it would be a good idea to have a "cancel" or "stop" button for when you do operations, so you have the option to quit decompiling, recompiling or deodexing..

2.

If i untick "Enable selection", i get system error 91: object variable or with block variable not set.

It's kinda random, if i got "Check - uncheck all not decompiled" ticked also, it does it too..

3.

In deodexing, i could use some more info in the progress bar, just like when decompiling or recompiling apks. Is it possible? I remember seeing it in the command line tool :)

4.

Under the "Misc" tab, the 1-click deodex feature. After all my problems with system errors and finally getting the tool working again, i always end up getting a kind of error, saying something like "The program tool to decompile, recompile blah blah.. has stopped working. Windows is looking for a solution blah blah".

It looks like it just hangs.. It happens shortly after i've hit the button to start and located my file to deodex (making sure no spaces in the path and name). . I quit the autotool, then if i look in the folders used by the deo-tool, it has copied the files correctly into the "_SOURCE..." folders and a single file is in the "_DEODEXED_FRAMEWORK" folder..

Anyways, i can deodex just fine by using the DEO - tab, so no biggie.. Possibly only happens on my end :)

--

That's it..

Again, great job with the tool XJ, keep it up! :D
[Desire Android Development] Hatman41:
Ok been using this for some time. Today went to launch it and I get System Error Number 380: Invalid Property Value.
[Desire Android Development] xavierjohn22:
something updated with windows reently?

Sent from Singapore
[Desire Android Development] Hatman41:
Nope...I had to delete it and reinstall to fix it.
[Desire Android Development] xavierjohn22:
yeah the checkboxes slection has still that bug. i need to handle that. i only catch it foe now.

1; 3 and 4 ill look at it this week

miui friday fever is almost over.

Sent from Singapore
[Desire Android Development] xavierjohn22:
hmmm. i still need to make an installer to make things easier. lol.

Sent from Singapore
[Desire Android Development] o$$!ram:
Hi,

i tried to use this program ... but i only get en error that says:

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

I tried to fix it with the includes reg tool and registrating it by hand ... booth dont work :( All files are at windows\sysWOW64\

I have Windows 7 x64

I hope someone can help ...

(and yes, i searched this thread but the only thing that i found is he tipp to register it by hand ...)

EDIT:

I got it to work :D
[Desire Android Development] Gunthermic:
Ya! When we gonna get another update!!! LOLOLOL

Ribbing ya...
[Desire Android Development] xavierjohn22:
lol. saturday. i still need to verify tagging.

can you link framework apks you use

Sent from Singapore
[Desire Android Development] Gunthermic:
You want just my framework files I use for different Rom's like froyo and gb? No problem...

Sent from the Thunderbolt on the road.
[Desire Android Development] exorcist26:
decompiling email.apk..

unable to access jarfile c/users/...../desktop/rom

done!

what is this error?

please help
[Desire Android Development] xavierjohn22:
read first post. dont put folder for now in a path with space. im really busy guy lol

Sent from Singapore
[Desire Android Development] Gunthermic:
Files

You still need my framework files. Sorry swamped last few days?
[Desire Android Development] xavierjohn22:
Yeah kindly send it or send link in my gmail in my signature, thanks dude
[Desire Android Development] Gunthermic:
Is it me or can we not recompile a selected folder? I want to just compile the Folder I decompiled an ddid work on not all folders...

I have Enable Selection checked.

Even if folder is highlighted, it tells me nothing is selected.
[Desire Android Development] xavierjohn22:
Apk can be recompiled, check tha apk, when you enable selection hit recompile selected button

FYI, i found out already 1982strands bug on system value not set blah blah blah, it is a forms code on remembering the position.

I took it out and make the tool auto center on launch to remove the bug.

that cause him to restore his W7 system, ha ha ha
[Desire Android Development] 1982Strand:
Haha! Crazy :-) But now it works fine, except the 1-click deodex. And sometimes the log goes weird, I can't really see it but it shows as a window with no content... But its only sometimes :-)

Sent from my HTC Desire
[Desire Android Development] 1982Strand:
Ok, quick question, where can I find the string to edit the Chinese stuff in the picture? I looked in Backup app and framework, but I'm missing something.. it is probably because of a missing string in the danish translation, but I can't locate it :-(

It is on the stock Chinese Rom with only danish added btw, that's why its Chinese :-)

Sent from my HTC Desire
[Desire Android Development] xavierjohn22:
1 click deodex for rom?

anyways, will upload sunday or saturday, yeah the sytem invalid property value happened to me, it is when you drag the window too much of the screen and then it actually takes and save a position outside of the screen, so when it loads the next time it cant find the position, i remove it and center the form each time it loads on screen
[Desire Android Development] Kalashnikitty:
should be this one in smali code
[Desire Android Development] xavierjohn22:
Yup, no problem. will cut down more than half of your time spent, lol.
[Desire Android Development] xavierjohn22:
Ah yeah, geez. it only handles the added resources like values-en or drawable-en, since i am experimenting on the -u switches of 7za

Okay for now do this

1) After doing [3], recompiling the apk

2) Copy the file _INPUT_APK\framework-res\build\apk\res\drawable\progress_horizontal.xml to

_CUSTOM_RES\framework-res\build\apk\res\drawable\progress_horizontal.xml

3) Copy the file _INPUT_APK\framework-res\res\value\styles.xml to

_CUSTOM_RES\framework-res\res\value\styles.xml

(these are the binary of your edited file)

4) Once this is done, make sure that "Overwrite res using _CUSTOM_RES" is ON, it is ON by default

5) then do build usable, It should overwrite those binaries in the APK

Thanks for the catch, i'll update it when this week past, saturday and sunday is miui day for me, lol
[Desire Android Development] reef2009:
Hi Xavier,

I've tried your tool but only get this:

"Java was not found, you will not be able to sign apks or use apktool"

Java is installed Java6 on win7x64.

Any idea how to solve this?

On what system does it work fine?

thnx
[Desire Android Development] Raffie75:
Yesterday i thied it for myself and did a test with the languagepack update 2 or 3, i followed the steps and erverything worked. The only thing i didn't test was if the flashable really worked.

I did not see anything what had to do with java.

Using win7x32 which java i use... i don't know.
[Desire Android Development] Kalashnikitty:
try to install JDK and JRE, this maybe fix your problem
[Desire Android Development] reef2009:
Thnx guys,

Got it working :)

Needed Java x64 even when I x86 installed for the Android Kitchen already

Gona play with it tomorrow :D
[Desire Android Development] Raffie75:
Still got a question how to use your AUTO APK TOOL.

I have downloaded Multi Lang Update 4, unzipped it and put the APKs in _INPUT_APK.

JW made an update for the translations, those are strings, arrays and plurals.

How do i use the update JW made?

Is the fisrt thing i do "decompile" (APKs are in_INPUT_APK), when decompiled i get 'new' folders in _INPUT_APK with the strings etc, can i copy the updated folders to _INPUT_APK so it overwrites the "old" folders and after that recompile and follow the steps 3, 4, and 18 to make my updated flashable language pack?

Ofcourse i only want the NL pack so it is possible to delete the languages i don't use/want?

Which folders/files are "forbidden" to delete, i mean which folders/files are needed for a good running ROM. I do not know how to put it clear to explain, so i hope you know what i mean.

Thnx for now and i'm off to bed. goodnight all.
[Desire Android Development] xavierjohn22:
yeah i got what you mean.

Easiest way is

- decompile my multilang apks, (remove the ones we dont translate)

- yes it will all be in the _INPUT_APK folder (it will recreate struture there)

- yes copy jan willem 3's updates over in the _INPUT_APK folder structure

- it will overwrite all files

- then recompile after copying it over (if all is translated well, it should have no errors)

- then build usable

- then 18 build the flashable, (delete the build.prop inside the flashable_update.zip and inside the system folder before building it, if you know what it is for then just reuse it)

NOTE

as i have said, you can delete all that has values-pt, values-de, raw-de, etc. but you might delete something that is needed so don't delete values folder

the only complicated apk is the framework-res so you can leave that one out if you want

another method

- grab the apks from the en-zh rom

- then just add jan willem 3's nl sources in the decompiled folder structure

- then recompile

- build usable

- 18, build flashable
[Desire Android Development] Raffie75:
When i would copy JW his update (in this case it isn't the update tranlation for 1.4.29 as far as i know). How do i get the new strings and the string that are deleted?

If i take the APP-EN_BASE_1.4.22_20110423.rar for expamle.

I put it in the right folder and decompile, remove everything i don't want to have (the other languages) and i copy the latest translation in to that folder it will overwrite everything and would delete the new strings that haven't been translated yet (so after copying it is possible that i will miss a few strings).

(When copying a file with a size of 1mb and you copy it to the same file, but that one is bigger (say 1.5mb) the 1mb file will overwrite the 1.5mb file, so this "new" file has a size of 1mb am i correct? Or am i totally wrong and confused?)