adblib icon indicating copy to clipboard operation
adblib copied to clipboard

Call ctrl+c on remote device?

Open Jolanrensen opened this issue 8 years ago • 7 comments

I know it's possible as the original app developer has a Ctrl+C send option in his adb app built in, but I was wondering how to send such a command for myself using this library. I can't seem to find out how.

Jolanrensen avatar Oct 15 '17 15:10 Jolanrensen

Ctrl+C is usually just app termination. What original project are you talking about?

tananaev avatar Oct 16 '17 05:10 tananaev

I mean this app https://play.google.com/store/apps/details?id=com.cgutman.androidremotedebugger. It's built using the plugin and features a ctrl+c option. I don't know how to send such a command myself though

Jolanrensen avatar Oct 18 '17 20:10 Jolanrensen

Is it open source? If not I guess you should ask the author.

tananaev avatar Oct 18 '17 20:10 tananaev

Only the library is open source alas... I already left a message on his github

Jolanrensen avatar Oct 20 '17 13:10 Jolanrensen

Hi @Jolanrensen

Perhaps you can try execute the following shell command through this library:

shell: kill -SIGINT [Process PID]

guadaran avatar Oct 20 '17 14:10 guadaran

@guadaran Thanks for the tip, but for this you will need to get the current PID and that might be hard. I did read something about adb shell having an escape character "~" but I wasn't able to prepend it before a command using this plugin. The actual problem is that the plugin doesn't work as expected on cyanogenmod/lineage os devices and this can be solved in the app by sending ctrl+c so I tried to implement this in my app as well...

Jolanrensen avatar Oct 20 '17 14:10 Jolanrensen

Looks like this has already been answered here: https://github.com/cgutman/AdbLib/issues/8#issuecomment-338238792

sampalmer avatar Nov 18 '20 21:11 sampalmer