【Android】SDK工具学习 - bmgr

bmgr官方文档 

我自己的理解就是bmgr也是一款命令行工具,主要操作Android设备中的Backup Manager(支持API8.0以上的ADT)

主要就是备份(Backup)和还原(Restore)两个操作

  • 备份操作:
adb shell bmgr backup <package>

  *package是要备份的应用名

  • 备份所有的应用程序
adb shell bmgr run
  • 还原操作
adb shell bmgr restore <package>

 *看外网是这样操作的。

  1. Install the app in device A.
  2. Set any data or preferences in device A.
  3. Force a backup on device A. (Using adb shell bmgr backup [app_name], adb shell bmgr run).
  4. Grab a second device B.
  5. Perform a factory reset on device B.
  6. Once reset, install the app again.
  7. The restore operation should be successful.

*其他命令

查看Backup Manager是否开启

adb shell bmgr enabled

然后可以根据情况,打开或关闭它

adb shell bmgr enable <boolean> //true or false

清理历史数据

adb shell bmgr wipe <package>

 

posted on 2014-11-12 09:54  Jenny_HUI  阅读(454)  评论(0编辑  收藏  举报

导航