[Q!]Bootloop after changing framework-res.apk - Desire Q&A, Help & Troubleshooting

Ok, so i modded about 6 png's that are for the notification bar.
However, when i add them to my used framework-res (no problems at all) my phone get's stuck in a bootloop.
After a quick question in the ROM threat, brady1uk mentioned the file size.
so i checked them, and before i modded them they were a total of 43kb, but now they are 143kb!
Could this be the problem of my bootloop, and if yes, how do i reduce the file size?
*added the status_bar png's*

I don't think it's the file size. Let me ask, when you "add them to your used framework-res" how do you do it? Did you extract the .apk then re-archive?

ephumuris said:
I don't think it's the file size. Let me ask, when you "add them to your used framework-res" how do you do it? Did you extract the .apk then re-archive?
Click to expand...
Click to collapse
I open the framework-res whit winrar, and i just drag and drop my custom files in there with out extracting it.

ok, so i replaced my new png's whit the old ones in the hope my phone would work again, but it didn't
Now i'm totaly clueless...
If someone could take a look at what i have combined and why it doesn't work it would love it (using lee droid 1.9A)
*sleeping*

dragonithe said:
ok, so i replaced my new png's whit the old ones in the hope my phone would work again, but it didn't
Now i'm totaly clueless...
If someone could take a look at what i have combined and why it doesn't work it would love it (using lee droid 1.9A)
*sleeping*
Click to expand...
Click to collapse
as all is failing i would suggest getting the original framework-res.apk - before u ever touched it (download leedroid rom again if you didnt back it up). And then use either APK Manager or Theme Pro to decompile the apk, then mod away and change everything you want then use APK Manager or Theme Pro to compile it back up. Thats how I do it. I think there is a chance using Winrar to just pull out the files and add them back in has currupted it somehow

brady1uk said:
as all is failing i would suggest getting the original framework-res.apk - before u ever touched it (download leedroid rom again if you didnt back it up). And then use either APK Manager or Theme Pro to decompile the apk, then mod away and change everything you want then use APK Manager or Theme Pro to compile it back up. Thats how I do it. I think there is a chance using Winrar to just pull out the files and add them back in has currupted it somehow
Click to expand...
Click to collapse
ok, so i did this, but now when i flash the .zip i get a error [ E:Failure at line 9: run_program PACKAGE:check_data_app instalation aborted.]

Ok, so after failing to create my own apk file i pulled it from my desire and added the 6 files to it.
adb push, reboot.
And it gets stuck in a bootloop...
So ok, that failed, but i had the pulled framework still on my computer, so i decided to push this file back to make it work again.
But now it's still stuck in a bootloop....
seems like my adb corupts the .apk or what could be the problem?

You shouldnt need to decompile it if your only making a few changes to the framework.
I use 7-zip to open the rom, navigate to the required apk, and open that archive then swap the images over, no need to delete the original, they will just get over written. Then press up or back within 7-zip. when you navigate out of the apk you were in 7-zip will say it has been changed, carry on, pressing back untill you are all the way out of the rom. Then resign the rom and flash it.
Ive never used apk tool to change images in the htc resources or the framework res and never had a problem.

dragonithe said:
ok, so i replaced my new png's whit the old ones in the hope my phone would work again, but it didn't
Now i'm totaly clueless...
If someone could take a look at what i have combined and why it doesn't work it would love it (using lee droid 1.9A)
*sleeping*
Click to expand...
Click to collapse
I pretty sure the framework in the zip you posted is not from Leedroid so theres your 1st problem. Unless you made more than just 6 png changes.

djmace said:
You shouldnt need to decompile it if your only making a few changes to the framework.
I use 7-zip to open the rom, navigate to the required apk, and open that archive then swap the images over, no need to delete the original, they will just get over written. Then press up or back within 7-zip. when you navigate out of the apk you were in 7-zip will say it has been changed, carry on, pressing back untill you are all the way out of the rom. Then resign the rom and flash it.
Ive never used apk tool to change images in the htc resources or the framework res and never had a problem.
Click to expand...
Click to collapse
I also sort of use your described methode, but istead of using 7-zip, i use winzip.
djmace said:
I pretty sure the framework in the zip you posted is not from Leedroid so theres your 1st problem. Unless you made more than just 6 png changes.
Click to expand...
Click to collapse
It could be that the base of the framework is from leedroid, but i added a theme to it (think it is NexTang-DJDroid).
used it for about a month w/o problems, then i changed 6 files in the framework. And nothing works anymore ._.

can you try flashing the stock leedroid fw-res.apk to see if you get out of the bootloop? if you can do that, then at least you have a fallback plan.
and instead of flashing it, try using:
Code:
adb mount
adb push framework-res.apk /system/framework/framework-res.apk
I have never had any problems doing it that way.

I had the same problems. But i tried to make a flashable zip file and this work very fine..
And remeber you can not just replace a 9.png file maybe this is your fault?

mista1982 said:
I had the same problems. But i tried to make a flashable zip file and this work very fine..
And remeber you can not just replace a 9.png file maybe this is your fault?
Click to expand...
Click to collapse
hmm,
could you tell me a bit more about that?

[GUIDE] how to make a flashable package (update.zip)
How to edit .9.pngs

nzdcoy said:
can you try flashing the stock leedroid fw-res.apk to see if you get out of the bootloop? if you can do that, then at least you have a fallback plan.
and instead of flashing it, try using:
Code:
adb mount
adb push framework-res.apk /system/framework/framework-res.apk
I have never had any problems doing it that way.
Click to expand...
Click to collapse
I have the same problem, could you tell me how to push the framework-res.apk step by step ( just press the power button --> ) . Sorry ....

dragonithe said:
Ok, so i modded about 6 png's that are for the notification bar.
However, when i add them to my used framework-res (no problems at all) my phone get's stuck in a bootloop.
After a quick question in the ROM threat, brady1uk mentioned the file size.
so i checked them, and before i modded them they were a total of 43kb, but now they are 143kb!
Could this be the problem of my bootloop, and if yes, how do i reduce the file size?
*added the status_bar png's*
Click to expand...
Click to collapse
Same thing happened to me!
I Wiped Cache, Dalvik Cache, but nothing happened!
I had to flash 2.3.6 Stock ROM via Odin, to make my phone work!

Related

[Updated] - How-to Theme Development

To create themes, or to edit themes to your liking, you will need a working knowledge of android, adb, how to resign apk's, knowledge of your own O/S.
Before you start be aware that you will may end up wiping your phone once, if not more. So lets go over the things that you will need.
You will need JF's RC30, RC8, or ADP1 V1.3, depending on what version you intend to create for.
Here is the link to these: http://forum.xda-developers.com/showthread.php?t=466174
You will also want to get the dev bootloader installed on your phone and to HIGHLY suggest everyone trying your theme to install it as well.
Link to dev bootloader: http://forum.xda-developers.com/showthread.php?t=455860
You will also need to resign all the apks located in /system/app and framework-res.apk located in /system/framework. When you push all of these to your phone.
JesusFreke was kind enough to build a custom signing tool for me that would allow me to right click on an apk and resign it from there. I am posting it here for others to use as well. Note that this is a courtesy of JF, so thank him for it. I cannot stress how much time this has saved me and will save you.
Here is the link: Http://www.FightForthePits.com/testsign(2).zip
Before using this you need to know how to set this up:
I will assume that you have the sdk downloaded and extracted somewhere(if not, do that now), extract both files to the tools directory of your sdk.
Now you will need to add the tools dir of your sdk to the environment variable CLASSPATH.(This is for XP, Vista coming soon)
To do this, right click on My Computer click properties, then choose the tab that says advanced. Click the button that says environmental variables. Go to system variables find the one that says CLASSPATH, double click it, go to the end of variable value. There should be a semicolon ; at the end. type in the path to the testsign.jar located in the tools directory of your SDK, for example the path to my testsign.jar was c:\sdk\android-sdk-windows-1.0_r1\tools\testsign.jar If CLASSPATH is not in your system variables then create it. Secondly, Find the system variable called PATH and add to the end of it, the full path to your sdk directory. For example, mine was c:\sdk\android-sdk-windows-1.0_r2\tools
Now right click the reg file that you extracted and choose to install it, or merge.
Now, right click an apk, do you see an option that says ResignApk? That's how you will resign your .apks and .zips.
If you find the right click menu not working for some reason you can type the following in cmd to sign your files: java testsign whateverfiletosign
Now through doing this you have done two things, first off you have made the resigning process extremely easy, secondly you will not have to cd to the tools dir of the sdk to use adb or any other tool in the sdk.
You will also need a version of linux installed or running vmware with linux, if you want to create, or edit, an update script, which will install the theme onto the users phone.
You will need to be specific in addressing what version your theme is for, RC8, RC30, or ADP1. Make sure every file gets signed. Make sure you test the update.zip before you release it.
Every .apk contains the images relating to itself. However, every apk has the ability to use the images in framework-res.apk. The images for every apk is located inside of itself. To find these images open up the apk, you can rename it to .zip or open it with an archiver of your choice, winrar, winace, etc. Then after opening the apk open the folder called res and inside of that there are folders that are named Drawable, drawable-land, drawable-port, etc. This is where the images are stored.
Ther are some things you cannot edit unless you rebuild the entire apk from source, which we will not go into here.(another tutorial, another time) Just know that at this time you SHOULD NOT edit, or even open images with the extension .9.png. If you do you will have problems...Trust me. These are special images called ninepatch images and android resizes these images to fit wherever android, or any other apk, needs it to. if you do open them or edit them they will no longer render correctly when resized. I believe that in order to edit these you must do so and then put them into the source and rebuild the entire apk.
Before getting started you must also realize that you cannot simply resign one or two apk's and stick them in your phone and expect them to work. You must resign every apk inside of /system/app and framework-res.apk and put them on your phone at the same time.
To simplify this process for you though, I have provided an empty update.zip which you can place all of your resigned apps into and use to update your phone to your custom theme. You can also download someonelses theme and use there files, since they are resigned already. It may also be easier to see what files do what and go where since they have already been edited and are easy to point out.
Now, your ready to start changing things up.
You will now need to open the apk, which you can do by adding .zip after .apk, effectively changing it to a zip. Note that if you are using windows you will need to unhide known file extension types. you can also use your favorite archiver such as winrar, winzip, etc.
See here to unhide known file extension types for Xp: http://www.mediacollege.com/microsoft/windows/extension-change.html
See here to unhide file extension types for Vista: http://maximumpcguides.com/windows-vista/how-to-change-a-file-extension/
After opening the apk go to res and copy the folders that have drawable in their name. Go to your desktop, or wherever, create a new folder called Images, or whatever. Open the folder, paste the drawable folders in there. Now you can see what the files look like without opening them. Btw, you may also want to add -frame, or -launcher, to the end of the folders you cope over to keep them separated from others.
Finally, you've edited the images put them all in the apk renamed it back to an apk and resigned it. Now it's time to push it to your phone and see the changes you've made.
Important! : Whenever pushing files to the phone NEVER do it while the phone is running. Do this in recovery mode! If you do this while the phone is running normally you will begin to lose space in /system.
So, boot into recovery plug your phone in and open a cmd prompt. From the cmd prompt type adb shell mount /system then type the following: adb push c:\whereveryourfileis\whateveryourpushing.apk /system/app (system/framework if your pushing framework-res.apk)
Now reboot your phone. If it doesn't boot, try doing a wipe, if that doesn't work reinstall an update and try again. There are alot of things people can do wrong, I can't explain them all here. If you get real stuck, you can ask for help here or contact me on Gtalk [email protected].
So now your theme is done and your ready to make an update.zip for others to install your theme.
I have created a template for you to make your own update.zip. Just download, add the system apps to app, and framework to framework. Zip it up, SIGN IT, TEST IT YOURSELF, and then distribute it!
Empty update.zip template: Http://www.FightForthePits.com/Androidstuff/update_empty.zip
If anyone has any questions please try asking for help in this thread before emailing me for help Usually I will respond to questions in this forum.
I hope this Tutorial has been helpful. I will add on to it as needed.
Stericson
Links of interest:
Downloading SDK: http://code.google.com/android/intro/installing.html
Using ADB: http://code.google.com/android/reference/adb.html
Working with ninepatch should be straightforward if you use the draw9patch tool included in the SDK. Documentation on usage here:
http://code.google.com/android/reference/draw9patch.html
JF could also save theme users a wipe by resigning /system/app/* and /system/framework/framework-res.apk in his builds with the test keys. Nice tutorial, btw.
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Stericson
Stericson said:
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
Click to expand...
Click to collapse
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Click to expand...
Click to collapse
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
thx stericson this will help big time how long before I can get resigned rc30 last night when you said all the apk. need to be resigned I was like this is going to be a long night but I see jf hooked you up save some big time with his resigning tool
jashsu said:
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
Click to expand...
Click to collapse
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Stericson said:
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Click to expand...
Click to collapse
The resigned apps have been released, each update file will resign all of apps in /system/app and framework-res.apk. However, these updates make no changes to them whatsoever...Meaning your phone will look just like a brand new phone without any modifications.
rc30 works thx Stericson made it easy for use
Issues with using the update.zip above
Hi all,
I just wanted to point out that after I applied the update.zip above and rebooted applications kept force closing randomly and constantly even through the initial setup (where you have to click the green android to start).
Prior to this, I had JF's RC30 1.3, and the engineering bootloader V2 no sigcheck.
First I did just a alt+s then a alt-w and alt+s. And still nothing.
I'm new to all this so I'm not even sure where to begin troubleshooting. Should I be using the HardSPL?
Thanks in advance and I appologize if this isn't the right place for this post.
Update:
After reflashing with JF's 1.3 RC30 and the problem persisted I noticed that there was a new release 1.31 and this has fixed the problem. I hope this helps anyone else who runs into the same problem.
I still don't know what went wrong though, can anyone shed some light on this? thanks.
Truly there's no telling, sounds like J'f's update fixed it. Can I ask what version you tested?
I would also like to announce that now, thanks to JF, again, you do not have to wipe your phone completely to apply the resigned app updates. However, you will have to re-enter your google info and your call history and other minor things will be gone, but all of your apps will be retained.
Stericson
Alright, I am a little confused........
So I downloaded testsign.zip and extracted it to the tools folder. Then I went into environmental variables and added CLASSPATH with the value D:\Android\tools\testsign.jar and now I am not sure what to do next. Can someone give me some clarification. And btw I am on XP but I can get on linux at home if I need it, but I am a total noob to all this stuff so be gentle.
I'm using http://www.fightforthepits.com/Androidstuff/update_Rc30.zip and have been encountering issues when the phone boots up. As soon as the initial phone setup comes up I get process force close errors, I extracted launcher.apk, edited the files I wanted, repacked it, signed it and then resigned the update.zip. Any ideas what I'm doing wrong? I'm already running JF's RC30 1.31
Did you repack it in linux? Did you resign Launcher.apk? Also, that update file was never meant to be used as a template for an update since it kind of wipes your phone. You should be using update_empy, to push your own theme.
If you want to do only one file at a time, flash that update(update_rc30) then adb push your file into system/app. There are lots of things that you can mess up, most of them are hard to catch too. At any rate, everyone who has made a theme can tell you it's not just a straight forward process, expect errors. I've had more than I count I know....
Trial and error is your best teacher
Stericson
Stericson said:
Did you repack it in linux? Did you resign Launcher.apk? Also, that update file was never meant to be used as a template for an update since it kind of wipes your phone. You should be using update_empy, to push your own theme.
If you want to do only one file at a time, flash that update(update_rc30) then adb push your file into system/app. There are lots of things that you can mess up, most of them are hard to catch too. At any rate, everyone who has made a theme can tell you it's not just a straight forward process, expect errors. I've had more than I count I know....
Trial and error is your best teacher
Stericson
Click to expand...
Click to collapse
Must .apk's be signed if they're pushed over ADB? I'm not running Linux, I'm repacking/signing in windows.
I also had the issue with force close when installing the resigned update from the first post, apps that shouldn't even run on start up were force closing.
Also the IM application was gone, had to do a wipe and go back to jf 1.31 to correct it
I will take another look at the update I provided...
Stericson
did you ever figure out how to change the text on the status bar from black to white?
to do that you have to rebuiuld the entire apk from source and edit an xml document
Stericson
has anyone tried making the icons bigger? I noticed they are 48x48 if we go bigger will that affect anything? Also has anyone been able to remove the text below the icons on the home screen? Oh and where is the tab located that has been made invisible?
*edit
well I tried making the icons bigger and it doesn't really do anything, they don't show up bigger on the screen. Might have something to do with the text underneath, not sure.
Kyeld said:
Must .apk's be signed if they're pushed over ADB? I'm not running Linux, I'm repacking/signing in windows.
Click to expand...
Click to collapse
yes they must be signed.

Sign apk's on mac os x

First of all: I'M SORRY FOR ASKING THIS!
But, I'm trying to edit some drawables in the framework-res and in a couple other apk's but my problem is resigning them. I followed this tutorial http://www.androiddevelopment.org/tag/apk/
I changed the .apk to .zip to open it and access the drawables but when I open the .zip file it opens it in another folder, not like winrar or whatever for windows. So after I edit what I need and recompress the file, I can't change it back to .apk. So I try signing the apk as a .zip but the signing tool thinks it's a update.zip and signs it that way.
Basically, is anyone able to successfully resign apk's on a mac? If so, how?
Thanks
make sure you rezip the files inside the folder, then either sign that zip or open the info window (command+i) and rename the extension to apk there.
circa85 said:
make sure you rezip the files inside the folder, then either sign that zip or open the info window (command+i) and rename the extension to apk there.
Click to expand...
Click to collapse
Yeah I just figured out I have to open the info window to rename to .apk. And now the signing goes smoothly.
This thread is a waste, sorry, I'm an idiot.
Actually, I'm still having an issue. Here is an example of what happens:
Say I rename framework-res.zip to framework-res.apk (after editing, and recompressing) and then I use the signing tool to sign framework-res.apk. If I change it back to .zip and decompress it, there are two files in it. There is a folder called "framework-res" and a folder called "META-INF". Nothing else. The AndroidManifest.xml is inside the framework-res folder. This happens with every apk I try to sign
what are u using to sign apk's on mac? I was tryin to get this working long time ago but gave up. them I found the method using automator and it resigns them but idk if it actually wrks. i tried editing stuff resigning and flashing but i got like 770 files unsigned. unless I just didn't know how to resign an update.zip properly..
jroid said:
what are u using to sign apk's on mac? I was tryin to get this working long time ago but gave up. them I found the method using automator and it resigns them but idk if it actually wrks. i tried editing stuff resigning and flashing but i got like 770 files unsigned. unless I just didn't know how to resign an update.zip properly..
Click to expand...
Click to collapse
I'm using the script in the tutorial I posted in the original post
The script just uses the Jarsigner tool. So I'm using Jarsigner to sign my apks
Oh ok. I might have to try this out. Question: what is the proper way of signing an update.zip after u edited framework.Res or. Apks? I'm confused when it comes to that. Must u resign every single file in the. Zip for it to work?
I went as far as rebuilding the apk, but not sure how to resign. I tried to install anyway without signing, but the installer hangs while checking for version and gives network error after some time. I found a http://code.google.com/p/signapk and tried to use it on mac, but seems like it needs to be run on android itself. When I tried to run it on android, I get permission error, though I did a chmod +x as su. Could you give some more details on where to get the tool and use it?

[Q] How to remove adw from cm6

hey im not sure if i am the right section but i tried to search but none of the solutions i have found worked please help..
I apologize if i am in the wrong section
dr690n said:
hey im not sure if i am the right section but i tried to search but none of the solutions i have found worked please help..
I apologize if i am in the wrong section
Click to expand...
Click to collapse
1) Download the following file: http://xeno.bemaniso.ws/Launcher2.apk
2) Place file on the root of your SD Card.
3) Reboot into recovery, same method that you use to flash roms.
4) Under Clockwork, select Partitions.
5) Mount System through Clockwork
6) Unplug and Re-Plug in USB Cord to device or else you won't be able to continue.
7) Open a command prompt or whatever you use to use ADB, type adb shell
8) cd /system/app
9) rm ADWLauncher.apk
10) cp /sdcard/Launcher2.apk /system/app/
11) exit
12) Reboot phone normally.
Next time you flash a rom use winrar or 7zip to open the zip (do not unzip or extract it!!!). Go to system/app/adwlauncher.apk and delete it. Then drag and drop whatever launcher you want to use. Flash the new rom and you're done.
KCRic said:
Next time you flash a rom use winrar or 7zip to open the zip (do not unzip or extract it!!!). Go to system/app/adwlauncher.apk and delete it. Then drag and drop whatever launcher you want to use. Flash the new rom and you're done.
Click to expand...
Click to collapse
I thought stuff like that never works. ROM's and any other files such as apk's are usually signed. Therefore any modifications won't work and the package is corrupt unless you re-sign it. At least in my experience.
Hayzie said:
I thought stuff like that never works. ROM's and any other files such as apk's are usually signed. Therefore any modifications won't work and the package is corrupt unless you re-sign it. At least in my experience.
Click to expand...
Click to collapse
Clockwork let us flash unsingned .zip files, there is an option and you choose if you want clockwork to check if the files are singed or not, and as long as you dont screw and move stuff where is not supposed to be your not gonna get an "installaion aborted" message.... i always do that to remove apps i dont use from system/app before i flash the rom and i've never had a problem
but back on topic... yeah you can do what the second post says, or if you dont want launcher2 just install the launcher you want to use from the market or sdcard if you have the apk, set it to deafult home app then go to recovery and do steps 4 to 9 and reboot, adw should be gone.
Once you get everything set up, resigning is simple. Since you don't have to resign with this method though, that task it pointless.
Hayzie said:
I thought stuff like that never works. ROM's and any other files such as apk's are usually signed. Therefore any modifications won't work and the package is corrupt unless you re-sign it. At least in my experience.
Click to expand...
Click to collapse
I've never signed any of my rooms, ever. If you modify everything without unzipping it, using 7zip or the default package manager in ubuntu, there's no need to, regardless of what it is that you're replacing/modifying.
Hayzie said:
I thought stuff like that never works. ROM's and any other files such as apk's are usually signed. Therefore any modifications won't work and the package is corrupt unless you re-sign it. At least in my experience.
Click to expand...
Click to collapse
I just rename whatever I'm replacing it with to ADWLauncher and switch it out before I flash lol.

[Q] How to modify and replace framework-res.apk

Hello
I changed some png images with 7zip and copied back to system/framework/ but i got boot loop.
I would like to know how to modify and replace .apk that will work normal?
Thanks
How exactly did you replace the png's? Because the 'normal' proces of unzip-replace-rezip doesn't work.
The most easy way to changes png's:
1. Open framework-res.apk in 7-zip
2. Search for the files you want to change and copy them to your hard disk (do not unzip!!)
3. change the files. Make sure the name stays EXACT the same.
4. Open framework-res.apk and copy your new files in the desired place. By doing so, the original files will be replaced by your files. DO NOT USE ANY COMPRESSION (if asked select 'store').
5. Go into recovery, mount /system and replace the framework-res.apk by the new one. Reboot phone.
Take home message: never unzip
Hope it works now!
Erwin
i went to recovery and hit mount/system. But how can i replace it?
Thanks
urkotheone said:
i went to recovery and hit mount/system. But how can i replace it?
Thanks
Click to expand...
Click to collapse
You have to use adb to do is. I assume you know how to work with it. If not, you have to search for a little tutorial (can't link you right now because I'm using the xda app)
Put the new framework-res.apk in the same folder as adb.exe. Open the command prompt and brows to that same folder. Type in your command prompt:
Code:
adb shell mv system/framework/framework-res.apk system/framework/framework-res.old
adb push framework-res.apk system/framework
adb reboot
Due to the first command, you have a backup of your original framework-res.apk. To restore it, you have to boot in recovery, mount /system and again by the use of the command prompt, type:
Code:
adb shell rm system/framework/framework-res.apk
adb shell mv system/framework/framework-res.old system/framework/framework-res.apk
adb reboot
Erwin
Yeeeeey i did it
Thank you
One more problem
When discharging it's working, but when I charge phone i don't get no battery icon. I believe it's because in original framework i had 100 png animations for charging and now i have only 20. Is there a way to fix this?
urkotheone said:
One more problem
When discharging it's working, but when I charge phone i don't get no battery icon. I believe it's because in original framework i had 100 png animations for charging and now i have only 20. Is there a way to fix this?
Click to expand...
Click to collapse
Then it is going to be much more complicated than that. Perhaps I can explain you in more detail tomorrow, but you will have to look up some things for yourself.
First, you should decompile the framework-res.apk first using apktool. You will notice that it almost looks like it just dezips your apk, but when you look closely, you will see now that you can open and read the xml files.
Second, you have to open res\drawable\stat_sys_battery.xml (or something similar, perhaps it depends on your ROM). Try to understand what is written and make some changes (it is really not that hard) so that your system shows only 20 different images, in stead of 100.
Third, you have to recompile your modified framework-res.apk. Then pull stat_sys_battery.xml out of "your" framework-res.apk into the original framework-res.apk, but again, without unzipping one of them. Do, of course, the same thing with your images.
I must admit, I've been busy with the battery icons myself. It was my plan to do something similar like you did, but I didn't do it yet. So all the things I've written above where the things I was planing to do, but I don't know if it will work, as I never tried it myself. So please, keep me/us informed ;-)
Good luck!
EDIT: I used this site to know how to decompile apk's.
This is an old thread but I wanted to edit my systemUI.apk file with changing out a couple images... if I was to upload the file I edited (by just swapping out the images) to the UOT kitchen and use a mod, say the battery mod, would it make the file usable on my phone or would I get a bootloop or worse?
Basically what I did was opened up the SystemUI.apk file using 7zip and just swapped out the images I wanted (making sure I saved the original ones of course). I didn't unzip/zip anything.. I just opened it using 7zip and then closed it. It didn't ask me if I wanted to save anything though??
Sorry for the stupid question... but I thought it would be an idea as I want to use the UOT to make a mod to the theme I have anyways.
crazy_dragonlady said:
This is an old thread but I wanted to edit my systemUI.apk file with changing out a couple images... if I was to upload the file I edited (by just swapping out the images) to the UOT kitchen and use a mod, say the battery mod, would it make the file usable on my phone or would I get a bootloop or worse?
Basically what I did was opened up the SystemUI.apk file using 7zip and just swapped out the images I wanted (making sure I saved the original ones of course). I didn't unzip/zip anything.. I just opened it using 7zip and then closed it. It didn't ask me if I wanted to save anything though??
Sorry for the stupid question... but I thought it would be an idea as I want to use the UOT to make a mod to the theme I have anyways.
Click to expand...
Click to collapse
I don't know if I understand you fully, but I believe it would: only if the UOT changed the images that you have changed, you will not see the things you have changed.
What I did some time ago was upload my framework en systemui to the UOT, apply the battery mod and than change the battery images with my own. I did that just by opening the apk in WinRAR and adding my images, just like you did.
But if you only want to swapp some images, there is no need for uploading it to the UTO. Just continue as you did. Just make sure that you keep the original systemui.apk on your hdd. In case of a bootloop, you can easely revert.
Is that een answer to your question?
Erwin
Yes, it does.. and thanks. I ended up following the instructions on another thread I found on here... don't remember exactly which one but it basically omitted uploading the files to the UOT. It was a guide on how to theme your phone... sorry but I didn't save the link.
thanks again!
CDL.
urkotheone said:
Hello
I changed some png images with 7zip and copied back to system/framework/ but i got boot loop.
I would like to know how to modify and replace .apk that will work normal?
Thanks
Click to expand...
Click to collapse
Same thing happened to me!
I Wiped Cache, Dalvik Cache, but nothing happened!
I had to flash 2.3.6 Stock ROM via Odin, to make my phone work!
I always work with Winrar, and in there you have the option for compression, which is selected at "medium compression" by default, and that causes bootloops.
So make sure that you don't compress your apk when adding your new png, or it will not work.
Erwin
I change my framework-res.apk from another rom. the problem is when I push long power button, my device going to BOOTANIMATION with out I choose shutdown, restart n etc.. what's wrong with my device??
sorry for my bad eng..
The problem is its another roms framework so things are in different places and some things will be missing, put the framework-res.apk from your rom back and things should go back to normal, mind me asking what tweak or mod you are after using?
Sent from my HTC Wildfire using xda premium
first time I must say sorry, I know this not my device place on XDA, I use MB525.. but I see the same problem here..
I use Ms3ginger mod rom by walter, n I take framework-res.apk from 2.3.6_4.5.2-109 DHT25_themed MultiLanguage, I try to change battery sys-stat but I get bootloop..
once again sorry for my bad eng
If not possible try
Adb remount
First

Navigation bar height

Does anyone know a way of changing the height of the navigation bar? I used AOKP on my Gnex and could do it using the ROM but want to keep a rooted stock ROM on my N4 (for now)
Thanks
Sent from my Nexus 4 using xda premium
dave83uk said:
Does anyone know a way of changing the height of the navigation bar? I used AOKP on my Gnex and could do it using the ROM but want to keep a rooted stock ROM on my N4 (for now)
Thanks
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
you have to decompile the framework-res.apk
after decompiling you have to edit the dimens.xml file in res/values
you have to change the size of the navbar in 3 places
dimen name="navigation_bar_height">38.0dip</dimen>
<dimen name="navigation_bar_height_landscape">38.0dip</dimen>
<dimen name="navigation_bar_width">38.0dip</dimen>
for example, i choosed 38 dpi, but choose your own size
then recompile and exchange the apk with yours and your good to go
good tutorial
http://modstorm.co/tutorials/
Some ROMs have it..I.e. Rasjelly
Sent from my Nexus 4 using Tapatalk 2
pa.pn2 said:
you have to decompile the framework-res.apk
after decompiling you have to edit the dimens.xml file in res/values
you have to change the size of the navbar in 3 places
dimen name="navigation_bar_height">38.0dip</dimen>
<dimen name="navigation_bar_height_landscape">38.0dip</dimen>
<dimen name="navigation_bar_width">38.0dip</dimen>
for example, i choosed 38 dpi, but choose your own size
then recompile and exchange the apk with yours and your good to go
good tutorial
http://modstorm.co/tutorials/
Click to expand...
Click to collapse
Great thank you for the detailed instructions. I will take a look and give it a try.
Sent from my Nexus 4 using xda premium
My bad
Hi,
I tried to decompile the framework-res.apk, change the values to 38 and recompile but my device gets stuck on the Nexus logo whenever I try to boot it. apktool and aapt are up-to-date. What makes me think is that the framework-res.apk is ~10mb before and ~6mb after the process And I don't know how to make a flashable zip so I used the TWRP file manager. Could that be the source of my problem?
Shedao said:
Hi,
I tried to decompile the framework-res.apk, change the values to 38 and recompile but my device gets stuck on the Nexus logo whenever I try to boot it. apktool and aapt are up-to-date. What makes me think is that the framework-res.apk is ~10mb before and ~6mb after the process And I don't know how to make a flashable zip so I used the TWRP file manager. Could that be the source of my problem?
Click to expand...
Click to collapse
how did you recompile it?and the size is not abnormal, in my case its always like yours smaller yes
take this tool
http://forum.xda-developers.com/showthread.php?t=2032613&page=2
its up to date for 4.2.1
works fine for me
pa.pn2 said:
how did you recompile it?and the size is not abnormal, in my case its always like yours smaller yes
take this tool
http://forum.xda-developers.com/showthread.php?t=2032613&page=2
its up to date for 4.2.1
works fine for me
Click to expand...
Click to collapse
Ok, short story: It still doesn't work but thanks for the quick answer.
I took the apkmanager from your link and unpacked my framework-res.apk but in the new folder projects/framework-res/res there is no values folder Some google searching revealed that it is important to "install" the framework-res.apk on the PC so I opened a command prompt and used the apktool if framework-res.apk command and got the user/apktool/framework/1.apk. Unfortunately that doesn't seem to change anything. Unpacking the framework-res.apk still don't give me the values folder.
What am I missing? Could you write a step by step explanation?
Shedao said:
Ok, short story: It still doesn't work but thanks for the quick answer.
I took the apkmanager from your link and unpacked my framework-res.apk but in the new folder projects/framework-res/res there is no values folder Some google searching revealed that it is important to "install" the framework-res.apk on the PC so I opened a command prompt and used the apktool if framework-res.apk command and got the user/apktool/framework/1.apk. Unfortunately that doesn't seem to change anything. Unpacking the framework-res.apk still don't give me the values folder.
What am I missing? Could you write a step by step explanation?
Click to expand...
Click to collapse
hmm strange
i just put the framework-res.apk in into the modding folder and then i choose point 9, decompiling, thats it
pa.pn2 said:
hmm strange
i just put the framework-res.apk in into the modding folder and then i choose point 9, decompiling, thats it
Click to expand...
Click to collapse
Ok, the weirdness just goes on. I tried to use point 9 (decompile) and got a java error, something I already knew from the apktool itself. The answer was to replace the old aapt.exe and apktool.jar in the apkmanager/other folder. Now decompiling works just great and I get the dimens.xml. Changed the numbers according to your values with Notepad++ and saved. Recompiling with the apkmanager works up to the point where I have to delete all modified files. As there is no values/dimens.xml I could delete, I just delete the resources.arsc. The question for a system apk I answer with yes and in the end I have a signedframework-res.apk.
I rename it to framework-res.apk, go into fastboot/TWRP and use its filemanager to replace the original apk with my modified one. And then -> endless nexuslogo on booting
I really want to learn something from this whole mess, so where is the big mistake?
Shedao said:
Ok, the weirdness just goes on. I tried to use point 9 (decompile) and got a java error, something I already knew from the apktool itself. The answer was to replace the old aapt.exe and apktool.jar in the apkmanager/other folder. Now decompiling works just great and I get the dimens.xml. Changed the numbers according to your values with Notepad++ and saved. Recompiling with the apkmanager works up to the point where I have to delete all modified files. As there is no values/dimens.xml I could delete, I just delete the resources.arsc. The question for a system apk I answer with yes and in the end I have a signedframework-res.apk.
I rename it to framework-res.apk, go into fastboot/TWRP and use its filemanager to replace the original apk with my modified one. And then -> endless nexuslogo on booting
I really want to learn something from this whole mess, so where is the big mistake?
Click to expand...
Click to collapse
dont delete modified files,just type n, if asked for system app type y
recompiling with option 11
use this file(Brainmasters.Battery.Mod.Flasher.Nexus.4.zip) to flash the apk in recovery, dont do it via filemanager
add a folder called framework on your desktop, open the folder, put your framework.res.apk into it and put the complete new created folder within your apk into the .zip into the second folder, where you find a system folder. so there should be a system and your framework folder
http://forum.xda-developers.com/showthread.php?t=2037171
first download link is the .zip
also,check your java setup,maybe your paths are wrong
had alwyas problems with this ****ty paths of java before
watch this video to keep your java structure correct
http://www.youtube.com/watch?v=oowsJcJLmss
Finally it worked.
Thanks for all your patience and help. My way was somewhat different from yours so here is a quick overview for those facing the same problems:
1. Download apktool from here http://code.google.com/p/android-apktool/
2. Follow the steps in this tutorial to decompile, modify and recompile the framework-res.apk http://modstorm.co/tutorials/
3. Download the Brainmasters.Battery.Mod.Flasher.Nexus.4.zip from this location http://forum.xda-developers.com/showthread.php?t=2037171
4. Safety-step: Put the original UNmodified framework-res.apk in a new folder with the name "framework" and put this one into the system folder from the zip above. Rename the zip to something like originalframework.zip
5. Now repeat step 4 with the modified framework-res.apk and another copy of the zip from step 3. Name this zip to something like newframework.zip
6. Copy both new zips onto your phone, reboot into recovery and flash.
Shedao said:
Finally it worked.
Thanks for all your patience and help. My way was somewhat different from yours so here is a quick overview for those facing the same problems:
1. Download apktool from here http://code.google.com/p/android-apktool/
2. Follow the steps in this tutorial to decompile, modify and recompile the framework-res.apk http://modstorm.co/tutorials/
3. Download the Brainmasters.Battery.Mod.Flasher.Nexus.4.zip from this location http://forum.xda-developers.com/showthread.php?t=2037171
4. Safety-step: Put the original UNmodified framework-res.apk in a new folder with the name "framework" and put this one into the system folder from the zip above. Rename the zip to something like originalframework.zip
5. Now repeat step 4 with the modified framework-res.apk and another copy of the zip from step 3. Name this zip to something like newframework.zip
6. Copy both new zips onto your phone, reboot into recovery and flash.
Click to expand...
Click to collapse
good job
i always do a backup of the original too
nice that you got it working^^
Argh cant get this to work
always get fail after flashing
EDIT: GOT IT WORKING NOW!! AWESOME!
ugene1980 said:
Argh cant get this to work
always get fail after flashing
EDIT: GOT IT WORKING NOW!! AWESOME!
Click to expand...
Click to collapse
How did you now do that? I'm currently stuck at the same Situation..
Tried it like told above, but without luck. The backup file boots fine, while the modified one simply doesnt.
someone can post a small nav bar...please....
please...please...
i'm using stock rom...
R: Navigation bar height
Nobody With a soul?
Please..
Inviato dal mio Nexus 4 con Tapatalk 2
wheres your prob?not able to read?anything you need to know is in the op
R: Navigation bar height
Yes I'm not able with Mac..totally unable..I'm a bit stupid
Inviato dal mio Nexus 4 con Tapatalk 2
coloxim said:
Yes I'm not able with Mac..totally unable..I'm a bit stupid
Inviato dal mio Nexus 4 con Tapatalk 2
Click to expand...
Click to collapse
hmm mac is different
have a look for apktool then for mac in xda search, i bet you will find something
if not here it is http://code.google.com/p/android-apktool/

Categories

Resources