A20 adb shell command for hard disk partitioning

Source: Internet
Author: User
Tags hex code

A20 adb shell Command implementation hard disk partition 1' input busybox fdisk/dev/block/sda; 2' in Command (m for help): Then input m to view help; command (m for help ): mmCommand Actiona toggle a bootable flagb edit bsd encrypt toggle the dos encrypt flagd delete a previous list known partition typesn add a new partition create a new empty DOS partition tablep print the partition tableq quit without savchanging create a new empty Sun di Sklabelt change a partition's system idu change display/entry unitsv verify the partition tablew write table to disk and exitx extra functionality (experts only) 3' enter to view p, command (m for help): pp Disk/dev/block/sda: 500.1 GB, 500107862016 bytes255 heads, 63 sectors/track, 60801 cylindersUnits = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System 4' Select Delete d, C Ommand (m for help): ddNo partition is defined yet! 5 'create partition n, Command (m for help): nnCommand action e extended p primary partition (1-4) 6' select p, PPPartition number (1-4 ): 7' select the number of partitions. I select 1, Partition number (1-4): 11 First cylinder (1-60801, default 1 ): 8' press enter (start position of the primary partition). The default value is 1. The default value is good. First cylinder (1-60801, default 1 ): using default value 1 Last cylinder or + size or + sizeM or + sizeK (1-60801, default 60801): 9' This defines the partition size, + 499000 M means the size is + 499000 M. Of course, you can follow the p prompt Unit cylinder, and then specify the value of End. Let's look back at how it is calculated. We can use the + 499000M method to add it, which is more intuitive. My hard disk is 500 GB, so it is 499 GB. If you want to add a partition of about 10 Gb, enter + 10000 MB; last cylinder or + size or + sizeM or + sizeK (1-60801, default 60801): + 499000 M + 499000 M 10' use t to specify the partition type t; command (m for help): ttSelected partition 1Hex code (type L to list codes): 11' enter L here, the id of the partition type is Hex code (type L to list codes): LL 0 Empty 1b Hidden Win95 FAT32 9f BSD/OS 1 FAT12 1c Hidden W95 FAT32 (LBA) a0 Thinkpad hibernation 4 FAT16 <32 M 1e Hidden W95 FAT16 (LBA) a5 FreeBSD 5 Extended 3c Part. magic recovery a6 OpenBSD 6 FAT16 41 PPC PReP Boot a8 Darwin UFS 7 HPFS/NTFS 42 SFS a9 NetBSD a OS/2 Boot Manager 63 gnu hurd or SysV AB Darwin boot B Win95 FAT32 80 Old minix b7 BSDI fs c Win95 FAT32 (LBA) 81 Minix/old Linux b8 BSDI swap e Win95 FAT16 (LBA) 82 Linux swap be Solaris boot f Win95 Ext 'd (LBA) 83 Linux eb BeOS fs11 Hidden FAT1 2 84 OS/2 hidden C: drive ee EFI GPT12 Compaq diagnostics 85 Linux extended ef EFI (FAT-12/16/32) 14 Hidden FAT16 <32 M 86 NTFS volume set f0 Linux/PA-RISC boot16 Hidden FAT16 87 NTFS volume set f2 DOS secondary17 Hidden HPFS/NTFS 8e Linux LVM fd Linux raid autodetectHex code (type L list codes): 12' Select 83, Hex code (type L to list codes): 8383 14'. Let's take a look at p Command (m for help): pp Disk/dev/block/sda: 500.1 GB, 500107862016 bytes255 heads, 63 sectors/track, 60801 cylindersUnits = cylinders of 16065*512 = 8225280 bytes Device Boot Start End Blocks Id System/dev/block/sda1 1 60668 487315678 + 83 Linux is indeed out! 15' create w Command (m for help): wwThe partition table has been altered! Calling ioctl () to re-read partition table 16' format and load the partition. Input busybox mkfs. ext2/dev/block/sda root @ android:/# busybox mkfs. ext2/dev/block/sdabusybox mkfs. ext2/dev/block/sdaFilesystem label = OS type: LinuxBlock size = 4096 (log = 2) Fragment size = 4096 (log = 2) 30531584 inodes, 122096646 blocks6104832 blocks (5%) reserved for the super userFirst data block = 0 Maximum filesystem blocks = 1258291203727 bloc K groups32768 blocks per group, 32768 fragments per group8192 inodes per groupSuperblock backups stored on blocks: 32768,983 04, 163840,229 376, 294912,819 200, 884736,160 5632, 2654208,4096000, 7962624,112 39424, 20480000,238 87872, 71663616,786 75968, 102400000 ........... (You must note that if you have mounted the file before, Umount off -- busybox unmount/dev/block/sda; otherwise, busybox mkfs will fail. ext2/dev/block/sdamkfs. ext2: can't format mou Nted filesystem) 17' mount-t ext2/dev/block/sda/mnt/sata OK, buysybox df-h: root @ android: /# busybox df-hbusybox df-hFilesystem Size Used Available Use % Mounted ontmpfs 153.4 M 32.0 K 153.4 M 0%/devtmpfs 153.4 M 0 153.4 M 0%/mnt/asectmpfs 153.4 M 0 153.4 M 0%/mnt/obb/dev/block/system 504.4 M 257.9 M 246.5 M 51%/system/dev/block/data 504.4 M 57.7 M 446.7 M 11%/data/dev/block/ cache 252.1 M 4.3 M 24 7.8 M 2%/cache/dev/block/vold/93: 72 2.1G 48.0 K 2.1G 0%/mnt/sdcard/dev/block/vold/93: 72 2.1G 48.0 K 2.1G 0%/mnt/secure/asec/dev/block/sda 458.5G 62.5 M 435.2G 0%/mnt/sata come out, so be excited!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.