[Samsung Galaxy A12] System23:
Hi,

So i would Tell Ya my Working Methods, and i have done all with the Device (Downgrade,False Firmware,Bootloop,ROOT,TWRP)

So the easy Things at First!!!

When Ya Flash in Binary 3 ROOT/TWRP/VBMETA it ends with all Options Ya found in Bootloop!!! THERE ARE NO WORKING METHODS NOW 4 BINARY 3

so its simple

Download a Binary 3 Firmware, witch are is equal and extract from APxxxxxxx.tar.md5 the boot.img.lz4,recovery.img.lz4 vbmeta.img.lz4 and pack this in a TAR archive FIX.tar and start Device in Download-Mode and Flash it via Odin, Thats all your Fixed Bootloop!!!!

When Ya Brick/Start into BROM/Testpoint the Device

4 BINARY 3 YA HAVE THIS FIRMWARES YA CAN USE "A125FXXS3CWE1,A125FXXS3CWF1,A125FXXS3CWF2,A125FXXS3CWF3" THESE ARE ON BINARY 3 on SamFW SamFW Website

When Ya in BROM Mode Ya Download MTKclient and install via Windows Updates last MTK USB Port Drivers or in Linux Ya dont need it!!!

so Ya have 2 Systems to do it Windows or Linux

LINUX

####################################################################################################

connect the Device

Extract correct Firmware on Binary 3,2,1 witch CSC it have is equal the Priority is thats the same Binary how Ya have Flashed/Updated before

tar -xvf AP_A125FXXS3CWF3_CL25463247_QB66219196_REV00_user_low_ship_MULTI_CERT_meta_RKEY_OS12.tar.md5

tar -xvf BL_A125FXXS3CWF3_CL25463247_QB66219196_REV00_user_low_ship_MULTI_CERT.tar.md5

tar -xvf CP_A125FXXS3CWE1_CP24266806_CL25463247_QB65558582_REV00_user_low_ship_MULTI_CERT.tar.md5

tar -xvf CSC_OXM_A125FOXM3CWF3_CL25463247_QB66239074_REV00_user_low_ship_MULTI_CERT.tar.md5

extract the LZ4

lz4 -m *.lz4

delete lz4

rm *.lz4

mkdir FIRMWARE_UNPACKED

mv *.img FIRMWARE_UNPACKED/

mv *.bin FIRMWARE_UNPACKED/

so ya have img/bin Files

move them all to Folder MTKClient witch ya exist after the next Steps

and now

apt install python3 git libusb-1.0-0 python3-pip gedit file

git clone https://github.com/bkerler/mtkclient

cd mtkclient

pip3 install -r requirements.txt

python3 setup.py build

python3 setup.py install

so Ya have Install all 4 now

now ya can check Device with

lsusb

look if Ya see MediaTek xxxxxx, when Ya see its OK

now you must Flash your Binary 3 Firmware you have extract, its equal your device starts and starts again thats happens when ya have Flashed wrong Preloader

so now ya must do every Command in single or you write a File with this commands

when Ya write a File "run.flash_all" with the commands Ya add these commands

PLEASE ADD YOUR PATH replace "G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED" with yours "/xxxx/xxx/xxx"

printgpt

w preloader G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\preloader.img --parttype=boot1

w boot G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\boot.img

w cache G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\cache.img

w dtbo G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\dtbo.img

w efuse G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\efuse.img

w md1img G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\md1img.img

w omr G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\omr.img

w optics G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\optics.img

w param G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\param.img

w prism G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\prism.img

w recovery G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\recovery.img

w tzar G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\tzar.img

w up_param G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\up_param.img

w vbmeta_samsung G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\vbmeta_samsung.img

w vbmeta G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\vbmeta.img

w lk G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\lk-verified.img

w scp1 G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\scp-verified.img

w spmfw G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\spmfw-verified.img

w sspm_1 G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\sspm-verified.img

w tee1 G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\tee-verified.img

w super G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\super.img

w userdata G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\userdata.img

reset

after that copy this "run.flash_all" to Folder MTKClient

now Disconnect your Device from USB

and run Following Command

python3 mtk script run.flash_all

Now connect your Device to USB and Ya see the Flash

wait if it Finished

it starts after Flashing Automaticly to Download-Mode and leave BROM-Mode

Device Unbricked/Repaired

when it not starts Automaticly Ya have the wrong Firmware, try Again with other FW

when Ya would Flash it with command to command Ya use this commands

PLEASE ADD YOUR PATH replace "G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED" with yours "/xxxx/xxx/xxx"

python3 mtk printgpt

python3 mtk w preloader G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\preloader.img --parttype=boot1

python3 mtk w boot G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\boot.img

python3 mtk w cache G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\cache.img

python3 mtk w dtbo G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\dtbo.img

python3 mtk w efuse G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\efuse.img

python3 mtk w md1img G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\md1img.img

python3 mtk w omr G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\omr.img

python3 mtk w optics G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\optics.img

python3 mtk w param G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\param.img

python3 mtk w prism G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\prism.img

python3 mtk w recovery G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\recovery.img

python3 mtk w tzar G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\tzar.img

python3 mtk w up_param G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\up_param.img

python3 mtk w vbmeta_samsung G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\vbmeta_samsung.img

python3 mtk w vbmeta G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\vbmeta.img

python3 mtk w lk G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\lk.img

python3 mtk w scp1 G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\scp1.img

python3 mtk w spmfw G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\spmfw.img

python3 mtk w sspm_1 G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\sspm_1.img

python3 mtk w tee1 G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\tee1.img

python3 mtk w super G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\super.img

python3 mtk w userdata G:\Android\SM-A125F\Firmware\A125FXXS3CWF3\FIRMWARE_UNPACKED\userdata.img

python3 mtk reset

The same 4 This Method after Flash its starts Automaticly to Download-Mode and exit BROM-Mode!!!!

WINDOWS

#################################################################################################

So Download MTKClient and Install via Updates MTK USB Ports Driver

if the MediaTek USB Port drivers are not working use these here USBDk Driver, PS Ya must Delete the MTK USB PORT Driver!!

its equal when your device starts again and again

Download Firmware Binary 3 equal witch CSC

extract Firmware xxxxx.tar.md5 all to Folder "FIRMWARE_UNPACKED"

extract lz4

now Ya have img/bin Files in Folder "FIRMWARE_UNPACKED"

delete lz4 Files

goto MTKClient Folder and

Download >> Python3 Download and Install it

python -m pip install -r requirements.txt

python setup.py build

python setup.py install

start mtk_gui.cmd

now disconnect device

and connect device

so MTKClient GUI detects Device and Open Menu

in Menu choose write Files

and choose from Directory, now Ya select your unpacked "FIRMWARE_UNPACKED" Folder and OK

now it have ADD all img/bin Files in Folder to Flash Automaticly

klick on Flash to Device

wait if it Finished

and Device Boots into Download-Mode and exit BROM-Mode after Finish Flash correct Firmware

EXTRA

#######################################################################

When Ya sure Ya have Flashed the correct Firmware and it not Automaticly start in Download-Mode and Exit BROM-Mode

Ya can try ONLY IN WINDOWS this OPTION to restart in Download-Mode

Download MTK META Utility MTK META UTILITY & SPFlashTools

extract it

and start MTK META Utility

choose SAMSUNG and choose Exit BROM

disconnect Device

connect Device

wait if its Restart Normaly

when not

1#

in MTK META Utility goto Android > Extras

Unpack MTK Samsung Firmware

and select Ya Firmware Directory

now ya have in the Folder a Folder FIRMWARE_UNPACKED

in this Folder are the img/bin and Scatter Files ya need!!

now Download SPFlashTools Latest

and goto MTK META Utilities > MTK > BROM

and choose "Disable Auth"

now disconnect

and connect Device

when it Finished

Ya start SPFlashTools

choose Scatter from FIRMWARE_UNPACKED

and got to OPTIONS

goto Connection

and choose UART

max BRATE 9xxxxxxxxxx

and COM Port of Device

attention after every re/dis-connect Ya must SET it again

when Ya have done it

in Flash Choose only BOOT and Flash it

the Device starts Automaticly to Download-Mode and you can Reboot your Device with VOL- and Power 7sec trying!!!

when not Ya must Do IT AGAIN beginning at "1#" or try next Option!!!

2#

when MTK META Utility wont work use Bypass_Utility_1.4.1 Download

## Usage on Windows

Skip steps 1-5 after first usage

1. Install [python](https://www.python.org/downloads)(select "Add Python X.X to PATH")

2. Install [libusb-win32](https://sourceforge.net/projects/libusb-win32/files/libusb-win32-releases/1.2.6.0/libusb-win32-devel-filter-1.2.6.0.exe/download)

3. Launch filter wizard, click next

4. Connect powered off phone with volume+ button, you should see new serial device in the list. Select it and click install

5. Install pyusb pyserial json5 with command:

```

pip install pyusb pyserial json5

```

6. Run this command and connect your powered off phone with volume+ button, you should get "Protection disabled" at the end

```

python main.py

```

7. After that, without disconnecting phone, run SP Flash Tool

## Usage on Linux

Skip steps 1-2 after first usage

To use this you need [FireISO](https://github.com/amonet-kamakiri/fireiso/releases) or [this patch](https://github.com/amonet-kamakiri/kamakiri/blob/master/kernel.patch) for your kernel

Prebuilt kernels for various distros are available [here](https://github.com/amonet-kamakiri/prebuilt-kernels)

1. Install python

2. Install pyusb, pyserial, json5 as root with command:

```

pip install pyusb pyserial json5

```

3. Run this command as root and connect your powered off phone with volume+ button, you should get "Protection disabled" at the end

```

./main.py

```

4. After that, without disconnecting phone, run SP Flash Tool in UART Connection mode

and Flash Firmware, device starts after that in Download-Mode!!!

Thats the AIO ya Must Know to bring Your Device Back to Live after all Ya have done with your Device!!!!! All wrong Firmware Flashes not bring it Back to Live!!!!!

Also your every Time can make IT!!!!

THIS 4 ALL SAMSUNG A12 DEVICES WITH MTK Chipset

AND IN THE SCREENSHOT SO MUST YOUR EXTRACT LOOKS LIKE

View attachment 5985501