November 11th, 2009 by ahoog

Motorola Droid filesystem details

I was taking a look at the filesystem on my Motorola Droid and discovered they have a new YAFFS2 directory called /config.  The T-Mobile/HTC devices did not have this directory.  Interestingly, you can’t cd into the directory…you get the following error:

$ cd config
cd: can't cd to config

but you can get a little info:

$ ls /config
wifi
public
lost+found

Oddly enough, if traditional Unix permissions are respected, not even root can cd into that directory:

drw-rw-rw- root     root              1969-12-31 18:06 config

For those interested, the mounted file systems are:

rootfs / rootfs ro 0 0
tmpfs /dev tmpfs rw,mode=755 0 0
devpts /dev/pts devpts rw,mode=600 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /sqlite_stmt_journals tmpfs rw,size=4096k 0 0
none /dev/cpuctl cgroup rw,cpu 0 0
/dev/block/mtdblock4 /system yaffs2 ro 0 0
/dev/block/mtdblock6 /data yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock5 /cache yaffs2 rw,nosuid,nodev 0 0
/dev/block/mtdblock0 /config yaffs2 ro 0 0
/dev/block//vold/179:1 /sdcard vfat rw,dirsync,nosuid,nodev,noexec,\
uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,\
iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0

and here is the respective info on MTD:

$ cat mtd
dev:    size   erasesize  name
mtd0: 00180000 00020000 "pds"
mtd1: 00060000 00020000 "misc"
mtd2: 00380000 00020000 "boot"
mtd3: 00480000 00020000 "recovery"
mtd4: 08c60000 00020000 "system"
mtd5: 05ca0000 00020000 "cache"
mtd6: 105c0000 00020000 "userdata"
mtd7: 00200000 00020000 "kpanic"

4 comments to Motorola Droid filesystem details

  • gleeda

    Have you tried changing the directory permissions by adding the executable bit? If the directory is not executable for root, then yes, root will not be able to go inside it. I can see from the permissions that this is the case.

  • I did not try that since the owner is root/root so I will not have permissions. It would be simple to add if I was root and then cd into the directory…I just thought it was curious to see a permission of 666…don’t see that too often.

  • gleeda

    ah, yeah. I wasn’t sure if you have access to the root account, though I guess it makes sense that you don’t ;-) Still it’s kinda bizarre that directory has permission 666…

  • rwdroid

    is there a file called otacerts.zip under /system/etc/security/? Are you able to us ADB to pull files from /system? I am waiting for my droids to arrive so I am trying to find as much info as I can before then and thank you for any info you may have!

Leave a Reply