yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy A51 Guides, News, & Discussion] burakcuhadaroglu:
compulsory. ;)
[Samsung Galaxy A51 Guides, News, & Discussion] Farooq khosa:
Any one have good news about A51 root?
[Samsung Galaxy A51 Guides, News, & Discussion] arjun_m4:
Any idea when TWRP will be released ?
[Samsung Galaxy A51 Guides, News, & Discussion] arjun_m4:
I bought 2 A51. I tried all the method like Flashing Patched Boot image and Flashing Patched AP.

Still no luck VbMeta is the one causing issue.
[Samsung Galaxy A51 Guides, News, & Discussion] AlaiSalaam:
My A515F/DS received an OTA yesterday and it got stuck in the boot logo forever... can't even get into recovery
[Samsung Galaxy A51 Guides, News, & Discussion] arjun_m4:
Did you flash Patched boot.img?
[Samsung Galaxy A51 Guides, News, & Discussion] AlaiSalaam:
I did nothing, my phone is stock... sorry, maybe I was complaining here but it is the wrong thread :silly:. Can't seem to find anyone else with the same problem though, which I find weird
[Samsung Galaxy A51 Guides, News, & Discussion] arjun_m4:
Just flash stock rom from Samfirm or Sammobile.

Beware you might lose your data
[Samsung Galaxy A51 Guides, News, & Discussion] AlaiSalaam:
How would I go around that if I can't even boot into recovery or download mode? The phone is stuck in logo screen, and it resets on its own from time to time... until the battery died. I can reset it by pressing vol down + power, and I press vol up, but the screen flickers and it resets again.
[Samsung Galaxy A51 Guides, News, & Discussion] Please A51:
That is happened to me also . Please Xda find solutions for this error
[Samsung Galaxy A51 Guides, News, & Discussion] arjun_m4:
Can anyone confirm if this method is working. The author of this website says that he has TWRP for A51

https://www.google.com/amp/s/www.androlite.com/2020/01/twrp-root-samsung-galaxy-a51.html?amp=1
[Samsung Galaxy A51 Guides, News, & Discussion] HEROMEROHD:
It doesn't work. Just like by doing it self the vbmeta is rejected because it's not signed.
[Samsung Galaxy A51 Guides, News, & Discussion] Please A51:
yes not working

it is shame on you xda
[Samsung Galaxy A51 Guides, News, & Discussion] arjun_m4:
XDA has nothing to do with it. Developers are working hard to create TWRP, I hope so
[Samsung Galaxy A51 Guides, News, & Discussion] HEROMEROHD:
We just need patience. The only one to blame here is sammy for being a b*tch about rooting.
[Samsung Galaxy A51 Guides, News, & Discussion] jacobhuisman:
Fwiw I also spent a night trying to root the A51. Will keep an eye on this thread for updates.
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
I think something very weird is happening here... this phone was released 4 months ago and until today there's is no TWRP for it? it's, at least, VERY weird, to not say something else. The process of the first thread is used on M30s, wich has the SAME chipset, GPU and CPU, just to show an exemple. I hope they release a way to TWRP/root this phone soon as I can't use it in stock mode. I could even make a donation to encourage anyone to do this...

---------- Post added at 08:01 PM ---------- Previous post was at 07:09 PM ----------

Did someone try this?

Attention : with this methode, phone is totally reset

Attention 2 : have a full samsung ROM from sammobile, to reflash it with odin in case of problem !

What I do :

_ copy/extract a boot.img from a sammobile firmware (boot.img.lz4 is in AP_xxx)

_ patch this file with magisk manager -> rename to boot.img and tar to boot.img.tar

_ I unlock bootloader (when phone is shutdown, press vol+ + vol-, then plug power cable)

_ wait long time for the phone factory reset

_ now you will have a message at each boot time (ignore it, press power button) and knox is 1 !!!!!

_ boot to download mode and flash boot.img.tar with odin

_ after reboot (boot error..), I have to factory reset again in recovery mode !

_ after long time, in android, reinstall magisk manager -> all fine, root is now working !

source: https://xdaforums.com/showpost.php?p=81795603&postcount=2
[Samsung Galaxy A51 Guides, News, & Discussion] HEROMEROHD:
The reason this won't work is that we don't have a ramdisk. Did anyone try to build a kernel with the source with dm-verity and Knox disabled and/or tried to modify the system? Maybe we can use classic root to get supersu on it working, though the last update is from 2017 and safetynet would be doomed.
[Samsung Galaxy A51 Guides, News, & Discussion] jimrfraser:
Maybe a developer on Telegram has better success
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
hope so

