I found the root folder! (i think)

Discussion in 'Android Hacks and Help' started by DroidMan85, Nov 21, 2009.

  1. DroidMan85
    Offline

    DroidMan85 New Member

    Joined:
    Nov 21, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    San Diego
    In this, I am using android terminal emulator by jack palevich
    I decided to do some digging and see how far i got. I ended up getting a lot of error messages such as permission denieds and "cannot cd to blah blah blah" I kept track of a little of my digging and i think i found the root folder but cannot access it. Heres a little bit that i've documented. its not much, but its a start somewhere.
    Code:
        
        [FONT=DejaVu Sans]$ ls[/FONT]
        [FONT=DejaVu Sans]swlite_stmt_journals[/FONT]
        [FONT=DejaVu Sans]config[/FONT]
        [FONT=DejaVu Sans]cache[/FONT]
        [FONT=DejaVu Sans]sdcard[/FONT]
        [FONT=DejaVu Sans]d[/FONT]
        [FONT=DejaVu Sans]etc[/FONT]
        [FONT=DejaVu Sans]system[/FONT]
        [FONT=DejaVu Sans]sys[/FONT]
        [FONT=DejaVu Sans]sbin[/FONT]
        [FONT=DejaVu Sans]proc[/FONT]
        [FONT=DejaVu Sans]init.sholes.rc[/FONT]
        [FONT=DejaVu Sans]init.rc[/FONT]
        [FONT=DejaVu Sans]init.goldfish.rc[/FONT]
        [FONT=DejaVu Sans]init[/FONT]
        [FONT=DejaVu Sans]default.prop[/FONT]
        [FONT=DejaVu Sans]data[/FONT]
        [FONT=DejaVu Sans]root[/FONT]
        [FONT=DejaVu Sans]dev[/FONT]
        
        [FONT=DejaVu Sans]$ls -l[/FONT]
        [FONT=DejaVu Sans]drwxrwxrwt root     root  2009-11-21     13:43         smt_journals[/FONT]
        [FONT=DejaVu Sans]drw-rw-rw-    root     root  1969-12-31     16:07         config[/FONT]
        [FONT=DejaVu Sans]drwxrwx---    system cache  2009-11-21     13:58            cache[/FONT]
        [FONT=DejaVu Sans]d---rwxr-x      system sdcard_rw    2009-11-21     13:38     sdcard[/FONT]
        [FONT=DejaVu Sans]lrwxrwxrwx    root    root     2009-11-17     21:57 d -> /sys/kernel/debug[/FONT]
        [FONT=DejaVu Sans]lrwxrwxrwx    root    root     2009-11-17     21:57 etc -> /system/etc[/FONT]
        [FONT=DejaVu Sans]drwxr-xr-x    root    root     2009-10-20  20:03        system[/FONT]
        [FONT=DejaVu Sans]drwxr-xr-x    root    root     1969-12-31     16:00     sys[/FONT]
        [FONT=DejaVu Sans]drwxr-x---    root    root     1969-12-31      16:00     sbin[/FONT]
        [FONT=DejaVu Sans]dr-xr-xr-x    root    root     1969-12-31     16:00     proc[/FONT]
        [FONT=DejaVu Sans]-rwxr-x---    root    root    6226    1969-12-31     16:00     init.sholes.rc[/FONT]
        [FONT=DejaVu Sans]-rwxr-x---    root    root   12377    1969-12-31     16:00     init.rc[/FONT]
        [FONT=DejaVu Sans]-rwxr-x---    root    root    1677    1969-12-31     16:00     init.goldfish.rc[/FONT]
        [FONT=DejaVu Sans]-rwxr-x---    root    root 103100    1969-12-31     16:00     init[/FONT]
        [FONT=DejaVu Sans]-rw-r--r--    root    root    118    1969-12-31     16:00     default.prop[/FONT]
        [FONT=DejaVu Sans]drwxrwx--x   system    system    2009-11-20     21:18     data[/FONT]
        [FONT=DejaVu Sans]drwx------    root    root     2009-10-20     16:03     root[/FONT]
        [FONT=DejaVu Sans]drwxr-xr-x    root    root     2009-11-17     21:57     dev[/FONT]
        
        [FONT=DejaVu Sans]$ls -s[/FONT]
        [FONT=DejaVu Sans]0 [/FONT][FONT=DejaVu Sans]swlite_stmt_journals[/FONT]
        [FONT=DejaVu Sans]2  ./config[/FONT]
        [FONT=DejaVu Sans]2  ./cache[/FONT]
        [FONT=DejaVu Sans]32  ./sdcard[/FONT]
        [FONT=DejaVu Sans]0  ./d[/FONT]
        [FONT=DejaVu Sans]0    ./etc[/FONT]
        [FONT=DejaVu Sans]2    ./system[/FONT]
        [FONT=DejaVu Sans]0    ./sys[/FONT]
        [FONT=DejaVu Sans]0    ./sbin[/FONT]
        [FONT=DejaVu Sans]0    ./proc[/FONT]
        [FONT=DejaVu Sans]8    ./init.sholes.rc[/FONT]
        [FONT=DejaVu Sans]16    ./init.rc[/FONT]
        [FONT=DejaVu Sans]4    ./init.goldfish.rc[/FONT]
        [FONT=DejaVu Sans]104    ./init[/FONT]
        [FONT=DejaVu Sans]4    ./default.prop[/FONT]
        [FONT=DejaVu Sans]2    ./data[/FONT]
        [FONT=DejaVu Sans]0    ./root[/FONT]
        [FONT=DejaVu Sans]0    ./dev[/FONT]
        
        [FONT=DejaVu Sans]$ cd swlite_stmt_journals[/FONT][FONT=DejaVu Sans]
    [/FONT]
    (when running ls commands, it appears to be blank)

    Code:
        [FONT=DejaVu Sans]$ cd ..[/FONT]
        [FONT=DejaVu Sans]$ cd config[/FONT]
        [FONT=DejaVu Sans]cd: can’t cd to config[/FONT]
        
    


    also cant cd to cache, etc, system, sys, sbin, proc, init.sholes.rc, init.rc and more
    but they might also be data files. Anyone know?

    Code:
    [FONT=DejaVu Sans]$ cd data[/FONT]
        [FONT=DejaVu Sans]opendir failed, Permission denied[/FONT]
    [FONT=DejaVu Sans]$[/FONT]
    [FONT=DejaVu Sans]$ ls /data[/FONT]
        [FONT=DejaVu Sans]opendir failed, Permission denied[/FONT]
        
        
        




    I encourage everyone to play around and see what can be found.

    I know with linux, you can make yourself a root user by running visudo and adding

    Code:
    [FONT=DejaVu Sans]username   ALL = (ALL) ALL[/FONT]
        
    


    right under
    Code:
    [FONT=DejaVu Sans]root ALL = (ALL) ALL[/FONT]
        
    


    I wonder if we can do that with the droid also.



    This is my first post everyone and I did some digging. Im not super familiar with linux, but i have been running the fedora os in my home for atleast a year.

    Chown works, but I am unsure of the username that would be used. chmod works. the clear command DOESNOT work and neither do the rpm, apt-get, or yum commands. Read and cat also work. Anyone find other commands? Has anyone been able to read the root folder yet?
  2. Xerozix
    Offline

    Xerozix New Member

    Joined:
    Nov 21, 2009
    Messages:
    351
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Northern VA
    Awesome. That's pretty cool. If you look at the source code, you might be able to pull up some more info on switching to root or something. I'm actually wondering if it's possible to create an SSH server on the phone or something like that
  3. DroidMan85
    Offline

    DroidMan85 New Member

    Joined:
    Nov 21, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    San Diego
    I thought I might have seen some apps similar to that.... but im not completely sure

    **Edit** is connect bot what you're looking for?
    Last edited: Nov 21, 2009
  4. Xerozix
    Offline

    Xerozix New Member

    Joined:
    Nov 21, 2009
    Messages:
    351
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Northern VA
    No haha. Connect bot is the app for SSHing to OTHER unix devices, its a client.

    Pretty much making a SSH Server app is having it so that you can experiment with your phone from your computer using your favorite SSH client (putty etc.)

    That would make it MUCH easier to type.
  5. DroidMan85
    Offline

    DroidMan85 New Member

    Joined:
    Nov 21, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    San Diego
    ahhh i see... yeah... typing in the terminal is a pain as of right now. In the terminal app that i used for this, there is no on screen keyboard. sometimes the onscreen keyboard is easier to type fast with
  6. s-one
    Offline

    s-one New Member

    Joined:
    Nov 11, 2009
    Messages:
    257
    Likes Received:
    0
    Trophy Points:
    0
    Cool!! I'd like to modify the media folder with my own media files so every time I mount I don't get the default media notifications. Like my ()wn :)
  7. DroidMan85
    Offline

    DroidMan85 New Member

    Joined:
    Nov 21, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    San Diego
    I was thinking the same way, but modifying the eye in boot-up to have flames. Sort of like having an evil-droid phone.
  8. Xerozix
    Offline

    Xerozix New Member

    Joined:
    Nov 21, 2009
    Messages:
    351
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Northern VA
    Now, I'd learn the Droid programming language and develop a SSH Server (I'm a code junkie) but I honestly don't have the time.

    Stupid Droid won't mount to my mac lol
  9. DroidMan85
    Offline

    DroidMan85 New Member

    Joined:
    Nov 21, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    San Diego
    if you know java, you should be able to figure it out. I'm in the process of learning java, myself, right now
  10. daddycat31
    Offline

    daddycat31 New Member

    Joined:
    Nov 9, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    I know from rooting my G1 that it is done through an app called Terminal Emulator and another one called Superuser Permission. I simply followed the directions that the dev posted so that the extent of my knowledge on that. Hope that helps cuase I can't wait to root this baby.
  11. M Moogle
    Offline

    M Moogle New Member

    Joined:
    Nov 14, 2009
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    0
    All you've done is opened up a local console session - while its kinda neat to be able to run a terminal, it doesn't really get us anywhere. You have access to the same files via the terminal as you do with any of the available file browser apps. There is no 'visudo' application available, nor are any of the system configuration files writable by a non-root user.
  12. DroidMan85
    Offline

    DroidMan85 New Member

    Joined:
    Nov 21, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    San Diego
    I get that.. I was hoping that documenting the folders will help us get one step further. Will the chown command work if you're not sudo?
    Or even... could we export the line <user> ALL = (ALL) ALL if we find the right file?
  13. DroidMan85
    Offline

    DroidMan85 New Member

    Joined:
    Nov 21, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    San Diego
    Whoops..so you're saying even if we did know where to go, it doesn't matter bc we won't be rooted
  14. Xerozix
    Offline

    Xerozix New Member

    Joined:
    Nov 21, 2009
    Messages:
    351
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Northern VA
    No, you pretty much need terminal to become rooted. That is a good thing. What he's saying is that you an still access all of the folders that you got to by using a filebrowsing app. Try looking through the source code.
    For example,
    rooting on ubuntu is

    sudo passwd
  15. DroidMan85
    Offline

    DroidMan85 New Member

    Joined:
    Nov 21, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    San Diego
    wow.. I'm so slow...i didnt even realize that astro went back.. I thought it only pulled up the sd card and pictures ... The more you know.
  16. angel12
    Offline

    angel12 New Member

    Joined:
    Nov 12, 2009
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    So you guys know that just because you know where the root home folder is, it doesnt give us root permission right? thats the same as knowing where the administrator in windows documents are stored, thats it. Gaining root access is where we can run commands as root, as the administrator.
  17. Xerozix
    Offline

    Xerozix New Member

    Joined:
    Nov 21, 2009
    Messages:
    351
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Northern VA
    Yes we know that. Trust us, we aren't idiots. It was just an accomplishment because normally a user can't access the root folder on a unix system unless he/she is given the privelages to.
  18. M Moogle
    Offline

    M Moogle New Member

    Joined:
    Nov 14, 2009
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    0
    Umm.. on a lot of Unixish systems a normal user has read access to /. We don't have access to the /root folder as a normal user. I can't think of any normal system where you'd be able to unless permissions were horribly broken.
  19. Xerozix
    Offline

    Xerozix New Member

    Joined:
    Nov 21, 2009
    Messages:
    351
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Northern VA
    The thing is you can CD to /root.

    There are no files in there (there shouldn't be)
  20. Wrenbjor
    Offline

    Wrenbjor New Member

    Joined:
    Nov 6, 2009
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    0
    This will be harder then first thought... I work on Linux and Solaris all day and all the default commands are disabled: su, dh, du, cd, uname, whoami, who am i (Unix), clear..


    woo ps works!... ok as I'm writing this I'm learning more...

    you will get a "Permission Denied" for any command that does not exist. do a ls /system/bin to get a list of commands.

    netcfg is list ifconfig... ifconfig is there but does nothing. ID lists all active UIDs, df lists used disk space. getprop is interesting... hardware stats i think or drivers. SH is on there... maybe some good shell scripts coming down the pike, we'll see.
Search tags for this page
android /data opendir failed, permission denied
,
android terminal emulator opendir failed
,
goldfish root android is what
,
goldfish.rc android
,
how to find root folder on android
,
init.goldfish
,

init.goldfish.rc

,
init.goldfish.rc 1969
,
init.goldfish.rc android
,
init.goldfish.rc permission denied
,
opendir failed permission denied
,
opendir failed, permission denied
,
root android goldfish
,
terminal emulator root folder not found
,
what is init.goldfish.rc