[Samsung Galaxy A51 ROMs, Kernels, Recoveries, & Ot] GrandmaGotGuns:
Hey Guys,

Before you dive in, irrespective of your reading speed read this carefully and slowly for better understanding but if you cannot focus and read it slowly then you better give up music for a few weeks.

About the Device

Before you jump in and get your hands dirty.. you should know that what you will be installing is Generic System Image, It is not specifically made for your device so if you are going to install some other GSI other than this, you might face some issues.

If you are a beginner, you should Go Through Project Treble, just for the sake of knowledge.

Also Galaxy A51 has A/B partition and Supports Project Treble though remember that Treble Devices are not same as A/B devices and Vice Versa.

Things You’ll Need

A Computer (not an iPad)

Internet [requirement around 6 gigs (4.8 gigs optional, for downloading stock Firmware, Highly Recommended)]

Samsung Galaxy A51 (will not work on A50)

Patience and a madcap attitude.

Resources

Download Odin from the link given below and extract it in a folder.

https://odindownload.com/download/Odin3_v3.13.3.zip

Adb and Fastboot Drivers

https://gsmusbdrivers.com/download/adb-fastboot-drivers/#

Samsung Drivers

https://developer.samsung.com/mobile/file/68b2dc40-3833-4a8b-b58e-32f7aca25c00

Havoc OS GSI

Havoc-OS - Browse /arm64-ab at SourceForge.net

Don’t forget to check that there is “arm64” and “ab” written on the name of the file

Other option is with Gapps (it means the rom will come with Google Play services built in

otherwise it is Vanilla Android.

GSI Flasher

(It is used for converting your img file into flashable Zip)

https://drive.google.com/file/d/1J8OlI2CCXpvAJ5FhFlR2b_y58eHQERGs/view?usp=sharing

Extract it you’ll find three folders gsi, META-INF, scripts, keep all of them inside the GSI

Flasher extracted folder.

Twerp Recovery

twrp-a51-3.5.0_10-1_ianmacd.tar | by androidhowto for Utilities (androidfilehost.com)

Do not use any other in this case you might get mounting errors.

Encryption Disabler

Disable_Dm-Verity_ForceEncrypt_03.04.2020.zip | by androidhowto for Utilities (androidfilehost.com)

Its Show time

1. Go to settings and go to about phone, tap build number 7 times and a dialog will appear, you are now a developer.

2. Go to additional setting or search developer options in the settings search bar

3. Once in the developer settings find OEM unlock and turn in on, scroll down and also turn on USB debugging, your phone will ask the permission for accessing the data by your computer.

4. Turn off your device. Get a usb cable and connect it to your computer.

5. While phone is off first press Volume UP and Volume Down together, and then then insert the usb cable into the phone while holding the buttons wait for two seconds. a blue screen will come up telling you about consequences and life choices.

6. Long press the Volume Up Button and a new blue screen will show up asking you for unlocking the bootloader. Press Volume Up to confirm. You device will erase everything and reset itself ( Don’t forget to take backup of your Data).

7. After the setup screen appears skip everything in the setup and enable developers option and enable USB debugging in the developer options.

8. Turn off your device again and Repeat step 5.

9. Press Volume up for entering the download mode

10. Now in your computer, Install Odin and open Odin.exe you’ll find your device as comm: xx

Now click on the AP button and select the twerp you downloaded.

Press start and twerp will be installed in your device. Your device will reboot don’t let it boot to one ui, press all three buttons together and hold, as soon as the screen goes black release only the volume down button. Keep holding the Volume UP and power buttons for 3 seconds and then release, you find yourself in twerp. If you miss it repeat the process again but don’t let it boot to One Ui.

In twerp press wipe => format data =>type yes. Press home button and again go to wipe advanced select Data, Cache and Dalvik and swipe to clear.

Press home again. Go to reboot and select recovery, twerp wil reboot. Once it reboots transfer the encryption disabler to your phone and in twerp press install select the storage, sdcard or internal storage, where you have stored the file, select it and swipe to install.

Now in your computer extract the Havoc os image and rename it as “system.img”.

Extract the GSI flasher, copy system.img and paste it in the gsi folder of the GSI Flasher.

Select gsi, Meta-inf, scripts and compress them into a zip and transfer into the phone.

Now in twerp Press install, select the zip file and swipe to install. Also install Gapps or Magisk if you want (though normal magisk will have problem try install phh_magisk, discussed later).

Reboot and KABLAMO You have installed Havoc OS.

Bugs

A small random issue in Auto Brightness

If you root with magisk and install modules, after you reboot your phone will get into a bootloop. Use Phh_Magisk but I aint sure if it’ll work or not Your call madcap.

NONE OF THE FILES IN THIS TUTORIAL HAVE ANYTHING TO DO WITH ME. If SOMETIHING HAPPENS I AM NOT RESPONSIBLE. ONLY DO IT AT YOUR OWN RISK.

Troubleshooting.

If you find errors in twerp, such as unable to mount vendor or system_root, or data. Then you got to install the stock One Ui Back again, therefore it is highly recommended to keep with yourself the stock firmware. You will need It. And it is 4.78 gigs. You can download it from

Model : SM-A515F - Galaxy A51 — Samfrew.com

To reinstall the stock firmware first extract it and the open odin and repeat steps 8 and 9, once your device is detected in Odin press the respective buttons and select the respective files such as for BL button select the file With BL in the name. Do it for buttons, BL, AP(once you select the file it will take long for it load into odin so do not panic and let it load, it might become unresponsive but use patience and wait.)CP , CSC. Click on start and you’ll have ONE Ui back on your device.

To Lock the bootloader repeat steps 5 and 6.

If you still want more stability and Control You can install a different Kernel NDataX from (@Hendamanu) https://xdaforums.com/m/hendramanu.11224917/