View Single Post
  #7  
Old 05-22-2020, 12:50 PM
Jackson1 Jackson1 is offline
Registered User
 
Join Date: Nov 2017
Posts: 13
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")
the MENU_CLEAR_SCREEN_AND_SCROLLBACK isn't really required here.

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
Reply With Quote