How push and pull works in android

How PULL a file from a device and Pushing a file from desktop to mobile works in Appium for android ?

Because the client and server may not be on the same physical/virtual device, you need to copy the file from the client to the server. We’ve written the following methods (in Ruby) to do just that for us:

def push_file(source, dest)
  contents =
  appium.push_file(dest, contents)

def pull_file(source, dest)
  contents = appium.pull_file(source), 'wb') {|f| f.write(contents) }

How dos this work with java, checked this pull and push usage but doesnot gives a clear view of pushing apk, image, files or folder

@bibek_sahoo, it works the same way. The link you provided had to do with the file encoding, not whether or not the push and pull worked.

use adb if it can help you:

adb -s udid push path/to/desktop/file /path/to/save/file/on/device (ex: /mnt/sdcard/DCIM/)

Note that adb will only work if the server is on the same box as the client.