Sample Header Ad - 728x90

Send android clipboard content to connected Macbook over ADB

2 votes
0 answers
1157 views
I have connected my Android mobile phone to my Macbook via ADB. Through ADB shell commands, I have copied a text from an application to the Android's clipboard. Now, I would like to send this copied text (clipboard content) to my connected Macbook through ADB. I have tried out either directly pasting the clipboard content with
call clipboard 1
. However, the result is a Parcel and seems not to contain the clipboard content based on my visual observation. Moreover, I have thought about pasting the clipboard content to a file inside the mobile phone's internal storage and then sending this file with
pull
command to my Macbook. However, I have not found appropriate commands for this method. Please note that I also want to keep running the application from which I copied the text on my mobile phone's foreground throughout the whole copy-paste process. Any thoughts, ideas, or comments are appreciated. Thanks in advance!
Asked by Ratep (21 rep)
Feb 2, 2023, 03:43 PM