2

Whenever I run input command through my bash shell of Slackware 14.1 in the adb shell, the adb shell exits after executing the command, which is highly unproductive. The temporary get around for this issue is to reboot the device. But the problem again pop up after first or second execution of input.

My input command is simple: input touchpad tap 413 250

I run adb shell in Bash, execute input command, and then it exits automatically.

Any suggestion of how do I get rid of this issue?


There is another issue. I cannot see the previous command typed in adb shell by pressing "UP" key in keyboard. On the other hand, I can see the previous commands in my other machine running Linux Mint 17. What could be the reason and what should be done to get rid of this issue?


Edit:

Android Device : Micromax Canvas 2 Plus A110q

Android Version : 4.2.1

Kernel version: 3.4.5

migrated from unix.stackexchange.com Apr 24 '15 at 22:51

This question came from our site for users of Linux, FreeBSD and other Un*x-like operating systems.

  • That sounds like an Android issue, not a Linux issue. Does it happen with other commands? Does it happen when you run adb from other machines? Does it happen on other Android devices? – Gilles Apr 24 '15 at 21:48
  • @Gilles: The issue isn't reproducible at will. Its not happening now either on my or on another machine. Note that I didn't restart any of my machine since this post and when I posted this issue, I already tried restarting my device and machines. I don't have any device at my disposal now. It will take 24 hours to get my hands on one. – Firelord Apr 24 '15 at 22:12
0

adbd in normal operation defaulted in it's source code to /system/bin/sh and, in recovery to /sbin/sh trying to get bash scrollback may succeed by first passing

export SHELL=/system/bin/bash or xbin/bash as the case may be.

It could be on completion of the command executed in bash without exporting the $SHELL variable adbd kicks back to sh and crashes. I'm guessing something to do with a child process getting "lost" ?

Thinking on it, you could mod adb code to default to bash explicitly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.