No support for partitions w/o symlink in /system

This commit is contained in:
LoveSy 2023-03-04 02:19:51 +08:00 committed by John Wu
parent 9e07eb592c
commit 981ccabbef
2 changed files with 2 additions and 4 deletions

View File

@ -120,7 +120,7 @@ All files you want to replace/inject should be placed in this folder. This folde
If you place a file named `.replace` in any of the folders, instead of merging its contents, that folder will directly replace the one in the real system. This can be very handy for swapping out an entire folder. If you place a file named `.replace` in any of the folders, instead of merging its contents, that folder will directly replace the one in the real system. This can be very handy for swapping out an entire folder.
If you want to replace files in `/vendor`, `/vendor_dlkm`, `/product`, `/system_ext`, `/system_dlkm`, `/odm`, or `/odm_dlkm`, please place them under `system/vendor`, `system/product`, and `system/system_ext` respectively. Magisk will transparently handle whether these partitions are in a separate partition or not. If you want to replace files in `/vendor`, `/product`, or `/system_ext`, please place them under `system/vendor`, `system/product`, and `system/system_ext` respectively. Magisk will transparently handle whether these partitions are in a separate partition or not.
#### Zygisk #### Zygisk

View File

@ -283,9 +283,7 @@ void load_modules() {
if (!system->is_empty()) { if (!system->is_empty()) {
// Handle special read-only partitions // Handle special read-only partitions
for (const char *part : { "/vendor", "/vendor_dlkm","/product", for (const char *part : { "/vendor", "/product", "/system_ext" }) {
"/system_ext", "/system_dlkm",
"/odm", "/odm_dlkm" }) {
struct stat st{}; struct stat st{};
if (lstat(part, &st) == 0 && S_ISDIR(st.st_mode)) { if (lstat(part, &st) == 0 && S_ISDIR(st.st_mode)) {
if (auto old = system->extract(part + 1)) { if (auto old = system->extract(part + 1)) {