yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] Tribal123:
I'm trying to mod phone.apk from a Galaxy S2 9100 Stock Rom KG3 in order to fix the increase ringtone.

When i try do decompile phone.apk it says couldn'f find proper framework files.. can someone explain me ho to fix this?

Also i need adb?

I haven't because i wish to put the modified phone.apk by root explorer....
[G1 Android Development] dfskevinohyeah:
help!

trying to sign an apk i get this any help please? :)

Could Not Find C:\apk_manager_4.9\place-apk-here-for-signing\../place-apk-here-for-signing/signed.apk

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

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

at java.util.zip.ZipFile.<init>(Unknown Source)

at java.util.zip.ZipFile.<init>(Unknown Source)

at java.util.jar.JarFile.<init>(Unknown Source)

at java.util.jar.JarFile.<init>(Unknown Source)

at com.android.signapk.SignApk.main(SignApk.java:437)
[G1 Android Development] |ErosizeD|:
If you are under windows, extract the apk with dependences, and when ask for framework, put the framework of the phone. samsung twresources.apk htc com.htc.resources.apk ....etc

press ok and i think will work.

under linux i dont know how works, but i think will be similar.
[G1 Android Development] Joe31:
blur-res.apk

Hi everyone!

I decompiled / recompiled framworks file (blur-res.apk) is succesful!

Problem!

Decompiled: -> in res/values/public.xml file ids=0x03010009

Recompiled: -> in res/values/public.xml file ids=0x02010009

Recompile blur-res.apk not working in the ROM! :(

Any idea??

Thank you reply
[G1 Android Development] Tribal123:
Many thanks, i'm under windows!

The framework file could be /system/framework/twframework-res.apk ? Where and how i have to put this file?
[G1 Android Development] kristjanp:
Help anyone?
[G1 Android Development] TheNewGuy:
Re: Above poster.... this looks like an error I got when I used linux...I think it is a prob with brut/java/aapt/sox/or one of the other dependent programs that apk_manager uses...

I had the same prob.. but when I tried on windows it worked fine. Sorry if this is not much help. I am not a linux expert.
[G1 Android Development] kristjanp:
Im using Windows 7
[G1 Android Development] creeve4:
Anyone....?
[G1 Android Development] roscoenr:
it is for all apps it optimizes all the images and zipaligns the apps
[G1 Android Development] dfskevinohyeah:
i just know its a small dumb little fix anyone please? :)
[G1 Android Development] rockypr:
Dumb question did you put the file in the signed folder?

Also you can download Zipsigner from the Market to Signe the app
[G1 Android Development] kantk20111:
HELP PLEASE!

I'm new to this thing.

So I decompiled it fine and it made a folder called facebook.apk (I was decompiling the facebook app)

I do my changes and put the facebook.apk folder into the modding folder so I can compile it.

But when I press 22 to select my project, it isn't there??

I take my original facebook.apk and put it in and select it as a project and try compiling that, but it says it's not extracted and I need to extract it.

My facebook.apk folder I got is not compiling since it's not on the project list (it only reads apks)

How do I compile the facebook.apk folder that was created when decompiling it?

Thanks for any help.
[G1 Android Development] kristjanp:
Can anyone help me?
[G1 Android Development] Ajthescot:
Have you installed your framework?.

Are you using option 10 to decomp with dependancies?.
[G1 Android Development] Ajthescot:
place facebook.apk into modding folder

decompile

open projects, edit files

open script select your compile method . no need to move files around

compiled files appear in modded folder as unsigned or signed depending on what options you use.
[G1 Android Development] kristjanp:
What do you mean install my framework?

edit:

tried to install framework with apkmanager but gives another long error script
[G1 Android Development] k0sh:
Here is the thing u should do

If its given u error means u missed something like ";" or any other symbol

Or u edit something is not correct

A tips

When u.modied the framework delete the resource and res folders from it and take them from unsignedframework and put them in the original framework

Do this with all the things u modify ;)

Hope the OP add this to his first post

Referring to system apps and any app u edit

Cheers

Sent From Hell To Take Your Soul
[G1 Android Development] Johnsondr80:
Try this.

Delete the public.xml from the project and THEN recompile.

It Will build a new one for you.

sign up for dropbox using this link to get 250mb free and help fusion at the same time.

http://db.tt/cCn3zrY

presented by Xdapremium app
[G1 Android Development] Ajthescot:
copy your apktool.jar from the apkmanager 'others' folder to your C drives root directory.

also copy the framework-res.apk and systemui.apk from your rom to root of C

open a command promt to your c drive.

if using windows 7 hold shift and right click on local disc c: open command window here. nice little short cut you can do on any folder.

enter this

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

and then

java -jar apktool.jar d SystemUI.apk decompiled

now you should have no problems with future systemui.apk's

you can delete the files from C: after doing the above

also in your scripts you are decomiling files that have previously been modded as they have signed and unsigned before them were they compiled without errors before hand.

id recommend decompiling stock files to test your tools.

sorry if thats not much help as i dont really understand the errors .i just know how i make it work for me without errors.
[G1 Android Development] kristjanp:
Thanks man, i now decompiled my systemui.apk easily...:)
[G1 Android Development] creeve4:
Just to make sure I understand, Zipaligning is not necessary if optimization is done?
[G1 Android Development] roscoenr:
Batch optimize give you the option to zipalign
[G1 Android Development] Treken:
Forgive my ignorance but I tried to edit the settings menu from a rom that was ported that has 4G and the carrier Sprint in the menu. I decompiled and edited just the 4G stuff in the res/strings.xml and the smali/com/android/settings/wimax/wimaxenabler.smali, and smali/com/android/settings/wimax/wimaxenabler$1.smali files and upon trying to compile I get the following message:

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

Any advice or solution? Thanks in advance
[G1 Android Development] donhu:
Im having a weird issue with apk manager:

I decompiled my systemui to make some changes to the staus bar and it went through with no complaints. I made the changes and followed the procedures to the T and recompiled it, everything went ok with that as well. However the status bar kept failing.

So i tried to zero in on the problem and did this:

Decompiled the systemui, recompiled copying over sigs and flash it. still the status bar failed. In other words, i decompiled the apk, made no changes, and just recompiled, copying over the signature and reflashed it and it failed.

Any help?
[G1 Android Development] Joe31:
Hi.

Thanks for reply.

I tried, it not work. ids=0x02...... :(
[G1 Android Development] TheNewGuy:
What do you mean it "failed" ? Do you mean your changes are not in the recompiled .apk? If so make sure you delete the files...(status bar) you edited from the "keep" folder during the compile process...

Also this could be similiar to the probs I was having with the .9.png's...when you decompile look in the projects folder... is the status bar file you are talking about listed twice? One a regular .png and one a .9.png? If so this is the prob... you need to fix the .9.png and get rid of the other one... I think you can turn the regular one into a .9.png using draw9patch... either way you will need to use draw9patch to fix it...then just inject it in using winrar and not apk_manager...then you can check it but decompile/recompile and make sure it works..

Hope this helps..
[G1 Android Development] Treken:
10 characters
[G1 Android Development] dreamsforgotten:
^^ I'm willing to bet you didn't decompile without errors as well, its a proprietary app and needs to be decompiled with a dependency in your case framework res.apk a easy way is to move the framework into the other folder, open a terminal, navigate in terminal to apk manager/other and type java -jar apktool.jar if framework-res.apk
[G1 Android Development] tommytomatoe:
Take your time sir. Peeps have lives.

Your apk did not decompile properly. That is your error. Apktool.yml was either not created or corrupted.

You will also need com.htc.resources.apk

Run apktool if on framework res and com.htc.res
[G1 Android Development] marriedman624:
Are you kidding, if a question doesn't get answered in the first 15 hours and/or the next 4 posts, it is obviously overlooked. Kind of like if they can't find a suspect in the first 48 hours after a homicide the chances of catching them goes down drastically!!

And we all know that nobody here does anything else but check the forums and answer questions!!
[G1 Android Development] rtbluver:
How do you fix this error! I cant get it to work!
[G1 Android Development] tommytomatoe:
Use m10 tools on sense 3.0 themes.
[G1 Android Development] tommytomatoe:
Oh your nerves!

Hehe. Btw hows the words with friends situation? I saw you laid down a big one against jbermi. I think its your turn :-)
[G1 Android Development] marriedman624:
Yeah, that was nice. And it's still your turn.
[G1 Android Development] Frooty:
Is there anyway to get apk manager 4.9 for linux? I think 4.9 for Windows has some features that could fix some annoying errors I get, but I'm on linux and would prefer not to have to install Windows in any way.
[G1 Android Development] tommytomatoe:
You did not decompile correctly...i thought we've over this.

Please install frameworks prior to decompiling.
[G1 Android Development] fezzy102:
what have i done wrong

here is my log what am i doing wrong and how do i correct it?
[G1 Android Development] Treken:
I don't know how I missed that one, but I did. Thank you very much Sir! :D
[G1 Android Development] tommytomatoe:
My pleasure. Let us know how it goes.
[G1 Android Development] dreamsforgotten:
I'll read the log tomorrow, I work all night, but wanted to say thanks for posting a txt file instead of pasting it in your post.
[G1 Android Development] AndroidGraphix:
Thanks for the software. I've been wanting to decompile apk's for a while now. Hopefully, this works with ease. I'll more likely be posting some questions later. Thanks again.

EDIT: This is exactly what I've been looking for. I definitely owe you a donation.
[G1 Android Development] drivenapollo:
Maybe someone can help me. I have been working on this for hours now. I have searched this thread and found 2 fixes but now i have another problem. I googled for 2 hours and found nothing.

I tried installing in Ubuntu, and all i get is adb not found. Changing path did nothing in ubutnu.

I tried in windows since a previous version installed no problem. Nope, Java and adb not found. I have set the path in windows but it only finds one. I have both paths in there with a ; between them I can get the script to say either it can't find java or adb.
[G1 Android Development] tommytomatoe:
To set up adb on Linux you will need to set it in your path.

to do so...you can use .bashrc or write a script in /etc/profile.d. The former is easier.

Download and install android sdk. Make sure sdk folder is named "android-sdk" and is on your HOME folder.

Run these commands:

cd $HOME
gedit .bashrc

A text file should open up. Scroll ALL the way down. Press enter to skip a line or two from the bottom of the last chunk of code. Then either type this in or copy and paste.

export PATH=${PATH}:$HOME/android-sdk/platform-tools/:$HOME/android-sdk/tools/

Save the file. Close and open a new terminal. Type "adb". Should work,assuming you installed the ask properly.
[G1 Android Development] evilvoice:
Please, can someone help. I am trying to decompile Phone.apk from the Evo3D and I have loaded both framework-res.apk and com.htc.resources.apk. I have read that I may need to load SystemUI.apk but no matter what I try, Phone.apk will not decompile. Any suggestions? I have tried dropping all 3 in the window, what is posted below is what happens when I do (notice it is only loading 2 apks)...so I am at a loss here...I dont know what else to try to get it to decompile

I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: C:\Users\Username\apktool\framework\1.apk
I: Loading resource table from file: C:\Users\Username\apktool\framework\2.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=
text, value=0x7f0d045c
W: Could not decode attr value, using undecoded value instead: ns=android, name=
text, value=0x7f0d045b
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x7f0d045c
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 So
urce)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown
Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(Unknown So
urce)
at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknow
n Source)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValu
e(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartT
ag(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unkno
wn Source)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown So
urce)
at brut.androlib.res.decoder.ResFileDecoder.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)
Press any key to continue . . .
[G1 Android Development] Perka:
Hi when I try to zipalign apks the script deletes them.

What do I do wrong?

Thanks
[G1 Android Development] v4nelle:
Linux version of apk manager dont start.

the other/sox is missing...why?
[G1 Android Development] dully79:
Do yourself a favour m8 and use the search, people are cracking down on it.
[G1 Android Development] v4nelle:
it was so simple :) i though it was missed

thx for your time!
[G1 Android Development] dfskevinohyeah:
Here's simple questions I just need easy answers too:

