yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy A12] physwizz:
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
[Samsung Galaxy A12] uluruman:
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?
[Samsung Galaxy A12] physwizz:
Which one is this?

For twrp you may need to go to terminal and type mount-o rw,remount/system
[Samsung Galaxy A12] honzazkrumlova:
The same for me, formated data OK, typed command, there is progress (datža is finally mountable, Internal storage without 0MB capacity) but cannot Install multidisabler ZIP with "a lot of "Unable to find partition for path '/system_root" and "Error instaling zip file"

Just to be sure proper order

1 Adv, Terminal, type remount command

2 Format data

3 Install ZIP

Or it doesnt matter exact order or what I have missed?
[Samsung Galaxy A12] honzazkrumlova:
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
[Samsung Galaxy A12] physwizz:
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
[Samsung Galaxy A12] uluruman:
The first one. But in your screenshot there are much more partitions/mounting points than in my case. I have only these:

Cache

EFS

Data

Prism

Optics

Metadata

Micro SD card

USB OTG

And below them is the unclickable "Mount system partition read-only".
[Samsung Galaxy A12] uluruman:
I'll try the honzazkrumlova method. But I can't use the Afaneh92's TWRP anyway.
[Samsung Galaxy A12] physwizz:
try the Skyhawk one
[Samsung Galaxy A12] honzazkrumlova:
OK then, lets think, why multidisabler didnt worked for me in Skyhawk. Does it work in your hw?

I have tried remount, then multidisabler and vice versa, before/after format data, no effect, but as I look little bit in multidisabler, in basis its a shell skript and AFAIK error I saw was just about system cannot handle that ZIP file, but shell skript.... well, I bielive, it can be somehow unziped and run other way, e.g. in terminal, Skyhark or Afanef92s one. Just an idea
[Samsung Galaxy A12] honzazkrumlova:
Well, TWRP -> Install, its just like that or should I use some adb command? Lasttime I did this with stock recovery and Android 4.4 KitKat, years ago.

In case of failure, I restore boot partition from backup, am I right?

HzK
[Samsung Galaxy A12] uluruman:
Been playing with Skyhawk and Orange Fox for several hours, they both mount System fine but unfortunately it cannot help me in installing LineageOS: they do not see System as a partition, only as a mounting point. When I select lineage-18.1-20211010-UNOFFICIAL-treble_arm64_bvS.img to flash I can only choose between Boot, Recovery and Super partitions to install to. No System partition. I suppose it's the case of the so-called "dynamic partitioning", and System is (just a directory?) inside Super. I tried flashing it directly into Super, but of course it doesn't work. I also tried flashing via fastboot but it just hangs forever instead of erasing/flashing.

Multidisabled seems to work OK for me in Skyhawk (though I don't need it), but only after I format Data and reboot it (into Recovery). Formatting Data and rebooting is needed before anything else.
[Samsung Galaxy A12] uluruman:
I think I've found something that might help:

Will try it tomorrow.
[Samsung Galaxy A12] physwizz:
Yes Install from recovery
[Samsung Galaxy A12] physwizz:
TrY dmverity
[Samsung Galaxy A12] honzazkrumlova:
No kernel, no multidisabler, no dmverity - everytime Error instaling zip file. Log with no clues why. Also tried remount command before, chmod 755. Whats wrong with my "ZIP files"? Suggestion?
[Samsung Galaxy A12] physwizz:
Which recovery?

Log shows system is not rw
[Samsung Galaxy A12] honzazkrumlova:
Skyhawk.

It has to be somethink wrong with

which I changed bit onto mount -o rw,remount/system
[Samsung Galaxy A12] physwizz:
If you're still using twrp you must mount system from terminal every time you use it.

Otherwise go to post 22 and use Method 1
[Samsung Galaxy A12] honzazkrumlova:
Even if I mount everytime TWRP starts, it simply does not wok, cmd is OK?

I use Skyhawks, but TWRP, not SHRP. Is that mean, instaling kernel-or other ZIPs is able only by SHRP?
[Samsung Galaxy A12] physwizz:
For shrp just go to mount and tick system

No need to mount from terminal.
[Samsung Galaxy A12] uluruman:
Success! I have finally made it to LineageOS on my (Russian Vietnam-made) SM-A127F/DSN! I tried it quickly and it looks like it works fine: no problems with the lock screen or camera. Unfortunately no "easy" way worked for me, so I had to go the hard way: completely repacking the super.img, replacing the stock system.img with LineageOS.img. To my immense surprise that worked! Although it first required a lot of searching for the correct tools (for Linux + a bit of Windows in a VM) and then learning how to unpack and repack everything back.

Basically, here are my steps (mostly Linux):

Downloaded the stock firmware (I used the Fijian version as it's the smallest of all)

Flashed it using Odin. That is the only Windows tool I had to use (Heimdall does not work for me, probably it's too outdated)

Gone through the Android setup, enabled the Developer mode, unlocked the bootloader (OEM Unlock), rebooted

Gone through the setup once again, installed Magisk, patched the AP image, flashed it (I think all that is unnecessary)

Unpacked the AP[..].tar.md5 from the stock firmware files: tar xf AP[..].tar.md5

Uncompressed super.img: unlz4 super.img.lz4

Converted from sparse image format to non-sparse (raw): simg2img super.img super.raw

Downloaded and compiled the LonelyFool's lpunpack_and_lpmake

mkdir super, then unpack the super.raw into that dir: lpunpack super.raw super

Downloaded LineageOS GSI

Unpacked it: unxz lineage-[..]-treble_arm64_bvS.img.xz

Converted to raw system image: simg2img lineage-18.1-20211010-UNOFFICIAL-treble_arm64_bvS.img system.img

Renamed the original system.img to system_orig.img

Put the LineageOS system.img into the super dir

Converted the system_orig.img into the raw image format: simg2img system_orig.img system_orig.raw

Dumped (displayed) the system_orig.raw metadata: lpdump system_orig.raw

(here comes the hardest part) Repacked super.img back together using the dumped metadata info:

lpmake \

--metadata-size 65536 --super-name super --metadata-slots 2 --device super:5679087616 --group group_basic:5674893312 \

--partition system:readonly:1852809216:group_basic --image system=./super/system.img \

--partition vendor:readonly:441614336:group_basic --image vendor=./super/vendor.img \

--partition product:readonly:948908032:group_basic --image product=./super/product.img \

--partition odm:readonly:4349952:group_basic --image odm=./super/odm.img \

--sparse --output ./super_custom.img

Flashed Orange Fox using Odin

Booted into Recovery (vol up + power) and flashed the super_custom.img into the Super partition

Rebooted and got LineageOS loading
[Samsung Galaxy A12] physwizz:
Great work.

I flashed lineage and pixel experience from twrp

Why is DSN so much different?

post#3
[Samsung Galaxy A12] physwizz:
I found them slow to respond.

I prefer debloated OneUI
[Samsung Galaxy A12] honzazkrumlova:
Wow, and you called my modest 7 steps a "mammoth effort". Uluruman, thats the mammoth. Maybe, leave a mention about unclear state for DSN in original #1.

Although root, twrp, lineage.... are for those, who can at least read a bit, its not a necessary to invent wheel again.
[Samsung Galaxy A12] physwizz:
Yeah.

I need to find the differences
[Samsung Galaxy A12] physwizz:
Everything is a learning experience, even when you're 67 years old.
[Samsung Galaxy A12] physwizz:
@uluruman , @honzazkrumlova ,

Perhaps you guys should get together and make a thread for the a127f/DSN
[Samsung Galaxy A12] physwizz:
Root and TWRP

1. Download firmware

2. Extract ap file.

3. Patch with magisk

4. Flash with Odin

5. Download recovery.img (you might need to extract from tar)

6. Install TWRP app

7. Install TWRP

8. Choose file to flash.(don't select device)

9. Select recovery.img.

Done
[Samsung Galaxy A12] uluruman:
I am still clarifying some things. First of all there seems to be some problem with boot.img: LineageOS hangs forever on the animated loading screen after a reboot. I used the Magisk-patched boot.img and vbmeta.img as the base of my experiments, but probably they should either remain stock or I should magisk-patch them again right on the first boot of LineageOS. Either way I want to find the cleanest and the shortest way of doing it all for those who just want to swap to LineageOS.
[Samsung Galaxy A12] physwizz:
You don't need them if you rooted with patched ap file.

Also make sure you wipe data.

GSIs can't use OneUI data
[Samsung Galaxy A12] physwizz:
Updated with new recoveries and simplified instructions
[Samsung Galaxy A12] physwizz:
Just tried to install U3 firmware on my a127f with u2 baseband.

Installation Method

Patch u3 ap file using special magisk

Boot into recovery

Backup boot, data, dtbo, super

Mount system etc

Wipe data.

Install patched boot.img

Install super.img

Reboot to recovery

Mount system etc

Install multidisabler

Reboot to recovery

Mount system etc

Install multidisabler again

Reboot

This bootlooped. So I restored my u2 backup
[Samsung Galaxy A12] arsfr:
i extracted the file and i don't get what to do next
[Samsung Galaxy A12] arsfr:
nevermind i found how to do it
[Samsung Galaxy A12] arsfr:
help i bricked my device it has no internal storage?
[Samsung Galaxy A12] arsfr:
and i can't reflash it back to stock firmware and i can't boot to anything except twrp.

please help!
[Samsung Galaxy A12] arsfr:
hmm i finally got it to flash. now to wait and see what it does..
[Samsung Galaxy A12] arsfr:
update: i unbricked my device
[Samsung Galaxy A12] physwizz:
restore your backup
[Samsung Galaxy A12] physwizz:
good
[Samsung Galaxy A12] uluruman:
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.
[Samsung Galaxy A12] IchZerowan:
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.

Spoiler content hidden.
[Samsung Galaxy A12] IchZerowan:
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...
[Samsung Galaxy A12] physwizz:
Samsung really stuffed it up going from u2 to u3
[Samsung Galaxy A12] physwizz:
U2 and U3 recoveries are here.

Install TWRP, SHRP, Orange Fox
[Samsung Galaxy A12] uluruman:
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
[Samsung Galaxy A12] ANDARXapi:
hi all, How to turn off encryption?
[Samsung Galaxy A12] physwizz:
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.
[Samsung Galaxy A12] ANDARXapi:
install multidisabler twice?
[Samsung Galaxy A12] ANDARXapi:
did everything according to the instructions, got a bootloop(

I have a127f/dsn maybe it's because of this?
[Samsung Galaxy A12] physwizz:
Which recovery are you using?

What is you baseband?
[Samsung Galaxy A12] ANDARXapi:
TWRP (new) in post#6

RP1A.200720.012.A127FXXU3AUJ5
[Samsung Galaxy A12] ANDARXapi:
I also flashed the kernel through TWRP, I also got a bootloop
[Samsung Galaxy A12] uluruman:
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.
[Samsung Galaxy A12] ANDARXapi:
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
[Samsung Galaxy A12] hamidv2:
Hello

Did anyone here succeed in rooting the A127F/DS model ?

Thanks a lot !
[Samsung Galaxy A12] physwizz:
Yes.

It can be rooted by following my instructions but twrp is not very effective
[Samsung Galaxy A12] hamidv2:
I only want to root the phone so I can debloat it and maybe install a GSI rom if it's stable enough and has better battery life than the OneUI.

Do I have to wipe the phone or is there a way to root it without wiping data ?
[Samsung Galaxy A12] physwizz:
No.

Data will be wiped

Do you have u3 baseband?
[Samsung Galaxy A12] physwizz:
What is your baseband
[Samsung Galaxy A12] physwizz:
https://xdaforums.com/t/a12-m12-versions.4368115/#post-86038971
[Samsung Galaxy A12] arsfr:
what about U4?
[Samsung Galaxy A12] arsfr:
that just came out on the SM-A127f/dsn is any twrp working on it yet?
[Samsung Galaxy A12] physwizz:
Twrp works for u2 baseband
[Samsung Galaxy A12] arsfr:
no i'm talking about the u4 baseband
[Samsung Galaxy A12] arsfr:
is anyone working on it yet?
[Samsung Galaxy A12] physwizz:
the problem is the only kernel source code is only u1
[Samsung Galaxy A12] physwizz:
I've just added u3 stock kernel to afaneh twrp and its being tested on telegram
[Samsung Galaxy A12] physwizz:
Didn't work.

(Sri Lanka) is working on it
[Samsung Galaxy A12] ANDARXapi:
Does this kernel run on U3 bootloader?
[Samsung Galaxy A12] physwizz:
no.

sorry
[Samsung Galaxy A12] physwizz:
https://xdaforums.com/t/afaneh-twrp-for-m12-a12s-final.4371383/#post-86058341
[Samsung Galaxy A12] physwizz:
@uluruman

U3 versionfor testing.

https://xdaforums.com/t/afaneh-twrp-for-m12-a12s-final.4371383/#post-86058341
[Samsung Galaxy A12] arsfr:
or U4 bootloader?
[Samsung Galaxy A12] physwizz:
yeah.

It might work for you too.

Try it
[Samsung Galaxy A12] uluruman:
Didn't try all the intricate ways yet (reflashing the stock firmware, then Magisk-patch it all, etc.) but the simplest, which is use Odin over whatever I have (LineageOS that is with the stock recovery) and flash, fails for me. It just hangs forever on the Sam logo screen. Interesting thing: LineageOS hangs on the boot animation if I am using the "purged" vbmeta (and I have to use it to flash TWRP, of course, otherwise Download gets excited over missing signatures). Theoretically it shouldn't affect anything at this stage of the booting process but it does.
[Samsung Galaxy A12] physwizz:
Thanks.

Is your device made in Vietnam or India?

There seems to be some difference.
[Samsung Galaxy A12] physwizz:
@uluruman

2 more versions here.

https://xdaforums.com/t/afaneh-twrp-for-m12-a12s-final.4371383/
[Samsung Galaxy A12] uluruman:
It's Vietnam. I have flashed the stock firmware and tried all the three versions in a row, so summing it all up:

afaneh-u3-vt-test: freezes on the Sam logo screen

afaneh-u3-vt2: reboots on the Sam logo screen

afaneh-u3-in3: starts okay

What works for me in "afaneh-u3-in3":

Mounting "System" (at last!), "Vendor", "Product", "ODM", "Metadata", "Cache"

MTP (in Linux, at last!)

What does not work:

Mounting "Data" (!)

Screen freezes after wake-up (as usual, is there a solution?)

Installing "multidisabler-samsung-3.1" is all the same: freeze on the Sam logo screen, recovery becomes inaccessible
[Samsung Galaxy A12] physwizz:
can you send me your stock recovery.img? (zip it first)
[Samsung Galaxy A12] physwizz:
Data is not supposed to be on the mount list.

8. Wipe, format data, type YES.

9. Advanced, terminal.

10.Type multidisabler (twice).

11.Reboot to recovery
[Samsung Galaxy A12] physwizz:
Contact afaneh here.

https://xdaforums.com/t/recovery-unofficial-twrp-for-galaxy-a12s-m12-exynos.4373311/#post-86075593
[Samsung Galaxy A12] arsfr:
ok
[Samsung Galaxy A12] physwizz:
U3 and U4 kernel here for testing

https://xdaforums.com/t/a12s-m12-u3-kernel.4375639/

@uluruman
[Samsung Galaxy A12] ANDARXapi:
Samsung has posted the kernel sources for the U3 loader, please make TWRP for the U3 version of the loader
[Samsung Galaxy A12] physwizz:
Someone is working on it
[Samsung Galaxy A12] ANDARXapi:
ok
[Samsung Galaxy A12] physwizz:
Working TWRP for u3/u4

https://xdaforums.com/t/afaneh-twrp-for-a12s-m12.4371383/#post-86058341
[Samsung Galaxy A12] physwizz:
It's ready now
[Samsung Galaxy A12] physwizz:
Orange Fox recovery

https://xdaforums.com/t/orange-fox-recovery.4377997/
[Samsung Galaxy A12] arsfr:
for a127f/dsn u4 is there any way to get Resurrection Remix OS, or CrDroid, etc?
[Samsung Galaxy A12] arsfr:
i have the same device as you. it works perfectly for me, maybe you did something wrong.
[Samsung Galaxy A12] physwizz:
I installed pixel experience and lineages but I found them slow
[Samsung Galaxy A12] uluruman:
I have already solved all the problems and installed everything. Although it was a long and winding way. The main problem was that I have the U3 baseband version. Now thanks to physwizz there are versions of the recovery and kernels for U3 and U4 available, and those work great, plus there is my own script for repackaging super.img with any GSI OS.
[Samsung Galaxy A12] uluruman:
Well, people install LineageOS mostly not for performance but for freedom from bloatware and spyware components. But I personally don't find it sluggish either, in fact for me it's definitely more responsive than the stock firmware and does not have several annoying issues, such as non-removable pop-ups in the stock messaging app.
[Samsung Galaxy A12] arsfr:
the .zip's or .img.xz's? because i am having trouble installing .img.xz's in twrp
[Samsung Galaxy A12] physwizz:
extract .img file and install
[Samsung Galaxy A12] Mrkunwaraaho:
Hi,

Sorry i am not really good with this Android language, just learning with doing google and searches. I went to terminal and writing this command but its not accepting. The file i placed is in internal memory. Anything what i am missing ( stuck in bootloop cuz 11th step not done ) i tried to flash the multidisabler file by clicking install and it says success but still in bootloop.

" attempt failes mounting at /system_root "

Is this the problem ?

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
[Samsung Galaxy A12] physwizz:
mount everything you can

format datatype yes

install multidisabler.zip

reboot to recovery (directly)

install multidisabler.zip again

reboot to system
[Samsung Galaxy A12] ANDARXapi:
How to install GSI correctly? After every time I install Linage OS I get bootloop
[Samsung Galaxy A12] physwizz:
Installing a GSI

for a12s(a127f) and m12(m127f)

1. Unzip img file

2.Wipe data from twrp

3. Install IMG into system

4. Install my kernel

5. Reboot

GSI list

Exynos 850 Resources

https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-%28GSI%29-list

t.me

@physwizz
[Samsung Galaxy A12] ANDARXapi:
How to increase the system partition if it does not exist? How to install Gapps?
[Samsung Galaxy A12] hezenscs:
@physwizz so I tried to put TWRP on U4 baseband, I followed your first post, and it always ended up stuck at SAMSUNG logo, without any bootloop, just stay at that state for hours. Any fix ?