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 service 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 adb 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!