summaryrefslogtreecommitdiff
path: root/META-INF
diff options
context:
space:
mode:
authorosm0sis <osm0sis@outlook.com>2017-08-20 00:36:17 -0300
committerosm0sis <osm0sis@outlook.com>2017-08-20 01:00:45 -0300
commite6d3b4271efa90640043f222c62137d3ec7f7867 (patch)
tree7430fe262629cdc8e78c39bf1ceb6e11a004b6a2 /META-INF
parentdb7cb4f30642d02a915e85d04d8e6887566ec73c (diff)
Backend: miscellaneous fixes
- fix busybox getting permissions on some devices where chmod does not accept -R to recurse - use busybox for more possibly non-standard broken recovery shell commands - silence some more generally expected/inconsequential stderr
Diffstat (limited to 'META-INF')
-rwxr-xr-xMETA-INF/com/google/android/update-binary11
1 files changed, 6 insertions, 5 deletions
diff --git a/META-INF/com/google/android/update-binary b/META-INF/com/google/android/update-binary
index 6884d87..377c5ba 100755
--- a/META-INF/com/google/android/update-binary
+++ b/META-INF/com/google/android/update-binary
@@ -17,8 +17,8 @@ set_perm_recursive() {
dirs=$(echo $* | $bb awk '{ print substr($0, index($0,$5)) }');
for i in $dirs; do
$bb chown -R $1:$2 $i;
- find "$i" -type d -exec chmod $3 {} +;
- find "$i" -type f -exec chmod $4 {} +;
+ $bb find "$i" -type d -exec chmod $3 {} +;
+ $bb find "$i" -type f -exec chmod $4 {} +;
done;
}
file_getprop() { grep "^$2" "$1" | cut -d= -f2; }
@@ -41,8 +41,9 @@ unzip -o "$ZIPFILE";
if [ $? != 0 -o -z "$(ls /tmp/anykernel/tools)" ]; then
abort "Unzip failed. Aborting...";
fi;
-chmod -R 755 /tmp/anykernel/tools /tmp/anykernel/bin;
bb=/tmp/anykernel/tools/busybox;
+chmod 755 $bb;
+$bb chmod -R 755 /tmp/anykernel/tools /tmp/anykernel/bin;
ui_print "$(file_getprop /tmp/anykernel/anykernel.sh kernel.string)";
ui_print " ";
@@ -84,7 +85,7 @@ if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.modules)" == 1 ]; then
ui_print " ";
ui_print "Pushing modules...";
mount -o rw,remount -t auto /system;
- cp -rLf /tmp/anykernel/modules/* $root/system/lib/modules/;
+ $bb cp -rLf /tmp/anykernel/modules/* $root/system/lib/modules/;
set_perm_recursive 0 0 0755 0644 $root/system/lib/modules;
chcon -R 'u:object_r:system_file:s0' $root/system/lib/modules;
mount -o ro,remount -t auto /system;
@@ -103,6 +104,6 @@ if [ "$(file_getprop /tmp/anykernel/anykernel.sh do.cleanup)" == 1 ]; then
fi;
umount /system;
-umount /data;
+umount /data 2>/dev/null;
ui_print " ";
ui_print "Done!";