Discussion:
ADB push/pull, on Linux, wanting to suppress progress messages
John Dallman
2018-10-03 14:40:13 UTC
Permalink
I'm making quite a lot of use of "adb push" to move test data on to
devices. This is done by shell scripts running on my Linux development
host, whose output is redirected to plain-text log files. And those get
quite a bit of output, thus:

[ 2%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
0%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
0%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
0%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
0%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
0%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
0%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
0%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
0%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
1%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
1%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
1%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
1%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
1%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
1%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
1%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
1%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
2%
[ 3%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
2%
[ 4%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
2%
[ 4%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
2%
[ 4%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
2%
[ 4%]
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release/kid.out:
2%

kid.out is about 54MB, and thus takes several seconds to push. Is there a
way to just get one line per file pushed, or something like that?

I can't find anything in the adb built-in help, or the web page about it at
https://developer.android.com/studio/command-line/adb#issuingcommands. I
took a look at the source on github, but C++ is about my fifth language,
and it will take me quite some time to figure out where the calls to
LinePrinter are coming from. So I'm checking if there's a commonplace
answer to this.

Thanks,

John
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3DKNMNuGMFT101hMB0ty_G3x0iomp%3DmPAWOidDeLyrzWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
'Dan Albert' via android-ndk
2018-10-03 15:50:43 UTC
Permalink
This is not related to the NDK. Could you file a bug at http://b.android.com
so the right people see it?
Post by John Dallman
I'm making quite a lot of use of "adb push" to move test data on to
devices. This is done by shell scripts running on my Linux development
host, whose output is redirected to plain-text log files. And those get
[ 2%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
2%
[ 3%]
2%
[ 4%]
2%
[ 4%]
2%
[ 4%]
2%
[ 4%]
2%
kid.out is about 54MB, and thus takes several seconds to push. Is there a
way to just get one line per file pushed, or something like that?
I can't find anything in the adb built-in help, or the web page about it
at https://developer.android.com/studio/command-line/adb#issuingcommands.
I took a look at the source on github, but C++ is about my fifth language,
and it will take me quite some time to figure out where the calls to
LinePrinter are coming from. So I'm checking if there's a commonplace
answer to this.
Thanks,
John
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3DKNMNuGMFT101hMB0ty_G3x0iomp%3DmPAWOidDeLyrzWQ%40mail.gmail.com
<https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3DKNMNuGMFT101hMB0ty_G3x0iomp%3DmPAWOidDeLyrzWQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhtGOeFec9sJt6OvEGdSUdARd76VEhy7k0_RpXkM-mPDZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
John Dallman
2018-10-03 16:07:32 UTC
Permalink
On Wed, Oct 3, 2018 at 4:51 PM 'Dan Albert' via android-ndk <
Post by 'Dan Albert' via android-ndk
This is not related to the NDK. Could you file a bug at
http://b.android.com so the right people see it?
Certainly, but while it's clearly a developer tools issue, it's not obvious
which category of those it belongs in. Any suggestions?

- Android Studio
- C++
- Emulator or System Images
- Gradle
- Instant Run
- Lint
- NDK
- Profilers
- AndroidX (Support Library)
- Test Support Library

Thanks, John
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3D4c9%3DUznRtx7jid9Wg8oQeXDNswnheCRkcybhGypQjbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
'Dan Albert' via android-ndk
2018-10-03 17:53:06 UTC
Permalink
Huh, good point! I've sent a patch to fix that page, but for now,
https://issuetracker.google.com/issues/new?component=192795
Post by John Dallman
On Wed, Oct 3, 2018 at 4:51 PM 'Dan Albert' via android-ndk <
Post by 'Dan Albert' via android-ndk
This is not related to the NDK. Could you file a bug at
http://b.android.com so the right people see it?
Certainly, but while it's clearly a developer tools issue, it's not
obvious which category of those it belongs in. Any suggestions?
- Android Studio
- C++
- Emulator or System Images
- Gradle
- Instant Run
- Lint
- NDK
- Profilers
- AndroidX (Support Library)
- Test Support Library
Thanks, John
--
You received this message because you are subscribed to the Google Groups
"android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3D4c9%3DUznRtx7jid9Wg8oQeXDNswnheCRkcybhGypQjbw%40mail.gmail.com
<https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3D4c9%3DUznRtx7jid9Wg8oQeXDNswnheCRkcybhGypQjbw%40mail.gmail.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAFVaGhsg68aPFrU16YH7ck1mDGkWQnRH2Nz6enLLj-52Pz9Kcw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
John Dallman
2018-10-04 09:24:10 UTC
Permalink
On Wed, Oct 3, 2018 at 6:53 PM 'Dan Albert' via android-ndk <
Post by 'Dan Albert' via android-ndk
Huh, good point! I've sent a patch to fix that page, but for now,
https://issuetracker.google.com/issues/new?component=192795
Thanks! Opened as https://issuetracker.google.com/issues/117237044.

John
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAH1xqgkyOsrFF9RFT1xiNcesbBYhF-UDW6r4w6GbezSf04F_yw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Alex Cohn
2018-10-04 10:13:27 UTC
Permalink
I believe that

adb push kid.out
/data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release
/dev/null
will do the trick.

BR,
Alex
I'm making quite a lot of use of "adb push" to move test data on to
devices. This is done by shell scripts running on my Linux development
host, whose output is redirected to plain-text log files. And those get
[ 2%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
0%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
1%
[ 3%]
2%
[ 3%]
2%
[ 4%]
2%
[ 4%]
2%
[ 4%]
2%
[ 4%]
2%
kid.out is about 54MB, and thus takes several seconds to push. Is there a
way to just get one line per file pushed, or something like that?
I can't find anything in the adb built-in help, or the web page about it
at https://developer.android.com/studio/command-line/adb#issuingcommands.
I took a look at the source on github, but C++ is about my fifth language,
and it will take me quite some time to figure out where the calls to
LinePrinter are coming from. So I'm checking if there's a commonplace
answer to this.
Thanks,
John
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/5f510a96-cd31-4d96-8071-1f90da6a4f88%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
John Dallman
2018-10-04 11:49:59 UTC
Permalink
Post by Alex Cohn
I believe that
adb push kid.out /data/local/tmp/local_parasolid/lx86/lx86/v310_anda_test/system/release
/dev/null
will do the trick.
Well, yes, of course. That's basic UNIX i/o redirection. But that discards
*all* the information.

We need to know that the push succeeded, it just doesn't need to be at such
great length. Yesterday I pushed two directory trees of test data: the
first was 124,357 files, 11,122,852,629 bytes, and the second 147,727
files, 52,160,722,070 bytes. The log file for those is 127MB, and while it
does contain useful information, it's only a few lines of the file.

I can get pretty close to a good report with

adb push $src $destination | egrep -i 'skipp|error' | egrep -v
'_error|empty directory'

That gets me the end-of-job reports and reasonable hope of getting any
error messages, but there are files in the jobs whose names are "error" and
I can't distinguish between an error on a file called "error" and the
reporting of the file called "error". This is a case where controllable
error reporting by adb will just work better.

Thanks,

John
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/CAH1xqg%3D_qeQ7JkVR4c0%3D4oG6%2B02vzGCKPnnztMw%2BfVDMERRuEg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Alex Cohn
2018-10-04 15:12:16 UTC
Permalink
Have you tried to look at the exit code?

adb push $src $destination > /dev/null && echo OK
Post by John Dallman
Post by Alex Cohn
I believe that
adb push kid.out /data/local/tmp/local_parasoli
d/lx86/lx86/v310_anda_test/system/release >/dev/null
will do the trick.
Well, yes, of course. That's basic UNIX i/o redirection. But that discards
*all* the information.
We need to know that the push succeeded, it just doesn't need to be at
such great length. Yesterday I pushed two directory trees of test data: the
first was 124,357 files, 11,122,852,629 bytes, and the second 147,727
files, 52,160,722,070 bytes. The log file for those is 127MB, and while it
does contain useful information, it's only a few lines of the file.
I can get pretty close to a good report with
adb push $src $destination | egrep -i 'skipp|error' | egrep -v
'_error|empty directory'
That gets me the end-of-job reports and reasonable hope of getting any
error messages, but there are files in the jobs whose names are "error" and
I can't distinguish between an error on a file called "error" and the
reporting of the file called "error". This is a case where controllable
error reporting by adb will just work better.
Thanks,
John
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/54466123-2182-451d-adc2-710f9fa8c7d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...