• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[FIXED] How to remove data encryption in TWRP

Search This thread

dwapking

Senior Member
Jan 9, 2015
121
42
Lagos
Users of TWRP 3.1 on Doogee Mix (including myself) faced the mammoth problem of an encrypted storage after unlocking the bootloader and flashing the custom recovery. This problem is not peculiar to the Doogee Mix, any other device with TWRP 3.1+ will likely face the same issue and the solution preferred here would work.

By default, your device storage is encrypted (Settings > Security > Encryption) and any TWRP from 3.1+ respects that protocol.
This means that the internal storage would be showing 0mb because it can't be mounted, (no) thanks to the encryption.
Previous versions of TWRP (eg 3.0.3) could easily decrypt the device using the default password but from version 3.1, things changed.

SOLUTION
Needed:
1. An unlocked bootloader
2. TWRP installed (download from the TWRP thread)
3. An SD CARD (or USB OTG)
4. Magisk.zip (latest version, copy it to the SD card)

NOTE: Copy/Backup your files from your internal storage into your PC as this process would wipe everything from the internal storage.

STEPS
> With the bootloader unlocked and TWRP flashed, boot into recovery.
> The screen might be dark when in recovery, just press the power button and the the vol- button, it'll turn ON. Then swipe to unlock.
> You can change the language to English by clicking on the 2nd rectangle by the right above the swipe function.
> Tick "do not show again" and the swipe to allow modification.
> Confirm device encryption by clicking "Backup" or "Install", if the storage size is 0mb or no folder is showing while trying to install, then the device is encrypted.
> Go back, click "Wipe"
> You can choose to Factory reset, Format data or Advanced wipe > tick /data. Either way, it's going to wipe EVERYTHING in the internal storage (that's the purpose of device encryption, to prevent unauthorized access to the storage). However, I recommend you choose "FORMAT DATA"
> If you chose "Format data", then type yes in the next screen and swipe to format.
> When completed, go home, click Reboot and choose Recovery to boot into recovery (very important, do not reboot the phone into system otherwise you'll start all over. Reboot into recovery, not system).
> When in the recovery, click install > select storage > SD card (or USB OTG) (note that the internal storage will display as normal but remember it is now empty following the data reset)
> Navigate to the Magisk in /Sdcard (or USB OTG) and install.
> When completed, you can now reboot safely into system.
> Complete the phone setup and Open Magisk Manager. Notice that Magisk is now installed and "Preserve force encryption" is now unticked". You can also go to Settings > Security > Encryption and notice that it will ask you to encrypt your device, meaning it is decrypted now.
> The next time you will boot into recovery, TWRP may still be in Russian language, just change it one more time and you are good to go.
> Now you can flash anything you want including Xposed (download latest version from the official Xposed thread/website).


That's all. Cheers! Happy tweaking
 

Attachments

  • Screenshot_2018-02-27-08-01-16.png
    Screenshot_2018-02-27-08-01-16.png
    74.1 KB · Views: 24,230
  • Screenshot_20180227-060009.png
    Screenshot_20180227-060009.png
    62.9 KB · Views: 23,928
Last edited:

dwapking

Senior Member
Jan 9, 2015
121
42
Lagos
If you try to install font, module, busybox or any other system framework/tweak without success, then change the installation mode to recovery.

Recommended:
iFont
Busybox for Android or the busybox from Magisk Repo

iFont: switch to "My" tab > Settings > Installation mode > Recovery
Busybox for Android: tap settings (top right) > Installation mode > Recovery
 

Attachments

  • Screenshot_20180302-064047.png
    Screenshot_20180302-064047.png
    101.3 KB · Views: 6,161
  • Screenshot_20180302-064031.png
    Screenshot_20180302-064031.png
    76.6 KB · Views: 5,949
  • Screenshot_20180302-064111.png
    Screenshot_20180302-064111.png
    45.4 KB · Views: 5,752
  • Screenshot_20180302-064105.png
    Screenshot_20180302-064105.png
    53.1 KB · Views: 4,367
  • Screenshot_20180302-064130.png
    Screenshot_20180302-064130.png
    59.9 KB · Views: 4,120
  • Screenshot_20180302-064151.png
    Screenshot_20180302-064151.png
    58.6 KB · Views: 4,168
  • Screenshot_20180302-064208.png
    Screenshot_20180302-064208.png
    121.1 KB · Views: 4,069
  • Like
Reactions: apaxtc and dralokyn

TheSpartanM4

New member
Oct 5, 2013
2
1
I love you broo!!

I was like 5 hours with this encryption problem without being able to solve it, Thank you very much. I LOVE YOU! Hahaha :good::victory::victory::fingers-crossed:
 
  • Like
Reactions: cb65

Ersid Kapaj

Senior Member
Mar 11, 2017
64
10
If you try to install font, module, busybox or any other system framework/tweak without success, then change the installation mode to recovery.

Recommended:
iFont
Busybox for Android or the busybox from Magisk Repo

iFont: switch to "My" tab > Settings > Installation mode > Recovery
Busybox for Android: tap settings (top right) > Installation mode > Recovery

How to you get OTA update when you are rooted? I can't
 

mrmazak

Senior Member
Jun 16, 2013
3,219
1,329
If you try to install font, module, busybox or any other system framework/tweak without success, then change the installation mode to recovery.

Recommended:
iFont
Busybox for Android or the busybox from Magisk Repo

iFont: switch to "My" tab > Settings > Installation mode > Recovery
Busybox for Android: tap settings (top right) > Installation mode > Recovery

Your screenshot of the about phone page, shows you are on kernel 3.18, thought device had kernel 4.4?
 

dwapking

Senior Member
Jan 9, 2015
121
42
Lagos
How to you get OTA update when you are rooted? I can't
Being rooted shouldn't prevent you from getting the OTA.
OTA's arrive based on System language, region, model/variant, etc.
If you still can't get the OTA and your language is set to "English (US or UK)", then download the latest flashable ROM and flash via PC. It should help for subsequent OTA's.
If you have done this before and still stuck, then just download the local update file and install.
 

Ersid Kapaj

Senior Member
Mar 11, 2017
64
10
Being rooted shouldn't prevent you from getting the OTA.
OTA's arrive based on System language, region, model/variant, etc.
If you still can't get the OTA and your language is set to "English (US or UK)", then download the latest flashable ROM and flash via PC. It should help for subsequent OTA's.
If you have done this before and still stuck, then just download the local update file and install.

That's the problem. When i click check for update it says "Root detected" and then it says that my system is up to date. I don't want to delete anything from my phone, that's why i don't do it via PC.
 

dwapking

Senior Member
Jan 9, 2015
121
42
Lagos
That's the problem. When i click check for update it says "Root detected" and then it says that my system is up to date. I don't want to delete anything from my phone, that's why i don't do it via PC.
I have root, and I don't get any such errors when I check for updates. Perhaps you should just backup ur apps/OS (with TB & TWRP) and files in a PC then flash a clean updated ROM.
 

Attachments

  • Screenshot_20180302-212229.png
    Screenshot_20180302-212229.png
    52.7 KB · Views: 1,390
  • Screenshot_20180302-212252.png
    Screenshot_20180302-212252.png
    70.2 KB · Views: 1,380

dwapking

Senior Member
Jan 9, 2015
121
42
Lagos
have another problem witch F2SF I cant flash any modules in magisk

Magisk.img mount failed do you have this problem?
Yes... Some modules (Viper4Android, Busybox NDK) did flash successfully (though not mounted in Magisk modules section but are working just fine) while many others refused to install.
I am currently trying to verify the cause. For now, no solution yet.
 

Ersid Kapaj

Senior Member
Mar 11, 2017
64
10
I have root, and I don't get any such errors when I check for updates. Perhaps you should just backup ur apps/OS (with TB & TWRP) and files in a PC then flash a clean updated ROM.

I have downloaded the update once but when i try to install it says the it's rooted and can't install. Since then it's the same problem.
 

Attachments

  • Screenshot_20180303-055613.png
    Screenshot_20180303-055613.png
    53.7 KB · Views: 602

dwapking

Senior Member
Jan 9, 2015
121
42
Lagos
Yes of course, before any update is installed, root integrity check is performed. Once any modifications has been detected, it will abort.
That's why I said you should flash back your STOCK SYSTEM, RECOVERY AND BOOT, since they're the partitions affected by the root.
Don't forget to wipe the data of "Wireless Update" before proceeding to install.
 

dralokyn

Member
Jan 4, 2015
8
1
Portland, OR
I got it to work! I have TWRP installed, I have Magisk working, and Safetynet check passes. I can't post screenshots because I don't have enough posts, but I suppose I have root now! ...it's not nearly as exciting on a non-bloated phone with no available roms. But I think we're maybe ready to say we officially have root? I can't learn coding or I'd try to make my own rom.
 

Fstop

Senior Member
Apr 18, 2015
122
12
Doogee Mix only reboots to Doogee Splash which warns: Orange State
Your device has been unlocked and can't be trusted. YOur device will boot in 5 seconds. Then TWRP boots in English instead of Russian. Thats all I get. Is there a custom ROM for Doogee Mix? Did I wiped the OS? Thank you for getting me out off the Encryption - loop.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Users of TWRP 3.1 on Doogee Mix (including myself) faced the mammoth problem of an encrypted storage after unlocking the bootloader and flashing the custom recovery. This problem is not peculiar to the Doogee Mix, any other device with TWRP 3.1+ will likely face the same issue and the solution preferred here would work.

    By default, your device storage is encrypted (Settings > Security > Encryption) and any TWRP from 3.1+ respects that protocol.
    This means that the internal storage would be showing 0mb because it can't be mounted, (no) thanks to the encryption.
    Previous versions of TWRP (eg 3.0.3) could easily decrypt the device using the default password but from version 3.1, things changed.

    SOLUTION
    Needed:
    1. An unlocked bootloader
    2. TWRP installed (download from the TWRP thread)
    3. An SD CARD (or USB OTG)
    4. Magisk.zip (latest version, copy it to the SD card)

    NOTE: Copy/Backup your files from your internal storage into your PC as this process would wipe everything from the internal storage.

    STEPS
    > With the bootloader unlocked and TWRP flashed, boot into recovery.
    > The screen might be dark when in recovery, just press the power button and the the vol- button, it'll turn ON. Then swipe to unlock.
    > You can change the language to English by clicking on the 2nd rectangle by the right above the swipe function.
    > Tick "do not show again" and the swipe to allow modification.
    > Confirm device encryption by clicking "Backup" or "Install", if the storage size is 0mb or no folder is showing while trying to install, then the device is encrypted.
    > Go back, click "Wipe"
    > You can choose to Factory reset, Format data or Advanced wipe > tick /data. Either way, it's going to wipe EVERYTHING in the internal storage (that's the purpose of device encryption, to prevent unauthorized access to the storage). However, I recommend you choose "FORMAT DATA"
    > If you chose "Format data", then type yes in the next screen and swipe to format.
    > When completed, go home, click Reboot and choose Recovery to boot into recovery (very important, do not reboot the phone into system otherwise you'll start all over. Reboot into recovery, not system).
    > When in the recovery, click install > select storage > SD card (or USB OTG) (note that the internal storage will display as normal but remember it is now empty following the data reset)
    > Navigate to the Magisk in /Sdcard (or USB OTG) and install.
    > When completed, you can now reboot safely into system.
    > Complete the phone setup and Open Magisk Manager. Notice that Magisk is now installed and "Preserve force encryption" is now unticked". You can also go to Settings > Security > Encryption and notice that it will ask you to encrypt your device, meaning it is decrypted now.
    > The next time you will boot into recovery, TWRP may still be in Russian language, just change it one more time and you are good to go.
    > Now you can flash anything you want including Xposed (download latest version from the official Xposed thread/website).


    That's all. Cheers! Happy tweaking
    2
    If you try to install font, module, busybox or any other system framework/tweak without success, then change the installation mode to recovery.

    Recommended:
    iFont
    Busybox for Android or the busybox from Magisk Repo

    iFont: switch to "My" tab > Settings > Installation mode > Recovery
    Busybox for Android: tap settings (top right) > Installation mode > Recovery
    2
    If you already have this setup (unlocked bootloader + secured startup), you could try to boot into twrp and see what happens.
    If you don't have this, then I'm not sure I can give you a reliable answer as I've not tried that before. A

    Ok, i got my answer.
    Yes, anyone can flash twrp via fastboot if bootloader is unlocked.
    Now, twrp versions below 3.1 decrypted user data with "default_password" if userdata was encrypted but secure boot was disabled (this is so because until the lock screen password has been set as password at boot, android uses default_password as masterkey to the main decryption key).
    Twrp 3.1 and later versions started respecting this encryption and did not mount the encrypted partitions.
    But if secure boot is enabled any twrp version would ask for password when booting into it and being unable to do so twrp cant mount the encrypted partitions.

    For the second question.....
    Although, adb would work in twrp but since encrypted partitions can't be mounted, push/pull wont work with encrypted data.
    2
    Hi dear, what does you think about the following (backup data but media through ftp; format data through twrp; restore data content through adb):

    - start the phone in safe mode
    - activate an ftp server on the phone (over the wireless lan interface)
    - backup the data partition on Windows pc (every files&folders except media - twrp data formatting always wipes everything but the media folder)
    - restart the phone in recovery mode; format data and reboot to recovery: from now TWRP can access the data folder as unencrypted
    - while in recovery mode connect to the phone through adb from the Windows pc and push data content back to the phone
    - reboot the phone with all the original data content, however unencrypted now

    Regards
    Gian
    1
    I love you broo!!

    I was like 5 hours with this encryption problem without being able to solve it, Thank you very much. I LOVE YOU! Hahaha :good::victory::victory::fingers-crossed: