I have a Google Nexus 7 (2012) which for no apparent reason entered an endless reboot loop. Trying to fix it with a fresh install of the OS via TWRP, I unintentionally messed up the partition table.

Now the device doesn't even show the Google startup screen. The screen stays bare dead whatever I try (power + volume down, up, upsidedown, usb plugged in, immersed in Coke, boiled...).

Is there a relatively inexpensive way to interact with an android device that has its partition table damaged? (Of course, it is not detected by adb.)


Probably they don't add much to the description of the problem, but for the sake of completeness, here are the latest steps of this tragedy.

Connected as root via adb I used parted to try and enlarge the size of the system partition (because the OS image didn't fit the system partition). It returned an error saying that it did not recognize the disk label.

/system/bin/sdparted # ./parted /dev/block/platform/sdhci-tegra.3/mmcblk0
GNU Parted
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Error: /dev/block/mmcblk0: unrecognised disk label
(parted) quit

So I reverted to fdisk, not really knowing what I was doing. It asked if I wanted to write a new label and it seemed a good idea to me to do so and I persisted the change. (In retrospective I see it wrote a DOS partition, which doesn't sound as good)

/system/bin/sdparted # fdisk -u /dev/block/mmcblk0
Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that the previous content
won't be recoverable.

The number of cylinders for this disk is set to 481024.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): write
The partition table has been altered.
Calling ioctl() to re-read partition table
fdisk: WARNING: rereading partition table failed, kernel still uses old table: Device or resource busy

Then I switched back to parted, which had an apparently nicer output:

/system/bin/sdparted # ./parted /dev/block/platform/sdhci-tegra.3/mmcblk0
GNU Parted
Using /dev/block/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: MMC HAG2e (sd/mmc)
Disk /dev/block/mmcblk0: 15.8GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End  Size  Type  File system  Flags

(parted) quit
/system/bin/sdparted # exit

I rebooted and from that moment on the tablet shows no signs of life.

  • you probably don't read the disclaimer "Warning: Re-partitioning your Android may lead to a complete breakage of your device software and may render it unbootable!" – alecxs Jun 5 at 16:25
  • try to get it in bootloader mode with the proper key combo. try to flash from fastboot developers.google.com/android/images – alecxs Jun 5 at 16:29
  • Extending the partition seemed to be my only option, because for some reason the system partition was a few MB smaller than the (original!) image I was trying to reset to. – Antonio Jun 7 at 7:39
  • And it doesn't get to bootloader mode, the screen looks dead. And the usb port doesn't respond well. Even if the OEM driver is up to date, Windows 10 returns a device descriptor request failed error. Playing with partitions I may have messed up things at a rather fundamental level... – Antonio Jun 7 at 7:47
  • maybe you can use the tegra-uboot-flasher to get bootloader mode back, but this is out of my knowledge and just speculation android.stackexchange.com/questions/212832/… – alecxs Jun 7 at 12:34

Your Answer

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

Browse other questions tagged or ask your own question.