Skip to content

Commit 26893b5

Browse files
committed
Backend: support /system/system (Pixel layout) for do.initd/do.modules
1 parent c13647e commit 26893b5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

META-INF/com/google/android/update-binary

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ ui_print "$(file_getprop /tmp/anykernel/anykernel.sh kernel.string)";
4040
ui_print " ";
4141
ui_print "AnyKernel2 by osm0sis @ xda-developers";
4242
ui_print " ";
43+
umount /system;
4344
mount -o ro -t auto /system;
4445
mount /data;
46+
test -f /system/system/build.prop && root=/system;
4547

4648
if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.devicecheck)" == 1 ]; then
4749
ui_print "Checking device...";
@@ -62,8 +64,8 @@ if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.initd)" == 1 ]; then
6264
ui_print "Creating init.d...";
6365
ui_print " ";
6466
mount -o rw,remount -t auto /system;
65-
mkdir /system/etc/init.d;
66-
set_perm_recursive 0 0 0755 0755 /system/etc/init.d;
67+
mkdir $root/system/etc/init.d;
68+
set_perm_recursive 0 0 0755 0755 $root/system/etc/init.d;
6769
mount -o ro,remount -t auto /system;
6870
fi;
6971

@@ -83,8 +85,8 @@ if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.modules)" == 1 ]; then
8385
ui_print " ";
8486
ui_print "Pushing modules...";
8587
mount -o rw,remount -t auto /system;
86-
cp -rf /tmp/anykernel/modules/* /system/lib/modules/;
87-
set_perm_recursive 0 0 0755 0644 /system/lib/modules;
88+
cp -rf /tmp/anykernel/modules/* $root/system/lib/modules/;
89+
set_perm_recursive 0 0 0755 0644 $root/system/lib/modules;
8890
mount -o ro,remount -t auto /system;
8991
fi;
9092

0 commit comments

Comments
 (0)