Anyone with updater-script knowledge would be helpful.
I'm trying to make changes to my updater-script in my ROM to mount /system and /data in EXT4 or F2FS accordingly. This is to reduce the number of ROMs I have to upload (one for each file system type), plus it saves time for people who switch back and forth. And I believe this could help other ROMs also
So far I've come up with this ifelse condition:
The main idea behind this is the recovery (I'm using TWRP, so I can't speak for Philz or CWM) will attempt to mount /system in EXT4 first. If it succeeds in the initial mount, it should print out the "mount in EXT4" line, which in testing has worked for me. I am in F2FS and I see that the initial mount fails and goes to the second mount. More of my testing with "is_mounted()" shows that if I go to the F2FS part, /system is not mounted yet until it runs mount with F2FS as the argument.
I made a test zip that, after this line, pushes a test file to /system/bin and also changes it's permissions successfully. I'll include it to download for anyone else who can test this for me.
Can anyone think of reasons why this is bad in practice? Or if this will cause any issues? The goal is that this will end up in a ROM's updater-script so I'd like to know anything before I start testing this myself. Thank you!
I'm trying to make changes to my updater-script in my ROM to mount /system and /data in EXT4 or F2FS accordingly. This is to reduce the number of ROMs I have to upload (one for each file system type), plus it saves time for people who switch back and forth. And I believe this could help other ROMs also
So far I've come up with this ifelse condition:
Code:
ifelse(mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system"),
# /system EXT4 mount
ui_print("Mounting /system in EXT4 mode");
sleep(1),
# /system F2FS mount
ui_print("Mounting /System in F2FS mode");
mount("f2fs", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
sleep(1));
I made a test zip that, after this line, pushes a test file to /system/bin and also changes it's permissions successfully. I'll include it to download for anyone else who can test this for me.
Can anyone think of reasons why this is bad in practice? Or if this will cause any issues? The goal is that this will end up in a ROM's updater-script so I'd like to know anything before I start testing this myself. Thank you!
Attachments
-
222.3 KB Views: 10