mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-05-04 15:54:25 +02:00
fix(root-install): create service and postfs directories if they dont exist (#1116)
Fixes #860
This commit is contained in:
parent
acec064cb7
commit
9a66b6e50d
@ -153,6 +153,9 @@ class RootAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> installServiceDScript(String packageName) async {
|
Future<void> installServiceDScript(String packageName) async {
|
||||||
|
await Root.exec(
|
||||||
|
cmd: 'mkdir -p "$_serviceDDirPath"',
|
||||||
|
);
|
||||||
final String content = '#!/system/bin/sh\n'
|
final String content = '#!/system/bin/sh\n'
|
||||||
'while [ "\$(getprop sys.boot_completed | tr -d \'"\'"\'\\\\r\'"\'"\')" != "1" ]; do sleep 3; done\n'
|
'while [ "\$(getprop sys.boot_completed | tr -d \'"\'"\'\\\\r\'"\'"\')" != "1" ]; do sleep 3; done\n'
|
||||||
'base_path=$_revancedDirPath/$packageName/base.apk\n'
|
'base_path=$_revancedDirPath/$packageName/base.apk\n'
|
||||||
@ -166,6 +169,9 @@ class RootAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<void> installPostFsDataScript(String packageName) async {
|
Future<void> installPostFsDataScript(String packageName) async {
|
||||||
|
await Root.exec(
|
||||||
|
cmd: 'mkdir -p "$_postFsDataDirPath"',
|
||||||
|
);
|
||||||
final String content = '#!/system/bin/sh\n'
|
final String content = '#!/system/bin/sh\n'
|
||||||
'stock_path=\$(pm path $packageName | grep base | sed \'"\'"\'s/package://g\'"\'"\')\n'
|
'stock_path=\$(pm path $packageName | grep base | sed \'"\'"\'s/package://g\'"\'"\')\n'
|
||||||
r'[ ! -z $stock_path ] && umount -l $stock_path';
|
r'[ ! -z $stock_path ] && umount -l $stock_path';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user