From 70a1086edfa992e43a92bc5d6331c7566e628191 Mon Sep 17 00:00:00 2001 From: aAbed Date: Thu, 25 Jan 2024 23:09:43 +0545 Subject: [PATCH] fix: Do not delete files from post-fs-data.d --- lib/services/root_api.dart | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/services/root_api.dart b/lib/services/root_api.dart index 39fe5086..cfe61fc4 100644 --- a/lib/services/root_api.dart +++ b/lib/services/root_api.dart @@ -2,9 +2,6 @@ import 'package:flutter/foundation.dart'; import 'package:root/root.dart'; class RootAPI { - // TODO(aAbed): remove in the future, keep it for now during migration. - final String _postFsDataDirPath = '/data/adb/post-fs-data.d'; - final String _revancedDirPath = '/data/adb/revanced'; final String _serviceDDirPath = '/data/adb/service.d'; @@ -99,18 +96,9 @@ class RootAPI { ); } - // TODO(aAbed): remove in the future, keep it for now during migration. Future removeOrphanedFiles() async { await Root.exec( - cmd: ''' - find $_revancedDirPath -type f -name original.apk -delete - for file in "$_serviceDDirPath"/*; do - filename=\$(basename "\$file") - if [ -f "$_postFsDataDirPath/\$filename" ]; then - rm "$_postFsDataDirPath/\$filename" - fi - done - ''', + cmd: 'find $_revancedDirPath -type f -name original.apk -delete', ); }