最終更新:2022-06-26 (日) 22:47:22 (662d)  

adb backup
Top / adb backup

Android 4.0以降では、adb backupというコマンドを利用して、アプリデータやsdcard領域のデータをバックアップすることができる

help

  adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all] [-system|-nosystem] [<packages...>]
                               - write an archive of the device's data to <file>.
                                 If no -f option is supplied then the data is written
                                 to "backup.ab" in the current directory.
                                 (-apk|-noapk enable/disable backup of the .apks themselves
                                    in the archive; the default is noapk.)
                                 (-obb|-noobb enable/disable backup of any installed apk expansion
                                    (aka .obb) files associated with each application; the default
                                    is noobb.)
                                 (-shared|-noshared enable/disable backup of the device's
                                    shared storage / SD card contents; the default is noshared.)
                                 (-all means to back up all installed applications)
                                 (-system|-nosystem toggles whether -all automatically includes
                                    system applications; the default is to include system apps)
                                 (<packages...> is the list of applications to be backed up.  If
                                    the -all or -shared flags are passed, then the package
                                    list is optional.  Applications explicitly given on the
                                    command line will be included even if -nosystem would
                                    ordinarily cause them to be omitted.)

  • adb backup -f 任意のファイル名 -apk -obb -shared -all -system
  • adb backup -apk -shared -all
  • adb backup -apk -obb? <package>
  • adb restore backup.ab

GUI

  • adb restore?

メモ

関連

参考