Related
So I'm trying my luck at ROM creation and am learning as much as I can. One thing I haven't been able to find through Googling etc is how to port a ROM from one device to another, or more specifically what folders/files need to be replaced in a ROM to make it work on another device?
Appreciate any guidance, thanks guys!
PS I'm using DsiXDa's Kitchen, but it "doesn't support any devices besides HTC devices" and I want to port a ROM to a Dell Streak from an HTC Nexus One. Is it even possible and what files can I manually replace to get it to run?
dcogen said:
So I'm trying my luck at ROM creation and am learning as much as I can. One thing I haven't been able to find through Googling etc is how to port a ROM from one device to another, or more specifically what folders/files need to be replaced in a ROM to make it work on another device?
Appreciate any guidance, thanks guys!
PS I'm using DsiXDa's Kitchen, but it "doesn't support any devices besides HTC devices" and I want to port a ROM to a Dell Streak from an HTC Nexus One. Is it even possible and what files can I manually replace to get it to run?
Click to expand...
Click to collapse
I'm looking at a Streak ROM right now, and it looks fairly standard for Android. I would search for 'vendor tree' and/or 'extract-files.sh' to get an idea about what files and settings you might need. That will get you started. You have to swap kernels, that's a given. You'll probably need a few additional things from a stock Streak ROM, like:
files in:
/system/usr/keychars
/system/usr/keylayout
/system/lib/hw
/system/lib/modules
/system/etc
some libs in /system/lib
Probably a few things from /system/bin and /system/xbin
Look at the *.rc files in both the N1 ROM and the stock Streak ROM. They will call binaries and make changes. It's all tied together and is quite complex for such a 'small' thing... Get ready to do some research and testing and don't expect it to just work right away. If it does, your lucky.
I use WinMerge to compare ROMs all of the time. It will give you clues as to what is needed for the ROM to work on your device. And logcat will also point you in the right direction on occasion
Thanks a bunch gnarlyc!
Least I have a starting point now, going to get to Googling and see what I can figure out. And WinMerge is an awesome tool, thanks for that. I'll post back here if anything. Thanks again!
Anyone else have some information to share as well that could help?
EDIT: How do I get WinMerge to work? I installed it and tried to compare the two .zip files and it just shows jibberish in each window?
dcogen said:
EDIT: How do I get WinMerge to work? I installed it and tried to compare the two .zip files and it just shows jibberish in each window?
Click to expand...
Click to collapse
Well, it shouldn't show gibberish. I have it up right now with two init.desirec.rc files from two different ROMs. It's not going to be able to compare .zips though. Only text files and folders. You'll have to unzip those.
There are other programs that do the same thing, like 'N-way folder compare' and 'Beyond Compare' and plain old 'diff' in Linux or cygwin. Find what works best for you.
gnarlyc said:
It's not going to be able to compare .zips though. Only text files and folders. You'll have to unzip those.
Click to expand...
Click to collapse
I actually found that they have a .zip plugin to allow you to compare .zips and I tried to install it but it just isn't working. When I try to unzip them and just select the unzipped folder it opens it in the selector window instead of just using the folder.
I'll keep messing with it, thanks again for the starting point at least
I want to learn how to theme. I've read this guide http://forum.xda-developers.com/showthread.php?t=916814
I Think i understand the process of editing images, I'm not a noob when it comes to photoshop, but i get a little frustrated when it comes to the topic of signing. I have a windows vista system, and section two of this https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en states that signing in vista causes bootloops unless you take other steps. The directions for XP seem so straight forward, is there a way to sign without all the hassle that vista seems to cause?
I've been told that if you use another theme for a base, resigning is not needed. I'm a noob at this also, really wanting to learn.
thenaut said:
I want to learn how to theme. I've read this guide http://forum.xda-developers.com/showthread.php?t=916814
I Think i understand the process of editing images, I'm not a noob when it comes to photoshop, but i get a little frustrated when it comes to the topic of signing. I have a windows vista system, and section two of this https://docs.google.com/Doc?docid=0AcdxIJRSH9ypZGZzc2pxNDlfMjdnazk4OHNxZA&hl=en states that signing in vista causes bootloops unless you take other steps. The directions for XP seem so straight forward, is there a way to sign without all the hassle that vista seems to cause?
Click to expand...
Click to collapse
When it comes to basic themeing, you don't need to sign anything....its a matter of extracting and re-zipping the apk without signing it so it keeps its original signature...then you would add all your themed apks in a CWM flashable zip(that isn't signed either).....use APK Manager....it works wonders for theme devs
Mr. Apocalypse said:
When it comes to basic themeing, you don't need to sign anything....its a matter of extracting and re-zipping the apk without signing it so it keeps its original signature...then you would add all your themed apks in a CWM flashable zip(that isn't signed either).....use APK Manager....it works wonders for theme devs
Click to expand...
Click to collapse
Thanks man,
If i'm understanding you correctly you are basically saying that if i take from an existing theme i don't have to sign. but i create my own theme based off of a rom i need to sign it?
EDIT: nevermind, i mixed both responses up and with my question. i'm a little off today
thenaut said:
Thanks man,
If i'm understanding you correctly you are basically saying that if i take from an existing theme i don't have to sign. but i create my own theme based off of a rom i need to sign it?
EDIT: nevermind, i mixed both responses up and with my question. i'm a little off today
Click to expand...
Click to collapse
Ok...let me try to clarify this...if you're new to theme developing, get "signing" out of your head
You would only need to sign an apk if it was being installed...
When you theme, nothing is being "installed", all of the original apks that are in your /system/ directory are replaced with your themed ones while flashing....
YOU NEVER SIGN AN APK THAT IS BEING SENT TO /system/ DIRECTORY
In reality, no themed apks are signed, because they are sent to the /system/ directory....its just a matter of extracting the stock apk, make your mods, and re-zip. As a said above, if you use Apk Manager, this will be a breeze
Mr. Apocalypse said:
Ok...let me try to clarify this...if you're new to theme developing, get "signing" out of your head
You would only need to sign an apk if it was being installed...
When you theme, nothing is being "installed", all of the original apks that are in your /system/ directory are replaced with your themed ones while flashing....
YOU NEVER SIGN AN APK THAT IS BEING SENT TO /system/ DIRECTORY
In reality, no themed apks are signed, because they are sent to the /system/ directory....its just a matter of extracting the stock apk, make your mods, and re-zip. As a said above, if you use Apk Manager, this will be a breeze
Click to expand...
Click to collapse
Thanks, You've helped a lot. can't wait to start. I have to go to work though, so tomorrow, hopefully.
thenaut said:
Thanks, You've helped a lot. can't wait to start. I have to go to work though, so tomorrow, hopefully.
Click to expand...
Click to collapse
If you have any other questions, PM me....i'm always willing to help someone who is willing to learn.
What I do when i want to change something... example I made my own lock screen.
If it was already explained how to do this... im sorry for wasting your and mine time... I only have about 5 minutes so I cant read everything before i post this... but this is what i do when i want to edit the theme.
I put the rom on my computer and extract it... locate the files I need to edit, (they are alwas going to be in the res folder of an extracted .apk and then in a drawable folder.) I take the files i want and I edit them. put them back on my phone... copy the framework-res.apk from systems>framework>framework-res.apk and then put it in a folder i created on my sdcard.
Using Astro File Manager I select my edited files and copy them.... then click on framework-res.apk and select browse and past my edited files into the framework-res.apk then using root explorer I then copy my edited framework-res.apk and paste it back in system>framework>framework-res.apk
Finally! After days of struggling to figure out how to modify my ROM's framework-res.apk and create a working flashable update.zip to install the framework-res.apk changes, I have finally figured out how (big thanks to the guys here: http://forum.xda-developers.com/showthread.php?p=20962080#post20962080) and have created an automated script to help others struggling with the same problem.
Framework Flasher 1.1.4
Feel free to download and experiment with it. This is my first gift to the XDA/Android Hacking community, and I plan on doing more. I just want to test the waters for now Feedback would be nice. Let me know if I've helped you in some way!
---------------------------
What does it do?
It extracts your framework-res.apk file and allows you to edit the files. After editing, the script will compile, sign the apk, create your update.zip with the correct structure for flashing, and then sign the .zip. Everything you need to modify and flash your framework-res.apk file.
How do I use it?
Download the .zip from the link below and extract it somewhere on your PC. Drag the framework-res.apk file that you want to modify and/or flash into the /place-framework-res-here/ directory. Double-click on RunMe.bat and off you go! Do the steps (1-5) in order and you shouldn't have any problems.
Who needs this?
A LOT of people according to how many google searches I did in the past 3-4 days.
Will it work for files other than framework-res.apk?
Currently, no. However it would be easy to implement that functionality if I saw that people would benefit from it.
I found a bug... what do I do?
Post it in this topic. I'll do what I can to make continual updates as long as I see people are benefiting from it. I'm sure there are bugs in it somewhere, so just let me know.
Where do I download this snazzy piece of software?
http://www.mediafire.com/?1nc14hkhs2yrqmt
The little disclaimer
If you download this tool, please say thanks! Not only does it motivate me to continue to improve this software, but it also let's me know how many users are using it! Thanks!
This script is mainly intended for use with editing script files (xml, etc.), and normal (non 9png) images. 9pngs have been successfully repacked using this tool! If you run into any problems, be sure to make it known!
This tools was created to work with the Droid X2. If you are experiencing problems using it, first ensure that you are in fact using a Droid X2.
Change Log
1.1.4 (1/14/12)
- Corrected the Log error. You can now see error logs!
- Corrected an error processing problem where Framework Flasher would instantly close without warning
1.1 (1/7/12)
- Made compatibility tweaks
- Removed unnecessary overhead
1.0 (1/6/12)
- Initial Release
When reporting errors, please ensure that there are no spaces in your file path, and include what ROM and version you are running.
Hello
This is an awesome little tool you got here. I haven't tried it yet but I'll likely give it a shot eventually.
You should add functionality for SystemUI.apk, that's the other "real big" file people like to edit. Just a suggestion based on what I know about theming
Very nice!
So r u telling me this will modify everything including the. 9 png images..also can u get into the xml files as well or images only...i use apk manager and with the. 9 pngs u cannot touch the 9 patches or change the image without using draw 9 patch to ensure the apk will recompile
Sent from my DROID X2 using xda premium
PoorCollegeGuy said:
Hello
This is an awesome little tool you got here. I haven't tried it yet but I'll likely give it a shot eventually.
You should add functionality for SystemUI.apk, that's the other "real big" file people like to edit. Just a suggestion based on what I know about theming
Very nice!
Click to expand...
Click to collapse
Thanks. I will definitely look into adding this. I'll update the OP with any changes or updates.
Kevin3328 said:
So r u telling me this will modify everything including the. 9 png images..also can u get into the xml files as well or images only...i use apk manager and with the. 9 pngs u cannot touch the 9 patches or change the image without using draw 9 patch to ensure the apk will recompile
Sent from my DROID X2 using xda premium
Click to expand...
Click to collapse
Not tested 9pngs with this, it's mainly intended for scripting (xml files, etc. along with normal non 9png images). I've updated the OP to include a little disclaimer stating this fact. Thanks for pointing that out.
.9.png seems to work
Thanks Wesf90 for the tool. I was curious about the .9.png myself. Looking at the script it decompiles and compiles using apktool just like the apkmanager script does so just by looking at your RunMe.bat it looks like it would be fine. I did test it out to be sure though. So I took the framework-res from eclipse 2.0.3 changes some 9.png files and recompiled without any issues. It is important to note that you need to be careful when editing 9.png files to NOT change the black "patches" around the edge of those images. Doing so will cause bad patches and will generate errors when re-compiling. So for example if you apply a filter to the entire image double check that the color value of the black patches are still 000000 (I've done this ). If you don't mess with the patches all should be fine. It also depends on the original framework-res you are starting with. If you use one that has broken 9.pngs in it to start then you will need to fix them before re-compiling (I've done this too ).
Nice work. I especially like that step 4 that creates the update.zip. That is not in apkmanager that I've been using. So following steps 1,2,3,4 sure does make it simpler for a beginner which was your goal. Keep up the good work!
hedwig34 said:
Thanks Wesf90 for the tool. I was curious about the .9.png myself. Looking at the script it decompiles and compiles using apktool just like the apkmanager script does so just by looking at your RunMe.bat it looks like it would be fine. I did test it out to be sure though. So I took the framework-res from eclipse 2.0.3 changes some 9.png files and recompiled without any issues. It is important to note that you need to be careful when editing 9.png files to NOT change the black "patches" around the edge of those images. Doing so will cause bad patches and will generate errors when re-compiling. So for example if you apply a filter to the entire image double check that the color value of the black patches are still 000000 (I've done this ). If you don't mess with the patches all should be fine. It also depends on the original framework-res you are starting with. If you use one that has broken 9.pngs in it to start then you will need to fix them before re-compiling (I've done this too ).
Nice work. I especially like that step 4 that creates the update.zip. That is not in apkmanager that I've been using. So following steps 1,2,3,4 sure does make it simpler for a beginner which was your goal. Keep up the good work!
Click to expand...
Click to collapse
Thanks for the test run. I've updated to OP to state that 9pngs have been tested.
Creating the update.zip was the hardest part for me, learning how to use update-script and updater-script. Hopefully this will help everyone else get on the right path.
is it possible, that after the editing was done, to simply push the framework to its place? without flashing recovery?
Dude XDA did a writeup on this.. but the article states there is no. 9 compatibility .... which is not true your program decompiles just like apk manager and apk tool do... .9 can be edited the patches simply can't be touched.. making this an awesome little tool !!!
Sent from my DROID X2 using xda premium
Sweet tool, just what I've been looking for
Just wanted to drop in and say thanks for this tool (button hit, donation forthcoming).
I tried this with my framework-res file from and ICS 4.0.1 ROM I'm running and it decompiles perfectly, but after I make edits and try and recompile, the script just closes.
I tried looking at the log in the folder of the tool and it didn't have any information except the date/time I ran the script.
Any thoughts? Would love to make use of this if you think it should work for me. Thanks again!
XT69 said:
is it possible, that after the editing was done, to simply push the framework to its place? without flashing recovery?
Click to expand...
Click to collapse
Yes, definitely possible if you have ADB access. I may add this feature, but the idea of the tool is primarily to allow users to create a flash-able file for their's, or others', phones. I'll put it on my to-do list though
Kevin3328 said:
Dude XDA did a writeup on this.. but the article states there is no. 9 compatibility .... which is not true your program decompiles just like apk manager and apk tool do... .9 can be edited the patches simply can't be touched.. making this an awesome little tool !!!
Sent from my DROID X2 using xda premium
Click to expand...
Click to collapse
Yeah I noticed that about the 9pngs in the article, however several people (including yourself) have stated that 9png's work fine. So hopefully XDA will eventually update the post.
zaxondis said:
Just wanted to drop in and say thanks for this tool (button hit, donation forthcoming).
I tried this with my framework-res file from and ICS 4.0.1 ROM I'm running and it decompiles perfectly, but after I make edits and try and recompile, the script just closes.
I tried looking at the log in the folder of the tool and it didn't have any information except the date/time I ran the script.
Any thoughts? Would love to make use of this if you think it should work for me. Thanks again!
Click to expand...
Click to collapse
Interesting. I plan on releasing another update soon, so send me the file you tried (I sent you a PM), I plan on weeding out small bugs quickly. Once the update is ready, hopefully I can have this bug fixed (or at least resolved)
Wes
zaxondis said:
Just wanted to drop in and say thanks for this tool (button hit, donation forthcoming).
I tried this with my framework-res file from and ICS 4.0.1 ROM I'm running and it decompiles perfectly, but after I make edits and try and recompile, the script just closes.
I tried looking at the log in the folder of the tool and it didn't have any information except the date/time I ran the script.
Any thoughts? Would love to make use of this if you think it should work for me. Thanks again!
Click to expand...
Click to collapse
had the same here!
other then that great tool
Ok to u guys having this happen... try to decompile and them recompile immediately ... if this works odds are u damaged a .9 png... those images have a black 1 pixel boarder that cannot be touched
Sent from my DROID X2 using xda premium
Maybe a dumb question but do we flash this in recovery or is this for pc use?Thanks I been itching to try this on my Iced Sam Vib...
Program is for PC use when u r done it will create a flashing zip for u
Sent from my DROID X2 using xda premium
Dougfresh said:
Maybe a dumb question but do we flash this in recovery or is this for pc use?Thanks I been itching to try this on my Iced Sam Vib...
Click to expand...
Click to collapse
Yes, you're absolutely correct. Once you go through the steps and create the update.zip file, simple place that file onto your sd card. Then flash the .zip in recovery.
Wes
Doesn't work for me. It says that echo is off.
Thanks wesf90. Going to DL, and check this out.
Work with any Android?
Will this work with any Android system, like the GS2? Sorry if I missed the answer somewhere above.
Thx.
disclaimernotice said:
Doesn't work for me. It says that echo is off.
Click to expand...
Click to collapse
Does this happen as soon as you start it?
Choose to post this here, instead of the General Section... God I could only imagine the issues. If you feel it needs moving, then by all means.
De-odexed the ICS system dump. This wasn't my system dump, as I don't have a Prime yet, so hopefully everything is here, and if there's a app or two that isn't stock, well.... not my fault.
I started doing each file manually, then got to the app folder and saw over 100 .apks, and was like hells NO, so I went the automated rout. The only .odex file I couldn't get to deodex was the Dictionary.apk/odex (that's why that .odex file is still there); kept throwing a boot class path error I couldn't resolve. If someone can get that .apk deodexed that would be great; if not, I doubt it will hurt anything.
Hopefully, all is working correctly, like I said, I don't have my Prime yet, otherwise I would have tested it. But as always, make a backup of the original files.
Since we don't have a recovery to flash this yet, guess we'll have to adb push it.
If you're gonna try it out, let me know if it works or not. Haven't tested it yet, and haven't had to deodex a system in a while.
Don't forget to either delete, or rename the .odex files to .bak, still in your /system/app & /system/framework folders too.
P.S. I am not responsible if this bricks, soft bricks, or makes your device explode!! in any way. Remember you choose to install this.
http://www.mediafire.com/download.php?chlsxuvkkr3g1vu
*If you don't know what this is please leave it alone... but if feel compelled to learn: http://www.addictivetips.com/mobile/what-is-odex-and-deodex-in-android-complete-guide/
TRANSFORMER PRIME ENTHUSIAST GET YOUR THEME ON!!!
much appreciated, but without recovery, i'm too scared to try this out.
recovery
i agree i would love to start testing but until recovery is easy and safe i wont be modding my prime
Great news. I will give this a run later.
Sent from my Sensation Z710a via the XDA Premium App
Theme started ®
sent from my AL60R!THM Atrix
marko! said:
Theme started ®
sent from my AL60R!THM Atrix
Click to expand...
Click to collapse
Love to seem some themes soon
tylermaciaszek said:
Love to seem some themes soon
Click to expand...
Click to collapse
if you have any suggestions pm me or http://forum.xda-developers.com/showthread.php?t=1388541
sent from my AL60R!THM Atrix
So anyone tried this yet, if I only use 1 or 2 files from this, will it still work correctly?
Edit: no longer need the answer.
Doktaphex said:
So anyone tried this yet, if I only use 1 or 2 files from this, will it still work correctly?
Edit: no longer need the answer.
Click to expand...
Click to collapse
Where you going with this Doktaphex?
I am looking into deodexing from a tf201 blob and I was wondering if you had any tips as to the classpath includes. I have a set that works for my SGS2 but I am not sure what I need to include for the TF201. Any hints?
EDIT:
Looks like I got it down, just included the ususal ones.
Code:
:core.jar:bouncycastle.jar:ext.jar:framework.jar:android.policy.jar:services.jar:core-junit.jar:javax.obex.jar:com.google.android.maps.jar
so i can decompile these apks with no problem and then recompile them and run them on a stock rooted prime? or would i need to odex them again? i tried systemui.apk a while back and couldnt get it to decompile with apkmanager and today i was trying camera.apk and couldnt get it to decompile either.
fcortes626 said:
so i can decompile these apks with no problem and then recompile them and run them on a stock rooted prime? or would i need to odex them again? i tried systemui.apk a while back and couldnt get it to decompile with apkmanager and today i was trying camera.apk and couldnt get it to decompile either.
Click to expand...
Click to collapse
Yeah, alot of the stock apks won't decompile.... these are old anyway. If you really want to theme something, get into non-stock roms, the systemui should decompile just fine with those. Also apks like the camera, you probably won't be able to decompile or recompile successfully. Apktool / apk manager still has a lot of problems with ICS apks.
Sent from my CM7 Atrix.
Hi,
I have a HTC incredible s with sensitive buttons not working. So I decided to install ICS on it (I have virtous quattro ) and to enable On Screen Buttons.
I tried to get the apktool working, it decompiles, but when trying to build I' ve got all kind of errors. Maybe it's something in my config that went wrong but anyway, I give up on this.
I would like someone to modify this file and rebuild it for me so I can install it on my phone.
I tried to follow these instructions
Thank you
i never got apktoolkit to work with "the latest" jar on ics files. you'll find dozens of people complain all over the net about this. the fix is simple, decompile your framework with an older version. decompile and compile apks with the latest. i have no idea why, it just worked, after spending days on this.
the problem right now is, i have no idea whom to credit for this, i found the info on a page somewhere in the net, he even included the tools. and since im not on my computer i cant give you the correct version numbers. maybe later if you haven't found it by yourself then.
---------- Post added at 05:21 PM ---------- Previous post was at 05:14 PM ----------
okay, looked it up. you need 1.4.2 (!) for decompiling the framework-res. you need 1.4.3 (!) for decompiling everything but, and compiling.
this is from memory, there could be errors. install framework, decompile it and put it back together.
apktool142 if framework-res.apk
apktool142 d framework-res.apk
apktool143 b framework-res
update,
just by searching for the version numbers right now i found somethig interesting on rootzwiki: http://rootzwiki.com/topic/16728-how-to-random-mods-for-the-do-it-yourself-er/page__st__10 this could reduce the hassle. i'll use it myself if it works.
Ok i'll try when getting back home.
Thank you
this version really works: http://dl.dropbox.com/u/405475/working-apktool.zip
i got it from the linked rw thread. it seems to fix two major issues:
- you needed 1.4.2 & 1.4.3 to compile ICS apk's - not anymore
- you needed to run apktool in the same folder in which your apk is located - put it whereever you want
it's the first time that tool doesn't give me a major headache. although i do recognize how much work it must have been to write it, i only whish it had error checking in it, stupid little things like having the jar file in the same folder cost me days to figure out because the error messages just blurb about nothing at all. whatever, now it works ... happy modding!
edit:
seems like aapt.exe still needs to be present locally in the same folder for whatever reason.
I'm trying that righ now. It builds OK. I didn't realized that it was so complicated to put the framework back in the phone
wow. incredible. I managed to get my lazy ass to understand and put all that back on the phone. Everything seems ok except when I build I have this lil warning "W: Could not find sources".
Put that on the phone via adb push and reboot, nothing ! It's like I've done nothing !
I've been able to modify framework-res.apk successfully using this set of instructions:
http://forum.xda-developers.com/showthread.php?t=1525045
It will be my try for tomorrow. Thank you !
for ics or gingerbread??
ICS. I'm on virtuous quattro