Updated question (2018/2/20)
Thanks to grawity's answer and comment, my question can be updated.
My final goal is to acquire detailed partitioning information (including the start and end address of each partition on my android phone), either using fdisk or parted.
How to "install" the parted command into my android smartphone?
Can I use fdisk on a Linux system or on Cygwin on a windows system? Knowing that fdisk brought by BusyBox can't handle GPT. (If so, maybe I could post another question.)
The original question (2018/2/19)
I have installed Busybox on my smartphone, and I want to acquire detailed partitioning information, including the start and end address of each partition on my android phone.
I can use fdisk command, but maybe because my phone's disk is GPT instead of MBR, command "fdisk -l" shows no output.
So I want to use the command "parted". But I don't have it on my smartphone. How can I get it?
I've traveled to GNU website of "parted". But what I can download is only source code. Do I need to compile that? If so, how do I compile that? Can I compile the source code with MinGW on a PC with Windows system?
If I get the "parted" file, where should I put it to make it work? Is it under /system/bin?
I haven't found a usable "parted" file yet. Is it because of my bad google skill or the file has to be compiled differently for different devices?
I hope to find an official version of the "parted" file.
EDIT (2018/2/19)
I do know my storage is GPT because fdisk -l /dev/block/mmcblk0
tells me.
And I've read on the net that fdisk can't handle GPT, while parted can. I'm just not sure why fdisk -l
is showing nothing.
fdisk -l /dev/block/mmcblk0
Disk /dev/block/mmcblk0: 15 GB, 15634268160 bytes, 30535680 sectors
1908480 cylinders, 1 heads, 16 sectors/track
Units: cylinders of 16 * 512 = 8192 bytes
Device Boot StartCHS EndCHS StartLBA EndLBA Sectors Size Id Type
/dev/block/mmcblk0p1 0,0,0 0,0,0 1 30535679 30535679 14.5G ee EFI GPT
Partition 1 does not end on cylinder boundary
fdisk
version is too old and doesn't support GPT. (Is it util-linux fdisk or busybox fdisk?) It's showing the "protective MBR" partition.fdisk
, just like it has e.g. its own version ofls
and its own version ofsh
, completely separate from the traditional Linuxfdisk
/ls
/sh
/etc.