[GUIDE] Create your own Soft-MODs - GT540 Optimus Android Development

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

Related

Input Script into Startup

So I recently came across a script at Modaco Forums that allows me to light up the capacitive buttons while using the Desire Port. I was wondering if there was a way for me to implement that into the ROM without having to go to GScript everytime. I have Dsxdsi's ROM Kitchen installed so I'm thinking I could use that. I just don't know where the file would go.
I attached the file that contains the script. And this is the thread I got it from.
http://android.modaco.com/content/g...ble-capacitive-buttons-for-nexus-desire-roms/
add a shortcut to your homescreen directly to the script, voila.
though it would be nice to have this on bootup..
That's what I mean.
/system/etc/init.d/
Rename the script to have numbers in the beginning, or just link it in 20userinit.
Depending on what 20userinit you've got (system/etc/init.d/) some look to the sd card for a script called userinit.sh and executes it if it exists.
Load up userinit.sh on your sd card with whatever you like (using #!/system/bin.sh) and go wild. It's a great way to set everything up that you need... especially after you've just installed a new build (mine restores all my settings before I even get to the home screen - bliss). It runs in a root context so if you copy or create files or directories you'll need to chmod as necessary.
add a shortcut to your homescreen directly to the script, voila
Click to expand...
Click to collapse
Out of curiousity, how do you do that with a script? I use GScript but it doesn't work right with some of my scripts and would love to hear of any alternatives.
-------------------------------------
Sent from a device of some sort.

[GUIDE] How to make mymode themes

Well I haven't had much time lately to make themes but I figured i got enough time to explain how. This is how i do it in windows 7.
1) First thing i assume that you already have androidsdk on the root of your C drive. Lets go ahead and add it to your system path. If it's not called androidsdk go ahead and change it to that. Now open up your startmenu, right click computer, click properties, then click advanced system settings, in the advance system settings select environment variables. In the second box down look for path select it and choose edit. copy and paste this
Code:
;C:\androidsdk\tools
in there. Click okay.
2) download the jre and jdk from here and install them. Now you need to add them to your system path so copy paste this
Code:
;C:\Program Files (x86)\Java\jre6\bin;C:\Program Files (x86)\Java\jdk1.6.0_20\bin
to your system path just like you did in the first step.
3) Download apk manager from here. Now run it and when it says clean out all current projects click yes. Now thats ready to go.
4) Download an image editing program. I use gimp. Also if you don't have it 7-zip
your all set to go now so lets start over with the numbers
1) choose a mymode apk and extract it with 7-zip. Open up the res folder select a png that you want to change and change it with the image editor you chose.
2) when you've changed the images you want open up the original apk as an archive with 7zip. Then place the res folder of the modified unzipped apk into the archive and close the archive.
3) Now open up apk manager and place the mymode apk into the place here for signing folder click script batch choose no then type 15.
4) Now put the newly signed apk into your androidsdk/tools folder and close apk manager.
5) open command prompt and type this
Code:
cd\
cd androidsdk/tools
adb install whatever.apk
I'll update this with pics a more thorough guide.
Thanks to everyone that made this easy
reserved for themes to come
Thanks been waiting for a thread like this.
thanks, if i ever get any free-time between jobs and kid and fiancee i will look into this a little more
This is an awesome guide! I messed around with theming mytouch/g1 back when I had one.. so this will be great to make some themes for the slide..
One question though.. let's say you pull the nest theme.. theme it and re install it.. will it just override the nest theme or in the theme listing will it appear as a new theme and still allow you to have the original theme?
Sent from my T-Mobile myTouch 3G Slide using XDA App
ryanolson7 said:
One question though.. let's say you pull the nest theme.. theme it and re install it.. will it just override the nest theme or in the theme listing will it appear as a new theme and still allow you to have the original theme?
Sent from my T-Mobile myTouch 3G Slide using XDA App
Click to expand...
Click to collapse
The nest theme is in the framework, its not an .apk like the rest, its built into the system. The rest of the mymodes themes are .apks and if you edit those they will override the stock "nest" theme. The only way it will show up different in the theme chooser is if you edit the preview snapshot to be a preview of your theme. If you wanna keep the original theme, the nest theme is it and you should edit a different theme .apk...
-BMFC
Sent from my ROOTED MyTouch3G Slide
Okay so I got the next three days off and I already got two mymode themes pretty much done well their done but I just learned of a way to change the name so they are there own standalone apk instead of using another apk name. I've been using puppypride (which by the way isn't puppies those are full grown dogs) and switching out the pngs and you couldn't have the regular puppypride now you can have both
hope you don't mind but I did a mod of your themes and took out the bubbles since some people always create threads about it
Help with following guide
I am a newb at this so please don't attack me if I am doing something wrong. I have been struggling with following the guide posted to make mymode themes. I have successfully got up to the step of signing the apk file. I modified the files in the free_kick.apk. When I try to use APK Manager 4.8 and using the directions given the file just gets erased and nothing happens. My log file just shows errors. Any help with a more detailed directions one what to do in APK manager as I am trying different things and not getting anywhere. I use the option 15 like told in the guide. I can send my modified apk file to anyone if they can get this to work and get it installed that would be appreciated so much. I hope I can figure this out my own but thought I would try get help from the forums. Thanks in advance.
impimms said:
I am a newb at this so please don't attack me if I am doing something wrong. I have been struggling with following the guide posted to make mymode themes. I have successfully got up to the step of signing the apk file. I modified the files in the free_kick.apk. When I try to use APK Manager 4.8 and using the directions given the file just gets erased and nothing happens. My log file just shows errors. Any help with a more detailed directions one what to do in APK manager as I am trying different things and not getting anywhere. I use the option 15 like told in the guide. I can send my modified apk file to anyone if they can get this to work and get it installed that would be appreciated so much. I hope I can figure this out my own but thought I would try get help from the forums. Thanks in advance.
Click to expand...
Click to collapse
Actually the guide needs to be fixed a little because i'm guessing your getting compiling errors when using apk manager? But the best way to do this is to open up the mymode theme (using 7zip) as an archive delete meta-inf folder then replace the pngs with ones of your choice as long as they are the same scale. Then resign. and install
totally lost
I've followed these directions to a T and when it comes to using the apk manager i am getting nothing, please help
You guys that are having trouble with apk manager...its honestly not necessary to use Apk Manager for this. Mymodes themes are system .apks and shouldn't be re-signed. What you need to do is forget about apk manager (for now) and drop the UNsigned .apk into the ROM update you are using, and resign the whole ROM using the autosign tool created by jesusfreke. Or just adbpush the .apk. but don't resign the .apk.
Here's the link for the autosign tool to sign ROM updates. its in the THIRD POST and its auto-sign .zip, NOT the signing.zip in the first post. you can put it anywhere you want and you just drop (a copy of) your ROM update in the autosign folder, rename it update.zip, then run the sign.bat to sign. it will create another file, update-signed.zip. you shouldnt need to wipe when flashing the same ROM over itself, but i cant guarantee this is true for all ROMs.
you can also make an update that will only flash the .apk to /system/app, and nothing else will be changed. basically just make a copy of the update for the ROM youre using, then delete everything but the /system directory from the zip. then go into that /system directory and delete everything but the /app directory, then go into it and delete all the .apks and odex file or whatevers in there. ALL OF IT. when you are finished you should have an update with nothing in it but a /system/app directory. you put your modded .apk in there in /system/app, and thats it for that.
then you must edit the update script and remove MOST of its contents so that it only does what you want it to. THIS IS IMPORTANT! Go here to learn how to create an update script. what youll need is way simpler than the examples, youll want it to look basically like this...
Code:
assert compatible_with("0.2") == "true"
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
this update script will copy ANYTHING in the /system directory to /system on your device, regardless of subdirectories. that means anything in /system will go in /system, anything in /system/app will go to /system/app, etc. but since you only have one .apk in there it wont mess with anything but what you put in there. this way, you have a NOWIPE update for...well, whatever you want to put in it.
so you just drop the new shortened update-script in /META-INF/com/google/android/
and then use the autosign tool to resign your new update then flash away! This also takes less time cus its only flashing one file instead of flashing a whole ROM just to replace that one file...
hope this helps...
-BMFC
Sent from my T-Mobile myTouch 3G Slide using XDA App
So you cannot do this on t-mobile's rom which is 2.1 right now? I'm leery of rooting in case they ever release froyo
Tbrewer80 said:
So you cannot do this on t-mobile's rom which is 2.1 right now? I'm leery of rooting in case they ever release froyo
Click to expand...
Click to collapse
I'm having issues with this as well... After I do the whole signing apk thing, it installs fine, but when I go to MyModes, the preview is black and when I select it, the MyModes app force closes. I don't get it.

[Tool] Inject Apps to ROM for Installation

If you're like me, you probably have installed a new ROM at least once a week. I usually use Titanium Backup to restore all my Apps, but it takes quite a long time since I use a lot of Apps. Also, if you don't have the Pro version of Titanium Backup, you will need to click through the Install button for every App you want to install.
This program is a simple way to fix that. What it does is it injects you Apps as part of the ROM when you install a new ROM. This way, as soon as you install your ROM, your Apps will already be installed as part of the ROM.
I have only tried this with the latest Team Whiskey Onyx ROM, but it should work with most, if not all ROMs.
Also, not all Apps can be installed this way, especially if you try to include the data. YMMV.
INSTRUCTIONS
Prepare your computer
1. Install Java JRE and SDK.
2. Install 7-Zip. It can be found here: http://www.7-zip.org/
3. Download Testsign.jar. It can be found here: http://www.robmcghee.com/android/creating-an-android-update-zip-package/. Download the file "Testsign.zip" and extract it. Testsign.jar should be in there. You will need this later.
4. Set up your windows Path Environment.
a. Go to your Control Panel and open "System."
b. For Windows 7, you will need to click on "Advanced System Settings."
c. Go to the "Advanced" tab.
d. Click on the "Environment Variables" button.
e. Under "System Variables" find "Path." Select it and click on the "Edit" button.
f. A window should pop up a field for "Variable value." In there, you will want to add your 7-Zip and Java SDK bin path. At the end of "Variable value," add (without the quotes)
";C:\Program Files (x86)\Java\jre6\bin;C:\Program Files\7-Zip"
It might be slightly different for you if you're not using a 64-bit Windows. Basically, this step is to allow you to run the Java and 7-Zip command-line tools from anywhere in your system.
5. Reboot your computer.
6. Test to make sure you can run the Java tools and 7-Zip tools. Do this by running "cmd." A command-line prompt should appear. In there, type "java" and hit enter. The usage info for running java should appear. Now type "7z" and hit enter. The usage info for 7-Zip should appear. Your computer is now set up to run my batch file.
Prepare your Apps
WARNING: Not all Apps work using this method, and not all data can be restored using this method. If it doesn't work, you can restore it using Titanium Backup and it should work fine. Once you find that a certain App doesn't work, you should probably remove it from your App/Data folder (read below) so it doesn't install next time using this method.
1. Get all your APKs and data. The easiest way I know how to do this is by using Titanium Backup to make a backup of all my Apps.
2. Use Titanium Backup and back up your Apps.
3. Inside your SD Card, you should have a TitaniumBackup folder. All your Apps and data are in here. Every App you have backed up in Titanium should have 3 files. A .properties file, a apk.gz file, and a tar.gz file. The apk.gz file will contain your APK. The tar.gz file will contain your data. You can extract these files using something like WinRAR.
4. Extract your APKs and put them in a folder called "data\app". Extract your App's data and put them in a folder called "data\data". Your "data\data" should look something like this "data\data\com.appname".
5. Once this is complete, you can use this APK/data set for any future ROMs.
Create your ROM with your Apps
1. Put AppToROM.bat, testsign.jar, your data folder, and your ROM's zip into the same folder.
2. Drag your ROM's zip onto AppToROM.bat.
3. The batch file will now start creating your new ROM for you. It will do the following steps:
a. Extract your ROM.
b. Copy your data to the extracted ROM folder.
c. Zip everything back up.
d. Sign the new Zip.
4. When everything is done, you should have a "NewROM.zip" file. Use this new Zip file to install your ROM like you normally would.
Disclaimer:
I take no responsibility for any harm that this may do to your device. All of the tools here, except the bat file, I did not write. I just created a bat file that puts all the tools together to make it easier to install your Apps after installing a new ROM.
or you could just open your update.zip and place your apks in system/app re-zip and flash. Done this multiple times and it works. just need to keep a copy of your apks on your computer. ill try this method tonight. thanks
If you put it into "system/app" it will install it as a System app, and I believe you can't uninstall it regularly (kind of like how you can't install the bloatware). You will need to use Titanium Backup to uninstall it.
Also, I remember reading that some people were not able to install the ROMs after zipping it up because it's not signed.
This script is very simple. It basically just unzips the ROM, copies over your apps, zips back the ROM, and then signs it. Once you have your Windows set up, you can just drag and drop the ROM to the .bat file and it'll do all that for you.
Is this useless? Maybe. But, the same could be said for something like RyanZA's OCLF. You can sit there, type in all the commands to convert to EXT2, wait for it to convert, and reboot, or you can just run OCLF (which is basically just running a script for the conversion, to put it simply).
blackerwater said:
or you could just open your update.zip and place your apks in system/app re-zip and flash.
Click to expand...
Click to collapse
Why not just put them into data/app instead?
or you could just...
Or you could just download a pro version of titanium backup so that it can restore all your apps without you needing to click. There are plenty to be found online. The latest version, the better, as it would be more stable with froyo
So doing things this way... since it will be signed, i can also take other things out form other roms that i like and toss them in this rom??
I have titanium paid version. Just run it and it does everything
Sent from my SGH-T959 using XDA App
Dude it's called WinRAR. Open up the zip. Drop your apps into the data/app folder.
Then flash it. Simple.
Want certain apps to stay even after hard resetting? put them in system/app
This tool is completely unnecessary.
That's really a good idea. I like the method very much, it give me more free time to do some other things when flashing...Thanks !
Anderdroid said:
Dude it's called WinRAR. Open up the zip. Drop your apps into the data/app folder.
Then flash it. Simple.
Want certain apps to stay even after hard resetting? put them in system/app
This tool is completely unnecessary.
Click to expand...
Click to collapse
Ditto. This seems way more complicated then the method I've been using. You say it's simple that there are like 20 steps.
yeah and CWM has the option to toggle signature verification.. so you can flash unsigned apps on the vibrant.. but if you use 7zip it doesnt mess with the sig...
epakrat75 said:
Why not just put them into data/app instead?
Click to expand...
Click to collapse
Or that should work. And as for signing problems I us ubuntu and ive never had that happen but I guess with windows anything is possible.
Sent from my vibrant
Etrnaly said:
If you put it into "system/app" it will install it as a System app, and I believe you can't uninstall it regularly (kind of like how you can't install the bloatware). You will need to use Titanium Backup to uninstall it.
Click to expand...
Click to collapse
$adb shell
$su
#rm /system/app/CrappyBloatwareAppOfChoice.apk
Done.
No need for titanium.
Sorry for the noob question
Anderdroid said:
Dude it's called WinRAR. Open up the zip. Drop your apps into the data/app folder.
Then flash it. Simple.
Want certain apps to stay even after hard resetting? put them in system/app
This tool is completely unnecessary.
Click to expand...
Click to collapse
When you say your apps do you mean your .apks thanks

★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.

[HOW TO] Turn an RUU into a "custom" de-odexed ROM

I first wrote this guide here on my site and thought I should put it here as well.
I am going to write this post to show how "easy", yet time-consuming, converting an RUU into a custom, de-odexed ROM can be as long as you can follow directions. I am doing this to hopefully help with development of ROMs for people who may be a bit intimidated on doing this. Before you start, you’ll need:
1. A Windows installation
2. VirtualBox installed in Windows
3. Ubuntu 10.04 (at least) installed in VirtualBox
4. dsixda’s Android Kitchen set up properly in Ubuntu
5. Java JDK installed in Ubuntu (Search openjdk in Synaptic Package Manager)
6. No fear of taking your time with this
I am suggesting the above because that’s what I’ll be using for this guide. Some devs frown at the use of kitchens but de-odexing manually can be a real pain in the ass and very time consuming.
First things first, you need to have Ubuntu up and running inside VirtualBox and you’ll need to get the Android Kitchen set up properly. To do this, extract the Android Kitchen zip file you downloaded. Rename the extracted folder to just “kitchen”. Copy that folder into your Ubuntu “home” directory. The final path will be “/home/username/kitchen”. You can test this by opening Terminal and typing:
Code:
cd kitchen
./menu
If the Android Kitchen starts, then you’re good to go. It’s that easy.
Now, going back to your Windows installation, download the RUU you want to build from. Once downloaded, you’ll need to double-click the RUU to run it. You’ll get a window that opens to allow you to continue installing the RUU. You need to not click anything there. Leaving that window open, open a Windows Explorer window. In the address bar type:
Code:
%temp%
and hit enter. This will take you into your Temp directory where the rom.zip is extracted. You can now do a search for rom.zip. Once found, copy the rom.zip to another directory (ie. Desktop). You can now close out of the RUU installer.
You’ll need to now copy your rom.zip to your Ubuntu virtual machine. How you do that is up to you. The easiest way is to set up Shared Folders in VirtualBox and copy it from within Ubuntu.
Once you have this file in Ubuntu, for simplicity, copy it to your desktop. Next, you’ll need to extract it. Simply right-click the rom.zip and select “Extract Here”.
If you now open you extracted folder, you should see a bunch of .img files. The 2 we are looking for are system.img and boot-signed.img. For now, create a new folder on your desktop, we’ll call it “custom”, and copy the boot-signed.img into that folder (I usually rename boot-signed.img to boot.img). Also create a folder called “system” in the same directory. Next we need to mount the system.img so we can extract the contents into the “system” folder you just created. Back in Terminal, type:
Code:
sudo mkdir -p /mnt/temp
sudo mount -o loop ~/Desktop/rom/system.img /mnt/temp
and then
sudo cp -r /mnt/temp/* ~/Desktop/custom/system
After several minutes, you should have a folder called “custom” on your desktop and inside of that should be “boot.img” and a “system” folder with a bunch of files and folders in it. You now need to change permissions on the folder so you can zip it up and copy it all. Back in Terminal type:
Code:
sudo chown -R username ~/Desktop/custom
Next step is to zip it all up so we can get it into the kitchen. Highlight both the “boot.img” and “system” folders, right-click them, and select “Compress”. Change the extension to .zip and click OK. Once zipped, drag (or copy) that folder into /home/username/kitchen/original_update.
Open Terminal and type:
Code:
cd ~/kitchen
./menu
Once the kitchen starts, you’ll need to set up a Working Folder, so select option “1″. If you only have 1 ROM zip in there you can just hit Enter. Follow through the prompts to rename your working folder if you want. I’m not going to guarantee that it will always work but it has worked for me in the past to select option “2″ from the main menu to “Add root permissions”. Moving on to de-odexing, select option “0 – ADVANCED OPTIONS”. Next, select option “11 – Deodex files in your ROM”. I usually do this by deodexing framework first and then system. If you’re de-odexing the ATT ROM, “PirateGhost” from xda clued me in that you need to temporarily remove the “com.att.vmm.sharedlib.jar” from /system/framework otherwise de-odexing will fail. When you get into the de-odexing option it will have you set your API level. The default is 10 which is Android 2.3.4 however, ICS can be 14 or 15. If on the latest 4.0.3, it’s API Level 15. Google can also help you here. If you’ve done everything right it will de-odex for 20 minutes or so depening on your hardware and should say “0 .odex files remain”. If you have any that remain, you can do them manually or not at all. Up to you on how you do it.
Since that’s basically all we’re discussing for right now on creating this ROM, we’ll continue on to building a flashable zip. Back at the main menu, select option “99 – Build ROM from working folder”. I recommend using the default “Interactive Mode”. Select yes to optimizing/zip-aligning all apks. When asked to add Updater-script to ROM, select yes. Here’s the thing with the updater-script that it builds. It’s only partially right. You need to fix the partition format section for the Vivid (or for whatever phone you’re building for). It’s best to look at some other’s scripts to see how it’s done. When asked by the wizard to sign your ROM, don’t do it. It’s not necessary. Feel free to rename it to whatever you want. After you’ve fixed the updater-script and I do mean AFTER, you can try flashing the ROM. And don’t forget to flash the boot.img as well.
There you have it. You now have a base ROM for you to work from. Obviously, this is just scratching the surface of what can be done but it’s a start. This is just how I do it. There are other ways to accomplish the same thing but this method has worked for me. Attached is a sample updater-script that I pulled from my AT&T stock ICS ROM. Use it only as a template and modify it to fit your needs and obviously, remove the txt extension.
Jirv311 said:
I first wrote this guide here on my site and thought I should put it here as well.
I am going to write this post to show how "easy", yet time-consuming, converting an RUU into a custom, de-odexed ROM can be as long as you can follow directions. I am doing this to hopefully help with development of ROMs for people who may be a bit intimidated on doing this. Before you start, you’ll need:
1. A Windows installation
2. VirtualBox installed in Windows
3. Ubuntu 10.04 (at least) installed in VirtualBox
4. dsixda’s Android Kitchen set up properly in Ubuntu
5. Java JDK installed in Ubuntu (Search openjdk in Synaptic Package Manager)
6. No fear of taking your time with this
I am suggesting the above because that’s what I’ll be using for this guide. Some devs frown at the use of kitchens but de-odexing manually can be a real pain in the ass and very time consuming.
First things first, you need to have Ubuntu up and running inside VirtualBox and you’ll need to get the Android Kitchen set up properly. To do this, extract the Android Kitchen zip file you downloaded. Rename the extracted folder to just “kitchen”. Copy that folder into your Ubuntu “home” directory. The final path will be “/home/username/kitchen”. You can test this by opening Terminal and typing:
Code:
cd kitchen
./menu
If the Android Kitchen starts, then you’re good to go. It’s that easy.
Now, going back to your Windows installation, download the RUU you want to build from. Once downloaded, you’ll need to double-click the RUU to run it. You’ll get a window that opens to allow you to continue installing the RUU. You need to not click anything there. Leaving that window open, open a Windows Explorer window. In the address bar type:
Code:
%temp%
and hit enter. This will take you into your Temp directory where the rom.zip is extracted. You can now do a search for rom.zip. Once found, copy the rom.zip to another directory (ie. Desktop). You can now close out of the RUU installer.
You’ll need to now copy your rom.zip to your Ubuntu virtual machine. How you do that is up to you. The easiest way is to set up Shared Folders in VirtualBox and copy it from within Ubuntu.
Once you have this file in Ubuntu, for simplicity, copy it to your desktop. Next, you’ll need to extract it. Simply right-click the rom.zip and select “Extract Here”.
If you now open you extracted folder, you should see a bunch of .img files. The 2 we are looking for are system.img and boot-signed.img. For now, create a new folder on your desktop, we’ll call it “custom”, and copy the boot-signed.img into that folder (I usually rename boot-signed.img to boot.img). Also create a folder called “system” in the same directory. Next we need to mount the system.img so we can extract the contents into the “system” folder you just created. Back in Terminal, type:
Code:
sudo mkdir -p /mnt/temp
sudo mount -o loop ~/Desktop/rom/system.img /mnt/temp
and then
sudo cp -r /mnt/temp/* ~/Desktop/custom/system
After several minutes, you should have a folder called “custom” on your desktop and inside of that should be “boot.img” and a “system” folder with a bunch of files and folders in it. You now need to change permissions on the folder so you can zip it up and copy it all. Back in Terminal type:
Code:
sudo chown -R username ~/Desktop/custom
Next step is to zip it all up so we can get it into the kitchen. Highlight both the “boot.img” and “system” folders, right-click them, and select “Compress”. Change the extension to .zip and click OK. Once zipped, drag (or copy) that folder into /home/username/kitchen/original_update.
Open Terminal and type:
Code:
cd ~/kitchen
./menu
Once the kitchen starts, you’ll need to set up a Working Folder, so select option “1″. If you only have 1 ROM zip in there you can just hit Enter. Follow through the prompts to rename your working folder if you want. I’m not going to guarantee that it will always work but it has worked for me in the past to select option “2″ from the main menu to “Add root permissions”. Moving on to de-odexing, select option “0 – ADVANCED OPTIONS”. Next, select option “11 – Deodex files in your ROM”. I usually do this by deodexing framework first and then system. If you’re de-odexing the ATT ROM, “PirateGhost” from xda clued me in that you need to temporarily remove the “com.att.vmm.sharedlib.jar” from /system/framework otherwise de-odexing will fail. When you get into the de-odexing option it will have you set your API level. The default is 10 which is Android 2.3.4 however, ICS can be 14 or 15. If on the latest 4.0.3, it’s API Level 15. Google can also help you here. If you’ve done everything right it will de-odex for 20 minutes or so depening on your hardware and should say “0 .odex files remain”. If you have any that remain, you can do them manually or not at all. Up to you on how you do it.
Since that’s basically all we’re discussing for right now on creating this ROM, we’ll continue on to building a flashable zip. Back at the main menu, select option “99 – Build ROM from working folder”. I recommend using the default “Interactive Mode”. Select yes to optimizing/zip-aligning all apks. When asked to add Updater-script to ROM, select yes. Here’s the thing with the updater-script that it builds. It’s only partially right. You need to fix the partition format section for the Vivid (or for whatever phone you’re building for). It’s best to look at some other’s scripts to see how it’s done. When asked by the wizard to sign your ROM, don’t do it. It’s not necessary. Feel free to rename it to whatever you want. After you’ve fixed the updater-script and I do mean AFTER, you can try flashing the ROM. And don’t forget to flash the boot.img as well.
There you have it. You now have a base ROM for you to work from. Obviously, this is just scratching the surface of what can be done but it’s a start. This is just how I do it. There are other ways to accomplish the same thing but this method has worked for me. Attached is a sample updater-script that I pulled from my AT&T stock ICS ROM. Use it only as a template and modify it to fit your needs and obviously, remove the txt extension.
Click to expand...
Click to collapse
Thanks, I've De-odexed ICS 4.0.3 ROM from WEE RUU. But. When I flash to Phone. The boot was successfully. And Everything works. But in the Sense Desktop. Any of ICON's Title Couldn't Display in the Sense Homescreen. It's totally naked!! including widgets. What's Problem? The others text display is work.
My Lab: Windows 7 with JDK&JRE
Cygwin+Kitchen 1.92
---------- Post added at 11:26 AM ---------- Previous post was at 11:24 AM ----------
Should I Cooking ICS with Ubuntu?
ChunD.K said:
Thanks, I've De-odexed ICS 4.0.3 ROM from WEE RUU. But. When I flash to Phone. The boot was successfully. And Everything works. But in the Sense Desktop. Any of ICON's Title Couldn't Display in the Sense Homescreen. It's totally naked!! including widgets. What's Problem? The others text display is work.
My Lab: Windows 7 with JDK&JRE
Cygwin+Kitchen 1.92
---------- Post added at 11:26 AM ---------- Previous post was at 11:24 AM ----------
Should I Cooking ICS with Ubuntu?
Click to expand...
Click to collapse
Can you grab a screenshot? Seems pretty strange.
I find problems out。When I tried to Extract All files form a Stock RUU。Than pack it up without any touching。flash to phone。Boot Successfully...
But IT'S JUST NAKED!!! I really confused!
RUU Version:Australian RUU-HOLIDAY-ICS-35-S-Telstra-WWE-3.25.841.4-Radio-3.02.4740.09-34.20.701040.19
Everything is fine when I Run RUU.exe to update。
Jirv311 said:
Can you grab a screenshot? Seems pretty strange.
Click to expand...
Click to collapse
Where you are? I need your Reply.
ChunD.K said:
Where you are? I need your Reply.
Click to expand...
Click to collapse
I need your screenshot.
Jirv311 said:
I need your screenshot.
Click to expand...
Click to collapse
Finally, Here is the Problem Screenshot. SO WERIED
I‘ve also use the latest Touch RECOVERY。 Problem is still。。。
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You gotta help me!
I mean i Pack them pu without any touching。
Where are you?
If I had to guess, I'd say you're using an unsupported language? I honestly am not sure.
Sent from my HTC PH39100 using xda premium
No, Itried switch to English. It jut naked.
Thanks alot for the thread! Is there anyway you could go into more detail about fixing the updater script for vivid?
bennykudos said:
Thanks alot for the thread! Is there anyway you could go into more detail about fixing the updater script for vivid?
Click to expand...
Click to collapse
I attached the updater-script to the OP. The main thing that needs fixing when your building it is putting in the correct format commands for the Vivid.
Do you know how to decompile the apks? I have expiernce with decompiling
Apks on the Samsung infuse but I can not figure out how do it for this phone...I can't even successfully install the framework...and yes I'm using an ics apktool...I've tried on both windows 7 and ubuntu 11.04
Could someone please link me to an apktool that works with this phones stock ics apks and tell me any special/extra steps I need to do to install framework and decompile apks
Sent from my HTC PH39100 using xda app-developers app
mg2195 said:
Do you know how to decompile the apks? I have expiernce with decompiling
Apks on the Samsung infuse but I can not figure out how do it for this phone...I can't even successfully install the framework...and yes I'm using an ics apktool...I've tried on both windows 7 and ubuntu 11.04
Could someone please link me to an apktool that works with this phones stock ics apks and tell me any special/extra steps I need to do to install framework and decompile apks
Sent from my HTC PH39100 using xda app-developers app
Click to expand...
Click to collapse
i think its called apk manager now.. sorry to revive

Categories

Resources