fastboot

来源:互联网 发布:软件测试基本原理 编辑:程序博客网 时间:2024/04/28 18:20

1 bootloader增加解锁密码

diff --git a/app/aboot/aboot.c b/app/aboot/aboot.c

index e4d46e4..1b4b450 100755
--- a/app/aboot/aboot.c
+++ b/app/aboot/aboot.c
@@ -2613,6 +2613,20 @@ void cmd_oem_unlock(const char *arg, void *data, unsigned sz)
 
 void cmd_oem_unlock_go(const char *arg, void *data, unsigned sz)
 {
+        // oem-start
+        char *p = (char *)arg;
+        if (!arg) {
+                fastboot_fail("[oem] key in password please, \"fastboot oem unlock-go [pwd]\"");
+                return;
+        }
+
+        while (isspace(*p)) p++;
+        if (strncmp(p, "12345678", strlen("12345678"))) {
+                fastboot_fail("[oem] wrong password, \"fastboot oem unlock-go [pwd]\"");
+                return;
+        }
+        // oem-end
+
     if(!device.is_unlocked || device.is_verified)
     {

         if(!is_allow_unlock) {


Fastboot command call chain as shown below, from the viewpoint of device-side.
Figure 1-1 Fastboot Command Call Chain


TODO: