Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
robbbbit
Old
(Last edited by robbbbit; 27th May 2011 at 09:55 PM.) Reason: ammend2edify, forgetting krylon360!!!!
#1  
Account currently disabled - OP
Thanks Meter 126
Posts: 351
Join Date: May 2011
Location: South Carolina

 
DONATE TO ME
Cool [GUIDE] Porting Vibrant Roms To SGS4G

Porting Vibrant Roms To SGS4G

***EDITED FROM A GTALK WITH DR. HONK***

ALL CREDIT GOES TO DR. HONK FOR TEACHING ME AND FOR KRYLON360 FOR TEACHING DR. HONK!!!
THANKS FOR LETTING ME POST THIS AND FOR YOUR PATIENCE!!!


OK, Well CWM is now final and it's time to start PORTING!!!

***Most Vibrant roms are 2.2, so you will be downgrading your OS.
Also, if it's a i9k port, it might require more work. (button mapping, etc.)***


TOOLS

1. Install Android SDK
2. Download Smali.jar & baksmali.jar from http://code.google.com/p/smali/
3. Both files will have version numbers on the end. take those off.
4. Place both files in /tools directory in sdk.
5. Download Beyond Compare.
6. Download 7 zip.
7. Download A FLASHABLE SGS4G ROM.
8. Download the Vibrant Rom you wish to Port.
9. Download Ammend2Edify (somewhere on XDA)

INSTRUCTIONS:

Note: To DECOMPILE (FROM /TOOLS) "java - jar baksmali.jar -o directory_out/ classes.dex" To COMPILE (FROM /TOOLS) "java -Xmx512M -jar smali.jar source_directory/ -o New_Classes.dex"

1.)Okay, so there are four files that need to be edited. They are framework.jar, services.jar, Settings.apk and android_policy.jar.

2.)Using 7-zip, you need to extract the classes.dex from each file mentioned, for both the rom you want to port and the flashable SGS4g Rom you are comparing it to. This has to be done, since the vibrant and sgs4g have totally swapped partitions.

3.)Extract one at a time. Place classes.dex into /tools, Decompile to directory_out. ( i.e, if using KD1 flashable and extracting framework.jar, then name directory_out KD1_framework)

4.)Once you have extracted & decompiled the classes.dex from each of the four files, Open Beyond Compare.

5.)Load the two directoies you want to compare and hit the compare button. select binary.

6.)Look for anything with storage information. Either STORAGE info .. or anything for /sdcard. Here's the problem ... internal storage and external storage. those are swapped.

7.) you replace that part .. and only that part.
Example:
on framework.jar .. you want to look at Android\os\Environment.smali
everything there need to be swapped, from /mnt/sdcard to /mnt/sd/external_sd

and vice versa

Same goes with Landroid/os/Environment;->INTERNAL_STORAGE_DIRECTORY .. that needs to be Landroid/os/Environment;->EXTERNAL_STORAGE_DIRECTORY


8.)You will see a lot of differences .. ignore any line differences. ALL YOU NEED IS STORAGE. :)

9.)There might not be differences in every file, depending on the rom to be ported with the exception of settings.apk. USB Mounting will not work if not edited properly!

10.)Once edited, go back into command prompt and compile. the new_classes.dex will appear in the /tools category.

11.)Open the Vibrant Rom in 7 zip and go back to the location of the classes.dex file you extracted. delete it and copy over the new_classes.dex. rename it to classes.dex. you'll get a prompt from 7 zip that the archive has changed. accept to update the archive.

12.)Repeat this proces for each classes.dex edited.


so that's the jar and apk files!


WI-FI:

1.)You will need to copy over /system/etc/wifi from sgs4g ROM to the new port ROM.
2.)Then you also need to copy several files ... /system/bin/wpa*../system/bin/wifi* ../system/bin/*ril* .. /system/lib/*ril*
3.)Then you also need to copy over /system/etc/vold*

CHANGING THE MODEM & KERNEL.

1.)Open the Vibrant Rom in 7 Zip and Delete ZImage(kernel) and Modem.bin
2.)Open the SGS4G Rom and Copy over Modem.bin & Zimage.
3.)Thank Krylon360 for catching my brain farts.


AMMEND2EDIFY:

Most Roms you'll find for the vibrant are using ammend scripting. Download the Program & the updated phone database for it from XDA and follow the OP instructions to get it set up.




That's it! FLASH AWAY!!!


ALL CREDIT GOES TO DR. HONK FOR TEACHING ME AND FOR KRYLON360 FOR TEACHING DR. HONK!!!
THANKS FOR LETTING ME POST THIS AND FOR YOUR PATIENCE!!!
The Following 10 Users Say Thank You to robbbbit For This Useful Post: [ Click to Expand ]
 
robbbbit
Old
#2  
Account currently disabled - OP
Thanks Meter 126
Posts: 351
Join Date: May 2011
Location: South Carolina

 
DONATE TO ME
Reserved for later.
The Following User Says Thank You to robbbbit For This Useful Post: [ Click to Expand ]
 
krylon360
Old
#3  
krylon360's Avatar
Recognized Developer
Thanks Meter 3083
Posts: 2,187
Join Date: May 2010
Location: Provo

 
DONATE TO ME
*cough* missed a credit. :P
If my post helped you, be sure to click the Thanks button.
Follow me on Twitter
Current Projects-
CYANOGENMOD for the NOOK COLOR

Past Projects
AOKP - Nook Color
RootzBoat - VZW GNEX
NEXUS S - PURE BIONIX 2.3.7 AOSP[/B]
SGS4G - CWM, Bionix Frost, Bionix Black Ice, Gingerbread Hacking. CM7
Samsung Vibrant - Past Project(s) - Bionix Frost, Bionix-V, 1.3.1, 1.3.0, Obsidian, Nero
LG G2X - Past Project - Bionix 2 / CWM
SK4G Past Project- CWM
The Following 4 Users Say Thank You to krylon360 For This Useful Post: [ Click to Expand ]
 
robbbbit
Old
#4  
Account currently disabled - OP
Thanks Meter 126
Posts: 351
Join Date: May 2011
Location: South Carolina

 
DONATE TO ME
Quote:
Originally Posted by krylon360 View Post
*cough* missed a credit. :P
Dude! So Sorry, Honk just informed me! changing.....now!
 
krylon360
Old
#5  
krylon360's Avatar
Recognized Developer
Thanks Meter 3083
Posts: 2,187
Join Date: May 2010
Location: Provo

 
DONATE TO ME
Quote:
Originally Posted by robbbbit View Post
Dude! So Sorry, Honk just informed me! changing.....now!
haha all good man, just messin with ya. in a good mood today.
If my post helped you, be sure to click the Thanks button.
Follow me on Twitter
Current Projects-
CYANOGENMOD for the NOOK COLOR

Past Projects
AOKP - Nook Color
RootzBoat - VZW GNEX
NEXUS S - PURE BIONIX 2.3.7 AOSP[/B]
SGS4G - CWM, Bionix Frost, Bionix Black Ice, Gingerbread Hacking. CM7
Samsung Vibrant - Past Project(s) - Bionix Frost, Bionix-V, 1.3.1, 1.3.0, Obsidian, Nero
LG G2X - Past Project - Bionix 2 / CWM
SK4G Past Project- CWM
 
krylon360
Old
#6  
krylon360's Avatar
Recognized Developer
Thanks Meter 3083
Posts: 2,187
Join Date: May 2010
Location: Provo

 
DONATE TO ME
ack.. you forgot the biggest part..

you will need to swap the kernel and modem from the vibrant rom you are porting with the SGS4g kernel and modem.
So for example,,
you are porting Bionix, you will want to take the KD1 kernel and modem (or Bali kernel for the SGS4G) and overwrite the ones that are in the Bionix zip
If my post helped you, be sure to click the Thanks button.
Follow me on Twitter
Current Projects-
CYANOGENMOD for the NOOK COLOR

Past Projects
AOKP - Nook Color
RootzBoat - VZW GNEX
NEXUS S - PURE BIONIX 2.3.7 AOSP[/B]
SGS4G - CWM, Bionix Frost, Bionix Black Ice, Gingerbread Hacking. CM7
Samsung Vibrant - Past Project(s) - Bionix Frost, Bionix-V, 1.3.1, 1.3.0, Obsidian, Nero
LG G2X - Past Project - Bionix 2 / CWM
SK4G Past Project- CWM
The Following User Says Thank You to krylon360 For This Useful Post: [ Click to Expand ]
 
GDofWR420
Old
#7  
GDofWR420's Avatar
Senior Member
Thanks Meter 92
Posts: 987
Join Date: May 2011
Dude this is great. Now I just need a computer to try and port some roms. Thank you guys

Sent from my SGH-T959V using XDA Premium App
 
robbbbit
Old
#8  
Account currently disabled - OP
Thanks Meter 126
Posts: 351
Join Date: May 2011
Location: South Carolina

 
DONATE TO ME
Quote:
Originally Posted by krylon360 View Post
ack.. you forgot the biggest part..

you will need to swap the kernel and modem from the vibrant rom you are porting with the SGS4g kernel and modem.
So for example,,
you are porting Bionix, you will want to take the KD1 kernel and modem (or Bali kernel for the SGS4G) and overwrite the ones that are in the Bionix zip
haha, and that was the ONLY part I didn't have to ask help for!!! thanks, dude.
 
fknfocused
Old
#9  
fknfocused's Avatar
Senior Member
Thanks Meter 139
Posts: 709
Join Date: May 2007
Location: Hawaii
In jumping on this as soon as I get home. Power just went out at work so someone has to tend to the servers

sent from my not so stock SGS4G

Mobile: SGS3
Build: Wicked JB v9
Recovery: TWRP

Mobile: HTC Sensation Retired
Build: Coredroid v5.1 ICS 4.0.3 Sense 3.6
Radio: 11.22.3504.07_M
Mods: Skins & Mods by Dic3ptor & Lozone
Kernel: 3.0.16 Bricked-3.0-v0.9-ics
Recovery: 4Ext Touch v1.0.0.3 RC3


 
krylon360
Old
#10  
krylon360's Avatar
Recognized Developer
Thanks Meter 3083
Posts: 2,187
Join Date: May 2010
Location: Provo

 
DONATE TO ME
can you add to your post, that most Vibrant roms are 2.2, so they will be downgrading their OS.
Also, if it's a i9k port, it might require more work.
If my post helped you, be sure to click the Thanks button.
Follow me on Twitter
Current Projects-
CYANOGENMOD for the NOOK COLOR

Past Projects
AOKP - Nook Color
RootzBoat - VZW GNEX
NEXUS S - PURE BIONIX 2.3.7 AOSP[/B]
SGS4G - CWM, Bionix Frost, Bionix Black Ice, Gingerbread Hacking. CM7
Samsung Vibrant - Past Project(s) - Bionix Frost, Bionix-V, 1.3.1, 1.3.0, Obsidian, Nero
LG G2X - Past Project - Bionix 2 / CWM
SK4G Past Project- CWM

The Following 4 Users Say Thank You to krylon360 For This Useful Post: [ Click to Expand ]
 
Post Reply+
Tags
port, sgs4g
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...