Skip to content

Commit

Permalink
fix: Do not delete files from post-fs-data.d
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAabedKhan committed Jan 27, 2024
1 parent c7d975e commit 70a1086
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions lib/services/root_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -99,18 +96,9 @@ class RootAPI {
);
}

// TODO(aAbed): remove in the future, keep it for now during migration.
Future<void> 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',
);
}

Expand Down

0 comments on commit 70a1086

Please sign in to comment.