Encrypted Phone, Now I Want The Encryption Gone - What To Do?

Discussion in 'Xiaomi Redmi Note 2' started by Aurielle, Mar 19, 2016.

Tags:
  1. Aurielle

    AurielleMembers

    Mar 19, 2016
    1
    0
    13
    Male
    Hello, I'm new to Xiaomi phones, got Redmi Note 2 just earlier this week. I played around a bit and encrypted the phone. This is all fine and good, but now I want the encryption gone. There is no decrypt option in settings and I have tried multiple factory resets (both through settings menu and TWRP), but the encryption still persists. I'm currently on MIUI 7.3 6.3.17 beta (xiaomi.eu). Any help is much appreciated.
     
  2. Gerard1

    Gerard1Members

    Aug 28, 2015
    16
    1
    15
    Male
    #2Gerard1,Mar 20, 2016
    Last edited: Mar 20, 2016
    Hi, I have been able to do this.

    It is not easy and I can not remember how I did it exactly.
    You need to install TWRP and Use ADB
    Give me a second, I have to go to my linux machine.

    Restart in recovery mode. when you try the instructions below it will not work. (drive in use)
    In TWRP format the drive, this will not work however the mount gets lost.
    Than it is possible to use the instructions below.


    This is from L-P (https://gist.github.com/L-P/7285035)
    Removing device encryption on a Samsung Galaxy S3 (i9300) running CyanogenMod 10.1
    I couldn't disable the full-device encryption on my phone even by doing factory resets both from Android and the recovery mode, the later being unable to mount /data. There was a lot of people complaining about this on the internet but nobody provided a working solution so I had to investigate this myself.

    Note: this will erase everything as would a factory reset do.

    I hope this bit of knowledge will be useful to you.

    TL;DR: recreate ext4 partition on /data

    1. Get ADB
    ADB can be found in the ADT bundle of the Android SDK [1] On debian-based distributions, ia32-libs needs to be installed for ADB to run. If you get a "file not found" error when running adb, run the following commands:

    $ dpkg --add-architecture i386
    $ apt-get update
    $ apt-get install ia32-libs
    [1] : http://developer.android.com/sdk/index.html

    2. Boot your device into recovery and launch ADB
    To boot the i9300 into recovery mode, turn it off and turn it on while holding the "home" and "volume up" buttons. When the "Samsung SIII" logo appears, release the buttons.

    Plug the phone to the computer via USB and run the following commands:

    $ adb usb
    $ adb root
    $ adb -d shell
    You are know in a BusyBox environment running on your phone.

    3. Obtain the partition number for USERDATA
    To get the partition number for / run parted and the parted print command:

    $ parted /dev/block/mmcblk0
    GNU Parted 1.8.8.1.179-aef3
    Using /dev/block/mmcblk0
    Welcome to GNU Parted! Type 'help' to view a list of commands.
    (parted) print
    print
    Model: MMC VTU00M (sd/mmc)
    Disk /dev/block/mmcblk0: 15.8GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt

    Number Start End Size File system Name Flags
    1 4194kB 8389kB 4194kB BOTA0
    2 8389kB 12.6MB 4194kB BOTA1
    3 12.6MB 33.6MB 21.0MB ext4 EFS
    4 33.6MB 41.9MB 8389kB PARAM
    5 41.9MB 50.3MB 8389kB BOOT
    6 50.3MB 58.7MB 8389kB RECOVERY
    7 58.7MB 92.3MB 33.6MB RADIO
    8 92.3MB 1166MB 1074MB ext4 CACHE
    9 1166MB 2777MB 1611MB ext4 SYSTEM
    10 2777MB 3364MB 587MB ext4 HIDDEN
    11 3364MB 3372MB 8389kB OTA
    12 3372MB 15.8GB 12.4GB USERDATA
    /data is partition number 12 (USERDATA) on my device. The block device is then /dev/block/mmcblk0p12.

    3. Create a new partition on /data.
    Run mke2fs -t ext4 on the block device you got at the previous step.

    $ mke2fs -t ext4 /dev/block/mmcblk0p12
    mke2fs 1.41.12 (17-May-2010)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    Stride=0 blocks, Stripe width=0 blocks
    755904 inodes, 3022848 blocks
    151142 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=3095396352
    93 block groups
    32768 blocks per group, 32768 fragments per group
    8128 inodes per group
    Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

    Writing inode tables: done
    Creating journal (32768 blocks): done
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 24 mounts or
    180 days, whichever comes first. Use tune2fs -c or -i to override.
    4. Reboot
    Reboot your device, you should see the CyanogenMod welcome/install screen instead of the Android password prompt.

    Thanks,
     

Share Our Site