chore: merge dev to main (#924)

This commit is contained in:
Ushie 2023-06-07 20:18:21 +03:00 committed by GitHub
commit 0186b6ea61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 385 additions and 15 deletions

View file

@ -1,11 +1,6 @@
name: Analyze Code
on:
push:
branches: [ "main", "dev" ]
paths:
- "**.dart"
- ".github/workflows/analyze.yml"
pull_request:
branches: [ "main", "dev" ]
paths:

3
android/Gemfile Normal file
View file

@ -0,0 +1,3 @@
source "https://rubygems.org"
gem "fastlane"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

View file

@ -0,0 +1,30 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="256"
android:viewportHeight="256">
<group android:scaleX="0.23"
android:scaleY="0.23"
android:translateX="98.56"
android:translateY="98.56">
<path
android:pathData="M253.85,4.9C254.32,3.82 254.22,2.57 253.58,1.58C252.93,0.6 251.83,0 250.64,0C243.29,0 230.47,0 225.95,0C224.96,0 224.06,0.59 223.66,1.5C216.03,18.88 144.1,182.7 130.29,214.16C129.89,215.07 128.99,215.66 128,215.66C127.01,215.66 126.11,215.07 125.71,214.16C111.9,182.7 39.97,18.88 32.34,1.5C31.94,0.59 31.04,0 30.05,0C25.53,0 12.71,0 5.36,0C4.17,0 3.07,0.6 2.42,1.58C1.78,2.57 1.68,3.82 2.15,4.9C16.78,38.3 101.47,231.61 111.24,253.9C111.8,255.18 113.06,256 114.45,256C120.29,256 135.71,256 141.55,256C142.94,256 144.2,255.18 144.76,253.9C154.52,231.61 239.22,38.3 253.85,4.9Z"
android:fillColor="#ffffff"/>
<path
android:pathData="M130.59,131.75C130.06,132.68 129.07,133.25 128,133.25C126.93,133.25 125.94,132.68 125.4,131.75C113.45,111.06 63.88,25.19 51.93,4.5C51.4,3.57 51.4,2.43 51.93,1.5C52.47,0.57 53.46,-0 54.53,-0L201.47,-0C202.54,-0 203.53,0.57 204.06,1.5C204.6,2.43 204.6,3.57 204.06,4.5C192.12,25.19 142.54,111.06 130.59,131.75Z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="128"
android:startY="-0"
android:endX="128"
android:endY="254.6"
android:type="linear">
<item android:offset="0" android:color="#FFF04E98"/>
<item android:offset="0.5" android:color="#FF5F65D4"/>
<item android:offset="1" android:color="#FF4E98F0"/>
</gradient>
</aapt:attr>
</path>
</group>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
</adaptive-icon>
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#1B1B1B</color>
</resources>

2
android/fastlane/Appfile Normal file
View file

@ -0,0 +1,2 @@
json_key_file("") # Path to the json secret file - Follow https://docs.fastlane.tools/actions/supply/#setup to get one
package_name("app.revanced.manager.flutter") # e.g. com.krausefx.app

38
android/fastlane/Fastfile Normal file
View file

@ -0,0 +1,38 @@
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
# https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
# https://docs.fastlane.tools/plugins/available-plugins
#
# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane
default_platform(:android)
platform :android do
desc "Runs all the tests"
lane :test do
gradle(task: "test")
end
desc "Submit a new Beta Build to Crashlytics Beta"
lane :beta do
gradle(task: "clean assembleRelease")
crashlytics
# sh "your_script.sh"
# You can also use other beta testing services here
end
desc "Deploy a new version to the Google Play"
lane :deploy do
gradle(task: "clean assembleRelease")
upload_to_play_store
end
end

View file

@ -0,0 +1,48 @@
fastlane documentation
----
# Installation
Make sure you have the latest version of the Xcode command line tools installed:
```sh
xcode-select --install
```
For _fastlane_ installation instructions, see [Installing _fastlane_](https://docs.fastlane.tools/#installing-fastlane)
# Available Actions
## Android
### android test
```sh
[bundle exec] fastlane android test
```
Runs all the tests
### android beta
```sh
[bundle exec] fastlane android beta
```
Submit a new Beta Build to Crashlytics Beta
### android deploy
```sh
[bundle exec] fastlane android deploy
```
Deploy a new version to the Google Play
----
This README.md is auto-generated and will be re-generated every time [_fastlane_](https://fastlane.tools) is run.
More information about _fastlane_ can be found on [fastlane.tools](https://fastlane.tools).
The documentation of _fastlane_ can be found on [docs.fastlane.tools](https://docs.fastlane.tools).

View file

@ -0,0 +1 @@
The ReVanced Manager is an Android application that allows you to modify any Dalvik Android application to add, remove and/or modify existing functionality. It dissassembles the APK locally on your device, makes the required changes using ReVanced Patcher and then assembles it back into an APK again.

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 KiB

View file

@ -0,0 +1 @@
Patch your favourite apps, right on your device.

View file

@ -0,0 +1 @@
ReVanced Manager

File diff suppressed because one or more lines are too long

16
docs/0_prerequisites.md Normal file
View file

@ -0,0 +1,16 @@
# 💼 Prerequisites
In order to use ReVanced Manager, certain requirements must be met.
## 🤝 Requirements
- An Android device running Android 8 or higher
- Any device architecture except ARMv7[^1]
[^1]: This constraint only applies to patches, that require patching APK resources which is why some patches may or may not work on ARMv7 architecture. You can find out, which architectures your device supports here: [⚙️ Configuring ReVanced Manager](2_4_settings.md#%E2%84%B9%EF%B8%8F-about).
## ⏭️ What's next
The next page will guide you through patching an application.
Continue: [⬇️ Installation](1_installation.md)

14
docs/1_installation.md Normal file
View file

@ -0,0 +1,14 @@
# ⬇️ Installation
In order to use ReVanced on your Android device, ReVanced Manager must be installed.
## 🪜 Installation steps
- Download the latest version of ReVanced Manager from [here](https://github.com/revanced/revanced-manager/releases/latest)
- Install ReVanced Manager
## ⏭️ What's next
The next page will guide you through patching an application.
Continue: [🪛 Usage](2_usage.md)

29
docs/2_1_patching.md Normal file
View file

@ -0,0 +1,29 @@
# 🧩 Patching applications
The following pages will guide you through using ReVanced Manager to patch applications.
## 🪜 Steps to patch applications
1. Navigate to the **Patcher** tab from the bottom navigation bar
2. Tap on the **Select an application** card
3. Choose an application to patch[^1]
> **Note**: The application version suggested by ReVanced Manager is visible in each application's card. This is important in step 5. below, as most patches are compatible with this version.
4. Tap on the **Select patches** card and select the patches you want to apply[^2]
> **Warning**: If you see a warning icon next to a patch, it means that the patch is not compatible with the application version you selected in step 3. above. In this case, you should either go back and select a different application version or deselect the patch.
5. Tap on the **Done** button to confirm your selection
6. Tap on the **Patch** button to start patching
> **Warning**: The patching process can take anywhere from 2 to 5 minutes depending on your device. Refrain from exiting ReVanced Manager while the process is still running, otherwise the patching time will increase significantly.
7. After patching is complete, tap on the **Install** button to install the patched application
> **Note**: If you have root access on your device, you may have the option to mount the patched application on top of the original application.[^4]
> Optionally, you may tap on the three vertical dots in the top right to export the patched application to storage.
[^1]: You may be prompted to select an application from storage in case you have no root access on your device. In this case, select the APK file from your device storage.[^3]
[^2]: It is suggested to use the default set of patches by tapping on the **Default** chip above the list of patches.
[^3]: You can obtain `.apk` files from sites such as [APKMirror](https://www.apkmirror.com/).
[^4]: Mounting the patched application on top of the original application will only work if the installed application version matches the version of the application selected in step 3. above.
## ⏭️ What's next
The next page will bring you back to the usage page.
Continue: [🛠️ Usage](2_usage.md)

16
docs/2_2_managing.md Normal file
View file

@ -0,0 +1,16 @@
# 🧰 Managing patched applications
After patching an application, you may want to manage it. This page will guide you through managing patched applications.
## 🪜 Steps to manage patched applications
1. Tap on the **Dashboard** tab in the bottom navigation bar
2. Select the **Installed** chip
3. Tap on the **Info** button for the application you want to manage
4. Choose one of the options from the menu
## ⏭️ What's next
The next page will bring you back to the usage page.
Continue: [🛠️ Usage](2_usage.md)

14
docs/2_3_updating.md Normal file
View file

@ -0,0 +1,14 @@
# 🔄 Updating ReVanced Manager
In order to keep up with the latest features and bug fixes, it is recommended to keep ReVanced Manager up to date.
## 🪜 Updating steps
1. Navigate to the **Dashboard** tab from the bottom navigation bar
2. Tap on the **Update** button in the **Updates** section
## ⏭️ What's next
The next page will bring you back to the usage page.
Continue: [🛠️ Usage](2_usage.md)

39
docs/2_4_settings.md Normal file
View file

@ -0,0 +1,39 @@
# ⚙️ Configuring ReVanced Manager
ReVanced Manager has settings that can be configured to your liking.
## 🪛 Essential settings
- ### 🔗 API URL
Specify the URL of the API to use. This is used to fetch ReVanced Patches and update ReVanced Manager.
- ### 🧬 Sources
Override the API and change the source of ReVanced Patches.
- ### 🧪 Experimental ReVanced Patches support
Lift application version constraints from ReVanced Patches. This allows you to patch any version of an application, even if the patch is not explicitly compatible with it.
- ### 🧑‍🔬 Experimental universal support
This will show or hide ReVanced Patches, which are not meant for any application in particular but rather for all applications but may not work on all applications.
- ### 🔑 Export, import or delete keystore
Manage the keystore used to sign patched applications.
- ### 📄 Export, import or reset ReVanced Patches selection
Manage the ReVanced Patches selection. This is useful if you want to share your ReVanced Patches selection with others or reset it to the default selection.
- ### About
View information about your device and ReVanced Manager. This includes the version of ReVanced Manager and supported architectures of your device.
## ⏭️ What's next
The next page will bring you back to the usage page.
Continue: [🛠️ Usage](2_usage.md)

16
docs/2_usage.md Normal file
View file

@ -0,0 +1,16 @@
# 🛠️ Usage
The following pages will guide you through using ReVanced Manager to patch applications, manage patched applications, and update ReVanced Manager.
## 📖 Table of contents
1. [🧩 Patching applications](2_1_patching.md)
2. [🧰 Managing patched applications](2_2_managing.md)
3. [🔄 Updating ReVanced Manager](2_3_updating.md)
4. [⚙️ Configuring ReVanced Manager](2_4_settings.md)
## ⏭️ What's next
The next page will guide you through troubleshooting ReVanced Manager.
Continue: [🛟 Troubleshooting](3_troubleshooting.md)

27
docs/3_troubleshooting.md Normal file
View file

@ -0,0 +1,27 @@
# 🛟 Troubleshooting
In case you encounter any issues while using ReVanced Manager, please refer to this page for possible solutions.
- ### 💥 App not installed as package conflicts with an existing package
An existing installation of the application you're trying to patch is conflicting with the patched application. Uninstall the existing application before installing the patched application.
- ### ❗Error code `135`, `139` or `1` when patching the application
Your device is not supported. Refer to the [Prerequisites](0_prerequisites.md) page for supported devices.
Alternatively, you can use [ReVanced CLI](https://github.com/revanced/revanced-cli) to patch the application.
- ### 🚫 Non-root install is not possible with the current patches selection
Select the **Default** chip when choosing patches.
- ### 🚨 Patched application crashes on launch
Select the **Default** chip when choosing patches.
## ### ⏭️ What's next
The next page will teach you how to build ReVanced Manager from source.
Continue: [🛠️ Building from source](4_building.md)

40
docs/4_building.md Normal file
View file

@ -0,0 +1,40 @@
# 🛠️ Building from source
This page will guide you through building ReVanced Manager from source.
1. Setup the Flutter environment for your [platform](https://docs.flutter.dev/get-started/install)
2. Clone the repository
```sh
git clone https://github.com/revanced/revanced-manager.git && cd revanced-manager
```
3. Create a GitHub personal access token with the `read:packages` scope [here](https://github.com/settings/tokens/new?scopes=read:packages&description=ReVanced)
4. Add your GitHub username and the token to `~/.gradle/gradle.properties`
```properties
gpr.user = YourUsername
gpr.key = ghp_longrandomkey
```
5. Get dependencies
```sh
flutter pub get
```
6. Delete conflicting outputs
```sh
flutter packages pub run build_runner build --delete-conflicting-outputs
```
> **Note**: Must be run every time you sync your local repository with the remote repository.
7. Build the APK
```sh
flutter build apk
```

15
docs/README.md Normal file
View file

@ -0,0 +1,15 @@
# 💊 ReVanced Manager
This documentation explains how to use [ReVanced Manager](https://github.com/revanced/revanced-manager).
## 📖 Table of contents
0. [💼 Prerequisites](0_prerequisites.md)
1. [⬇️ Installation](1_installation.md)
2. [🛠️ Usage](2_usage.md)
1. [🧩 Patching applications](2_1_patching.md)
2. [🧰 Managing patched applications](2_2_managing.md)
3. [🔄 Updating ReVanced Manager](2_3_updating.md)
4. [⚙️ Configuring ReVanced Manager](2_4_settings.md)
3. [🛟 Troubleshooting](3_troubleshooting.md)
4. [🛠 Building from source](4_building.md)

View file

@ -300,13 +300,12 @@ class ManagerAPI {
if (isDefaultPatchesRepo()) {
patchesVersion = await getLatestPatchesVersion();
// print('Patches version: $patchesVersion');
return patchesVersion ?? '0.0.0';
} else {
// fetch from github
patchesVersion =
await _githubAPI.getLastestReleaseVersion(getPatchesRepo());
}
return null;
return patchesVersion ?? '0.0.0';
}
Future<List<PatchedApplication>> getAppsToRemove(

View file

@ -190,7 +190,7 @@ class HomeViewModel extends BaseViewModel {
),
const SizedBox(width: 8.0),
Text(
'v$_latestManagerVersion',
'$_latestManagerVersion',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w500,

View file

@ -29,7 +29,7 @@ class _AboutWidgetState extends State<AboutWidget> {
text: 'Version: ${snapshot.data!['version']}\n'
'Model: ${snapshot.data!['model']}\n'
'Android Version: ${snapshot.data!['androidVersion']}\n'
'Arch: ${snapshot.data!['arch']}\n',
'${snapshot.data!['supportedArch'].length > 1 ? 'Supported Archs' : 'Supported Arch'}: ${snapshot.data!['supportedArch'].join(", ")}\n',
),
);
ScaffoldMessenger.of(context).showSnackBar(
@ -84,7 +84,9 @@ class _AboutWidgetState extends State<AboutWidget> {
),
),
Text(
'Arch: ${snapshot.data!['arch']}',
snapshot.data!['supportedArch'].length > 1
? 'Supported Archs: ${snapshot.data!['supportedArch'].join(", ")}'
: 'Supported Arch: ${snapshot.data!['supportedArch']}',
style: const TextStyle(
fontSize: 13,
fontWeight: FontWeight.w300,

View file

@ -11,7 +11,7 @@ class AboutInfo {
'flavor': kReleaseMode ? 'release' : 'debug',
'model': info.model,
'androidVersion': info.version.release,
'arch': info.supportedAbis
'supportedArch': info.supportedAbis
};
}
}