0

I know that unlocking bootloader does wipe the /data partition. However, can it also wipe the /storage partition and others, too?

  • It wipes all data on the internal storage... Data on an SD card setup as portable/external storage is not touched in most cases, it is recommended to remove an SD card prior to unlocking the bootloader just in case though. – acejavelin Aug 24 '17 at 20:36
  • So your answer is: It wipes 100% of the phone? – user167294 Aug 24 '17 at 20:37
  • Yes, all user data, apps, music, pictures, videos, etc... unless they are stored on an SD card configured as portable storage. It will essentially be as "blank" as the day it came out of the box from the manufacturer, except as noted. – acejavelin Aug 24 '17 at 20:38
  • Then, after unlocking, relocking is possible? – user167294 Aug 24 '17 at 20:40
  • Nexus, Pixel, or OnePlus... yes... Otherwise it depends on the device, some can and some can't be, but they all have a "flag" of somekind to indicate it was once unlocked. For example, in Moto devices they have a Bootloader Status number, it is 0 when locked, but if relocked becomes 2, and it can not be set back to 0 ever. – acejavelin Aug 24 '17 at 20:43
0

It wipes the complete storage when the bootloader has never been unlocked. If it has been unlocked it just wipes /data as far as I have experienced this on my oneplus x. (Onyx)

  • I m thinking about LG, not 1+. Still I don't have any 1+ phones either. – user167294 Aug 24 '17 at 20:46
  • @user167294 should be the same, but Im not 100% sure – Booming Aug 24 '17 at 20:47
  • fastboot oem lock is only supported on a handful of devices, many devices use a specific process that requires flashing a signed image. – acejavelin Aug 24 '17 at 20:51
  • Ok, I will remove it then. – Booming Aug 24 '17 at 20:52
  • 1
    What do you mean for "complete storage"? – Death Mask Salesman Aug 24 '17 at 21:15
0

There is nothing like storage partition. What you see under /storage/emulated is a FUSE implementation of /data/media/userID. Whenever you unlock or relock the bootloader, fastboot causes factory reset of the device which wipes data and cache partitions. No bit of data escapes it, including what you see under /storage.

Source:

printf("oem unlock requested:\n");
printf("\tUnlocking forces a factory reset and could\n");
printf("\topen your device up to a world of hurt.  If you\n");
printf("\tare sure you know what you're doing, then accept\n");
printf("\tin %d seconds via 'fastboot oem unlock_accept'.\n",
  • Think of it that way: whichever partition accumulated user generated data gets to be wiped. They mostly include data and cache partition under normal circumstances (no deliberate tampering that is). – Firelord Aug 24 '17 at 22:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.