Development [RECOVERY] [OFFICIAL] TWRP 3.5.2 for Galaxy A52 4G

Search This thread
D

Deleted member 11588103

Guest
There is a official twrp for this device on the team win page now. They give clear instructions on how to install. One thing they point out is, to root first and then install twrp. Read the instructions, they explain a lot.
Ok so I read the official TWRP page - https://twrp.me/samsung/samsunggalaxya52q.html

But there is one thing I am a bit confused by, the instruction page tells us that we need to install magisk in the recovery (TWRP) so does that mean after downloading the TWRP file I should patch it using the magisk app and then flash it.

Last question will flashing TWRP wipe the device? (Im guessing it wont but it is recommended that I format the data)
 
  • Like
Reactions: RealVelosh

TheDrive

Member
Jan 10, 2007
47
51
Moscow
Do you have the original recovery image for flashing with odin for me? so I can do a proper factory reset. Thank you.
Download original FW of your version and flash whole AP part with Odin. Or extract original boot and dtbo images from the AP.......tar archive, copy them to the SD card, boot to TWRP and flash them using ADB commands of type: dd if=/external-sd/boot.img of=/dev/block/by-name/boot
 
  • Like
Reactions: RealVelosh

ilmervanhattem

Senior Member
May 21, 2013
235
44
39
Amsterdam
Samsung Galaxy A52 4G
Download original FW of your version and flash whole AP part with Odin. Or extract original boot and dtbo images from the AP.......tar archive, copy them to the SD card, boot to TWRP and flash them using ADB commands of type: dd if=/external-sd/boot.img of=/dev/block/by-name/boot
Where to download the firmware? I'm from the Netherlands.
 
  • Like
Reactions: RealVelosh

ilmervanhattem

Senior Member
May 21, 2013
235
44
39
Amsterdam
Samsung Galaxy A52 4G
  • Like
Reactions: RealVelosh

ilmervanhattem

Senior Member
May 21, 2013
235
44
39
Amsterdam
Samsung Galaxy A52 4G
Download original FW of your version and flash whole AP part with Odin. Or extract original boot and dtbo images from the AP.......tar archive, copy them to the SD card, boot to TWRP and flash them using ADB commands of type: dd if=/external-sd/boot.img of=/dev/block/by-name/boot
I renamed the files to .img and made an .tar-file. How can I flash it using TWRP or ADB?
 
  • Like
Reactions: RealVelosh

weazl

Member
Oct 25, 2006
23
6
Ok so I read the official TWRP page - https://twrp.me/samsung/samsunggalaxya52q.html

But there is one thing I am a bit confused by, the instruction page tells us that we need to install magisk in the recovery (TWRP) so does that mean after downloading the TWRP file I should patch it using the magisk app and then flash it.
After reading the official TWRP page I understand that I have to patch TWRP file using magisk.

But what confuses me is:
[...] If you intend to root your (a52q) device, be advised that Magisk will be installed to the recovery partition, not the usual boot partition. Both TWRP and Magisk-rooted Android boot using the recovery kernel, with the device's hardware keys used to choose between TWRP and Android at boot time.
You are therefore strongly advised to first root your device with Magisk and then pre-root a TWRP image before flashing it to recovery.[...]

So I follow the link to root my A52 first with Magisk and read carefully that
[...] If your device does NOT have boot ramdisk, make sure “Recovery Mode” is checked in options.
In most cases it should already be automatically checked. [...]
But: after installing Magisk V23 apk from official site here it states "Ramdisk: YES" and I do not find any option "Recovery Mode". So I assume that Magisk is patched into boot partition and not into recovery mode partition when I press "install".

So from my point of view there is a contradiction between
  • If you intend to root your (a52q) device, be advised that Magisk will be installed to the recovery partition
and the fact that according to Magisk apk a ramdisk exists, i.e. magisk will be installed to the boot partition. Also in the video in the very first post of this thread it seems that after rooting (starting from minute 6:16) the device boots up normally (not via recovery) and has root enabled.

@RealVelosh: Can you help to solve the contradiction?
 
  • Like
Reactions: RealVelosh
D

Deleted member 11588103

Guest
I renamed the files to .img and made an .tar-file. How can I flash it using TWRP or ADB?
You can not flash samsung firmware like that, on a normal android phone (like a pixel for eg) you can use ADB/Fastboot but samsung phones do not have a fastboot mode. Instead it is replaced with "download mode" which requires the use of ODIN.

You can install new software using TWRP but if you are trying to reset to the factory state use ODIN.

Also I saw that you said Frija didnt not work for you or you were not sure how to use it so here is another tool you can try


Simply open the program and type the model number of your phone (it should be SM-A525M or SM-A525F) and also give the region code. Then once you have done that it will download the firmware.
 
  • Like
Reactions: RealVelosh
D

Deleted member 11588103

Guest
After reading the official TWRP page I understand that I have to patch TWRP file using magisk.

But what confuses me is:
[...] If you intend to root your (a52q) device, be advised that Magisk will be installed to the recovery partition, not the usual boot partition. Both TWRP and Magisk-rooted Android boot using the recovery kernel, with the device's hardware keys used to choose between TWRP and Android at boot time.
You are therefore strongly advised to first root your device with Magisk and then pre-root a TWRP image before flashing it to recovery.[...]

