Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[HOW-TO] Port US S3 ROMs between carriers

OP Hero

28th December 2012, 07:07 AM   |  #1  
Hero's Avatar
OP Recognized Developer
West Hollywood
Thanks Meter: 4,817
 
1,286 posts
Join Date:Joined: Oct 2010
Donate to Me
Porting TouchWiz ROMs

This guide is intended to help you port ROMs from AT&T, T-Mobile, and Sprint over to the Verizon S3. The guide will be split into two different parts. Porting CDMA to CDMA and porting CDMA to GSM.

Just so there's no confusion:

CDMA Carriers:
  • Verizon
  • Sprint

GSM Carriers:
  • AT&T
  • T-Mobile

REMEMBER: If you choose to port a ROM from another carrier, be sure to ask permission to post from the developer.
What you need
  • 7zip
  • Notepad++ (If on Windows)
  • A ROM you want to port
  • A ROM from your carrier/device
  • Knowledge on how to compile and recompile .jar files (I will not cover this)
Make sure the ROM you want to port and the ROM you are using as a base are the same Android version (e.g. 4.1.2) and have the same chip (e.g. MSM8960). You will be able to determine the chip type from the build.prop
PORTING CDMA TO CDMA (i.e. SPRINT TO VERIZON)
  1. Download the ROM you want to port
  2. Download a ROM from your carrier
  3. Unzip both ROMS
  4. In the ROM you want to port - delete /system/etc/apns-conf.xml
  5. Replace the apns-conf.xml you just deleted with the one from the ROM for your carrier
  6. In the ROM you want to port - delete /system/framework/GlobalConfig.jar (This .jar file contains a lot of carrier information)
  7. Replace the GlobalConfig.jar you just deleted with the one from the ROM for your carrier
  8. In the ROM for your carrier, locate the following lib files in system/lib and copy them over to the ROM you want to port
    • libreference-ril.so
    • libril.so
    • libril-qc-qmi-1.so
    • libril-qcril-hook-oem.so
    • libsecril-client.so
    If your carrier is Verizon and you're porting a Sprint ROM, delete all the apps with "Sprint" in the name including these:
    • SecContacts.apk
    • SecPhone.apk
    • PhoneInfo.apk
    Replace SecContacts.apk and SecPhone.apk with the Verizon ones.
  9. In the ROM you want to port - open up /system/build.prop in Notepad++
  10. Locate every instance of d2att, d2tmo, or d2spr and replace it with d2vzw (Use CTRL+F if you have to)
  11. Save the build.prop after all changes are made
  12. In system/framework/ of BOTH ROMs, decompile framework.jar and framework2.jar
    • In the framework.jar of the ROM you want to port - delete the following folders:
      • smali/android/provider
      • smali/android/telephony
      • smali/android/server
      • smali/android/service
      • smali/com/android/internal/telephony
    • Replace them with the folders from the ROM for your carrier
    • In the framework2.jar of the ROM you want to port - delete the following folders:
      • smali/android/provider
      • smali/android/telephony
      • smali/android/server
      • smali/com/android/internal/telephony
      • smali/com/google/android/mms
    • Replace them with the folders from the ROM for your carrier
  13. Build all of the jar files when finished (Please note that replacing the above folders will make the ROM operational to the point where MMS will work, but you may encounter other weird superficial errors. It's just too much work to go into the specifics.)
  14. Re-zip the ROM you want to port
  15. Flash in recovery
PORTING CDMA TO GSM (i.e. VERIZON TO T-MOBILE & ATT / SPRINT TO T-MOBILE & ATT)
  1. Download the ROM you want to port
  2. Download a ROM from your carrier
  3. Unzip both ROMS
  4. In the ROM you want to port - delete /system/etc/apns-conf.xml
  5. Replace the apns-conf.xml you just deleted with the one from the ROM for your carrier
  6. In the ROM you want to port - delete /system/framework/GlobalConfig.jar (This .jar file contains a lot of carrier information)
  7. Replace the GlobalConfig.jar you just deleted with the one from the ROM for your carrier
  8. In the ROM for your carrier, locate the following lib files in system/lib and copy them over to the ROM you want to port
    • libreference-ril.so
    • libril.so
    • libril-qc-qmi-1.so
    • libril-qcril-hook-oem.so
    • libsecril-client.so
  9. Delete the following apps and replace them with the ones from your carrier:
    • SecContacts.apk
    • SecPhone.apk
  10. In the ROM you want to port - open up /system/build.prop in Notepad++
  11. Locate every instance of d2att, d2tmo, or d2spr and replace it with d2vzw (Use CTRL+F if you have to)
  12. Save the build.prop after all changes are made
  13. In system/framework/ of BOTH ROMs, decompile android.policy.jar, framework.jar, framework2.jar, and services.jar
    • You need to go through every smali file in all of the .jars and replace all instances of "Sprint" with "Verizon" or "Verizon" with "Sprint" depending on your carrier
    • In the framework.jar of the ROM you want to port - delete the following folders:
      • smali/android/provider
      • smali/android/telephony
      • smali/android/server
      • smali/android/service
      • smali/com/android/internal/telephony
    • Replace them with the folders from the ROM for your carrier
    • In the framework2.jar of the ROM you want to port - delete the following folders:
      • smali/android/provider
      • smali/android/telephony
      • smali/android/server
      • smali/com/android/internal/telephony
      • smali/com/google/android/mms
    • Replace them with the folders from the ROM for your carrier
  14. Build all of the jar files when finished (Please note that replacing the above folders will make the ROM operational to the point where MMS will work, but you may encounter other weird superficial errors. It's just too much work to go into the specifics.)
  15. Navigate to system/framework/ in both ROMs
  16. Open framework-res.apk from both ROMs in 7zip
    • In framework-res.apk in both ROMs navigate to /res/xml/
    • Delete eri.xml from the framework-res in the ROM you want to port
    • Replace the deleted eri.xml with the one from the ROM for your carrier
    • Save and close the modified framework-res.apk
  17. Re-zip the ROM you want to port
  18. Flash in recovery


Obviously this guide will not work on more difficult ports such as bringing Sense to the S3, but the end result is that we will hopefully see more ROMs in the thread.

Thanks TrevE
Last edited by Hero; 15th May 2013 at 12:33 AM.
The Following 75 Users Say Thank You to Hero For This Useful Post: [ View ]
28th December 2012, 07:07 AM   |  #2  
Hero's Avatar
OP Recognized Developer
West Hollywood
Thanks Meter: 4,817
 
1,286 posts
Join Date:Joined: Oct 2010
Donate to Me
Porting AOSP ROMs

================================ START ================================
What you need
  • 7zip
  • Notepad++ (If on Windows)
  • An AOSP ROM you want to port
  • An AOSP ROM from your carrier/device
Make sure the ROM you want to port and the ROM you are using as a base are the same Android version (e.g. 4.1.1)
I will do the AOSP porting section with an example. Say I want to port Paranoid Android:
  1. Download Paranoid Android (Android 4.2)
  2. Download CM10.1 (Android 4.2)
  3. Unzip both ROMs
  4. In the CM 10.1 folder delete the following folders/files:
    • /system/framework
    • /system/app
    • /system/lib/libandroid_runtime.so
    • /system/media (optional)
    • /system/fonts (optional)
  5. Add the following folders from the PA ROM into the CM10.1 ROM:
    • /system/framework
    • /system/app
    • /system/lib/libandroid_runtime.so
    • /system/media (only if you deleted from CM10.1)
    • /system/fonts (only if you deleted from CM10.1)
      Only do the following if you are porting from GSM to CDMA or CDMA to GSM (i.e. Porting an AT&T ROM to Verizon)
      • Navigate to system/framework/ in both ROMs
      • Open framework-res.apk from both ROMs in 7zip
      • In framework-res.apk in both ROMs navigate to /res/xml/
      • Delete eri.xml
      • Replace the deleted eri.xml with the one from your base ROM
      • Save and close framework-res.apk
  6. Re-zip and flash in recovery
================================ END ================================

If the ROM does not boot up, try a different ROM. For example, if you tried to port Paranoid Android 4.2 from AT&T and it didn't work. Try Paranoid Android from T-Mobile or the Galaxy Nexus, etc.
Last edited by Hero; 2nd January 2013 at 04:20 AM.
The Following 28 Users Say Thank You to Hero For This Useful Post: [ View ]
28th December 2012, 07:07 AM   |  #3  
Hero's Avatar
OP Recognized Developer
West Hollywood
Thanks Meter: 4,817
 
1,286 posts
Join Date:Joined: Oct 2010
Donate to Me
Wicked Sensation: http://www.androidfilehost.com/?fid=9390248398092763137

This ROM is completely based on Sprint's OTA. It will work with KindaCrapMods due to the framework being about 95% similar to the Verizon version. However, the 5% difference may induce abnormal behavior such as irregular lockscreen clock readings. Also, the ROM does not include any tweaks outside of what is present in the original release.

I WILL NOT be maintaining this ROM so if you want to see updates, start a thread for it.
Last edited by Hero; 28th December 2012 at 07:33 AM.
The Following 14 Users Say Thank You to Hero For This Useful Post: [ View ]
28th December 2012, 07:25 AM   |  #4  
epicroot's Avatar
Senior Member
Flag Charlotte
Thanks Meter: 148
 
580 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Great writeup pure. Truly an asset to this community

Sent from my SCH-I535 using xda premium
The Following 2 Users Say Thank You to epicroot For This Useful Post: [ View ]
28th December 2012, 07:34 AM   |  #5  
Hero's Avatar
OP Recognized Developer
West Hollywood
Thanks Meter: 4,817
 
1,286 posts
Join Date:Joined: Oct 2010
Donate to Me
Quote:
Originally Posted by epicroot

Great writeup pure. Truly an asset to this community

Sent from my SCH-I535 using xda premium

Hopefully we will see more ROMs in the future.

Wicked Sensation is uploaded.
The Following 2 Users Say Thank You to Hero For This Useful Post: [ View ]
28th December 2012, 07:44 AM   |  #6  
epicroot's Avatar
Senior Member
Flag Charlotte
Thanks Meter: 148
 
580 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Did you happen to do a test flash? Or just edit, zip and go

Sent from my SCH-I535 using xda premium
28th December 2012, 07:46 AM   |  #7  
Hero's Avatar
OP Recognized Developer
West Hollywood
Thanks Meter: 4,817
 
1,286 posts
Join Date:Joined: Oct 2010
Donate to Me
Quote:
Originally Posted by epicroot

Did you happen to do a test flash? Or just edit, zip and go

Sent from my SCH-I535 using xda premium

Flashed it. Booted up. I did a reboot just to test, and then reverted to my ROM to continue development lol.
The Following 4 Users Say Thank You to Hero For This Useful Post: [ View ]
28th December 2012, 08:12 AM   |  #8  
epicroot's Avatar
Senior Member
Flag Charlotte
Thanks Meter: 148
 
580 posts
Join Date:Joined: Oct 2010
Donate to Me
More
Quote:
Originally Posted by PureMotive

Flashed it. Booted up. I did a reboot just to test, and then reverted to my ROM to continue development lol.



Sent from my SCH-I535 using xda premium

Cool deal

---------- Post added at 08:12 AM ---------- Previous post was at 08:02 AM ----------

Tryd flashing.. It failed immediately.. Gonna try redownloading

Sent from my SCH-I535 using xda premium
28th December 2012, 08:23 AM   |  #9  
Senior Member
Thanks Meter: 9
 
120 posts
Join Date:Joined: Dec 2012
i just tried this hoping that it would work with this PA rom from AT&T. sadly this didnt work for me. it says update aborted when i try to install it. i was coming from PA 2.52 but it has some BT issues and occasional loose of signal for me so ifigured this would work. Maybe someone would like to try this and get it to work?
Last edited by rossida; 28th December 2012 at 08:28 AM.
28th December 2012, 08:32 AM   |  #10  
Menardo's Avatar
Senior Member
Flag Lake Charles, Louisiana
Thanks Meter: 125
 
337 posts
Join Date:Joined: Jun 2012
Donate to Me
More
Quote:
Originally Posted by epicroot

Sent from my SCH-I535 using xda premium

Cool deal

---------- Post added at 08:12 AM ---------- Previous post was at 08:02 AM ----------

Tryd flashing.. It failed immediately.. Gonna try redownloading

Sent from my SCH-I535 using xda premium

Which mirror did you use?!

Sent from my SCH-I535 using xda premium

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes