[UNOFFICIAL][DECRYPTION WORKS] TWRP 3.3.1 for UMIDIGI F1 [20191103]

Search This thread

PeterCxy

Senior Member
Jul 15, 2013
296
867
Introduction

This is an UNOFFICIAL TWRP port for UMIDIGI F1 that works properly with encrypted /data partition in official ROM. I am aware that the UMIDIGI F1 already has TWRP built for it, but none of them seem to have decryption working properly. In fact, every single TWRP, even official ones, for any MT6771 device, seem to have non-functional decryption support. Through some digging I managed to fix decryption at least for UMIDIGI F1, so here is my version of TWRP for the device.

Known Bugs

- Screen may flash on the password-input UI. Anything else is fine though.

This TWRP has been tested with official ROM and my LineageOS 17 port (https://forum.xda-developers.com/android/development/unofficial-lineageos-17-0-umidigi-f1-t3997827) and it works fine.

This is UNTESTED on the F1 Play. ONLY TESTED on regular F1.

Why Bother

Because security matters. Using a cheap device should not mean giving up security, and more importantly, privacy.

Instructions

1. Unlock bootloader
2. Enable ADB debugging in system
3. Execute "adb reboot bootloader" while having your phone connected to PC
4. Execute "fastboot flash recovery <your_downloaded_recovery>.img"
5. Reboot phone while holding Volume Up + Power buttons

Note: The official ROM may overwrite the recovery, so you may need to re-flash the recovery if this behavior isn't prevented either by TWRP or manually.

Downlaods & Sources

20191103: https://github.com/PeterCxy/android_device_umidigi_F1/releases/tag/20191103-twrp
- Fixed issues with Magisk and OpenGAPPS

20191102: https://github.com/PeterCxy/android_device_umidigi_F1/releases/tag/20191102-twrp

Device Tree: https://github.com/PeterCxy/android_device_umidigi_F1/tree/twrp-9.0
Modified TWRP (Required for decryption to work): https://github.com/PeterCxy/android_bootable_recovery
 
Last edited:

mrmazak

Senior Member
Jun 16, 2013
3,258
1,341
Blu Vivo XL
BLU R1 HD
I appreciate your sharing this. I have added "system_image emmc" to the fstab file, so I can flash and backup the system.img

This works good on my F1,

But I tried to make this decrypt work for my other phone with 6771(Bold N1), but couldn't find all same files added to recovery/root from stock firmware.
 
Last edited:

PeterCxy

Senior Member
Jul 15, 2013
296
867
I appreciate your sharing this. I have added "system_image emmc" to the fstab file, so I can flash and backup the system.img

This works good on my F1,

But I tried to make this decrypt work for my other phone with 6771(Bold N1), but couldn't find all same files added to recovery/root from stock firmware.

Those files are extracted from vendor.img, but it can be different on different devices, e.g. keymaster version might be different. Also you will need to patch them using `patchelf` to make them use `/sbin/linker64` instead of `/system/bin/linker64`
 
  • Like
Reactions: mrmazak

Quitério

New member
Dec 15, 2019
1
0
I am unable to install twrp.
When I run the "fasthboot flash recovery" command, cmd aparace "waiting for de ice" and nothing happens on my phone ...
Am I doing something wrong?
 

tarvoke

Senior Member
Mar 8, 2011
161
50
Slightly Outside America
no fastboot response

for some reason (most likely pilot error, lol) the phone doesn't show when I do "fastboot devices" - even though the F1's screen shows "fastboot mode" in very tiny letters on the bottom-left.

probably something stupid I'm doing wrong, will keep trying...
 

SubwayChamp

Senior Member
Aug 6, 2016
4,196
4
1,668
for some reason (most likely pilot error, lol) the phone doesn't show when I do "fastboot devices" - even though the F1's screen shows "fastboot mode" in very tiny letters on the bottom-left.

probably something stupid I'm doing wrong, will keep trying...

You can operate from adb/fastboot folder and device can stay on fastboot mode but if drivers were not properly installed then no connection with pc.

Try installing:
- https://androidmtk.com/download-15-seconds-adb-installer
- https://androidmtk.com/download-mtk-usb-all-drivers
- https://www.androidweblog.com/download-mediatek-usb-vcom-drivers/

Start the process from device on using adb commands to always allow access to the pc. I mean:
Code:
adb devices
and then if device is detected you will see a screen warning to "always allow...." then tap on yes; this suppress future conflicts, then
Code:
adb reboot bootloader
while on fastboot follow with
Code:
fastboot devices
 
  • Like
Reactions: tarvoke

tarvoke

Senior Member
Mar 8, 2011
161
50
Slightly Outside America
You can operate from adb/fastboot folder and device can stay on fastboot mode but if drivers were not properly installed then no connection with pc.

thanks!

adb was already working (is how I made the thing reboot to bootloader, and yes I did tell it to permanently accept the computer I'm using.

this is on linux, so the drivers shouldn't be a problem... although SMH I never put USB IDs into the udev rules. which is interesting, because regular adb already worked fine without it - I have had phones in the past that some did, some did not, require the computer to know about vendor/hardware ID.
(and I know that the adb USB IDs are usually different than the ID for fastboot, as well.)

like I said, pilot error lol. but thank you again for the reply!
 
  • Like
Reactions: SubwayChamp

opticyclic

Senior Member
Nov 15, 2012
192
49
I have done the following:
  • Enabled Developer Options
  • Enabled USB Debugging
  • Enabled OEM Unlocking

Unlocked the bootloader with:
Code:
adb reboot bootloader
fastboot flashing unlock

Rebooted and Enabled USB Debugging again.

Then after downloading your recovery
Code:
adb reboot bootloader
fastboot boot ~/Downloads/recovery.img

But nothing happened.

I rebooted and thought I would try flashing

Code:
adb reboot bootloader
fastboot flash recovery ~/Downloads/recovery.img

It just paused on the boot screen saying "Your device has been unlocked and can't be trusted".

If I reboot then try to go direct to recovery:
Code:
adb reboot recovery

I end up with the broken android screen and "No command"

What am I missing?
 

SubwayChamp

Senior Member
Aug 6, 2016
4,196
4
1,668
I have done the following:
  • Enabled Developer Options
  • Enabled USB Debugging
  • Enabled OEM Unlocking

Unlocked the bootloader with:
Code:
adb reboot bootloader
fastboot flashing unlock

Rebooted and Enabled USB Debugging again.

Then after downloading your recovery
Code:
adb reboot bootloader
fastboot boot ~/Downloads/recovery.img

But nothing happened.

I rebooted and thought I would try flashing

Code:
adb reboot bootloader
fastboot flash recovery ~/Downloads/recovery.img

It just paused on the boot screen saying "Your device has been unlocked and can't be trusted".

If I reboot then try to go direct to recovery:
Code:
adb reboot recovery

I end up with the broken android screen and "No command"

What am I missing?

While in fastboot the first you should do is see if device is detected by pc with
Code:
fastboot devices
It looks like something is wrong with your path, I ever avoid path copying or moving the file/image to the adb/fastboot directory but anyway if you don´t want to do it you can copy the path from the bar where your recovery file is allocated, for example, if the file is in Downloads directory like it seems actually is, no matter what unit/drive you are in you can set an absolute value to avoid errors, look at this example: C:\Users\your_user\Downloads

If your device is detected then you can flash the recovery as you were trying to do it with
Code:
fastboot flash recovery recovery.img
and then you can reboot directly to it without need to reboot to system previously and this will prevent TWRP from being overwritten, with
Code:
fastboot boot recovery.img
 
  • Like
Reactions: tarvoke

tarvoke

Senior Member
Mar 8, 2011
161
50
Slightly Outside America
hmm, so when I checked the udev rules, it already had one for MTK/mediatek - and the USB vendor is '08ed' in fastboot as well as in regular adb, so it wasn't a problem with udev/plugdev.

which I guess may mean the lunix generic android drivers for fastboot might be... "lacking" - I'll have to scrounge up a win7 laptop and try the recommended windows drivers.
 

opticyclic

Senior Member
Nov 15, 2012
192
49
...
It looks like something is wrong with your path, I ever avoid path copying or moving the file/image to the adb/fastboot directory but anyway if you don´t want to do it you can copy the path from the bar where your recovery file is allocated, for example, if the file is in Downloads directory like it seems actually is, no matter what unit/drive you are in you can set an absolute value to avoid errors, look at this example: C:\Users\your_user\Downloads
...

I don't think it was anything to do with the path as it output the file transfer size.

I think it was a combination of the following:

I wasn't pressing the right combinations of buttons after flashing.
i.e. holding VOL UP and pressing POWER on the screen saying "Your device has been unlocked and can't be trusted".
Rebooting might (?) have been reverting the recovery.
I was originally trying this on the firmware that was shipped 2019012414 but after flashing 2019090418 with SPFlashTool I had more success.

I also able to reboot to recovery directly after flashing with fastboot with the following:
Code:
fastboot oem reboot-recovery

Whichever was the key I can now reboot to recovery from adb too.

:good:
 
  • Like
Reactions: Oblias

LyrielAlk

New member
Jan 21, 2020
3
0
Your twrp eliminates fingerprint authentication.

I discovered something interesting, your twrp only works on my device, no other twrp works, but when I install it, I lose my fingerprint, it doesn't work at all.
Simply put, I must choose between the fingerprint or the root.
 

BZ0RG

Senior Member
Jan 28, 2018
58
18
No other twrp works, but when I install it, I lose my fingerprint, it doesn't work at all.
Simply put, I must choose between the fingerprint or the root.
Try to clean flash last vendor build with spflash tool. First boot need stock recovery.
You don't need custom recovery to achieve root.

Maybe give a try to SNwriter (I never needed it though and can't help here).
 

mrjahvi

Senior Member
Dec 24, 2012
63
3
Both of those twrp are not sticking. I have flashed with spoken flash tool v5 1944 win and I fastboot cmd with the same results.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    Introduction

    This is an UNOFFICIAL TWRP port for UMIDIGI F1 that works properly with encrypted /data partition in official ROM. I am aware that the UMIDIGI F1 already has TWRP built for it, but none of them seem to have decryption working properly. In fact, every single TWRP, even official ones, for any MT6771 device, seem to have non-functional decryption support. Through some digging I managed to fix decryption at least for UMIDIGI F1, so here is my version of TWRP for the device.

    Known Bugs

    - Screen may flash on the password-input UI. Anything else is fine though.

    This TWRP has been tested with official ROM and my LineageOS 17 port (https://forum.xda-developers.com/android/development/unofficial-lineageos-17-0-umidigi-f1-t3997827) and it works fine.

    This is UNTESTED on the F1 Play. ONLY TESTED on regular F1.

    Why Bother

    Because security matters. Using a cheap device should not mean giving up security, and more importantly, privacy.

    Instructions

    1. Unlock bootloader
    2. Enable ADB debugging in system
    3. Execute "adb reboot bootloader" while having your phone connected to PC
    4. Execute "fastboot flash recovery <your_downloaded_recovery>.img"
    5. Reboot phone while holding Volume Up + Power buttons

    Note: The official ROM may overwrite the recovery, so you may need to re-flash the recovery if this behavior isn't prevented either by TWRP or manually.

    Downlaods & Sources

    20191103: https://github.com/PeterCxy/android_device_umidigi_F1/releases/tag/20191103-twrp
    - Fixed issues with Magisk and OpenGAPPS

    20191102: https://github.com/PeterCxy/android_device_umidigi_F1/releases/tag/20191102-twrp

    Device Tree: https://github.com/PeterCxy/android_device_umidigi_F1/tree/twrp-9.0
    Modified TWRP (Required for decryption to work): https://github.com/PeterCxy/android_bootable_recovery
    1
    Updated to 20191103
    1
    I appreciate your sharing this. I have added "system_image emmc" to the fstab file, so I can flash and backup the system.img

    This works good on my F1,

    But I tried to make this decrypt work for my other phone with 6771(Bold N1), but couldn't find all same files added to recovery/root from stock firmware.

    Those files are extracted from vendor.img, but it can be different on different devices, e.g. keymaster version might be different. Also you will need to patch them using `patchelf` to make them use `/sbin/linker64` instead of `/system/bin/linker64`
    1
    for some reason (most likely pilot error, lol) the phone doesn't show when I do "fastboot devices" - even though the F1's screen shows "fastboot mode" in very tiny letters on the bottom-left.

    probably something stupid I'm doing wrong, will keep trying...

    You can operate from adb/fastboot folder and device can stay on fastboot mode but if drivers were not properly installed then no connection with pc.

    Try installing:
    - https://androidmtk.com/download-15-seconds-adb-installer
    - https://androidmtk.com/download-mtk-usb-all-drivers
    - https://www.androidweblog.com/download-mediatek-usb-vcom-drivers/

    Start the process from device on using adb commands to always allow access to the pc. I mean:
    Code:
    adb devices
    and then if device is detected you will see a screen warning to "always allow...." then tap on yes; this suppress future conflicts, then
    Code:
    adb reboot bootloader
    while on fastboot follow with
    Code:
    fastboot devices
    1
    You can operate from adb/fastboot folder and device can stay on fastboot mode but if drivers were not properly installed then no connection with pc.

    thanks!

    adb was already working (is how I made the thing reboot to bootloader, and yes I did tell it to permanently accept the computer I'm using.

    this is on linux, so the drivers shouldn't be a problem... although SMH I never put USB IDs into the udev rules. which is interesting, because regular adb already worked fine without it - I have had phones in the past that some did, some did not, require the computer to know about vendor/hardware ID.
    (and I know that the adb USB IDs are usually different than the ID for fastboot, as well.)

    like I said, pilot error lol. but thank you again for the reply!