frameworks/base/services/core/java/com/android/server/power/PowerManagerService.java public void reboot(boolean confirm, String reason, boolean wait) { mContext.enforceCallingOrSelfPermission(android.Manifest.permission.REBOOT, null); if (PowerManager.REBOOT_RECOVERY.equals(reason)) { mContext.enforceCa...
写这个的原因是在一个新的方案中,发现reboot recovery无法进入recovery模式。按照以往的理解,我一直以为android到recovery流程是因为在misc分区中写入了boot-recovery字段,但是翻来翻去,也没找到是在哪里写入,所以跟了一下reboot流程,发现boot-recovery的写入好像不是我原来想的那么一回事 ,这个流程不是在上层做的。 以...
1、recovery函数: #define UPDATE_TITLE "--update_package=" #define UPDATE_COMMAND_FILE "/cache/recovery/command" #define UPDATE_FLAG_FILE "/cache/recovery/last_flag" #define LAST_INSTALL_FILE "/cache/recovery/last_install" #define LAST_LOG_FILE "/cache/recovery/last_log" #define LAST_LOCALE...
boot_into_recovery = 1; // Boot in recovery mode return 0; } valid_command = 1; strlcpy(msg.command, "", sizeof(msg.command)); // to safe against multiple reboot into recoverystrlcpy(msg.status, "OKAY", sizeof(msg.status)); set_recovery_message(&msg); // send recovery message b...
There is a catch: The image must be new and have never been generated into a preview thumbnail before. Actual result:Upon receival, screen flickering, complete and absolute loss of control via hardware keys, the device will flicker until death which means full shutdown to recovery mode. The ...
* 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 ...
__reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART2, “recovery”); 一些关键的进程运行异常,会重启进入recovery模式,这里用__reboot函数进入recovery。跟踪这个函数,由系统调用处理函数,到kernel_restart(char *cmd),最终调用machine_restart使用体系结构相关的代码完成重启。
factory_reset是进recovery 界面 update 是选择了ota 包后直接进入的recovery 升级流程 以reboot mode 为update caes 为例,其流程如下 "update="\/*first usb burning, second sdc_burn, third ext-sd autoscr/recovery, last udisk autoscr/recovery*/\"run usb_burning; "\"run sdc_burning; "\"if mmc...
本文主要关注 Android 系统底层的 Reboot 流程,主要涉及 Native、Kenrel、Recovery、Bootloader。 Framework 中 Reboot 流程 Reboot 在 Android 系统中主要通过物理按键或UI菜单进行触发,最终由 PowerManager 执行 Reboot 流程。下图描述了 Reboot 执行时,Framework 中相关线程的状态,最终将 Reboot 相关信息设置到属性sys....
这样初步定位到该界面显示的代码在:bootable/recovery/下。 进一步分析源码,很容易得到界面选择的源码(http://androidxref.com/7.0.0_r1/xref/bootable/recovery/recovery.cpp#1046): 10251026// Return REBOOT, SHUTDOWN, or REBOOT_BOOTLOADER. Returning NO_ACTION1027// means to take the default, which is ...