Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# fastboot

unlock or lock bootloader for vivo(bbk) devices

步步高手机解锁bootloader专用fastboot
解锁命令fastboot bbk unlock_vivo
上锁命令fastboot bbk lock_vivo

## 编译

准备一套AOSP编译环境,切换到AOSP主目录下,执行`lunch`命令等准备工作。

```
$ cd system/core
$ git clone git@github.com:ppma/fastboot.git fastboot_vivo
$ cd fastboot_vivo
$ mm
```

## 用法

1. 解锁命令

fastboot bbk unlock_vivo

2. 上锁命令

fastboot bbk lock_vivo
4 changes: 2 additions & 2 deletions fastboot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ void *load_bootable_image(const char *kernel, const char *ramdisk,

static void* unzip_file(ZipArchiveHandle zip, const char* entry_name, unsigned* sz)
{
ZipEntryName zip_entry_name(entry_name);
ZipString zip_entry_name(entry_name);
ZipEntry zip_entry;
if (FindEntry(zip, zip_entry_name, &zip_entry) != 0) {
fprintf(stderr, "archive does not contain '%s'\n", entry_name);
Expand Down Expand Up @@ -447,7 +447,7 @@ static int unzip_to_file(ZipArchiveHandle zip, char* entry_name) {
return -1;
}

ZipEntryName zip_entry_name(entry_name);
ZipString zip_entry_name(entry_name);
ZipEntry zip_entry;
if (FindEntry(zip, zip_entry_name, &zip_entry) != 0) {
fprintf(stderr, "archive does not contain '%s'\n", entry_name);
Expand Down