[Droid Incredible Android Development] wildstang83:
★wildstang83's Guide For Basic Porting★

You could always go to the TEAM REVERSE website and read the same guide, lol​

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.

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​

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.