Add droidclone

A set of utility scripts for copying apps and files between adb-capable phones using a computer. Preserves the path and attributes.
This commit is contained in:
iAmInAction 2023-07-08 15:18:19 +00:00 committed by GitHub
parent aae0945c85
commit 803431985e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 0 deletions

4
droidclone/apps/list.txt Normal file
View File

@ -0,0 +1,4 @@
org.telegram.messenger
com.ecosia.android
com.discord
free.rm.skytube.oss

View File

@ -0,0 +1,22 @@
#!/bin/bash
txtfile=$(cat list.txt)
echo "Android App pull"
echo "(c) 2023 mueller_minki; Licensed under GPL3"
mkdir out >/dev/null
for i in $txtfile
do
echo "Getting location of $i..."
apkpath=$(adb shell pm path "$i" | grep -oP "^package:\K.*")
echo "Localising finished."
mkdir "out/$i"
for p in $apkpath
do
echo "Pulling $p"
adb pull "$p" "out/$i"
echo "Pulling finished."
done
done

View File

@ -0,0 +1,5 @@
#!/bin/bash
mkdir sdcard >/dev/null
adb pull "/sdcard/" sdcard/

View File

@ -0,0 +1,3 @@
#!/bin/bash
adb push "sdcard" "/"