mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01: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
1 changed files with 6 additions and 0 deletions
|
@ -153,6 +153,9 @@ class RootAPI {
|
|||
}
|
||||
|
||||
Future<void> installServiceDScript(String packageName) async {
|
||||
await Root.exec(
|
||||
cmd: 'mkdir -p "$_serviceDDirPath"',
|
||||
);
|
||||
final String content = '#!/system/bin/sh\n'
|
||||
'while [ "\$(getprop sys.boot_completed | tr -d \'"\'"\'\\\\r\'"\'"\')" != "1" ]; do sleep 3; done\n'
|
||||
'base_path=$_revancedDirPath/$packageName/base.apk\n'
|
||||
|
@ -166,6 +169,9 @@ class RootAPI {
|
|||
}
|
||||
|
||||
Future<void> installPostFsDataScript(String packageName) async {
|
||||
await Root.exec(
|
||||
cmd: 'mkdir -p "$_postFsDataDirPath"',
|
||||
);
|
||||
final String content = '#!/system/bin/sh\n'
|
||||
'stock_path=\$(pm path $packageName | grep base | sed \'"\'"\'s/package://g\'"\'"\')\n'
|
||||
r'[ ! -z $stock_path ] && umount -l $stock_path';
|
||||
|
|
Loading…
Reference in a new issue