I9000 GB Rom Porting Guide - Vibrant Android Development

As requested here is a general GB I9000 porting guide​
First this is NOT an all encompassing step by step porting guide. Its a general howto description with the tools Ive used so you can give it a go. It will take time..hours and hours...to get it right and learn. You WILL boot-loop many times. You WILL end up having to Odin to stock several times due to errors. I have spent a few hours trying to port a ROM only to give up because I couldn't get it to boot right. It happens.
If you grab any I9000 ROM and flash it will it brick your phone? Chances are no. The 2 main parts that if different (Kernel and Modem) is what will make it probably unusable. Your keys (Home, Back, Search, Volumes) will prob not work right. You probably wont have hypathic feedback on you home keys and such.
You could in theory Flash an I9000 Rom, then Vibrant GB kernel, then Vibrant Modem, and finally keylayout fixes and it could very well work fine with some minor issues.
So here we go. First and foremost this is where I got all my info, and honestly still VERY useful so please click the thanks on their threads:
XDA Threads:
Tutorial "(Tutorial) HOW TO PORT I9000 GINGERBREAD ROMS"
By hayn_pryde46
http://forum.xda-developers.com/showthread.php?t=1328306&highlight=jvt
[REF] How to add Reboot to power menu (updated 10/21/2010)
-You can always "borrow" the files needed that are already edited so long as they are the same version.
By: untermensch
http://forum.xda-developers.com/showthread.php?t=811532
[TWEAKS][SCRIPTS] Collection of 'em all - build.prop; init.d; etc.
By: knzo
http://forum.xda-developers.com/showthread.php?t=1227269
How To Port SGS4G Roms To Vibrant For Gingerbread 10.24.11
By: hayn_pryde46
http://forum.xda-developers.com/showthread.php?t=1317251
Porting Vibrant Roms To SGS4G
-This is a guide to port to the SGS4G (not our phone) but good info anyway.
By: robbbbit
http://forum.xda-developers.com/showthread.php?t=1099454
Use APKTool to Decompile, Edit, Translate and Recompile an APK
http://www.miui-au.com/add-ons/apktool/
Off-topic but good - Howto Theme
By: Master
http://forum.xda-developers.com/showthread.php?t=940692&highlight=
Applications (Windows versions) I use all the time:
Beyond Compare - compare folder listings to line by line code withing a file.
http://www.scootersoftware.com/
Notepad++ - The editing tool for me
http://notepad-plus-plus.org/
Droid Explorer - Great overall application
http://de.codeplex.com/
7zip - Be the 7zip Hero you know you can be!!!
http://www.7-zip.org/
So you downloaded and extracted an I9000 ROM. Here is the general steps I take to port it:
First: Download and extract a GB ported ROM for our Vibrant dev section as a guide or to compare your port to.. HERE IS MY JETPACK PORT as an example.
1. Update /system/etc/wifi.conf
Check the file - you will see the Vibrant version has:
IFACE_DIR=/data/misc/wifi
This will allow the wifi to work on most kernels and not just the Vibranted kernel
2. Check vold.conf /system/etc/vold.conf
Never had to change anything but its good to check.
3. Update + Edit build.prop
Change it as needed. Adjust type to T959 where needed. Add tweaks as wanted.
4. Update
/system/user/keylayouts/Melfas_Touchkey.kl
also
/system/user/keylayouts/aries-keypad.kl
This is based on what kernel you plan to use. I haven't tested these in a while but here is my files zipped up for you:
http://www.mediafire.com/?rhg24ksk07fdy74
5. Add GPS files (Ginger fix)
http://www.mediafire.com/?ex58f0ct9nhgvtu
Extract / Replace the files in the correct directories.
6. Replace kernel and modem
Very important. When in doubt use the KB5 modem. Its more or less the standard modem for all ports.
7. Check and update the ROMs:
/META-INF/com/google/android/updater-script
-Get a good look at it. Check 10 other ROMs scripts. Note the differences between edify and ammend scripting. Take note what partitions are what for your phone.
8. Delete CERT.SF, CERT.RSA, MANIFEST.MF in /META-INF (They are replaced when you sign zip file)
9. Fix Hypathic Feed back
-Find the same ROM version and "borrow" to make it easy
or See
Jelette's post on HowTo
10. Change the sounds / init.d files / gps.conf and any other files you want to tweak.
--Zip it all up and sign it with the apk/zip sign tool. Give it a try.
Downloads
Add Beats.Audio Here:
http://www.mediafire.com/?uvmok177fzmggkk
Tools:
APK Compile / Decompile tool . This also has my zipalign script I use. Just place all .apk files into the folder and start it up.
http://www.mediafire.com/?hu06ya8b1ybpyso
Smali Tool
http://www.mediafire.com/?x4xrilohmuc4md1
APK + ZIP Sign tool - To resign the .zip or .apk files
http://www.mediafire.com/?5c79jaa2u8mdux8
No personal keys used - all generic keys
Like I said its not an all encompassing Howto or guide. Its more of a place to find all the files / tools / guides needed to waste you day or week .
Hit the thanks button if it helps you at all please - but don't forget to thanks the original Howto creators from above. And remember:
EDIT / BUILD / PORT ROMS at your own risk!!
Also - don't post a port here until you have flashed it and used it for a day or two. Test everything. Post quality - Its a learning experience trust me.

Great stuff Moped_Ryder, Bravo....
Great stuff Moped_Ryder, Bravo....
We need more stuff like this from this community, perhaps we will eventually unravel the GPS issue with the 2.3 - 4.0 roms.
Thanks for your continued support!

