Installing LineageOS on the Galaxy M12 (or other 850 devices)

Installing LineageOS on the Galaxy M12 (or other 850 devices)

by A2L5E0X1

Before you start doing any modifications to your device, read these notes:

  • First, READ THE COMPLETE GUIDE before you do any modifications to your device!
  • Make sure your device is supported by the ROM, never flash a build which isn't designed for your device!
  • Unlocking the bootloader and installing this ROM will require a factory reset, so make sure you have a backup of your important stuff and internal storage! For your apps I can recommend Migrate which has worked very well for me on Android 11 and 12!
  • Unlocking the bootloader on your device will void the warranty and trip Knox which might breaks some features on the Samsung ROM!
  • Make sure you are on the recommended firmware, see Download Page and Release in the Telegram channel!
  • If you need any help, you can always ask in our Telegram group, join it using this link
  • TWRP is COMPLETELY UNSUPPORTED by us! If you face any issues while using TWRP, your bug reports will be REJECTED!
  • If you have ever used TWRP, we STRONGLY RECOMMEND YOU TO REFLASH STOCK (AP, BL, CP, CSC) USING ODIN SINCE WE'VE HEARD THAT IT CAUSED A LOT OF WEIRD ISSUES SUCH AS "Try again in 1425 minutes" AND NO LONGER BEING ABLE TO SET A PIN ON STOCK AND LINEAGE, just to make sure nothing can go wrong when using lineage!
  • Decrypting data is NOT RECOMMENDED and also NOT SUPPORTED by us since it's a BIG SECURITY HOLE for thieves and hackers! You won't get any support by us either if you've decrypted the data partition!
  • If you have unlocked your bootloader already and used some other modifications (such as GSIs, TWRP, etc.), you can just continue to Flashing lineage recovery, or if you want to make sure nothing can go wrong, you can reflash the Stock ROM first! If you were doing this, you can continue to After the device is booted up again (this can take some time), remove the... in the Unlock Bootloader section!

Alright, let's begin. Here I have my Galaxy M12 on the correct stock ROM:

A Galaxy M12 running OneUI Core 3

First of all, remove all your fingerprints if there are any, to avoid issues with fingerprint on LineageOS. If your bootloader is already unlocked, you can skip to "Flashing lineage recovery".

Unlocking the bootloader

Connect to a wifi network, enable developer options, and tick OEM unlocking. If this option doesn't exist yet, disable Automatic Date and Time, set the date 1 year back and reboot the phone!

Enable OEM unlocking option

Then, reboot the phone to Download Mode by powering it off, holding both volume buttons and connect the device to your PC. On the warning screen, hold volume up to get into "Device Unlock Mode".

The warning screen of the Download Mode
The "Device unlock mode" of the Download Mode

To confirm the unlock, press volume up. The device will factory reset afterwards and wait until it's booted up again!

The bootloader unlock warning
Stock recovery doing a factory reset

After the device is booted up again (this can take some time), remove the sim card, skip everything in setup and don't connect to wifi yet!! After the setup is passed, connect to wifi again, enable the developer options and make sure OEM unlock shows up, grayed out and saying Bootloader is already unlocked. If it doesn't yet, try to close Settings from recents and enter settings again. If it still doesn't show, you can also try to check for updates before or reflash your firmware. If those aren't helping either, you probably did something wrong.

It should look like this when you've done everything correctly.

Now we can flash custom images, so time to flash lineage recovery!

Flashing lineage recovery

Get the latest recovery build from here (use this if the link is broken)

Windows users (Odin):

Download Odin here and Samsung USB drivers here. Meanwhile, take the recovery.img and pack it into a .tar using 7-Zip.

Rename the recovery build to "recovery.img", install 7-Zip, right-click/7-Zip/Add to archive...
Select "tar" and press "OK"

After compressing the image, open Odin and select the recovery.tar in AP slot and flash it using Download Mode. After it finished, IMMEDIATELY hold volup and power until you can see the recovery, else Stock ROM will override the recovery and you have to flash it again!

Odin 3.14.4

Mac/Linux users (heimdall):

Install heimdall on your PC, download the latest recovery build from here (use this if the link is broken). Enter download mode and run the command:

heimdall flash --RECOVERY lineage-19.1-2022xxxx-recovery-m12.img
Flashing the lineage recovery using heimdall on Linux

After it finished, IMMEDIATELY hold volup and power until you can see the recovery, else Stock ROM will override the recovery and you have to flash it again!

Installing the ROM

Get the latest build from here (use this if the link is broken).

After you've booted into lineage recovery, do a factory reset!

Lineage Recovery on the M12

To perform a factory reset, press Factory reset/"Format data/factory reset"/Format data. ALL YOUR USERDATA INCLUDING YOUR INTERNAL STORAGE WILL BE ERASED! Then, install the rom using adb sideload! Press Apply Update/Apply from ADB and flash the ROM using the command:

adb sideload lineage-19.1-2022xxxx-UNOFFICIAL-m12.zip

The flashing process will take some time, so please be patient!

Flashing the rom using lineage recovery

After the rom is successfully flashed, you can install other addons (Google Apps, Magisk/Lygisk, etc.) using sideload as well. For gapps, we recommend MindTheGapps (use 12.1 arm64 for 19.1) and for root use Lygisk (Magisk with working addon.d on FBE encrypted data partition, use "Stable" or "Beta") If you are getting errors about "signature verification failed", just press "Yes" to install them anyways.

Flashing a 3rd party add-on

After everything is flashed, you can reboot to the system and lineage should boot up! Enjoy!

The Galaxy M12 running LineageOS 19.1, well done!

As I've already mentioned above, if you need any help you can ask in our Telegram group. This ROM has unofficial OTA updates, so you can receive new builds using the Lineage Updater! Have fun using our ROM and hope you enjoy it!

Report Page