From 9a66b6e50d88b1b2925684eab9dd5aded03145e5 Mon Sep 17 00:00:00 2001 From: Ushie Date: Wed, 9 Aug 2023 23:57:09 +0300 Subject: [PATCH] fix(root-install): create service and postfs directories if they dont exist (#1116) Fixes #860 --- lib/services/root_api.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/services/root_api.dart b/lib/services/root_api.dart index 4b97900a..f0c7d917 100644 --- a/lib/services/root_api.dart +++ b/lib/services/root_api.dart @@ -153,6 +153,9 @@ class RootAPI { } Future 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 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';