Go Back   Android Forums > Android Phones > Samsung i7500 > i7500 - All Things Root

i7500 - All Things Root Rooting, ROMS, Overclocking, etc.



Reply
 
LinkBack Thread Tools
Old October 16th, 2009, 10:04 PM   #1 (permalink)
Senior Member
 
kam187's Avatar
 
Join Date: Aug 2009
Location: UK
Posts: 1,320
 
Device(s): Nexus One
Thanks: 3
Thanked 45 Times in 28 Posts
Default Putty to Galaxo over USB!

So I noticed galaxo is using a colour term profile which is really nice, except for us poor windows users

You could of course enable SSH, reboot, and turn wifi on and then ssh in using putty, but that's not really that convenient. Especially if you dont like to leave ssh running.

Instead you can run dropbear manually and redirect the port using adb, then putty in directly.

Anyway I just made 2 .bat files:

_SSH_ON.bat
adb forward tcp:9999 tcp:2222
adb shell "/system/xbin/dropbear -E -A -N root -U 0 -G 0 -C password -p 2222"

_SSH_OFF.bat
adb shell "kill `ps | grep dropbear | awk '{print $1}'`"

You can change 'password' to anything you like. The SSH_OFF just finds the dropbear pid and kills it.

After running SSH_ON just putty to 127.0.0.1 and port 9999, make sure to select ssh as the protocol. And hey presto a nice colour shell, and stuff like vim also works!

kam187 is offline  
Reply With Quote
Sponsors
Old October 17th, 2009, 02:14 AM   #2 (permalink)
Junior Member
 
Join Date: Mar 2009
Posts: 15
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have no clue when it comes to linux but I love my phone so I'd like to know everything about it.. can you please tell me what all those things that you wrote could help me to?
zenderady is offline  
Reply With Quote
Old October 17th, 2009, 02:26 AM   #3 (permalink)
Senior Member
 
kam187's Avatar
 
Join Date: Aug 2009
Location: UK
Posts: 1,320
 
Device(s): Nexus One
Thanks: 3
Thanked 45 Times in 28 Posts
Default

you can use adb (part of the android sdk) to open a shell (like a command prompt) to your phone. The above just lets you do it through putty, which gives you a nice colour version of that window, instead of loads of wierd characters.

If you don't know what adb is, don't worry. This post isnt really for you
kam187 is offline  
Reply With Quote
Old October 17th, 2009, 03:03 AM   #4 (permalink)
Senior Member
 
Rastaman-FB's Avatar
 
Join Date: Sep 2009
Location: UK
Posts: 5,841
 
Device(s): i7500@galax0-1.6.3.4 OC@710mhz HTC Desire - never ending modding
Thanks: 104
Thanked 917 Times in 775 Posts
Default

ahh so thats what that mess is in cmd when using adb shell on galaxo rom
makes sense now.

will take a look later
Rastaman-FB is online now  
Reply With Quote
Old October 17th, 2009, 03:07 AM   #5 (permalink)
Junior Member
 
Join Date: Oct 2009
Posts: 23
 
Device(s):
Thanks: 0
Thanked 21 Times in 3 Posts
Default

You can also just type "sh", after adb shell, to use simply shell without color prompt
drakaz is offline  
Reply With Quote
Old October 17th, 2009, 03:09 AM   #6 (permalink)
Senior Member
 
kam187's Avatar
 
Join Date: Aug 2009
Location: UK
Posts: 1,320
 
Device(s): Nexus One
Thanks: 3
Thanked 45 Times in 28 Posts
Default

Quote:
Originally Posted by drakaz View Post
You can also just type "sh", after adb shell, to use simply shell without color prompt
Yeah, i tried that first, but if you type ls, or try vim its a mess. Anyway I prefer using putty over cmd. I can copy and paste easily, set a huge buffer and stretch the screen width past 80 chars
kam187 is offline  
Reply With Quote
Old October 17th, 2009, 03:18 AM   #7 (permalink)
Senior Member
 
Rastaman-FB's Avatar
 
Join Date: Sep 2009
Location: UK
Posts: 5,841
 
Device(s): i7500@galax0-1.6.3.4 OC@710mhz HTC Desire - never ending modding
Thanks: 104
Thanked 917 Times in 775 Posts
Default

[CODE]c:\android-sdk-windows-1.5_r3\tools>adb forward tcp:9999 tcp:2222

