-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Describe the bug
I am backing up my Android device (creating a tarball) and using zstd to compress it. I am using the commands adb exec-out (to send the output of the command on the Android device to the computer) and adb exec-in (to send the input on the computer to the commamd on the Android device). The problem is that zstd (in the device) can read from stdin during the backup/compress step but refuses to read during the restore/decompress. The same works correctly when using just tar or tar + pigz to compress and decompress.
To Reproduce
Steps to reproduce the behavior:
- Backup:
./adb exec-out "tar -cp /system/bin 2>/dev/null | pigz -1 -f" > system-bin.tar.gz (works)
./adb exec-out "tar -cp /system/bin 2>/dev/null | /data/adb/bin/zstd148 -3 -c" > system-bin.tar.zst (works)
- Restore:
./adb exec-in "pigz -d -f | tar -xp -C /cache 2>/dev/null" < system-bin.tar.gz (works)
./adb exec-in "/data/adb/bin/zstd148 -d -c 2>/cache/zstdlog.txt | tar -xp -C /cache 2>/dev/null" < system-bin.tar.zst (do not work)
The command ends instantly. Checking the zstdlog.txt file:
stdin is a console, aborting
Expected behavior
Just like tar or tar+pigz, read from stdin correctly.
Desktop (please complete the following information):
- OS: Android
- Version: 9
- Compiler: Clang from Android NDK r22
- Build system "make"