@@ -247,8 +247,13 @@ static int try_mount_all_entries(struct fstab *fstab, struct fstab_part *first_d
247
247
if (stat (" /realdata/unencrypted/key/version" , &info) < 0 ) {
248
248
return 0 ;
249
249
} else {
250
- INFO (" File system is FBE encrypted" );
251
- return -2 ;
250
+ if (!mrom_is_second_boot () && stat (" /realdata/media/MultiROM/multirom" , &info) >= 0 ) {
251
+ INFO (" Multirom found" );
252
+ return 0 ;
253
+ } else {
254
+ INFO (" File system is FBE encrypted" );
255
+ return -2 ;
256
+ }
252
257
}
253
258
}
254
259
}
@@ -273,8 +278,13 @@ static int try_mount_all_entries(struct fstab *fstab, struct fstab_part *first_d
273
278
if (stat (" /realdata/unencrypted/key/version" , &info) < 0 ) {
274
279
return 0 ;
275
280
} else {
276
- INFO (" File system is FBE encrypted\n " );
277
- return -2 ;
281
+ if (!mrom_is_second_boot () && stat (" /realdata/media/MultiROM/multirom" , &info) >= 0 ) {
282
+ INFO (" Multirom found" );
283
+ return 0 ;
284
+ } else {
285
+ INFO (" File system is FBE encrypted\n " );
286
+ return -2 ;
287
+ }
278
288
}
279
289
return 0 ;
280
290
}
@@ -426,7 +436,8 @@ static void switch_root(const char* path) {
426
436
}
427
437
428
438
for (auto i : v) {
429
- if (!strncmp (mentry.mnt_dir , i.data (), i.length ())) {
439
+ if (!strcmp (mentry.mnt_dir , i.data ())) {
440
+ INFO (" %s %s %d not adding to vector\n " , mentry.mnt_dir , i.data (), i.length ());
430
441
add = false ;
431
442
break ;
432
443
} else {
@@ -482,6 +493,17 @@ static int do_cmdline(int argc, char *argv[])
482
493
} else {
483
494
INFO (" chroot returned %d\n " , error);
484
495
}
496
+ struct stat info;
497
+ if (stat (" /system/etc/selinux" , &info) < 0 ) {
498
+ INFO (" /system/etc/selinux does not exist!\n " );
499
+ } else {
500
+ INFO (" /system/etc/selinux exists\n " );
501
+ }
502
+ if (stat (" /vendor/etc/selinux" , &info) < 0 ) {
503
+ INFO (" /vendor/etc/selinux does not exist!\n " );
504
+ } else {
505
+ INFO (" /vendor/etc/selinux exists\n " );
506
+ }
485
507
int res;
486
508
static char *const cmd[] = { " /init" , " selinux_setup" , NULL };
487
509
res = execv (cmd[0 ], cmd);
0 commit comments