[Samsung Galaxy S9  Questions & Answers] mqbtcm8a4:
Hi,

I have the latest stock ROM (G960FXXSFFUB3) on my Galaxy S9 (SM-G960F, Exynos) and my goal is to install official AOSP Android 11 GSI using Odin. I pretty much succeed, but I got bootloop as a result. Can you please help me to resolve this problem?

Steps to reproduce:

1. OEM Unlock [source, by @georgeburduli ]

1.1. Connect your phone to the Internet

1.2. Navigate to "Settings" -> "General management" -> "Date and time"

1.3. Disable "Automatic date and time"

1.4. Click on "Set time"

1.5. Select any date from the previous month

1.6. Navigate to "About phone" -> "Software update"

1.7. Disable "Auto download over Wi-Fi"

1.8. Click on "Download and install"

1.9. Navigate to "About phone" -> "Software information"

1.7. Tap on "Build number" 7 times to activate "Developer options"

1.8. Navigate to "Settings" -> "Developer options"

1.9. Disable "Auto update system"

1.10. Enable "OEM Unlock". If there are no "OEM Unlock" option in "Developer options", then try to repeat steps 1.1 - 1.10.

2. Prepare building tools [source, by @kkoo ]

2.1. Install 7zip

2.2. Create a new folder "tools"

2.3. Create a new folder "tools\bin"

2.4. Download the following files

- coreutils-8.26-2.tar.xz

- cygwin-3.2.0-0.1.tar.xz

- libattr1-2.4.48-2.tar.xz

- libgcc1-9.3.0-2.tar.xz

- libiconv2-1.16-2.tar.xz

- libintl8-0.19.8.1-2.tar.xz

- tar-1.33-1.tar.xz

2.5. Using 7zip open each *.tar.xz file and extract the following files and place them inside "tools\bin":

- cygattr-1.dll

- cyggcc_s-seh-1.dll

- cygiconv-2.dll

- cygintl-8.dll

- cygwin1.dll

- ls.exe

- md5sum.exe

- mv.exe

- tar.exe

2.6. Create file "tools\batch.bat"

Spoiler content hidden.

3. Build the AP file to use with Odin [source, by @kkoo ]

3.1. Download lz4_win64_v*_*_*.zip

3.2. Using 7zip extract lz4_win64_v*_*_*.zip to "lz4_win64_v1_9_3"

3.3. Download vbmeta.img

3.4. Place vbmeta.img into "lz4_win64_v1_9_3/bin" and run the following command:

lz4.exe -B6 --content-size vbmeta.img vbmeta.img.lz4

3.5. Download the latest aosp_arm64_ab ROM and using 7zip extract system.img, vendor.img and cache.img into "lz4_win64_v1_9_3/bin"

3.6. Run the following command:

lz4.exe -B6 --content-size system.img system.img.lz4
lz4.exe -B6 --content-size vendor.img vendor.img.lz4
lz4.exe -B6 --content-size cache.img cache.img.lz4

3.7. Download your phone latest Official Stock ROM (I got my using Samsung Smart Switch)

3.8. Extract the downloaded file (you'll have the BL, AP, CP, CSC, HOME_CSC .tar.md5 files)

3.9. Using 7zip extract the following files from AP_*.tar.md5 into the "tools" folder from step 2.2:

- boot.img.lz4

- dqmdbg.img.lz4

- recovery.img.lz4

- userdata.img.lz4

- vendor.img.lz4

3.10. Move vbmeta.img.lz4, system.img.lz4 and cache.img.lz4 from the "lz4_win64_v1_9_3/bin/" into the "tools" folder

3.11. Double click on the "tools/batch.bat" file

3.12. Once it finishes go to the "tools/temp-folder". Inside you will find the AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5

4. Flash the ROM

3.1. Install SAMSUNG_USB_Driver_for_Mobile_Phones.exe

3.2. Download Odin3-v3.14.1.zip

3.3. Extract the downloaded file

3.4. Run Odin3 v3.14.1.exe

3.5. Flash the BL, CP, HOME_CSC from your Stock ROM and AP (using AP_TAR_MD5_CUSTOM_FILE_ODIN.tar.md5)

Result: Bootloop

View attachment 5259007