Adding haptic feedback, feel free to add it to the OP if you'd like:
The changes are enormous so this will be a copy and paste.
I have attached the files needed to this post.
1. Create a new folder on your desktop called whatever you like as a clean environment to work in.
2. Download and extract the 2 attachments to this new folder.
3. Locate the android.policy.jar from the ROM you want to add feedback to and bring it into the folder with the 2 files you extracted in step 2.
4. [I use 7zip so that is what the instructions will assume that you are using]
Right click on android.policy.jar and choose to open the archive. [open only, not extract]
5. Drag classes.dex out of the open 7zip window and into the folder with everything else.
6. Now double click on baksmali.bat and you will read then hit the space bar - then read and hit the space bar again.
7. Right click and copy the PhoneWindowManager.smali that you extracted to this folder in step 2.
8. Now navigate to AutoBakSmali_Out/com/android/internal/policy/impl .
Once here, right click in the window and choose paste - choosing yes to overwrite.
9. Now back out of this until you see the com folder - right click on the com folder and choose cut.
Back out one more step and then go into AutoSmali_In and and right click and paste.
10. Now double click smali.bat, read and wait and space bar out when it says to.
11. Step 10 created AutoSmali_Out.dex. Delete your original classes.dex and rename the new AutoSmali_Out.dex to classes.dex.
12. Right click on android.policy.jar and choose to open the archive.
13. Drag the new classes.dex into the open 7zip window - hit yes - close the 7zip window
14. You have now added haptic feedback to your ROM!
From here you can use your favorite method to load the android.policy.jar.
Add it to a new rom, adb it in, use root explorer to put it in place, whatever!

Big thanks Jellette - Always great to have guidance from a acknowledged developer.
I updated my OP to point to your post.

Jellette,
Wasn't cmenard on your EDT team? He was the only one who made a Vibrant GB kernel that GPS worked with (Bullet). Any clue how he did it?
I rolled many a linux kernels in my day, but never a android one. Heck Id even set out how to roll one if I knew how to get the GPS to work.
cmenard github was no real help. Nothing in it that I or others could see that showed how he did it.

Woo!
Thanks for this!

Moped_Ryder said:
Jellette,
Wasn't cmenard on your EDT team? He was the only one who made a Vibrant GB kernel that GPS worked with (Bullet). Any clue how he did it?
I rolled many a linux kernels in my day, but never a android one. Heck Id even set out how to roll one if I knew how to get the GPS to work.
cmenard github was no real help. Nothing in it that I or others could see that showed how he did it.
Click to expand...
Click to collapse
Yes he was, Roman has a post out there about the init changes needed to get gps working.

Related

[HOWTO]: 1% steps on gingerbread

at first, it would be nice if any mod can modify the title to: [HOWTO] 1% battery mod on gingerbread and delete all following posts.
further i'm sorry for my poor english - hopefully everyone here can follow my steps!
the hard thing on changing battery icons on gingerbread is, that there are only 7 steps: 0, 10, 20, 40, 60, 80 and 100... that means you have to edit or replace two xml files (more later).
IMPORTANT: please make a backup of your rom! i'm not responsible if your device won't boot after modding! also it is possible that your google/facebook etc. accounts are deleted after flashing back your modded framework. but you can easily readd them again!
WHAT YOU NEED:
apk manager from here: http://www.multiupload.com/GXW01G6URJ
battery icons or a framework-res.apk with your desired icons
a rooted gingerbread rom
your original framework-res.apk (guide to extract later on)
WHAT YOU GET (IN ATTACHMENT):
stat_sys_xml_dateien.zip (stat_sys_battery.xml and stat_sys_battery_charge.xml with 100 steps)
framework-res.apk (modified by me with circlemod battery (i hope it's okay to use them in here! btw. many thx to devs (was it mdj?) for this icons). THIS FRAMEWORK WAS ONLY TESTED BY ME ON MDJ GINGERBREAD 2.2!!!
screenshot of the circle battery mod on gingerbread
FIRST STEPS:
extract apk manager to a a desired folder and conenct your phone to debug mode
start script.bat and change kompression level to 0 (type 19, afterwards 0)
type in 0 to download framework-res.apk from your phone. it asks for the path, type: /system/framework/framework-res.apk and hit enter
if asked for a name, type framework-res.apk and hit enter and confirm with Y to be your current project
type 9 and hit enter to decompile your framework and wait until it's finished
have a look in the folder "projects" - there will be a folder "framework-res.apk" now.
navigate to the subfolder: res/drawable-hdpi and delete ALL png files with the name stat_sys_battery_X.png and stat_sys_battery_charge_animX.png (while X stands for the according number). do this also with stat_sys_battery_unknown.png and stat_sys_battery_charge_animfull.png (IMPORTANT: delete last two ones only if you have a replacement icon or you will get errors on compiling!!!)
also delete following two xml files in subfolder projects/framework-res.apk/res/drawable: stat_sys_battery_charge.xml and stat_sys_battery.xml
now it gets tricky:
depending on the amount of your custom icons you have on charging, you may have to edit your stat_sys_battery_charge.xml file and delete or add the percentual steps! if you have 100 custom png's for charging animation, you can use the stat_sys_battery_charge.xml i attached (it also includes a stat_sys_battery.xml with 100 steps if you need)
now it's time to paste your modified/downloaded stat_sys_battery_charge.xml and stat_sys_battery.xml into subfolder /res/drawable/ (where you deleted the original of gingerbread before!)
go back to apk manager and type 11 to compile your framework
when it asks "is this a system apk?", type Y for yes. confirm again with Y and let apk manager create a new folder, called "keep". a list of files appears, and after that DON'T CONFIRM!!!
first you have to navigate into this "keep" folder and delete again exactly what you deleted above (stat_sys_battery_X.png, stat_sys_battery_charge_animX.png, stat_sys_battery_unknown.png, stat_sys_battery_charge_animfull.png, stat_sys_battery.xml, stat_sys_battery_charge.xml) and ADDITIONALLY the file resources.arsc
now you can confirm in apk manager to complete the compiling process. as far as i know, these steps with keep folders are needed to include the right id's automatically in public.xml! if any errors occur, feel free to post your log in this thread (see log by typing 21 in apk manager)
flash your new created framework-res.apk by entering 8.
if you didn't anything wrong, you should have your new % battery icons after reboot! as mentioned before, your desktop background maybe messed up and/or your accounts are deleted. you can solve this by just readd accounts and change background again.
Those ID's are hexadecimal numbers (dictated by the 0x prefix), and are sequential:
0 - 17302168
10 - 17302169
100 - 17302170
20 - 17302171
40 - 17302172
60 - 17302173
80 - 17302174
RJackson said:
Those ID's are hexadecimal numbers (dictated by the 0x prefix), and are sequential:
0 - 17302168
10 - 17302169
100 - 17302170
20 - 17302171
40 - 17302172
60 - 17302173
80 - 17302174
Click to expand...
Click to collapse
thx for your explanation! but i found out that it isn't necessary to edit public.xml. on decompiling, it adds automatically the missing lines when png's are listed in stat_sys_battery.xml...
finally i got it working if someone else wants the 1% increments, i can write a little tutorial.
Yea very interested. I can't stand the stock one. I knew how to do all the theming stuff on sd builds using the theme porters. Nand is different though. So please write that up, also will you post your battery mod for gingerbread
HOWTO added in 1st post!
fruchtfliege said:
HOWTO added in 1st post!
Click to expand...
Click to collapse
Thanks for the tutorial. Question though, is this for sd builds or for nand? Or does it not matter?
it is only for nand-builds. on sd-builds it should be similar, but afaik you don't have to adb the framework-res.apk. you should find here a lot of threads about modifying sd-build statusbars, because it is not that hard like on nand builds.
Cool, I'm using nand. Yea through sd builds thing stuff was easy. I couldn't change the compression in the emulator. How were you able to change it? Also is that framework at the bottom the one we use to achieve what the picture looks like?
Background changed and accounts gone as mentioned, but it worked perfectly - well worth it!
How did you change the compression when running the batch file?
Edit: Nevemind im retarded.
When i press the 9 to decompile it it gives me some B.S error Saying could not find C:\place-apk-here-for-modding.... The directory name is invalid. Could someone make this work on JDMS nand build?
Alos when i pull the framework res file from my phone it doesnt show up in "projects" Theres nothing in there. However it does show up in "place-apk-here-for-modding" folder..
Alos when i pull the framework res file from my phone it doesnt show up in "projects" Theres nothing in there. However it does show up in "place-apk-here-for-modding" folder..
Click to expand...
Click to collapse
the adb pulled apk files are stored in "place-apk-here-for-modding" folder, not in projects! a project in this folder will only be created after decompiling an apk!!!
Also is that framework at the bottom the one we use to achieve what the picture looks like?
Click to expand...
Click to collapse
you just get the statusbar at top (in fact only + battery icon). the bottom icons and background are custom with using launcher pro.
Can you think of a certain reason why i keep getting an error when i try to decompile it?
This is the error i get
--------------------------------------------------------------------------
|Wed 01/19/2011 -- 20:11:24.04|
--------------------------------------------------------------------------
'mode' is not recognized as an internal or external command,
operable program or batch file.
'java' is not recognized as an internal or external command,
operable program or batch file.
1631 KB/s (4121004 bytes in 2.466s)
Could Not Find C:\Users\Matt\Desktop\New folder\place-apk-here-for-modding\../pl
ace-apk-here-for-modding/signedframework-res.apk
Could Not Find C:\Users\Matt\Desktop\New folder\place-apk-here-for-modding\../pl
ace-apk-here-for-modding/unsignedframework-res.apk
'java' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
i think you have to install java sdk. without it, the compiling tools are not included, like on jde (i think it's called jde...)
but i'm going to make flashable zips of these files for clockwork mod. only problem is, that i don't know much about linux commands i couldn't get it working. i should start a new thread asking about this.
If you jump on irc you would get your answer in like 5secs. Room is #htc-linux-chat on freenode. Thanks for the suggestion about sdk. That does make sense now that I think about it;p
thank you for the hint. i will ask for help at chat tomorrow. i'm also working on different statusbar colours of gingerbread with original icons. before release i have to get this cwm zip flash thing working!
fruchtfliege said:
at first, it would be nice if any mod can modify the title to: [HOWTO] 1% battery mod on gingerbread and delete all following posts.
Click to expand...
Click to collapse
Just a heads-up mate - you obviously can't delete any posts, but you can change the title. Edit the first post and go into advanced mode to change it.
Good luck with your project
thank you! i have changed the title now.
Hey Fruit Fly, any progress on that cwm zip?
not really. i forgot my hd2 at home (i do theme works at work) and couldn't test the cwm zip files. on sunday evening i can test everything and tell you whats working and what not!
rafpigna from #htc-linux-chat gave me another choice of flashing easy with an adb script (thank you for that). but some users on german android forum told me it's not working. have to bugfix the files first
Yea let me know the outcome;p

★wildstang83's Guide For Basic Porting★

★wildstang83's Guide For Basic Porting★
You could always go to the TEAM REVERSE website and read the same guide, lol​
Disclaimer​It should be known that there is some risk involved when performing the porting method described below. If you still wish to continue on and follow this guide you are doing so at your own risk. Of course, I will not be held liable for what you do to your device on your own. I will say, use extreme caution and follow every step to its tiniest detail.​
Click to expand...
Click to collapse
Hey guys, I have had a few new users come to me wanting to learn how to port. So I have decided to take a little time and write up a guide for this subject. With this guide we will achieve at minimum a first time boot with Screen load and sound. This will not go into details of fixing G Sensor, MMS, eMMC, Cam or Netflix.​
NEEDED ITEMS:
Windows- Either 32 or 64 bit is fine. Ubuntu will work but is more complex.
7Zip
Notepad++
Android SDK
Android Kitchen
Our most recent Ginger Sense Leak ROM 4.01.605.0
Any Sense 1.0 or 2.1 ROM from the EVO Shift 4G, EVO 4G, HTC Desire. These 3 devices are the easiest to port from. Personally I find that the --EVO 4G is the easiest out of these three and is usually where I port from. Whatever ROM you choose must be deodexed for this guide.
A generic updater-script, update-binary and build.prop. I'll provide those in a link below.
From here on each rom will be refered to in this guide as such:
HTC Droid Incredible GingerSense Leak= Leak
Whatever ROM you choose to port= Port
Ok lets get it.
First things first. Take some measurements of file size.
Take the following size readings:
Ports zipped file size on disk:
Ports unzipped file size on disk:
Ports "system" folder size on disk after extraction: <---This is important!!!
Click to expand...
Click to collapse
We need to know the pre and post system folder size because the system has a max usage space of 250 MB. So in your final rom a system folder size that is below 250 is good. For example, in my latest build of my Pure Speed ROM I was able to achieve a system folder size of 163MB.
Phase One- Start with the Android Kitchen
Open the Android Kitchen and place your port into the original_update folder. Run the kitchen and go through the steps to make your working folder. Just hit enter whenever it asks any questions even when it asks about updater conversion. Once complete, choose the Option 2- Add root permissions. It may say 'su' already present just over ride it and choose option "f" ChainsDD's version. That will complete and go back to the main menu. Select option 3. Add Busy Box. Do the same thing. Now select option 0 for advanced options. In advanced options select option 17 to install busy box runparts. Once that finishes we can build the ROM. Select option 99, let it run then select option 1 for interactive mode, let it run, Then select "y" to zipalign the apks. it will run for awhile and then ask to convert back to updater-script. just hit enter for yes. hit enter to sign the rom. It will ask about renaming, just hit enter to by pass this. We will rename it later. It will say congratulations your rom is done or whatever. just hit enter and then close completely out of the kitchen. Go to where your kitchen is set-up and find a folder called OUTPUT_ZIP. Grab your rom out of there and place it on your desktop.
Phase Two- The actual porting operations
For good measure create two folders on your desktop. One called "Backup" and the other called "Dump". Both the leak and the port should now be on your desktop. Select them both and copy them to your backup folder you just created. Now open your port by right clicking it and navigating to 7Zip and clicking "open archive". Drag it to the edge of your screen. Open the dump folder so that it is side by side with the port. Now in the port navigate to the system folder. Select the "customize, lib and media" folders and drag them to your dump folder. Now delete them from your port along with the "usr" folder as well. You will see a folder in system named "etc". Open that folder and inside you will see a folder called "firmware". Delete the firmware folder. Also delete the "wimax" folder. We do not need it. Now open the Leak. navigate to system/etc and drag the firmware folder from leak to the port. Also drag AudioBTID.csv and vold.fstab from the leak to the port. Close the leak for now. In the port back up to the system folder. Open the bin folder and delete EVERYTHING with "a2sd, apps2sd or wimax" in its name. If there isn't any such things in there then don't worry about it. Now back up to system and go into "xbin". Do the same thing here. Once complete grab the "su" and "busybox" files and drag them to your dump folder on your desktop. Back up to system. Open bin. Drag those two files su and busybox from your dump folder to your ports bin folder. You should now have "su" and "busybox" in both of your ports bin and xbin folders. Now in the port back all the way to the root of the ports zip. You may see a folder called "data". Delete that folder and recreate it. just do it. Now open the data folder. In the dump folder on your desktop create a new folder called 'sysusr". Rename the "customize, lib and media" folders so they are "syscustomize, syslib and sysmedia" These folders are named so because they will be symlinked. Now drag these four folders to the data folder of the port. You can now delete the dump folder from your desktop. We don't need it anymore. Close everything thats open right now. Reopen both the leak and the port side by side. Of the leak navigate to system/usr. Of the port navigate to data/sysusr. Drag the contents only of the leaks usr folder to your ports sysusr folder. Navigate to system/lib of the leak. Navigate to data/syslib of the port. In the syslib folder of the port find the three folders called "egl, hw and modules" Delete them. Drag those same folders over from the leak to the port. Now in the leak system/lib folder find these files: libaudio.so, libaudioalsa.so, libaudioeffect_jni.so, libaudioflinger.so, libaudiopolicy.so, libAudioTrimmer.so, libEGL.so, libgsl.so, libhtc_ril.so and libhtc_ril_switch.so. Drag them to your ports data/syslib folder. Just drag and drop. Close everything on your screen. Reopen both the leak and the port side by side. In the port delete the boot.img and drag the boot.img from the leak over. Close the leak. navigate to "META-INF\com\google\android" of the port and drag and drop in the update-binary and updater-script that I have provided below. Navigate to system of the port and drag and drop the build.prop that I have provided below. one last thing. navigate to system/etc and drop in the apns-conf.xml that I have provided below. Close the port.
Porting is now complete​
We should now be ready to boot. Rename the ports zip if you like and drop it on your sd card, wipe and flash. If it boots, has sound and is somewhat usable pat your self on the back. You've just took the second step to becoming a great dev in the Android world. The first step was having the guts to even attempt this.
Here are those parts you need: wildstang83's Porting Parts​
Guide- How to customize your 2.1/3.0 Hybrid or 3.0 ROM lockring: http://forum.xda-developers.com/showthread.php?p=15681779#post15681779
Click to expand...
Click to collapse
If you run into any trouble while using my guide or notice anything that needs to be updated or added please feel free to PM me.
Credits:
PonsAsinorem- For giving me the idea to write this guide.
newtoroot- I'll never forget who took the time to teach me how to port.
joelZ9614- Allways being supportive especially when times were tuff and no one else was around.
wdfowty
NilsP
Conap
gnarlyc
Man the list goes on so really just a huge thank you to everybody!
Click to expand...
Click to collapse
Thanks! Been wanting to do this for a bit.
lol
10 characters
Guide made me 'lol'.
Alright guys, enough goofing around, lol
I added the whole guide for yall.
Sorry for those trying to read this in the xda app. It gets cut off around where it talks about the system size. You can just hit menu/browser and read it that way.
Porting a HTC Desire ROM tomorrow morning Thank you!
cbren said:
Porting a HTC Desire ROM tomorrow morning Thank you!
Click to expand...
Click to collapse
Good luck buddy. Let me know how it goes or if you need help.
Thanks stang
Sent from my ADR6300 using XDA Premium App
Thanks stang
Youre looking at a crackflashing troll with ORD
WoZZeR999 said:
Guide made me 'lol'.
Click to expand...
Click to collapse
The disclaimer made me lol
Wow this is great bro. I have to try this out!
When I try and flash my port, I get
Finding update package...
Opening update package...
Installing update...
Installation aborted.
It's an evo port and Android 2.3.3 Htc sense 2.1 I think.
http://forum.xda-developers.com/showthread.php?t=1046622
Same one I used and it worked perfectly just try again... follow stangs directions exactly as they're written..
Sent from my ADR6300 using XDA Premium App
Guys, if you are gonna report errors here please provide the error status as well.
It will make it easier for me and everyone else to see what you did wrong(not saying anything bad here) and to know what to look for next time.
A lot of problems can be solved by mounting usb through recovery and then transfering your ports over.
What do we use the OUTPUT_ZIP ROM for? Is that the "port" that we should be messing with?
cbren said:
What do we use the OUTPUT_ZIP ROM for? Is that the "port" that we should be messing with?
Click to expand...
Click to collapse
Yes thats the final rom that you zipaligned and rooted in the kitchen. Now take that and put it on your desktop and build it exactly as my instructions say and you should be good.
Will there be an " Advanced Porting " Thread? If so can you shed some light on github?
hightech316 said:
Will there be an " Advanced Porting " Thread? If so can you shed some light on github?
Click to expand...
Click to collapse
Im not a compiler. Im a porter. I'm sure we could get some info in here though.
hightech316 said:
Will there be an " Advanced Porting " Thread? If so can you shed some light on github?
Click to expand...
Click to collapse
What kind of github info do you need? I'm no where near an expert, but I know how to sync a repo from github to my computer. That's all I've ever needed to do, at least so far.

[GUIDE] A n00b guide to porting themes :P (26/12/11)

Hello A little while ago I managed to learn how to theme totally from scratch. I knew nothing of anything before I started, but now I know how to port themes As I still see myself as a n00b there may be some weird things I've done, but at least I manage to create the themes This might not be the best way to theme, or the easiest, but it works
Overview PNGS
1) Getting the files
2) Getting the images
3) Port
4) Package and Sign
The only programs I've used is 7zip and autosigner download them and install 7zip and extract autosigner to a nice location for example your desktop
Getting the files
The first you need to do (after getting the programs) is to find the file you will mod (edit). This will mostly be the framework-res.apk because this decides most of looks of phone (for example the statusbar). Download the .zip of the rom your going to theme. Open it up (shouldn't require any programs, if does, use 7zip: either drag it onto the 7zip icon or right click and choose open with). Open system -> app and copy the framework-res.apk (or any other apk you would like to theme, for example the settings). Now paste it into an appropriate folder.
Getting the images
Now you need to find the images you want to use in your new theme. Find either an update.zip with a theme or an .apk with a theme chooser theme (if there is both a version for Froyo and GB, use the Froyo version as this will make it easier ) Open it up with 7zip (drag it into the 7zip icon). Now you can do either of two options:
1) You can take the whole drawable-mdpi folder and copy it out. You should probably don’t do this with a Themechooser apk, as they usually don’t have all icons in this folder, as they often lend a few from HDPI.
2) Take only the images you want and copy them to a folder. For example if you want the signal icons, copy the “stat_sys_signal_0” (-4 of course) and copy them out. If you want the statusbar background, copy “statusbar_background”. This way you can mix several themes, take the best of several themes and make your personal theme
When you’re done getting your icons, close the window.
Porting
Now open the Rom’s default framework-res.apk with 7-zip. If you’re going to port a whole theme, delete the /res/drawable-mdpi folder and copy in your own. If you’re going to port just a few icons, open the /res/drawable-mdpi folder and paste your icons. You might want to check if the icons have the same names in the different framework. For example the headset icons can be both “stat_sys_headset” and “stat_notify_headset”. Also if you port from a theme chooser theme, you will have to rename every single .png you port. This is really boring, but necessary. You need to remove the “framework_res” and the “android_systemui” from the beginning of all the names. So “framework_res_activity_title_bar.9.png” needs to be changed to “activity_title_bar.9.png”. Because this is so boring you better keep your renamed icons, so it’s easier to port it to another rom
This is kind of off-topic: my carrier lends network of another carrier. Therefor my phone is allways roaming. This puts a stupid “r” with my signal icons. To avoid this I allways take normal signal icons, copy them, and rename one of the two .pngs from for example “stat_sys_signal_1” to “stat_sys_r_signal_1”. This way I get rid of this stupid “r” and it will always show the normal icons
Packing and signing
Now the porting is done and the next job is to push the new framework to your phone. If you are familiar with adb, you can push it to system/framework on your phone. You don’t need to anything more with the apk before pushing it. Else you can create a flashable .zip for your theme. I’ve attached a .zip with update script (I haven’t created it. Just stole it from one of Elelinux’ add-ons ). Download the zip. Create a folder named system and a folder named framework. First drag the new, modded framework_res.apk to the framework folder, then drag the framework folder into the system folder, before you drag the system folder into the attached zip. If you use Clockworkmod recovery, you can just flash the zip right as it is, but if you use Amon_Ra or want it to be compatible with every recovery because you want to post it, you need to do something.
Unpack autosigner and launch the exe file inside. Drag the .zip into the new window and press sign. It will now appear a new file in the same folder as the file you wanted to sign. Its name is the same, but with “_signed” at the end. You can rename the file as you wish both before and after the signing.
XML Editing:
I decided to add a little section about XML editing as well I really don't know all about this myself, but i can tell how to set it up and some examples to what you can do Even though this may seem really complicated, it's not written in a completely different language, like Java in the smali files, so often it is possible to use logic to get what you want
Tools needed: APK Multi-tool. as well as Java, if you don't have it installed.
Overview:
1) Setting up
2) Examples
3) Finish
Settings up
Download APK Multi-tool and extract/ unzip it to wherever you want ( I have it on my desktop). Now you can place the apk you want to modify (usually the framework_res.apk) in the "Place_apk_for_modding" folder. Then you open the script. If you don't get an error, proceed to b), if you do get an error proceed to a)
a)) If you do get an error where it says something like "java not found" you need to correct the Java path (or install Java if you haven't done that, which you should have) . I had to do this to get it working. First open my computer and click disk C, or D if you have installed Java there. Open programfiles (or whatever it's called in your language) and scroll to the Java folder. Now open the folder there jdk folder or whatever you have there and open the "bin" folder. Look at the top of your window, where it says where on you're computer you are (like Windows: C to the left, and then Programfiles and so on). Right click it and click copy address. Mine is "C:\Program Files\Java\jdk1.7.0_01\bin . Now you can close the window.
Open "My computer" again. On the top bar below the navigationbar, click Sytemoptions (sorry, not really sure what it's called in Englsih, as my computer is Norwegian, please correct me if I'm wrong). On the left click the "advanced" link and in the popup that appears click "environment variables". Scroll down to the "path" variable and edit it. Paste the address you copied and click OK. You should now be able to proceed to b). If you still get an error, please tell me and I'll try to help
b) type 25 and press enter to select current project. Here you will see all the apks in the "Place_apk_for_modding" folder. Select the appropriate number (in this case probably 1) and press enter to continue. Then you hit 9 and enter to decompile it. I cannot really explain it, but it enables you to edit the xmls in the apk. If you try to edit them by using 7Zip, the xmls will be just messed up. When it's done decompiling, you have gotten a new folder in the "projects" folder. In this case it is probably named framework_res.apk. Minimize the script (DON'T CLOSE IT) and you're ready to edit the xmls
Examples on edits:
COMING SOON
Finish:
When you're done editing, open the script again (remember what I said about not closing it? ). Click 11, unless you are editing a non system apk. If you are editing the framework or settings or such, use 11. If you get an error now, you have probably done something wrong, try to see in the log what you have done wrong. Every time I've had an error, I've ended up in bootloop when I've flashed, so it is probably better to just start over. Another tip is to do one thing at the time. For example: you decompile, edit the notification color in pulldown, compile. Take the compiled apk, decompile edit another thing and so on, this makes it easier to not mess up and it also shows what you are doing wrong.
On the "Is this a system apk?" you should probably say y, as I said above. I also usually copy over the files I didn't edit, as this seems safer. Follow the instructions and you should be fine. When you're done and the script is done compiling, you will find a unsigned_**** (for example unsigned_framework-res.apk) in the "place_apk_for_modding" folder. This is your modified apk, and you can try to push it to ur device with an update.zip or adb, if you know how to use that
Well this was the end of my guide for now If there's anything which is unclear or you have other suggestions, feel free to post I've probably forgotten something
Finally after all my attemps to modify the android framework before i have do it correctly. I have changed a couple of things, the lock screen and battery icons so far. The framework I'm modifying is the one on Ele's Gingerbread and i wonder how to get the battery icon percentage 1 by 1 as i saw in some other themes. What i mean is that in the original framework there is only battery icons for 15, 20, 25 and so on, and if i push the 16, 17, 18, 19 they won't work. Is Theme Chooser the one on charge of this? how can i get that? some help please?
(Also tryed to theme a sense rom, but everything was messed up, i guess because of sense or maybe I did something wrong)
So thanks for your guide, really helpfull
Yeah, I've never tried to theme Sense so I don't know. It is probably possible to make icons for every %, but then you'll have to decompile using APK tool, and it is harder. I don't know how. If you want to try, you could try asking a question here
thanks
so funny=))
i'm tried
Great guide helped me a lo thx.
Finally, someone who CAN explain it...
I'm now porting ICS to GB (no cm7), cause I think CM sucks.
mDroidd said:
Finally, someone who CAN explain it...
I'm now porting ICS to GB (no cm7), cause I think CM sucks.
Click to expand...
Click to collapse
Hmm, ICS themes can be made really awesome, if you do some more advanced stuff. For example you want to remap the pulldownbar a bit, and change som text colors. But to do this you need to use a tool like APK multi-tool, and it is a bit more advanced. If you want to, I can create a new section where I show how to this
Thank you.
GUIDE UPDATED! Added a section about XML editing really quick, probably forgotten something and such, so just ask if there is something you don't understand This is for those who are getting used to the PNG editing and want to proceed to something slightly more advanced, for example you 7Tosta
Cheers
BTW: I should've reserved the 2nd post, this is getting messy
Edit: If there's anything specific you want me to add to the EXAMPLES section, tell me

[GUIDE] Create your own Soft-MODs

USING DSIXDA's KITCHEN TO CREATE YOUR OWN SOFT-MODs
(THIS IS MY FIRST BIG TUTORIAL, SO PLEASE CO-OPERATE AND HELP ME MAKING THIS GUIDE BETTER!!)
DsiXDA has created an excellent Kitchen for 'cooking' custom ROMs. So first THANKS goes to DsiXDA.
READ THIS BEFORE PROCEEDING:
Click to expand...
Click to collapse
For Kitchen to get working you need a Linux environment. My choice is go for Ubuntu 10.04 / 10.10 (I won't recommend 11.xx as Unity spoils the 'Cooking' experience). You should have a little bit of experience with Ubuntu. You can do it on Windows too. Install Ubuntu inside VirtualBox. I won't recommend using cygwin as it may reduce the performance.
Click to expand...
Click to collapse
GIVE CREDITS TO THE ORIGINAL DEVELOPER
I. Setup the Kitchen:
Download DsiXDA's Kitchen at https://github.com/dsixda/Android-Kitchen/archives/master. Download the 0.179 version
Get an 'original' ROM (not soft-modded). The ROM that I used in this tutorial is Pebe's CyanogenMod 7
Get JDK. It's necessary. Execute the following command in Terminal:
sudo apt-get install openjdk-7-jdk
When asked for password, enter the one which you use for logging in.
For 64-bit system, you need the ia32-libs ( sudo apt-get install ia32-libs )
Extract the contents of the dsiXDA's kitchen to a folder, say kitchen, in your Home folder (for convenience). Just inside the kitchen folder there should be the ./menu file
Open Terminal. Browse to your kitchen directory
cd ./kitchen
source ./menu
It should open up the Kitchen Menu
This is the basic setup of your Kitchen. Now move up to the next big step.
II. Actual ROM:
Copy the ROM (in my case, it is cm7_v2.zip (pebe's CM7)) and paste it in the original_update folder
Execute Kitchen (Step 5 from I). Select option '1. Setup working folder from ROM'. Another menu appears, hit ENTER. It'll show up the available ROMs list. It should display at least one ROM. In my case it was "(1) cm7_v2.zip". Enter selection number: 1. Hit ENTER. It'll prompt for changing the name, leave it, no need. Hit ENTER. It'll start extracting the ROM. In my case, it found the updater-script. It'll ask to convert the script into update-script. We want update-script at the moment, so just hit ENTER. It should say 'Finished setting the working folder!'. Hit ENTER. You'll be back to Menu.
The Menu shows various options like 'Adding Root permissions, installing busybox, etc'. You can play with them. As most of the ROMs have Root and Busybox installed, we don't need any of these features.
Now comes a bit advanced part. Select ADVANCED OPTIONS. There are various options like Deodex files, add Nano text editor, signing APKs, etc. I'll explain each of them:
Deodex: Merges ODEX and APK together. However, it's applicable for ODEXed ROMS (mostly Stock 2.1) only. Neither of GB and FroYo versions are ODEXed. So you can skip this step.
Add task killer tweak: It's a good alternative to Supercharger script. Only thing is, it isn't as versatile as Supercharger script. Leave this if you don't know anything about Task killer values like FOREGROUND APP, BACKGROUND APP, etc
Add data/app functionality: Suppose you've come across a situation that the system size reaches almost 150 MB (standard for GT540) and still you want to add some more apps, then this tweak is for you. It adds the /data/app folder. You can place apps in this folder. These apps will be directlty installed in the /data partition thus eliminating the 150MB limit.
Add Bash: Adds command-line completion in Terminal commands. Install if you want. Not needed.
Add Apps2SD: This is much primitive type of Apps2SD in which you have to create an ext partition on your SD card. Not recommended. Link2SD (app) is much better.
Add busybox run-parts: This tweak is most important one. I enables the startup scripts option, that means, scripts placed in /etc/init.d folder will get executed during the booting process. Recommended for Stock and AOSP ROMs only.
Add custom boot animation: If you want to add a custom boot animation to your ROM, then you need this. Select this option. It'll ask you to proceed, hit ENTER. A folder /data/local will be created inside the WORKING_xxxxxxx_xxxxxxx folder. Place your bootanimation.zip in that folder. Google some nice boot animations or if you want to create your own boot animations, Despotovski brothers had made a 'Boot Animation maker', check it here http://forum.xda-developers.com/showthread.php?t=1234611
Rest all tweaks are not required for now
III. Something's Cooking!
There will be a folder named something like WORKING_xxxxx_xxxxxxxx in your kitchen folder. Open it up. It contains the actual system, boot.img file, data directory etc.
The best feature of DsiXDA is that you can easily 'browse' the system.
Open the system folder. Here you can see the apps, etc, lib, usr, etc folders.
Adding / Removing Apps: Open the apps folder. You'll see APKs of all the system apps. Try removing some apps. You can remove Dev tools, pre-installed CM themes or any other app. Add your own apps. Copy-paste your apps here. If their filenames have spaces in them (like Root Explorer.apk) remove these spaces (like RootExplorer.apk). You can also use the /data folder for adding more apps.
Adding some other stuff: The /etc folder has a lot of cool stuff too. The apns-conf.xml file contains the APNs. System can auto-detect the APN according to your carrier. I got an apns-conf.xml file which contains a huge list of APNs. Just replace the existing file.
Adding Fonts: Pick your favorite font (I like Ubuntu). Grab the .ttf file of that font. Open /fonts folder. Remove the existing DroidSans.ttf file. Copy-paste your font file in it and rename it to DroidSans.ttf.
IV. Final Steps:
Open the kitchen menu. Advanced Options → Sign all APKs
Back to main menu. '9. Check update-script for errors'.
'6. Zipalign all APKs'
'99. Build ROM'. If it shows warning regarding BOOT-EXTRACTED folder exists, select y (remove BOOT-EXTRACTED).
Select a build option → 1. Interactive Mode
Would you like to Zipalign → n (we already did that before)
It'll start making update.zip.
Add updater-script to your ROM → y (We want compatibility with ClockworkMod)
Proceed with the change → y
Sign your ROM → y
Change the name → n
Once you're back to main menu, select Exit (x)
Your ROM is located in OUTPUT_ZIP folder (It'll be a zip file)
Copy this zip file on your SD card. Reboot into Recovery. Select 'Install zip from SD card', select the ZIP file.
Reboot. See if everything works properly.
I KNOW THERE MIGHT BE ZILLIONS OF ERRORS IN THIS GUIDE. IF YOU'RE STUCK AT SOME POINT OR CANNOT UNDERSTAND SOMETHING, TELL ME. I'LL TRY TO MAKE THIS GUIDE MORE EASIER TO UNDERSTAND.
THIS IS A BASIC SOFT-MODDING GUIDE. I'M DOING SOME INVESTIGATION REGARDING THEMING AND BUILD.PROP TWEAKS. I'LL BE ADDING THESE SECTIONS LATER.
WOW nice work making this TUT!!
Nice Work!
thanks!!
gonna try this out sometime
There is a search feature guys this was posted about like half a year ago
I tried the kitchen its not that great all you can do is zipalign change some options and re package
TBH androidboss you probably could do more using terminal and root explorer
Sent from my tf101 using xda premium 1.54Ghz
Guys! Before Soft-Modding please ask the Devs first. They worked and took up free time for those roms and they would like a thanks.
Danzano said:
There is a search feature guys this was posted about like half a year ago
I tried the kitchen its not that great all you can do is zipalign change some options and re package
TBH androidboss you probably could do more using terminal and root explorer
Sent from my tf101 using xda premium 1.54Ghz
Click to expand...
Click to collapse
really i should try one day!
with credits and thanks!!
Algud if you need tips or want a hand customizn give me a shout hell if you wana use enigma and just cretic it to you're liking be my guest
Sent from my tf101 using xda premium 1.54Ghz
Danzano said:
Algud if you need tips or want a hand customizn give me a shout hell if you wana use enigma and just cretic it to you're liking be my guest
Sent from my tf101 using xda premium 1.54Ghz
Click to expand...
Click to collapse
yeah thanx bro!!
i will try and make one during this weekend
once i get my phone fixed..
i will pm you if i need help with something about the
soft-mod!!
All good
Sent from my tf101 using xda premium 1.54Ghz
Danzano said:
All good
Sent from my tf101 using xda premium 1.54Ghz
Click to expand...
Click to collapse
pm' ed u!!
soz its a bit long!
I'll be writing the "Theming using UOT Kitchen" tutorial tonight
tejasdj12 said:
I'll be writing the "Theming using UOT Kitchen" tutorial tonight
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?p=18934516#post18934516
you can base on this if u want

[Q] How to make Custom Rom ?

Did anyone has tried the dsixda Android Kitchen to make a custom rom for OB ? Is it working ?
http://forum.xda-developers.com/showthread.php?t=633246
or just give me a link to very helpful site about how to make custom rom for OB
For starters, yes it works. but nothing compares as to compiling and building from source (Linux).
What you need is a mere system dump or backup from CWM.
That backup will be saved in your CWM folder in SD
Grab the boot.img & system.ext3.tar
unpack the .tar with a zip/RAR propgram
grab a base upater script from the many ROMs around here
Now for a start:
your base ROM like Zeus etc.
Delete the system folder and boot.img from that zip.
Replace files.
Use dsixda kitchen via cygwin (windows)
Now do as you please... it can unpack boot.img and add features like init.d etc.
Adding apps:
Apps can be added together with som libs (system/lib). Example: Terminal Emulator. the lib is some "jackpal" or something. .
When you download an app, apk will be saved in data/app in your phone. The lib or added files will be saved in data/data/(app name folder)/lib. Grab the apk and insert in system/app (kitchen's working folder). Grab the lib and insert it in system/lib (kitchen's working folder).
gabwerkz said:
For starters, yes it works. but nothing compares as to compiling and building from source (Linux).
What you need is a mere system dump or backup from CWM.
That backup will be saved in your CWM folder in SD
Grab the boot.img & system.ext3.tar
unpack the .tar with a zip/RAR propgram
grab a base upater script from the many ROMs around here
Now for a start:
your base ROM like Zeus etc.
Delete the system folder and boot.img from that zip.
Replace files.
Use dsixda kitchen via cygwin (windows)
Now do as you please... it can unpack boot.img and add features like init.d etc.
Adding apps:
Apps can be added together with som libs (system/lib). Example: Terminal Emulator. the lib is some "jackpal" or something. .
When you download an app, apk will be saved in data/app in your phone. The lib or added files will be saved in data/data/(app name folder)/lib. Grab the apk and insert in system/app (kitchen's working folder). Grab the lib and insert it in system/lib (kitchen's working folder).
Click to expand...
Click to collapse
many thanks gabwerkz. I had been searching ebook The Complete Idiot's Guides to custom rom, but I think the book has not published yet.
I only once tried to cook with kitchen, but that's waaaaay back and there I simply had no clue, of what I am doing and those days, the cust ROM I made, didnt work, but I simply randomly applied mods/tweaks and also had no clue of how things like updater-script work, but now I do and maybe as soon as I got some time again (in about 2 months ) I'll give it another shot and also read a lot about deving on my own and all the stuff related to it. Then maybe I'll be able to help all the cookers here out in a better way, cause until now, I only got the basics
You can start with simply things, like extracting the files with a packer, remove LG bloatware, add files/patches, you can find in dev section, add apps you like and think others might like as well, change lockscreen, launcher, keyboard,...
Remember to always do this step by step and make a changelog for yourself, so you know, where you might have made a mistake (also important for others to be able to help you). Then repack your ROM, sign and test it, if it works properly, use kitchen, to zipaligne, deodex, change filesystem,... And as soon as you are satisfied, post it/PM the good ones in here, to test it and ask for opinions, what you might change next. Custom kernels are always cool, cause you can change way more, like governors, iosched,... But that will take more time to dev and a lot more time to test for errors
Hope this helps you out a bit
N00BY0815 said:
I only once tried to cook with kitchen, but that's waaaaay back and there I simply had no clue, of what I am doing and those days, the cust ROM I made, didnt work, but I simply randomly applied mods/tweaks and also had no clue of how things like updater-script work, but now I do and maybe as soon as I got some time again (in about 2 months ) I'll give it another shot and also read a lot about deving on my own and all the stuff related to it. Then maybe I'll be able to help all the cookers here out in a better way, cause until now, I only got the basics
You can start with simply things, like extracting the files with a packer, remove LG bloatware, add files/patches, you can find in dev section, add apps you like and think others might like as well, change lockscreen, launcher, keyboard,...
Remember to always do this step by step and make a changelog for yourself, so you know, where you might have made a mistake (also important for others to be able to help you). Then repack your ROM, sign and test it, if it works properly, use kitchen, to zipaligne, deodex, change filesystem,... And as soon as you are satisfied, post it/PM the good ones in here, to test it and ask for opinions, what you might change next. Custom kernels are always cool, cause you can change way more, like governors, iosched,... But that will take more time to dev and a lot more time to test for errors
Hope this helps you out a bit
Click to expand...
Click to collapse
Your post help me a lot... thanks... I will try what you told me todo...
And If your rom need a bootanimation just PM me right...

Categories

Resources