-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: /system/etc/hosts might be filesystem-writable but the enclosing filesystem itself might not be mounted writable
- Loading branch information
1 parent
d840fa9
commit 3ecd8f2
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/system/bin/sh | ||
|
||
exec 2>&1 | ||
|
||
[ "$BOOTMODE" != "true" ] && abort "Please install this module within the Magisk app." | ||
|
||
# path to already installed module | ||
INSTALLEDMODPATH=/data/adb/modules/MagicalProtection | ||
|
||
[ ! -d "$INSTALLEDMODPATH" ] && return 0 | ||
[ ! -w /system/etc/hosts ] && return 0 | ||
|
||
ui_print "- Performing in-place update" | ||
|
||
cp -v -r -f "$MODPATH"/* "$INSTALLEDMODPATH" | ||
cp -v -f "$MODPATH"/system/etc/hosts /system/etc/hosts | ||
|
||
rm -v -r "$MODPATH" | ||
|
||
exit 0 |