yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] :
I tried your files out and they both decompiled just fine for me. Check to make sure you have java in your path correctly and check to make sure your SDK path is set correctly as well.

Let me know. Shoot me a PM so we don't fill the thread up with the conversation.

Thanks

TPhillips/IRoNHiDE
[G1 Android Development] gil80:
I have don't as mentioned in the link but I still get this message that java was not found
[G1 Android Development] .ioannis:
Thanks all.. seems that I had to also do:

AND

for it to work.

Kudos for a great script ;)
[G1 Android Development] moccor:
I'm trying to modify the Swiftkey keyboard colors using APK Manager 4.9, I extract the apk, place my edited image inside the right folder (Droid X - HDPI), optimize tge images, zip it, and I've tried both signed and unsigned. Both cause force closures when I press a button. Can anyone help?
[G1 Android Development] gil80:
errors while compiling

Hi.

I'm trying to re-complie framkework-res.apk file and I get errors.

I've uploaded the log file: http://www.multiupload.com/4XX4STSAUT

Can someone assist me with this issue. Why it won't recompile?

Thanks :)
[G1 Android Development] rmilanov:
recompile issues

I want to slightly personalize an APK. I went and decoded it, changed a name around, and went to recompile. The new APK is a bit smaller than the original. When I installed, it would FC. I read the posts about people saying compression, etc... however, when I decompiled the recompiled one, I have about 100 fewer files than the originally decompiled apk. This leads me to believe that the compile isn't capturing all the files. Anything to check for this?
[G1 Android Development] dreamsforgotten:
What is the apk I'm guessing the decompile isn't working without errors but the recompile def should spit errors.
[G1 Android Development] anko184:
Guys I'm trying to modify SystemUI.apk from new pyramid 2.3.4 rom but i got an error in compiling.

Can someone help me with it? I'm attaching my log. I'm pretty sure i have forgot something but don't know what.
[G1 Android Development] dully79:
Have you installed your htc resources framework?
[G1 Android Development] anko184:
Yes, but i think that is something wrong with com.htc.resources.apk cause when i use the same files from another rom (unity 2.3.4 beta) i decompile and compile the SystemUI.apk without problems.
[G1 Android Development] rmilanov:
Would it make a difference if I use the htc framework vs the cm7 one I have used?
[G1 Android Development] Perka:
And now when choosing zp it also deletes the apks, saying :

Output file 'optimized\AccountAndSyncSettings.apk' exists

and then the apk is gone :(
[G1 Android Development] roscoenr:
try putting them in the place-apk-here-to-batch-optimize folder then chose option 15 then press z and enter and see if that works any better
[G1 Android Development] Perka:
Its the same :(

Worked before, only changed to 1.2.7 smali/baksmali to deodex

Could this be the problem?
[G1 Android Development] rmilanov:
Fwiw, I manually extracted with baksmali and it extracted properly.
[G1 Android Development] Perka:
Does apk manager need an update to work with smali/baksmali 1.2.7?

Thx
[G1 Android Development] gil80:
Please someone? I really want to get the hang of this but I can't seems to understand the cause of the problem.

Would appreciate any help :)
[G1 Android Development] lotherius:
Did you ever solve this problem? I'm trying to just change the name on your market APK, and I can't recompile it due to this error. How did you get it to compile?
[G1 Android Development] dreamsforgotten:
Will look@it tomorrow
[G1 Android Development] kkq29:
i got a problem when decompile systemui , but another apk , its ok . any ideas

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010300a3
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.data.value.ResReferenceValue.getReferent(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(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)
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Unknown Source)
... 5 more
The system cannot find the file specified.
[G1 Android Development] gil80:
Thanks :)

hope it's solvable
[G1 Android Development] mattmanwrx:
That is where the icons are, yes?

For theme chooser we have managed to compile without the mipmap folders and then chuck them in after (as there are only 2 pictures in there)

HTH, Matt

Edit: didn't actually do that, just put the redirections in from mipmap to drawable... but that is for theme chooser...
[G1 Android Development] adude247:
still no answer for me...
[G1 Android Development] lotherius:
Okay, I'm *TRYING* to edit the XML in my Settings.APK.. Unfortunately, apkmanager is determined to keep me from doing it...

I have gotten as far as Decompile APK (With Dependencies), and then selected twframework-res...

Then it throws up its hands and says the directory already exists!

Please make your decision:10
Drag the dependee apk in this window or type its path
Example to decompile Rosie.apk, drag com.htc.resources.apk in this window
Type input: C:\Android\apkmanager\place-apk-here-for-modding\twframework-res.apk

Decompiling Apk
Destination directory (C:\Android\apkmanager\other\..\projects\3Settings.apk) al
ready exists. Use -f switch if you want to overwrite it.
"An Error Occured, Please Check The Log (option 21)"
Press any key to continue . . .

Duh... the directory exists.. obviously it does, that's where the FILES are that you are supposed to DECOMPILE...

EDIT:

Okay... in case someone runs across this... I had to make a change in the Script.bat to add the requested -f on the apktool... and then it turns out the dependency wasn't twframework-res as suggested in some posts I'd found, it was framework-res...

We'll wait to see if it can actually recompile...
[G1 Android Development] :
If you are using notepad++

line 491 should read:

java -Xmx%heapy%m -jar apktool.jar b -f "../projects/%capp%" "%~dp0place-apk-here-for-modding\%capp%"

Or you can just download this:

http://www.multiupload.com/UD6BNK74G4

and replace the Script.bat

:-)
[G1 Android Development] kkq29:
Can someone tell me ,why evrytime i decompile then compile it again but i didnt do anything just decompile and compile it again ,i got new size ?
[G1 Android Development] nitinvaid:
error

java version "1.7.0"

Java(TM) SE Runtime Environment (build 1.7.0-b147)

Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)

Could Not Find D:\Downloads\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk

Could Not Find D:\Downloads\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk

I: Baksmaling...

I: Loading resource table...

I: Decoding resources...

I: Loading resource table from file: C:\Users\Administrator\apktool\framework\1.apk

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

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

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

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

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

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

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.data.value.ResReferenceValue.getReferent(Unknown Source)

at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)

at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(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)
[G1 Android Development] kkq29:
Try to restart your computer ;) maybe can help you
[G1 Android Development] mattmanwrx:
Decompile with dependee (option 10), and drag the framework-res file onto apkmanager when asked... it needs framework-res to decompile.. (i think).
[G1 Android Development] $omator:
no need to add -f just empty the folder it writes about =)
[G1 Android Development] :
I never thought about that good stuff
[G1 Android Development] tpike:
i have gotten the same error when ive used framework-res instead of twframework.

interested in your update.
[G1 Android Development] Daneshm90:
Right. So the tool when u compile creates it inside the "place-apk-here-to-modify" folder, in essence the folder u originally place the apk to be modified.

1. When compiled its gonna b called, packaged-unsigned

3. When signed its gonna be called pacakged-signed.

U dont even need to go inside that folder to place/use it. U can install/push to ur phone straight from the script ;)
[G1 Android Development] Daneshm90:
Some users were experiencing issues where the compression level at which the apks were compressed was causing issues. So this is wht i've added to apk manager 4.6 :

- Added an option to select custom compression level (0-9) #Option 18

- U can monitor the status of ur logging mode / compression level. Its right above the main menu
[G1 Android Development] rori~:
Wow, this script is awesome:)..will test some files...
[G1 Android Development] bkmo:
Linux Ver

I just tried the Linux version on my Ubuntu 10.04 workstation and the script does not add "other" to the PATH and as such *****es about missing programs. I know I can manually change things, but wanted you to know it is not working here as scripted. Thanks
[G1 Android Development] Daneshm90:
Hmm. I dont have a linux machine to try it on. I still hope farmatito keeps working on it. But when im reading his script he does do

PATH="$PATH:$PWD/other"

Is that not what i think it is ?
[G1 Android Development] bkmo:
It looks like I was wrong. I assumed it was not adding the path when it said that aapt was not in the path. Further investigation showed "permission denied" running aapt directly. I had to chmod 755 all the executables in the "other" folder and it works fine now. May want to add this to the OP. Thanks for the great work on these scripts BTW.
[G1 Android Development] Daneshm90:
Ah k cool. Yea it wasnt how farmatito posted the scripts, i placed the files myself in the folder. K cool ill post that. Thanks for the info :D

Changed op and gave credit where its due.
[G1 Android Development] mdneilson:
I saw this thread...

...and I jizzed in my pants.

Anything that reduces steps is a +1 in my book. Thanks!
[G1 Android Development] jdwis:
thanks for such nice work..

will try soon..

very good work done...
[G1 Android Development] rori~:
Something is wrong here :confused: with Apk Manager 4.6 and my PC settings (Win7 64)...

It doesn´t work constantly.

Sometimes a can decompile, edit and compile.

Rarely I can compile and most of the times, the apk.file just dissappears from the "place-apk-here-for-modding".folder when I click N°9 :)

Can anybody point me in the right direction?
[G1 Android Development] Daneshm90:
As in the first question script asks u when u run it ? clear [y/n] ? yea i need to make it more fail-proof, currently if u enter anything besides n then itll clear ur directories lol. Cuz i did "if input is n then skip otherwise clear" ill change that to "if input n then skip, if input y then do it" :D Thnx
[G1 Android Development] rori~:
:) ok

But right now I decompiled CalendarProvider.apk successfully ...

Did not edit/change anything

Compiling doesn work!

(I did that around 30 time today :p, a couple of times it worked...)
[G1 Android Development] Daneshm90:
Btw these are the changes so far ive made to apk manager 4.7.

- No more logging mode on/off (when u run the script it creates a log.txt in main folder and data/time stamps it everytime u run the script and records every action / reaction ;))

- If an error occurs, itll pause u and tell u that an error occured and tell u to look to the log.

- U can either check log by opening in a text editor, or by selecting option 19.

- Java heap size, if ur editing a big apk then sometimes when decompiling/compiling it'll get stuck, so i made it so u can select a max heap size in megabytes and the current heap-size is always displayed right above the menu.

Let me know wht else ud like to see.
[G1 Android Development] Daneshm90:
Try turning logging mode on and see where it goes wrong.
[G1 Android Development] rori~:
Please make your decision: 10
Building Apk
I: Checking whether sources has changed...
I: Smaling...
C:\Users\rori\Downloads\Apk_Manager_4.6\other\..\out\smali\com\google\common\base\Functions.smali[0,0] null
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: java.io.FileInputStream@1ac02158
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)

Well, I dont know..
[G1 Android Development] Daneshm90:
Hmm i get the same error. K i g2g somewhere for 1hr, be back after. In the meantime try manually doing it using apktool and see if u get the same error, id assume u will.
[G1 Android Development] rori~:
yes, same with apktool.
[G1 Android Development] Daneshm90:
Hey, i posted apk manager 4.7. Try with it and see if it resolves ur issue. Particularly play around the heap size property.
[G1 Android Development] FrozenData:
$ ./Script.sh

The program aapt is missing or is not in your PATH,

please install it or fix your PATH variable

Where can i download aapt?

OptiPNG was also missing, but i found that and installed it.

Any help is appreciated.
[G1 Android Development] Daneshm90:
Instructions (Linux):

- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)

- Open terminal and change-directory to apkmanager (Easiest way is to type "cd ")

- Chmod 755 Script.sh

- Chmod 755 all files apps inside other folder (thanks for the tip bkmo )

- Run script by typing ./Script.sh

- Minimize the script

- Edit files inside the out folder

- Maximize the script

I think u missed the bolded step ;)
[G1 Android Development] gil80:
Anyone :D
[G1 Android Development] Mekrel:
You need to update your android-sdk in order to get the latest aapt executable, that's where the main error is.

I had a similar issue, and I've now updated to the latest SDK tools (number 12 if I remember correctly).

Hope this helps?
[G1 Android Development] gil80:
I have the latest android-sdk-windows downloaded from here: http://developer.android.com/sdk/index.html

I had to copy to the APK manager folder these 3 files:

adb.exe

AdbWinApi.dll

AdbWinUsbApi.dll

in order to get the console running without errors. I finally was able to decompile, but when I recompile I still get these errors.

Also, here is my latest log file.

Appreciate your help :)
[G1 Android Development] tommytomatoe:
You need aapt.exe also. And you have to consider this about aapt. The latest aapt is meant to package honeycomb (API 12 or 13 I don't recall) and if you playing with gingerbread apks it won't work. You need to use platform tools from API 10. I don't use windows but I have the aapt from that API in my email (a friend had same issue so I sent him a copy from my windows installation). I can send it to you if you want.

But to get API 10 yourself just get into the Sdk manager. Uninstall the newest APIs. Then navigate to your Sdk folder and delete "platform-tools". Go back to Sdk manager and select to install the Api 10 for android 2.3. Now you will have correct tools. Move the aapt.exe to wherever the tools are for apkmanager. That's it.
[G1 Android Development] gil80:
I've done as you said. I removed all the API's I had and deleted the platform-tools folder.

I than downloaded once again API 10 which has dependencies with API 12 and 13 I think.

After doing so, I copied the aapt.exe file from the newly created platform-tools folder to the APK MANAGER folder.

I launched Script.bat and decomplied framework-res.apk file. After that I tried the recompile option but it didn't work again.

I'm attaching the log once again.
[G1 Android Development] Bamba1260:
Hey guys, having a little issue. I am trying to modify a SystemUI.apk from an evo 3d rom. I can extract apk, make all my edits to the .png, and then zip it. It installs and everything is grand. However, I am now trying to make xml edits. Of course, when you simply extract the apk it doesnt form the xml correctly so I decompile it (option 9). However, when I do I get two errors. Well, one on the decompile and one on the recompile.

home/mark/apktool/framework/1.apk is a non existent path. I have apk manager in /home/mark/androidsdk/apk

Decompile:

I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: /home/mark/apktool/framework/1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x010300a3
S: Could not decode file "drawable-hdpi/status_bar_close_on.9.png" to "drawable-hdpi-v4/status_bar_close_on.9.png"
S: Could not decode file "drawable-hdpi/status_bar_close_on_2.9.png" to "drawable-hdpi-v4/status_bar_close_on_2.9.png"
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x0205001a
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x02050029
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x0205002e
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x02050029
W: Could not decode attr value, using undecoded value instead: ns=android, name=textSize, value=0x02050029
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info.

Compile:

Please make your decision: 10
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Unknown Source)
... 5 more

I believe that it is saying that the SystemUI.apk depends on some framework, but never gives me an option to reference that framework.

Any ideas?

Thanks
[G1 Android Development] supetawesomedude:
Could someone please compile this apk and repost it for me?? PLEASE?! Because my apk manager keeps giving me errors, because I am trying to change the little status bar icon that shows up whenever i use GO Keyboard. I've also uplaoded the .png file i would like to use instead of the green leaf. If someone could either do this for me or just compile and sign the zip file ive attached, i would be very thankful :DD

THANKS!
[G1 Android Development] CPCookieMan:
Help! I have this java error any time I try to compile or decompile anything. What should I do!

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(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.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(Unknown Source)
... 5 more
[G1 Android Development] sneaky_zekey:
so whats the newestapk manager for linux/ubuntu. doesnt look like op has been updated
[G1 Android Development] OrcoX1iSE:
I've nearly same problem. SystemUI.apk have dependacies on com.htc.resources.apk, so you've to use option 10 to decompile SystemUI and give the path of com.htc.resources.apk to the script when it ask to (I put com.htc.resources.apk in C:\, so it's easy to write the path).

Otherwise, I've problems in recompiling SystemUI, 'cause APK Manager generate errors and don't know why!!!:mad::confused:

Edit: Thanks to Google, I found this on the web:

"First place the framework-res.apk, SystemUI.apk, Browser.apk,

and the apktool.jar from the APKManager 'other' folder all onto

the root of your PC's C drive...

then open CommandPrompt and type the following commands...

java -jar apktool.jar if framework-res.apk

java -jar apktool.jar d SystemUI.apk decompiled

that will allow APKManager to then be able to decompile any

SystemUI.apk from any ROMs"

I tried just few minuts ago, and APK Manager have done all his job without any error!!!
[G1 Android Development] Rolando.Ramiro:
i get an error;

'error:unable to access jarfile apktool.jar'