mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2026-01-23 19:21:03 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
007b518503 | ||
|
|
c6edc620c8 | ||
|
|
3f9d7c9cc0 | ||
|
|
6c1845e246 | ||
|
|
0b2572a730 | ||
|
|
6fc46d632b | ||
|
|
b2a35813f6 | ||
|
|
279b76ad53 | ||
|
|
b550016681 | ||
|
|
3ab5d12f3e | ||
|
|
53bcb8b85f | ||
|
|
94397dcb4c | ||
|
|
53fbee2d44 | ||
|
|
e46ad3595d | ||
|
|
f2b03b6e69 | ||
|
|
0df2a6bdc0 | ||
|
|
df31e5ccd1 |
30
README.md
30
README.md
@@ -5,16 +5,26 @@ The official ReVanced Manager based on Flutter.
|
|||||||
## 🔽 Download
|
## 🔽 Download
|
||||||
To download the Alpha version of Manager, go [here](https://github.com/revanced/revanced-manager/releases/latest) and install the provided APK file.
|
To download the Alpha version of Manager, go [here](https://github.com/revanced/revanced-manager/releases/latest) and install the provided APK file.
|
||||||
|
|
||||||
## 🔴 Issues
|
## 📝 Prerequisites
|
||||||
For suggestions and bug reports, open an issue [here](https://github.com/revanced/revanced-manager/issues/new/choose).
|
1. Android 8 or higher
|
||||||
|
2. Does not work on some armv7 devices
|
||||||
## 💭 Discussion
|
3. [Vanced MicroG](https://github.com/TeamVanced/VancedMicroG/releases) required for YouTube and YouTube Music (Only for non-root)
|
||||||
If you wish to discuss the Manager, a thread has been made under the [#chat](https://discord.com/channels/952946952348270622/1002922226443632761) channel in the Discord server, please note that this thread may be temporary and may be removed in the future.
|
|
||||||
|
|
||||||
## ⚠️ Disclaimer
|
## ⚠️ Disclaimer
|
||||||
*Please note that even though we're releasing the Manager, it is an ALPHA version. Meaning there's a big chance that the Manager might not work at all for you.*
|
*Please note that even though we're releasing the Manager, it is an ALPHA version. There's a big chance that the Manager might not work at all for you.*
|
||||||
|
|
||||||
## Prerequisites
|
## 🔴 Issues
|
||||||
1. Android 8 or higher.
|
For suggestions and bug reports, open an issue [here](https://github.com/revanced/revanced-manager/issues/new/choose).
|
||||||
2. Does not work on armv7
|
|
||||||
3. For YouTube and YouTube Music - Vanced MicroG(Only for non-root).
|
## 💭 Discussion
|
||||||
|
If you wish to discuss the Manager, a thread has been made under the [#development](https://discord.com/channels/952946952348270622/1002922226443632761) channel in the Discord server, please note that this thread may be temporary and may be removed in the future.
|
||||||
|
|
||||||
|
|
||||||
|
## 🛠️ Building Manager from source
|
||||||
|
1. Setup flutter environment for your [platform](https://docs.flutter.dev/get-started/install)
|
||||||
|
2. Clone the repository locally
|
||||||
|
3. Add your github token in gradle.properties like [this](https://github.com/revanced/revanced-documentation/wiki/Building-from-source)
|
||||||
|
4. Open the project in terminal
|
||||||
|
5. Run `flutter pub get` in terminal
|
||||||
|
6. Then `flutter packages pub run build_runner build --delete-conflicting-outputs` (Must be done on each git pull)
|
||||||
|
7. To build release apk run `flutter build apk`
|
||||||
|
|||||||
@@ -76,4 +76,9 @@ dependencies {
|
|||||||
// Signing & aligning
|
// Signing & aligning
|
||||||
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
|
||||||
implementation("com.android.tools.build:apksig:7.2.2")
|
implementation("com.android.tools.build:apksig:7.2.2")
|
||||||
|
|
||||||
|
// MicroG cronet
|
||||||
|
implementation("org.microg:cronet-common:$cronetVersion")
|
||||||
|
implementation("org.microg:cronet-native:$cronetVersion")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
buildscript {
|
buildscript {
|
||||||
|
ext.cronetVersion = '102.5005.125'
|
||||||
ext.kotlin_version = '1.7.10'
|
ext.kotlin_version = '1.7.10'
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
|
|||||||
@@ -142,13 +142,15 @@
|
|||||||
"rootDialogTitle": "Error",
|
"rootDialogTitle": "Error",
|
||||||
"rootDialogText": "App was installed with root mode enabled but currently root mode is disabled.\nPlease enable root mode first.",
|
"rootDialogText": "App was installed with root mode enabled but currently root mode is disabled.\nPlease enable root mode first.",
|
||||||
"packageNameLabel": "Package Name",
|
"packageNameLabel": "Package Name",
|
||||||
|
"originalPackageNameLabel": "Original Package Name",
|
||||||
"installTypeLabel": "Installation Type",
|
"installTypeLabel": "Installation Type",
|
||||||
"rootTypeLabel": "Root",
|
"rootTypeLabel": "Root",
|
||||||
"nonRootTypeLabel": "Non-root",
|
"nonRootTypeLabel": "Non-root",
|
||||||
"patchedDateLabel": "Patched Date",
|
"patchedDateLabel": "Patched Date",
|
||||||
"patchedDateHint": "{date} at {time}",
|
"patchedDateHint": "{date} at {time}",
|
||||||
"appliedPatchesLabel": "Applied Patches",
|
"appliedPatchesLabel": "Applied Patches",
|
||||||
"appliedPatchesHint": "{quantity} applied patches"
|
"appliedPatchesHint": "{quantity} applied patches",
|
||||||
|
"updateNotImplemented": "Update functionality not implemented yet"
|
||||||
},
|
},
|
||||||
"contributorsView": {
|
"contributorsView": {
|
||||||
"widgetTitle": "Contributors",
|
"widgetTitle": "Contributors",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ part 'patched_application.g.dart';
|
|||||||
class PatchedApplication {
|
class PatchedApplication {
|
||||||
String name;
|
String name;
|
||||||
String packageName;
|
String packageName;
|
||||||
|
String originalPackageName;
|
||||||
String version;
|
String version;
|
||||||
final String apkFilePath;
|
final String apkFilePath;
|
||||||
@JsonKey(
|
@JsonKey(
|
||||||
@@ -25,6 +26,7 @@ class PatchedApplication {
|
|||||||
PatchedApplication({
|
PatchedApplication({
|
||||||
required this.name,
|
required this.name,
|
||||||
required this.packageName,
|
required this.packageName,
|
||||||
|
required this.originalPackageName,
|
||||||
required this.version,
|
required this.version,
|
||||||
required this.apkFilePath,
|
required this.apkFilePath,
|
||||||
required this.icon,
|
required this.icon,
|
||||||
|
|||||||
@@ -7,12 +7,11 @@ import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
|||||||
import 'package:injectable/injectable.dart';
|
import 'package:injectable/injectable.dart';
|
||||||
import 'package:native_dio_client/native_dio_client.dart';
|
import 'package:native_dio_client/native_dio_client.dart';
|
||||||
import 'package:revanced_manager/models/patch.dart';
|
import 'package:revanced_manager/models/patch.dart';
|
||||||
|
import 'package:revanced_manager/utils/check_for_gms.dart';
|
||||||
|
|
||||||
@lazySingleton
|
@lazySingleton
|
||||||
class GithubAPI {
|
class GithubAPI {
|
||||||
final Dio _dio = Dio(
|
late Dio _dio = Dio();
|
||||||
BaseOptions(baseUrl: 'https://api.github.com'),
|
|
||||||
)..httpClientAdapter = NativeAdapter();
|
|
||||||
final DioCacheManager _dioCacheManager = DioCacheManager(CacheConfig());
|
final DioCacheManager _dioCacheManager = DioCacheManager(CacheConfig());
|
||||||
final Options _cacheOptions = buildCacheOptions(
|
final Options _cacheOptions = buildCacheOptions(
|
||||||
const Duration(hours: 6),
|
const Duration(hours: 6),
|
||||||
@@ -20,16 +19,30 @@ class GithubAPI {
|
|||||||
);
|
);
|
||||||
final Map<String, String> repoAppPath = {
|
final Map<String, String> repoAppPath = {
|
||||||
'com.google.android.youtube': 'youtube',
|
'com.google.android.youtube': 'youtube',
|
||||||
'app.revanced.android.youtube': 'youtube',
|
|
||||||
'com.google.android.apps.youtube.music': 'music',
|
'com.google.android.apps.youtube.music': 'music',
|
||||||
'com.twitter.android': 'twitter',
|
'com.twitter.android': 'twitter',
|
||||||
'com.reddit.frontpage': 'reddit',
|
'com.reddit.frontpage': 'reddit',
|
||||||
'com.zhiliaoapp.musically': 'tiktok',
|
'com.zhiliaoapp.musically': 'tiktok',
|
||||||
'de.dwd.warnapp': 'warnwetter',
|
'de.dwd.warnapp': 'warnwetter',
|
||||||
'com.garzotto.pflotsh.ecmwf_a': 'ecmwf',
|
'com.garzotto.pflotsh.ecmwf_a': 'ecmwf',
|
||||||
|
'com.spotify.music': 'spotify',
|
||||||
};
|
};
|
||||||
|
|
||||||
void initialize() {
|
void initialize() async {
|
||||||
|
bool isGMSInstalled = await checkForGMS();
|
||||||
|
|
||||||
|
if (!isGMSInstalled) {
|
||||||
|
_dio = Dio(BaseOptions(
|
||||||
|
baseUrl: 'https://api.github.com',
|
||||||
|
));
|
||||||
|
print('GitHub API: Using default engine + $isGMSInstalled');
|
||||||
|
} else {
|
||||||
|
_dio = Dio(BaseOptions(
|
||||||
|
baseUrl: 'https://api.github.com',
|
||||||
|
))
|
||||||
|
..httpClientAdapter = NativeAdapter();
|
||||||
|
print('ReVanced API: Using CronetEngine + $isGMSInstalled');
|
||||||
|
}
|
||||||
_dio.interceptors.add(_dioCacheManager.interceptor);
|
_dio.interceptors.add(_dioCacheManager.interceptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -213,6 +213,7 @@ class ManagerAPI {
|
|||||||
PatchedApplication(
|
PatchedApplication(
|
||||||
name: application.appName,
|
name: application.appName,
|
||||||
packageName: application.packageName,
|
packageName: application.packageName,
|
||||||
|
originalPackageName: application.packageName,
|
||||||
version: application.versionName!,
|
version: application.versionName!,
|
||||||
apkFilePath: application.apkFilePath,
|
apkFilePath: application.apkFilePath,
|
||||||
icon: application.icon,
|
icon: application.icon,
|
||||||
@@ -241,6 +242,7 @@ class ManagerAPI {
|
|||||||
PatchedApplication(
|
PatchedApplication(
|
||||||
name: application.appName,
|
name: application.appName,
|
||||||
packageName: application.packageName,
|
packageName: application.packageName,
|
||||||
|
originalPackageName: application.packageName,
|
||||||
version: application.versionName!,
|
version: application.versionName!,
|
||||||
apkFilePath: application.apkFilePath,
|
apkFilePath: application.apkFilePath,
|
||||||
icon: application.icon,
|
icon: application.icon,
|
||||||
@@ -261,8 +263,10 @@ class ManagerAPI {
|
|||||||
List<PatchedApplication> toRemove = await getAppsToRemove(patchedApps);
|
List<PatchedApplication> toRemove = await getAppsToRemove(patchedApps);
|
||||||
patchedApps.removeWhere((a) => toRemove.contains(a));
|
patchedApps.removeWhere((a) => toRemove.contains(a));
|
||||||
for (PatchedApplication app in patchedApps) {
|
for (PatchedApplication app in patchedApps) {
|
||||||
app.hasUpdates = await hasAppUpdates(app.packageName, app.patchDate);
|
app.hasUpdates =
|
||||||
app.changelog = await getAppChangelog(app.packageName, app.patchDate);
|
await hasAppUpdates(app.originalPackageName, app.patchDate);
|
||||||
|
app.changelog =
|
||||||
|
await getAppChangelog(app.originalPackageName, app.patchDate);
|
||||||
if (!app.hasUpdates) {
|
if (!app.hasUpdates) {
|
||||||
String? currentInstalledVersion =
|
String? currentInstalledVersion =
|
||||||
(await DeviceApps.getApp(app.packageName))?.versionName;
|
(await DeviceApps.getApp(app.packageName))?.versionName;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class PatcherAPI {
|
|||||||
MethodChannel('app.revanced.manager.flutter/patcher');
|
MethodChannel('app.revanced.manager.flutter/patcher');
|
||||||
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
||||||
final RootAPI _rootAPI = RootAPI();
|
final RootAPI _rootAPI = RootAPI();
|
||||||
|
late Directory _dataDir;
|
||||||
late Directory _tmpDir;
|
late Directory _tmpDir;
|
||||||
late File _keyStoreFile;
|
late File _keyStoreFile;
|
||||||
List<Patch> _patches = [];
|
List<Patch> _patches = [];
|
||||||
@@ -26,8 +27,9 @@ class PatcherAPI {
|
|||||||
Future<void> initialize() async {
|
Future<void> initialize() async {
|
||||||
await _loadPatches();
|
await _loadPatches();
|
||||||
Directory appCache = await getTemporaryDirectory();
|
Directory appCache = await getTemporaryDirectory();
|
||||||
|
_dataDir = await getExternalStorageDirectory() ?? appCache;
|
||||||
_tmpDir = Directory('${appCache.path}/patcher');
|
_tmpDir = Directory('${appCache.path}/patcher');
|
||||||
_keyStoreFile = File('${appCache.path}/revanced-manager.keystore');
|
_keyStoreFile = File('${_dataDir.path}/revanced-manager.keystore');
|
||||||
cleanPatcher();
|
cleanPatcher();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -70,14 +72,10 @@ class PatcherAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Future<List<Patch>> getFilteredPatches(String packageName) async {
|
Future<List<Patch>> getFilteredPatches(String packageName) async {
|
||||||
String newPackageName = packageName.replaceFirst(
|
|
||||||
'app.revanced.',
|
|
||||||
'com.google.',
|
|
||||||
);
|
|
||||||
return _patches
|
return _patches
|
||||||
.where((patch) =>
|
.where((patch) =>
|
||||||
!patch.name.contains('settings') &&
|
!patch.name.contains('settings') &&
|
||||||
patch.compatiblePackages.any((pack) => pack.name == newPackageName))
|
patch.compatiblePackages.any((pack) => pack.name == packageName))
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,6 +161,7 @@ class PatcherAPI {
|
|||||||
integrationsFile = await _managerAPI.downloadIntegrations();
|
integrationsFile = await _managerAPI.downloadIntegrations();
|
||||||
}
|
}
|
||||||
if (patchBundleFile != null) {
|
if (patchBundleFile != null) {
|
||||||
|
_dataDir.createSync();
|
||||||
_tmpDir.createSync();
|
_tmpDir.createSync();
|
||||||
Directory workDir = _tmpDir.createTempSync('tmp-');
|
Directory workDir = _tmpDir.createTempSync('tmp-');
|
||||||
File inputFile = File('${workDir.path}/base.apk');
|
File inputFile = File('${workDir.path}/base.apk');
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import 'package:dio_http_cache_lts/dio_http_cache_lts.dart';
|
|||||||
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
|
||||||
import 'package:injectable/injectable.dart';
|
import 'package:injectable/injectable.dart';
|
||||||
import 'package:revanced_manager/models/patch.dart';
|
import 'package:revanced_manager/models/patch.dart';
|
||||||
|
import 'package:revanced_manager/utils/check_for_gms.dart';
|
||||||
import 'package:timeago/timeago.dart';
|
import 'package:timeago/timeago.dart';
|
||||||
|
|
||||||
@lazySingleton
|
@lazySingleton
|
||||||
@@ -18,10 +19,20 @@ class RevancedAPI {
|
|||||||
);
|
);
|
||||||
|
|
||||||
Future<void> initialize(String apiUrl) async {
|
Future<void> initialize(String apiUrl) async {
|
||||||
_dio = Dio(BaseOptions(
|
bool isGMSInstalled = await checkForGMS();
|
||||||
baseUrl: apiUrl,
|
|
||||||
))
|
if (!isGMSInstalled) {
|
||||||
..httpClientAdapter = NativeAdapter();
|
_dio = Dio(BaseOptions(
|
||||||
|
baseUrl: apiUrl,
|
||||||
|
));
|
||||||
|
print('ReVanced API: Using default engine + $isGMSInstalled');
|
||||||
|
} else {
|
||||||
|
_dio = Dio(BaseOptions(
|
||||||
|
baseUrl: apiUrl,
|
||||||
|
))
|
||||||
|
..httpClientAdapter = NativeAdapter();
|
||||||
|
print('ReVanced API: Using CronetEngine + $isGMSInstalled');
|
||||||
|
}
|
||||||
_dio.interceptors.add(_dioCacheManager.interceptor);
|
_dio.interceptors.add(_dioCacheManager.interceptor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class AppSelectorViewModel extends BaseViewModel {
|
|||||||
locator<PatcherViewModel>().selectedApp = PatchedApplication(
|
locator<PatcherViewModel>().selectedApp = PatchedApplication(
|
||||||
name: application.appName,
|
name: application.appName,
|
||||||
packageName: application.packageName,
|
packageName: application.packageName,
|
||||||
|
originalPackageName: application.packageName,
|
||||||
version: application.versionName!,
|
version: application.versionName!,
|
||||||
apkFilePath: application.apkFilePath,
|
apkFilePath: application.apkFilePath,
|
||||||
icon: application.icon,
|
icon: application.icon,
|
||||||
@@ -51,6 +52,7 @@ class AppSelectorViewModel extends BaseViewModel {
|
|||||||
locator<PatcherViewModel>().selectedApp = PatchedApplication(
|
locator<PatcherViewModel>().selectedApp = PatchedApplication(
|
||||||
name: application.appName,
|
name: application.appName,
|
||||||
packageName: application.packageName,
|
packageName: application.packageName,
|
||||||
|
originalPackageName: application.packageName,
|
||||||
version: application.versionName!,
|
version: application.versionName!,
|
||||||
apkFilePath: result.files.single.path!,
|
apkFilePath: result.files.single.path!,
|
||||||
icon: application.icon,
|
icon: application.icon,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class PatchesSelectorViewModel extends BaseViewModel {
|
|||||||
|
|
||||||
Future<void> initialize() async {
|
Future<void> initialize() async {
|
||||||
patches.addAll(await _patcherAPI.getFilteredPatches(
|
patches.addAll(await _patcherAPI.getFilteredPatches(
|
||||||
locator<PatcherViewModel>().selectedApp!.packageName,
|
locator<PatcherViewModel>().selectedApp!.originalPackageName,
|
||||||
));
|
));
|
||||||
patches.sort((a, b) => a.name.compareTo(b.name));
|
patches.sort((a, b) => a.name.compareTo(b.name));
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
@@ -74,8 +74,7 @@ class PatchesSelectorViewModel extends BaseViewModel {
|
|||||||
query.isEmpty ||
|
query.isEmpty ||
|
||||||
query.length < 2 ||
|
query.length < 2 ||
|
||||||
patch.name.toLowerCase().contains(query.toLowerCase()) ||
|
patch.name.toLowerCase().contains(query.toLowerCase()) ||
|
||||||
patch.getSimpleName().toLowerCase().contains(query.toLowerCase())
|
patch.getSimpleName().toLowerCase().contains(query.toLowerCase()))
|
||||||
)
|
|
||||||
.toList();
|
.toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -160,8 +160,9 @@ class AppInfoView extends StatelessWidget {
|
|||||||
child: InkWell(
|
child: InkWell(
|
||||||
borderRadius: BorderRadius.circular(16.0),
|
borderRadius: BorderRadius.circular(16.0),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
model.navigateToPatcher(app);
|
model.updateNotImplemented(context);
|
||||||
Navigator.of(context).pop();
|
// model.navigateToPatcher(app);
|
||||||
|
// Navigator.of(context).pop();
|
||||||
},
|
},
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment:
|
mainAxisAlignment:
|
||||||
@@ -260,6 +261,22 @@ class AppInfoView extends StatelessWidget {
|
|||||||
subtitle: Text(app.packageName),
|
subtitle: Text(app.packageName),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
|
ListTile(
|
||||||
|
contentPadding:
|
||||||
|
const EdgeInsets.symmetric(horizontal: 20.0),
|
||||||
|
title: I18nText(
|
||||||
|
'appInfoView.originalPackageNameLabel',
|
||||||
|
child: const Text(
|
||||||
|
'',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 20,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
subtitle: Text(app.originalPackageName),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
ListTile(
|
ListTile(
|
||||||
contentPadding:
|
contentPadding:
|
||||||
const EdgeInsets.symmetric(horizontal: 20.0),
|
const EdgeInsets.symmetric(horizontal: 20.0),
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import 'package:revanced_manager/models/patched_application.dart';
|
|||||||
import 'package:revanced_manager/services/manager_api.dart';
|
import 'package:revanced_manager/services/manager_api.dart';
|
||||||
import 'package:revanced_manager/services/patcher_api.dart';
|
import 'package:revanced_manager/services/patcher_api.dart';
|
||||||
import 'package:revanced_manager/services/root_api.dart';
|
import 'package:revanced_manager/services/root_api.dart';
|
||||||
|
import 'package:revanced_manager/services/toast.dart';
|
||||||
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/home/home_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart';
|
||||||
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
|
import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
|
||||||
@@ -19,6 +20,7 @@ class AppInfoViewModel extends BaseViewModel {
|
|||||||
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
final ManagerAPI _managerAPI = locator<ManagerAPI>();
|
||||||
final PatcherAPI _patcherAPI = locator<PatcherAPI>();
|
final PatcherAPI _patcherAPI = locator<PatcherAPI>();
|
||||||
final RootAPI _rootAPI = RootAPI();
|
final RootAPI _rootAPI = RootAPI();
|
||||||
|
final Toast _toast = locator<Toast>();
|
||||||
|
|
||||||
Future<void> uninstallApp(
|
Future<void> uninstallApp(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
@@ -51,6 +53,10 @@ class AppInfoViewModel extends BaseViewModel {
|
|||||||
locator<NavigationViewModel>().setIndex(1);
|
locator<NavigationViewModel>().setIndex(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void updateNotImplemented(BuildContext context) {
|
||||||
|
_toast.show('appInfoView.updateNotImplemented');
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> showUninstallDialog(
|
Future<void> showUninstallDialog(
|
||||||
BuildContext context,
|
BuildContext context,
|
||||||
PatchedApplication app,
|
PatchedApplication app,
|
||||||
@@ -127,7 +133,8 @@ class AppInfoViewModel extends BaseViewModel {
|
|||||||
builder: (context) => AlertDialog(
|
builder: (context) => AlertDialog(
|
||||||
title: I18nText('appInfoView.appliedPatchesLabel'),
|
title: I18nText('appInfoView.appliedPatchesLabel'),
|
||||||
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
|
backgroundColor: Theme.of(context).colorScheme.secondaryContainer,
|
||||||
content: Text(getAppliedPatchesString(app.appliedPatches)),
|
content: SingleChildScrollView(
|
||||||
|
child: Text(getAppliedPatchesString(app.appliedPatches))),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
CustomMaterialButton(
|
CustomMaterialButton(
|
||||||
label: I18nText('okButton'),
|
label: I18nText('okButton'),
|
||||||
|
|||||||
@@ -45,15 +45,17 @@ class AvailableUpdatesCard extends StatelessWidget {
|
|||||||
physics: const NeverScrollableScrollPhysics(),
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: apps
|
children: apps
|
||||||
.map((app) => ApplicationItem(
|
.map((app) => ApplicationItem(
|
||||||
icon: app.icon,
|
icon: app.icon,
|
||||||
name: app.name,
|
name: app.name,
|
||||||
patchDate: app.patchDate,
|
patchDate: app.patchDate,
|
||||||
changelog: app.changelog,
|
changelog: app.changelog,
|
||||||
isUpdatableApp: true,
|
isUpdatableApp: true,
|
||||||
onPressed: () =>
|
//TODO: Find a better way to do update functionality
|
||||||
locator<HomeViewModel>().navigateToPatcher(
|
onPressed: () {}
|
||||||
app,
|
// () =>
|
||||||
),
|
// locator<HomeViewModel>().navigateToPatcher(
|
||||||
|
// app,
|
||||||
|
// ),
|
||||||
))
|
))
|
||||||
.toList(),
|
.toList(),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -51,93 +51,93 @@ class _ApplicationItemState extends State<ApplicationItem>
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
ExpandableController expController = ExpandableController();
|
ExpandableController expController = ExpandableController();
|
||||||
return Container(
|
return Container(
|
||||||
margin: const EdgeInsets.only(bottom: 16.0),
|
margin: const EdgeInsets.only(bottom: 16.0),
|
||||||
child: CustomCard(
|
child: CustomCard(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
expController.toggle();
|
expController.toggle();
|
||||||
_animationController.isCompleted
|
_animationController.isCompleted
|
||||||
? _animationController.reverse()
|
? _animationController.reverse()
|
||||||
: _animationController.forward();
|
: _animationController.forward();
|
||||||
},
|
},
|
||||||
child: ExpandablePanel(
|
child: ExpandablePanel(
|
||||||
controller: expController,
|
controller: expController,
|
||||||
theme: const ExpandableThemeData(
|
theme: const ExpandableThemeData(
|
||||||
inkWellBorderRadius: BorderRadius.all(Radius.circular(16)),
|
inkWellBorderRadius: BorderRadius.all(Radius.circular(16)),
|
||||||
tapBodyToCollapse: false,
|
tapBodyToCollapse: false,
|
||||||
tapBodyToExpand: false,
|
tapBodyToExpand: false,
|
||||||
tapHeaderToExpand: false,
|
tapHeaderToExpand: false,
|
||||||
hasIcon: false,
|
hasIcon: false,
|
||||||
animationDuration: Duration(milliseconds: 450),
|
animationDuration: Duration(milliseconds: 450),
|
||||||
),
|
),
|
||||||
header: Row(
|
header: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 40,
|
width: 40,
|
||||||
child: Image.memory(widget.icon, height: 40, width: 40),
|
child: Image.memory(widget.icon, height: 40, width: 40),
|
||||||
),
|
),
|
||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(left: 15.0),
|
padding: const EdgeInsets.only(left: 15.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: <Widget>[
|
|
||||||
Text(
|
|
||||||
widget.name.length > 12
|
|
||||||
? '${widget.name.substring(0, 12)}...'
|
|
||||||
: widget.name,
|
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: FontWeight.w500,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Text(format(widget.patchDate)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const Spacer(),
|
|
||||||
RotationTransition(
|
|
||||||
turns: Tween(begin: 0.0, end: 0.50)
|
|
||||||
.animate(_animationController),
|
|
||||||
child: const Padding(
|
|
||||||
padding: EdgeInsets.all(8.0),
|
|
||||||
child: Icon(Icons.arrow_drop_down),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
const SizedBox(width: 8),
|
|
||||||
Column(
|
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
CustomMaterialButton(
|
Text(
|
||||||
label: widget.isUpdatableApp
|
widget.name.length > 12
|
||||||
? I18nText('applicationItem.patchButton')
|
? '${widget.name.substring(0, 12)}...'
|
||||||
: I18nText('applicationItem.infoButton'),
|
: widget.name,
|
||||||
onPressed: widget.onPressed,
|
style: const TextStyle(
|
||||||
|
fontSize: 16,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
Text(format(widget.patchDate)),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
),
|
||||||
),
|
const Spacer(),
|
||||||
collapsed: const SizedBox(),
|
RotationTransition(
|
||||||
expanded: Padding(
|
turns: Tween(begin: 0.0, end: 0.50)
|
||||||
padding: const EdgeInsets.only(top: 16.0, left: 4.0, right: 4.0, bottom: 4.0),
|
.animate(_animationController),
|
||||||
child: Column(
|
child: const Padding(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
padding: EdgeInsets.all(8.0),
|
||||||
children: <Widget>[
|
child: Icon(Icons.arrow_drop_down),
|
||||||
I18nText(
|
|
||||||
'applicationItem.changelogLabel',
|
|
||||||
child: const Text(
|
|
||||||
'',
|
|
||||||
style: TextStyle(fontWeight: FontWeight.w700),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(width: 8),
|
||||||
Text('\u2022 ${widget.changelog.join('\n\u2022 ')}'),
|
Column(
|
||||||
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
|
children: <Widget>[
|
||||||
|
CustomMaterialButton(
|
||||||
|
label: widget.isUpdatableApp
|
||||||
|
? I18nText('applicationItem.infoButton')
|
||||||
|
: I18nText('applicationItem.infoButton'),
|
||||||
|
onPressed: widget.onPressed,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
collapsed: const SizedBox(),
|
||||||
|
expanded: Padding(
|
||||||
|
padding: const EdgeInsets.only(
|
||||||
|
top: 16.0, left: 4.0, right: 4.0, bottom: 4.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: <Widget>[
|
||||||
|
I18nText(
|
||||||
|
'applicationItem.changelogLabel',
|
||||||
|
child: const Text(
|
||||||
|
'',
|
||||||
|
style: TextStyle(fontWeight: FontWeight.w700),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text('\u2022 ${widget.changelog.join('\n\u2022 ')}'),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
));
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
lib/utils/check_for_gms.dart
Normal file
10
lib/utils/check_for_gms.dart
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// Check for google mobile services on device
|
||||||
|
|
||||||
|
import 'package:device_apps/device_apps.dart';
|
||||||
|
|
||||||
|
Future<bool> checkForGMS() async {
|
||||||
|
bool isGMSInstalled = true;
|
||||||
|
isGMSInstalled = await DeviceApps.isAppInstalled('com.google.android.gms') ||
|
||||||
|
await DeviceApps.isAppInstalled('com.android.vending');
|
||||||
|
return isGMSInstalled;
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@ homepage: https://github.com/revanced/revanced-manager
|
|||||||
|
|
||||||
publish_to: 'none'
|
publish_to: 'none'
|
||||||
|
|
||||||
version: 0.0.30+30
|
version: 0.0.32+32
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.17.5 <3.0.0"
|
sdk: ">=2.17.5 <3.0.0"
|
||||||
@@ -20,6 +20,7 @@ dependencies:
|
|||||||
ref: revanced-manager
|
ref: revanced-manager
|
||||||
device_info_plus: ^4.1.2
|
device_info_plus: ^4.1.2
|
||||||
dio: ^4.0.6
|
dio: ^4.0.6
|
||||||
|
dio_brotli_transformer: ^1.0.1
|
||||||
dio_http_cache_lts: ^0.4.1
|
dio_http_cache_lts: ^0.4.1
|
||||||
dynamic_color: ^1.5.4
|
dynamic_color: ^1.5.4
|
||||||
dynamic_themes: ^1.1.0
|
dynamic_themes: ^1.1.0
|
||||||
|
|||||||
Reference in New Issue
Block a user