FORUMS

[GUIDE] [CUSTOM] How to Install Custom ROM using ODIN without TWRP [PHH] [LineageOS]

21 posts
Thanks Meter: 48
 
By kkoo, Junior Member on 12th June 2020, 07:33 PM
Post Reply Email Thread
Hello,

This would be a short & sweet guide on how to install a custom ROM on your Samsung using ODIN. I'm going to tailored this guide for the S10e G9700 HK version (is the phone I own) I'm a linux user but Odin only runs on Windows so this works 100% on a Windows 10 VM an of course native on Windows.

1. Who is this for?
For people that can't or don't want to install TWRP on their devices. For example TWRP doesn't work with the S10E Snapdragon G9700 the HK/CHG version.
2. Will this method work on my bootloader locked phone?
NO!
Bootloader locked phones are locked in hardware there's no way to flash anything but carriers ROMs to them. If you can unlock the bootloader this guide will work for you.
https://www.getdroidtips.com/how-to-...galaxy-phones/
3. Can I use this only with the G9700 phone?
No you can use any device, but this guide is tailored to the s10e g9700; because the TWRP version for this phone doesnt work with Android10.
4. Why not use Heimdall and do the guide entirely on Linux?
I use Manjaro [Arch] linux and tried to get Heimdall to work but couldn't, so choose the path of least resistance, so ODIN and windows is what we got .
5. Recommended ROMs?
I'm not a fan of Google Apps so my recommendations are these (2) ROMs:

1. https://github.com/phhusson/treble_e...y-floss.img.xz (No bloat, Stock Android 10 with FOSS Apps replacements of Gapps, you can install your own on top, Like I use Google Maps (the only Gapp I use)
2. https://sourceforge.net/projects/and...mg.xz/download (Lineage OS 17.1 - this is vanilla, you will have to install an App store like F-Droid or Aurora from the .apk files using ADB [FYI] - This is what I use as my daily driver!

note* the proximity sensor doesn't work with the S10E and PHH based ROMs - https://github.com/phhusson/treble_e...ment-519853332
6. If using a PHH based ROM from phhusoon set this to get Bluetooth Audio working?
Under Developer Options - toggle ON "Disable Bluetooth A2DP hardware offload"
Credit goes to (for their work) @phhusson @AndyYan (Project Treble PHH & LineageOS PHH) & @mkh.mourad (CMD Script)
https://forum.xda-developers.com/pro...ce-development

Requirements

Step-by-Step Process
  1. Get your phone Official Stock ROM - https://samfw.com/firmware/SM-G9700/TGY (this is the one for my phone)
  2. Extract the downloaded file (you'll have the BL, AP, CP, CSC) .TAR.MD5 files
  3. Using 7zip extract just the AP .tar.md5 (it'll have img.lz4 files: boot.img.lz4, vbmeta.img.lz4 & system.img.ext4.lz4)
  4. Download a clean vbmeta.img file from Google - https://dl.google.com/developers/and...gsi/vbmeta.img
  5. Now we need to compress the vbmeta.img file (just downloaded from google) using LZ4.
  6. Go into the /bin folder inside the script zip file provided (or download LZ4 from https://github.com/lz4/lz4/releases)
  7. Run this command
    Code:
    lz4.exe -B6 --content-size vbmeta.img vbmeta.img.lz4
  8. Done with vbmeta.img (keep the vbmeta.img.lz4 file)
  9. Now download your favorite Custom ROM (https://github.com/phhusson/treble_e...y-floss.img.xz)
  10. Using 7zip extract the .img.xz file & Rename the file inside to system.img.ext4 (this is the system OS without lz4 compression)
  11. Now we need to compress the system.img.ext4 file (just renamed) using LZ4.
  12. Run this command
    Code:
    lz4.exe -B6 --content-size system.img.ext4 system.img.ext4.lz4
  13. Done with system.img.ext4 (keep the system.img.ext4.lz4 file)
  14. Want to Root the device? if yes continue on; if not skip to step 24
  15. Take the boot.img.lz4 extracted from the stock ROM (the AP.tar.md5 file)
  16. We need to decompress this file using LZ4.
  17. Run this command
    Code:
    lz4.exe -d boot.img.lz4 boot.img
  18. Transfer this boot.img file to a phone and run Magisk Manager (doesnt need to be a rooted phone) and patch the boot.img file
  19. Take the patched file on your phone and transfer to your computer
  20. Rename the patched Magisk file to boot.img
  21. Now we need to compress the boot.img file (just renamed) using LZ4.
  22. Run this command
    Code:
    lz4.exe -B6 --content-size boot.img boot.img.lz4
  23. Done with the renamed Magisk patched (keep the boot.img.lz4 file)
  24. Replace the stock boot.img.lz4, vbmeta.img.lz4 & system.img.ext4.lz4 with the new customize files
  25. Extract the files from tar-md5-script-tool.zip
  26. Copy or Move all files below to the tar-md5-script-tool folder
  27. Files are: (we don't need the meta-data folder with fota.zip)
    boot.img.lz4
    dqmdbg.img.ext4.lz4
    dtbo.img.lz4
    persist.img.ext4.lz4
    recovery.img.lz4
    system.img.ext4.lz4
    userdata.img.ext4.lz4
    vbmeta.img.lz4
    vendor.img.ext4.lz4
  28. Now we are going to build the AP file to use with Odin
  29. Run the batch.bat file from the tar-md5-script-tool folder
  30. Once it finishes go to the /tar-md5-script-tool/temp-folder/
  31. Inside you will find the AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5
  32. Flash the BL, CP, CSC (use HOME_CSC) from your Stock ROM & AP (using AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5)
  33. Done

Thanks to @Alberbeast for reaching out and encouragement to help the community and S10e G9700 owners
The Following 32 Users Say Thank You to kkoo For This Useful Post: [ View ] Gift kkoo Ad-Free
12th June 2020, 07:34 PM |#2  
phhusson's Avatar
Recognized Developer
Flag Paris
Thanks Meter: 4,720
 
Donate to Me
More
Quote:

note* the proximity sensor doesn't work with the S10E and PHH based ROMs - https://github.com/phhusson/treble_e...ment-519853332

This issue has actually been fixed a long time ago, you need to select "Enable extra sensors" in Treble settings though.
The Following 10 Users Say Thank You to phhusson For This Useful Post: [ View ]
12th June 2020, 07:36 PM |#3  
OP Junior Member
Thanks Meter: 48
 
More
If someone knows or provides a place where to upload a complete ROM I can upload the Complete AP.tar.md5 ROM for LOS 17.1 OS Rooted with Magisk and the Android Stock FOSS image just to use with Odin. Let me know! Thanks
The Following 4 Users Say Thank You to kkoo For This Useful Post: [ View ] Gift kkoo Ad-Free
12th June 2020, 07:38 PM |#4  
OP Junior Member
Thanks Meter: 48
 
More
Quote:
Originally Posted by phhusson

This issue has actually been fixed a long time ago, you need to select "Enable extra sensors" in Treble settings though.

Oh thanks! I did had it enable and it didnt pair with my car radio; but I will try it and edit the post accordingly and let you know if theres a bug with the G9700 if it doesnt work
The Following User Says Thank You to kkoo For This Useful Post: [ View ] Gift kkoo Ad-Free
13th June 2020, 09:00 AM |#5  
Alberbeast's Avatar
Junior Member
Thanks Meter: 4
 
More
wow this is awesome thank you so much @kkoo for the effort to create this guide, it's a life saver for those of us who can't use twrp and want to try aosp.

Thanks again bro!
The Following 4 Users Say Thank You to Alberbeast For This Useful Post: [ View ] Gift Alberbeast Ad-Free
14th June 2020, 06:17 PM |#6  
pchetan2's Avatar
Senior Member
Flag Chennai
Thanks Meter: 36
 
More
I am new to Samsung
Following OP doesnt trip knox and other Samsung stuff , correct ? Which means, I can reflash with Samsung stock rom with losing samsung functionality like samsung pay.
15th June 2020, 02:02 PM |#7  
Member
Thanks Meter: 11
 
More
Does it work with us or canadian version of the snapdragon?
15th June 2020, 05:57 PM |#8  
OP Junior Member
Thanks Meter: 48
 
More
Quote:
Originally Posted by pchetan2

Following OP doesnt trip knox and other Samsung stuff , correct ? Which means, I can reflash with Samsung stock rom with losing samsung functionality like samsung pay.

You can always reflash back to Samsung Stock ROM. I don't use any Samsung App so never cared about knox, but I assume it does trip knox.

Quote:
Originally Posted by bilrage

Does it work with us or canadian version of the snapdragon?

No it doesn't work with any North America Galaxy S10 as those have the bootloader locked!
The Following 2 Users Say Thank You to kkoo For This Useful Post: [ View ] Gift kkoo Ad-Free
15th June 2020, 07:40 PM |#9  
Senior Member
Thanks Meter: 268
 
More
Do the Roms have gaps?
16th June 2020, 05:55 PM |#10  
OP Junior Member
Thanks Meter: 48
 
More
Quote:
Originally Posted by Diaze

Do the Roms have gaps?

Here
https://github.com/phhusson/treble_e...tions/releases

Get the one for your phone Arm64 probably with Gapps.
The Following User Says Thank You to kkoo For This Useful Post: [ View ] Gift kkoo Ad-Free
18th June 2020, 07:53 AM |#11  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by kkoo

If someone knows or provides a place where to upload a complete ROM I can upload the Complete AP.tar.md5 ROM for LOS 17.1 OS Rooted with Magisk and the Android Stock FOSS image just to use with Odin. Let me know! Thanks

You can upload your complete rom here https://androidfilehost.com/
Can you please explain why you use Aonly and ABonly both rom in this tutorial..? as I know only ABonly rom is for galaxy 10 series. maybe I am wrong but can you please explain it..
Thanks for your hard work Brother..
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes