Pasting text into Android emulator clipboard using adb shell
Use below command.
service call clipboard 2 i32 1 i32 18 s16 thisisinsertedtext
I think that the first one, "i32 1" is how many elements in clipboard. So, just one.Second is a length of string.The command written above shows...
Result: Parcel(00000000 '....') This usually means OK, no error.
So, my question is, is there any way to copy unicode string?I mean, muti-byte character sets, like Korean.I tried many way, but it failed.
Looks like all 3 old methods are deprecated since API Level 11 so it won’t work for ICS
Not clear if it's even possible to make it work with service call clipboard anymore...
static final int TRANSACTION_getClipboardText 1static final int TRANSACTION_hasClipboardText 3static final int TRANSACTION_setClipboardText 2
www.androidjavadoc.com/1.0_r1_src/constant-values.html
http://developer.android.com/reference/android/content/ClipboardManager.html
http://developer.android.com/guide/topics/text/copy-paste.html
adb shell service call clipboard 2 i32 1 i32 1 s16 "你好吗"
Result: Parcel(00000000 '....')
That is OK.
"你好吗" is Chinese character.
The second 'i32 1' can be any integer, maybe...