Development [ROOT] [TWRP] [KERNEL] [GSI] for SM-A127f (a12s)

Search This thread

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
Root Method

Twrp and Kernel

Latest twrp



Root Method in post#2
afaneh92 TWRP in post #2
GSIs in post#3
Kernel Version 2 & 3 in post #5
Kernel version 4 in post #11
Install kernel without TWRP in post#21
TWRP (new) in post#6
Skyhawk recovery (new) in post #22
Orange Fox (new) post #24

Note
All of these procedures have been tested on the a127f with u2 baseband
They will probably all work on the m127f as well.


@physwizz

Recoveries for U2 baseband - Working


Recoveries for U3 baseband - Still being tested

All recoveries contain physwizz Kernel
 
Last edited:
  • Like
Reactions: gueladio67

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
Root Method for all Exynos 850 devices.

A. Root part 1 - Preparing the file


I accept no responsibility for bricked phones but I will help you to recover.

1. Download the exact firmware (including upgrade date) for your device from https://samfrew.com or https://www.samfirmware.net/ or https://www.full-repair-firmware.com/search?q=A20 or
2. Download patched magisk
3. Use zarchiver to extract the apxxxxxx....md5 section from the firmware.
4. Use patched magisk to patch the ap section. Allow the extra files.
Click on install and select patch file.
The output will be a patched tar file.

B. To Unlock Bootloader
1. Activate developer options by going to settings, about phone, software information and tapping on build number 7 times.
On phone developer options in settings allow OEM unlocking and enable usb debugging by moving both
sliders RIGHT
If you don't see the OEM unlock
-Disable Auto System Update
-Then disable Automatic date and time (Found in General Management) > then set the time back 14 days
- Connect to the internet
-Go to software update then check for update and wait a long time till it registers the device on server
-Once it's registered the OEM Unlock should be visible in the Developer Options
then connect phone to PC
2. Reboot into download mode by holding down both Vol up and Vol down
(You might need to long press vol up to unlock bootloader)
then press vol up to continue
Reboot and skip through the setup process.


C. Root part 2

Reboot into download mode again
6. Flash the patched ap tar file using special Odin.
(Click on the ap button and choose the patched tar file. Press start)
7. Reboot.
8. Skip all the way through the set-up process.




D. TWRP installation for a127f and m127f (may not work for a127f/DSN)

Make sure your system has fully completed the installation process and all apps have been installed

1. Download the afaneh92 zip file.Unzip the tar from the zip.
2. Extract the recovery.img
3. Install TWRP app form the playstore
4. Choose Install TWRP
5. Choose file to flash.(don't select device)
6. Select recovery.img.
7. Reboot to recovery.
8. Mount system (Press mount then choose system)
9. Tap on Wipe, tap on format data, type YES. (Not just wipe data)
10. Tap on Advanced then terminal.
11. Type multidisabler. Wait for it to finish. Type multidisabler again. Go to main menu
Reboot to recovery (tap on reboot, tap on recovery)
Ignore the keyrefuge error message.
12. Reboot and go completely through the setup process. Wait for downloading to finish. This may take up to an hour. You can see the progress by pulling down from the top.
13. Reboot into recovery and Backup boot, data, super and dtbo


@physwizz
 

Attachments

  • Magisk_patched_for_A21S.apk
    6.3 MB · Views: 409
  • twrp-3.5.2_11-1_afaneh92-R-a12s-2021-12-06.zip
    29 MB · Views: 519
Last edited:

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
Installing a GSI

1. Unzip img file
2. Backup boot, data and super from TWRP.
Wipe data from twrp
3. Install IMG.
4. Install my kernel
5. Reboot

I have installed lineages and pixel experience

List of GSIs


@physwizz
 

Attachments

  • Screenshot_20211031-160703_Trebuchet.png
    Screenshot_20211031-160703_Trebuchet.png
    313.8 KB · Views: 257
Last edited:

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
physwizz a12s kernel version 2
Based on a127f

For OneUI 3.1
(May also work for GSIs)


Samsung securities disabled
More CPU governors
Conservative, On-demand, Userspace, powersave, performance, energy_step, shedutil
Optimised for performance
Overclocked for performance
Underclocked for battery
CPU: 247MHz - 2210MHz


Kernel

@physwizz


physwizz a12s kernel version 3
Based on a127f

For OneUI 3.1
(May also work for GSIs)


Samsung securities disabled
More CPU governors
Conservative, On-demand, Userspace, powersave, performance, energy_step, shedutil
Optimised for performance
Overclocked for performance
Underclocked for battery
CPU: 247MHz - 2210MHz
lz4 compression added to zram

For Zram
Go to HKtweaks- virtual memory
Turn off zram
increase swappiness to 200
choose lz4
increase size to 4096
turn on Zram


Kernel

@physwizz
 

Attachments

  • physwizz_a127f_kernel_v2.zip
    17.6 MB · Views: 78
  • Screenshot_20211030-174416_hKtweaks.jpg
    Screenshot_20211030-174416_hKtweaks.jpg
    184.1 KB · Views: 136
  • physwizz_a127f_kernel_v3.zip
    17.6 MB · Views: 111
Last edited:

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
TWRP
From @(Sri Lanka)

(MTP not working)

Installation
Unzip files
Extract recovery.img

Method 1.
If you have already installed afaneh92 TWRP and decrypted.
1. Boot to recovery.
2. Install recovery.img
3. Choose recovery partition
4. Reboot to recovery

Method 2.
From the start

1. Download firmware
2. Extract ap file.
3. Patch with magisk
4. Flash with Odin
5. Download recovery.img
6. Install TWRP app
7. Install TWRP
8. Choose file to flash.(don't select device)
9. Select recovery.img.
10. Reboot to recovery.
11. Format data
12. Install multidisabler zip
Or dmverity
13. Reboot to recovery
Done


@physwizz
 

Attachments

  • TWRP.zip
    29.1 MB · Views: 303
Last edited:
Feb 3, 2016
32
10
6. Install the TWRP tar file from patched Odin.

Hi,

I am quite noob, IT but not developer, with some knowledge of linux, rooted so far 3 devices with some imagination whats the process about. As far as I know, kernel and recovery are those special partitions, I should know exactly what am doing, because I can brick my phone almost permanently. So pardon me for basic question (I can of course study in another thread, but still will not be sure its 100% accurate for this device)....

6. Install TWRP - some detailed instruction will be welcomed (lasttime I saw TWRP, it was onetime run by adb/fastboot command with red colored mention DO NOT enable Write, stay read only) - BL, AP, CP?
9. Mount etc.... some details?
4. Install kernel .... some details?

And just to ensure myself understanding, TWRP become permanent in recovery partition, updated kernel comes with some optimizing - but no special changes has to be made for whole firmware. And A12s vs/aka A127F/DS versus my device A127F/DSN .... its not important difference?

Thanks
 

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
Hi,

I am quite noob, IT but not developer, with some knowledge of linux, rooted so far 3 devices with some imagination whats the process about. As far as I know, kernel and recovery are those special partitions, I should know exactly what am doing, because I can brick my phone almost permanently. So pardon me for basic question (I can of course study in another thread, but still will not be sure its 100% accurate for this device)....

6. Install TWRP - some detailed instruction will be welcomed (lasttime I saw TWRP, it was onetime run by adb/fastboot command with red colored mention DO NOT enable Write, stay read only) - BL, AP, CP?
9. Mount etc.... some details?
4. Install kernel .... some details?

And just to ensure myself understanding, TWRP become permanent in recovery partition, updated kernel comes with some optimizing - but no special changes has to be made for whole firmware. And A12s vs/aka A127F/DS versus my device A127F/DSN .... its not important difference?

Thanks
Thanks for the feedback.
I'll add more detail shortly
 

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
Hi,

I am quite noob, IT but not developer, with some knowledge of linux, rooted so far 3 devices with some imagination whats the process about. As far as I know, kernel and recovery are those special partitions, I should know exactly what am doing, because I can brick my phone almost permanently. So pardon me for basic question (I can of course study in another thread, but still will not be sure its 100% accurate for this device)....

6. Install TWRP - some detailed instruction will be welcomed (lasttime I saw TWRP, it was onetime run by adb/fastboot command with red colored mention DO NOT enable Write, stay read only) - BL, AP, CP?
9. Mount etc.... some details?
4. Install kernel .... some details?

And just to ensure myself understanding, TWRP become permanent in recovery partition, updated kernel comes with some optimizing - but no special changes has to be made for whole firmware. And A12s vs/aka A127F/DS versus my device A127F/DSN .... its not important difference?

Thanks
I hope the method is now OK.
please contact me if any further help is needed

 

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
physwizz a12s kernel version 4
Based on a127f U1 binary

For OneUI 3.1
( also works for GSIs)


Samsung securities disabled
More CPU governors
Conservative, On-demand, Userspace, powersave, performance, energy_step, shedutil
Optimised for performance
Overclocked for performance
Underclocked for battery
CPU: 130MHz - 2210MHz
lz4 compression added to zram
Ready for spectrum installation

Installation
Method 1
Install from TWRP


Method 2
Install adb tools on pc
Connect to PC
Copy zip file to adb folder on pc
Open terminal on pc
Navigate to adb folder
Type
adb sideload name.zip


For Zram
Go to HKtweaks- virtual memory
Turn off zram
increase swappiness to 200
choose lz4
increase size to 4096
turn on Zram


Kernel

@physwizz
 

Attachments

  • physwizz_a127f_kernel_v4.zip
    17.6 MB · Views: 145
Last edited:

IchZerowan

Member
Oct 31, 2021
11
1
Backup boot, data, super and dtbo
Thanks! I finally got the TWRP on my SM-A127F, though I cannot perform the last step: I get errors "Failed to mount '/data' (Invalid argument)" and "Failed to mount '/keyrefuge' (Invalid argument)". Any ideas?

UPD: not sure if it's OK, but I changed /data filesystem to ext4 and it worked well.
 
Last edited:

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
Thanks! I finally got the TWRP on my SM-A127F, though I cannot perform the last step: I get errors "Failed to mount '/data' (Invalid argument)" and "Failed to mount '/keyrefuge' (Invalid argument)". Any ideas?

UPD: not sure if it's OK, but I changed /data filesystem to ext4 and it worked well.
Format data
Type yes
Then GO to advanced
terminal and type multidisabler twice
Reboot to recovery

Ignore keyrefuge
 
Last edited:
Feb 3, 2016
32
10
Thanks! I finally got the TWRP on my SM-A127F, though I cannot perform the last step: I get errors "Failed to mount '/data' (Invalid argument)" and "Failed to mount '/keyrefuge' (Invalid argument)". Any ideas?

UPD: not sure if it's OK, but I changed /data filesystem to ext4 and it worked well.
Can you post, how exactly you did it (changed to ext4)
Based on your mention, I tried TWRP, WIPE, Advanced wipe, Change or repair filesystem, Change, to EXT4. No luck.
 

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
Thanks! I finally got the TWRP on my SM-A127F, though I cannot perform the last step: I get errors "Failed to mount '/data' (Invalid argument)" and "Failed to mount '/keyrefuge' (Invalid argument)". Any ideas?

UPD: not sure if it's OK, but I changed /data filesystem to ext4 and it worked well.
I didn't change mine to ext4.
I just left it as it was
 
Feb 3, 2016
32
10
I tried exactly the same steps you mentioned, and it worked.
Well, but...
In original physwizz instructions, there are steps and I would be greatfull to provide some details
Those key moments

0. "Install all apps, etc"
A. Wipe / Format Data / yes
B. Multidisabler twice
and your workaround C. Change FS to EXT4

My experiments was like>
0+A+B... system bricked (or 10min long bootloop)
0+A+B+C ..... bricked (but TWRP at least sees Internat storage with 50GB capacity)

Then, I said myself, well, C mean I wiped, never mind, lets alter it like
A+B+C+ call clean wipe (but on ext4 Data partition.... but how?)

Well, tried> A+B+C+ Wipe, Wipe Factory Reset.
no change, bricked.

I also tried/experiemnt
A+restart .... bricked
A+B+restart .... bricked
B+restart .... bricked

So, can you please write little bit details?
Thanks!
 

IchZerowan

Member
Oct 31, 2021
11
1
Well, but...
In original physwizz instructions, there are steps and I would be greatfull to provide some details
Those key moments

0. "Install all apps, etc"
A. Wipe / Format Data / yes
B. Multidisabler twice
and your workaround C. Change FS to EXT4

My experiments was like>
0+A+B... system bricked (or 10min long bootloop)
0+A+B+C ..... bricked (but TWRP at least sees Internat storage with 50GB capacity)

Then, I said myself, well, C mean I wiped, never mind, lets alter it like
A+B+C+ call clean wipe (but on ext4 Data partition.... but how?)

Well, tried> A+B+C+ Wipe, Wipe Factory Reset.
no change, bricked.

I also tried/experiemnt
A+restart .... bricked
A+B+restart .... bricked
B+restart .... bricked

So, can you please write little bit details?
Thanks!
I currently wasn't able to run any GSIs on my phone, so not sure what to do next. I think, backing up /data is useless since it's empty (I tried ls from the terminal). Next attempt I gonna restore the state using backup or even odin, and back up only boot, super, and dtbo without changing the FS. At least, the default OneUI boots this way, so I hope one of the GSIs will boot as well. I gonna experiment on this a bit later.
 
Feb 3, 2016
32
10
I tried exactly the same steps you mentioned, and it worked.
Well, I have had hope, when you written "worked". Hope that mounting /data is possible.
Well, backup /data ist not useless now, its not possible, because if you try, falls into error because unmountable.
Lets say, you wanna backup those special partition in case, your experiment with kernels go wrong, so far so good.
My intention was pretty less advanced, I wanna backup data for a reason - well, these days some apps goes way I dont want you, I would use /data backup in case, I want restore previous version of some app. That + regular backup, why backup data/files/setting, when I can backup whole system, lets say once a month.

Anyway, changing /data partition to ext4 DID something and CHANGED something (capacity of internal storage), so its maybe workaround about where the solution stays, I have found some older thread about similar problem in TWRP and solution that changing to EXT2, then EXT4 would help. Will experiment and let you know, if succeed.
 

physwizz

Senior Member
Sep 16, 2013
3,439
747
Sydney
Some screenshots from afaneh92 twrp.
 

Attachments

  • Screenshot_2021-11-09-14-41-36.png
    Screenshot_2021-11-09-14-41-36.png
    48.8 KB · Views: 100
  • Screenshot_2021-11-09-14-41-21.png
    Screenshot_2021-11-09-14-41-21.png
    70.6 KB · Views: 100
  • Screenshot_2021-11-09-14-40-44.png
    Screenshot_2021-11-09-14-40-44.png
    65.3 KB · Views: 97

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    Thanks physwizz! With these new recoveries I finally got TWRP booting! I've formatted data okay, have the sdcard accessible after that and a reboot, but now the next problem: a lot of "Unable to find partition for path '/system_root'" messages. And indeed, there is no "system_root" partition entry in fstab. Also the "Mount system partition read-only" checkbox in the Mount section is unresponsive and remains always checked. Any ideas?
    Agh, finally, I found combination, that works for me.
    I have spent days and physwizz hours PMing with me to double, triple check, if I missed some point. It still remain mysterious, why steps leads to different results, as a novice, I can just speculate, if there is some tiny important difference between A127F/DS and A127F/DSN. Or, well.... what about starting "Stock ROM" we are different.

    But there have been some clues.
    Afaneh92's TWRP, it can boot for me, but there has been two things that stink for me. Select Storage - shown Internal storage 0MB capacity and unmountable Data partition, that even if it reports 0MB size, cannot as an empty be backuped, for example. Reboots after proper steps (Format data) leads to slow bootlooping (10mins, I guess Android factory reset trying to finish with some bug in the end).

    Newest TWRP - that one reported lasttime, Srilanka user, it can in some point (physwizz remount command) starts to report Storage size, even Data partition, but installing multidisabler didnt worked for me, leads to Cannot install zip file error. So, not surprise, after data format and reboot, it lead to nothing, well I can just speculate it that un-disabled encryption. Physwizz advice to remount solves part of red colors anout system root.

    I combine those TWRP, using both for part of the job.
    1. Rebooted to Afaneh92 TWRP,
    2. run remount command
    3. run multidisable twice
    4. Reboot directly to download mode
    5. flash SriLankas TWPR, and boot it
    6. Remount command, Format data
    7. Reboot

    voila, system starts, initiate standard default process. Srilankas TWRP can backup all partition I want (including /data). All done.

    I have no idea, if this procedure will help others and will work in other conditions, thats the task for you guys, much much advanced than me. I have just some unclear imagination, whats those steps are about, but there has to be something unfinished with afanehs twrp, that prevent it to work OK in some conditions (hardware, original but regional stock rom)

    Let others know, if it worked for ya.
    HzK
    1
    Root Method

    Twrp and Kernel

    Latest twrp



    Root Method in post#2
    afaneh92 TWRP in post #2
    GSIs in post#3
    Kernel Version 2 & 3 in post #5
    Kernel version 4 in post #11
    Install kernel without TWRP in post#21
    TWRP (new) in post#6
    Skyhawk recovery (new) in post #22
    Orange Fox (new) post #24

    Note
    All of these procedures have been tested on the a127f with u2 baseband
    They will probably all work on the m127f as well.


    @physwizz

    Recoveries for U2 baseband - Working


    Recoveries for U3 baseband - Still being tested

    All recoveries contain physwizz Kernel
    1
    I can now totally confirm that the afaneh92's TWRP image, as well as edward0181's, does not work on the Vietnam-made SM-A127F/DSN: I've rooted it, installed TWRP app, flashed the recovery.img from the app and rebooted into recovery using adb. I'm still getting just endless reboots. So this time the experiment was clean and the "wrong key pressed at wrong time" factor was completely excluded. I'm just curious why any stock firmware and the stock recovery tools works just fine? I've already tried many different country-specific versions from that list and they all flash and work perfectly.

    P.S.: By the way, I've built the latest Magisk from the git master and it works great, so no patched version needed.
    1
    Orange Fox
    From @(Sri Lanka)

    (MTP not working)

    Installation
    Unzip files
    Extract recovery.img

    Method 1.
    If you have already installed afaneh92 TWRP and decrypted.
    1. Boot to recovery.
    2. Install recovery.img
    3. Choose recovery partition
    4. Reboot to recovery

    Method 2.
    From the start

    1. Download firmware
    2. Extract ap file.
    3. Patch with magisk
    4. Flash with Odin
    5. Download recovery.img
    6. Install TWRP app
    7. Install TWRP
    8. Choose file to flash.(don't select device)
    9. Select recovery.img.
    10. Reboot to recovery.
    11. Format data
    12. Install multidisabler zip
    Or dmverity
    13. Reboot to recovery
    Done


    @physwizz
    1
    Agh, finally, I found combination, that works for me.
    I have spent days and physwizz hours PMing with me to double, triple check, if I missed some point. It still remain mysterious, why steps leads to different results, as a novice, I can just speculate, if there is some tiny important difference between A127F/DS and A127F/DSN. Or, well.... what about starting "Stock ROM" we are different.

    But there have been some clues.
    Afaneh92's TWRP, it can boot for me, but there has been two things that stink for me. Select Storage - shown Internal storage 0MB capacity and unmountable Data partition, that even if it reports 0MB size, cannot as an empty be backuped, for example. Reboots after proper steps (Format data) leads to slow bootlooping (10mins, I guess Android factory reset trying to finish with some bug in the end).

    Newest TWRP - that one reported lasttime, Srilanka user, it can in some point (physwizz remount command) starts to report Storage size, even Data partition, but installing multidisabler didnt worked for me, leads to Cannot install zip file error. So, not surprise, after data format and reboot, it lead to nothing, well I can just speculate it that un-disabled encryption. Physwizz advice to remount solves part of red colors anout system root.

    I combine those TWRP, using both for part of the job.
    1. Rebooted to Afaneh92 TWRP,
    2. run remount command
    3. run multidisable twice
    4. Reboot directly to download mode
    5. flash SriLankas TWPR, and boot it
    6. Remount command, Format data
    7. Reboot

    voila, system starts, initiate standard default process. Srilankas TWRP can backup all partition I want (including /data). All done.

    I have no idea, if this procedure will help others and will work in other conditions, thats the task for you guys, much much advanced than me. I have just some unclear imagination, whats those steps are about, but there has to be something unfinished with afanehs twrp, that prevent it to work OK in some conditions (hardware, original but regional stock rom)

    Let others know, if it worked for ya.
    HzK
    Glad it now works.
    What a mammoth effort.
    The a127f/DSN is different in some way from a127f (I have a single Sim)

    Now see if you can install my kernel v4