Restore Internal Memory of Galaxy Nexus after Bootloader Unlock Wipe [Tutorial]
Galaxy Nexus Google

Unlocking a bootloader normally wipes the data partition in a Nexus device. It is possible for users to root a device without unlocking the bootloader but this is a tedious process. Therefore, if the easiest way to root the Nexus is by unlocking the bootloader, it would be useful if there were also a method to recover data after it has been wiped. Fortunately, XDA forum member Wartickler has a solution.

This method allows for the scanning of drives and recovery of wiped data. The accompanying post indicates it is compatible with any device that has an internal SD card.

Follow this tutorial to recover wiped data. IBTimes UK warns its readers it will not be held responsible for any damage to the device while following this process.

Requirements

    • Ensure BusyBox is installed on Android device
    • Enable USB debugging and install a recovery tool, such as the Piriform Recuva app

Procedure to Restore Internal Memory of Galaxy Nexus

    • Identify the block or partition to recover
    • Turn the device on and connect in ADB mode
    • Unlock the screen, open the Cygwin terminal and enter the following commands
        • adb forward tcp:5555 tcp:5555
        • adb shell
        • /system/bin/busybox nc -1 -p 5555 -e /system/bin/busybox dd if=/ dev/block/mmcblk0p12
    • Open another terminal and enter the following commands
        • adb forward tcp:5555 tcp:5555
        • cd /nexus
        • nc 127.0.0.1 5555 | pv -i 0.5 > mmcblk0p12.raw
    • Convert the .RAW file to a virtual hard disk using VhdTool (to do so, type the following in Windows command prompt)
        • VhdTool.exe /convert mmcblk0p12.raw
    • Mount the VHD in Windows and browse to Start > right-click on Computer > Manage > Storage > Disk Management
    • In Menu, choose Action > Attach VHD
    • Enter c:cygwinnexusmmcblk0p12.raw and select OK
    • Choose GPT option and select OK
    • Right-click on Unallocated Space and choose New Simple Volume option
    • In the Wizard, choose Next, leave default value for the volume size and once again choose Next > Select the drive. Again, choose Next and select the Do not Format this Volume option and select Finish
    • Right-click on the RAW space and choose Format but ensure file system is changed to FAT32. Ensure the allocation unit size is set to default and Perform a Quick Format option is checked
    • Open the Piriform Recuva app. In the Wizard, choose Next > Other Option > Next > In a Specific Location Option > enter drive > choose Next > choose Enable Deep Scan option > Start
    • Once the app is applied, choose the files to recover by choosing the Recover option and then select the convenient location to obtain the files

[Source: XDA Developers' Forum]