From 9d978e0c75bf810b246f95beb51afd7351285fb1 Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sat, 19 Nov 2022 14:55:05 +0100 Subject: [PATCH] Update content --- pages/04.other/20.android/01.adb/default.en.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pages/04.other/20.android/01.adb/default.en.md b/pages/04.other/20.android/01.adb/default.en.md index f8c219d..1eebe01 100644 --- a/pages/04.other/20.android/01.adb/default.en.md +++ b/pages/04.other/20.android/01.adb/default.en.md @@ -8,7 +8,12 @@ visible: true ## Full Storage backup The easiest, and probably intended way to copy files using adb can be seen in the following command. `$ adb pull -a -p /sdcard/ ./` -The exmple here makes a copy of all content in "sdcard", the user's data directory. +The example here makes a copy of all content in "sdcard", the user's data directory. +This is probably still the best way, with compression afterwards on the host system. Simply, because other options don't allow browsing of the file structure properly. +Additionally, this will show a progress meter, allowing for guesses when the transfer will be complete. + +Compress the directory using this command. +`$ tar -cv -I"zstd -19 -T0" -f sdcard.tar.zst ` ### Compressed backup > [Stackoverflow answer](https://stackoverflow.com/a/39429196) @@ -16,7 +21,8 @@ The exmple here makes a copy of all content in "sdcard", the user's data directo Using this command, a backup can be pulled as well. This time however, it is passed to zstd for compression. Tar on the phone doesn't do much except go through all files and send them to the terminal's STDOUT. All the compression happens on the host. *All data has to be transfered first. very slow with USB 2.0* +*Also not readable after the transfer* `$ adb exec-out "tar -cf - /sdcard/* 2>/dev/null" | zstd -19 -T16 -v -o sdcard-2022-11-18.zst` -*this actually works* +*testing* `$ adb exec-out 'GZIP="-9" /system/xbin/busybox tar -czf - /sdcard/*' > sdcard.tar.gz`