Compare commits

..

120 Commits

Author SHA1 Message Date
68876a4414 build: bump version to v1.3.8 and patcher dep 2023-07-01 14:33:25 +05:30
26d7e5b60f build: bump version to v1.3.7 and patcher dep 2023-07-01 02:46:43 +03:00
e78af6ae99 chore: merge dev to main (#976) 2023-07-01 02:41:57 +03:00
6fe05cd86e feat: show all the unseen changelogs on changelog section (#970) 2023-07-01 02:41:03 +03:00
4100d7a391 fix: different message when trying to patch spilt apk (#973) 2023-07-01 02:40:30 +03:00
c1cc812ea4 build: bump version to v1.3.6 2023-06-24 19:17:59 +03:00
9663e3f0f4 chore: merge dev branch to main branch (#945) 2023-06-24 19:16:22 +03:00
941f618153 fix(app-selector): remove direct use of strings (#944) 2023-06-23 16:39:12 +03:00
716a30bf7b fix: experimental patches stay selected when toggled off (#946) 2023-06-23 16:37:23 +03:00
d051ae576b feat(updater): download successful dialog (#938) 2023-06-23 16:36:36 +03:00
35e99cb014 feat(mount): use /data/adb/revanced again and ensure migration scenario (#948) 2023-06-23 01:03:03 +03:00
af054fba49 docs: improve clarity of footnotes [skip ci] (#950) 2023-06-17 14:48:57 +02:00
58d837d641 feat(app-selector): Improve app item UI to avoid overflow issues (#943) 2023-06-16 10:04:55 +03:00
6cc1bd21cd fix(updater): ability to start again after cancelling (#937) 2023-06-16 10:04:07 +03:00
cebfa7c8ae docs: simplify steps 2023-06-16 05:09:52 +02:00
e2d7ab8f8f chore: fix broken docs link 2023-06-15 16:42:09 +02:00
ec77987fcd feat(app-selector): improve skeleton UI (#939) 2023-06-15 12:57:39 +03:00
b161608d02 feat(patches-selector): improve disabled card UI (#941) 2023-06-15 12:54:49 +03:00
5e7458ff1c fix: import patches selects unsupported patches (#942) 2023-06-14 21:34:11 +07:00
Pun
ed06aaa1f5 docs(readme): fix invalid url for building manager from source
📜 fix invalid URL for building manager from source.

Old: https://github.com/revanced/revanced-manager/blob/docs/docs/5_building-from-source.md
New: https://github.com/revanced/revanced-manager/blob/main/docs/4_building.md
2023-06-14 19:52:10 +07:00
13b7179941 fix: fix not asking for permission 2023-06-12 09:56:49 +05:30
da0d88d86f build: bump patcher 2023-06-12 09:08:29 +05:30
b7347c312a build: bump version to v1.3.4 2023-06-12 08:59:49 +05:30
c876f2f7e3 feat: add permission to manage storage 2023-06-12 08:59:14 +05:30
adad5fd8ff build: bump version to v1.3.3 2023-06-12 07:02:49 +05:30
2aaa7ae8c9 chore: merge dev to main (#935) 2023-06-12 07:01:12 +05:30
1f64ea37bd fix: using wrong string 2023-06-12 06:59:43 +05:30
cac1525da0 build: bump patcher 2023-06-12 06:02:16 +05:30
1ad906fedc refactor: improve code 2023-06-12 06:01:57 +05:30
20ffef39a3 fix: update button being shown as clickable on launch (#932) 2023-06-12 05:55:53 +05:30
185460c054 chore(fastlane): update description (#933)
Co-authored-by: Ushie <ushiekane@gmail.com>
2023-06-12 03:21:33 +03:00
0079e74d77 feat: clarify suggested version in app list (#934)
Co-authored-by: Aunali321 <48486084+Aunali321@users.noreply.github.com>
2023-06-12 05:35:02 +05:30
a8e019482f ci: add workflow to update documentation repository 2023-06-10 23:41:36 +02:00
f01b8e47aa fix: aborting message changed (#928)
Change aborting message from "aborting..." to "aborted..."

----------------------
Co-authored-by: Ushie <github@ushie.dev>
Co-authored-by: Ushie <ushiekane@gmail.com>
2023-06-09 17:34:55 +07:00
Pun
e43dfb7599 docs(troubleshooting): fix markdown styling (#929)
`docs`: `84a9168` - Self-explanatory, fix markdown styling issue
2023-06-09 17:24:31 +07:00
6b8cfe2b49 build: bump version to v1.3.2 2023-06-09 11:42:06 +03:00
7f7b14bae3 fix: use correct variable name for armv7 check 2023-06-09 11:40:54 +03:00
810b02d9fd build: bump version to v1.3.1 2023-06-09 10:45:22 +03:00
62813145b2 chore: merge dev to main (#926) 2023-06-09 01:59:18 +03:00
4877058253 chore(fastlane): add banner 2023-06-09 01:58:02 +03:00
2a9fd3abb8 chore(fastlane): add missing directory 2023-06-09 01:57:49 +03:00
a244f7b598 chore: merge dev to main 2023-06-08 21:31:41 +03:00
5396457ad5 chore: move fastlane to correct directory 2023-06-08 21:30:44 +03:00
0186b6ea61 chore: merge dev to main (#924) 2023-06-07 20:18:21 +03:00
fe
f6e99f7e88 fix: return fetched patch version if non default patch repo is used (#922) 2023-06-07 20:16:25 +03:00
Pun
c24a3828be ci(analyze): don't run when pushed to repository (#920) 2023-06-07 20:15:43 +03:00
Pun
2e38a4567a feat: clarify architecture in about section
This commit changes `Arch` to `Supported Arch(s)`
2023-06-07 20:13:42 +03:00
67c5d67a61 feat: update icons for the new logo
fixed #918
2023-06-07 20:10:14 +03:00
9592dde534 feat: add fastlane for F-Droid (#889)
Co-authored-by: Ushie <ushiekane@gmail.com>
2023-06-07 19:59:17 +03:00
d030b0af70 docs: init (#911)
Co-authored-by: afn <_@afn.lol>
2023-06-07 12:01:36 +02:00
4ccb9ac94d fix: remove redundant "v" in the downloader screen (#895) 2023-05-26 13:54:52 +03:00
8af62b917c build: bump version to 1.3.0 (#892) 2023-05-24 23:33:04 +03:00
311f114132 chore: update v1.3.0 2023-05-24 21:46:00 +02:00
d015bd03f7 chore: merge dev to main (#891) 2023-05-24 22:17:16 +03:00
a61b9de0fa chore(deps): bump revanced-patcher to 9.0.0 2023-05-24 02:02:59 +02:00
ef1b283917 chore(deps): bump revanced-patcher to 8.0.0 (#880) 2023-05-24 01:07:22 +05:30
c677f00105 build: bump version to v1.2.0 2023-05-20 02:30:18 +03:00
8d2f778dfe chore: merge dev to main (#881) 2023-05-20 02:28:58 +03:00
c549d102f6 build: migrate to dart 3 (#871) 2023-05-20 04:07:53 +05:30
39a9ee4e9d chore: remove coreLibraryDesugaring (#873) 2023-05-20 04:05:46 +05:30
a27dc6ad1c feat: migrate to dart3 2023-05-19 14:23:48 +05:45
8ccb75fc8d chore: remove coreLibraryDesugaring 2023-05-17 15:38:03 +09:00
8fc86dbe02 feat: allow selecting installed if app is full apk 2023-05-13 04:54:35 +03:00
359f052608 fix: export keystore not working in some conditions (#862) 2023-05-12 19:36:47 +03:00
4150e2265c fix: use correct version in update download dialog (#859) 2023-05-10 13:23:02 +03:00
b803ce7435 fix: system navigation overlapping UI (#853) 2023-05-10 13:18:51 +03:00
289c6cd7a9 chore: merge dev to main (#857) 2023-05-08 21:46:33 +05:30
31fc7b74c2 build: bump version to v1.1.0 2023-05-08 21:38:19 +05:30
3e565f25be fix(appselector): closing dialog closes app selector 2023-05-08 21:27:07 +05:30
e509be4e21 chore(deps): bump patcher to 7.1.1 2023-05-08 21:19:45 +05:30
170fc537ac fix: fix armv7 dialog shown for x86, x86_64 2023-05-07 04:14:57 +05:30
3fe5882145 feat: remove cronet 2023-05-06 05:39:46 +05:30
a290791410 chore: merge dev to main (#844) 2023-05-06 03:26:14 +05:30
Pun
2ebd38ff68 feat: add checksums verification to Gradle (#813) 2023-05-03 21:38:47 +03:00
cd987a5b19 fix: broken filename when saving files with the same name (#837) 2023-05-03 21:34:30 +03:00
7f1dab7ee1 ci: temporarily restore old release workflow 2023-05-02 17:50:07 +03:00
bed3945aa5 feat: clarify warning and consequences for ARMv7 users (#836) 2023-05-02 16:41:11 +07:00
15a32a18b7 fix: fix broken manager update implmentation 2023-04-30 17:38:08 +07:00
d2e8e7dd5d chore: comply with review changes 2023-04-30 01:03:36 +07:00
ce12ec89c4 ci(release): automatically bump version codes 2023-04-29 20:53:54 +07:00
b286444ad9 fix(i18n): update translation for refreshSucess 2023-04-29 20:43:02 +07:00
941263102d refactor: change name from "recommendedVersion" to "suggestedVersion" 2023-04-29 20:43:02 +07:00
e2ed296dc7 chore(deps): constrain get_it to 7.2.0 2023-04-29 19:46:07 +07:00
cfc866bef2 feat: change continue anyways to cancel 2023-04-29 15:37:30 +03:00
affba669ce feat: add continue anyway button to select from storage dialog (#810) 2023-04-29 15:36:25 +03:00
7230152ab8 chore: fix issues with gitignore [skip ci] 2023-04-29 17:42:19 +07:00
21fee7171f chore: update pubspec version
skip-checks: true
2023-04-29 15:40:25 +07:00
ad17995f28 feat: improve suggested app version text (#822) 2023-04-28 17:41:28 +03:00
ac830cbe7f fix: resized monochrome icon to match the original (#789)
cherry-pick from 6281ae82876c69ff4194a782e4b08b398a1285d6
2023-04-27 18:12:48 +07:00
65da6af3f9 fix: update pubspec version 2023-04-21 14:56:31 +03:00
3d90bf7588 ci: bypass push permission on protected branches with owner PAT 2023-04-21 14:55:29 +03:00
62ef1c88fe feat: resetting source to default dismiss the sources pop-up (#797)
* feat: resetting source to default dismiss the sources pop-up

* chore: format using `dart format`
2023-04-21 00:29:37 +05:30
d6918920b6 chore: add missing translations 2023-04-20 23:53:24 +05:30
cdfb09fbfa feat: warning for armv7 devices 2023-04-20 23:20:30 +05:30
bb681e31c9 feat: disable selecting installed apps for nonroot 2023-04-20 22:25:29 +05:30
c7483936ec docs: remove alpha disclaimer 2023-04-20 05:07:46 +05:30
0a1f2da33d feat: appreciation message for new contributors 2023-04-20 05:04:37 +05:30
f5aafdb7d6 feat: progress bar for manager updates 2023-04-20 04:45:46 +05:30
c9adf1c492 style: sort imports 2023-04-19 01:32:43 +05:30
4c9cb560e3 feat: auto select default patches 2023-04-19 01:21:08 +05:30
f0b028279c fix: open contributor links externally (#791) 2023-04-18 19:46:16 +05:30
197770b68b chore: update dependencies (#772)
* chore: updated some dependencies

* refactor: reimplemented cache interceptor

* Revert "Updated dependencies & migrated breaking changes"

This reverts commit e6743b0d6b2552fdbf1c99d23e158e682362dd5d.

* chore: migrated flutter_local_notifications

* revert: reimplemented cache interceptor
2023-04-18 19:45:29 +05:30
37b583f560 feat: trim extra space when setting custom source (#771) 2023-04-18 17:15:04 +07:00
dca2d4fe12 feat: add option to import/export keystore (#776)
* feat: add option to import/export keystore

* change the order of import/export keystore buttons

* feat: add option to change the keystore password
2023-04-18 15:08:10 +05:30
3b677f8ae3 feat: improve ux (#752)
* feat: restart app toast when changing sources, api url

* fix: potentially fix manager stuck on black screen

* feat: remove select all patches chip

* feat: show all apps and recommended versions

* chore(i18n): remove unused strings

remove unused strings left out in 7e05bca

* feat: select install type before patching

* feat: update patches button (#782)

* feat: update patches button

* feat: show toast when force refresh

* chore: don't translate "ReVanced Manager" and "ReVanced Patches"

* Revert "feat: select install type before patching"

This reverts commit 74e0c09b543fe70b70cd917e6e21ceb0f46f3533.

* feat: rename recommended patches to default patches

* feat: add missing localization

* feat: display restart app toast for resetting source

---------

Co-authored-by: EvadeMaster <93124920+EvadeMaster@users.noreply.github.com>
2023-04-18 13:27:26 +05:30
0b952578d1 ci(release): update semantic-release 2023-04-02 02:37:49 +07:00
054afbbedd feat: confirmation dialog for deleting keystore (#764)
* feat: confirmation dialog for deleting keystore

* refactor(i18n): apply suggestion from code-reviewer

Co-authored-by: Ushie <github@ushie.dev>

* refactor: apply suggestion from code-reviewer

Co-authored-by: Mipirakas <borismichiels@gmail.com>

---------

Co-authored-by: Ushie <github@ushie.dev>
Co-authored-by: Mipirakas <borismichiels@gmail.com>
2023-04-01 21:02:28 +07:00
866a6e4a44 chore(CHANGELOG): reset changelog 2023-03-30 23:29:26 +07:00
8ea7dd478b ci(release): update node dependencies 2023-03-30 23:20:31 +07:00
7839252934 ci(analyze): only run when necessary (#766)
* ci(analyser): only run on lib/`.dart` changes

* ci(analyser): runs on workflow changes

* ci(analyze): run on all dart file changes

---------

Co-authored-by: Palm <palmpasuthorn@gmail.com>
2023-03-29 20:51:08 +03:00
fa4063220f ci: dart analyser (#761)
* ci: dart analyser

* ci(analyser): clarify the dart analysing step

* refactor: ignore generated files

* ci(analyser): apply suggestion from code-reviewer

Co-Authored-By: Palm <palmpasuthorn@gmail.com>

* ci(analyser): apply suggestion from code-reviewer

Co-Authored-By: Palm <palmpasuthorn@gmail.com>

* ci(analyser): apply suggestion from code-reviewer

Co-authored-by: Palm <palmpasuthorn@gmail.com>

---------

Co-authored-by: Palm <palmpasuthorn@gmail.com>
2023-03-28 15:47:34 +07:00
d214a02abd ci(release): fix argument parsing of npm exec 2023-03-26 23:02:57 +07:00
d1c12edd1b ci(release): use appropriate npm commands for ci environment 2023-03-26 23:02:57 +07:00
ded1a44c37 ci(release): fix step not moving artifact to accessible path 2023-03-26 23:02:57 +07:00
790a6cd1e3 ci(release): remove unnecessary variables in flutter build step 2023-03-26 18:57:27 +03:00
a79f883a0f ci: use caching to speed up workflows (#760)
Use caching to speed up workflows: 9-14 minutes (ish) to 6-8 minutes (ish)

Commits:
* ci(release): use GitHub cache

* ci(release): restore signing
2023-03-26 20:02:56 +07:00
d9c5a540a3 ci(release): fix wrong artifact name and ci not uploading build 2023-03-24 01:01:44 +07:00
276f33b9ec ci: use semantic-release (#746) 2023-03-23 17:34:52 +01:00
ded59d2da0 feat(ci): update crowdin workflow to use new main branch 2023-03-20 22:39:29 +03:00
62f7a820d8 feat: remove notice about stale development [skip ci] 2023-03-20 18:03:58 +03:00
136 changed files with 9391 additions and 867 deletions

2
.github/config.yaml vendored Normal file
View File

@ -0,0 +1,2 @@
firstPRMergeComment: >
Thank you for contributing to ReVanced. Join us on [Discord](https://revanced.app/discord) if you want to receive a contributor role.

27
.github/workflows/analyze.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Analyze Code
on:
pull_request:
branches: [ "main", "dev" ]
paths:
- "**.dart"
- ".github/workflows/analyze.yml"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install Flutter dependencies
run: flutter pub get
- name: Generate files with Builder
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Analyze code
uses: ValentinVignal/action-dart-analyze@v0.15
with:
fail-on: warning

View File

@ -1,141 +0,0 @@
name: Android Release
on:
push:
branches:
- "**"
tags-ignore:
- "v*"
pull_request:
branches:
- "**"
workflow_dispatch:
jobs:
version:
name: Create version number
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fetch all history for all tags and branches
run: |
git config remote.origin.url https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git fetch --prune --depth=10000
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: "5.x"
- name: Use GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v0.9.7
- name: Create version.txt with nuGetVersion
run: echo ${{ steps.gitversion.outputs.nuGetVersion }} > version.txt
- name: Upload version.txt
uses: actions/upload-artifact@v2
with:
name: gitversion
path: version.txt
build:
name: Create Android Build
needs: version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get version.txt
uses: actions/download-artifact@v2
with:
name: gitversion
- name: Create new file without newline char from version.txt
run: tr -d '\n' < version.txt > version1.txt
- name: Read version
id: version
uses: juliangruber/read-file-action@v1
with:
path: version1.txt
- name: Update version in YAML
run: sed -i 's/99.99.99+99/${{ steps.version.outputs.content }}+${{ github.run_number }}/g' pubspec.yaml
- name: Download Android keystore
id: android_keystore
uses: timheuer/base64-to-file@v1.0.3
with:
fileName: upload-keystore.jks
encodedString: ${{ secrets.SIGNING_KEYSTORE }}
- name: Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
echo "storePassword=${{ secrets.SIGNING_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyPassword=${{ secrets.SIGNING_KEY_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.SIGNING_KEY_ALIAS }}" >> android/key.properties
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "12.x"
cache: gradle
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Get dependencies
run: flutter pub get
- name: Generate files with Builder
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Build with Flutter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
run: flutter build apk
- name: Sign APK
id: sign_apk
uses: ilharp/sign-android-release@v1
with:
releaseDir: build/app/outputs/apk/release
signingKey: ${{ secrets.SIGNING_KEYSTORE }}
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: Add version to APK
run: mv ${{ steps.sign_apk.outputs.signedFile }} revanced-manager-${{ env.RELEASE_VERSION }}.apk
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: revanced-manager-${{ env.RELEASE_VERSION }}
path: revanced-manager-${{ env.RELEASE_VERSION }}.apk
# deploy:
# name: Deploy Android Build
# needs: build
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v1
# - name: Get Android Build from artifacts
# uses: actions/download-artifact@v2
# with:
# name: android-release
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

View File

@ -3,7 +3,7 @@ name: Sync Crowdin translations
on:
push:
branches:
- "flutter"
- "dev"
paths:
- "assets/i18n/en_US.json"
- ".github/workflows/crowdin.yml"

View File

@ -1,26 +1,32 @@
name: "Android CI PR Build"
name: PR Build
on:
pull_request:
branches:
- "**"
workflow_dispatch:
jobs:
release:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up JDK 12
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the release step uses its own credentials:
# https://github.com/cycjimmy/semantic-release-action#private-packages
persist-credentials: false
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '12'
java-version: '17'
distribution: 'zulu'
- uses: subosito/flutter-action@v2
cache: 'gradle'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Set up Flutter
cache: true
- name: Install Flutter dependencies
run: flutter pub get
- name: Generate files with Builder
run: flutter packages pub run build_runner build --delete-conflicting-outputs
@ -28,10 +34,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flutter build apk
- name: Add version to APK
run: mv build/app/outputs/flutter-apk/app-release.apk revanced-manager-${{ env.RELEASE_VERSION }}.apk
- name: Upload APK
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: revanced-manager-${{ env.RELEASE_VERSION }}
path: revanced-manager-${{ env.RELEASE_VERSION }}.apk
name: revanced-manager
path: build/app/outputs/flutter-apk/app-release.apk

View File

@ -15,11 +15,11 @@ jobs:
- name: Set up JDK 12
uses: actions/setup-java@v3
with:
java-version: '12'
distribution: 'zulu'
java-version: "12"
distribution: "zulu"
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
channel: "stable"
- name: Set up Flutter
run: flutter pub get
- name: Generate files with Builder

68
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,68 @@
name: Release
on:
workflow_dispatch:
push:
branches:
- main
- dev
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the release step uses its own credentials:
# https://github.com/cycjimmy/semantic-release-action#private-packages
persist-credentials: false
fetch-depth: 0
- name: Setup JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: 'gradle'
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'npm'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install Flutter dependencies
run: flutter pub get
- name: Generate files with Builder
run: flutter packages pub run build_runner build --delete-conflicting-outputs
- name: Build with Flutter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flutter build apk
- name: Sign APK
id: sign_apk
uses: ilharp/sign-android-release@v1
with:
releaseDir: build/app/outputs/apk/release
signingKey: ${{ secrets.SIGNING_KEYSTORE }}
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: Setup semantic-release
run: npm ci
- name: Get release version
run: npm exec -- semantic-release --dry-run
id: get-next-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add version to APK
run: mv $SIGNED_FILE_PATH $(dirname $SIGNED_FILE_PATH)/revanced-manager-${{ steps.get-next-version.outputs.new-release-version }}.apk
env:
SIGNED_FILE_PATH: ${{steps.sign_apk.outputs.signedFile}}
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
run: npm exec semantic-release

View File

@ -0,0 +1,19 @@
name: Update documentation
on:
push:
paths:
- docs/**
jobs:
trigger:
runs-on: ubuntu-latest
name: Dispatch event to documentation repository
if: github.ref == 'refs/heads/main'
steps:
- uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.DOCUMENTATION_REPO_ACCESS_TOKEN }}
repository: revanced/revanced-documentation
event-type: update-documentation
client-payload: '{"repo": "${{ github.event.repository.name }}", "ref": "${{ github.ref }}"}'

8
.gitignore vendored
View File

@ -134,5 +134,11 @@ app.*.map.json
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock
Firebase related
# Firebase related
.firebase
# Dependency directories
node_modules/
# FVM
.fvm

75
.releaserc Normal file
View File

@ -0,0 +1,75 @@
{
"branches": [
"main",
{
"name": "dev",
"prerelease": true
}
],
"plugins": [
"semantic-release-export-data",
"@semantic-release/commit-analyzer",
[
"@semantic-release/release-notes-generator",
{
"presetConfig": {
"types": [
{
"type": "build",
"section": "Dependency Updates"
},
{
"type": "chore",
"section": "Other Changes",
"hidden": false
},
{
"type": "perf",
"section": "Performance Improvements",
"hidden": false
},
{
"type": "refactor",
"section": "Code Improvements",
"hidden": false
}
]
}
}
],
"@semantic-release/changelog",
"semantic-release-flutter-plugin",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"pubspec.yaml"
]
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "build/app/outputs/apk/release/revanced-manager-*.apk"
}
],
"successComment": false
}
],
[
"@saithodev/semantic-release-backmerge",
{
"backmergeBranches": [
{
"from": "main",
"to": "dev"
}
],
"clearWorkspace": true
}
]
]
}

1
CHANGELOG.md Normal file
View File

@ -0,0 +1 @@

View File

@ -2,18 +2,12 @@
The official ReVanced Manager based on Flutter.
> **Warning**: This repository currently has no active maintainer. For that reason, development is stale. Active development continues for [revanced-cli](https://github.com/revanced/revanced-cli). If you are interested in maintaining this repository, please let us know at manager@revanced.app.
## 🔽 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 latest Manager, go [here](https://github.com/revanced/revanced-manager/releases/latest) and install the provided APK file.
## 📝 Prerequisites
1. Android 8 or higher
2. Does not work on some armv7 devices
3. [Vanced MicroG](https://github.com/TeamVanced/VancedMicroG/releases) required for YouTube and YouTube Music (Only for non-root)
## ⚠️ Disclaimer
*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.*
## 🔴 Issues
For suggestions and bug reports, open an issue [here](https://github.com/revanced/revanced-manager/issues/new/choose).
@ -30,7 +24,7 @@ If you wish to translate ReVanced Manager, we're accepting translations on [Crow
## 🛠️ 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-manager/blob/docs/docs/5_building-from-source.md)
3. Add your github token in gradle.properties like [this](/docs/4_building.md)
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)

View File

@ -11,7 +11,10 @@ include: package:flutter_lints/flutter.yaml
analyzer:
exclude:
- lib/utils/env_class.g.dart
- lib/app/app.locator.dart
- lib/app/app.router.dart
- lib/models/patch.g.dart
- lib/models/patched_application.g.dart
linter:
rules:
@ -95,7 +98,6 @@ linter:
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_contains
- prefer_equal_for_default_values
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals

3
android/Gemfile Normal file
View File

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

View File

@ -71,14 +71,10 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
// ReVanced
implementation "app.revanced:revanced-patcher:7.0.0"
implementation "app.revanced:revanced-patcher:11.0.4"
// Signing & aligning
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
implementation("com.android.tools.build:apksig:7.2.2")
// MicroG cronet
implementation("org.microg:cronet-common:$cronetVersion")
implementation("org.microg:cronet-native:$cronetVersion")
}

View File

@ -6,6 +6,8 @@
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />

View File

@ -44,6 +44,8 @@ class MainActivity : FlutterActivity() {
val selectedPatches = call.argument<List<String>>("selectedPatches")
val cacheDirPath = call.argument<String>("cacheDirPath")
val keyStoreFilePath = call.argument<String>("keyStoreFilePath")
val keystorePassword = call.argument<String>("keystorePassword")
if (patchBundleFilePath != null &&
originalFilePath != null &&
inputFilePath != null &&
@ -52,7 +54,8 @@ class MainActivity : FlutterActivity() {
integrationsPath != null &&
selectedPatches != null &&
cacheDirPath != null &&
keyStoreFilePath != null
keyStoreFilePath != null &&
keystorePassword != null
) {
runPatcher(
result,
@ -64,7 +67,8 @@ class MainActivity : FlutterActivity() {
integrationsPath,
selectedPatches,
cacheDirPath,
keyStoreFilePath
keyStoreFilePath,
keystorePassword
)
} else {
result.notImplemented()
@ -85,7 +89,8 @@ class MainActivity : FlutterActivity() {
integrationsPath: String,
selectedPatches: List<String>,
cacheDirPath: String,
keyStoreFilePath: String
keyStoreFilePath: String,
keystorePassword: String
) {
val originalFile = File(originalFilePath)
val inputFile = File(inputFilePath)
@ -242,7 +247,7 @@ class MainActivity : FlutterActivity() {
// Signer("ReVanced", "s3cur3p@ssw0rd").signApk(patchedFile, outFile, keyStoreFile)
try {
Signer("ReVanced", "s3cur3p@ssw0rd").signApk(patchedFile, outFile, keyStoreFile)
Signer("ReVanced", keystorePassword).signApk(patchedFile, outFile, keyStoreFile)
} catch (e: Exception) {
//log to console
print("Error signing apk: ${e.message}")
@ -266,8 +271,8 @@ class MainActivity : FlutterActivity() {
"update",
mapOf(
"progress" to -100.0,
"header" to "Aborting...",
"log" to "An error occurred! Aborting\nError:\n$stack"
"header" to "Aborted...",
"log" to "An error occurred! Aborted\nError:\n$stack"
)
)
}

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: 9.2 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"/>
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
<monochrome android:drawable="@drawable/ic_launcher_monochrome"/>
<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>

View File

@ -1,5 +1,4 @@
buildscript {
ext.cronetVersion = '102.5005.125'
ext.kotlin_version = '1.7.10'
repositories {
google()
@ -32,6 +31,6 @@ subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
distributionSha256Sum=6147605a23b4eff6c334927a86ff3508cb5d6722cd624c97ded4c2e8640f1f87
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "لم يتم اختيار أي تطبيق",
"noAppsLabel": "لم يتم العثور على تطبيقات",
"currentVersion": "الحالي",
"recommendedVersion": "موصى به",
"anyVersion": "أي"
"recommendedVersion": "موصى به"
},
"patchSelectorCard": {
"widgetTitle": "اختر التعديلات",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Heç bir tətbiq seçilməyib",
"noAppsLabel": "Heç bir tətbiq tapılmadı",
"currentVersion": "Hazırkı",
"recommendedVersion": "Tövsiyyə edilən",
"anyVersion": "istənilən"
"recommendedVersion": "Tövsiyyə edilən"
},
"patchSelectorCard": {
"widgetTitle": "Yamaqları seçin",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Няма избрано приложение",
"noAppsLabel": "Няма намерени приложения",
"currentVersion": "Текуща",
"recommendedVersion": "Препоръчана",
"anyVersion": "всяка"
"recommendedVersion": "Препоръчана"
},
"patchSelectorCard": {
"widgetTitle": "Изберете модификации",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "কোনো অ্যাপ্লিকেশন নির্বাচন করা হয়নি",
"noAppsLabel": "কোন অ্যাপ্লিকেশন পাওয়া যায়নি",
"currentVersion": "বর্তমান",
"recommendedVersion": "প্রস্তাবিত",
"anyVersion": "যেকোনো সংস্করণ"
"recommendedVersion": "প্রস্তাবিত"
},
"patchSelectorCard": {
"widgetTitle": "প্যাচ নির্বাচন করুন",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Nebyla vybrána žádná aplikace",
"noAppsLabel": "Nebyly nalezeny žádné aplikace",
"currentVersion": "Aktuální",
"recommendedVersion": "Doporučeno",
"anyVersion": "jakákoliv"
"recommendedVersion": "Doporučeno"
},
"patchSelectorCard": {
"widgetTitle": "Vybrat záplaty",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Ingen applikation valgt",
"noAppsLabel": "Ingen applikationer fundet",
"currentVersion": "Nuværende",
"recommendedVersion": "Anbefalet",
"anyVersion": "enhver"
"recommendedVersion": "Anbefalet"
},
"patchSelectorCard": {
"widgetTitle": "Vælg patches",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Keine App ausgewählt",
"noAppsLabel": "Keine Apps gefunden",
"currentVersion": "Aktuell",
"recommendedVersion": "Empfohlen",
"anyVersion": "beliebig"
"recommendedVersion": "Empfohlen"
},
"patchSelectorCard": {
"widgetTitle": "Patches auswählen",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Δεν έχει επιλεχθεί εφαρμογή",
"noAppsLabel": "Δεν βρέθηκαν εφαρμογές",
"currentVersion": "Τρέχουσα",
"recommendedVersion": "Προτεινόμενη",
"anyVersion": "οποιαδήποτε"
"recommendedVersion": "Προτεινόμενη"
},
"patchSelectorCard": {
"widgetTitle": "Επιλέξτε τροποποιήσεις",

View File

@ -4,6 +4,8 @@
"updateButton": "Update",
"enabledLabel": "Enabled",
"disabledLabel": "Disabled",
"installed":"Installed: {version}",
"suggested":"Suggested: {version}",
"yesButton": "Yes",
"noButton": "No",
"warning": "Warning",
@ -13,6 +15,7 @@
"settingsTab": "Settings"
},
"homeView": {
"refreshSuccess": "Refreshed successfully",
"widgetTitle": "Dashboard",
"updatesSubtitle": "Updates",
"patchedSubtitle": "Patched applications",
@ -21,11 +24,13 @@
"WIP": "Work in progress...",
"noInstallations": "No patched applications installed",
"installed": "Installed",
"installUpdate": "Continue to install the update?",
"updateDialogTitle": "Update Manager",
"updateChangelogTitle": "Changelog",
"notificationTitle": "Update downloaded",
"notificationText": "Tap to install the update",
"downloadingMessage": "Downloading update...",
"downloadedMessage": "Update downloaded!",
"installingMessage": "Installing update...",
"errorDownloadMessage": "Unable to download update",
"errorInstallMessage": "Unable to install update",
@ -47,16 +52,19 @@
"patcherView": {
"widgetTitle": "Patcher",
"patchButton": "Patch",
"patchDialogText": "You have selected a resource patch and a split APK installation has been detected, so patching errors may occur.\nAre you sure you want to proceed?"
"patchDialogText": "You have selected a resource patch and a split APK installation has been detected, so patching errors may occur.\nAre you sure you want to proceed?",
"armv7WarningDialogText": "Patching on ARMv7 devices is not yet supported and might fail. Proceed anyways?",
"splitApkWarningDialogText": "Patching a split APK is not yet supported and might fail. Proceed anyways?"
},
"appSelectorCard": {
"widgetTitle": "Select an application",
"widgetTitleSelected": "Selected application",
"widgetSubtitle": "No application selected",
"noAppsLabel": "No applications found",
"notInstalled":"App not installed",
"currentVersion": "Current",
"recommendedVersion": "Recommended",
"anyVersion": "any"
"suggestedVersion": "Suggested",
"allVersions": "All versions"
},
"patchSelectorCard": {
"widgetTitle": "Select patches",
@ -71,23 +79,25 @@
"appSelectorView": {
"viewTitle": "Select an application",
"searchBarHint": "Search applications",
"selectFromStorageButton": "Select from storage",
"storageButton": "Storage",
"errorMessage": "Unable to use selected application"
"errorMessage": "Unable to use selected application",
"downloadToast": "Download function is not available yet",
"featureNotAvailable": "Feature not implemented",
"featureNotAvailableText": "This application is a split APK and cannot be selected. Unfortunately, this feature is only available for rooted users at the moment. However, you can still install the application by selecting its APK files from your device's storage instead"
},
"patchesSelectorView": {
"viewTitle": "Select patches",
"searchBarHint": "Search patches",
"doneButton": "Done",
"recommended": "Recommended",
"recommendedTooltip": "Select all recommended patches",
"all": "All",
"allTooltip": "Select all patches",
"default": "Default",
"defaultTooltip": "Select all default patches",
"none": "None",
"noneTooltip": "Deselect all patches",
"loadPatchesSelection": "Load patches selection",
"noSavedPatches": "No saved patches for the selected app.\nPress Done to save current selection.",
"noPatchesFound": "No patches found for the selected app",
"selectAllPatchesWarningContent": "You are about to select all patches, that includes unrecommended patches and can cause unwanted behavior."
"selectAllPatchesWarningContent": "You are about to select all patches, that includes non-suggested patches and can cause unwanted behavior."
},
"patchItem": {
"unsupportedDialogText": "Selecting this patch may result in patching errors.\n\nApp version: {packageVersion}\nSupported versions:\n{supportedVersions}",
@ -151,6 +161,7 @@
"restartAppForChanges": "Restart the app to apply changes",
"deleteKeystoreLabel": "Delete keystore",
"deleteKeystoreHint": "Delete the keystore used to sign the app",
"deleteKeystoreDialogText": "Are you sure you want to delete the keystore used to sign patched applications?",
"deletedKeystore": "Keystore deleted",
"deleteTempDirLabel": "Delete temporary files",
"deleteTempDirHint": "Delete unused temporary files",
@ -168,7 +179,17 @@
"jsonSelectorErrorMessage": "Unable to use selected JSON file",
"deleteLogsLabel": "Delete logs",
"deleteLogsHint": "Delete collected manager logs",
"deletedLogs": "Logs deleted"
"deletedLogs": "Logs deleted",
"exportKeystoreLabel": "Export keystore",
"exportKeystoreHint": "Export keystore used to sign apps",
"exportedKeystore": "Keystore exported",
"noKeystoreExportFileFound": "No keystore to export",
"importKeystoreLabel": "Import keystore",
"importKeystoreHint": "Import keystore used to sign apps",
"importedKeystore": "Keystore imported",
"keystoreSelectorErrorMessage": "Unable to use selected KEYSTORE file",
"selectKeystorePassword": "Keystore Password",
"selectKeystorePasswordHint": "Select keystore password used to sign the apk"
},
"appInfoView": {
"widgetTitle": "App info",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Ninguna aplicación seleccionada",
"noAppsLabel": "No se encontraron aplicaciones",
"currentVersion": "Versión actual",
"recommendedVersion": "Versión recomendada",
"anyVersion": "cualquiera"
"recommendedVersion": "Versión recomendada"
},
"patchSelectorCard": {
"widgetTitle": "Seleccionar parches",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Ninguna aplicación seleccionada",
"noAppsLabel": "No se encontraron aplicaciones",
"currentVersion": "Versión actual",
"recommendedVersion": "Versión recomendada",
"anyVersion": "Cualquier versión"
"recommendedVersion": "Versión recomendada"
},
"patchSelectorCard": {
"widgetTitle": "Seleccionar parches",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Sovellusta ei ole valittu",
"noAppsLabel": "Sovelluksia ei löytynyt",
"currentVersion": "Nykyinen",
"recommendedVersion": "Suositeltu",
"anyVersion": "mikä tahansa"
"recommendedVersion": "Suositeltu"
},
"patchSelectorCard": {
"widgetTitle": "Valitse paikkaukset",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Aucune application sélectionnée",
"noAppsLabel": "Aucune application trouvée",
"currentVersion": "Version actuelle",
"recommendedVersion": "Version recommandée",
"anyVersion": "n'importe laquelle"
"recommendedVersion": "Version recommandée"
},
"patchSelectorCard": {
"widgetTitle": "Sélectionner les patchs",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "कोई ऐप्लकैशन चुना हुआ नहीं",
"noAppsLabel": "कोई एप्लिकेशन नहीं मिला।",
"currentVersion": "वर्तमान",
"recommendedVersion": "अनुशंसित",
"anyVersion": "कोई"
"recommendedVersion": "अनुशंसित"
},
"patchSelectorCard": {
"widgetTitle": "पैच चुने",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Nincs kiválasztott alkalmazás",
"noAppsLabel": "Nem találhatóak alkalmazások",
"currentVersion": "Jelenlegi",
"recommendedVersion": "Ajánlott",
"anyVersion": "bármely"
"recommendedVersion": "Ajánlott"
},
"patchSelectorCard": {
"widgetTitle": "Patchek kiválasztása",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Tidak ada aplikasi yang dipilih",
"noAppsLabel": "Aplikasi tidak ditemukan",
"currentVersion": "Saat ini",
"recommendedVersion": "Rekomendasi",
"anyVersion": "semua"
"recommendedVersion": "Rekomendasi"
},
"patchSelectorCard": {
"widgetTitle": "Pilih Modifikasi",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nessuna applicazione selezionata",
"noAppsLabel": "Nessuna applicazione trovata",
"currentVersion": "Attuale",
"recommendedVersion": "Consigliata",
"anyVersion": "qualsiasi"
"recommendedVersion": "Consigliata"
},
"patchSelectorCard": {
"widgetTitle": "Seleziona patch",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "선택된 앱 없음",
"noAppsLabel": "앱이 발견되지 않음",
"currentVersion": "현재 버전",
"recommendedVersion": "권장 버전",
"anyVersion": "모든 버전"
"recommendedVersion": "권장 버전"
},
"patchSelectorCard": {
"widgetTitle": "패치를 선택하세요",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nepasirinkta programa",
"noAppsLabel": "Nerastos jokios programos",
"currentVersion": "Dabartinė",
"recommendedVersion": "Rekomenduojama",
"anyVersion": "bet kokia"
"recommendedVersion": "Rekomenduojama"
},
"patchSelectorCard": {
"widgetTitle": "Pasirinkite modifikacijas",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Tiada aplikasi dipilih",
"noAppsLabel": "Tiada aplikasi ditemui",
"currentVersion": "Semasa",
"recommendedVersion": "Disyorkan",
"anyVersion": "mana-mana"
"recommendedVersion": "Disyorkan"
},
"patchSelectorCard": {
"widgetTitle": "Pilih modifikasi",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nie wybrano aplikacji",
"noAppsLabel": "Nie znaleziono aplikacji",
"currentVersion": "Aktualna",
"recommendedVersion": "Zalecana",
"anyVersion": "dowolna"
"recommendedVersion": "Zalecana"
},
"patchSelectorCard": {
"widgetTitle": "Wybierz łatki",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Nenhum aplicativo selecionado",
"noAppsLabel": "Nenhum app foi encontrado",
"currentVersion": "Atual",
"recommendedVersion": "Recomendado",
"anyVersion": "todos"
"recommendedVersion": "Recomendado"
},
"patchSelectorCard": {
"widgetTitle": "Selecionar patches",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nenhuma aplicação selecionada",
"noAppsLabel": "Não foram encontradas aplicações",
"currentVersion": "Atual",
"recommendedVersion": "Recomendada",
"anyVersion": "qualquer"
"recommendedVersion": "Recomendada"
},
"patchSelectorCard": {
"widgetTitle": "Selecionar modificações",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nicio aplicație selectată",
"noAppsLabel": "Nu s-au găsit aplicații",
"currentVersion": "Actual",
"recommendedVersion": "Recomandat",
"anyVersion": "oricare"
"recommendedVersion": "Recomandat"
},
"patchSelectorCard": {
"widgetTitle": "Selectați patch-urile",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Не выбрано приложение",
"noAppsLabel": "Приложения не найдены",
"currentVersion": "Текущая",
"recommendedVersion": "Рекомендуемая",
"anyVersion": "любая"
"recommendedVersion": "Рекомендуемая"
},
"patchSelectorCard": {
"widgetTitle": "Выберите патчи",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Nie je vybraná žiadna aplikácia",
"noAppsLabel": "Nebola nájdená žiadna aplikácia",
"currentVersion": "Aktuálne",
"recommendedVersion": "Odporúčané",
"anyVersion": "akákoľvek"
"recommendedVersion": "Odporúčané"
},
"patchSelectorCard": {
"widgetTitle": "Vyberte záplaty",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Nijedna aplikacija nije izabrana",
"noAppsLabel": "Nijedna aplikacija nije pronađena",
"currentVersion": "Trenutna",
"recommendedVersion": "Preporučena",
"anyVersion": "bilo koja"
"recommendedVersion": "Preporučena"
},
"patchSelectorCard": {
"widgetTitle": "Izaberite pečeve",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Ниједна апликација није изабрана",
"noAppsLabel": "Ниједна апликација није пронађена",
"currentVersion": "Тренутна",
"recommendedVersion": "Препоручена",
"anyVersion": "било која"
"recommendedVersion": "Препоручена"
},
"patchSelectorCard": {
"widgetTitle": "Изаберите печеве",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "Ingen app vald",
"noAppsLabel": "Inga applikationer hittades",
"currentVersion": "Nuvarande",
"recommendedVersion": "Rekommenderad",
"anyVersion": "alla"
"recommendedVersion": "Rekommenderad"
},
"patchSelectorCard": {
"widgetTitle": "Välj patchar",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Hakuna programu iliyochaguliwa",
"noAppsLabel": "Hakuna programu zilizopatikana",
"currentVersion": "Sasa",
"recommendedVersion": "Imependekezwa",
"anyVersion": "yoyote"
"recommendedVersion": "Imependekezwa"
},
"patchSelectorCard": {
"widgetTitle": "Chagua viraka",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Hiçbir uygulama seçilmedi",
"noAppsLabel": "Hiçbir uygulama bulunamadı",
"currentVersion": "Şu anki",
"recommendedVersion": "Önerilen",
"anyVersion": "herhangi"
"recommendedVersion": "Önerilen"
},
"patchSelectorCard": {
"widgetTitle": "Yamaları Seçin",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "کوئی ایپلیکیشن منتخب نہیں",
"noAppsLabel": "کوئی ایپلیکیشن نہیں ملی",
"currentVersion": "موجودہ",
"recommendedVersion": "تجویز کردہ",
"anyVersion": "کوئی بھی"
"recommendedVersion": "تجویز کردہ"
},
"patchSelectorCard": {
"widgetTitle": "پیچز منتخب کریں",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "Chưa chọn ứng dụng nào",
"noAppsLabel": "Không tìm thấy ứng dụng nào",
"currentVersion": "Hiện tại",
"recommendedVersion": "Đề xuất",
"anyVersion": "bất kỳ"
"recommendedVersion": "Đề xuất"
},
"patchSelectorCard": {
"widgetTitle": "Chọn bản vá",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "未选择应用程序",
"noAppsLabel": "未发现应用程序。",
"currentVersion": "当前",
"recommendedVersion": "推荐",
"anyVersion": "任意"
"recommendedVersion": "推荐"
},
"patchSelectorCard": {
"widgetTitle": "选择补丁",

View File

@ -54,8 +54,7 @@
"widgetSubtitle": "沒有選擇應用程式",
"noAppsLabel": "找不到應用程式",
"currentVersion": "目前版本",
"recommendedVersion": "推薦版本",
"anyVersion": "任何版本"
"recommendedVersion": "推薦版本"
},
"patchSelectorCard": {
"widgetTitle": "選擇補丁",

View File

@ -55,8 +55,7 @@
"widgetSubtitle": "未選取應用程式",
"noAppsLabel": "找不到應用程式",
"currentVersion": "目前",
"recommendedVersion": "建議",
"anyVersion": "任何"
"recommendedVersion": "建議"
},
"patchSelectorCard": {
"widgetTitle": "選取修補檔",

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 app.
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
1. Download the latest version of ReVanced Manager from [here](https://github.com/revanced/revanced-manager/releases/latest)
2. Install ReVanced Manager
## ⏭️ What's next
The next page will guide you through patching an app.
Continue: [🪛 Usage](2_usage.md)

27
docs/2_1_patching.md Normal file
View File

@ -0,0 +1,27 @@
# 🧩 Patching apps
The following pages will guide you through using ReVanced Manager to patch apps.
## 🪜 Steps to patch apps
1. Navigate to the **Patcher** tab from the bottom navigation bar
2. Tap on the **Select an app** card
3. Choose an app to patch[^1]
> **Note**: The suggested version is visible in each app's card.
4. Tap on the **Select patches** card and select the patches you want to apply[^2]
> **Warning**: If you see a warning you can click on it for more information.
5. Tap on the **Done** then **Patch** button
> **Warning**: The patching process may take ~5 minutes. Exiting the app may increase the time it takes to patch.
6. Tap on the **Install** button
> **Note**: If you are rooted, you can mount the patched app on top of the original app.[^3]
> Optionally, you may export the patched app to storage using the options in the top right corner.
[^1]: Non-root users may be prompted to select an APK from storage, in which case you have to source the APK file yourself. ReVanced does not provide any APK files.
[^2]: It is suggested to use the default set of patches by tapping on the **Default** button above the list of patches.
[^3]: Mounting the patched app on top of the original app will only work if the installed app version matches the version of the app 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 apps
After patching an app, you may want to manage it. This page will guide you through managing patched apps.
## 🪜 Steps to manage patched apps
1. Tap on the **Dashboard** tab in the bottom navigation bar
2. Select the **Installed** chip
3. Tap on the **Info** button for the app 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 app version constraints from ReVanced Patches. This allows you to patch any version of an app, 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 app in particular but rather for all apps but may not work on all apps.
- ### 🔑 Export, import or delete keystore
Manage the keystore used to sign patched apps.
- ### 📄 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 apps, manage patched apps, and update ReVanced Manager.
## 📖 Table of contents
1. [🧩 Patching apps](2_1_patching.md)
2. [🧰 Managing patched apps](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)

31
docs/3_troubleshooting.md Normal file
View File

@ -0,0 +1,31 @@
# 🛟 Troubleshooting
In case you encounter any issues while using ReVanced Manager, please refer to this page for possible solutions.
- 💉 Patching fails with an error
Make sure ReVanced Manager is up to date by following [🔄 Updating ReVanced Manager](2_3_updating.md) and select the **Default** button when choosing patches.
- 💥 App not installed as package conflicts with an existing package
An existing installation of the app you're trying to patch is conflicting with the patched app. Uninstall the existing app before installing the patched app.
- ❗️ Error code `135`, `139` or `1` when patching the app
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 app.
- 🚫 Non-root install is not possible with the current patches selection
Select the **Default** button when choosing patches.
- 🚨 Patched app crashes on launch
Select the **Default** button 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
```

21
docs/README.md Normal file
View File

@ -0,0 +1,21 @@
# 💊 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 apps](2_1_patching.md)
2. [🧰 Managing patched apps](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)
## ⏭️ Start here
The next page will tell you about the prerequisites for using ReVanced Manager.
Continue: [💼 Prerequisites](0_prerequisites.md)

2
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
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

48
fastlane/README.md Normal file
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 @@
ReVanced Manager is an Android application that uses ReVanced Patcher to add, remove, and modify existing functionalities in Android applications

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

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

20
fastlane/report.xml Normal file

File diff suppressed because one or more lines are too long

View File

@ -3,20 +3,24 @@ import 'dart:io';
import 'package:collection/collection.dart';
import 'package:dio/dio.dart';
import 'package:dio_http_cache_lts/dio_http_cache_lts.dart';
import 'package:dio_cache_interceptor/dio_cache_interceptor.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter_cache_manager/flutter_cache_manager.dart';
import 'package:injectable/injectable.dart';
import 'package:revanced_manager/models/patch.dart';
import 'package:revanced_manager/services/manager_api.dart';
@lazySingleton
class GithubAPI {
late Dio _dio = Dio();
final DioCacheManager _dioCacheManager = DioCacheManager(CacheConfig());
final Options _cacheOptions = buildCacheOptions(
const Duration(hours: 6),
final _cacheOptions = CacheOptions(
store: MemCacheStore(),
maxStale: const Duration(days: 1),
priority: CachePriority.high,
);
final Map<String, String> repoAppPath = {
'com.google.android.youtube': 'youtube',
'com.google.android.apps.youtube.music': 'music',
@ -36,7 +40,7 @@ class GithubAPI {
),
);
_dio.interceptors.add(_dioCacheManager.interceptor);
_dio.interceptors.add(DioCacheInterceptor(options: _cacheOptions));
} on Exception catch (e) {
if (kDebugMode) {
print(e);
@ -46,7 +50,7 @@ class GithubAPI {
Future<void> clearAllCache() async {
try {
await _dioCacheManager.clearAll();
await _cacheOptions.store!.clean();
} on Exception catch (e) {
if (kDebugMode) {
print(e);
@ -54,13 +58,23 @@ class GithubAPI {
}
}
Future<Map<String, dynamic>?> getLatestRelease(String repoName) async {
Future<Map<String, dynamic>?> getLatestRelease(
String repoName,
) async {
try {
final response = await _dio.get(
'/repos/$repoName/releases',
options: _cacheOptions,
);
return response.data[0];
final Map<String, dynamic> releases = response.data[0];
int updates = 0;
final String currentVersion = await ManagerAPI().getCurrentManagerVersion();
while (response.data[updates]['tag_name'] != 'v$currentVersion') {
updates++;
}
for(int i = 1; i < updates; i++){
releases.update('body', (value) => value + '\n' + '# '+ response.data[i]['tag_name']+'\n' + response.data[i]['body']);
}
return releases;
} on Exception catch (e) {
if (kDebugMode) {
print(e);
@ -83,12 +97,11 @@ class GithubAPI {
'path': path,
'since': since.toIso8601String(),
},
options: _cacheOptions,
);
final List<dynamic> commits = response.data;
return commits
.map(
(commit) => (commit['commit']['message']).split('\n')[0] +
(commit) => commit['commit']['message'].split('\n')[0] +
' - ' +
commit['commit']['author']['name'] +
'\n' as String,
@ -102,7 +115,10 @@ class GithubAPI {
return [];
}
Future<File?> getLatestReleaseFile(String extension, String repoName) async {
Future<File?> getLatestReleaseFile(
String extension,
String repoName,
) async {
try {
final Map<String, dynamic>? release = await getLatestRelease(repoName);
if (release != null) {

View File

@ -11,6 +11,7 @@ import 'package:revanced_manager/models/patched_application.dart';
import 'package:revanced_manager/services/github_api.dart';
import 'package:revanced_manager/services/revanced_api.dart';
import 'package:revanced_manager/services/root_api.dart';
import 'package:revanced_manager/utils/check_for_supported_patch.dart';
import 'package:shared_preferences/shared_preferences.dart';
@lazySingleton
@ -21,7 +22,11 @@ class ManagerAPI {
final String patcherRepo = 'revanced-patcher';
final String cliRepo = 'revanced-cli';
late SharedPreferences _prefs;
bool isRooted = false;
String storedPatchesFile = '/selected-patches.json';
String keystoreFile =
'/sdcard/Android/data/app.revanced.manager.flutter/files/revanced-manager.keystore';
String defaultKeystorePassword = 's3cur3p@ssw0rd';
String defaultApiUrl = 'https://releases.revanced.app/';
String defaultRepoUrl = 'https://api.github.com';
String defaultPatcherRepo = 'revanced/revanced-patcher';
@ -29,9 +34,14 @@ class ManagerAPI {
String defaultIntegrationsRepo = 'revanced/revanced-integrations';
String defaultCliRepo = 'revanced/revanced-cli';
String defaultManagerRepo = 'revanced/revanced-manager';
String? patchesVersion = '';
bool isDefaultPatchesRepo() {
return getPatchesRepo() == 'revanced/revanced-patches';
}
Future<void> initialize() async {
_prefs = await SharedPreferences.getInstance();
isRooted = await _rootAPI.isRooted();
storedPatchesFile =
(await getApplicationDocumentsDirectory()).path + storedPatchesFile;
}
@ -114,6 +124,14 @@ class ManagerAPI {
await _prefs.setBool('experimentalPatchesEnabled', value);
}
Future<void> setKeystorePassword(String password) async {
await _prefs.setString('keystorePassword', password);
}
String getKeystorePassword() {
return _prefs.getString('keystorePassword') ?? defaultKeystorePassword;
}
Future<void> deleteTempFolder() async {
final Directory dir = Directory('/data/local/tmp/revanced-manager');
if (await dir.exists()) {
@ -123,7 +141,7 @@ class ManagerAPI {
Future<void> deleteKeystore() async {
final File keystore = File(
'/sdcard/Android/data/app.revanced.manager.flutter/files/revanced-manager.keystore',
keystoreFile,
);
if (await keystore.exists()) {
await keystore.delete();
@ -135,7 +153,9 @@ class ManagerAPI {
return apps.map((a) => PatchedApplication.fromJson(jsonDecode(a))).toList();
}
Future<void> setPatchedApps(List<PatchedApplication> patchedApps) async {
Future<void> setPatchedApps(
List<PatchedApplication> patchedApps,
) async {
if (patchedApps.length > 1) {
patchedApps.sort((a, b) => a.name.compareTo(b.name));
}
@ -237,15 +257,24 @@ class ManagerAPI {
}
Future<File?> downloadManager() async {
return await _revancedAPI.getLatestReleaseFile('.apk', defaultManagerRepo);
return await _revancedAPI.getLatestReleaseFile(
'.apk',
defaultManagerRepo,
);
}
Future<String?> getLatestPatcherReleaseTime() async {
return await _revancedAPI.getLatestReleaseTime('.gz', defaultPatcherRepo);
return await _revancedAPI.getLatestReleaseTime(
'.gz',
defaultPatcherRepo,
);
}
Future<String?> getLatestManagerReleaseTime() async {
return await _revancedAPI.getLatestReleaseTime('.apk', defaultManagerRepo);
return await _revancedAPI.getLatestReleaseTime(
'.apk',
defaultManagerRepo,
);
}
Future<String?> getLatestManagerVersion() async {
@ -267,6 +296,18 @@ class ManagerAPI {
return packageInfo.version;
}
Future<String?> getCurrentPatchesVersion() async {
if (isDefaultPatchesRepo()) {
patchesVersion = await getLatestPatchesVersion();
// print('Patches version: $patchesVersion');
} else {
// fetch from github
patchesVersion =
await _githubAPI.getLastestReleaseVersion(getPatchesRepo());
}
return patchesVersion ?? '0.0.0';
}
Future<List<PatchedApplication>> getAppsToRemove(
List<PatchedApplication> patchedApps,
) async {
@ -359,8 +400,9 @@ class ManagerAPI {
final int currentInstalledVersionInt = int.parse(
currentInstalledVersion.replaceAll(RegExp('[^0-9]'), ''),
);
final int currentSavedVersionInt =
int.parse(currentSavedVersion.replaceAll(RegExp('[^0-9]'), ''));
final int currentSavedVersionInt = int.parse(
currentSavedVersion.replaceAll(RegExp('[^0-9]'), ''),
);
if (currentInstalledVersionInt > currentSavedVersionInt) {
app.hasUpdates = true;
}
@ -383,7 +425,10 @@ class ManagerAPI {
return !existsNonRoot;
}
Future<bool> hasAppUpdates(String packageName, DateTime patchDate) async {
Future<bool> hasAppUpdates(
String packageName,
DateTime patchDate,
) async {
final List<String> commits = await _githubAPI.getCommits(
packageName,
getPatchesRepo(),
@ -421,7 +466,10 @@ class ManagerAPI {
return app != null && app.isSplit;
}
Future<void> setSelectedPatches(String app, List<String> patches) async {
Future<void> setSelectedPatches(
String app,
List<String> patches,
) async {
final File selectedPatchesFile = File(storedPatchesFile);
final Map<String, dynamic> patchesMap = await readSelectedPatchesFile();
if (patches.isEmpty) {
@ -432,9 +480,33 @@ class ManagerAPI {
selectedPatchesFile.writeAsString(jsonEncode(patchesMap));
}
// get default patches for app
Future<List<String>> getDefaultPatches() async {
final List<Patch> patches = await getPatches();
final List<String> defaultPatches = [];
if (areExperimentalPatchesEnabled() == false) {
defaultPatches.addAll(
patches
.where(
(element) =>
element.excluded == false && isPatchSupported(element),
)
.map((p) => p.name),
);
} else {
defaultPatches.addAll(
patches
.where((element) => isPatchSupported(element))
.map((p) => p.name),
);
}
return defaultPatches;
}
Future<List<String>> getSelectedPatches(String app) async {
final Map<String, dynamic> patchesMap = await readSelectedPatchesFile();
return List.from(patchesMap.putIfAbsent(app, () => List.empty()));
final List<String> defaultPatches = await getDefaultPatches();
return List.from(patchesMap.putIfAbsent(app, () => defaultPatches));
}
Future<Map<String, dynamic>> readSelectedPatchesFile() async {

View File

@ -118,13 +118,17 @@ class PatcherAPI {
return filteredPatches[packageName];
}
Future<List<Patch>> getAppliedPatches(List<String> appliedPatches) async {
Future<List<Patch>> getAppliedPatches(
List<String> appliedPatches,
) async {
return _patches
.where((patch) => appliedPatches.contains(patch.name))
.toList();
}
Future<bool> needsResourcePatching(List<Patch> selectedPatches) async {
Future<bool> needsResourcePatching(
List<Patch> selectedPatches,
) async {
return selectedPatches.any(
(patch) => patch.dependencies.any(
(dep) => dep.contains('resource-'),
@ -140,30 +144,23 @@ class PatcherAPI {
);
}
Future<String> getOriginalFilePath(
String packageName,
String originalFilePath,
) async {
Future<String> getOriginalFilePath(String packageName) async {
try {
final bool hasRootPermissions = await _rootAPI.hasRootPermissions();
if (hasRootPermissions) {
originalFilePath = await _rootAPI.getOriginalFilePath(
packageName,
originalFilePath,
);
return await _rootAPI.getOriginalFilePath(packageName);
}
return originalFilePath;
} on Exception catch (e) {
if (kDebugMode) {
print(e);
}
return originalFilePath;
}
return '';
}
Future<void> runPatcher(
String packageName,
String originalFilePath,
String apkFilePath,
List<Patch> selectedPatches,
) async {
final bool includeSettings = await needsSettingsPatch(selectedPatches);
@ -194,15 +191,16 @@ class PatcherAPI {
_outFile = File('${workDir.path}/out.apk');
final Directory cacheDir = Directory('${workDir.path}/cache');
cacheDir.createSync();
String originalFilePath = await getOriginalFilePath(packageName);
if (originalFilePath.isEmpty) {
originalFilePath = apkFilePath;
}
try {
await patcherChannel.invokeMethod(
'runPatcher',
{
'patchBundleFilePath': patchBundleFile.path,
'originalFilePath': await getOriginalFilePath(
packageName,
originalFilePath,
),
'originalFilePath': originalFilePath,
'inputFilePath': inputFile.path,
'patchedFilePath': patchedFile.path,
'outFilePath': _outFile!.path,
@ -210,6 +208,7 @@ class PatcherAPI {
'selectedPatches': selectedPatches.map((p) => p.name).toList(),
'cacheDirPath': cacheDir.path,
'keyStoreFilePath': _keyStoreFile.path,
'keystorePassword': _managerAPI.getKeystorePassword(),
},
);
} on Exception catch (e) {
@ -234,7 +233,9 @@ class PatcherAPI {
}
} else {
await AppInstaller.installApk(_outFile!.path);
return await DeviceApps.isAppInstalled(patchedApp.packageName);
return await DeviceApps.isAppInstalled(
patchedApp.packageName,
);
}
} on Exception catch (e) {
if (kDebugMode) {
@ -303,7 +304,7 @@ class PatcherAPI {
ShareExtend.share(log.path, 'file');
}
String getRecommendedVersion(String packageName) {
String getSuggestedVersion(String packageName) {
final Map<String, int> versions = {};
for (final Patch patch in _patches) {
final Package? package = patch.compatiblePackages.firstWhereOrNull(

Some files were not shown because too many files have changed in this diff Show More