Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I have an issue with inconsistent UIDs.

I would like to know how to manually find out the ID of a folder (specifically the /data partition). I think that it should be the same concept of an usual unix/linux filesystem but... I'm evidently getting older for this stuff :-)

From the Astro app I can see the details of the /data partition but it only tells me d-- and I cannot find any user id.

Actually, I have not set up any account on this phone, so there should be (I guess) only one UID present (the default one) apart from the system daemons etc.

Maybe for this reason it doesn't show up? Is there another, more powerful/informative app to be used? A file manager of some sort, a terminal console would be ideal for me.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I'd personally recommend using a terminal emulator or adb shell and then using the ls command. You can get the UID's listed by name if you use the -l flag and listed by number with the -n flag. Note that in the /data directory you'll need root permission in order to index the files/directories, so ls will fail with a normal user:

root@android:/data # ls -l
drwxrwxr-x system   system            2012-08-27 14:29 anr
drwxrwx--x system   system            2012-08-29 17:46 app
drwx------ root     root              2012-08-27 00:54 app-asec
drwxrwx--x system   system            2012-08-27 00:54 app-private
drwx------ system   system            2012-08-27 00:55 backup
drwxrwx--x system   system            2012-08-29 17:46 dalvik-cache
drwxrwx--x system   system            2012-08-29 17:34 data
drwxr-x--- root     log               2012-08-27 00:54 dontpanic
drwxrwx--- drm      drm               2012-08-27 00:55 drm
drwxrwx--- gps      system            2012-08-27 10:29 gps
drwxr-x--x system   system            2012-08-27 00:54 lightsensor
drwxr-x--x root     root              2012-08-27 00:54 local
drwxrwx--- root     root              1969-12-31 19:00 lost+found
drwxrwx--- media_rw media_rw          2012-08-27 14:10 media
drwxrwx--t system   misc              2012-08-27 00:54 misc
drwx------ root     root              2012-08-27 10:30 property
drwxrwx--x system   system            2012-08-27 00:54 resource-cache
drwxr-x--x system   system            2012-08-27 00:54 sensors
drwxr-x--- root     shell             2012-08-27 00:54 ssh
drwxrwxr-x system   system            2012-08-30 11:05 system
drwxr-xr-x root     root              2012-08-27 00:55 tf
drwx--x--x system   system            2012-08-27 00:54 user

root@android:/data # ls -n
drwxrwxr-x 1000     1000              2012-08-27 14:29 anr
drwxrwx--x 1000     1000              2012-08-29 17:46 app
drwx------ 0        0                 2012-08-27 00:54 app-asec
drwxrwx--x 1000     1000              2012-08-27 00:54 app-private
drwx------ 1000     1000              2012-08-27 00:55 backup
drwxrwx--x 1000     1000              2012-08-29 17:46 dalvik-cache
drwxrwx--x 1000     1000              2012-08-29 17:34 data
drwxr-x--- 0        1007              2012-08-27 00:54 dontpanic
drwxrwx--- 1019     1019              2012-08-27 00:55 drm
drwxrwx--- 1021     1000              2012-08-27 10:29 gps
drwxr-x--x 1000     1000              2012-08-27 00:54 lightsensor
drwxr-x--x 0        0                 2012-08-27 00:54 local
drwxrwx--- 0        0                 1969-12-31 19:00 lost+found
drwxrwx--- 1023     1023              2012-08-27 14:10 media
drwxrwx--t 1000     9998              2012-08-27 00:54 misc
drwx------ 0        0                 2012-08-27 10:30 property
drwxrwx--x 1000     1000              2012-08-27 00:54 resource-cache
drwxr-x--x 1000     1000              2012-08-27 00:54 sensors
drwxr-x--- 0        2000              2012-08-27 00:54 ssh
drwxrwxr-x 1000     1000              2012-08-30 11:05 system
drwxr-xr-x 0        0                 2012-08-27 00:55 tf
drwx--x--x 1000     1000              2012-08-27 00:54 user
root@android:/data #
share|improve this answer
    
yes this is exactly what I am looking for. A little problem is that I have not idea of how logging with a normal or the root user. I don't even know my username :-) –  Francesco Aug 30 '12 at 15:14
    
@Francesco: Android doesn't really have a concept of a "username" in the same sense that a typical Linux distro does. If you open a terminal emulator it will run within it's own UID (each app has a user id). If you log in with adb shell I think the default is the "system" user. You can't switch to the root user by default, but most devices have some method of gaining root access (How do I root my device? is a good starting point, but if you have specific questions about your device you're more than welcome to post them on this site). –  eldarerathis Aug 30 '12 at 15:17
    
Having to root the phone just to find out the uid of a folder seems a bit excessive. I mean, probably there's no harm involved but for such a simple query I am a bit surprised. I will try to install one of the apps that you told me and see if the standard authorizations are enough. For the moment, I'm doing the third factory reset in a few hours... –  Francesco Aug 30 '12 at 15:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.