1
0
Fork 0
knowledge-base/KB/Android/backup-smartphone-full.bat

30 lines
937 B
Batchfile

chcp 65001
@echo off
set "BACKUP_DIR=%systemdrive%%homepath%"
set "BACKUP_FILE=%BACKUP_DIR%\%date%-backup.ab"
rem Determine adb
where /q adb
IF ERRORLEVEL 1 (
ECHO adb is missing. Ensure it is installed and placed in your PATH
EXIT 1
) ELSE (
echo Extracting to %BACKUP_FILE%
echo Backup might take a while and adb shows no progress bar
echo !!!!!!
echo Internal storage is included! Additional storage like SD cards are maybe not! Backup manually.
echo !!!!!!
rem POSSIBLE BACKUP ADB PARAMETERS
rem -apk/-noapk: do/don't back up .apk files default -noapk
rem -obb/-noobb: do/don't back up .obb files default -noobb
rem -shared OR -noshared: do/don't back up shared storage default -noshared
rem -all: back up all installed applications
rem -system OR -nosystem: include system apps in -all default -system
adb backup -apk -obb -shared -all -system -f "%BACKUP_FILE%"
echo Finished
)
PAUSE