FORUMS
Remove All Ads from XDA

How-to- Root, Hack, and Flashing your G1/Dream Read first!!

917 posts
Thanks Meter: 894
 
By Koush, Retired Recognized Developer on 4th November 2008, 10:41 PM
Post Reply Email Thread
5th November 2008, 05:21 AM |#21  
Senior Member
Flag Phoenix, AZ, USA
Thanks Meter: 30
 
More
I have been poking around at this for a few hours now.

I have recompiled dropbear for arm and im trying to see if I can get it to work on here, but the problem is I cant find anything to change ownership of a file!

From looking at the other files in /system/bin that are executable in shell, it looks like they need to be root:shell. I put the dropbear binary on my sdcard (which is locked down with masks and a noexec flag. I am going to try remounting it). I copied dropbear from the sdcard to /system/bin and it automatically changes the permissions to root:root and read only for root. I chmod'd it to 4777, but its still root:root (obviousy) and I keep getting permission denied
 
 
5th November 2008, 05:48 AM |#22  
Senior Member
Flag Phoenix, AZ, USA
Thanks Meter: 30
 
More
Well I finally unmounted /sdcard manually. You have to kill mountd manually and then you can unmount it. Unfortunately, as soon as you try to remount it, mountd starts up again and enforces its mount parameters instead of mine

Also, I am looking through various startup scripts and the script is calling chown...so where the hell is it!
5th November 2008, 06:44 AM |#23  
Darkrift's Avatar
Senior Member
Flag San Tan Valley, Arizona
Thanks Meter: 12
 
More
Quote:
Originally Posted by staulkor

I have been poking around at this for a few hours now.

I have recompiled dropbear for arm and im trying to see if I can get it to work on here, but the problem is I cant find anything to change ownership of a file!

From looking at the other files in /system/bin that are executable in shell, it looks like they need to be root:shell. I put the dropbear binary on my sdcard (which is locked down with masks and a noexec flag. I am going to try remounting it). I copied dropbear from the sdcard to /system/bin and it automatically changes the permissions to root:root and read only for root. I chmod'd it to 4777, but its still root:root (obviousy) and I keep getting permission denied

chown isnt there. not sure how the scripts get away with it, but check here for busybox (im taking ideas from #android and making little tutorials incase you were wondering about the links): http://android-dls.com/forum/index.p...viewtopic#p422
You can use this method (at the end) to do 'cp -s busybox chown' and you will then have chown good luck and dont brick/break anything.
5th November 2008, 07:26 AM |#24  
LGSilva's Avatar
Senior Member
Thanks Meter: 159
 
More
Doesn't the OS run all apps sandboxed?
So would you have to change more than permissions to make anything work?
5th November 2008, 07:40 AM |#25  
Senior Member
Flag Phoenix, AZ, USA
Thanks Meter: 30
 
More
Quote:
Originally Posted by Darkrift

chown isnt there. not sure how the scripts get away with it, but check here for busybox (im taking ideas from #android and making little tutorials incase you were wondering about the links): http://android-dls.com/forum/index.p...viewtopic#p422
You can use this method (at the end) to do 'cp -s busybox chown' and you will then have chown good luck and dont brick/break anything.

Nice! I am trying this now.

And chown has to be there somewhere...why else would it call it. I guess we will learn eventually as we pick apart android more
5th November 2008, 07:44 AM |#26  
LGSilva's Avatar
Senior Member
Thanks Meter: 159
 
More
Just a complement from my previous post:
“We wanted to sandbox every single application because you can’t trust any of them,” said Rich Cannings, a Google security engineer.
5th November 2008, 08:05 AM |#27  
Senior Member
Flag Phoenix, AZ, USA
Thanks Meter: 30
 
More
Quote:
Originally Posted by LGSilva

Just a complement from my previous post:
“We wanted to sandbox every single application because you can’t trust any of them,” said Rich Cannings, a Google security engineer.

I'm sure all the "real" applications that were intended to be used on Android, such as programs off the marketplace and other APKs, are in a sandbox environment. So far it looks like we are beyond that and are down to the core (or near core) of the OS.
5th November 2008, 10:44 AM |#28  
Senior Member
Flag Dallas, TX
Thanks Meter: 25
 
More
muwahahahahahhaha...this is sweet!
5th November 2008, 11:06 AM |#29  
Senior Member
Flag Phoenix, AZ, USA
Thanks Meter: 30
 
More
Ok...FINALLY I am able to port apps to native C code for Android. It has only taken me many hours of my time and no sleep, but hey, its all for fun and glory (lol).

I have compiled dropbear and it IS working and running as a daemon. However, I can't actually connect to the SSH server yet. Netstat and ps reveals that is is in fact working:

netstat
Code:
tcp        0      0 0.0.0.0:22             0.0.0.0:*              LISTEN
ps
Code:
root     1013  1     1088  252   c00a62ec 0004cfe4 S dropbear
Im so close I can taste it :P I just have to figure out how to make dropbear listen on the correct interface. Im sure there is a setting in the config.h file for dropbear and a simple recompile will fix it.

When I do get it working, I will make a full diy on how to install it.
5th November 2008, 11:30 AM |#30  
Senior Member
Flag Phoenix, AZ, USA
Thanks Meter: 30
 
More
Got it working

I can connect to the phone via ssh, however, it is asking for a username/password. The problem is there isn't a password for root (so I think) and there definitely isn't a password for the other accounts. So now that I got ssh up and running, I need to figure out how to actually log in and take advantage of this!

Normally for usernames and passwords, they are kept in the /etc/passwd file. The passwords are obviously hashed, but it would show you if there is indeed a password or not so we don't waste our time brute forcing if it comes down to that.
5th November 2008, 11:54 AM |#31  
humble's Avatar
Senior Member
Thanks Meter: 5
 
More
Wow again, please sir keep us updated. and give us a walk through. You guy's Are about to make history keep up the good work(o yeah, and get some sleep)
Post Reply Subscribe to Thread

Tags
cupcake, jf1.5, root, tutorial, upgrade

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes