Recovery 简介

概述

Recovery模式指的是一种可以对安卓机内部的数据或系统进行修改的模式(类似于windows PE或DOS)。在这个模式下我们可以刷入新的Android系
统,或者对已有的系统进行备份或升级,也可以在此恢复出厂设置。

使用方法

进入方法

首先说下进入recovery的方法:
1、将手机完全关机后,按住音量键下+电源键,进入bootloader界面;
2、按音量键将光标移动到recovery那一行;
3、按电源键,之后手机会自动重启进入recovery模式。
其中音量键为光标选择键,可以用来移动光标,电源键则是确认键。

基本用法

recovery ,用 关机键+音量+/- (依机型不同而不同,不过有些机型可能没有刷入recovery,可自行刷入。)即可进入recovery界面,在这个界面你可以直接用sd 卡上的zip格式的rom 升级或者备份你的系统,老版本的recovery 只有三个选项,但是无法备份系统,只能用update.zip这个文件名的文件升级,不能用任何文件名的zip文件升级。新版本已经多出很多选项可以供你操作。

此外,一般刷rom 之前最好wipe一下(wipe只是抹除rom 以外的个人数据,不会影响rom 本身),也就是返回出厂设置一下比较好,但是这样就会丢失你的所有软件,短信彩信,联系人(备份在google上没有关系)和设置等等,备份或者不wipe 都可以。
recovery的使用原理就和电脑上的GHOST软件一样,起到系统备份与还原作用。当然也可以升级内核,刷补丁等。
recovery的编写是和系统基带联系在一起的,不同的基带版本不能乱刷。注:recovery在部分贴吧中用REC作为简称,用于避免用RE(“RE管理器”也简称“Re”)造成的误会。官方的recovery大多为英文,少数有中文(小米有中英双语)。值得注意的是大部分名牌机在刷了第三方的recovery后无法刷官方的ROM包(华为机可以三键强刷,刷完后recovery会恢复为官方)。
有些特殊机型,需要同时按住音量键+,-和开机键,按音量键-选择,音量键+确定。


主界面

reboot system now:重启手机(刷机完毕选择此项就能重新启动系统)
apply SDcard:update.zip:安装存储卡中的update.zip升级包(你可以把刷机包命名为update.zip然后用这个选项直接升级)
wipe data/factory reset:清除用户数据并恢复出厂设置(刷机前必须执行的选项)
wipe cache partition:清除系统缓存(刷机前执行)(系统出问题也可尝试此选项,一般能够解决)
install zip from SDcard:从SDcard上安装zip升级包(可以执行任意名称的zip升级包,不限制升级包名称)
backup and restore:备份和还原系统(作用和原理如同电脑上的Ghost一键备份和还原)
mounts and storage:挂载和存储选项(详细功能见下面的解释)
advanced:高级设置

备份还原

Backup:备份当前系统
Restore:还原上一个系统
Advanced Restore:高级还原选项(用户可以自选之前备份的系统,然后进行恢复)

挂载格式化

mount /system:挂载system文件夹(基本用不到)
mount /data:挂载data文件夹(基本用不到)
unmount /cache:取消cache文件夹挂载(基本用不到)
unmount /sdcard:取消内存卡挂载(基本用不到)
mount /sd-ext:挂载内存卡Ext分区(基本用不到)
format boot:格式化boot(刷机前最好执行一下)
format system:格式化system(刷机前最好执行一下)
format data:格式化data(刷机前最好执行一下)
format cache:格式化cache(刷机前最好执行一下)
format sdcard:格式化内储卡(执行此项你会后悔的)
format sd-ext:格式化内存卡Ext分区(执行此项你会后悔的)
mount USB storage:开启Recovery模式下的USB大容量存储功能(也就是说可以在Recovery下对内存卡进行读写操作)

其他功能


Reboot Recovery:重启Recovery(重启手机并再次进入Recovery)
Wipe Dalvik Cache:清空虚拟机缓存

Recovery功能概述
/*
 * The recovery tool communicates with the main system through /cache files.
 *   /cache/recovery/command - INPUT - command line for tool, one arg per line
 *   /cache/recovery/log - OUTPUT - combined log file from recovery run(s)
 *   /cache/recovery/intent - OUTPUT - intent that was passed in
 *
 * The arguments which may be supplied in the recovery.command file:
 *   --send_intent=anystring - write the text out to recovery.intent
 *   --update_package=path - verify install an OTA package file
 *   --wipe_data - erase user data (and cache), then reboot
 *   --wipe_cache - wipe cache (but not user data), then reboot
 *   --set_encrypted_filesystem=on|off - enables / diasables encrypted fs
 *   --just_exit - do nothing; exit and reboot
 *
 * After completing, we remove /cache/recovery/command and reboot.
 * Arguments may also be supplied in the bootloader control block (BCB).
 * These important scenarios must be safely restartable at any point:
 *
 * FACTORY RESET
 * 1. user selects "factory reset"
 * 2. main system writes "--wipe_data" to /cache/recovery/command
 * 3. main system reboots into recovery
 * 4. get_args() writes BCB with "boot-recovery" and "--wipe_data"
 *    -- after this, rebooting will restart the erase --
 * 5. erase_volume() reformats /data
 * 6. erase_volume() reformats /cache
 * 7. finish_recovery() erases BCB
 *    -- after this, rebooting will restart the main system --
 * 8. main() calls reboot() to boot main system
 *
 * OTA INSTALL
 * 1. main system downloads OTA package to /cache/some-filename.zip
 * 2. main system writes "--update_package=/cache/some-filename.zip"
 * 3. main system reboots into recovery
 * 4. get_args() writes BCB with "boot-recovery" and "--update_package=..."
 *    -- after this, rebooting will attempt to reinstall the update --
 * 5. install_package() attempts to install the update
 *    NOTE: the package install must itself be restartable from any point
 * 6. finish_recovery() erases BCB
 *    -- after this, rebooting will (try to) restart the main system --
 * 7. ** if install failed **
 *    7a. prompt_and_wait() shows an error icon and waits for the user
 *    7b; the user reboots (pulling the battery, etc) into the main system
 * 8. main() calls maybe_install_firmware_update()
 *    ** if the update contained radio/hboot firmware **:
 *    8a. m_i_f_u() writes BCB with "boot-recovery" and "--wipe_cache"
 *        -- after this, rebooting will reformat cache & restart main system --
 *    8b. m_i_f_u() writes firmware image into raw cache partition
 *    8c. m_i_f_u() writes BCB with "update-radio/hboot" and "--wipe_cache"
 *        -- after this, rebooting will attempt to reinstall firmware --
 *    8d. bootloader tries to flash firmware
 *    8e. bootloader writes BCB with "boot-recovery" (keeping "--wipe_cache")
 *        -- after this, rebooting will reformat cache & restart main system --
 *    8f. erase_volume() reformats /cache
 *    8g. finish_recovery() erases BCB
 *        -- after this, rebooting will (try to) restart the main system --
 * 9. main() calls reboot() to boot main system
 */



转自:http://www.top139.com/shuaji/34.html
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值