Malinskiy/adam

PullRequest doesn't pull empty files or doesn't pull files after an empty file

DEcSENT opened this issue ยท 2 comments

Describe the bug
I can't pull empty files from device.
If I have files mixed with an empty file, only the files before the empty file will be pulled.

To Reproduce
Create empty file or files mixed with empty file on device. And then try to pull files:

private suspend fun pullFiles(adb: AndroidDebugBridgeClient) {
    val newFile = File("files")
    val request = PullRequest(
        source = "/sdcard/testdir",
        destination = newFile,
        supportedFeatures = emptyList()
    )

    val isOk = adb.execute(
        request = request,
        serial = "emulator-5554"
    )
    if (isOk) {
        println("Ok")
    } else {
        println("Not ok")
    }
}

Expected behavior
All files are pulled.

Android device (please complete the following information):

  • Device: Android emulator 32.1.11, Pixel 5
  • OS: Android 12.0 official
  • Adam Version: 0.5.1

Additional context
I understand that empty files may not make sense, but some tools may generate empty files, and I want to pull all files in one request.


Thank you for the great tool ๐Ÿ™‚

Hi! Thanks for raising this issue.

Would it be possible for you to work on a PR with a fix?

Thanks

Would it be possible for you to work on a PR with a fix?

I will try to watch it on the weekends ๐Ÿ‘Œ