[Samsung Galaxy A52 5G] woffles_:
11th Feb 2023

THIS GUIDE DOES NOT REQUIRE ROOT, BUT WILL WIPE YOUR EXISTING DATA! MAKE SURE TO HAVE A BACKUP.

Now before you start commenting that GSIs are not the same as Custom ROMs, please read below.

Spoiler Alert: There are probably not going to be any true Custom ROMs for the A52 5G for quite a long time. Due to the fact that Samsung's RIL system (the thing that makes your SIM/LTE/Mobile Data work) will not work on anything other than the Stock ROM, many developers have basically seen no point in developing even an official TWRP recovery for the phone. The above is true for all Samsung 5G Snapdragon-based devices. Using a GSI circumvents the RIL issue since all it does is sit in the system partition.

Therefore, your best bet if you really are intent on messing with your phone is to use GSIs. While some may argue that using GSIs for use as a daily driver comes with its issues, but I have been using mine with PE13+ for a few days now and everything functions as normal albeit while needing some workarounds (see POST-INSTALLATION section at bottom after installation).

You might be asking, why not use TWRP? The A52 5G does not have an official (or stable) TWRP yet. You can check this thread to be updated on the progress of the unofficial port! This guide is relatively simple, however, I have tried to make it as thorough as possible to help those who are just beginning on their GSI journey.

IT IS RECOMMENDED TO READ THROUGH THE GUIDE AT LEAST ONCE BEFORE UNDERTAKING ACTIONS!

----Your Warranty is Now Void (unless you live in AU or UK I guess)----

I am not responsible to any damage that comes from following this guide. While I have tried to keep information here as accurate and precise as possible, your mileage may vary. Be Warned!

This guide is tailored towards Windows devices and Samsung phones for target installation. Please seek alternatives to Odin such as Hiemdall if on Linux.

-----------------------------------------------------------------------------------

GUIDE:

Installing the PixelExperience+ GSI is recommended while using this guide as I cannot give any post-installation help to those using other GSIs.

General Commands for GSI Installation here:

Generic system images | Android Open Source Project

source.android.com

PixelExperience+ Stable GSI Download:

GitHub - ponces/treble_build_pe: Script and patches for building PHH-Treble Pixel Experience

Script and patches for building PHH-Treble Pixel Experience - ponces/treble_build_pe

github.com

Prerequisites:

- An Android Treble-Enabled device. Use this app to check. Any devices launched at and after Android 10 should work.

- Windows system.

- Extraction software such as 7Zip or PeaZip.

- ADB and fastboot on computer, if not can download from official Google Android SDK. Make sure to add the platform-tools folder to PATH.

- Samsung Odin software (at the time of writing, the attached is the latest version).

- Stock Firmware for your phone model to completely reset if needed. Use this link to download yours. Make sure everything is correct before downloading!

- Your preferred GSI .xz file or .img

- Know which keys to press for your SPECIFIC Samsung model for Download Mode and Recovery Mode.

If your Samsung device already has fastbootd, boot into fastboot and skip straight to step 8!

Your Samsung device should be plugged into your computer from now on, with USB debugging enabled.

1. From the stock OneUI ROM, boot into Download Mode by holding VOL UP and VOL DOWN simultaneously when off or rebooting. Alternatively, you can run `adb reboot download`.

2. TURN OFF AUTO RESTART IN ODIN (options tab), AS RESTARTING TO STOCK ROM WILL WIPE CUSTOM RECOVERY!

3. If you are on an A52 5G, download the fastboot-recovery.tar file attached. If the file is missing, go to this thread and download the tar file. Otherwise, use this link and follow instructions to patch your model's recovery.img file. Then convert it back into a tar file for flashing.

4. Choose the patched recovery tar file. This is enables fastboot, as modern Samsung devices don't have this feature enabled. USE AP SLOT in ODIN TO FLASH.

5. Once flash is complete, hold VOL DOWN and SIDE KEY to exit Download Mode, then immediately change to VOL UP and SIDE KEY when screen goes black.

6. Press the VOL UP and VOL DOWN buttons to select the fastboot option once in Android recovery.

7. Press SIDE KEY to boot into fastbootd.

8. Run `fastboot devices` in Windows Terminal or Command Prompt to ensure the device is recognized.

9. If your GSI came in a compressed file (.xz, .zip, etc.) extract it with your program of choice. You should be left with a .img file. Rename this file to system.img. All of this should be done in your downloads folder.

10. Navigate your command prompt using `cd` to your Downloads folder. In my case, it was `cd C:\Users\User\Downloads\`. Your username might be different.

11. Run `fastboot erase system`.

12. Run `fastboot flash system system.img`. This might take a few minutes to complete. If you get an error about system partition size, scroll to the bottom of this article and run the command to free up space.

13. Once complete, run `fastboot -w`. If this returns an error, do not retry and proceed to the next step. If it ran successfully, skip to step 17.

14. Run `fastboot reboot`. Immediately after the screen goes black, hold the VOL UP and SIDE KEY buttons together until you reach Android recovery. If you fail to reach Android recovery, you may have to return to step 11. Worst case scenario, you may have to go to the PANIK GUIDE to completely reset, then go from step 1.

15. Use VOL UP and VOL DOWN to select 'Wipe Data/Factory Reset' and use SIDE KEY to confirm. Then repeat the process for 'Wipe Cache'.

16. After wiping data, use VOL UP and VOL DOWN to reboot (should be the first option in Android recovery).

17. If you ran `fastboot -w` without an error, run `fastboot reboot` and enjoy your newly flashed GSI! Make sure to check the POST-INSTALLATION section for some fixes.

POST-INSTALLATION SPECIFIC TO PIXELEXPERIENCE:

These are some quality-of-life improvements for your experience that I had to painstakingly test lol. If you have any of your own, make sure to share them with me in the comments!

1. Under-screen fingerprint sensor not working.

FIX: Go to Settings -> PHH Treble Settings -> Misc. -> Under-display fp color. Switch to the colour it was on your stock ROM (should be white for most Samsung devices). For some reason, PE13+ will only let you register fingerprints when the color is green. If you want to modify your fingerprints, switch the display fp color back to green. When done, return it to your stock ROM's colour.

2. Camera app features are extremely minimal.

FIX: Go to the GCam Hub to find the best app for your device.

3. No alternate refresh rate (or stuck at 60HZ)

FIX: Go to Settings -> PHH Treble Settings -> Misc. -> Force FPS. Choose the one you want.

4. Fingerprint sensor not working with Night Light.

FIX: There's no working fix yet. However, you can work around this by downloading a task automation app such as Tasker (paid) or Automator (freemium) to toggle the Night Light automatically when you are on the lock screen. Search online for a specific fix for your specific app. For starters, you can use 'toggle night light with <your automation app>'.

KNOWN UNFIXABLE ISSUES:

If you know any fixes that have worked for you, make sure to share them in the comments!

1. Face Unlock does not work on the A52 5G. It may or may not work on your device. IMO, it's not a deal breaker since I the fingerprint sensor is faster and more convenient in 99% of cases.

PANIK GUIDE:

If all hope seems lost and you somehow mess the phone up, wait until the next bootloop. When the screen goes black, press VOL UP and VOL DOWN immediately until it enters Download Mode. Then flash stock firmware through Odin. Use All files available in the stock firmware folder to their corresponding slot in Odin. Use the CSC file, NOT the HOME_CSC.

CONCLUSION:

Well, hopefully that just about sums up everything you need or wanted to know about the A52 5G and tinkering with the OS. If you need any more information just leave a comment on the thread and I'll try to get back to you.