Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,782,230 Members 48,108 Now Online
XDA Developers Android and Mobile Development Forum

[HOW-TO] Port US S3 ROMs between carriers

Tip us?
 
Hero
Old
(Last edited by Hero; 14th May 2013 at 11:33 PM.)
#1  
Hero's Avatar
Recognized Developer - OP
Thanks Meter 4,793
Posts: 1,279
Join Date: Oct 2010
Location: West Hollywood

 
DONATE TO ME
Default [HOW-TO] Port US S3 ROMs between carriers

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
The Following 73 Users Say Thank You to Hero For This Useful Post: [ Click to Expand ]
 
Hero
Old
(Last edited by Hero; 2nd January 2013 at 03:20 AM.)
#2  
Hero's Avatar
Recognized Developer - OP
Thanks Meter 4,793
Posts: 1,279
Join Date: Oct 2010
Location: West Hollywood

 
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.
The Following 28 Users Say Thank You to Hero For This Useful Post: [ Click to Expand ]
 
Hero
Old
(Last edited by Hero; 28th December 2012 at 06:33 AM.)
#3  
Hero's Avatar
Recognized Developer - OP
Thanks Meter 4,793
Posts: 1,279
Join Date: Oct 2010
Location: West Hollywood

 
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.
The Following 14 Users Say Thank You to Hero For This Useful Post: [ Click to Expand ]
 
epicroot
Old
#4  
epicroot's Avatar
Senior Member
Thanks Meter 141
Posts: 549
Join Date: Sep 2010
Location: Charlotte

 
DONATE TO ME
Great writeup pure. Truly an asset to this community

Sent from my SCH-I535 using xda premium
Slung at your screen from my 460hp 450wtq Genesis Coupe.

Remember kids drugs are bad mmkay
The Following 2 Users Say Thank You to epicroot For This Useful Post: [ Click to Expand ]
 
Hero
Old
#5  
Hero's Avatar
Recognized Developer - OP
Thanks Meter 4,793
Posts: 1,279
Join Date: Oct 2010
Location: West Hollywood

 
DONATE TO ME
Quote:
Originally Posted by epicroot View Post
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: [ Click to Expand ]
 
epicroot
Old
#6  
epicroot's Avatar
Senior Member
Thanks Meter 141
Posts: 549
Join Date: Sep 2010
Location: Charlotte

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

Sent from my SCH-I535 using xda premium
Slung at your screen from my 460hp 450wtq Genesis Coupe.

Remember kids drugs are bad mmkay
 
Hero
Old
#7  
Hero's Avatar
Recognized Developer - OP
Thanks Meter 4,793
Posts: 1,279
Join Date: Oct 2010
Location: West Hollywood

 
DONATE TO ME
Quote:
Originally Posted by epicroot View Post
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: [ Click to Expand ]
 
epicroot
Old
#8  
epicroot's Avatar
Senior Member
Thanks Meter 141
Posts: 549
Join Date: Sep 2010
Location: Charlotte

 
DONATE TO ME
Quote:
Originally Posted by PureMotive View Post
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
Slung at your screen from my 460hp 450wtq Genesis Coupe.

Remember kids drugs are bad mmkay
 
rossida
Old
(Last edited by rossida; 28th December 2012 at 07:28 AM.)
#9  
Senior Member
Thanks Meter 9
Posts: 116
Join Date: 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?
 
Menardo
Old
#10  
Menardo's Avatar
Senior Member
Thanks Meter 125
Posts: 336
Join Date: Jun 2012
Location: Lake Charles, Louisiana

 
DONATE TO ME
Quote:
Originally Posted by epicroot View Post
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes