mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-11-28 04:14:57 +03:00
doc: Adds initial blurb about partitions.
This commit is contained in:
parent
fc66877f68
commit
b5fe8b8807
52
devices/asus-flo/partitions_16GB.gdisk
Normal file
52
devices/asus-flo/partitions_16GB.gdisk
Normal file
@ -0,0 +1,52 @@
|
||||
GPT fdisk (gdisk) version 1.0.3
|
||||
|
||||
Partition table scan:
|
||||
MBR: protective
|
||||
BSD: not present
|
||||
APM: not present
|
||||
GPT: present
|
||||
|
||||
Found valid GPT with protective MBR; using GPT.
|
||||
|
||||
Command (? for help): Disk /dev/mmcblk0: 30785536 sectors, 14.7 GiB
|
||||
Sector size (logical/physical): 512/512 bytes
|
||||
Disk identifier (GUID): 00000000-0000-0000-0000-000000000000
|
||||
Partition table holds up to 32 entries
|
||||
Main partition table begins at sector 2 and ends at sector 9
|
||||
First usable sector is 34, last usable sector is 30785502
|
||||
Partitions will be aligned on 2-sector boundaries
|
||||
Total free space is 1526010 sectors (745.1 MiB)
|
||||
|
||||
Number Start (sector) End (sector) Size Code Name
|
||||
1 131072 306143 85.5 MiB 0700 radio
|
||||
2 393216 399359 3.0 MiB FFFF modemst1
|
||||
3 399360 405503 3.0 MiB FFFF modemst2
|
||||
4 524288 554287 14.6 MiB 8300 persist
|
||||
5 655360 656919 780.0 KiB FFFF m9kefs1
|
||||
6 656920 658479 780.0 KiB FFFF m9kefs2
|
||||
7 786432 787991 780.0 KiB FFFF m9kefs3
|
||||
8 787992 794135 3.0 MiB FFFF fsg
|
||||
9 917504 920503 1.5 MiB FFFF sbl1
|
||||
10 920504 923503 1.5 MiB FFFF sbl2
|
||||
11 923504 927599 2.0 MiB FFFF sbl3
|
||||
12 927600 937839 5.0 MiB FFFF aboot
|
||||
13 937840 938863 512.0 KiB FFFF rpm
|
||||
14 1048576 1081343 16.0 MiB FFFF boot
|
||||
15 1179648 1180671 512.0 KiB FFFF tz
|
||||
16 1180672 1180673 1024 bytes FFFF pad
|
||||
17 1180674 1183673 1.5 MiB FFFF sbl2b
|
||||
18 1183674 1187769 2.0 MiB FFFF sbl3b
|
||||
19 1187770 1198009 5.0 MiB FFFF abootb
|
||||
20 1198010 1199033 512.0 KiB FFFF rpmb
|
||||
21 1199034 1200057 512.0 KiB FFFF tzb
|
||||
22 1310720 3031039 840.0 MiB 8300 system
|
||||
23 3031040 4177919 560.0 MiB 8300 cache
|
||||
24 4194304 4196351 1024.0 KiB FFFF misc
|
||||
25 4325376 4345855 10.0 MiB FFFF recovery
|
||||
26 4456448 4456463 8.0 KiB FFFF DDR
|
||||
27 4456464 4456479 8.0 KiB FFFF ssd
|
||||
28 4456480 4456481 1024 bytes FFFF m9kefsc
|
||||
29 4587520 4587583 32.0 KiB FFFF metadata
|
||||
30 4718592 30785502 12.4 GiB 8300 userdata
|
||||
|
||||
Command (? for help):
|
68
devices/asus-z00t/partitions_16GB.gdisk
Normal file
68
devices/asus-z00t/partitions_16GB.gdisk
Normal file
@ -0,0 +1,68 @@
|
||||
GPT fdisk (gdisk) version 1.0.3
|
||||
|
||||
Partition table scan:
|
||||
MBR: protective
|
||||
BSD: not present
|
||||
APM: not present
|
||||
GPT: present
|
||||
|
||||
Found valid GPT with protective MBR; using GPT.
|
||||
|
||||
Command (? for help): Disk /dev/mmcblk0: 30785536 sectors, 14.7 GiB
|
||||
Sector size (logical/physical): 512/512 bytes
|
||||
Disk identifier (GUID): 00000000-0000-0000-0000-000000000000
|
||||
Partition table holds up to 48 entries
|
||||
Main partition table begins at sector 2 and ends at sector 13
|
||||
First usable sector is 34, last usable sector is 30785502
|
||||
Partitions will be aligned on 2-sector boundaries
|
||||
Total free space is 43820 sectors (21.4 MiB)
|
||||
|
||||
Number Start (sector) End (sector) Size Code Name
|
||||
1 34 2593 1.3 MiB FFFF sbl1
|
||||
2 2594 5153 1.3 MiB 0700 sbl1bak
|
||||
3 5154 6177 512.0 KiB FFFF rpm
|
||||
4 6178 7201 512.0 KiB 0700 rpmbak
|
||||
5 7202 8225 512.0 KiB FFFF tz
|
||||
6 8226 9249 512.0 KiB 0700 tzbak
|
||||
7 9250 10273 512.0 KiB FFFF hyp
|
||||
8 10274 11297 512.0 KiB 0700 hypbak
|
||||
9 11298 11361 32.0 KiB FFFF DDR
|
||||
10 11362 11377 8.0 KiB FFFF ssd
|
||||
11 11378 11409 16.0 KiB FFFF sec
|
||||
12 11410 21649 5.0 MiB FFFF aboot
|
||||
13 32768 43007 5.0 MiB 0700 abootbak
|
||||
14 43008 53247 5.0 MiB FFFF splash
|
||||
15 53248 55295 1024.0 KiB FFFF devinfo
|
||||
16 65536 68607 1.5 MiB FFFF fsg
|
||||
17 68608 68609 1024 bytes FFFF fsc
|
||||
18 68610 71681 1.5 MiB FFFF modemst1
|
||||
19 71682 74753 1.5 MiB FFFF modemst2
|
||||
20 74754 95233 10.0 MiB FFFF factory
|
||||
21 95234 115713 10.0 MiB FFFF factorybak
|
||||
22 115714 117761 1024.0 KiB FFFF asuskey
|
||||
23 117762 119809 1024.0 KiB FFFF asuskey2
|
||||
24 119810 121857 1024.0 KiB FFFF asuskey3
|
||||
25 121858 123905 1024.0 KiB FFFF asuskey4
|
||||
26 123906 125953 1024.0 KiB FFFF asuskey5
|
||||
27 125954 128001 1024.0 KiB FFFF asusgpt
|
||||
28 128002 130049 1024.0 KiB FFFF asusgpt1
|
||||
29 130050 132097 1024.0 KiB FFFF asusgpt2
|
||||
30 132098 134145 1024.0 KiB FFFF misc
|
||||
31 134146 135169 512.0 KiB FFFF keystore
|
||||
32 135170 135233 32.0 KiB FFFF config
|
||||
33 135234 200769 32.0 MiB FFFF asdf
|
||||
34 200770 204865 2.0 MiB FFFF abootdebug
|
||||
35 204866 206913 1024.0 KiB FFFF persistent
|
||||
36 229376 294911 32.0 MiB FFFF oem
|
||||
37 294912 360447 32.0 MiB FFFF boot
|
||||
38 360448 425983 32.0 MiB FFFF recovery
|
||||
39 425984 491519 32.0 MiB FFFF persist
|
||||
40 491520 524287 16.0 MiB FFFF asusfw
|
||||
41 524288 655359 64.0 MiB 0700 modem
|
||||
42 655360 720895 32.0 MiB 0700 ADF
|
||||
43 720896 1146879 208.0 MiB 0700 APD
|
||||
44 1146880 1212415 32.0 MiB FFFF cache
|
||||
45 1212416 7503871 3.0 GiB FFFF system
|
||||
46 7503872 30785502 11.1 GiB FFFF userdata
|
||||
|
||||
Command (? for help):
|
66
doc/partitions.md
Normal file
66
doc/partitions.md
Normal file
@ -0,0 +1,66 @@
|
||||
Partitions
|
||||
==========
|
||||
|
||||
Right now, we will **not** touch any partition map.
|
||||
|
||||
This is because it may break devices.
|
||||
|
||||
Some (all?) android devices keep a small bit of their internal storage aside to put
|
||||
secondary bootloaders in.
|
||||
|
||||
When the storage is cleared, or their bootloaders stored therein are corrupt, many devices will
|
||||
boot to a proprietary download mode. Follows a random picking of links related.
|
||||
|
||||
* https://forum.xda-developers.com/g2-mini/general/hard-bricked-help-via-aboot-img-abootb-t3212609
|
||||
* https://forum.xda-developers.com/android/development/qd-9008-fix-tested-lg-v410g-pad-7-0-att-t3269057
|
||||
* https://forum.xda-developers.com/showpost.php?p=75360854&postcount=199
|
||||
* https://forum.xda-developers.com/nexus-7-2013/nexus-7-2013-qa/fix-nexus-7-2013-bricked-stuck-t3310608
|
||||
|
||||
It may be possible to recover, but this is highly device-dependent... and spooky.
|
||||
|
||||
Here's an example guide from a user that re-partitions their device:
|
||||
|
||||
* https://forum.xda-developers.com/nexus-7-2013/general/guide-repartition-nexus72013-to-t3599907
|
||||
|
||||
|
||||
* * *
|
||||
|
||||
Generating a partitions listing
|
||||
-------------------------------
|
||||
|
||||
By adding this to `local.nix`, build an initramfs for your device and boot it.
|
||||
|
||||
```
|
||||
mobile.boot.stage-1.extraUtils = with pkgs; [
|
||||
gptfdisk
|
||||
];
|
||||
```
|
||||
|
||||
Run this command:
|
||||
|
||||
```
|
||||
adb shell "echo p | gdisk /dev/mmcblk0" > devices/$DEVICE/partitions_$SIZE$UNIT.gdisk
|
||||
```
|
||||
|
||||
Where:
|
||||
|
||||
* $DEVICE is the device name
|
||||
* $SIZE is the size un $UNIT
|
||||
* $UNIT is `GB`, as in GigaBytes
|
||||
|
||||
This will dump everything `gdisk` knows about the partition scheme. Saving it raw will
|
||||
allow future tools to re-use the data as dumped to create a better metadata set. It is
|
||||
okay if you replace the Disk identifier (GUID) with a string of zeroes. (It is unknown
|
||||
if it is truly unique across similar devices.)
|
||||
|
||||
The storage size is included in the filename as some devices (most?) have different
|
||||
variants differing only in their storage size.
|
||||
|
||||
|
||||
* * *
|
||||
|
||||
### See also
|
||||
|
||||
* https://source.android.com/devices/bootloader/partitions-images
|
||||
* https://forum.xda-developers.com/general/general/android-partitions-explained-t3657183
|
||||
|
Loading…
Reference in New Issue
Block a user