diff --git a/hooks.h b/hooks.h index ebb0fab..2036986 100644 --- a/hooks.h +++ b/hooks.h @@ -32,6 +32,10 @@ void mrom_hook_before_fb_close(void); void tramp_hook_before_device_init(void); #endif +#if MR_DEVICE_HOOKS >= 4 +int mrom_hook_allow_incomplete_fstab(void); +#endif + #endif /* MR_DEVICE_HOOKS */ -#endif /* MR_DEVICE_HOOKS_H */ \ No newline at end of file +#endif /* MR_DEVICE_HOOKS_H */ diff --git a/multirom.c b/multirom.c index 1473445..720f78b 100644 --- a/multirom.c +++ b/multirom.c @@ -1274,7 +1274,14 @@ int multirom_process_android_fstab(char *fstab_name, int has_fw, struct fstab_pa goto exit; if(fstab_disable_part(tab, "/system") || fstab_disable_part(tab, "/data") || fstab_disable_part(tab, "/cache")) - goto exit; + { +#if MR_DEVICE_HOOKS >= 4 + if(!mrom_hook_allow_incomplete_fstab()) +#endif + { + goto exit; + } + } if(has_fw) { @@ -1287,7 +1294,7 @@ int multirom_process_android_fstab(char *fstab_name, int has_fw, struct fstab_pa } // Android considers empty fstab invalid - if(tab->count == 3 + has_fw) + if(tab->count <= 3 + has_fw) { INFO("fstab would be empty, adding dummy line\n"); fstab_add_part(tab, "tmpfs", "/dummy_tmpfs", "tmpfs", "ro,nosuid,nodev", "defaults");