What does zipaligning apks necessarily do and what does optimizing them do?

and is it safe to do this to system apks like systemUI.apk or framework-res.apk?

thanks! :)
[G1 Android Development] dreamsforgotten:
Speeds them up for faster loading plus compresses them. Sure you can do system apps watch the compression level though is ones like phone.apk are crashing
[G1 Android Development] OSully:
So I pulled the swiftkey apk from my phone, and am trying to decompile it so I can change the dark theme to blue instead of green. I'm getting an error, though- not sure what to do. Here's my log attached.
[G1 Android Development] dfskevinohyeah:
if im not mistaking you can't decompile several apps straight from the market since they have specific frameworks different from the ones you use to decompile, wait for another more experienced themer chimes in because this is just my thought :)
[G1 Android Development] dfskevinohyeah:
Is apkmanager in the root of your computer C:\apkmanager

if not put it and check again
[G1 Android Development] adude247:
I've looked everywhere and can't find the answer, I'm trying to decompile a non system apk, ie, appbrain, I tried to decompile with option 9 but it won't do it, so I try to use option 10, same thing again. My question is on option 10 what do I type as the apps dependant, Ive typed everything with no change, also should anything else be in the other folder, I've read that I should have my ROMs framework-res file in there, please someone help...
[G1 Android Development] Quentin himself:
No, it was not in C:\

But i put it in C:\apk_manager_4.9 and same things happen. I attach the entire log ;)
[G1 Android Development] .ioannis:
Don't get why... I'm getting an error when trying to decompile Phone.apk (samsung prop)
[G1 Android Development] rachelm920:
Help! Log attached

OK I think I know what the problem is but I'm not sure. When looking in the log it says it is loading resource table from file C:\Users\Rachel M\apktool\framework\1.apk

I think the problem is in the "Rachel M" part because my user name is two words... I could be wrong however so I am posting the log just in case. It will not let me decompile SystemUI.apk even when I pull it directly off of my phone with a fresh ROM install.

:confused::confused::confused::confused::confused::confused::confused::confused::confused::confused::confused::confused::confused::confused::confused::confused:
[G1 Android Development] rachelm920:
I'm pretty sure the Rachel M is the problem because I ran it on another PC with a single word user name and do not have the decompiling issue...

However on my other PC

1 - My log wont work

2 - I get a compile error I was able to copy this text from the window

Anyone know why my log wont work? Every time I press 21 I get a message saying "'signer' is not recognized as an internal or external command,

operable program or batch file." and it doesn't show in my APK_Manager folder like on my other PC. I compared both folders and all the contents are exactly the same... and both PCs are WIN7 64bit...

I am trying to compile framework-res.apk from my ROM. I was able to successfully decompile and recompile after fixing the .9.png images that were messed up (they were put as regular png files), but once I copied all my images and xml info into the res folder, this is where I get the error.

Sorry for the ramble I'm trying to be as detailed as possible

-Rachel
[G1 Android Development] dully79:
Your right, it has to be one word or separated with a _

It looks like it's not running the program because it cannot find it, is your path variable set correctly?
[G1 Android Development] dully79:
@ioannis, have you apktool if twframework.apk ??

@quentin, have you apktool if framework.apk ??
[G1 Android Development] ldrifta:
does apk manager de-odex?
[G1 Android Development] Quentin himself:
I put apktool in a folder c:\apktool and apk_manager in c:\apk_manager. I just red again instructions and it's written that we should not touch any 9.png and my theme changes this kind of files. How to modify them then?
[G1 Android Development] .ioannis:
@dully78, yes I decompile using option 10 and use the the twframework file...
[G1 Android Development] dully79:
You need to install the framework you are trying to decompile.

For decompiling the samsung phone apk you need to install twframework-res.apk.
[G1 Android Development] .ioannis:
I used twframework-res , as a dependency while decompiling... what else is there?
[G1 Android Development] dully79:
I just installed the twframework and didn't have a problem when decompiling phone, contacts and a couple of other dependent apks.
[G1 Android Development] rachelm920:
User variable:

Path: C:\Program Files\Java\jdk1.6.0_25\bin

Temp C:\Temp

Tmp C:\Temp

System Variable

Path: C:\Android-SDK\platform-tools; C:\Program Files (x86)\Java\jre6\bin; C:\Program Files\Java\jdk1.6.0_25\bin;C:\Program Files (x86)\QuickTime\QTSystem\

Not sure how quicktime got in there. Probably installed itself when I downloaded it.

BTW ADB works fine from the command prompt no matter what folder I'm in. I use it all the time.

I changed my temp and tmp folder to C:\Temp just in case that was the problem, but I still get the same error and log.txt is not generated. It keeps saying " at brut.androlib.res.AndrolibResources.aaptPackage(Unknown

Source)"
[G1 Android Development] depulle87:
does any one know why I can decompile my framework-res.apk from android 3.2 but when I try to compile ( no changes made ) it gives me a error ?

Think HC 3.2 is to new to make changes is it ? I can upload log file if it is helpful.
[G1 Android Development] .ioannis:
I've selected Phone.apk but when I decompile by doing this:

I get

The log says:
[G1 Android Development] dreamsforgotten:
No it does not you need a deodex app or use a kitchen with deodex built in
[G1 Android Development] dreamsforgotten:
You mod a .9 using gimp or photo shop, add the .9 lines with draw 9 patch in the androids sdk. Then you recompile the patch in eclipse, read the guide in my signature, or find a stand alone app to compile them. Once done you add the images into your framework-res.apk never added them in when your using apk manager, keep those images stock but before your flash open the framework res and copy them in
[G1 Android Development] dreamsforgotten:
Why are you compiling new images if I'm reading you right, most likely that's your error compile your xml changes alone then if that's successful, copy your images in
[G1 Android Development] dreamsforgotten:
Try this instead, take twframework and place it in your c:\apk manager\other folder. Open dos and navigate to the same exact folder. In dos shell type java -jar apktool.jar if twframework-res.apk and hit enter. Then try again
[G1 Android Development] :
Here I've updated apk manager for honeycomb this works with both 3.1 and 3.2

http://xdaforums.com/showthread.php?t=1204996
[G1 Android Development] .ioannis:
Still the same.

Could you check my files on your setup? Do they decompile?

http://www.filesonic.com/file/1640913184/Phone-twframework-res.rar
[G1 Android Development] :
I'm actually on the go right now at work but is the apk you're trying to decompile stock or modded already? The apk needs to be as close to stock as possible.
[G1 Android Development] .ioannis:
It's from a custom ROM, but author doesn't mention of the Phone.apk being modded. (S.U.R.F.A.C.E. rom)
[G1 Android Development] depulle87:
thanks man gonna try it right away

edit : works like a charm asus eee pad transformer

edit 2 : eee pad boot looped so not working yet
[G1 Android Development] :
My suggestion is take the stock apk from the rom u are modifying decompile with apk manager to do ur XML editing or whatever then compile it sign it and then use a program like 7zip to do all of ur drawable folders with pngs. There might be easier ways but that's what I do and works every time :-)
[G1 Android Development] rachelm920:
I get like 50 errors like this one below and I didn't even edit public.xml!! Only color and drawables!!

C:\APK_Manager\other\..\projects\framework-res.apk\res\values\public.xml:2830: e
rror: Public symbol drawable/stat_sys_vp_phone_call_on_hold declared here is not
defined.
[G1 Android Development] .ioannis:
Extracted the apks from a STOCK firmware, I deodexed them, tried again and still nothing.
[G1 Android Development] dreamsforgotten:
Your apk is getting corrupt my systemui.apk did the same I had to decompile a fresh stock framework res and paste the drawable-hdpi over my current project and all was well my guess is you have corrupted .9.pngs from the start
[G1 Android Development] CleveRuse:
O

LOL ....join the club;) I'm always trying to hunt down a bad patch or 50

I've been receiving the same exact error. I have noticed that fixing one single bad .9.png can fix all 100+ ".xml......area is undefined" errors tho. Now I try to decompile, check specifically for 9patch errors, fix with another app, then re-decompile.