yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] SimsDelt:
So after I finish editing the xml files for the framework-res.apk I ask it to Compile again... it has a error, I press a key, tell it Yes its a system apk... and then hit Yes at the next prompt... then it does its thing... the size is about 100kb smaller than the original... when installed on my phone it boot loops it... (all I changed was the color of the clock in the notification bar)... so I decided to run a test... grabbed a clean framework-res.apk and decompiled it... then w/o doing anything, I asked it to Compile, same error again, same boot loop error (w/o changing a single thing)... running a Droid X and the framework-res.apk is from what is currently running stable on my phone... when I check the log it says it cant find some .9.png files and renames them .png ( guessing that might be the problem) just wondering if someone has an answer for me.... I really want to start themeing and this is a huge road block if I can't compile things back like they are supposed to be...
[G1 Android Development] {davros}:
Make sure you #12 sign apk , and let me know what happens cuz I get the same issues in windows....
[G1 Android Development] fernando sor:
Decompile and look in your image folder. Drawable-hdpi. If there are any images not displaying then replace those and decompile again. When you get an error check the log ( option 21 ) that tells you why
[G1 Android Development] fernando sor:
Signing has nothing to do with it. The framework.apk has errors. You cant continue till the error is fixed
[G1 Android Development] SimsDelt:
I even added the files directly from res/drawable-hdpi from the original framework-res.apk into the "project" folder... then edited layout/status_bar.xml so I could change the clock color... then went to compile, still same error and same problem making the files much smaller than the original... I even opened up the framework it created and it doesn't even have the status_bar.xml in it... I'm gonna include a copy of the log so someone might be able to help out... also, if there was someone who could walk me through the process 1 step at a time that would be super helpful. If possible...

Error Log
[G1 Android Development] fernando sor:
it wont if you didnt delete it. but when you get errors it doesnt matter. it wont work.what phone are you on? most clock color is changed in the services jar. other notifications are in three xmls in layout-hdpi not layout. post your framework.apk and ill look at it
[G1 Android Development] fernando sor:
im surprised you could even decompile. your 9pngs are wrong. where did this framework.apk come from?
[G1 Android Development] {davros}:
that i did not know.... thank u sir
[G1 Android Development] fernando sor:
almost every time i try to recompile a framework or app and i get errors it is because of images. the first thing i do now is check the drawable-hdpi folder before i do anything. if you have images that are represented by a the generic png icon and not displaying then that is an error right there.
[G1 Android Development] {davros}:
that would explain my boot loops, not the xml edit, werid cuz im not even touching the pngs, but now i know wtf is going on
[G1 Android Development] fernando sor:
Dude there are a lot of framework.apks out therr with bad images. I have some stock.images I keep just for decompiling and recompiling when I want to edit smali.or xmls.
[G1 Android Development] SimsDelt:
Here is the framework-res.apk ... I know its good considering I'm running this exact one on my Droid X (ROM is Liberty 1.0)right now... and I did delete the 1 xml file I edited from the keep folder and it still didn't pull it over. Guess its a learning curve, I'm not giving up though. Thank you for the help guys.

Red Liberty Framework
[G1 Android Development] fernando sor:
got it. will check it out tonight
[G1 Android Development] DaGunn:
Did you delete the resources.arsc file from the build folder? That is a show stopper if you don't and you made changes in the drawable folder.
[G1 Android Development] {davros}:
ok so wtf is this **** lol?

i tryed to say replace the public.xml but ya still same error, whats the fix for this? :mad:
[G1 Android Development] fernando sor:
jon you have 15 images that i changed out. almost all of your tabs which isnt uncommen were bad. ive seen that before. not familair with your rom are there supposed to be battery xmls in the drawable-hdpi folder? ive never seen that before.

edit: yeah those xmls go in your drawables folder not drawable-hdpi
[G1 Android Development] fernando sor:
ok jon it recompiles now. that doesnt mean you wont get errors if you edit something wrong. i just swapped out the bad images. i would pull those battery xmls if there not needed out of drawable-hdpi
[G1 Android Development] fernando sor:
you need to be more specific with what you did. you are getting an error on symbol space i believe. need to know exactly what you did
[G1 Android Development] {davros}:
Decompile,

Edited styles.xml

Retried to compile

here it is broken down and unedited styles has my edit in it
[G1 Android Development] fernando sor:
ok ill check it out
[G1 Android Development] fernando sor:
davros what was the code string in values/styles before you edited it? do you remember?
[G1 Android Development] heXacode:
Just a quick question, for the moment, is it possible to pull out an APK and integrate more font styles to choose from?

Like for example, Minimalistic Text (Devmil), only has 3 font styles to choose from. Is it even remotely possible to break his app down and insert more font styles into that app so I have more to choose from?
[G1 Android Development] {davros}:
<style name="TextAppearance.Widget.IconMenu.Item"parent="@style/TextAppearance.Small">

<item name="textColor">@color/bright_foreground_dark</item

oh before i edited it ya hold on

before............

<style name="TextAppearance.Widget.IconMenu.Item"parent="@style/TextAppearance.Small">

<item name="textColor">?textColorPrimaryInverse</item>
[G1 Android Development] fernando sor:
ill check it out but thats a 58k text page. lol. is this exact? your not lined up as the original.
[G1 Android Development] {davros}:
no its a bad paste... lol

search for ..... TextAppearance.Widget.IconMenu.Item with what ever yer using notepad++ etc, it will take you right to it
[G1 Android Development] fernando sor:
i didnt have any trouble making the code editim at a loss as to why your original framework was so large. usually that is to to higher res images which you dont have other then what seems stock. any ways it recompiled fine.

your original and unsigned mod are in here
[G1 Android Development] {davros}:
Awesome thx , ya I dunno why its Erroring out on me either, ya I thought 4.5 mgs was big also, I did the AOSP build on it. Still hella big tho.

Thanx man!
[G1 Android Development] fernando sor:
hey im getting killed by my partner could you tap the thanx button? lol
[G1 Android Development] murphys42:
Small files

when my apk is decompiled instead of java files I have small files. What are they? and how do I get them into java files?
[G1 Android Development] {davros}:
any reason why this ,,,, resources.arsc didnt get deleted?
[G1 Android Development] fernando sor:
,

huh?..
[G1 Android Development] {davros}:
Before you recompile it says to delete that file so changes take effect.....?
[G1 Android Development] fernando sor:
i thought i did. i use apkmanager every day. if i didnt my bad. i was at work.

im sure i did. the only change was in styles. thats all you can delete.
[G1 Android Development] fernando sor:
you know that it rebuilds resources.arsc right? you wont be able to flash without it
[G1 Android Development] {davros}:
Lol ya its still in there and it looped
[G1 Android Development] fernando sor:
well im not quite sure what your modding. i was working. just put your code line in. what are trying to do?
[G1 Android Development] {davros}:
I'm gonna see if I can get this to work, never had this much trouble with apkmanager, ever. It makes the menu txts white with black backgrounds for a ginger bread theme.

It didn't give you any errors when you went to recomple tho? Hmmm so I'm doing some thing wrong. I'll see what happens when I use the linux version and keep trying winders 7 also
[G1 Android Development] fernando sor:
so your inverting, ok. i know its possible. i invert apps but ive never inverted a framework before. it usually starts in styles tho sometimes in the manifest also
[G1 Android Development] rom-g:
Hi davros

Can you test with this one ?
[G1 Android Development] lllboredlll:
this may have been covered already but after a few searches within this thread i've come up with nothing conclusive

i'm editing a rosie.apk that contains -v4 folders.... when i decompile it drops the v4 and stays that way on the recompile.... the problem i'm finding is if i swap the resources file from my newly compiled apk to my original apk it will fc sense when i push it to the device..... this has me stumped.... btw this isnt the first time i used apk manager for editing ... more like the 500th time so i really have tried everything obvoius that i know of

