• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

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

Search This thread

uluruman

Senior Member
Oct 23, 2021
82
8
and i can't reflash it back to stock firmware and i can't boot to anything except twrp.

please help!
You can always boot into download mode, so you can reflash anything you want with Odin. If remember correctly there is even an option in TWRP to reboot into Download, it's just in some Advanced menu. Or reboot normally, but before that plug USB in (not charger, but PC) and hold volume up and volume down at the very moment the screen goes totally black (not just blank but totally black, i.e. backlight turns off). If that does not work, you can try to hold the volume buttons in advance but plug the USB cable in when screen goes black; to make it easier just half-insert the cable beforehand and then insert it fully when the time comes.
 

IchZerowan

Member
Oct 31, 2021
11
1
Repacked super.img back together using the dumped metadata info
Thanks for the guide, it seems like the best option for me, too
The only thing I am currently stuck with is the parameters of this huge command. I can see the same sizes in the general info, but the separate partitions use different sizes if I get it right from my logs. How would this command look like for my dump? Thanks in advance for your reply.

Trying to run a command "as is" causes a boot loop.

Slot 0:
Metadata version: 10.0
Metadata size: 592 bytes
Metadata max size: 65536 bytes
Metadata slot count: 2
Header flags: none
Partition table:
------------------------
Name: system
Group: group_basic
Attributes: readonly
Extents:
0 .. 7562495 linear super 2048
------------------------
Name: vendor
Group: group_basic
Attributes: readonly
Extents:
0 .. 862527 linear super 7565312
------------------------
Name: product
Group: group_basic
Attributes: readonly
Extents:
0 .. 1853335 linear super 8429568
------------------------
Name: odm
Group: group_basic
Attributes: readonly
Extents:
0 .. 8495 linear super 10283008
------------------------
Super partition layout:
------------------------
super: 2048 .. 7564544: system (7562496 sectors)
super: 7565312 .. 8427840: vendor (862528 sectors)
super: 8429568 .. 10282904: product (1853336 sectors)
super: 10283008 .. 10291504: odm (8496 sectors)
------------------------
Block device table:
------------------------
Partition name: super
First sector: 2048
Size: 5679087616 bytes
Flags: none
------------------------
Group table:
------------------------
Name: default
Maximum size: 0 bytes
Flags: none
------------------------
Name: group_basic
Maximum size: 5674893312 bytes
Flags: none
------------------------
 

IchZerowan

Member
Oct 31, 2021
11
1
Actually, the main question is: did anybody manage to install any GSI (e.g. Lineage) on A127F/DSN with U3? I really got quite deep into this flashing thing, but literally, nothing seems to work...
 

uluruman

Senior Member
Oct 23, 2021
82
8
Thanks for the guide, it seems like the best option for me, too
The only thing I am currently stuck with is the parameters of this huge command. I can see the same sizes in the general info, but the separate partitions use different sizes if I get it right from my logs. How would this command look like for my dump? Thanks in advance for your reply.

Trying to run a command "as is" causes a boot loop.

Slot 0:
Metadata version: 10.0
Metadata size: 592 bytes
Metadata max size: 65536 bytes
Metadata slot count: 2
Header flags: none
Partition table:
------------------------
Name: system
Group: group_basic
Attributes: readonly
Extents:
0 .. 7562495 linear super 2048
------------------------
Name: vendor
Group: group_basic
Attributes: readonly
Extents:
0 .. 862527 linear super 7565312
------------------------
Name: product
Group: group_basic
Attributes: readonly
Extents:
0 .. 1853335 linear super 8429568
------------------------
Name: odm
Group: group_basic
Attributes: readonly
Extents:
0 .. 8495 linear super 10283008
------------------------
Super partition layout:
------------------------
super: 2048 .. 7564544: system (7562496 sectors)
super: 7565312 .. 8427840: vendor (862528 sectors)
super: 8429568 .. 10282904: product (1853336 sectors)
super: 10283008 .. 10291504: odm (8496 sectors)
------------------------
Block device table:
------------------------
Partition name: super
First sector: 2048
Size: 5679087616 bytes
Flags: none
------------------------
Group table:
------------------------
Name: default
Maximum size: 0 bytes
Flags: none
------------------------
Name: group_basic
Maximum size: 5674893312 bytes
Flags: none
------------------------
If you're on Linux I've made a script which completely automates the repacking process. Yes, you must supply a lot of parameters to lpmake. In your case it looks like this, just replace SYSTEM_SIZE (your new system.img), VENDOR_SIZE, PRODUCT_SIZE and ODM_SIZE with the sizes of the corresponding image files:

lpmake --metadata-size 65536 --super-name super --metadata-slots 2 --device super:5679087616 --group group_basic:5674893312 --partition system:readonly:SYSTEM_SIZE:group_basic --image system=system.img --partition vendor:readonly:VENDOR_SIZE:group_basic --image vendor=vendor.img --partition product:readonly:PRODUCT_SIZE:group_basic --image product=product.img --partition odm:readonly:ODM_SIZE:group_basic --image odm=odm.img --sparse --output super.img
 

physwizz

Senior Member
Sep 16, 2013
3,307
726
Sydney
hi all, How to turn off encryption?
Reboot to recovery.
Mount system (Press mount then choose system)
Tap on Wipe, tap on format data, type YES. (Not just wipe data)
install multidisabler
Reboot to recovery (tap on reboot, tap on recovery)
Install multidisabler\Reboot to recovery (tap on reboot, tap on recovery)
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.
 
Last edited:

ANDARXapi

Member
Nov 30, 2021
20
2
Reboot to recovery.
Mount system (Press mount then choose system)
Tap on Wipe, tap on format data, type YES. (Not just wipe data)
install multidisabler
Reboot to recovery (tap on reboot, tap on recovery)
Install multidisabler\Reboot to recovery (tap on reboot, tap on recovery)
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.
install multidisabler twice?
 

ANDARXapi

Member
Nov 30, 2021
20
2
Reboot to recovery.
Mount system (Press mount then choose system)
Tap on Wipe, tap on format data, type YES. (Not just wipe data)
install multidisabler
Reboot to recovery (tap on reboot, tap on recovery)
Install multidisabler\Reboot to recovery (tap on reboot, tap on recovery)
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.
did everything according to the instructions, got a bootloop(
I have a127f/dsn maybe it's because of this?
 

uluruman

Senior Member
Oct 23, 2021
82
8
I also flashed the kernel through TWRP, I also got a bootloop
All the recoveries, even those that I posted, still do not work correctly with the U3 baseband. They may seem to run okay but their functionality is greatly limited, I personally could not find any use of them. That's why for installing LineageOS I resorted to repackaging the whole super.img keeping everything else stock, including Recovery.
 

ANDARXapi

Member
Nov 30, 2021
20
2
Все рекавери, даже те, которые я выложил , все равно некорректно работают с U3 baseband. Может показаться, что они работают нормально, но их функциональность сильно ограничена, я лично не смог найти в них никакого применения. Вот почему для установки LineageOS я прибег к переупаковке всего super.img, сохранив все остальное на складе, включая Recovery.

Все рекавери, даже те, которые я выложил , все равно некорректно работают с U3 baseband. Может показаться, что они работают нормально, но их функциональность сильно ограничена, я лично не смог найти в них никакого применения. Вот почему для установки LineageOS я прибег к переупаковке всего super.img, сохранив все остальное на складе, включая Recovery.
Thank you very much

I understand that there is no normal TWRP because there are no kernel sources?
Also if you are not difficult in the section write how to install GSI firmware so that I could translate your instructions through a translator because I do not understand English very well and large instructions lose all meaning because of the translation
 

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
    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
    1
    I'll try the honzazkrumlova method. But I can't use the Afaneh92's TWRP anyway.