So I follow the link to root my A52 first with Magisk and read carefully that
[...] If your device does NOT have boot ramdisk, make sure “Recovery Mode” is checked in options.
In most cases it should already be automatically checked. [...]
But: after installing Magisk V23 apk from official site here it states "Ramdisk: YES" and I do not find any option "Recovery Mode". So I assume that Magisk is patched into boot partition and not into recovery mode partition when I press "install".

So from my point of view there is a contradiction between
  • If you intend to root your (a52q) device, be advised that Magisk will be installed to the recovery partition
and the fact that according to Magisk apk a ramdisk exists, i.e. magisk will be installed to the boot partition. Also in the video in the very first post of this thread it seems that after rooting (starting from minute 6:16) the device boots up normally (not via recovery) and has root enabled.

@RealVelosh: Can you help to solve the contradiction?
Yeh because as it is right now, I am using my A52 with root (but no TWRP) and there is no need for me to boot into the recovery in order to get root. And I am also not seeing the option to patch the recovery, if it try patching twrp in magisk it says "Patching boot image file".

So I am just as lost as you.
 
  • Like
Reactions: RealVelosh

RealVelosh

Member
May 6, 2021
28
45
17
Piauí, Brazil
After reading the official TWRP page I understand that I have to patch TWRP file using magisk.

But what confuses me is:
[...] If you intend to root your (a52q) device, be advised that Magisk will be installed to the recovery partition, not the usual boot partition. Both TWRP and Magisk-rooted Android boot using the recovery kernel, with the device's hardware keys used to choose between TWRP and Android at boot time.
You are therefore strongly advised to first root your device with Magisk and then pre-root a TWRP image before flashing it to recovery.[...]

So I follow the link to root my A52 first with Magisk and read carefully that
[...] If your device does NOT have boot ramdisk, make sure “Recovery Mode” is checked in options.
In most cases it should already be automatically checked. [...]
But: after installing Magisk V23 apk from official site here it states "Ramdisk: YES" and I do not find any option "Recovery Mode". So I assume that Magisk is patched into boot partition and not into recovery mode partition when I press "install".

So from my point of view there is a contradiction between
  • If you intend to root your (a52q) device, be advised that Magisk will be installed to the recovery partition
and the fact that according to Magisk apk a ramdisk exists, i.e. magisk will be installed to the boot partition. Also in the video in the very first post of this thread it seems that after rooting (starting from minute 6:16) the device boots up normally (not via recovery) and has root enabled.

@RealVelosh: Can you help to solve the contradiction?
Hello weazl, how are you? The way of installing Magisk from TeamWin Docs is a prebuilt and common way for all Samsung devices, discard this installation form (TeamWin/Magisk Docs) for A52/A72. You can reproduce the Magisk installation like this:
1 - Install TWRP
2 - Format data, flash multidisabler & dm-verity disaber then reboot to recovery
3 - Flash Magisk, format cache/dalvik/data/internal storage.
4 - Reboot to System
 
  • Like
Reactions: gebxda and TheDrive

weazl

Member
Oct 25, 2006
23
6
Thank you for your quick reply, I highly appreciate your awesome work!


discard this installation form (TeamWin/Magisk Docs) for A52/A72.
I think this is the most important information for anyone following this thread! Glad you clarified that for us!


You can install without TWRP, but if you want with TWRP, it's a little more complicated.

Two more questions still open for me:
1. So if I aldready have Magisk installed (in boot and not in recovery) without TWRP, then it does not matter if I
  • install TWRP using App Install Method
or
  • install TWRP using Odin Install Method
right?

2. Is it then still necessary to Format data and flash multidisabler & dm-verity disabler?
 
  • Like
Reactions: RealVelosh

Top Liked Posts

  • There are no posts matching your filters.
  • 16

    TWRP is an open source, community project. TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices on forums like xda-developers.​


    Note

    Code:
    * Your warranty is now void.
    *
    * I am not responsible for bricked devices, dead SD cards,
    * thermonuclear war, or you getting fired because the alarm app failed. Please
    * do some research if you have any concerns about doing this to your device
    * YOU are choosing to make these modifications, and if
    * you point the finger at me for messing up your device, I will laugh at you.

    How to install (First of all: Have unlocked BL)​

    - If you don't know the basic steps, you can see this video as example
    · Download twrp-3.5.2_10-0-a52q.tar file
    · Disable Auto Reboot option in Odin
    · Select AP, and get twrp-3.5.2_10-0-a52q.tar file
    · Flash it

    Hints after TWRP flashing​

    · Format data (You'll lose all data and things inside internal storage)
    · Flash multidisabler zip

    Credits

    @hendramanu (For helping me about Kernel)
    @DarthJabba9 (For miatoll device tree as base)
    @redymedan (For testing)
    @ShaDisNX255 (For testing)
    Samsung (OSS Team)
    TeamWin Recovery Project

    Download

    twrp-3.5.2_10-0-a52q.tar

    Sources​

    Device Tree
    Kernel Tree

    Support​

    Telegram Group
    6

    Changelog (2021/05/16)​

    Built with latest TWRP sources
    Minor changes

    Note​

    Flash DM Verity file​
    2
    God Jobs! Install instruction, root and bypass safetynet