Jump to content











Photo

How are the partitions in an Android device?

android partitions

  • Please log in to reply
14 replies to this topic

#1 alacran

alacran

    Frequent Member

  • Advanced user
  • 490 posts
  •  
    Mexico

Posted 06 December 2013 - 07:35 AM

Zoso told me to start a new topic in order to get an answer for this question, (not doble posting)

 

I am new in Android, recently I bought a chinese tablet with Android 4.2.2 on it:

CPU: A20 (dual core)

Ram: 1 GB

Internal storage (SD): 4 GB (unused)

Display: 7" capacitive touch screan

Please explain me how are the partitions in an Android tablet?, I have installed Android 4.3 for x86 in Virtual Box using Ext3 format, but this doesn't helped me to understand the real world on a tablet.



#2 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 06 December 2013 - 11:16 AM

hi alacran,

it was only a suggestion since your question was such a good one I thought it might get overlooked on the other thread. and I am also interested in the answer to it!

I did run across this XDA_DEV thread which has some info: http://forum.xda-dev...d.php?t=1542857

to me it seems that they are considering different folders as separate partitions, not sure. it still seems like the different .img files in the full backup I made with ClockWorkMod recovery might also be mounted internally as separate partitions.

basically, I dont know for sure yet but keep us posted and I'll do the same.

thanks
  • alacran likes this

#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13748 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 December 2013 - 12:15 PM

to me it seems that they are considering different folders as separate partitions, not sure. 

No.

Like in Linux what you call "different folders" are "mountpoints" for actual partitons/volumes/block areas.

See:

http://www.all-thing...artition-layout

 

:cheers:

Wonko


  • alacran likes this

#4 florin91

florin91

    Frequent Member

  • Team Reboot
  • 197 posts
  •  
    European Union

Posted 06 December 2013 - 09:16 PM

Android is exactly like linux. There are different partitions, mounted on different folders on root.

 

For example, sdcard partition is mounted on sdcard, same for system and others.

 

More interesting is the filesystem for those partitions. If you "dd" those partitions and analyse the start, you will notice the string ANDROID! or the hex offset 41 4e 44 52 4f 49 44 21 This is indeed something new, it's not ntfs, not ext. It might be ext on some partitions and it might be ext starting with this hex offset.

 

I think it depends from manufacturer to manufacturer.



#5 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 07 December 2013 - 02:10 AM

hi Wonko, that link explains it well. thanks!



Android is exactly like linux.

yeah florin91, this is good! except the google part of it (IMO) but I think that can be trimmed away/eliminated. thats one of my goals with this device anyway. I also really like the fact it is an open source OS so I think the possibilities are endless.


alacran, look up an app named "DiskInfo" I have just installed it and it provides a lot of details on these partitions. it shows my device having ten different partitions.

so it does seem that each of the .img files in the CWM recovery backup is what is mounted as partitions and then some more. some it list as unknown size and there are two that are only 4mb.

I recall a thread started earlier somewhere on here this year by a new member that went into more details about I think a dual boot partitioning scenario. Wonko may remember because he had extensive discussion about the partitioning scheme on that thread. hopefully he and can link us to it. it was before I had an Android device so I dont remember what sub forum it was or the topic starter.

another goal I have is dual booting android devices with multiple linux OS. I have fingers crossed that Elmar will do as he has recently mentioned on his forum that he has been considering and develop ARM support in Plop-Linux!

#6 alacran

alacran

    Frequent Member

  • Advanced user
  • 490 posts
  •  
    Mexico

Posted 07 December 2013 - 05:21 PM

@Zoso

 

Good info from that link Wonko provided us, also as you suggested I'm going to install "DiskInfo" to take a look to the partitions in my device and will come back to talk about that having a better idea of the internal partitions.

 

Best Regards



#7 alacran

alacran

    Frequent Member

  • Advanced user
  • 490 posts
  •  
    Mexico

Posted 08 December 2013 - 09:09 PM

This is what I got from DiskInfo:

 

Partition           Mounted    Size       Free    Part No.

INTERNAL STORAGE

nanda nanda      No         16MB                      0
nandb nandb      No         16MB                      8
nandc nandc       No         16MB                    16
System nandd    Yes      503MB    42.5MB    24
Data nande        Yes    1007MB     567MB    32
nandf nandf         No        16MB                    40
nandg nandg       No        32MB                    48
Cache nandh     Yes      503MB     495MB    56
nandi nandi         No      256MB                    64
nandj nandj         No        16MB                    72
nandk nandk       No       4.4GB                    80

Device-Mapper

dm-0 dm-0         Yes       40MB     1.9MB        0
dm-1 dm-1         Yes       12MB     988KB        1

TMPFS MOUNT POINTS

/dev                   Yes     412MB    412MB
/mnt/segure       Yes     412MB    412MB
/mnt/asec           Yes    412MB    412MB
/mnt/obb            Yes    412MB    412MB
/mnt/sdcard/.android_secure    unknown size

 

So INTERNAL STORAGE has 11 partitions from 0 to 80 (0, 8, 16, 24, 32, 40, 48, 56, 64, 72 and 80), but thre is also dm-1 dm-1 using partition 1.



#8 florin91

florin91

    Frequent Member

  • Team Reboot
  • 197 posts
  •  
    European Union

Posted 08 December 2013 - 09:31 PM

You should check if information about these partitions is stored when they are mounted, at boot time, in logs, with "dmesg" command.

dmesg is used to examine or control the kernel ring buffer.

The default action is to read all messages from the kernel ring
buffer.
http://man7.org/linux/man-pages/man1/dmesg.1.html

And http://forum.xda-dev....php?p=23036410 too.

 

