anddisa / android_backup_project Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
There is an issue (at least) with Magisk Canary, as there are some permissions missig to execute the scripts on the device connected, but there is a workaround for this issue:
/sbin/magiskpolicy --live 'allow magisk_client adbd unix_stream_socket {read write ioctl}' 'allow magisk magisk_file sock_file {ioctl}' 'allow magisk_client adbd process {sigchld}' 'allow magisk_file sockfs filesystem {associate}' 'allow magisk_client vendor_file dir {read}' 'allow magisk_client shell_data_file dir {getattr read}' 'allow magisk_client system_data_file dir {getattr}' 'allow magisk_client postinstall_mnt_dir dir {getattr}' 'allow system_server magisk_file sock_file { read write }' 'allow system_server shell unix_stream_socket { getopt }' 'allow adbd oemfs dir { search }' 'allow adbd shell unix_stream_socket shutdown'
Now the scripts should run through as expected
full-restoring script could end without producing any effect
$` ./full-restore.sh --data-backup /mnt/hgfs/H/abb/qcom_2020-05-05_QKQ1.190828.002
parm: /mnt/hgfs/H/abb/qcom_2020-05-05_QKQ1.190828.002
/mnt/hgfs/H/abb/busybox-ndk /mnt/hgfs/H/abb
Already up to date.
/mnt/hgfs/H/abb
Waiting for device...
Devices detected:
List of devices attached
cc00e850 device
Checking for root access...
- Requesting adbd as root...
adbd cannot run as root in production builds
Waiting for device...
shell
root
Determining architecture...
Pushing busybox to device...
busybox-ndk/busybox-arm64: 1 file pushed. 14.5 MB/s (1478208 bytes in 0.097s)
restoring from /mnt/hgfs/H/abb/qcom_2020-05-05_QKQ1.190828.002
Stop Runtime
/mnt/hgfs/H/abb/qcom_2020-05-05_QKQ1.190828.002 /mnt/hgfs/H/abb
Restoring full tar backup of /data excluding /data/media ...
3,31MiB 0:00:00 [50,0MiB/s] [50,0MiB/s]
Do you know why connection getting lost ?
Laptop:~/Downloads/platform-tools/android_backup_project-master$ ./backup_apps.sh
Cloning into 'busybox-ndk'...
remote: Enumerating objects: 475, done.
remote: Counting objects: 100% (32/32), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 475 (delta 21), reused 22 (delta 17), pack-reused 443
Receiving objects: 100% (475/475), 50.30 MiB | 20.61 MiB/s, done.
Resolving deltas: 100% (272/272), done.
Waiting for device...
Devices detected:
List of devices attached
99841d41 device
Checking for root access...
then all the files
package:/data/app/6pU64UU5YEBnDm2dxL1BYw==/com.whatsapp-prT9_wZzOkPEcJ4ZEvbvOw==/base.apk=com.whatsapp
/data/app/6pU64UU5YEBnDm2dxL1BYw==/com.whatsapp-prT9_wZzOkPEcJ4ZEvbvOw==/base.apk
/data/app/6pU64UU5YEBnDm2dxL1BYw==/com.whatsapp-prT9_wZzOkPEcJ4ZEvbvOw==
com.whatsapp
96,2MiB 0:00:05 [8,56MiB/s] [19,2MiB/s]
gzip: stdin: unexpected end of file
97,0MiB 0:00:05 [18,8MiB/s] [18,8MiB/s]
error: no devices/emulators found
gzip: stdin: unexpected end of file
0,00 B 0:00:00 [0,00 B/s] [0,00 B/s]
package:/data/app/TvOkI3A-k55eIF-VMLraeA==/com.weawow-ezKRNHcn6g8jNFMclojZuA==/base.apk=com.weawow
/data/app/TvOkI3A-k55eIF-VMLraeA==/com.weawow-ezKRNHcn6g8jNFMclojZuA==/base.apk
/data/app/TvOkI3A-k55eIF-VMLraeA==/com.weawow-ezKRNHcn6g8jNFMclojZuA==
com.weawow
error: no devices/emulators found
gzip: stdin: unexpected end of file
0,00 B 0:00:00 [0,00 B/s] [0,00 B/s]
error: no devices/emulators found
gzip: stdin: unexpected end of file
0,00 B 0:00:00 [0,00 B/s] [0,00 B/s]
package:/data/app/NsiOLGB6o_RbaqpcXkvatQ==/com.google.android.deskclock-rWtvlVIDdzAJ10ZoRh_wig==/base.apk=com.google.android.deskclock
/data/app/NsiOLGB6o_RbaqpcXkvatQ==/com.google.android.deskclock-rWtvlVIDdzAJ10ZoRh_wig==/base.apk
/data/app/~~NsiOLGB6o_RbaqpcXkvatQ==/com.google.android.deskclock-rWtvlVIDdzAJ10ZoRh_wig==
com.google.android.deskclock
error: no devices/emulators found
On a Samsung S5 Neo (SM-903F):
$. /android_backup_project
Waiting for device...
Devices detected:
List of devices attached
XXXXXXXXXXXXX device
Checking for root access...
1) Requesting adbd as root...
adbd is already running as root
Waiting for device...
root
Determining architecture...
Unrecognized architecture armv8l
I've found a workaround, will submit a PR asap
the system has installed pv 1.6.20, but script is still stopping and showing the error:
"pv is lower than required version: 1.6.6"
seems that thi part isn't working well:
else
v=`echo $pv | head -n 1 | cut -d " " -f2`
if [ "$v" \< "1.6.6" ]; then
echo "$v of pv is lower than required version: 1.6.6"
exit 1
fi
add armv7l architecture for pushing busybox
$ ./full-backup.sh
1.6.20 of pv is lower than required version: 1.6.6
there is an issue with Android <= 8.1 which does not allow installing an application by overwriting which is already installed on the device.
workaround: uninstall the application from the device before restoring the backup
On Debian 10 Buster:
$ ./backup_apps.sh --system-apps
./functions.sh: ligne 84: pv : command not found
Fix:
$ sudo apt install pv
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.