How to send the file from android device to appium server


Nice to meet you, everyone.

I have faced hurdle while studying the appium.

I want to know how to transfer the screenshot file from the android device to the appium server (and to the test PC).

I have to add similar function in appium structure.

I see the source code of android bootstrap, but it is just using the function below

Is there anyone else to help me ?

If u have remote and local path of any file (text,image,video) then you can transfer to and from local to device or vice versa… using below methods


Internally appium uses adb pull and adb push commands for these methods
If this is want you want and need sample source code for these methods push and pull file method I can share…

1 Like

Thank you for reply.

But my code is in the bootstrap. The bootstrap is copied to the android device by the appium server.
Your reply means that the test script code transfers the file from or to the device. is it right?
I have to transfer the file from the device in the bootstrap code(not script code) to appium server.

If I misunderstand your means, please send me the sample code.

Thank you!!

Yes my reply means test script running on device via appium server can transfer file to and from device storage /local storage using script code (method given by appium).

I am unaware regrading bootstrap code.