mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-16 16:25:11 +00:00
Fix service script for root variant. This should prevent selinux denials after reboot. Fixes https://github.com/YTVanced/Vanced/issues/331.
This commit is contained in:
parent
8be35fec73
commit
04fc790e36
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ object Extensions {
|
|||
fun Context.writeServiceDScript(apkFPath: String, path: String, app: String) {
|
||||
val shellFileZ = SuFile.open("/data/adb/service.d/$app.sh")
|
||||
shellFileZ.createNewFile()
|
||||
val code = """#!/system/bin/sh${"\n"}while [ "`getprop sys.boot_completed | tr -d '\r' `" != "1" ]; do sleep ${getDefaultPrefs().getInt("serviced_sleep_timer", 1)}; done${"\n"}mount -o bind $apkFPath $path"""
|
||||
val code = """#!/system/bin/sh${"\n"}while [ "`getprop sys.boot_completed | tr -d '\r' `" != "1" ]; do sleep ${getDefaultPrefs().getInt("serviced_sleep_timer", 1)}; done${"\n"}chcon u:object_r:apk_data_file:s0 $apkFPath${"\n"}mount -o bind $apkFPath $path"""
|
||||
SuFileOutputStream(shellFileZ).use { out -> out.write(code.toByteArray())}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue