mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
feat: Support patching on ARMv7a
Signed-off-by: validcube <pun.butrach@gmail.com>
This commit is contained in:
parent
65feb34242
commit
a7663524e6
5 changed files with 8 additions and 11 deletions
Binary file not shown.
|
@ -54,7 +54,7 @@
|
||||||
"patcherView": {
|
"patcherView": {
|
||||||
"widgetTitle": "Patcher",
|
"widgetTitle": "Patcher",
|
||||||
"patchButton": "Patch",
|
"patchButton": "Patch",
|
||||||
"armv7WarningDialogText": "Patching on ARMv7 devices is not yet supported and might fail. Continue anyways?",
|
"incompatibleArchWarningDialogText": "Patching on this architecture is not yet supported and might fail. Continue anyways?",
|
||||||
"removedPatchesWarningDialogText": "The following patches have been removed since the last time you used them.\n\n${patches}\n\nContinue anyways?",
|
"removedPatchesWarningDialogText": "The following patches have been removed since the last time you used them.\n\n${patches}\n\nContinue anyways?",
|
||||||
"requiredOptionDialogText": "Some patch options have to be set."
|
"requiredOptionDialogText": "Some patch options have to be set."
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,9 +5,6 @@ To use ReVanced Manager, you need to fulfill certain requirements.
|
||||||
## 🤝 Requirements
|
## 🤝 Requirements
|
||||||
|
|
||||||
- An Android device running Android 8 or higher
|
- An Android device running Android 8 or higher
|
||||||
- Any device architecture except ARMv7[^1]
|
|
||||||
|
|
||||||
[^1]: Patching on ARMv7 is limited to bytecode patching but may work in certain circumstances for resource patching. You can check your device architecture in ReVanced Manager settings.
|
|
||||||
|
|
||||||
## ⏭️ What's next
|
## ⏭️ What's next
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class PatcherView extends StatelessWidget {
|
||||||
if (model.checkRequiredPatchOption(context)) {
|
if (model.checkRequiredPatchOption(context)) {
|
||||||
final bool proceed = model.showRemovedPatchesDialog(context);
|
final bool proceed = model.showRemovedPatchesDialog(context);
|
||||||
if (proceed && context.mounted) {
|
if (proceed && context.mounted) {
|
||||||
model.showArmv7WarningDialog(context);
|
model.showIncompatibleArchWarningDialog(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -70,7 +70,7 @@ class PatcherViewModel extends BaseViewModel {
|
||||||
FilledButton(
|
FilledButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
showArmv7WarningDialog(context);
|
showIncompatibleArchWarningDialog(context);
|
||||||
},
|
},
|
||||||
child: Text(t.yesButton),
|
child: Text(t.yesButton),
|
||||||
),
|
),
|
||||||
|
@ -116,18 +116,18 @@ class PatcherViewModel extends BaseViewModel {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> showArmv7WarningDialog(BuildContext context) async {
|
Future<void> showIncompatibleArchWarningDialog(BuildContext context) async {
|
||||||
final bool armv7 = await AboutInfo.getInfo().then((info) {
|
final bool notSupported = await AboutInfo.getInfo().then((info) {
|
||||||
final List<String> archs = info['supportedArch'];
|
final List<String> archs = info['supportedArch'];
|
||||||
final supportedAbis = ['arm64-v8a', 'x86', 'x86_64'];
|
final supportedAbis = ['arm64-v8a', 'x86', 'x86_64', 'arm-v7a'];
|
||||||
return !archs.any((arch) => supportedAbis.contains(arch));
|
return !archs.any((arch) => supportedAbis.contains(arch));
|
||||||
});
|
});
|
||||||
if (context.mounted && armv7) {
|
if (context.mounted && notSupported) {
|
||||||
return showDialog(
|
return showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (context) => AlertDialog(
|
builder: (context) => AlertDialog(
|
||||||
title: Text(t.warning),
|
title: Text(t.warning),
|
||||||
content: Text(t.patcherView.armv7WarningDialogText),
|
content: Text(t.patcherView.incompatibleArchWarningDialogText),
|
||||||
actions: <Widget>[
|
actions: <Widget>[
|
||||||
FilledButton(
|
FilledButton(
|
||||||
onPressed: () => Navigator.of(context).pop(),
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
|
|
Loading…
Reference in a new issue