c:\android-sdk-windows-1.5_r3\tools>adb shell "/system/xbin/dropbear -E -A -N ro
ot -U 0 -G 0 -C password -p 2222"
[3047] Oct 17 08:17:11 Failed reading '/etc/dropbear/dropbear_rsa_host_key', dis
abling RSA
[3047] Oct 17 08:17:11 Failed reading '/etc/dropbear/dropbear_dss_host_key', dis
abling DSS
[3047] Oct 17 08:17:11 premature exit: No hostkeys available/CODE]
where am i going wrong?


EDIT sorry im ******** :P

worked it out
too early for me had a hard week and im sorting both my kids out this morning
Rastaman-FB is online now  
Last edited by Rastaman-FB; October 17th, 2009 at 03:22 AM.
Reply With Quote
Old October 17th, 2009, 03:24 AM   #8 (permalink)
Junior Member
 
Join Date: Oct 2009
Posts: 23
 
Device(s):
Thanks: 0
Thanked 21 Times in 3 Posts
Default

Quote:
Originally Posted by kam187 View Post
Yeah, i tried that first, but if you type ls, or try vim its a mess. Anyway I prefer using putty over cmd. I can copy and paste easily, set a huge buffer and stretch the screen width past 80 chars

You right, in the case of ls, you can add an alias with "ls --colors=never"...but like you i think using putty is better
drakaz is offline  
Reply With Quote
Old October 17th, 2009, 03:28 AM   #9 (permalink)
Junior Member
 
Join Date: Oct 2009
Posts: 23
 
Device(s):
Thanks: 0
Thanked 21 Times in 3 Posts
Default

Quote:
Originally Posted by Rastaman-FB View Post
[code]c:\android-sdk-windows-1.5_r3\tools>adb forward tcp:9999 tcp:2222

c:\android-sdk-windows-1.5_r3\tools>adb shell "/system/xbin/dropbear -E -A -N ro
ot -U 0 -G 0 -C password -p 2222"
[3047] Oct 17 08:17:11 Failed reading '/etc/dropbear/dropbear_rsa_host_key', dis
abling RSA
[3047] Oct 17 08:17:11 Failed reading '/etc/dropbear/dropbear_dss_host_key', dis
abling DSS
[3047] Oct 17 08:17:11 premature exit: No hostkeys available/CODE]
where am i going wrong?


EDIT sorry im ******** :P

worked it out
too early for me had a hard week and im sorting both my kids out this morning

You must turn at least once ssh using GalaxoConf (and reboot to apply) to enable rc to create the keys. (after that you can disable it in GalaxoConf, reboot again, and use kam197 method).
drakaz is offline  
Reply With Quote
Old October 17th, 2009, 06:18 AM   #10 (permalink)
New Member
 
Join Date: Oct 2009
Posts: 4
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey thank ist much more comfortable...

But two things, my courser keys dont work for cmdln history and second the tab key does not work for cmdln completion.

Any one an idea. How to fix it?

By the way it doesnt work with ssh over wifi ether.
Thanks
tiran is offline  
Reply With Quote
Sponsors
Old October 17th, 2009, 11:56 AM   #11 (permalink)
Senior Member
 
kam187's Avatar
 
Join Date: Aug 2009
Location: UK
Posts: 1,320
 
Device(s): Nexus One
Thanks: 3
Thanked 45 Times in 28 Posts
Default

Yeah i was going to look at that (command completion and history) but it got late :P

Maybe later. Wierd it should work over Wifi, but you should be using port 2222 in that case and sshing directly to the phone.
kam187 is offline  
Reply With Quote
Old October 17th, 2009, 02:15 PM   #12 (permalink)
Member
 
Join Date: Aug 2009
Posts: 253
 
Device(s):
Thanks: 1
Thanked 0 Times in 0 Posts
Default

For name completion and command history, ash works.
After you login, just type ash and you get those features.

bash also works and seems to be the shell that's also used with adb shell
pegasus21 is offline  
Last edited by pegasus21; October 17th, 2009 at 02:16 PM.
Reply With Quote
Old October 19th, 2009, 09:42 AM   #13 (permalink)
New Member
 
Join Date: Oct 2009
Posts: 2
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Drakaz, Kam187,

Here is some work around the coloring on WinNT+ (XP, etc).

Add the line:
DEVICE=%SystemRoot%\system32\ANSI.SYS
in file :
C:\WINDOWS\system32\CONFIG.NT

Then lanch a command.com (and not a "cmd")

Try color mode using :
PROMPT $E[0;32;40m$P$G$E[0;32;40m

This shows the the ANSI X3.64 syntax/escaping work.

Now, the problem is that if you launch an "adb shell" you still do not get get ASCII sequence work

You get sequences like :
"←[01;32m[root@galaxy←[01;31m:←[01;34m/]←[00m"

My current understanding is that the ESC char might be the wrong one (some unicode char is displayed instead of the ESC used, why ?!?).

If you dont like the limitations of command.com you can also use TCC LE (previous version was called 4NT) and use the command SETDOS /A1 that enables the ANSI translation under TCC. You will used then the same commands and fail at the same place : this really make me thing there is an problem with the ESC value send thru ADB

Any idea what is going wrong around the ESC ?

Rgs,
TM
Attached Images
File Type: jpg command-color.jpg (19.0 KB, 16 views)
testman is offline  
Reply With Quote
Old October 19th, 2009, 11:21 AM   #14 (permalink)
Senior Member
 
kam187's Avatar
 
Join Date: Aug 2009
Location: UK
Posts: 1,320
 
Device(s): Nexus One
Thanks: 3
Thanked 45 Times in 28 Posts
Default

I messed around with all of this too! In the end I just gave up and used ssh. I'll have another look when I have some time, but with the bat files, the ssh method is pretty easy too.
kam187 is offline  
Reply With Quote
Old October 19th, 2009, 11:59 AM   #15 (permalink)
Junior Member
 
Join Date: Oct 2009
Posts: 21
 
Device(s):
Thanks: 0
Thanked 1 Time in 1 Post
Default

Kam187++ As with many other posts, thanks for the suggestions using the shell with putty. Simple and works great.


Pegasus21++ Thanks for the comments re: ash/bash. I don't use *nix very often, so little reminders are quite helpful.


It may not be necessary to have this ability, but when you do, its nice that it's this easy.
Nefser is offline  
Reply With Quote
Old October 20th, 2009, 01:04 PM   #16 (permalink)
New Member
 
Join Date: Oct 2009
Posts: 2
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy more tests

Can anybody with a factory version of a phone (not a drakaz build) test the following command :

printf "esc\x1bape\n"

With drakaz distro, the result I get in the shell is :

esc←ape

Which means that instead of \u001B you get \u2190

There must be something in the write process that is wrong with win32.

Anybody with a cygwin version of adb under win32 to check it it is doing the same mistake ?

Is the android bash UTF_8 ? UTF_16 ?
testman is offline  
Reply With Quote
Old April 10th, 2010, 01:07 AM   #17 (permalink)
New Member
 
ectomorph's Avatar
 
Join Date: Mar 2010
Location: St Andrews, Vic, Australia
Posts: 13
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ectomorph Send a message via Skype™ to ectomorph
Default

I'm trying to putty/ssh into my phone, username is root but whats the password ? I just enabled SSH in galaxo config so i assume there must be a default pw or something?
ectomorph is offline  
Reply With Quote
Old April 10th, 2010, 01:26 AM   #18 (permalink)
New Member
 
ectomorph's Avatar
 
Join Date: Mar 2010
Location: St Andrews, Vic, Australia
Posts: 13
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ectomorph Send a message via Skype™ to ectomorph
Default

Sorry, being thick (should read instructions more carefully ). Sorted!
ectomorph is offline  
Reply With Quote
Reply

Buy the Samsung i7500
Sign up for instant notification when the Samsung i7500 goes on sale!
Samsung i7500

When Samsung joined the Open Handset Alliance, excitement and anticipation engulfed the mobile world. With industry leading mobile phones such as the Samsung Instinct and Samsung Omnia already on the market, expectations soared. The speculation can f... Read More


Bookmarks


Go Back   Android Forums > Android Phones > Samsung i7500 > i7500 - All Things Root User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
galaxo karnadhar1389 i7500 - All Things Root 2 December 21st, 2010 08:09 AM
New Galaxo Installation problems.. Importing contacts and applying new themes (Galaxo 1.6.3.3) voodoochild16 i7500 - All Things Root 8 September 1st, 2010 05:45 PM
who is porting putty? jptech Android Applications 4 November 1st, 2009 01:07 AM



All times are GMT -5. The time now is 07:05 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo


SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.