---------- Post added at 11:32 AM ---------- Previous post was at 11:29 AM ----------

No cellphone without ramdisk was ever rooted before? What's the importance of SafetyNet in my daily life?
[Samsung Galaxy A51 Guides, News, & Discussion] HEROMEROHD:
There are cellphones without ramdisk which got rooted. But these either are on a lower android version than q or don't have the second vbmeta. You want to pass SafetyNet if you want to use banking apps or other apps which check if your device passes SafetyNet.
[Samsung Galaxy A51 Guides, News, & Discussion] ju@ncho.com:
Hello, I have the SM-A515F / DS and I have changed the firmware to TPA panama, but I have not been able to activate or see the OEM, does anyone know how to make it visible for activation?
[Samsung Galaxy A51 Guides, News, & Discussion] HEROMEROHD:
Just do that and the option should be available.
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
TWRP doesn't support Dynamic Partition(super.img) introduced in Android 10. We need to wait until TWRP gets twrp-10.0 branch on github.

Also boot.img uses System as Root introduced in Android 10 too. Thats why we need to patch recovery.img instead (AP.tar.md5 on Samsung phones)

But on this Phone signed recovery.img required to boot. geiti94 can sign it, but he waiting for updated TWRP.

---------- Post added at 09:44 AM ---------- Previous post was at 09:33 AM ----------

The only way to get Root on this device is intalling custom ROM like AOSP by replacing system.img inside super.img
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
Thanks for all explanation! Did geiti94 wrote an tutorial to teach us how to sign the recovery? I couldn't find any custom ROM for A51 and I guess in order to install it, we need TWRP, so, we still need to wait for its release, right? Thanks

---------- Post added at 02:29 PM ---------- Previous post was at 02:12 PM ----------

...
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
No i heard geiti94 will not reveal it.

It's possible to flash Custom ROM without TWRP using Odin. But you need to unpack super.img using lpunpack tool, replace system.img (i used AOSP A/B arm64) , and then pack all files back using lpmake.
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
Ok, I'll search how to do it. Do you know where can I find a custom ROM for the A51? Thanks
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
AOSP 10.0 v214 arm64 A/B Gapps

This AOSP ROM only works on:

AP — A515FXXU2ATB1

CSC — A515FOXM2ATB1

CP — A515FXXU2ATA8

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

I used to flash Odin 3.14.4 after flashing i did factory reset using recovery mode.
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
since I updated mine to UI2 and my region is different, I'll have to make another .tar to flash, but you gave me a lot of information, thanks a lot! if all goes right, maybe I write a tutorial here to help others :good:

in treble check is showed the system is A only. can I install a A/B GSI?
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
Idk why it's says A only. But im using A/B GSI.

After i installed A/B GSI. treble check says A/B.

Edit: Maybe SELinux preventing treble check from getting info
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
I downloaded SM-A515F_1_20200318014603_dh9s0uenbv_fac.zip with Frija, then extracted it with 7zip, then AP_A515FXXU3ATC5_CL17851094_QB29854347_REV00_user_low_ship_meta_OS10.tar.md5 with 7zip again, all in Windows, then I go to Linux and when I insert "./lpunpack --slot=0 super.img.lz4 <destination dir>", I'm facing this problem:

lpunpack E 04-07 21:46:41 2145 2145 reader.cpp:81] [liblp]Logical partition metadata has invalid geometry magic signature.

lpunpack E 04-07 21:46:41 2145 2145 reader.cpp:81] [liblp]Logical partition metadata has invalid geometry magic signature.

Image does not appear to be in super-partition format.

do you know this?
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
First you need to uncompress super.img.lz4

Then if uncompressed super.img gives error try to use simg2img
[Samsung Galaxy A51 Guides, News, & Discussion] jimrfraser:
I will be first to donate if once you get custom rom on our device and instruction put in easy terms. Keep up great work
[Samsung Galaxy A51 Guides, News, & Discussion] kkosnuss:
I have the EU variant and I just want to root it, whatever TWRP or not.

Please tell me if this method works :highfive:
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
mate, if you downloaded the .tar file containing the super.img, could you please share its source? I think the russian may have a tutorial explaining how to make this file and I want to look for it. Thanks!
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
I used this command to get super.img from super.img.lz4

lz4 -d super.img.lz4 super.img
[Samsung Galaxy A51 Guides, News, & Discussion] HEROMEROHD:
Could you tell how you used lpmake to repack the image? It's always creating an empty image in my case.:eek:
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:4294967296 --group main:4293513600 --partition product:readonly:1516761088:main --image product=./product.img --partition system:readonly:1577095168:main --image system=./system.img --partition vendor:readonly:342155264:main --image vendor=./vendor.img --partition odm:readonly:643456:main --image odm=./odm.img --sparse --output ./super.img

product:readonly:1516761088:main (size of product.img in bytes)

system:readonly:1577095168:main (size of unsparsed system.img in bytes)

vendor:readonly:342155264:main (size of vendor.img in bytes)

odm:readonly:643456:main (size of odm.img in bytes)

--group main:4293513600 (main partition size 1516761088+1577095168+342155264+643456=4293513600)
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
still having no success at all. this is what I did:

1) downloaded firmware file.zip using Frija

2) extracted the AP_file.tar.md5 from firmware file.zip using 7zip

3) extracted the super.img.lz4 file from the Ap_file.tar.md5 using 7zip

4) tried to extract the super.img from super.img.lz4 using the command "lz4.exe -d super.img.lz4 super.img" using lz4 1.9.2

in this step I get the super.img, but I can't do anything with it. I try to mount using Diskinternals Linux Reader, but it returns unallocated space; try to open it using ext2explore, nothing happens.

I also tried to unpack the .lz4 file in Linux using lpunpack I downloaded from https://drive.google.com/file/d/1mgEnQqFOajLnRBX2YYsLL11J2-osPKD_/view, it gives me that error I told you before.

I tried to convert the super.img, extracted from the .lz4 file using lz4.exe, with sgs2toext4.jar, no success, I can't open or mount it too.

It seems to be easy steps, but I can't figure out what I'm missing.

thank you for your support.
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
After using lz4 and simg2img(sgs2toext4.jar?) you need to use lpunpack.

Also super.img not using ext4 filesystem so it's impossible to mount.
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
I manage to install the AOSP 10, thank you so much! It was very hard and I would not achieve this without your help, so, I'll make a tutorial to help others later. But, there is a last problem: my SU is not working. When Android starts, the app shows a messagem from the SU telling me to update it, but when I click, nothing happens. Do you know how to fix it and root it? Thanks!
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
We need kernel without forced Enforced SELinux.

I already compiled it not sure if it's works on Binary 3 Firmwares

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

After installing do Wipe data/factory reset in recovery

Then you need Terminal Emulator (Like Termux) do su command and then write "setenforce 0" and check with "getenforce" it's should say Permissive
[Samsung Galaxy A51 Guides, News, & Discussion] ju@ncho.com:
Have you tried unlocking bootloaders and oem with ADB?

Remember the previous ADB methods ......
[Samsung Galaxy A51 Guides, News, & Discussion] kkosnuss:
At least magic is going to happens after 4 months on this device !! I am so hyped now :victory:
[Samsung Galaxy A51 Guides, News, & Discussion] ibtsam3301:
kindly make a tutorial thread for newbies like me. Thank you
[Samsung Galaxy A51 Guides, News, & Discussion] kkosnuss:
[MENTION=4661848]gabrielfrias[/MENTION] Man, I was like refreshing XDA every day to get news from.

IMPRESSIVE JOB !! Honestly U shall do another thread for this.

Shame haven't no linux gnu ready to try with. And yh it seems definitely tricky ! So I guess I'll wait for TWRP then... Hope u'll still here :highfive:

Nice start for some custom rom (•‿•)
[Samsung Galaxy A51 Guides, News, & Discussion] ToddNachste:
[MENTION=4661848]gabrielfrias[/MENTION] Thank you very much for tutorial and thanks [MENTION=7618808]map220v[/MENTION] for everything you did. It's really great!
[Samsung Galaxy A51 Guides, News, & Discussion] ToddNachste:
By the way, [MENTION=4661848]gabrielfrias[/MENTION], can't you send your "anyname.tar" file so as not to waste time for all those steps?
[Samsung Galaxy A51 Guides, News, & Discussion] phhusson:
How do you boot it and flash it? Edit: Nevermind, Samsung's ****ty broken secure boot only apply on recovery not boot.img. Idiots.

Just remove product partition, it isn't used at all when running GSI
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
Thanks for the tip and for the nice ROM :good: :)

---------- Post added at 08:31 PM ---------- Previous post was at 08:25 PM ----------

thanks, you're welcome!

