Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Created May 25, 2026 12:33
Show Gist options
  • Select an option

  • Save sogaiu/4c28d1cfd16228f4f8c538c91de992d8 to your computer and use it in GitHub Desktop.

Select an option

Save sogaiu/4c28d1cfd16228f4f8c538c91de992d8 to your computer and use it in GitHub Desktop.
alternative rom info for samsung galaxy a51
  • version: sm-a515f/dsn (global)

  • gsmarena page https://www.gsmarena.com/samsung_galaxy_a51-9963.php

  • about rooting samsung devices (via installation of magisk): https://topjohnwu.github.io/Magisk/install.html#samsung-devices

    Installing Magisk WILL trip your Knox Warranty Bit, this action is not reversible in any way.

    may be better to not root if possible?

    however, apparently flashing twrp may be enough to trip knox (it seems to have been tripped for the device tried with) so using magisk may not be a problem from this perspective.

    Installing Magisk for the first time REQUIRES a full data wipe (this is NOT counting the data wipe when unlocking bootloader). Please make a backup of your data.

    this part not such a problem -- didn't need to keep data

  • twrp thread https://xdaforums.com/t/recovery-official-3-7-1-twrp-for-galaxy-a51.4680101/

    encryption not supported

    NOTE: didn't do anything special below for this fwiw

  • twrp page https://twrp.me/samsung/samsunggalaxya51.html XXX: caveats - not understood yet

    If you wish to install TWRP without rooting, there are numerous pitfalls to consider. For example, a stock device is protected by Android Verified Boot. This is implemented as a vbmeta partition that contains cryptographic digests for verifying the integrity of boot.img, recovery.img and other partitions/images. Flashing TWRP without first flashing a vbmeta image with verity disabled will render your device unable to boot.

    NOTE: in the end just used the vbmeta.img file that came with twrp -- didn't do anything to the file.

    possibly relevant: https://droidwin.com/how-to-create-odin-flashable-patched-vbmeta-for-samsung/

    seems to suggest that stock firmware archive should contain the relevant vbmeta.img file. however, the twrp download contained a vbmeta.img so that was used.

  • xdaforums thread for crdroidandroid a51 https://xdaforums.com/t/samsung-galaxy-a51-crdroidandroid-12-0.4757810/

    one of the comments mentioned the lack of a vbmeta.img file as part of the zip file but this seemed to have gone unanswered.

  • crdroid page https://crdroid.net/a51/12

    NOTE: instructions on this page were off in a number of ways, but still useful.

    NOTE: method below does not use crdroid's recovery (image) but rather twrp's.

    XXX: encountered issue that the .zip file did not contain vbmeta.img the xdaforums thread had a mention but no resolution twrp .tar file contained a vbmeta.img file though

    • unlocking bootloader

    Open Settings, and go to About phone -> Software information. Tap "Build number" 7 times. Go back, then select "Developer options". Enable "OEM unlocking", and press "Enable" on the warning Turn off the phone. Hold down the Volume Down and Volume Up buttons. While holding them, connect the phone to your computer. When the Warning screen appears, release all buttons. Hold down Volume Up until it says "Unlock bootloader?", then press Volume Up again.

    wait as phone goes through various screens...eventually likely reaches screen with just samsung logo on it.

    hold volume up, volume down, and power for a while for logo to go away (may need to unplug usb cable)

    ?

    holding volume up and volume down for a while seemed to lead to safe mode

    at this point holding the power key down long enough brought up a dialog asking whether to power off. following the instructions seemed to make things work

    Turn the phone off. -- see above, was not straight-forward Hold Volume Down + Volume Up and connect the phone to your computer to boot into Download Mode. When the Warning screen appears, release the buttons. Press Volume Up to continue to Download Mode.

    check that device recognized by heimdall:

    heimdall detect

    cd to directory that has the twrp content extracted, then flash:

    heimdall flash --VBMETA vbmeta.img --RECOVERY recover.img --no-reboot

    WARNING: read 1 and 2 below and understand before following instructions because timing may matter.

    1. to restart, hold volume down and power
    2. once rebooting starts (black screen), immediately hold volume up and power keep holding until twrp screen appears

    WARNING: about to wipe data

    in twrp, wipe dance:

    1. format data -> yes -> checkmark key
    2. advanced wipe -> choose all except micro sd card and usb storage
    3. swipe to factory reset

    sideload installation:

    1. advanced -> adb sideload -> choose wipe dalvik cache and wipe cache -> swipe
    2. on pc: adb sideload crDroidAndroid-16.0-20260422-a51-v12.9.zip
    3. wait a while

    to reboot, press "reboot system"



untried


not sure whether trustworthy...obtain other via bifrost / samloader tools and compare?

SM-A515F.tar obtained from: https://github.com/cat658011/samsung-universal9611-fw/releases

checksum calculated was: 668c73ea9d8b034e9ef12e326aec93c8e51e0cb0c1cb2854934de46d5e1d252


vbmeta modification (not sure if needed) https://github.com/libxzr/vbmeta-disable-verification https://github.com/WessellUrdata/vbmeta-disable-verification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment