Development [AOSP-11] [UNOFFICIAL] Samsung SM-A127F TWRP

Search This thread

edward0181

Senior Member
Jul 28, 2013
214
84
Spijkenisse
Samsung Galaxy A12
DISCLAIMER: I WAS NEVER, HAVE NEVER BEEN, AND WILL NEVER BE RESPONSIBLE OF ANY DAMAGES AGAINST YOUR DEVICES BY YOUR OWN MIS-OPERATIONS

Install instructions:

1. Download an arbitrary SM-A127F firmware zip package on SamMobile.com, whose Android version is 11
2. Flash by Heimdall by PIT partitions or by Odin by BL, AP, CP, and CSC tar packages
3. Back to the stock ROM > go to Developments settings > allow OEM unlocking (Developments settings could be enabled by tapping 7~10 times somewhere in About Device)
4. If OEM unlocking is unseen to you, take software updates first
5. Also inside Developments settings, enable USB debugging
6. Download the TWRP image, and unzip.
7. Hold <VolUp>+<VolDn> with device tethered to USB-C with your PC
8. Hold <VolUp> to unlock OEM
9. Hold <VolUp>+<VolDn> again with device not disconnected of USB-C
10. Press <VolUp> without holding to enter Download mode
11. Open ODIN to flash the downloaded TWRP in AP slot with my TWRP image.
12. Hold <VolDn> + <Power> to shut down, then Hold <VolUp> + <Power> to reboot to TWRP

Important: device must boot directly to recovery or stock recovery will be restored if you boot direct to OS.
13. Enjoy!
👍🏻
😎


What is working:
Mounting, flashing

What is not working:
Please do let me know.


Device tree: Links removed and thread locked. @edward0181 Check PM.


CHANGELOG:

25-10-2021:
Changed FSTAB issues, Sideload/MTP and ADB issues.
Reserved free space on dynamic partitions to flash GAPPS if needed.

21-10-2021:
Initial post, issues to be expected.
 
Last edited by a moderator:

uluruman

Senior Member
Oct 23, 2021
116
21
edward0181, thank you for making all this possible! I have a problem though: I want to install LineageOS, I have successfully got TWRP running after repackaging your .img into .tar and flashing it with Odin but I cannot go any further: the SD card contents cannot be read from TWRP and ADB sideloading does not work as well, because the USB device is not detected by the PC when TWRP is working. There is no way to upload any image. Also wiping does not work with lots of "failed to mount" and "block device required" messages. I tried OTG also and it does not work as well. No way to flash the OS.
 

uluruman

Senior Member
Oct 23, 2021
116
21
No further help needed, my phone is bricked. I tried to follow the instructions on how to root it, presuming that was needed to move on in my intention to install Lineage OS. I think now it's completely hopeless: it's stuck on the welcome screen (the one with the warning sign) and not detected as a USB device at all at any stage. It just reboots after several minutes, and that's all. All I can do is force to reboot it by pressing power+vol down. No other key combinations work. So bad I can't get into the download mode without USB connection. Or can I?

OK. I have managed to unbrick it by prying the case open, unscrewing some screws inside to reveal the battery connector and disconnecting the battery. Then I have reconnected it, partially closed the case to make the buttons available, pushed vol up+vol down and connected the USB. Voila: it was in the download mode. I have reset the bootloader and reuploaded the stock OS. Fine, now back to the LineageOS problem.

Question: Is it possible to upload the LineageOS image with Odin so that it will be availabe for flashing with TWRP (USERDATA partition may be)? Or may be it's possible to flash LineageOS directly with Odin, like the stock image?
 
Last edited:

LAST_krypton

Senior Member

@uluruman

You are not the only one who has ADB sideload issues, DEVI will fix them soon enough... One dude reported his phone wasn't getting detected in SIDELOAD mode but in normal RECOVERY mode was. You probably have same issues, you can try pusshing LinageOs.img file to ROOT directory which isn't encrypted and can safely install Linage then.

Push the file by ADB PUSH
Apache config:
adb push LinageOs.img /root/
After pushing LinageOs Image file you can follow my guide for installing it normaly...
 
  • Like
Reactions: uluruman

uluruman

Senior Member
Oct 23, 2021
116
21
Thanks LAST_krypton! Unfortunately the push method does not work for me either, the filesystem is read-only. I guess the phone must be rooted but this is not possible: the magisk-patched file causes the infinite reboot cycle. I tried it again, in case I did something wrong. I also tried some other methods (sideloading via the fastboot, repackaging the stock firmware) but none of them work for one reason or another. Actually just getting rid of the forcefully installed Russian software (which is included in the prism.img) would be enough for me, but I could not accomplish it either.

As of the LineageOS: may be there is some other dir is available both via adb and TWRP, which does not require rooting?
 

LAST_krypton

Senior Member
Thanks LAST_krypton! Unfortunately the push method does not work for me either, the filesystem is read-only. I guess the phone must be rooted but this is not possible: the magisk-patched file causes the infinite reboot cycle. I tried it again, in case I did something wrong. I also tried some other methods (sideloading via the fastboot, repackaging the stock firmware) but none of them work for one reason or another. Actually just getting rid of the forcefully installed Russian software (which is included in the prism.img) would be enough for me, but I could not accomplish it either.

As of the LineageOS: may be there is some other dir is available both via adb and TWRP, which does not require rooting?
Disable READ_ONLY restrictions either by TWRP or ADB. You can follow my guide for rooting, it is for the whole enviorment and you have the patched VBMETA with BOOT image.
 
  • Like
Reactions: uluruman

uluruman

Senior Member
Oct 23, 2021
116
21
Disable READ_ONLY restrictions either by TWRP or ADB. You can follow my guide for rooting, it is for the whole enviorment and you have the patched VBMETA with BOOT image.
Thanks, I'll try it!
 
  • Like
Reactions: LAST_krypton

uluruman

Senior Member
Oct 23, 2021
116
21
Guys, is there another way to reboot into recovery after flashing? I just can't catch the moment when I should press power+vol up, it seems just impossible, it always gets into the red text warning screen, hangs for a while then vibrates and goes on into Android. Strangely enough, I could boot into TWRP with the first release, and can't with this second one. It wasn't easy with the first one but I could do it two or three times. Now I can't do it at all. Strange. Anyway, I'll keep on trying before making conclusions.
 

LAST_krypton

Senior Member
Guys, is there another way to reboot into recovery after flashing? I just can't catch the moment when I should press power+vol up, it seems just impossible, it always gets into the red text warning screen, hangs for a while then vibrates and goes on into Android. Strangely enough, I could boot into TWRP with the first release, and can't with this second one. It wasn't easy with the first one but I could do it two or three times. Now I can't do it at all. Strange. Anyway, I'll keep on trying before making conclusions.
Just when you see the warning screen stop pressing vol + and then after goes from warning PBL unlock screen to LOGO hold vol + again. You can try "adb reboot recovery" from download but dout that will work.
 

uluruman

Senior Member
Oct 23, 2021
116
21
Just when you see the warning screen stop pressing vol + and then after goes from warning PBL unlock screen to LOGO hold vol + again. You can try "adb reboot recovery" from download but dout that will work.
OK, I'm trying it this way:
1. Flash TWRP then power off manually (auto reboot is turned off in Odin)
2. Push Vol+, then Power and hold them
3. The first logo screen appears
4. The warning screen appears and immediately disappears because I'm still holding the Power button (no time to release the vol+ button here)
5. The second logo screen with the red text and the yellow warning sign appears
6. It vibrates and the Android boots up (just the single Samsung logo on the screen)

At which stage I should release the Vol+ button? May be I should release the Power button at some point?

P.S.: adb does not work in the Download mode, of course. I tried.
 
Last edited:

uluruman

Senior Member
Oct 23, 2021
116
21
Well, sorta... I've found a reliable way to get at least into the stock recovery mode:

1. Connect the phone to PC
2. Turn it off
3. The charging screen appears, with the bolt sign
4. Once the bolt sign changes to the percent counting, press and hold Power + Vol up
5. Hold the buttons until it gets into the recovery mode

Works all the time for me. This method does not work after flashing TWRP though, it just hangs on the second logo screen. I suspect it actually tries to run TWRP at this point but can't, and it's the software problem, because once I allow it to go through and restore the original Recovery program, it boots into Recovery just fine following these steps. But never gets to TWRP.

Quite often after that TWRP loading attempt the phone becomes always hanging at this second logo screen on every boot, without holding any buttons, so I have to reflash the AP partition completely to restore it (reflashing recovery.tar.md5 does not help). I don't know what's wrong here.

My phone is SM-A127F with the SER (Russian) v3 firmware.
 
Last edited:

LAST_krypton

Senior Member
Well, sorta... I've found a reliable way to get at least into the stock recovery mode:

1. Connect the phone to PC
2. Turn it off
3. The charging screen appears, with the bolt sign
4. Once the bolt sign changes to the percent counting, press and hold Power + Vol up
5. Hold the buttons until it gets into the recovery mode

Works all the time for me. This method does not work after flashing TWRP though, it just hangs on the second logo screen. I suspect it actually tries to run TWRP at this point but can't, and it's the software problem, because once I allow it to go through and restore the original Recovery program, it boots into Recovery just fine following these steps. But never gets to TWRP.

Quite often after that TWRP loading attempt the phone becomes always hanging at this second logo screen on every boot, without holding any buttons, so I have to reflash the AP partition completely to restore it (reflashing recovery.tar.md5 does not help). I don't know what's wrong here.

My phone is SM-A127F with the SER (Russian) v3 firmware.
Are you sure you are flashing the correct TWRP.tar.md5 file, if you are on android10 that could be the reason why, try on latest android 11.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    DISCLAIMER: I WAS NEVER, HAVE NEVER BEEN, AND WILL NEVER BE RESPONSIBLE OF ANY DAMAGES AGAINST YOUR DEVICES BY YOUR OWN MIS-OPERATIONS

    Install instructions:

    1. Download an arbitrary SM-A127F firmware zip package on SamMobile.com, whose Android version is 11
    2. Flash by Heimdall by PIT partitions or by Odin by BL, AP, CP, and CSC tar packages
    3. Back to the stock ROM > go to Developments settings > allow OEM unlocking (Developments settings could be enabled by tapping 7~10 times somewhere in About Device)
    4. If OEM unlocking is unseen to you, take software updates first
    5. Also inside Developments settings, enable USB debugging
    6. Download the TWRP image, and unzip.
    7. Hold <VolUp>+<VolDn> with device tethered to USB-C with your PC
    8. Hold <VolUp> to unlock OEM
    9. Hold <VolUp>+<VolDn> again with device not disconnected of USB-C
    10. Press <VolUp> without holding to enter Download mode
    11. Open ODIN to flash the downloaded TWRP in AP slot with my TWRP image.
    12. Hold <VolDn> + <Power> to shut down, then Hold <VolUp> + <Power> to reboot to TWRP

    Important: device must boot directly to recovery or stock recovery will be restored if you boot direct to OS.
    13. Enjoy!
    👍🏻
    😎


    What is working:
    Mounting, flashing

    What is not working:
    Please do let me know.


    Device tree: Links removed and thread locked. @edward0181 Check PM.


    CHANGELOG:

    25-10-2021:
    Changed FSTAB issues, Sideload/MTP and ADB issues.
    Reserved free space on dynamic partitions to flash GAPPS if needed.

    21-10-2021:
    Initial post, issues to be expected.
    2
    Great thanks to edward0181 for the job!

    I am trying to get TWRP on my SM-A127F TWRP SEK, but I am facing some errors:
    1. I have successfully unlocked OEM, and am able to enter the download mode
    2. I am successfully flashing the provided .tar.md5 archive into AP with Odin 3.14.4 with auto reboot turned off. After getting the success in Odin, I turn the device off by pressing <VolDn> + <Power>, then try to boot into TWRP but stuck on the welcome screen just like uluruman mentioned
    3. First, I disconnected and reconnected the battery and was able to get into Download mode once again, but then found a better way: press <VolDn> + <Power> to restart. When the screen gets black I quickly press <VolUp> + <VolDn> and insert the USB before I can see the intro logo to get directly into Download mode (might be helpful for someone).
    4. After several attempts I am still not able to boot into TWRP, getting either stuck on the welcome screen or somehow booting into the stock OS.
    5. I then tried to root the device (chances are, TWRP might work on a rooted device) following this guide:
    6. After successfully flashing the magisk patched and turning the phone off I can see only the charging screen (the first one, without numbers) and it doesn't get any further before force reboot (<VolDn> + <Power>).
    7. Following the same logic as with step 3, I tried to press <VolUp> + <Power> during the reload when the screen is black and it worked, I managed to load the bootloader. However, after the factory data reset and whipping cache partition I get stuck on the welcome screen, as with step 2.
    8. Flashing the original firmware works well.

    Any ideas of what else should I try to finally install TWRP? The primary goal is to install LineageOS or AOSP.
    DM-VERIFY must be disabled or only root user will be able to get in to TWRP. You must first follow the rooting guide and then flash TWRP.
    Very simple, but if you get problems with beeing stuck on MICS partition (or which ever partition is charging screen stored, maybe LOGO) you just have to force turn of the phone and boot in to DOWNLOAD before triggering partition as said above.
    2
    Guys, is there another way to reboot into recovery after flashing? I just can't catch the moment when I should press power+vol up, it seems just impossible, it always gets into the red text warning screen, hangs for a while then vibrates and goes on into Android. Strangely enough, I could boot into TWRP with the first release, and can't with this second one. It wasn't easy with the first one but I could do it two or three times. Now I can't do it at all. Strange. Anyway, I'll keep on trying before making conclusions.
    Just when you see the warning screen stop pressing vol + and then after goes from warning PBL unlock screen to LOGO hold vol + again. You can try "adb reboot recovery" from download but dout that will work.
    1
    @edward0181, thread unlocked.

    Thank you for your precious collaboration.