---------- Post added at 08:33 PM ---------- Previous post was at 08:31 PM ----------

I can't. It must be done exclusively for your Android version and region. If you try to use another original ROM, you may face problems.
[Samsung Galaxy A51 Guides, News, & Discussion] YOisuPU:
please tell me. 1) why should we follow your instructions, we can not just flash gsi from phhusson? What will happen? sorry for the stupid questions. thank you.

2) I have the original Thailand firmware installed. it has less junk than the firmware for my region. phone released for another region. It works much better than for the native region. There are no problems. bootloader third. I suspect that all firmware are the same. the only difference is the set of additional applications for a particular region. I don't need regional trash. can we use the file you received - if there is no difference in the firmware? if not. can we get more detailed instructions for even less advanced users (than you imagine). I read your instructions a thousand times. but did not understand the whole picture. step by step. in the terminal all at once to write or alternately applying? flash odin without rebooting? one by one? make indulgence - describe the process in more detail, in simple words. step by step. since we have to translate the instruction into our language, the instruction becomes little understood at all. thanks. Have a good mood.
[Samsung Galaxy A51 Guides, News, & Discussion] ToddNachste:
Agree with you, in my opinion the region does not affect anything
[Samsung Galaxy A51 Guides, News, & Discussion] phhusson:
If you were able to, you could, but it's not possible :)

You're supposed to flash my gsi on "system" partition, but Odin only sees "super" partition which contains all of system,vendor,product,odm. And for GSI to work you need to keep origin vendor and odm partition.

All other devices with "super" partition just have a recovery with a special fastbootd integrated in the recovery.

But Samsung decided they are special, so they disabled fastbootd from their recovery (it's still there though)!

Other Samsung devices went on with it by using a custom recovery, which is what I was planning to do, but Galaxy A51 is special, and won't let you boot custom recovery.

So uh. Yeah their instructions are correct.

As for 2), yeah region doesn't matter, but vendor version does. You must pick the one that match what's already on your device.
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
Thanks for clarifying that!

Samsung did I lot of sh*t in this phone, I can't imagine why, there's really no need to all this. By the way, [MENTION=7618808]map220v[/MENTION] said geiti94 is able to sign and flash the recovery, but this only works if the recovery is signed to each phone. Do know how to do this or can you point me in the right direction? I would like to learn and share this information.
[Samsung Galaxy A51 Guides, News, & Discussion] ToddNachste:
[MENTION=4661848]gabrielfrias[/MENTION] just now i tried to do a "linux part" of installation without linux, but with bash on windows and it worked! I think you could indicate this in your instruction
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
superb idea, I'm going to update the tutorial now. thanks!
[Samsung Galaxy A51 Guides, News, & Discussion] ToddNachste:
By the way i found another way to get root but it's not tested yet:

0. Download with SamFirm the same firmware you’re running now and extract AP file from firmware archive

1. Extract boot.img.lz4 from AP file

2. Add boot.img.lz4 to .tar archive

3. Put this archive to the phone and patch it with magisk manager

4. Flash magisk_patched.tar with odin in AP

5. Then you should do factory reset and restart the phone

6. Install Magisk Manager and update environment

Of course it needs unlocked bootloader.

Sorry for my bad english, i wrote this without a translator.
[Samsung Galaxy A51 Guides, News, & Discussion] obodzin:
Is there any way to debrand A51?

I downloaded the XEO rom (not branded), but after the flashing there are applications, old screen and the operator's logo.

I installed according to the instructions, I also tried with the pit file, but still the same.

Can anyone help? :(
[Samsung Galaxy A51 Guides, News, & Discussion] Xiomax:
Hey,

I'm stuck at where the quote begins, and i get this error message:

Screenshot

Do you have a suggestion for me?

Thanks!
[Samsung Galaxy A51 Guides, News, & Discussion] ToddNachste:
When i was doing that instruction i just ignored this error message and it works anyway
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
It's won't work. this phone uses system-as-root (no ramdisk in kernel).

We need to patch recovery.img instead. Right now flasing recovery.img useless because it's gives vbmeta error.
[Samsung Galaxy A51 Guides, News, & Discussion] ToddNachste:
[MENTION=7618808]map220v[/MENTION] okay :(
[Samsung Galaxy A51 Guides, News, & Discussion] Xiomax:
I have type "A515FXXU2ATA8", so CP. Could I use this to root my phone by using ODIN, putting the package in the CP slot and then flash?
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
You can flash ROM only in AP .

CP used to flash phone modem or something.
[Samsung Galaxy A51 Guides, News, & Discussion] Xiomax:
So how would I use this super.img?

Thanks for the help!
[Samsung Galaxy A51 Guides, News, & Discussion] map220v:
You need to have phone with

AP — A515FXXU2ATB1

CSC — A515FOXM2ATB1

CP — A515FXXU2ATA8

Then just flash tar file in AP
[Samsung Galaxy A51 Guides, News, & Discussion] Xiomax:
It fails, am I doing something wrong here?

http://prntscr.com/s2wl2z

My phone also says "Custom Binary (Super) blocked by OEM lock", but i have the boot loader unlocked.
[Samsung Galaxy A51 Guides, News, & Discussion] obodzin:
Someone solved this problem? Please help. :crying:
[Samsung Galaxy A51 Guides, News, & Discussion] YOisuPU:
Hello everyone!

many thanks! phhusson map220v gabrielfrias

1) what do these numbers mean. ./lpmake --metadata-size 65536 - super-name super -metadata-slots 2 - device super: 4294967296 --group home:. I see a description of the remaining numbers.

2) is this instruction suitable for a phone with 6/128 memory or do you need to change the numbers mentioned above?

3) do we need a patch that is next to phhusson firmware?

4) what specific GSI firmware should I choose if I need the cleanest without gapps for this phone.

5) we flash it or not (((Permissive kernel (..drive.google /file/d/1Jq8...ew?usp=sharing) -thanks to map220v

How do you boot it and flash it? Edit: Nevermind, Samsung's ****ty broken secure boot only apply on recovery not boot.img. I ... s.)))

I apologize for the many questions they arise from the difficulties associated with the translation. many thanks!
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
try to relock and reunlock, than flash.

don't know. try to leave as is and debrand when TWRP is released.

1) don't know, but I believe they are directions to partition creation. leave as they are.

2) I believe it is, since the original firmware is the same. do not change them.

3) no need to patch any file

4) I tryed GAPPS version only, but I think FLOSS and VANILLA are the ones you're looking for.

5) yes, flash it, without it, root would not be possible.
[Samsung Galaxy A51 Guides, News, & Discussion] Ricobal:
Maybe stupid...why cant we all use the same super.img

stock Phone is the same for everybody?
[Samsung Galaxy A51 Guides, News, & Discussion] gabrielfrias:
it has to be the same firmware your're currently using on your device, so it's not possible to flash the same super.img
[Samsung Galaxy A51 Guides, News, & Discussion] Ricobal:
Thnx for the quick reply

I saw it in the comments.

Is regional.

Maybe a long shot but can somebody do it or help me with this with my Version?

I cannot get Ubuntu to Work.

Sorry for my english
[Samsung Galaxy A51 Guides, News, & Discussion] ToddNachste:
[MENTION=10743075]Ricobal[/MENTION] you can use bash on windows
[Samsung Galaxy A51 Guides, News, & Discussion] BlastedRemnants:
Camera issue

Hi guys I followed the instructions for installing AOSP and it all worked including root, but my camera only uses the 12mp lens on the back and not the 40 something HD camera, anybody have a fix for that?
[Samsung Galaxy A51 Guides, News, & Discussion] topat:
hello fairboy ,

,explain yourself better ,your procedure for root thanks
[Samsung Galaxy A51 Guides, News, & Discussion] mitomanu:
Ok., it is a great guy, but how much for this?
[Samsung Galaxy A51 Guides, News, & Discussion] ibtsam3301:
hey guys...any news on TWRP for our device?
[Samsung Galaxy A51 Guides, News, & Discussion] YOisuPU:
important note! start flashing the phone from a working state. that is, when the phone was launched at least once, there is a mark on the unlocked bootloader in the developer's menu. if you start the firmware immediately after resetting to the factory state, it is more likely that you will get an error about a locked bootloader, even if it is unlocked.

also remember, your firmware and kernel file may be damaged along the way. just download again.
[Samsung Galaxy A51 Guides, News, & Discussion] Huops73:
Someone does know if this works with model SM-A515FZBVEUB?

Thanks in advance!
[Samsung Galaxy A51 Guides, News, & Discussion] YOisuPU:
I think you have the usual model SM-A515F = A51 ... ZBVEUB is the color designation and other things on the box. look - settings - about the phone - the first lines ..

it will work for you!
[Samsung Galaxy A51 Guides, News, & Discussion] Abdulelah10:
Thanks to fairboy he helped me root my device A51 :good: