Friday, December 26, 2014

Nexus 7 stuck in a boot loop


I have a two-week-old Google/Asus Nexus 7 tablet, unrooted and otherwise standard.


Yesterday it ran out of charge a lot faster than it usually does, and wouldn't seem to recharge. When it finally ran completely out of juice it shut down.


Now when I turn it on, it gets stuck in an endless boot loop. I contacted Google's support and they're looking to send out a new item. However if I go that road, I'll lose the data on there.



Has anyone experienced this issue? Is there anything else I could try? Thanks!



Answer



(EDIT)
This answer is only really helpful for unlocked tablets.. Look after this paragraph if that is already the case. Otherwise read on.


"fastboot oem unlock" also does a factory reset, you need to have it unlocked before you need it, alas. This is both good for privacy and bad for recovery from half-bricked devices... The factory reset does In fact a secure erase which nullifies all your data.


According to Android: Building for devices:



$ fastboot oem unlock The procedure must be confirmed on-screen, and deletes the user data for privacy reasons. It only needs to be run once.



$ fastboot boot recovery-clockwork-6.0.1.0-grouper.img 

downloading 'boot.img'...
FAILED (remote: Bootloader is locked.)
finished. total time: 0.020s
$ fastboot oem unlock
...
(bootloader) erasing userdata...
(bootloader) erasing userdata done
(bootloader) erasing cache...
(bootloader) erasing cache done
(bootloader) unlocking...

(bootloader) Bootloader is unlocked now.
OKAY [ 12.704s]
finished. total time: 12.704s
$ fastboot flash recovery recovery-clockwork-6.0.1.0-grouper.img
sending 'recovery' (6480 KB)...
OKAY [ 0.785s]
writing 'recovery'...
OKAY [ 0.225s]
finished. total time: 1.010s
# after that boot into the recovery (don't boot normal! it overwrites valuable data...)

$ adb shell cat /dev/block/platform/sdhci-tegra.3/by-name/UDA \| gzip -1 -c \| uuencode bla | uudecode -o - | gunzip -dc | bar > /media/qnap/backup/n7.data.formatted.img

(END EDIT)


You can boot a temporary custom recovery and create a backup of your device.


It should also be possible to wipe it afterwards and recover from your problem without having to send it back at all (provided it's not a hardware issue).


Steps:



  • install the SDK (if not already done) and have working adb + fastboot executables ready

  • Download a CWM recovery image from here

  • unlock your Nexus 7's bootloader: fastboot oem unlock

    Here's how to enter the fastboot mode (the Nexus 7's codename is grouper): Press Power for a second, and press Volume Down when the bootloader logo appears

  • boot into a temporary CWM recovery: fastboot boot recovery-clockwork-6.0.1.0-grouper.img

  • Create a nandroid/CWM backup from your broken installation (backup&restore->backup)

    • after the backup is complete, try to pull all data from your device:
      adb shell mount (should list something like /dev/block/mmcblk0p1 on /sdcard or so (not really sure however)
      adb pull /sdcard backup/ (replace /sdcard with the above noticed directory, this should extract all your data to backup/) check if everything is transmitted correctly)

    • you can buy TitaniumBackup+ProKey afterwards (it allows extracting data from Nandroid backups quite easily)




  • If that fails you can alternatively leech everything manually with adb:
    I assume you use Linux.


.


#list available devices:
adb shell ls /dev/block
adb shell cat /proc/partitions
#create images for each mtdblock
#uuencoding is needed because the shell interferes with the stream (adds linefeeds or so):
adb shell cat /dev/block/mtdblockX \| uuencode foo | uudecode -o mtdblockX.img

adb shell cat /dev/block/mmcblkXXX \| uuencode foo | uudecode -o mmcblkXXX
#compare md5sums:
adb shell md5sum /dev/block/*
md5sum mtdblock* mmcblk*

# Look for reasonably sized images and what file system they are:
ls -lh mtdblock* mmcblk*
file mtdblock* mmcblk*
# You should be able to mount those images now (if you happen to use linux):
mount -t ext4 -oloop,ro mtdblockX /media/mtdblockX

# Now use some file-explorer to access your saved data


  • Final step:
    If you are really sure that you got all your data back, boot back into the CWM recovery (see step above) and issue a wipe data/factory reset command. Then reboot and re-setup your tablet (hopefully you don't have a hardware issue).

  • Optional step: relock your bootloader via fastboot oem lock


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...