yashsingh1/xdaforums huggingface dataset:
[Android] y3mita:
Android Utility found this apk: DarkSwype_EN_ES_325-signed.apk

Would you like to decode it? [default=Yes]

1. Yes
2. No

Decoding DarkSwype_EN_ES_325-signed.apk to ../mod-here-solo/DarkSwype_EN_ES_325-signed:

I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f090001 bool/set_help_dialog_font, config=-v13
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:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)

Would you like to extract original META-INF? [default=Yes]

1. Yes
2. No

1
Extracting Original META-INF from DarkSwype_EN_ES_325-signed.apk
......

Please check decode_log for apks with errors

Please press [enter] to continue

On Aug29_012005, DarkSwype_EN_ES_325-signed.apk was not Decoded Properly

On Aug29_012326, DarkSwype_EN_ES_325-signed.apk was not Decoded Properly

On Aug29_013457, DarkSwype_EN_ES_325-signed.apk was not Decoded Properly
[Android] tommytomatoe:
Did you install a framework-res.apk?
[Android] Jsmokey:
Ok I got ya now, I was expecting it to drop it like the normal apktool in an out folder when compiled and when I tested it before I just used the multi option to see how things worked in the old version. It might be helpful for people coming from doing it with just apktool or add a line so when its recompiling it'd say your recompiled apk is placed in such and such location. Not sure why search didn't find the apk's though, I'm gonna have to try it again and see what happens. I do have 1tb total of drives on my desktop so maybe I forgot to scan the one with andutil.

I would like to make some sort of donation to you for all the effort though tommy so if you get a chance shoot me a pm and we'll figure something out, a utility this helpful deserves some reward especially with the work you put in getting out for us sammy users.

I also wanted to ask you if you mind if I tried getting some of the work knocked out for the windows version in my spare time just for a side project for personal use, not the greatest with windows scripts and cmd line, I was raised on unix, but I'm sure I could prolly get some of it working. Of course you'd have full credit for everything just give me a mention and I'm happy.

Sent from my i897 w/Andromeda 3, Suckerpunch kernel, & 1.3Ghz OC using Tegrak.
[Android] y3mita:
I thought you only needed framework if you were to mod native system apps like mms contacts, etc... This apk I'm trying to mod it a 3rd party one.... do I still need framework?
[Android] tommytomatoe:
Not always true. It all depends on which sdk/environment the dev originally used to build the app.

Also you can try doing this. In your HOME folder, there is a folder called "apktool". Delete the files 1.apk and 2.apk if they exist. Then the decompile again.
[Android] y3mita:
well that makes sense now... I tried the approach of just moving the classes.dex which is the file I want to modify. It decompiled without errors *thanks for the idea*

See all wanna do is change the default behaviour of this app with some gestures. Swype is a keyboard app and I want to change the default gestures in it.

Do you think once I made the changes I can compile back and move the compiled classes.dex file to the apk? At least, that's my approach to test.

EDIT: By the way, I did not see apktool folder at $HOME and I have OpenJava - Eclipse - ADT Plugin and Android SDK installed! My guess is the apktool folder is in another directory... My directory for sdk is /opt/android-sdk-linux_x86
[Android] tommytomatoe:
If your edits are good in the dex file once recompiled you can put back in apk, resign, then install.

By default apktool installs framework to home/username/apktool. Not sure why you don't have that
[Android] y3mita:
question?

Once I edited the dex file... how to compile back? I am left with: classes_out folder and the classes.dex file

I went to auutil and opted for option 4 to recompile classes apk and it says nothing to do here! making some extra folders with nothing inside.

Do I have to remove the classes.dex file before attempting option 4?
[Android] tommytomatoe:
Mmm might be a bug in the script. I am getting out of classes now. I will check when I get home.

If I recall you need to leave the classes.dex in same folder without moving it before the classes_out can compile.
[Android] tommytomatoe:
I just examined my code in Hubdroid app (nice app BTW).

Instead of using your "classes.dex" file, use the entire apk. AU will automatically baksmali the classes.dex inside the apk. So place in apk in working-folder/mod-here-multi. Run andutil,

option 8 Dex code utility,

then option 3 decompile dex/apk,

then edit, then option 4 to recompile.

AU should automatically inject the new classes.dex into the existing apk (don't move apk in between Dec and rec).

Lastly you need to resign. Test keys are fine. AU includes what you need.
[Android] y3mita:
Followed your instructions and everything went fine... no errors but one thing that caught my attention was at time of re-compiling there was a message in window that says no classes.dex found but I double clicked on apk afterwards and I could see the file there.... Well, I lastly signed the apk and now it is time for testing.... will report back :D

I forgot to mention you're the man!!! Thanks so much for your help
[Android] y3mita:
nah no bueno! I installed the apk and my tweaks did nothing! :( I guess I need to look deeper in that classes.dex file!!
[Android] tommytomatoe:
Glad to know you got it to decompile/recompile!

Yeah smali hacks are fun. Reverse engineering anything requires time, patience, and know-how. Just takes practice. Good luck to you and keep it up!

Thanks for supporting AU. Just give that thanks button so love :-)
[Android] tommytomatoe:
Anyone hears of Google sites? I have to make one for a school project and i might make one for AU as well. If anyone is interested in helping author such a site or would like to contribute with graphics, et cetera feel free to contact me via pm or email (same as my xda username).

Sincerely,

Tommy Nguyen
[Android] CleveRuse:
Sorry, heres Rosie:

http://db.tt/n9w1Iuv

...just in case ur up for trying it out
[Android] Jsmokey:
If you want I can take a look and see if it gives me the same error later tonight if tommy can't get to it, at least it'd give you an idea if its machine/enviroment related or something in the utility.

Sent from my i897 w/Andromeda 3, Suckerpunch kernel, & 1.3Ghz OC using Tegrak.
[Android] Jsmokey:
Oh I might need the frameworks you're using too if you want me to check it out.

Sent from my i897 w/Andromeda 3, Suckerpunch kernel, & 1.3Ghz OC using Tegrak.
[Android] tommytomatoe:
Hey gang. I've been MIA lately. sorry. School has me pretty busy and work too. Also, I'm working on a new purchase :-)

Malibal Lotus P150HM-S1

I got a lot of scholarship money and most of my wedding is paid for...so time to spoil myself.

But I'm downloading the file now. I'll let you know.
[Android] tommytomatoe:
Patch Update 1.0.2.b - Fixes three scripts. Extract "update" folder into root of android-utility, then run "update_script" by clicking on it.

For Mac OS X.

Details

Fixed typos in smali_tool, apk_tool, and installau.
[Android] tommytomatoe:
Cleve, which rom is this for again?

edit. Cleve. I used this rom to test.

http://xdaforums.com/showthread.php?t=1003891

This Rosie in that Rom Worked except for one 9.png error (I wished peeps were more careful with those. It's easy to to make resources ignore 9.png)

edit 2. I got it to work with your Rosie.:-)

Use these apks as your main frameworks. Just put them in "framework-here", then option #1. Enjoy my friend.

1. http://www.mediafire.com/?c74bcb71x99h0c4

2. http://www.mediafire.com/?27w5dbsw14wezpk

ps. if you get strings errors when compiling, you need to remove the languages from the frameworks first.

ie.

aapt: warning: string 'themes_lockscreen_description' has no default translation in /Users/Tommy/android-utility/working-folder/mod-here-multi/Projects/Rosie/res; found: pt_BR zh_HK

So you need to decode com.htc.res and framework-res, then remove the values-pt_BR and values-zh_HK folders, then recompile, then use those for the frameworks. But in my experience, I've ignored the strings errors and the apk still works.
[Android] CleveRuse:
Ha ha, Thnx buddy. Ur so awesome!

I actually don't have time to check it out now ...but ur advise is always flawless so I'm not worried;)

...can't Thnk u enough!
[Android] CleveRuse:
Thank u jsmokey! I def would have taken u up on that ....but I came bak to see both responses so....

But i certainly appreciate it. Everyone over here is so helpful. That's the way it should be ...but still nice. I try to pay ot forward whenever possible:)
[Android] Jsmokey:
No problem, I would've tried right away but had a family cookout and my sister-in-laws birthday so I was pretty tied up til tonight.

Yeah just about everyone here helps as much as they can to pay their dues for the help they received starting out, and that is definitely how it should be especially in any dev related fields otherwise it would take forever for any real progress to be made.

Anyways glad tommy got it sorted out for ya, I am getting a grasp on how AU works internally but don't have nearly the knowledge he does concerning errors in the utility.

And tommy congrats on the up coming wedding, my wife and I just had our 2 year wedding anniversary the 22nd. We actually started dating almost 8yrs ago, just remember it is what you make of it and its alot of work but theres alot of payoff in the end for whatever work you do put in.

P.S. Also don't ever ever ever forget rule #1. No matter what in a fight she is ALWAYS right, I don't care if you have 10 different things proving your point just cave. It makes life so much easier if you remember just that one thing. lol

Sent from my i897 w/Andromeda 3, Suckerpunch kernel, & 1.3Ghz OC using Tegrak.
[Android] tommytomatoe:
Lol. Yeah we will be together 5 years in December when the wedding is. Were definitely excited. Congratulations on your two years man! And by now, I would be insane to argue :-)

On the topic of AU, I need to put together a guide. There is so much in the utility that it is almost scary I think. I touched for the first time since the update to v1.0.2, and i was even kind of lost. I will work on a full blown guide once I get a chance.
[Android] dmeadows013:
The "Install New Apktool" is not allowing me to install 1.4.2
[Android] tommytomatoe:
You're using Linux right? There is a slight bug. I am updating now. It will be up in a few.

If you're using mac, then please install the patch found in the op. Patch 1.0.2.b
[Android] tommytomatoe:
Patch Update 1.0.2.b - Fixes two scripts. Extract "update" folder into root of android-utility, then run "update_script" by clicking on it.

Edit. FOR LINUX ONLY SORRY. Mac OS X in the OP under Goods.
[Android] dmeadows013:
Alright I applied the update and got the new version of apktool (I'm on mac). After that, I installed the framework, but when I try to decompile the apk, I get

/Users/dmeadows013/android-utility/apk_tool: line 246: apk_dec: command not found
[Android] tommytomatoe:
Uh oh. You didn't apply the update in my post above did you? That was for Linux. The mac is in the op. You will need to install the mac update (should work fine right on top of your current set up).

In between updates, you need to quit and open a new terminal.
[Android] dmeadows013:
Yeah I did both of those things and it's still not working...
[Android] tommytomatoe:
Please post the output of this command.

echo $PATH

also, please post the output of this command

ls $HOME/android-utility/utility

Thank you.
[Android] dmeadows013:
echo $PATH puts out

/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/sw/bin:/sw/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/dmeadows013/AndroidSDK/platform-tools/:/Users/dmeadows013/Androkitchen/:/Users/dmeadows013/Apktool/:/usr/X11R6/bin:/Users/dmeadows013/bin:/Users/dmeadows013/android-utility:/Users/dmeadows013/android-utility/utility:/Users/dmeadows013/android-sdk/platform-tools/:/Users/dmeadows013/android-sdk/tools

ls $HOME/android-utility/utility puts out

INSTRUCTIONS	apk_tool	log	ttadb	zasign
README	installau	resources	ult_opt	zipped_up
andutil	keystore	smali_tool	update_script
[Android] tommytomatoe:
Here you go my friend. Your PATH is perfect. Your android-utility/utility folder is busted!

Please download attached zip called "replace_me.zip". Replace all files and folders in your existing "android-utility" install with the files and folders in that zip. The files are straight from my working computer and source code. Thank and sorry for your trouble.

T
[Android] dmeadows013:
Awesome! Works great! Thanks
[Android] CleveRuse:
Tommy, I'm still having the same issue with recompiiling. That Rosie.apk does NOT recompile for me! Neither does either one of the frameworks that u sent me ......or any apk that I've tried recently for that matter.

......so every apk gives me the same error from public.xml when I recompile, tho I'm not getting errors when I decomp. The error looks sumthin like ''/home/cleve/.....'path-to'....public.xml; error: Public symbol string/'file-name' declared here is not defined"

This happens when recompiling ur framework-res, with ur 2 frameworks installed as well.

....I did get it working once 2 days ago (i thought I new why --bad 9.pngs) and it worked after that all day ....bit then the next morning (yesterday) I tried to edit sumthin in the framework-res.apk that I had fixed, but now it won't recompile, even tho I tried recompiling without making any edits first. I've also tried that sane Rosie.apk that worked for u -i don't get any errors on decomp, but it doesn't recompile (same error, won't build)

Note: I replaced the old frameworks (that u previously sent me) with the new frameworks (recently sent by u)

Note; Note: I did notice that when I went to install the new frameworks, that there were no framework files in 'framework-here' (and I don't think o removed them --strange!) But it still results in the same error(s) with them installed. I'm super confised;)
[Android] marriedman624:
I've been having trouble recompling my SystemUI.apk as well. I'm trying to do a multi-recompile and the framework-res and com.htc.resources works fine but SysUI gives errors like above.

I have even decompiled again and remade my changes, but still no go.

I am still running the older version of AU, will try to update and see if that helps.

Just wanted to throw that out there.
[Android] tommytomatoe:
I see your errors clevedruse and marriedman.

I'm not 100% certain your current situation but it works for me. I had to switch Apktool to version 1.3.1, but it works.

And my words with friends is frozen! It won't sendmy moves. Just gives me a network error. I am clearing data to see if it resolves the issue, then time to catch up on games.
[Android] CleveRuse:
I'm on the new version, lol! I was thinkin bout reverting to the old;) I just cant figure out wut has changed. Everything WAS working fine ...on the old and new.

It's prolly somehow my fault but I can't figure it out so ima have to try another tool. Nvr tried apktool by itself so I guess its time to learn;)

....wish I was smarter, lol;)
[Android] marriedman624:
Thanks Tommy, I'll check it out......after I upgrade AU of course.
[Android] drob311:
Tommy, thanks for this awesome package of tools! I installed it without any issues, tested out adb and so far so good. Thank you for all of your amazing work!!!
[Android] tommytomatoe:
Au installs Apktool for you...so you're good to go :-)

Here is what you need to know.

cd path.to.working.folder

apktool if name.of.framework.apk

apktool d nameof.apk

apktool b nameof

Note the command "apktool b nameof" lacks the extension .apk on purpose because the command "apktool d nameof.apk" outputs a folder called "nameof".

For example.

apktool d Rosie.apk

apktool b Rosie

Enjoy cleve and let me know if I can help :-)
[Android] CleveRuse:
Awe thnks t. I was just gonna Google it .....buuuut, I prolly woulda came bak here anyway, huh, lol.

Hey, I did get Rosie to work but I'm not sure why! Maybe it was the apktool version ...but framework is still effed;) ...who knows!
[Android] CleveRuse:
Edit: Nvrmnd... I think I DONT get it!

Getting errors with apktool too but ill have them posted later in an edit to this post ...I'm tired;)

EDIT: Alright Tommy: first off, im REAL sorry ur always having to answer my noob questions;) lol but.....

I guess i dont understand ur explanation on using APKTOOL. Here's wut im doing:

1) first im placing 'framework-res.apk' in 'mod-here-multi' cuz i assume thats where apktool is looking.

2) 'cd' to 'working folder'

3) type in 'apktool' .....and i get this error:

[ab@CleveRuse-LT20:~/sdk/tools$ cd '/home/ab/android-utility/working-folder'

ab@CleveRuse-LT20:~/android-utility/working-folder$ apktool

Apktool v1.4.1 - a tool for reengineering Android apk files

Copyright 2010 Ryszard Wiśniewski

Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

Usage: apktool [-v|--verbose] COMMAND [...]

COMMANDs are:

d[ecode] [OPTS] []

Decode to .

OPTS:

-s, --no-src

Do not decode sources.

-r, --no-res

Do not decode resources.

-d, --debug

Decode in debug mode. Check project page for more info.

-f, --force

Force delete destination directory.

-t , --frame-tag

Try to use framework files tagged by .

--keep-broken-res

Use if there was an error and some resources were dropped, e.g.:

"Invalid config flags detected. Dropping resources", but you

want to decode them anyway, even with errors. You will have to

fix them manually before building.

b[uild] [OPTS] [] []

Build an apk from already decoded application located in .

It will automatically detect, whether files was changed and perform

needed steps only.

If you omit then current directory will be used.

If you omit then /dist/

will be used.

OPTS:

-f, --force-all

Skip changes detection and build all files.

-d, --debug

Build in debug mode. Check project page for more info.

if|install-framework []

Install framework file to your system.

For additional info, see: http://code.google.com/p/android-apktool/

ab@CleveRuse-LT20:~/android-utility/working-folder$ ]

Ive also tried recompiling Rosie cuz it already decompiled in my projects folder.

So I typed:

'apktool b Rosie'

.....but I get the same error.

It's most likely that I just don't quite get ur directions but.....

Where is apktool looking for these files? Where do I place them?
[Android] CleveRuse:
k TT, i finally figured out that the "if" in ur example of commands was actually part of the command; not u saying "if", as in a sentence; and that i have to type the commands all in order with the framework command first (i think)!

but when i try to install framework with this command:

'apktool if framework-res.apk" ...i get this error:

ab@CleveRuse-LT20:~/android-utility/working-folder$ apktool if framework-res.apk

Exception in thread "main" brut.androlib.AndrolibException: java.util.zip.ZipException: error in opening zip file

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:404)

at brut.androlib.Androlib.installFramework(Androlib.java:365)

at brut.apktool.Main.cmdInstallFramework(Main.java:185)

at brut.apktool.Main.main(Main.java:61)

Caused by: java.util.zip.ZipException: error in opening zip file

at java.util.zip.ZipFile.open(Native Method)

at java.util.zip.ZipFile.<init>(ZipFile.java:131)

at java.util.zip.ZipFile.<init>(ZipFile.java:148)

at brut.androlib.res.AndrolibResources.installFramework(AndrolibResources.java:374)

... 3 more

ab@CleveRuse-LT20:~/android-utility/working-folder$
[Android] tommytomatoe:
Lol. Glad you got it.

the 'if' switch assumes there is an actual framework apk in the current directory. So....

cd /path/to/framework

apktool if framework-res.apk

For example.

cd $HOME/android-utility/working-folder/framework-here

apktool if framework-res.apk

Btw. I think it is good for everyone to know how apktool works on its own, au uses the same exact apktool.jar you would use on your in terminal :-) So it saves you time to use AU.
[Android] CleveRuse:
Oh ok! Yeah I shoulda figured that 'cd-ing' to the working folder wouldn't be enough, that I had to cd to the files inside it but..... I'm dumb;)

Anyway, I'm still a little confused as to how a framework-res that i fixed once for compiling,all the sudden would not ....or why the framework-res u sent me won't compile either ....but I did finally find one that would compile, so I'm editing the necessary xmls, then adding my themed pngs to it after I recompile (just too many to fix all at once --and none of them mine;))

....but yeah, I'm convinced the error I get is from bad patches. It's just strange that they aren't being flagged during decompilation! Who knows!

Thnx for all ur guidance n patience T;)
[Android] CleveRuse:
Now the problem is that framework-res is being built, but none of my edits are being seen. I can see that it has all changed in the 'projects' folder, bit after it is built (with the same name) it doesn't include any of the changes that I made! It's not changing at all!

Soooooooooooooooooooooooooooooooooooooooooooooooo frustrated!

Edit: apparently u can't change the name of an apk once its inside the Working Folder, or it'll just build the old one, LOL!
[Android] oxlong27:
Man what a fantastic tool. Now to figure out what the hell I'm doing :eek: