mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-11 05:42:19 +00:00
Revert DTB patches to in-place binary patches
Since we no longer need to add new properties in the device tree, and all the patches we do removes strings, we can just directly patch the flat device tree in-place, ignoring basically all the higher level DTB structure and format to accomplish 100% compatibility.
This commit is contained in:
@@ -55,7 +55,7 @@ void magisk_cpio::patch() {
|
||||
if (!keepverity) {
|
||||
if (fstab) {
|
||||
fprintf(stderr, "Found fstab file [%s]\n", cur->first.data());
|
||||
patch_verity(cur->second->data, cur->second->filesize, true);
|
||||
cur->second->filesize = patch_verity(cur->second->data, cur->second->filesize);
|
||||
} else if (cur->first == "verity_key") {
|
||||
rm(cur);
|
||||
continue;
|
||||
@@ -63,7 +63,7 @@ void magisk_cpio::patch() {
|
||||
}
|
||||
if (!keepforceencrypt) {
|
||||
if (fstab) {
|
||||
patch_encryption(cur->second->data, cur->second->filesize);
|
||||
cur->second->filesize = patch_encryption(cur->second->data, cur->second->filesize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user