Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
Magisk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Magisk
Commits
3e48427e
Commit
3e48427e
authored
Feb 22, 2018
by
worstperson
Committed by
John Wu
Mar 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for the new NOOK_MAGIC
The new cmdline value that's been in use since Marshmallow
parent
31360c34
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
bootimg.c
native/jni/magiskboot/bootimg.c
+2
-1
format.h
native/jni/magiskboot/format.h
+1
-0
No files found.
native/jni/magiskboot/bootimg.c
View file @
3e48427e
...
@@ -124,7 +124,8 @@ int parse_img(const char *image, boot_img *boot) {
...
@@ -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
;
...
...
native/jni/magiskboot/format.h
View file @
3e48427e
...
@@ -39,6 +39,7 @@ typedef enum {
...
@@ -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 })
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment