#1
|
|||
|
|||
support for adb shell terminal
hi there,
adb stands for Android Debug Bridge and is a protocol to talk to an android phone in "USB debugging" mode with "adb shell" you can access the android shell and do all sorts of stuff, it's running SElinux. adb does not require a rooted phone. I would love to see SecureCRT support this protocol, since the terminal that you get from "adb shell" is really poor and buggy. a user on a popular forum already patched PuTTY to make this work: https://forum.xda-developers.com/sho...d.php?t=803225 the patch is pretty straight-forward. Code:
- Turn off line discipline in settings - Use RAW mode to connect to localhost:5037 - Enter "0012transport-usb" (without quotes) - Enter "0006shell:" (without quotes) |
#2
|
|||
|
|||
Hi Jackson1,
I have created a feature request on your behalf in our product enhancement database to add support for ADB (Android Debug Bridge) shell terminal. Should a future release of SecureCRT include this feature, notification will be posted here. If you prefer direct email notification, send an email to support@vandyke.com and include Feature Request - Forum Thread #14183 in the subject line or use this form from the support page of our website.
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#3
|
|||
|
|||
Hi Jackson1,
Does this workaround succeed?
Expect: {leave this empty}
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#4
|
|||
|
|||
this is a great idea. thanks alot.
i have been trying to make the Raw connection work for quite a while. but was unsuccessful. i ended up even recording all 127.0.0.1 traffic with Code:
RawCap.exe 127.0.0.1 SecureCRT is configured as suggested by Brenda. the PCAP however shows, that the socket connection to 127.0.0.1:5037 was established (there is a SYN/ACK from 5037) but nothing else happened after that. it appears SecureCRT did not even attempt in sending the "Logon Actions" i tried a bunch of things, also tried to disable "send initial carriage return" - but at no time, did I have a packet in my PCAP that send anything to 5037. so i tested the same with Code:
adb shell recorded a PCAP too. and there you can clearly see how the host and client establish a handshake, adb sends things like Code:
000chost:version Code:
0004OKAY |
#5
|
|||
|
|||
Hi Jackson1,
Well, it was worth a shot! ![]()
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 Last edited by bgagnon; 05-21-2020 at 07:09 AM. |
#6
|
|||
|
|||
Hi Jackson1,
My manager came up with an alternate suggestion you can try.
Code:
# $language = "python" # $interface = "1.0" crt.Screen.Synchronous = True crt.Screen.Send("000ehost:tport:any") crt.Screen.WaitForString("OKAY") crt.Screen.WaitForString("\002") crt.Screen.Send("0021shell,v2.TERM=xterm-256color,pty:") crt.Screen.WaitForString("OKAY") crt.Screen.SendSpecial("MENU_CLEAR_SCREEN_AND_SCROLLBACK")
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
#7
|
|||
|
|||
adb shell working with SecureCRT
thanks again brenda.
great idea to use a script. i have been working on making a script for a while, and finally made it work!! the attached script certainly didn't work for me. here is what finally worked: Code:
# $language = "python" # $interface = "1.0" crt.Screen.Synchronous = True crt.Screen.Send("0012host:transport-usb") crt.Screen.WaitForString("OKAY") crt.Screen.Send("0006shell:") crt.Screen.WaitForString("OKAY") crt.Screen.SendSpecial("MENU_CLEAR_SCREEN_AND_SCROLLBACK") one more change I did: While the adb shell does generally work with the "Raw" connection type, the output of a command like "ls -la" will be "scrambled", meaning some lines are out of order and displayed together with another line, missing the new-line etc. I tried a few terminal emulation modes, but that didnt help what helped: change the connection type from Raw to Telnet! I had to also enable Force character at a time mode in the Telnet options of the session, otherwise sending the new-line character had some weird behavour. So finally, it appears to work just fine! Many thanks again |
#8
|
|||
|
|||
Hi Jackson1,
Thanks for posting of your success! I am glad to hear you were able to resolve the issue. Have a great weekend!
__________________
Thanks, --Brenda VanDyke Software Technical Support support@vandyke.com (505) 332-5730 |
![]() |
Currently Active Users Viewing This Thread: 2 (0 members and 2 guests) | |
Thread Tools | |
Display Modes | |
|
|