additional info: the only edit i'm making so i can be sure its not some complex issue is I will go in and edit one line of text in the strings.xml to reflect my ROM's name
[G1 Android Development] fernando sor:
are you just wanting to write incrom on your all apps bar?
[G1 Android Development] lllboredlll:
no i need to theme it as well as rewrite some of the popup text
[G1 Android Development] fernando sor:
I themed mine to full transparency with 5 app drawer and custom writing in strings. Why dont you just use your recompiled rosie?
[G1 Android Development] lllboredlll:
because i'm adding code to open appfolders instead of the regular app drawer
[G1 Android Development] fernando sor:
ahhh. like the rosie in uncommen sense?
[G1 Android Development] SCIONTX:
When running the script I get the error message:

"Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file..."

Please point me in the right direction.
[G1 Android Development] lllboredlll:
yes and i got it... i modded apkmanager .bat file to -s on the decompile so it dont mess with the classes.dex and i also replaced apktool.jar with 1.3.1 so it dont do away with the v4 folders on the decompile either... then i deal with the classes.dex with my baksmali/smali tool as i've done all along on the jar files i've edited

big thanks to sk for guidance and the op for the tool itself
[G1 Android Development] lllboredlll:
you most likely need to update your java.... there are a few files(apk's) floating around that were compiled with newest java build so you will need it to decompile.... i think its java 6 update 22 you need ... there may even be a higher update build available
[G1 Android Development] feefeeboomboom:
ok guys i cant get this to work for the life of me..

i have the jre and jdk installed in c:\program files\java\jre ect ect

i have java in my path

when i try to batch zipalign my .apks, the script runs then deletes all the .apks in the folder..

the log is stating that 'zipalign' is not an internal or external command

following this it says the folder cant be located then the file path cant be located..

i dont get it lol..
[G1 Android Development] nicholas.willoughby:
APK Manager Error...

I finally got apk manager 4.9 to open without giving me an adb not found or java not found error, but now when I try to extract an apk, the window just closes, and doesn't export anything to the projects folder.

Does anyone know how to fix this, any help would be appreciated.
[G1 Android Development] fernando sor:
Make sure in properties its listed as an apk
[G1 Android Development] nicholas.willoughby:
Its extention is an apk, all I want to do is to be able to extract, edit the .png and 9.png and then rezip and sign the apk...
[G1 Android Development] fernando sor:
if your just editing images and 9pngs you can do that without apkmanager with draw9patch and eclipse. usually when the window closes like that in my experience the file is invalid, corrupt or mislabeled.
[G1 Android Development] nicholas.willoughby:
I use it cause its way faster, and I just figured it out after about 8hrs of trying to figure it out... Read all the pages here and tried removing the space in the name of the apk and thats why the script would close.

Thanks for your help though
[G1 Android Development] {davros}:
any one figure out the linux commands?
[G1 Android Development] johnny quest:
I've searched and searched and still haven't found the answer. I'm going out of my mind, losing sleep and my girlfriend is mad at me because I stay up late at night trying to get this right.

I've installed the apk manager when I put an apk in the modd folder or the project folder it keeps saying "adb not found" but now its saying "java not found" I've installed java several times but still nothing is happening. I'm trying to decompile apks so I can edit xml files and learn from them. Can somebody please help me before I get committed to an asylum. thank you.
[G1 Android Development] Daneshm90:
You need to get to first download the sdk. Run the exe or w/e and let it download the platform files. Then in the platform folder ull find adb.exe. Wherever u find this adb.exe just remember the folder path and add that to ur environmental variables as the PATH. Same goes for java, just download jdk and add its bin directory to your PATH.
[G1 Android Development] johnny quest:
thank you, ok but how or where can I find the bin directory on jdk? and there's a user variable and a system variable environmental variables. and it has a variable name and a variable value. how would I label the file in each? I did it before but I know I did it wrong. I did so much last night that I just gave up and had to do a system restore. thank you so much for your quick response.
[G1 Android Development] Daneshm90:
Ull find jdk in c: programfiles : java : jre : bin

As for path.... Look at attached photo
[G1 Android Development] johnny quest:
oh man, I am trying so hard, but I just can't get it. I put the sdk in the program folder and on the variables I'm putting:

Path

c:\program files (x86)\androidsdk\platform-tools\adb.exe

this is for the adb because I'm not getting the java issue so far.
[G1 Android Development] Daneshm90:
No your path should have

c:\program files (x86)\androidsdk\platform-tools
[G1 Android Development] shrooms90:
Hello,

really helpfull tool u´ve created :)

I have a little problem...

i decompiled the Browser.apk and made some changes. But somehow i cant recompile it. I tryed everything, decompile with/withot depencies.

Using the option to keep files i havent changed and not use it. If i do as the script tells me to (just delete the files ive changed from the "keep" folder. they just dissapear in the compiled apk

replace the files ive changed in the keep folder. so in the end i just changed one word in an xml to try if i did something wrong with editing, but still no luck.

Only thing that i was able to do is to replace a png and compile again.

Can someone tell me whats wrong? I dont get what the log is trying to tell me:(
[G1 Android Development] :
Error in compiling

So I have successfully decompiled twframework-res.apk and made the necessary adjustment per the directions from a post here on XDA, and whenever I choose the option to compile, I receive an error, and it asks whether or not this is a system apk. If I select NO, nothing happens. If I select YES, I get an empty unsigned version of the apk I was editing. What's happening? I have included a log for assistance. Thanks!
[G1 Android Development] {davros}:
4.8 works better lol
[G1 Android Development] shrooms90:
So do u think it will work if i change backt to 4.8?

Gonna try when im home...
[G1 Android Development] dr.m0x:
Ok this might be a stupid question but I'm noob at this.

Where do I set the PATH variable from linux?

EDIT: nevermind it was a stupid question

Just needed to look for it.
[G1 Android Development] johnny quest:
ok, there is user and there is system paths.

I changed the system path to c:\program files (x86)\androidsdk\platform-tools

and thats fine, but now its java's turn to be missing. its a see-saw battle. Now, how do I get it right for the java? because now that seems to be not found.
[G1 Android Development] johnny quest:
Ok, I got my avabox to work through changing the paths but don't know which one that I changed because it was the user one and the system one that I changed, but I know I changed the system path to:

path

c:\program files (x86)\java\jre6\bin

and it worked.

Now, I went to apk manager and now its giving me this pop up:

'mode' is not recognized as an internal or external command, operable program or batch file.

waiting for device

*daemon not running. starting it now on port 5037*

*daemon started successfully*

I don't know what this means. can you tell me whats going on now? thanks
[G1 Android Development] fernando sor:
Are you changing the configuration on the battery meter?
[G1 Android Development] PAINiNFLIKTA:
yea i'm having issues also when trying to compile. it decompiles fine and i can make my edits to the values/styles, but when i compile it always gives an error.

what i did was i took an untouched framework-res.apk out of a stock moment zip, decompiled it, then i compiled it back to see if it would and still get an error message.

what im trying to do is finish this gingerbread theme and i need the white text in the menu to finish. i already know what to edit, i just need to re compile.
[G1 Android Development] DarkestSpawn:
Yes but I found my error in the charge xml. Fixed it and it compiled.

But now when I push it back it reverts back to the old framework-res like I never made any changes. I checked and check but each time I push the new one it just kicks out the changes and puts the originals back. Is there something else I need to do?

My changes are default wallpaper, the battery pngs, the battery xml to apply 5 more pngs showing 10 30 50 70 90 percents, and the charger xml to show 10 30 50 70 90 percents when charging.
[G1 Android Development] fernando sor:
i just did a change on battery config and it was a *****. first you decompile the framework your going to mod. then add your battery images. recompile.

now add your resources.arsc from the framework with the config you want and again your battery images. decompile. now you have to add your drawable battery xmls but they also need to be decompiled when you add them. add your images again. recompile
[G1 Android Development] DarkestSpawn:
What do you mean add my resources.arsc from the framework with the config and battery images, and to where should I add those?
[G1 Android Development] fernando sor:
My bad. Not clear. You recompile with the images you want. Then add the resources.arsc and images to your original framework. Your tech using the same framework.apk. In fact you have to. Then you add the battery xmls already decompiled to your framrwork. Add the images again. Recompile.

Bad seeds custom.
[G1 Android Development] DarkestSpawn:
http://xdaforums.com/showthread.php?t=724778

Im trying to do the 1% battery stats on the droid x stock rom. Do you know if you can do the 1% steps on the stock droid x rom?

Im confused on your steps.

De-compile

add images

re-compile

drag resources.arc and images from unsignedframework-res to original framework

decompile

add battery xmls and images again

recompile

is that correct?
[G1 Android Development] fernando sor:
Yes but you need to decompile the xmls from a framework that has the config in one hundreds. You add the decompiled xmls to your decompiled framework with the images. Remember to delete whats been modified

Bad seeds custom
[G1 Android Development] fernando sor:
Took me quite a few trys to get it right

Bad seeds custom
[G1 Android Development] johnny quest:
OK, finally I got everything to work, I modded my images, xml but now I'm having problems compiling it. I don't know if I'm doing it the right way though.

well, its all in a folder format what do I do next to get it back to an apk for my phone? I watched the video but was still lost because it doesn't show how you got the file back to an apk. unless I missed that part. Please help me, I managed to get the java and apk manager paths on my own at this point I'm lost. please please somebody.. thanks.
[G1 Android Development] momashi:
Not working for me on Linux,

using it to compile, here are the errors:

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

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.DirectoryException: java.util.zip.ZipException: error in opening zip file

at brut.directory.ZipRODirectory.<init>(Unknown Source)

at brut.directory.ZipRODirectory.<init>(Unknown Source)

at brut.androlib.res.util.ExtFile.getDirectory(Unknown Source)

... 5 more

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)

... 8 more
[G1 Android Development] johnny quest:
someone told me to use "eclipse" to compile and the file back to an apk but this is what I'm getting.

I managed to edit the xml's but not able to compile it to an apk to install back to my phone. I tried to just copy over the old xml's and then use avabox to sign it back to my phone, but when I tried to open it on my phone it says "parse error"

ok another question, I ran into another problem. I reinstalled Eclipse and I'm getting this message:

"Failed to load the JNI shared library : c:\program files (x86)\java\jre6\bin\client\jvm.dll

what does this mean? another question: on the variables can I create the variable name as Path eventhough there is one already? to put another string on the Value?

I'm afraid that I may start all over again trying to install the apk manager and java.

here is the code I'm getting:

'mode' is not recognized as an internal or external command,

operable program or batch file.

java version "1.6.0_23"

Java(TM) SE Runtime Environment (build 1.6.0_23-b05)

Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)

Could Not Find C:\Users\Johnny\Desktop\apk_manager_4.9\place-apk-here-for-signing\../place-apk-here-for-signing/signed.apk
[G1 Android Development] johnny quest:
Ok Come on man, I've been busting my brain on this and its just killing me. I realized that this whole process works with the decompiling/compiling/and signing an apk if you don't edit anything.

I've edited my images and xml's and put these back to its proper folders and tried the process and NOTHING happens.

I press 22 on the list choices and its asking for "choose the app to be set as current project" enter its number:

I'm getting nothing it just takes me back to the choice menu. My friend says that each project is given a number but I'm not getting anything. What gives man, I'm almost there but falling short. I am really losing sleep just trying to get this. Please and I mean PLEASE help..........
[G1 Android Development] fernando sor:
you put the apk you want to modify in the modded folder. hit the script. a screen pops up with every apk that is in that folder. you hit the number next to the apk you want to modify.select a number. you are now on that apk back at the main screen. choose what you want to do. to decompile select option 9