What do you think, will the dmesg command work in android ?



#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13748 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 December 2013 - 11:03 AM

With all due respect to everyone involved :), the mentioned page:

http://www.all-thing...artition-layout

explicitly details WHICH commands to use and HOW to use them (in order to have a readable set of info)

 

The info in post #7 seems like NOT having *anything* in common with the documented output of "ls -l /dev/block/platform/block_device_name/by-name/" or that of "fdisk -l /dev/block/mmcblk0", i.e. it seems like the mentioned Diskinfo uses it's own "conventions" to BOTH "name" and "number" partition, convention that looks completely unlike any other common tools.

Lines like these:

lrwxrwxrwx root root 2013-01-14 22:17 BOTA0 -> /dev/block/mmcblk0p1

 

Device Boot Start End Blocks Id System
/dev/block/mmcblk0p1 * 1 9 72261 c Win95 FAT32 (LBA)

 

provide IMHO much more meaningful info than the posted output of Diskinfo, which apparently makes no sense whatsoever.

 

:cheers:

Wonko



#10 alacran

alacran

    Frequent Member

  • Advanced user
  • 490 posts
  •  
    Mexico

Posted 11 December 2013 - 01:10 AM

@Wonko

 

Using Android Terminal Emulator I got not better info, I made an image:

 

https://www.mediafir...6x60x9vbgwsasf9

 

Any other options to get the info (in order to have a readable set of info)

 

Best Regards



#11 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 11 December 2013 - 04:26 AM

I wonder if your mediafire image will show up (hot link) here? lets try this:

6x60x9vbgwsasf99g.jpg?size_id=6

#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13748 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 11 December 2013 - 04:08 PM

IMHO the output of cat /proc/partitions has more details (while it misses some other ones :w00t:)

For once you have an exact number of blocks used (and no "vague" and possibly incorrect "Mb" sizes).

Let's take partition "nanda" it was given as 16 Mb and partition #0,

The new command tells us that it it partition #93/0 (major/minor, whatever that means) and that it is made of 16384 blocks (which implies that each block is 1024 bytes (16*1024*1024=.16777216 and 16*1024=.16384) and that the Mb are "real" Megabytes (the thingy that should be called accordingly to the "wrong" but current standard Mebibytes)

If you take partition "dn-0", it was given as 40 Mb an partition #0 (i.e. seemingly overlapping the other partition "nanda" which was also partition #0).

The new command tells us that it is instead partition #254/0 (which allows us to distinguish them) and that it has 41611 blocks which are NOT 40 Mb, as 40*1024=40960.

The good info coming from the original output are that:

 

System=nandd
Data=nande
Cache=nandh

and the amount of free space in those three "mounted" partitions.

 

Evidently your version/edition/whatever of android missed the fdisk command, cannot say if you can install/add to it some version of the fdisk. :unsure:

 

:cheers:

Wonko



#13 Zoso

Zoso

    Silver Member

  • Advanced user
  • 640 posts
  •  
    Isle of Man

Posted 27 December 2013 - 03:34 AM

Android is exactly like linux. There are different partitions, mounted on different folders on root.

For example, sdcard partition is mounted on sdcard, same for system and others.

More interesting is the filesystem for those partitions. If you "dd" those partitions and analyse the start, you will notice the string ANDROID! or the hex offset 41 4e 44 52 4f 49 44 21 This is indeed something new, it's not ntfs, not ext. It might be ext on some partitions and it might be ext starting with this hex offset.

I think it depends from manufacturer to manufacturer.


yes, this is what I am discovering.. it seems this is an effort to hide their secrets out in the open (OpenSource) but the recent trend is not to release their forked code at all which is illegal but they dont seem to be concerned about it. my device has an altered cramfs (file system) which has been encrypted but no source code publicly available from the manufacturer to decrypt however some of it has unofficially leaked so thats good.


What do you think, will the dmesg command work in android ?


also finding dmesg is practically a must for developers working on hardware like I described above. I think I am going to have to get familiar with it in order to have a device that is more useful than intended or "allowed".

#14 alacran

alacran

    Frequent Member

  • Advanced user
  • 490 posts
  •  
    Mexico

Posted 27 December 2013 - 08:04 AM

I got a firmware update for my tablet (Eken X70) from manufacturer site and open it using DragonFace v2.1.0, and looking in my computer Temp folder at "sysconfig.lhs" this is the new partition layout that will be on the tablet after applying this update.

 

Spoiler

 

So there are going to be 11 partitions as now, but they are going to be twice the actual size exception made for the last one who is going to be rest of available espace (about 1.937GB and it is about 4.421GB now), this one is called internal SD card (or just SDcard) when in file explorer, any way this is not a big deal because adding an USB stick or an external SD card I get more room for my stuff.

 

DragonFace v2.1.0 is a tool for open an mod Allwinner Rom's, links:

http://www.solidfile...m/d/802d2a5c2f/

http://www.filefacto...face_V2_1_0_rar

https://copy.com/Dg61V7VvbJl9



#15 alacran

alacran

    Frequent Member

  • Advanced user
  • 490 posts
  •  
    Mexico

Posted 04 January 2014 - 10:23 PM

Bootloader (first partition "nanda") of my actual install of Android 4.2.2 https://www.mediafir...xa3402aax1hhhem 508KB

 

It has been taken from the bootloader.img (16MB) file mounted with imagedisk (it's a FAT16 .img), there is a boot.ini file with the folowing:

 

Spoiler

This makes me remember in some way XP boot.ini

 

Also inside Linux folder is located linux.ini with the following:

 

Spoiler







Also tagged with one or more of these keywords: android, partitions

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users