[Android General] _cab13_:
This is an attempt at rooting the UMIDIGI F2. Caution be advised, we are not responsible for your mistakes; but rest assured, most of them can be corrected.

Rooting the F2

Disclaimers

This is important, please read thoughtfully.

whatever you do, never ever use SP Flash Tool in "Format All+Download" mode. This will wipe your IMEIs and some other bad stuff will happen like loss of fingerprint sensor. This cannot be reversed by us.

Once bootloader is unlocked, warranty is considered void. By following this guide, you consent to that happening. Safety net CTS will not pass anymore unless you flash Magisk which hides the unlocked bootloader.

Never relock your bootloader while running anything unofficial as the phone will not boot until you unlock again.

And, once again, a lot of bad things can happen like bootloops, if that happens to you don't freak out and reflash stock, redoing the rooting process from the start. It might be time consuming, but that's your safest bet!

More important even, have fun rooting, it's before all a hobby!

Various Resources

>>> Latest official stock ROM <<<

Minimal ADB and Fastboot by shimp208

> Magisk (and Manager) by topjohnwu <

Mediatek SP Flash Tool

Latest unofficial TWRP

Unlocking Bootloader

ATTENTION!! After unlocking the bootloader, all user data in the phone's memory will be lost, so do not forget to throw all the most important things on your computer or flash drive!

1) Activate "Developer options" through Settings > About Phone > Tap Build Number multiple times.

2) Open "Developer options" in Settings > System > Tap Advanced.

Enable "OEM Unlocking" and enter your password to confirm. Enable "USB Debugging" as well.

3) On Windows, download and install Minimal ADB and Fastboot by shimp208

On Linux, use your packet manager to install android-tools-adb and android-tools-fastboot

4) Open command prompt (Win + R > type cmd) or a terminal on linux.

5) Plug your phone, accept the prompt about adb and the PC signature.

6) Type adb reboot bootloader to reboot in fastboot mode.

THESE NEXT TWO STEPS WILL COMPLETELY WIPE YOUR DATA

7) Unlock the bootloader using fastboot flashing unlock and pressing Vol+

8) Unlock the secure partitions using fastboot flashing unlock_critical and pressing Vol+

9) Restart using fastboot reboot

You will now always see "Orange State" at boot; this is completely fine and will only delay your boot by 5 seconds.

Rooting using Magisk patched boot.img

This is "experimental" and is probably overkill, but everyone managed to install Magisk with it.

1) Clean install UMIDIGI_F2_V1.0_20200106.V3.08 with SPFT by selecting the scatter file, pressing download an rebooting the phone (Make sure it is in "Download Mode" and not "Format + Download")

2) Patch boot.img by copying it to your device, using Magisk Manager to patch it, and get back the magisk_patched.img in the Download folder back to your PC.

3) Start ADB while booted; run adb reboot bootloader. Alternative is to reboot to recovery and selecting "reboot to bootloader"

4) unlock if not already done with fastboot flashing unlock followed by fastboot flashing unlock_critical

You can try without --disable-verity --disable-verification if those commands are not recognized. I have not tested without them.

6) fastboot --disable-verity --disable-verification flash boot magisk_patched.img

7) fastboot --disable-verity --disable-verification flash recovery recovery.img (recovery.img from stock)

8) fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img (vbmeta.img from stock)

9) fastboot reboot

When rebooting, install Magisk Manager. It will prompt to finalize the installation, you can do so.

Congratulations ! You are now a proud Magisk user ! All credits goes to [MENTION=4470081]topjohnwu[/MENTION] he's the real MVP here.

Returning to stock / Resolving issues

The best way to resolve any issue is to return to stock. Here is the method.

1) Download latest stock ROM ("SPFT .zip") on UMIDIGI's forums

2) Download SP Flash Tool if you don't have it yet (Windows only)

3) Extract stock ROM in SP Flash Tool directory

4) Open SP Flash Tool, Download Tab, "Choose" in Scatter-loading file, select the scatter file in the stock ROM directory.

5) If you want to keep your data, untick "userdata" partition

6) Press Download and connect your device via USB. Reboot the phone or turn it off and everything will be flashed.

7) If you want a full stock experience, I recommend relocking the bootloader so that SafetyNet will pass. Get into fastboot mode by using adb reboot bootloader and use fastboot flashing lock_critical followed by fastboot flashing lock. This will wipe your data once more.

You should be good to go.

TWRP

Device Tree

>> Download my latest build here <<

Flash in Bootloader mode with fastboot flash recovery twrp_f2.img

Android 10 and TWRP aren't compatible yet. /system and /vendor cannot be mounted. /data partition is encrypted. You can still flash .img and some zips that alter different partitions. Nothing I can do about it.

Misc

Different boot modes

Recovery / TWRP :

Turn off the phone (or reboot)

Press Vol+ and Power until some choice comes up to you

Navigate using Vol+, select Recovery Mode using Vol-

Bootloader mode :

Boot into TWRP, select Reboot, Bootloader

Or use adb reboot bootloader either in recovery or system

Or use fastboot reboot-bootloader in fastboot mode

Magisk and EdXposed

Fixing Magisk bootloop

Two techniques that could work after installing a module that broke everything :

-----

You could also try :

Installing EdXposed

Please use the latest YAHFA or Sandhook canary build. I have a report of Xposed-SandHook-v0.4.6.1 (4504)-tdgptedc-release working.