edit framework-res.apk no boot! - Hero, G2 Touch Android Development

i have all frameworks and apps deodexed
i made some changes on a framework-res.apk then i have repacked it, signed, flash on my rom.
but it no boot, stay ever on "HERO" screen!
i try to modify com.htc.resource.apk , flashing it, and all ok!!
anyone can help me?
M

You can't sign the framework file with a test key! Same applies to Rosie - don't try to re-sign it, or it'll just bootloop.
Just edit the files directly in the zip using 7-zip or something like that

Woops ^^, sounds like your implementing Manup456 SenseHero theme...

Stickman89 said:
Woops ^^, sounds like your implementing Manup456 SenseHero theme...
Click to expand...
Click to collapse
yes but with some changes to color map.. and maybe to components
M

nprussell said:
You can't sign the framework file with a test key! Same applies to Rosie - don't try to re-sign it, or it'll just bootloop.
Just edit the files directly in the zip using 7-zip or something like that
Click to expand...
Click to collapse
yayyyy haha i don't like working on a theme
M

i am on a mac.. i have 7zip ecc ecc but i can't edit without unrar the archive!
help!

just repack the framework-res.apk,dont sign it and it will flash fine

it wont work if you repack framework-res.apk as the classes.dex cannot be compressed, youll notice if you extract a 3mb framework-res, recompressing it makes it 1.5mb

ok so:
1- rename framework-res.apk to framework-res.zip
2- unarchive it
3- do changes
4- recompress all? file into a .zip
5- mv ./framework-res.zip ./framework-res.apk
6- push into the /system/framework directory
right?

mr.bang said:
ok so:
1- rename framework-res.apk to framework-res.zip
2- unarchive it
3- do changes
4- recompress all? file into a .zip
5- mv ./framework-res.zip ./framework-res.apk
6- push into the /system/framework directory
right?
Click to expand...
Click to collapse
Yes, but you must choose to pack in a zip without compression

after renaming to .zip and doing the work just rename to .apk no need to repack that

eriously, im getting pretty tierd of this....
I`ve followed your tutorial (slaved) and it seems to be working awsome, BUT I did it with my own ROM and called it Update.zip and I did everything you said, even let the 9. files alone, but when I'm restarting the system, the boot window is there constantly/for ever, what is wrong?

mr.bang said:
i am on a mac.. i have 7zip ecc ecc but i can't edit without unrar the archive!
help!
Click to expand...
Click to collapse
Make sure you have zip (the package) installed.
You should also install a MAC port of the midnight commander.
Browse to your framework apk and just enter it via mc. It should recognize the magic bytes as ZIP and enter VFS mode, allowing you to enter the apk just as if you were entering a folder.
After you make all your changes (I guess simply overwriting some pngs), just exit from the folder through ".." till you see the apk itself.
There. Done.
I do my cooking on a linux workstation, and this is one way of doing it.

Related

[Q!]Bootloop after changing framework-res.apk

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!

[10 JAN][SCRIPT]IMG2CWM Converter 1.2.2

birkoffsjunk's HD2 IMG2CWM Converter​
A simple windows batch script to convert DAF builds to Clockwork Recovery ZIPs.
Originally designed for MDJ's Gingerbread NAND and posted here. Results may vary!
Instructions​
Download DAF based NAND ROM
Download & Extract this script
Place Boot.img & System.img into the 'in' folder
Double click 'RunMe.cmd' (not as admin)
Manually make any changes you wish (when prompted)
Once done, update.zip will be in the same location as 'RunMe.cmd'
META-INF Info​How to: Create Clockwork Recovery flash files
How to Create Android Update Zip Package
An updated updater-script (META-INF\com\google\android\updater-script) is required for various other Builds.
Downloads​v1 >>> here <<<
v1.1 attached (7z changed to 9.20 (ghostkid2010) & renamed out folder to temp)
v1.2 attached (Added error checking & support for system.img only)
v1.2.1 attached (Specified xcopy path & removed old 7z.exe)
v1.2.2 >>> here <<< (arif-ali's linux bash script)
Addons​arif-ali's NexusHD2-Gingerbread_V2.0 updater-script
TODO​
Add error checking
Add support for system.img only
META-INF Information
Most importantly keep it simple
License​BSD License for the script not the tools
7zip is GNU LGPL
unyaffs is GNU GPL v2
same post from MDJ
Your script works great extracting the .img file. But it's not able to create zip file. Let me edit your script with the missing file/info.
Download this file and put in folder tools;
http://downloads.sourceforge.net/sevenzip/7za920.zip
change this line;
"%LOC%\tools\7z.exe" a "%LOC%\update.zip" "%LOC%\out\*"
to;
"%LOC%\tools\7za.exe" a "%LOC%\update.zip" "%LOC%\out\*"
and it should work. it will create a zip file.
Enjoy
how it works?
How does it use? What things do I have to put in the folder "IN"?
sathara said:
how it works?
Click to expand...
Click to collapse
let you extract system.img and boot.img from android build, once you extracted all the fill, it will put all the file into a zip file so you can load via CWM
VuNhatVan said:
How does it use? What things do I have to put in the folder "IN"?
Click to expand...
Click to collapse
boot.img & system.img
It has a function to edit apk. But how do you use that function and where do you add your own apk?
10507 said:
It has a function to edit apk. But how do you use that function and where do you add your own apk?
Click to expand...
Click to collapse
it does not have a function to edit apk (correct me if i'm wrong). once you extracted all the files, go into app and add your apk there.
ghostkid2010 said:
let you extract system.img and boot.img from android build, once you extracted all the fill, it will put all the file into a zip file so you can load via CWM
Click to expand...
Click to collapse
In the Build MDJ_FroYo_Revolution_v._2.2_NAND, there is only system.img, no boot.img. How could I have boot.img?
what a usefull tool, thank you!!
VuNhatVan said:
In the Build MDJ_FroYo_Revolution_v._2.2_NAND, there is only system.img, no boot.img. How could I have boot.img?
Click to expand...
Click to collapse
If there's no boot.img, it should still work. all the boot file is already in the system.img
Let me download that build and I can tell you for sure on how to do it.. I smell that a new version of this script will be out..
Yeah it's very much a work in progress, please feel free to attach updated versions... I'll add them to the first post with accreditation
ghostkid2010 said:
If there's no boot.img, it should still work. all the boot file is already in the system.img
Let me download that build and I can tell you for sure on how to do it.. I smell that a new version of this script will be out..
Click to expand...
Click to collapse
Is it work if there is only system.img?
drizztzou said:
Is it work if there is only system.img?
Click to expand...
Click to collapse
with a little bit of editing yes
ghostkid2010 said:
same post from MDJ
Your script works great extracting the .img file. But it's not able to create zip file. Let me edit your script with the missing file/info.
Download this file and put in folder tools;
http://downloads.sourceforge.net/sevenzip/7za920.zip
change this line;
"%LOC%\tools\7z.exe" a "%LOC%\update.zip" "%LOC%\out\*"
to;
"%LOC%\tools\7za.exe" a "%LOC%\update.zip" "%LOC%\out\*"
and it should work. it will create a zip file.
Enjoy
Click to expand...
Click to collapse
can u more detail about "change this line" location ? u mean u have done it already or i have to do it myself ? which file should i edit ?
ikkon said:
what a usefull tool, thank you!!
Click to expand...
Click to collapse
YEAH! Your not kidding man...i was stoked while playing with it...Id also like to know from here...Is there a similar script for SD->NAND bc my favbe ROM has always been CORECells builds of EVO/HD based...Gave me the best batttery of all SD except for the now current NAND builds. So i figure maybe itll be even better on NAND! TAHNKS again so much for your pos t BIRKOFF! ANYone know of the SD->NAND question?
psuser said:
can u more detail about "change this line" location ? u mean u have done it already or i have to do it myself ? which file should i edit ?
Click to expand...
Click to collapse
YOU have to add an "a" after the z in 7z WITHIN the RUNME script...you have to right click it and open with NOTEPAD on PC and add the "a"
psuser said:
can u more detail about "change this line" location ? u mean u have done it already or i have to do it myself ? which file should i edit ?
Click to expand...
Click to collapse
download the new version on page 1, its fixed
Really cool idea!! I gave it a shot, it just reboots after the MAGLDR screen showing the HTC logo over and over until you boot back into recovery. It flashed fine but just wouldn't boot.
VuNhatVan said:
In the Build MDJ_FroYo_Revolution_v._2.2_NAND, there is only system.img, no boot.img. How could I have boot.img?
Click to expand...
Click to collapse
Use the following "RunMetest.bat"
http://hotfile.com/dl/95408413/0c085bd/RunMetest.rar.html
I tested with different build, system.img only, both boot.img and system.img, it was able to create a zip with all the file.
I'm not uploading the whole folder since this was started by birkoffsjunk, I'm just helping
Test it out

[TUT] Custom frameworks for Gen 8

So, it seems that more people are taking an interest in making custom frameworks. This isn't really a full tutorial, but I thought it would be helpful to just post some tips on how to go about making your own framework-res.apk, save others a bit of time retreading old ground, since the methods are scattered around the site a bit!
Thanks to wdl1908 for prompting me to do this - should really have done this sooner!
Okay, so basic requirements:
Rooted Gen 8 (Uruk or chulri method)
Original Archos framework-res.apk
zip editor
image editing software
.png's to replace the stock ones with
That's about it! I've been using GIMP on Ubuntu for the image editing, and Phatch for batch resizing, but Photoshop will work just as well on Windows.
Edit: Thanks to wdl1908, have found that Gwenview gives much better results when resizing, compared to Phatch or GIMP. Works on both Ubuntu and KDE.
Use your preferred zip editor to unzip the contents of framework-res.apk to your chosen folder. The main folder of interest is "drawable-mdpi".
The Gen 8's use MDPI resolution images (well, A70 and A101 to at any rate. I think someone mentioned the A32 or A43 used HDPI images). Depending on your .png source, you may need to resize the images. I took my images from themes made for the Desire, which is an HDPI device, so I used GIMP/Phatch to resize them.
In terms of resizing, I compared the size of each new png with the original one, and resized. I know p0rkburn just resizes the images to 66%, but I've had problems with some images not coming out the right size that way. The other thing to watch out for is that not all the images need resizing. Also, some of the textfield and tab_select images are different proportions to their phone equivalents, so again watch out for that.
Once you've replaced the images you want to, they need to be put back into the .apk. I used to copy and paste into the framework-res.apk, but that doesn't work for 9patch files. Also, wdl1908's FrameWorkBuilder makes the compile process so ridiculously easy, there is no reason not to use that instead.
To put the new framework-res.apk on the device, I use this method via ADB wireless, which works fine.
Happy theming!
EDIT: 9patch files
These can be a PITA, until you understand how they work. I used the following two sources to finally crack it :
http://developer.android.com/guide/developing/tools/draw9patch.html
http://forum.xda-developers.com/showthread.php?t=580351
If you are changing 9patch files, you have to decompile and recompile using the FrameWorkBuilder.
I prefer using the draw9patch tool, as it lets you check that the 9patch works as expected.
Spent enough time bashing my head against a brick wall trying to sort out 9patch files, so if I can spare anyone else that, feel free to post/PM..
I'll leave this post here for my recommendations that will be more complex when you need to modify xml files.
In short the procedure is a follows (this needs to be expanded)
unpack the apk to framework-res-UNPACKED dir
decompile the apk to framework-res-DECOMPILED (with apktools)
copy framework-res-MOD to framework-res-DECOMPILED
compile framework-res-COMPILED (with apktools)
unpack the compiled apk to framework-res-COMPILED (with 7za)
remove all the files that are present in framework-res-MOD from the framework-res-UNPACKED dir
remove the file resources.arsc from framework-res-UNPACKED
copy all files from framework-res-UNPACKED to framework-res-COMPILED
zip all files in framework-res-COMPILED to the new framework-res.apk
remove the resources.arsc from that apk file
readd the resources.arsc file without compression to the new apk file
Done
The reason this is so complex is that their are bugs in apktools and the signature needs to be preserved.
FrameWorkBuilder v0.3
README.txt
-------------------------------------------------------------------------------------------------------
Place the script FrameWorkBuilder.sh in a directory and execute.
The script will download all the needed tools.
Place framework-res.apk in the dir framework-res-STOCK
Place mods in framework-res-MOD follow the usual directory structure.
Example:
framework-res-MOD
framework-res-MOD/res
framework-res-MOD/res/drawable-hdpi
framework-res-MOD/res/drawable-mdpi
framework-res-MOD/res/drawable
Execute FrameWorkBuilder.sh to apply the mod.
Modded framework-res.apk will be stored in the directory framework-res-MODDED.
-------------------------------------------------------------------------------------------------------
Changelog
-------------------------------------------------------------------------------------------------------
v0.3 Added xml png duplication check to avoid that animations don't work. .9.png support
v0.2 Added mod checks Added compile failure test
v0.1a BUGFIX cp dirs
v0.1 Initial version
-------------------------------------------------------------------------------------------------------
Have fun modding.
wdl1908 said:
I'll leave this post here for my recommendations that will be more complex when you need to modify xml files.
If you don't mind we'll make it a joined tutorial. I have no time now it's time I got some sleep.
Click to expand...
Click to collapse
I have no idea about editing XML files, but that was the next thing on my "To learn" list. I would be very happy for you to add your knowledge to this thread.
Also, if anyone has info to add/corrections to make, please feel free.
Good stuff, guys. At the very least we can make this a three man party.
The more the merrier!
Guys, can I ask what device you're both using?
fisha21 said:
Guys, can I ask what device you're both using?
Click to expand...
Click to collapse
A101IT with archangel root
A70IT with chulri's root
fisha21 said:
The more the merrier!
Click to expand...
Click to collapse
well, if i can do something, i'm here ;-)
wdl1908 said:
A101IT with archangel root
A70IT with chulri's root
Click to expand...
Click to collapse
Cool, thanks. Also, can I ask how you're viewing the XML files? Every program I've tried won't open them - keep getting error messages about invalid character content.
woti23 said:
well, if i can do something, i'm here ;-)
Click to expand...
Click to collapse
Welcome...
fisha21 said:
Cool, thanks. Also, can I ask how you're viewing the XML files? Every program I've tried won't open them - keep getting error messages about invalid character content.
Click to expand...
Click to collapse
You have to decompile the framework-res.apk with the apktools then all is revealed.
I have an A43it, and I find it to use a mixture of the hdpi and mdpi drawables, it is quite odd how they have it. I am drawing this conclusion because I only changed the hdpi drawables, and some things (status bar pull down for one) stayed original. I am going to work some more on it later today and will update here. My method for pushing to the device uses adb like such:
Code:
adb push framework-res.apk /sdcard/framework-res.apk
adb shell
su
stop
cp /sdcard/framework-res.apk /system/framework/framework-res.apk
chmod 644 /system/framework/framework-res.apk (only needs to be done the first time, as the permissions will adopt those when replacing in the future)
start
This causes the device to do a little soft-reboot (does not perform a proper full shutdown/reboot) that is pretty quick, and avoids any f/c situations you may encounter replacing the file while the system is live.
Edit 2 - ok, I just plain old missed the drawables earlier, they are all in hdpi for the A43. Posting screenshots of what I have put together shortly.
daveid said:
My method for pushing to the device uses adb like such:
Code:
adb push framework-res.apk /sdcard/framework-res.apk
adb shell
su
stop
cp /sdcard/framework-res.apk /system/framework/framework-res.apk
chmod 644 /system/framework/framework-res.apk (only needs to be done the first time, as the permissions will adopt those when replacing in the future)
start
This causes the device to do a little soft-reboot (does not perform a proper full shutdown/reboot) that is pretty quick, and avoids any f/c situations you may encounter replacing the file while the system is live.
Click to expand...
Click to collapse
Great I was looking for that.
wdl1908 said:
[*]compile framework-res-COMPILED (with apktools)
Click to expand...
Click to collapse
Getting stuck on the above step. Have got a folder called framework-res-DECOMPILED. When I try to compile it, the first message I get is:
Code:
w:Could not find sources.
It then runs through the process throwing up multiple error messages, and at the end I am left with an empty Build folder. Any ideas? I read on the Apktool thread that you need to add a classes.dex file to apk that don't already have one?
Thought I'd try your method as my primitive version keeps resulting in faulty apk's the last day or two!
fisha21 said:
Getting stuck on the above step. Have got a folder called framework-res-DECOMPILED. When I try to compile it, the first message I get is:
Code:
w:Could not find sources.
Click to expand...
Click to collapse
No problem there thats only a warning.
fisha21 said:
It then runs through the process throwing up multiple error messages, and at the end I am left with an empty Build folder.
Click to expand...
Click to collapse
What error messages?
fisha21 said:
Any ideas? I read on the Apktool thread that you need to add a classes.dex file to apk that don't already have one?
Click to expand...
Click to collapse
What version of apktools do you have?
never needed any classes.dex in framework-res.apk
fisha21 said:
Thought I'd try your method as my primitive version keeps resulting in faulty apk's the last day or two!
Click to expand...
Click to collapse
I'll try to cleanup my script and post it soon.
I just found out we can have custom boot animations on our gen 8 devices.
search for some bootanimation.zip on the web or go to UOT Kitchen and download one from the kitchen. place it in the directory /data/customization/ and reboot. This works even for the stock firmwares with archangel root.
Enjoy
I've added the first version of my FramWorkBuilder script in the second post.
wdl1908 said:
I've added the first version of my FramWorkBuilder script in the second post.
Click to expand...
Click to collapse
Thanks for the hard work!
Gave it a run through but get the following error messages:
Code:
Applying MOD...cp: cannot stat `/home/sarju/FWB/framework-res-MOD/*': No such file or directory
and
Code:
Copy files from UNPACKED to COMPILED that are not modified...cp: cannot stat `/home/sarju/FWB/WorkSpace/framework-res-UNPACKED/*': No such file or directory
The script is located in the "FWB" folder.
fisha21 said:
Code:
Copy files from UNPACKED to COMPILED that are not modified...cp: cannot stat `/home/sarju/FWB/WorkSpace/framework-res-UNPACKED/*': No such file or directory
The script is located in the "FWB" folder.
Click to expand...
Click to collapse
yeah download the 0.1a version and try again.
wdl1908 said:
yeah download the 0.1a version and try again.
Click to expand...
Click to collapse
Ok, think I'm just being stoopid here. Ran the v0.1a, no error messages BUT
If I use the folder structure "framework-res-MOD>drawable-mdpi", the resulting apk just has the original contents of drawable-mdpi. If I use "framework-res-MOD>res>drawable-mdpi", the resulting pak has an empty drawable-mdpi folder.
fisha21 said:
Ok, think I'm just being stoopid here. Ran the v0.1a, no error messages BUT
If I use the folder structure "framework-res-MOD>drawable-mdpi", the resulting apk just has the original contents of drawable-mdpi. If I use "framework-res-MOD>res>drawable-mdpi", the resulting pak has an empty drawable-mdpi folder.
Click to expand...
Click to collapse
the structure should look like this.
Code:
framework-res-MOD
framework-res-MOD/res
framework-res-MOD/res/drawable-hdpi
framework-res-MOD/res/drawable-ldpi
framework-res-MOD/res/drawable-mdpi
framework-res-MOD/res/drawable
but make sure you remove empty dirs.
I suspect it has to do with empty dirs I'll check that....
Nope tthats not it.
can you zip up the files files-to-remove.txt and log.txt in the WorkSpace dir and post them or via pm if thats possible.

[GUIDE] A Beginner's Guide To Theming

The basic part of a theme is the UI (User Interface) icons.
These icons are situated in three system files:
1. framework-res.apk
2. twframework-res.apk
3. SystemUI.apk
NOTE: Your phone should have the de-odexed versions of these files.
You may get them here http://android.modaco.com/topic/342915-samsung-galaxy-s-deodexedzipaligned-xxjvq-files/#entry1754033 .
MISSION 1 (GET THE FILES)
In order to get these files your phone needs to be rooted and you should have a system file explorer like Yaffs Explorer. The easiest way to root your phone is by flashing a kernel that provides root.
The framework-res.apk is situated in the folder /system/framework/
The twframework-res.apk is situated in the folder /system/framework/
The SystemUI.apk is situated in the folder /system/app/
Copy those files and put it in your sd card and then transfer those files to your PC.
These files will be used as the template for the new theme.
[OPTIONAL] Make a copy of these three files as back-up.
MISSION 1 COMPLETE
MISSION 2 (THE MYSTERIOUS CHANGE)
In order to change the icons there are three ways
a.The Easy way (not the correct way: might cause FCs )
b.The Hard way (recommended for risk takers )
c.Use the online theme kitchen (recommended for beginners )
[ http://uot.dakra.lt/ ]
NOTE:You may have to use both b. and c.
a. The Easy way
You need a program like 7-zip installed in your PC.
Method
-Open the apk using 7-zip.
-Go to the folder named res
-Extract the folder named drawable-hdpi
-Edit the images you want to edit [ DO NOT EDIT .9png IMAGES ]
-Replace the original icons with modified icons(drag & drop into
drawable-hdpi folder)
Tips
-Keep the original image dimensions
-Don't edit .9 pngs
b. The Hard way
This consists of decompiling the apk, modifying the required images, compiling the modified
images and replacing the original icons with the compiled icons.
You will need:
1.Apk Manager
(go here for instructions http://forum.xda-developers.com/showthread.php?t=695701 )
2.xUltimate compiler
(go here for instructions http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html )
3.7-zip
Method
-Go to the main folder of Apk Manager
-Put the apk in the folder named place-apk-here-for-modding
- In order to decompile all APKs when working with the i9000, you have to install the framework files with apktool.
- Download apktool and put it on an easy accessable place (like C:\)
- Also put the STOCK framework-res.apk and twframework-res.apk files in the same directory.
- Open a new CMD (Press Windows Key + R), write CMD and press ENTER.
- type "cd .." (without the quotes)
- repeat the "cd .." so you're on C:\ now.
- write: java -jar apktool.jar if framework-res.apk
- repeat, just with twframework-res.apk: java -jar apktool.jar if twframework-res.apk
- This will ensure, it will load the correct resource table and you won't have any errors because of the dependees
-Run Script.bat file
-Select option 9 to decompile the apk
-Go to the folder named "projects" (the decompiled apk folder should be there)
-Inside the decompiled apk folder go to the folder /res/drawable-hdpi
-Modify the icons you want to change(KEEP THE BORDERS OF .9png IMAGES
UNTOUCHED)
-Open the main folder for xUltimate
-Go to the folder \example1\res\drawable-hdpi
-Delete the icons present there
-Put the modified icons
-Go to the main folder for xUltimate and run the xUltimate.exe file
-The compiled icons can be found in the folder
\done\example1\res\drawable-hdpi
-Replace the original icons with the compiled icons USING 7-zip
MISSION 2 COMPLETE
MISSION 3 (SEE THE CHANGE)
To see how your new theme looks like, you should put the modified files back to where they
belong.
There are two ways of doing this:
1. By using the system file explorer
Before doing so make sure that the system is write-enabled. You can do this
by using Damian Tweak app. If you are using Yaffs Explorer make sure you
have enabled root access
in the app's settings.
2. By making a CWM package (safer)
Use the Zip file provided. Replace the original files with moded files and install
using
CWM.
MISSION 3 COMPLETE
HAPPY THEMING
reserved
reserved
I have to thank you so much!
The first Tutorial I found that was understandable for beginners too.
Big Big Big Thanks!
nightm4r399 said:
I have to thank you so much!
The first Tutorial I found that was understandable for beginners too.
Big Big Big Thanks!
Click to expand...
Click to collapse
I'm glad it helped .
Exactly what I needed. Thank you for good guide.
hackeron said:
Exactly what I needed. Thank you for good guide.
Click to expand...
Click to collapse
Great .
Btw do you know how to make this a Sticky Thread?
SCIENTYREAL said:
Great .
Btw do you know how to make this a Sticky Thread?
Click to expand...
Click to collapse
You have to ask a moderator to do this
I have some additions to the guide
The red code is added by me.
Method b) the hard way
-Go to the main folder of Apk Manager
-Put the apk in the folder named place-apk-here-for-modding
- In order to decompile all APKs when working with the i9000, you have to install the framework files with apktool.
- Download apktool and put it on an easy accessable place (like C:\)
- Also put the STOCK framework-res.apk and twframework-res.apk files in the same directory.
- Open a new CMD (Press Windows Key + R), write CMD and press ENTER.
- type "cd .." (without the quotes)
- repeat the "cd .." so you're on C:\ now.
- write: java -jar apktool.jar if framework-res.apk
- repeat, just with twframework-res.apk: java -jar apktool.jar if twframework-res.apk
- This will ensure, it will load the correct resource table and you won't have any errors because of the dependees
-Run Script.bat file
-Select option 9 to decompile the apk
-Go to the folder named "projects" (the decompiled apk folder should be there)
-Inside the decompiled apk folder go to the folder /res/drawable-hdpi
-Modify the icons you want to change(KEEP THE BORDERS OF .9png IMAGES
UNTOUCHED)
-Open the main folder for xUltimate
-Go to the folder \example1\res\drawable-hdpi
-Delete the icons present there
-Put the modified icons
-Go to the main folder for xUltimate and run the xUltimate.exe file
-The compiled icons can be found in the folder
\done\example1\res\drawable-hdpi
-Replace the original icons with the compiled icons USING 7-zip
Click to expand...
Click to collapse
Darkyy said:
You have to ask a moderator to do this
I have some additions to the guide
The red code is added by me.
Method b) the hard way
Click to expand...
Click to collapse
Thanks for replying Darkyy .
So, i Get a ADB not found thing? WHat should i do?
roxyroot said:
So, i Get a ADB not found thing? WHat should i do?
Click to expand...
Click to collapse
You should have Android SDK installed for Apk Manager to work.
The link on how to use Apk Manager is given in the first post, under apk manager. I'll post it again here
http://forum.xda-developers.com/showthread.php?t=695701
Here is the link for Android SDK
http://developer.android.com/sdk/index.html
Btw you should also have Java Development Kit (JDK) installed.
I cant seem to find the twframework-res.apk, it's not in the system/framework folder. I have a sony ericsson play.
Do you know where the android settings menu icons are? the ones you see when you go into android settings. Like wireless & Networks, call settings, sound and so on.
thanks great guide.
SCIENTYREAL said:
You should have Android SDK installed for Apk Manager to work.
The link on how to use Apk Manager is given in the first post, under apk manager. I'll post it again here
http://forum.xda-developers.com/showthread.php?t=695701
Here is the link for Android SDK
http://developer.android.com/sdk/index.html
Btw you should also have Java Development Kit (JDK) installed.
Click to expand...
Click to collapse
I have android SDK (obviously), JRE and i used it the same way given, stilll..The error..I have a SGS SCL i9003...
hackit said:
I cant seem to find the twframework-res.apk, it's not in the system/framework folder. I have a sony ericsson play.
Do you know where the android settings menu icons are? the ones you see when you go into android settings. Like wireless & Networks, call settings, sound and so on.
thanks great guide.
Click to expand...
Click to collapse
Twframework-res is only found in Samsung devices. No need to worry about it. The settings icons are found in settings.apk. Settings.apk is inside the folder system/app.
Sorry for replying late.
bangalorerohan said:
I have android SDK (obviously), JRE and i used it the same way given, stilll..The error..I have a SGS SCL i9003...
Click to expand...
Click to collapse
To be honest I don't know the exact cause of the error. Have you updated Android SDK. You should click on the main SDK icon and it should show all the available updates. Select
the updates and download the files. Sorry if you have already done it.
Sorry for the late reply.
:laugh:
I forgot how to do it and now I am reading my own guide.
Thanks for this great guide! Will come in handy soon

[MOD] No Increasing Ringtone + HOW to ! - Sprint S3

Hey guys !
I made a quick NoIncRing MOD, I figured while i was at it i would explain how to create the MOD.
I would like to Thank criskelo for his ZIP :
http://forum.xda-developers.com/showthread.php?t=1700174
I don't own an S3 but i did have the mod checked by an owner (works), i don't know what rom's it will work on so make a backup (as i said in the instructions).
How to Flash :
1. make sure you phone has a CWM recovery
2. backup SecPhone.apk and Secphone.odex (for odex rom's)
3. download the zip and place it in your internal SD
4. flash using, install zip from sd - choose zip from sd card
Download :
[urlhttp://www.mediafire.com/?h3nriarzvifhug2[/url]
*Tested on LEN
I'll be happy to make Mod's for Any ROM you want. Simply attach the SecPhone.apk application from System/app
HOW TO ?
1. extract Secphone.apk from your phone/rom - system/app
2. download baksmali.jar and smali.jar from : http://code.google.com/p/smali/
3. extract classes.dex from SecPhone.apk
4. Put the classes.dex in to a folder alon with smali.jar and backsmali.jar then open a COMMAND window and navigate to the folder.
5. enter the following command :
java -Xmx512m -jar baksmali.jar -a 15 classes.dex
Click to expand...
Click to collapse
6. You will now have an OUT folder, inside find : Ringer$1.smali
7. Look for 2 lines containing :
setstreamvolume
Click to expand...
Click to collapse
8. Erase them (one is at the middle and one at the end)
9. now go back to your folder with classes.dex, OUT folder and smali.jar and erase classes.dex (VERY IMPORTANT !!)
10. In the command window enter :
java -Xmx512m -jar smali.jar out -a 15 -o classes.dex
Click to expand...
Click to collapse
11. Now you will have a new classes.dex , drag it back in to your SecPhone.apk and in to my ZIP.
12. Flash and enjoy
this is such a great mod! Thanks again. Works perfectly!
So many awesome MOD.
Your welcome guys
Thanks for the mod but where the heck does secphone.apk live so I can back it up? A search in ES File explorer yielded no results.
Ah there you are............. system/app/
Hey I'm learning this stuff. That's my story and sticking to it!
the best way to figure these things out is by opening my zip with 7zip or winzip.
Inside you will see META-inf and system
then you can tell where the apps/xml's go !
system/app/secphone.apk
yoelsd said:
the best way to figure these things out is by opening my zip with 7zip or winzip.
Inside you will see META-inf and system
then you can tell where the apps/xml's go !
system/app/secphone.apk
Click to expand...
Click to collapse
That's good to know.
The Mod works great on my SPH-L710. Thanks!! :good:
?
Has anyone tried this mod yet with the LF9 update?
Update: tried to apply Sprint's latest update from an update zip in CWM in another thread in this section and it failed because the update could not find "secphone.apk". So I copied back secphone.apk and secphone.odex, did the Sprint update.zip (LF9) and then re-flashed this mod. So far everything is working well.
This works GREAT for the Note II. Thank you for posting it!
Can this be updated for LJ7?
Sent from my SPH-L710 using xda premium
It works on LJ7 if you follow the how to.
yoelsd said:
HOW TO ?
1. extract Secphone.apk from your phone/rom - system/app
2. download baksmali.jar and smali.jar from :
3. extract classes.dex from SecPhone.apk
Click to expand...
Click to collapse
I tried to follow the "how to" so that I could do this myself. However after extracting SecPhone.apk there is no "classes.dex" inside of SecPhone.apk... What should I do to get this to work?
I am running the: Sprint LJ7_update_FULL_Odex Rom
Thanks in advance!
mod applied
I followed your instructions ad succesfully applied mod on galaxy i9100 XWLSJ stock rom.
thanks
delete plz
I downloaded the smali and baksmali files and followed the instructions but when I enter the first code my cmd windows says it can't be accessed. Any help? Do I need to decompile first or can I just open the apk with winrar?
Has anyone else got this to work on MD4? I looked for the setstreamvolume and could only find one line. Is that all there is?
I finally got this to work on MD4.
i can confirm that this does NOT work on MD3 rom.
Has anyone figured out how to fix that on md3 rom? I'm usie an app, which works, but also is always running in the background.

Categories

Resources