Skip to content

Instantly share code, notes, and snippets.

@luk1337
Created August 12, 2018 21:00
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save luk1337/234995d45531e7c6f49042dbd3fce131 to your computer and use it in GitHub Desktop.
Save luk1337/234995d45531e7c6f49042dbd3fce131 to your computer and use it in GitHub Desktop.
$ adb reboot bootloader
$ fastboot getvar partition-size:userdata
partition-size:userdata: 0x1c94ffb000
finished. total time: 0.000s
$ python
Python 2.7.15 (default, May 16 2018, 17:50:09)
[GCC 8.1.1 20180502 (Red Hat 8.1.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> hex(0x1c94ffb000 - 0x8000)
'0x1c94ff3000'
>>> quit()
$ fastboot format:ext4:0x1c94ff3000 userdata
Warning: userdata size is 0x1c94ffb000, but 0x1c94ff3000 was requested for formating.
Creating filesystem with parameters:
Size: 122758836224
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 32768
Label:
Blocks: 29970419
Block groups: 915
Reserved block group size: 1024
Created filesystem with 11/7495680 inodes and 518576/29970419 blocks
target reported max download size of 536870912 bytes
erasing 'userdata'...
OKAY [ 0.010s]
sending 'userdata' (145110 KB)...
OKAY [ 4.553s]
writing 'userdata'...
OKAY [ 1.559s]
finished. total time: 6.126s
$ fastboot reboot
rebooting...
finished. total time: 0.055s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment