So I think I've done everything I should have. I've made some changes to framework-res.apk and twframework-res.apk. I've resigned the packages. Included them in my ROM and when I flash on first load I get an infinite boot loop. What else could be going wrong here.
X10D3 said:
So I think I've done everything I should have. I've made some changes to framework-res.apk and twframework-res.apk. I've resigned the packages. Included them in my ROM and when I flash on first load I get an infinite boot loop. What else could be going wrong here.
Click to expand...
Click to collapse
You should never sign system apk's, what you do is extract the contents out, modify, then import the contents back into the apk. Never, ever, re-compile or re-sign system apk's.
ok. When you say import and export from APK are you talking about changing the extension to zip, extracting, then repacking into a zip, and then changing the extension back to apk?
X10D3 said:
ok. When you say import and export from APK are you talking about changing the extension to zip, extracting, then repacking into a zip, and then changing the extension back to apk?
Click to expand...
Click to collapse
Nope.
Download 7-zip (www.7-zip.org).
Right-click the apk> 7-zip > Open Archive.
Drag out the files you want to edit. Images are pretty easy, xml has to be converted in order for you to edit.
After you're done modifying, Drag the files back into the archive. Then just close the window, you're done.
Thanks for the help.
ryude said:
Nope.
Download 7-zip (www.7-zip.org).
Right-click the apk> 7-zip > Open Archive.
Drag out the files you want to edit. Images are pretty easy, xml has to be converted in order for you to edit.
After you're done modifying, Drag the files back into the archive. Then just close the window, you're done.
Click to expand...
Click to collapse
Ditto, this method works perfectly. I use WinRAR to the same effect.
Have you ever had any issues with framework-res.apk not looking like it's being updated when it reaches your phone? IDK if I have some sort of cache issue that's placing the unmodified version back in the zip when I save the changes or what but it seems like the file isn't being updated..
NM. I nailed it down to the modem causing the boot loop.
Related
I managed to somehow stumble through a few minor edits in the Launcher.apk by relying purely on colour replacement tools but that was messy and I tried to be more accurate and do something that works and looks how I want. Unfortunately it doesn't seem to matter what I do now on any .apk PNGs they don't work. I resign them when I'm done, push to my phone and nada. It either fails to load or half loads then throws up a ton of acore FCs so clearly I'm doing something wrong. Perhaps someone here can point out what I'm doing wrong if I list what I do.
unzip .apk and find image to edit.
Pull image into Photoshop
Change image as needed / wanted
Save file (I haven't touched any .9s yet)
zip the lot back up, rename to .apk and sign
Push file back to phone, reboot.
I've tried pushing the file while in recovery and while it's been running, neither makes a difference and I have little enough hair without resorting to pull it out :| I did just notice in another thread where Ted mentions using Paint.NET to pry open those damned indexed files. I'm going to look at that but earlier if it was indexed I ended up opening it then manually cleaning it up before making sure it was indexed when I saved it again.
That's about it. If anyone can offer insight into the cause I'd be most appreciative
try not resigning individual apks (system apks). After you edit them, zip them back up. put them back into the update.zip that it came from and resign the update.zip and reflash. that should work.
Yeah what I do is unpack the theme/ROM with the .apk I want to edit. Then I unpack the .apk, go into the folder and edit the images I need, then zip the contents of the folder back into a .apk (make sure you zip the contents, not the folder they are in) and replace the current .apk with mine. Then I re-zip the theme/ROM and resign it. it's a long and arduous process, but it works
i use 7-zip, extract the folders i want to edit from the archive, delete all of the .xml's out of it (since they can break something between versions sometimes) then edit my images, go back to the .zip or .apk file (7-zip will open either extension) go to the folder with the images i edited, then drag my images into it.
i never actually never unzip an entire zip or apk and rezip it when i am done. it is rather quick and easy. just make sure that you click ok when it ask you to update the archive.
david1171 said:
i use 7-zip, extract the folders i want to edit from the archive, delete all of the .xml's out of it (since they can break something between versions sometimes) then edit my images, go back to the .zip or .apk file (7-zip will open either extension) go to the folder with the images i edited, then drag my images into it.
i never actually never unzip an entire zip or apk and rezip it when i am done. it is rather quick and easy. just make sure that you click ok when it ask you to update the archive.
Click to expand...
Click to collapse
Hes got the solution..........its the way ive done it from day 1, and 7-zip FTW.
brandenk said:
Hes got the solution..........its the way ive done it from day 1, and 7-zip FTW.
Click to expand...
Click to collapse
well i got it from a certain post you made on how you made themed quickly and easily
Thanks for all the replies I've been a fan of 7-zip for a while, glad to see I'm not alone there! From the sound of it all the re-signing might be the cause so I'll give the method david suggested a whirl!
Are there any major things to avoid? For example, I noticed a lot of the icons don't take the full size of the image like the 3G notification icon or the satellite notification icon. Is it safe to go the full size or will that cause a horrible mess? I don't quite see why the images have so much space around them basically and want to use some of those extra pixels lol
Hey about using metamorph bud? much easier to do then what your doing
Check it out.
www.RelentlessAddictions.com/android
http://forum.xda-developers.com/showthread.php?t=589315
Stericson
If your on windows, its simpler not to unzip the .apk or .zip. Since the begining, there have been problems with the way windows zips files. It seems the way Linux and windows zips files are some what different. There may lie your problem. Simply drag the folder on to your desktop, edit the pngs, then drag the folder back on to the .apk inside the .zip. I also agree with the above statements. Sign the whole zip as one instead of each one independably. You can also erase any apk or jar archive not being editing to make your update smaller and faster to load...
Also, most .apk's are universal, meaning they can be used in any rom. Some are not! Meaning they will break the system. Examples are framework, launcher...
Stericson said:
Hey about using metamorph bud? much easier to do then what your doing
Check it out.
www.RelentlessAddictions.com/android
http://forum.xda-developers.com/showthread.php?t=589315
Stericson
Click to expand...
Click to collapse
I thought about it for simple recolours but this is me trying to teach myself what works and what doesn't before I attempt to make myself a theme. I'm still going to have a look at metamorph though so thanks for the links Stericson.
Quick edit to note that using Paint.NET to change lots of bits in framework-res.apk worked Now I can have a little rest before I tackle things like Launcher and others. Out of all the programs to open indexed PNGs I would've thought Photoshop would do it. I only own Elements but the trial version of CS4 still opened them as corrupt. Strange stuff!
Can you zip back up a file into a .apk? or do i have to edit with in the .apk through 7zip?
I dont understand...There are no .zip's in any .apks
Sorry bad wording.. How do I turn the .apk file I unzipped to make it show me the files.. back into a .apk file. so I can put it back into my theme. lol Its soooo hard to word
try taking a look here?
http://forum.xda-developers.com/showthread.php?t=657759&highlight=avabox
just rename the file to xxxxxxxx.apk
troyboytn said:
just rename the file to xxxxxxxx.apk
Click to expand...
Click to collapse
Do you sign it first? or rename and sign the apk?
Did the apk disappear? If not, right click it, navigate in the pop-up menu to 7zip->open, drag the stuff you edited into its appropriate spot, close the 7zip window, and you're done! I like to resign at this point, some people say that it is not necessary. For me, it is a simple right-click to do, so I just always do it. YMMV.
You dont need too. When you modify files in the .apk all you need to do is drag the /res folder to your working folder. When you're done, drag it back. Thats it.
So, is it only necessary to sign update.zips? What is the criteria for when something must be resigned?
VinceOB said:
You dont need too. When you modify files in the .apk all you need to do is drag the /res folder to your working folder. When you're done, drag it back. Thats it.
Click to expand...
Click to collapse
Yeah but like, I unzip the apk is what im saying lol. Because if you dont unzip it you cant see the images.. then I dont know what im editing. So once im done I want to be able to turn the files back into a apk
MyDroidHax said:
Yeah but like, I unzip the apk is what im saying lol. Because if you dont unzip it you cant see the images.. then I dont know what im editing. So once im done I want to be able to turn the files back into a apk
Click to expand...
Click to collapse
All you have to do is unzip them, edit the files you want; in another window open the original apk file (one you extracted to work on) use 7zip - open archive, then drag the files you changed into the archive in the appropriate folders in the archive, close and you are done. I just push them back to the phone via adb, not sure if you would have to resign the zip, if you pulled the apk file out of a flashable zip file.
Heaterz16 said:
All you have to do is unzip them, edit the files you want; in another window open the original apk file (one you extracted to work on) use 7zip - open archive, then drag the files you changed into the archive in the appropriate folders in the archive, close and you are done. I just push them back to the phone via adb, not sure if you would have to resign the zip, if you pulled the apk file out of a flashable zip file.
Click to expand...
Click to collapse
Yeah that's how I'm doing it.. but I find it a pain lol
MyDroidHax said:
Yeah but like, I unzip the apk is what im saying lol. Because if you dont unzip it you cant see the images.. then I dont know what im editing. So once im done I want to be able to turn the files back into a apk
Click to expand...
Click to collapse
like i said, just drag and drop the /res folder. No need to unzip it.
VinceOB said:
like i said, just drag and drop the /res folder. No need to unzip it.
Click to expand...
Click to collapse
OHHHH Okay I get it now.. Sorry I didnt go back to it when you said that I thought you didn't understand me, but now I see its quite opposite.. Thanks a lot man.
So I had my first go at playing with frame-work-res.apk -- fortunately I made a backup first!
This is what I did, step-by-step (probably the hard way, but at the time, I didn't have my USB cable, left it at work).
1. Pulled a copy of framework-res.apk off of the phone.
2. Renamed to .zip (Windblows7) and extracted.
3. Modified a few images, just to see if it would work.
4. Re-created a .zip (making sure that it would be the same, structurally, as the first one) then renamed it to .apk
5. Put it onto the phone, replacing/removing existing one
I immediately got an error (expected) but then I rebooted. Wouldn't go past the boot screen.
All I did was open the .apk, modify (not replace, modified) a couple of images, then put it back onto the phone.
What am I missing?
Thanks, in advance.
I think you might need to sign the apk. Try this:
http://www.londatiga.net/it/how-to-sign-apk-zip-files/
I've never did this myself so I could be wrong
nDrg said:
I think you might need to sign the apk. Try this:
http://www.londatiga.net/it/how-to-sign-apk-zip-files/
I've never did this myself so I could be wrong
Click to expand...
Click to collapse
Thanks for that, nDrg! I'll give it a shot later.
Also, I wonder if my problem was simply that I didn't use adb push to put it back onto the phone. I didn't have my cable with me at the time, so I couldn't... perhaps I'll give it a shot when I get home tonight.
No need to rename it to .zip, just open the .apk with your application of choice and resign.
I edit mine by pulling the framework-res.apk, extract it out and whatever i change, i just drag it back into the apk. I use winrar to open my apk files. I don't even make a new zip and don't resign it either.
If I edited a full rom, lets say CM6. I would extract the framework from his rom, do w/e, put the framework apk back into the rom zip and sign the whole entire thing.
if you edit anything with .9.png and replace it without correctly modifying and recompiling you will get infinite fc's
framework-res.apk
K I've tried replacing the drawables in my framework-res.apk using better zip in Mac and winrar in windows. Then is sign the apk with signapktic on my Droid x. Then I replace it with root explorer to system/framework. I get a boot loop every time? Tried everything. Still get boot loop. What am i doing wrong?
One thing i noticed is I can save as zip in eather better zip or winrar no chances just saving the file and my macbook will no longer recognize the apk as a Unix executable fill.
ANY SUGGESTION?
Make sure you're not compressing the file, in WinRAR, you can pick 'store'
A lot of people have asked in various threads lately about getting this theme on x rom, or can someone port this theme for me, etc. It really isn't that hard. It actually is pretty much a simple matter of copying and pasting. This will work on any ROM, and it only takes a few minutes, easy enough for an amateur to do it.
1. First, download the ROM that has the theme that you want on your current ROM.
2. Extract framework-res.apk from /system/framework and rename it to framework-res-old.zip and then right click it, and click extract all. Just extract them to currentdirectory\framework-res-old, which should be the default option anyway.
3. Take your current ROM, and extract framework-res.apk from /system/framework, and repeat step 2 except name it framework-res-new.zip.
4. Browse to the framework-res-old\res folder and select all of the folders starting with "drawable", such as "drawable-mdpi"
5. Browse to the framework-res-new\res folder and paste those folders, it should prompt you to merge and replace files and all that jazz, just click yes and do for the next x conflicts. It will copy and replace all of the image files.
6. Go back to the root of your framework-res-new folder, highlight all of the contents, right click, Send to > Compressed (zipped) archive
7. Windows will re-zip framework-res-new. When it finishes, rename the new zip file to framework-res.apk and push it to /system/framework. If you haven't gotten s-off on your phone, you have to do this while in clockwork recovery (make sure you mount /system in the partitions menu, or if you are s-off and booted, type adb shell mount -o rw,remount /system if it gives you memory errors)
For other operating systems, the steps are similar. If you use a linux distro, I'm going to assume you are smart enough to figure out the compression tools and menu items to unzip and rezip the apk files.
NOTE: You don't actually have to change the extensions to .zip, in fact, you won't be able to unless you unchecked hide known file extensions in the windows folder options in control panel. I just thought it would be easier. If you don't want to unhide extensions, just use a tool like 7-zip or winrar to open and extract the APK. In simple terms, all you are doing is replacing the res folder of your new framework-res.apk with the one from the theme you want. Not very hard.
ANOTHER Note: Sense roms are a bit more difficult to theme, since all of the HTC apps are themed from images in com.htc.resources.apk in /system/framework. But if you are on a sense ROM, you probably can just use a MyModes theme. If you do however choose to try this on a sense ROM, it will only theme user and non-HTC apps. This guide will technically work for any ROM but it works best for AOSP based ROMs, like CyanogenMod or ArayrayMod. The only thing is that if there is a change in the color of text, then you have to decompile both framework-res APKs and copy styles.xml from the old one to your new one and recompile it. APKtool or APK Manager both work great for that.
DO A NANDROID BACKUP BEFORE PUSHING THE NEW FRAMEWORK! Sometimes you can get boot loops from screwing with other files in framework-res, or if it is not signed properly. But you shouldn't get boot loops as long as you stay away from XMLs.
how do i extract an apk? it shows up as an apk and when i click extract it does nothing
Sometimes pushing new frameworks cause boot loops fyi..
Happened to me twice :/
Sent from my T-Mobile myTouch 3G Slide using XDA App
purple1 said:
how do i extract an apk? it shows up as an apk and when i click extract it does nothing
Click to expand...
Click to collapse
Did you try renaming it to framework-res.zip rather than .apk? If you have 7-zip or winrar you can also right click, open with, and choose 7-zip or winrar from the choose default program option.
arayray said:
Sometimes pushing new frameworks cause boot loops fyi..
Click to expand...
Click to collapse
Only if you screw with the non-drawable folders. If you leave the XMLs intact and only change the images it boots fine. The boot loops are caused by incompatible or conflicting XML files, which happens when you just push a random framework-res from another ROM, you have to just move the images over.
I use apkmanager for linux and its immensely helpful. Also you can loop one even without modifying the xmls. Least I have that's why the most important part of theming is knowing how to backup/restore or flash sbf or w/e.
Only if you screw with the non-drawable folders. If you leave the XMLs intact and only change the images it boots fine. The boot loops are caused by incompatible or conflicting XML files, which happens when you just push a random framework-res from another ROM, you have to just move the images over.
Click to expand...
Click to collapse
I think you should state that in the OP
Added a note at the bottom, thanks
So I've been asking for help from all the great LS-Themers on XDA with little things like changing the music controls to notifications to resolution, etc.
I've been wanting to do the edits myself, but XML editing seemed a little hard.
Anyway, I tried today and correct me if I'm wrong, but, when you want to edit the XML of a LS, you change the mtz file to zip. Unzip it and you should be presented with the files in that lockscreen, pngs, etc.
I unzipped my current LS, 'iDroid.' I got none of that.
I'm attaching the screenshot of what shows when I unzip it.
In the 'description' XML file, I don't get a huge XML code..I get this;
Code:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<MIUI-Theme><title>iDroid Slide2Unlock</title><author>thefsfempire</author><version>1.0</version><uiVersion>1</uiVersion></MIUI-Theme>
I've opened it with the XML Editor that's on my computer. Microsoft Word and Firefox. They all show that ^
And then there's that 'lockscreen' file. That's just...a file. I can't do anything with it.
There are no folders that show the pngs and stuff.
What am I doing wrong? D: I want to start editing little things on my own, instead of asking everyone all the time.
God! said:
So I've been asking for help from all the great LS-Themers on XDA with little things like changing the music controls to notifications to resolution, etc.
I've been wanting to do the edits myself, but XML editing seemed a little hard.
Anyway, I tried today and correct me if I'm wrong, but, when you want to edit the XML of a LS, you change the mtz file to zip. Unzip it and you should be presented with the files in that lockscreen, pngs, etc.
I unzipped my current LS, 'iDroid.' I got none of that.
I'm attaching the screenshot of what shows when I unzip it.
In the 'description' XML file, I don't get a huge XML code..I get this;
Code:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<MIUI-Theme><title>iDroid Slide2Unlock</title><author>thefsfempire</author><version>1.0</version><uiVersion>1</uiVersion></MIUI-Theme>
I've opened it with the XML Editor that's on my computer. Microsoft Word and Firefox. They all show that ^
And then there's that 'lockscreen' file. That's just...a file. I can't do anything with it.
There are no folders that show the pngs and stuff.
What am I doing wrong? D: I want to start editing little things on my own, instead of asking everyone all the time.
Click to expand...
Click to collapse
Add .zip to the end of the lock screen that just says 'file' and extract
wez89 said:
Add .zip to the end of the lock screen that just says 'file' and extract
Click to expand...
Click to collapse
Oooh ok. I got it. Thanks. I didn't know you had to change that to zip too.
Okay, so now that I got the editor and I can start changing little things.
In order for this to take effect, I need to save it over the original file as XML.
What about this 'manifest.xml.bak' file? Should I do anything with that, or leave it alone?
Once I've done the edits and save. I need to rezip the advanced folder it's in with 'themes value' that was unzipped with it, then how do I rename it back to just a 'file' type?
God! said:
Oooh ok. I got it. Thanks. I didn't know you had to change that to zip too.
Okay, so now that I got the editor and I can start changing little things.
In order for this to take effect, I need to save it over the original file as XML.
What about this 'manifest.xml.bak' file? Should I do anything with that, or leave it alone?
Once I've done the edits and save. I need to rezip the advanced folder it's in with 'themes value' that was unzipped with it, then how do I rename it back to just a 'file' type?
Click to expand...
Click to collapse
You don't need the manifest.xml.bak you can delete that if you want
To zip it back up you need winrar
You need to have everything in the right folders, so you need your advance folder with your manifest in there, and you need the theme_value..
You have to add those 2, to archive by selecting them and right clicking
Then with the winrar pop up you need to make sure 'store' is selected under compression or method, not at a computer/laptop so not 100% which it is and also make sure zip is selected not rar
Finally remove zip extension from the file and zip the whole lock screen back
EDIT: NVM I GOT IT. YAY. Haha. I can now do little things by myself on future lockscreens.
Now, the next thing I need to learn how to do is changing battery charging status and pngs.
you can use the "old format":
that is
your_theme
|__description.xml
|__preview (optional)
|__lockscreen (it is a folder)
......|__advanced (it is a folder too, coming from lockscreen)
..............|__all lockscreen stuff (as files)
......|__theme_values.xml (in lockscreen)
you ahve to zip in the contents of "your_theme" and name it mtz. then copy to phone and phone asks if you want to convert to new format. chooese yes and done
God! said:
Alright, I added the Advanced folder and themes value file to winrar.
Selected Zip and "Store" under the compression menu. Then ok.
Well it saved it as a zip as 'lockscreen' but there's no way to change it back to just the 'file' type it was.
I tried zipping THAT zip with the rest of the files into a zip, then renaming it to mtz and applying it on my phone, but it just ended up being the default lock.
I must be doing something wrong.
Click to expand...
Click to collapse
When you have zipped it up using the store and zip options, and are left with lock screen.zip.. Open the zip with winrar, don't extract just open, when winrar opens with the files go back a step so you can see the lock screen.zip rather than its files and just delete the zip extension that way and close winrar
---------- Post added at 12:36 AM ---------- Previous post was at 12:33 AM ----------
picard666 said:
you can use the "old format":
that is
your_theme
|__description.xml
|__preview (optional)
|__lockscreen (it is a folder)
......|__advanced (it is a folder too, coming from lockscreen)
..............|__all lockscreen stuff (as files)
......|__theme_values.xml (in lockscreen)
you ahve to zip in the contents of "your_theme" and name it mtz. then copy to phone and phone asks if you want to convert to new format. chooese yes and done
Click to expand...
Click to collapse
This method is by far easy and quicker in my honest opinion
Alrighty then.
Now onto my next issue.
How hard would it be to take away the charging battery/status off this lockscreen and replace it with this kind of battery charging status?
As you can see, the default iPhone charging covers up the music controls and notifications when they come in. I want just the simple glowing bar above the unlocker like the other one.
if you have both manifests then you can swap in the battery section to the ls you want (look for "battery")
you have to copy the appropiate images to your ls and might have to change coordinates
Thanks Picard. That wasn't as hard as I thought.
I deleted all the battery images from the first one and put in the ones from the second.
Deleted the battery section in the XML and replaced it with the other.
Changed the coordinates and ****ing bam! I did it!
Edit; Fixed my coordinate mistake.