KiTTY icon indicating copy to clipboard operation
KiTTY copied to clipboard

[Bug] KiTTY (0.76.0.1): ADB connection fails.

Open lars18th opened this issue 4 years ago • 7 comments

Thank you @cyd01 for the new version! 👍

In this new version it seems that the ADB support is broken or not implemented. With the same configuration I can open the ADB shell with KiTTY 0.74.4.13p, but with the version 0.76.0.1p it fails. Both binaries are in the same directory, so the configuration is the same. With the new version the session never happens.

Perhaps you know it, but I prefer to comment it. Regards.

lars18th avatar Nov 11 '21 14:11 lars18th

Ok I've added it to the list.
The fact is that I don't know what ABD is :-(
Hard to test it.

cyd01 avatar Nov 12 '21 11:11 cyd01

The fact is that I don't know what ABD is :-( Hard to test it.

😨 I can't belive it!

OK. ADB is the connector to open a shell session inside any Android device. To use it, you need to have installed it in Windows. Then you can connect the Android device (smartphone with debug enabled, or the emulator) using the adb.exe. And when you are connected, then you can open the session (shell) from KiTTY using the "ADB" protocol.

It's very useful.

lars18th avatar Nov 12 '21 15:11 lars18th

Hi @cyd01 ,

This page https://github.com/cyd01/KiTTY/blob/master/docs/pages/0.75.md says: not available anymore .

It will be possible that you'll reintroduce the ADB patch at some point?

lars18th avatar Nov 17 '21 11:11 lars18th

Quite complicated ! The repo https://github.com/sztupy/adbputty says it was last updated ... 11 years ago.

Le mer. 17 nov. 2021 à 12:49, Lars The @.***> a écrit :

Hi @cyd01 https://github.com/cyd01 ,

This page https://github.com/cyd01/KiTTY/blob/master/docs/pages/0.75.md says: not available anymore .

It will be possible that you'll reintroduce the ADB patch at some point?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cyd01/KiTTY/issues/336#issuecomment-971505409, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIESOBQEWXXKDXWCTRCHIPDUMOJGNANCNFSM5H2T63SA .

cyd01 avatar Nov 18 '21 12:11 cyd01

Quite complicated ! The repo https://github.com/sztupy/adbputty says it was last updated ... 11 years ago.

Yeah! But the patch is quite encapsulated, so I feel it will be easy to maintain it. In fact, it only appears as an another protocol connection. And recentlty the original PuTTY has added a lot of new protocols, includins some very older. So, I feel it will be easy to continue supporting it, as the ADB tool just works as a PIPE for input/output.

Therefore, please you can almost keep the code inside KiTTY and I'll try to test it by myself at some point?

Regards.

lars18th avatar Nov 18 '21 15:11 lars18th

Hi @cyd01 ,

Regarding the ADB support, perhaps you want to read this guide: https://www.shangmayuan.com/a/8ef3fa8d84864b2aab67dbe7.html

I tested it using the last version, and it works. So perhaps it will be preferable to provide a simple "scripting" support for it. Regards.

lars18th avatar Feb 10 '22 17:02 lars18th

Here a simple Session configuration that works out the box, so no special patch implied:

  • Create a session and configure with:
    • Host: 127.0.0.1
    • Port: 5037
    • Terminal: Set "Force off" for both "Local echo" and "Local line editing" (That's very IMPORTANT)
    • Session/Scripting: Select "Replay" for this a saved in your session directory (use Browse) with this content:
0012host:transport-any
:OKAY
0006shell:
:OKAY

But first you have to start the adb daemon. So execute first adb.exe devices in your desktop command.

And that's all! if you need other ADB protocols check:

  • transport-any (either usb or local emulator)
  • transport-usb (the only usb device)
  • transport-local (the only emulator)
  • transport:SERIALNUMBER (the concrete device with the appropriate serial number)

I hope this helps and you can remove this patch. But please document this for reference. Regards.

lars18th avatar Feb 10 '22 18:02 lars18th