mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-27 12:05:30 +00:00
Add support for the new NOOK_MAGIC
The new cmdline value that's been in use since Marshmallow
This commit is contained in:
parent
31360c34ed
commit
3e48427eaf
@ -124,7 +124,8 @@ int parse_img(const char *image, boot_img *boot) {
|
|||||||
fprintf(stderr, "PXA_BOOT_HDR\n");
|
fprintf(stderr, "PXA_BOOT_HDR\n");
|
||||||
boot->hdr = malloc(sizeof(pxa_boot_img_hdr));
|
boot->hdr = malloc(sizeof(pxa_boot_img_hdr));
|
||||||
memcpy(boot->hdr, head, sizeof(pxa_boot_img_hdr));
|
memcpy(boot->hdr, head, sizeof(pxa_boot_img_hdr));
|
||||||
} else if (memcmp(((boot_img_hdr*) head)->cmdline, NOOK_MAGIC, 12) == 0) {
|
} else if (memcmp(((boot_img_hdr*) head)->cmdline, NOOK_MAGIC, 12) == 0
|
||||||
|
|| memcmp(((boot_img_hdr*) head)->cmdline, NOOK_NEW_MAGIC, 26) == 0) {
|
||||||
boot->flags |= NOOK_FLAG;
|
boot->flags |= NOOK_FLAG;
|
||||||
fprintf(stderr, "NOOK_GREEN_LOADER\n");
|
fprintf(stderr, "NOOK_GREEN_LOADER\n");
|
||||||
head += NOOK_PRE_HEADER_SZ - 1;
|
head += NOOK_PRE_HEADER_SZ - 1;
|
||||||
|
@ -39,6 +39,7 @@ typedef enum {
|
|||||||
#define SEANDROID_MAGIC "SEANDROIDENFORCE"
|
#define SEANDROID_MAGIC "SEANDROIDENFORCE"
|
||||||
#define TEGRABLOB_MAGIC "-SIGNED-BY-SIGNBLOB-"
|
#define TEGRABLOB_MAGIC "-SIGNED-BY-SIGNBLOB-"
|
||||||
#define NOOK_MAGIC "Green Loader"
|
#define NOOK_MAGIC "Green Loader"
|
||||||
|
#define NOOK_NEW_MAGIC "eMMC boot.img+secondloader"
|
||||||
#define NOOK_PRE_HEADER_SZ 1048576
|
#define NOOK_PRE_HEADER_SZ 1048576
|
||||||
|
|
||||||
#define SUP_LIST ((char *[]) { "gzip", "xz", "lzma", "bzip2", "lz4", "lz4_legacy", NULL })
|
#define SUP_LIST ((char *[]) { "gzip", "xz", "lzma", "bzip2", "lz4", "lz4_legacy", NULL })
|
||||||
|
Loading…
Reference in New Issue
Block a user