Android - I want to pass a large string using adb shell command. Is there a restriction on the length of the input string ?

$ adb shell input text


1 Answer 1


According to my search. Max length for adb shell input text is 1024 bytes. Here is the code of adb_client.c Android 4.4

if((len < 1) || (len > 1024)) {
   strcpy(__adb_error, "service name too long");
   return -1;

Reference: https://android.googlesource.com/platform/system/core/+/android-4.4_r1/adb/adb_client.c#184

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .