Compare commits

..

617 Commits

Author SHA1 Message Date
8dd6e73f7b feat: Rename strings 2025-05-22 14:47:42 +02:00
7ca003a30d build: Do not sign all releases with debug key 2025-05-22 14:29:43 +02:00
70a695017e docs: Update docs with all manager features and improve consistency 2025-05-22 14:15:44 +02:00
9b2c99da05 feat: Use simpler strings 2025-05-22 14:15:19 +02:00
07158ae1d1 chore: Move API project from separate repo to this
Set up CI to publish the API library package as well as release the app.
2025-05-22 10:56:23 +02:00
2b380b0d7c fix(Compose): Adjusted universal patches safeguard and warnings (#2550) 2025-05-20 14:12:38 +02:00
5153e5e0cb feat(Compose): hide developer settings (#2551) 2025-05-20 14:12:37 +02:00
a1f5dd3c26 fix: handle edge-to-edge properly in fullscreen dialogs 2025-05-20 14:12:36 +02:00
2b0784865a feat(Compose): Add confirmation dialog on multiple operations (#2529) 2025-05-20 14:12:34 +02:00
d7c0913277 refactor: Rename settings screens for consistency (#2547) 2025-05-20 14:12:33 +02:00
18199bb968 feat(Compose): Improve patches selector tab by adding the bundle version (#2545) 2025-05-20 14:12:32 +02:00
9d329e0f54 ci: Adjust and modernize workflow files to match other repos 2025-05-20 14:12:30 +02:00
e9fcb4a383 docs: Adjust issue templates to match other repos 2025-05-20 14:12:29 +02:00
68f74f1651 docs: Add contribution guidelines and adjust README 2025-05-20 14:12:27 +02:00
6264800a05 build: Update Gradle Wrapper 2025-05-20 14:12:26 +02:00
658699dd81 fix: patch count remaining at zero when using process runtime (#2542) 2025-05-20 14:12:24 +02:00
222089a7ec feat: Order bundles by number of patches 2025-05-20 14:12:23 +02:00
eff5c4860b style: Apply formatting 2025-05-20 14:12:21 +02:00
d4e60acbaa build: Sign releases using keystore if available 2025-05-20 14:12:20 +02:00
1ab74acf1d feat: Use "Debug" and "Debug signed" for build names respectively 2025-05-20 14:12:19 +02:00
28aad879ba feat: Move safeguards above patcher preference group 2025-05-20 14:12:17 +02:00
9f44541bbd fix: Reset cached theme on theme change to avoid broken colors (#2527) 2025-05-20 14:12:15 +02:00
02d2153195 feat(Compose): Move developer options to top level (#2528) 2025-05-20 14:12:14 +02:00
39e821738f build: Remove repos that are not required 2025-05-20 14:12:12 +02:00
7863fbb604 fix: Ignore long click when already in delete mode
closes #2503
2025-05-20 14:12:11 +02:00
94ab6996ae feat: add network checks for features that require it 2025-05-20 14:12:10 +02:00
1319a03651 feat: move plugin api to another repository 2025-05-20 14:12:08 +02:00
f93085f782 fix: Do not poll battery optimization status (#2491) 2025-05-20 14:12:07 +02:00
40a4317993 feat: Improve update screen design (#2487) 2025-05-20 14:12:06 +02:00
8095a1f963 fix: Use compatible rather than support when referring to patch compatibility (#2422) 2025-05-20 14:12:04 +02:00
90c7600586 feat: Improve APK file name formatting on save (#2421) 2025-05-20 14:12:03 +02:00
105492bfa5 build(deps): bump the gradle-compose group with 16 updates (#2407) 2025-05-20 14:12:01 +02:00
ce63b799e6 feat: Reorder Import & Export settings (#2403) 2025-05-20 14:12:00 +02:00
2fe2d46c72 feat: TopAppBar scroll behavior (#2397) 2025-05-20 14:11:58 +02:00
bc3888da79 ci: Generate release artifact provenance (#2324)
Signed-off-by: validcube <pun.butrach@gmail.com>
2025-05-20 14:11:57 +02:00
52b982d81f fix: improve keystore import error handling and show toast 2025-05-20 14:11:56 +02:00
ab48672621 build: Enable pseudo locale for debug variant 2025-05-20 14:11:54 +02:00
0027c90ed3 chore: Update project's dependencies to latest 2025-05-20 14:11:53 +02:00
b6ad686a26 fix: show install button when installation has been cancelled 2025-05-20 14:11:51 +02:00
f59d57499d feat: Screen slide transition (#2396) 2025-05-20 14:11:50 +02:00
5f65c12ec1 fix: Offset badge 2025-05-20 14:11:49 +02:00
65e44dc5a8 build: Bump AGP to 8.8.0
build: Bump AGP to 8.8.0
2025-05-20 14:11:47 +02:00
e6ed4a88c9 docs: Merge documentation from Flutter to Compose 2025-05-20 14:11:46 +02:00
390e3533c9 feat: Redesign the patches screen (#2381) 2025-05-20 14:11:44 +02:00
c1ff2f9924 fix: available updates dialog list item color 2025-05-20 14:11:42 +02:00
d084925c0f refactor: use EventEffect for legacy import 2025-05-20 14:11:41 +02:00
3cf540f190 feat: add required options screen (#2378) 2025-05-20 14:11:39 +02:00
5514c75061 feat: Add confirm dialogs when toggling dangerous settings (#2072)
Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 14:11:37 +02:00
ca147cc6dc chore: add .kotlin to gitignore 2025-05-20 14:11:36 +02:00
3c3e995f31 fix: remove battery optimization notification if user grants the permission 2025-05-20 14:11:35 +02:00
67809700c7 feat: switch to androidx.navigation (#2362) 2025-05-20 14:11:33 +02:00
32c7eddb48 refactor: remove unnecessary function 2025-05-20 14:11:31 +02:00
756e3a815f fix: contributors screen repository name 2025-05-20 14:11:29 +02:00
f8f915563e fix: process death resilience and account for android 11 bug (#2355) 2025-05-20 14:11:27 +02:00
2733ce4915 fix: Screen turns off while patching due to wrong WakeLock (#2147) 2025-05-20 14:11:25 +02:00
04a78fabff feat: Add downloader plugin system (#2041) 2025-05-20 14:11:23 +02:00
94e26ba053 feat: switch to revanced api v4 2025-05-20 14:11:21 +02:00
1704947c52 chore: Nitpick on misspelling of comment 2025-05-20 14:11:20 +02:00
e027f8cc9c feat: Make patch bundles list scrollable (#2322) 2025-05-20 14:11:18 +02:00
37e612febc chore: update dependencies
🦀 integrations are gone! 🦀
2025-05-20 14:11:17 +02:00
374531237f fix: only perform haptics on events 2025-05-20 14:11:15 +02:00
abe5a20c4a feat: Add haptic feedback (#1457)
Co-authored-by: Ushie <ushiekane@gmail.com>
2025-05-20 14:11:14 +02:00
0a29ff48ca fix: Match "Installation incompatible" dialog message with Flutter Manager (#2231) 2025-05-20 14:11:12 +02:00
95cffcc0a0 feat(patcher): Improve installation (#2185) 2025-05-20 14:11:10 +02:00
45ff64f26e feat: Add installer status dialog (#1473)
Co-authored-by: Benjamin Halko <benjaminhalko@hotmail.com>
Co-authored-by: Benjamin <73490201+BenjaminHalko@users.noreply.github.com>
Co-authored-by: Ushie <ushiekane@gmail.com>
Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 14:11:09 +02:00
7973b367ec feat: View bundle patches (#2065) 2025-05-20 14:11:07 +02:00
641f6af6da feat: Open the app-specific manage all files permission dialog (#2148) 2025-05-20 14:11:06 +02:00
6d142e72a6 feat: Improve patch bundle screen (#2070) 2025-05-20 14:11:05 +02:00
e812f69740 feat: Improve Settings order (#2060)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 14:11:03 +02:00
df79e3d13a fix: remove the unique constraint for patch bundle names 2025-05-20 14:11:01 +02:00
207b005d56 fix: Move temporary files outside of the cache directory (#2122) 2025-05-20 14:11:00 +02:00
4a1695a766 refactor: Add parameters for custom rotation values in ArrowButton 2025-05-20 14:10:58 +02:00
737e709287 ci: Actually enable caching of Gradle 2025-05-20 14:10:57 +02:00
4727e8243c fix: Turn off filters by default (#2079) 2025-05-20 14:10:55 +02:00
5e0ba77f4a fix: ExtendedFloatingActionButton not accessible by screen readers (#2080) 2025-05-20 14:10:54 +02:00
a76a58d6ee feat: Improve unsupported patch warnings (#2066)
Closes #2052
2025-05-20 14:10:52 +02:00
4ebc33cd2a fix: show available and selected patches in patch selector screen 2025-05-20 14:10:51 +02:00
89a1a3026e feat: Add reset button to custom API (#2076)
Closes #2051
2025-05-20 14:10:49 +02:00
16f16e859b feat: Show manager update dialog (#2069)
Closes #1963, closes #1958
2025-05-20 14:10:48 +02:00
83eb1a9fd7 fix: Support patching on ARMv7 by updating AAPT2 (#2084) 2025-05-20 14:10:46 +02:00
9a336aa3ef feat: Improve update setting tile titles
Closes #1968
2025-05-20 14:10:45 +02:00
d0b8cba2bf build: Enable Gradle Configuration Cache (#2059) 2025-05-20 14:10:43 +02:00
7436d99532 fix: always use default patch selection if customization is disabled 2025-05-20 14:10:40 +02:00
c982babaeb fix: android icon not loading in app selector 2025-05-20 14:10:38 +02:00
211f7d2fa2 feat: Improve custom API URL dialog (#2033)
Signed-off-by: validcube <pun.butrach@gmail.com>
2025-05-20 14:10:35 +02:00
d432ffbbe0 fix: Broken header padding in AlertDialogExtended when using an Icon 2025-05-20 14:10:34 +02:00
500cd63507 fix: Remove unnecessary screen padding
Closes #2062
2025-05-20 14:10:33 +02:00
9404c3c297 feat: Remove tag from changelog 2025-05-20 14:09:41 +02:00
f2f89aa185 feat: Progressive AlertDialog for adding bundles
Closes #1992
2025-05-20 14:07:57 +02:00
d6e931a876 fix: Use the correct icon in API URL dialog
Closes #1972
2025-05-20 14:06:10 +02:00
260964c633 feat: Add sensitivity to isScrollingUp 2025-05-20 14:06:08 +02:00
87addbff55 feat: Add isScrollingUp support for ScrollState 2025-05-20 14:06:05 +02:00
5ff5298e0e fix: Use FAB instead of ListItem to patch in App Overview
Closes #1995
2025-05-20 14:06:04 +02:00
0bb08c7afc feat: Improve device information in debugging section
Closes #1977
2025-05-20 14:06:01 +02:00
a0e67a42e0 fix: Change the title in the Update screen from "Updates" to "Update"
Closes #1960
2025-05-20 14:05:59 +02:00
585d54a8a8 feat: Change "Update" to "Show" in Update Available notification
Closes #1959
2025-05-20 14:05:57 +02:00
abdae89434 feat: Highlight links in Markdown
Closes #1962
2025-05-20 14:05:54 +02:00
c7c4da54fb feat: Improve initial update popup wording
Closes #1956
2025-05-20 14:05:53 +02:00
2dacfce61d chore: Remove unused ARMv7 AAPT binary
Closes #1954
2025-05-20 14:05:52 +02:00
f8da11e684 refactor: Improve naming consistency in libs.version.toml
Closes #1953
2025-05-20 14:05:50 +02:00
f384c66dd6 fix: Inconsistent padding for battery optimisation warning
The problem came after moving the card to DashboardScreen, this is because the card specified padding modifier but others does not. This commit remove the modifier completely.
2025-05-20 14:05:03 +02:00
1a9031193c refactor: Use TextButton instead of FilledButton for consistency 2025-05-20 14:05:02 +02:00
dc743021c3 ci: Bump dependencies to latest (#2039) 2025-05-20 14:05:00 +02:00
a81913c2f7 chore: update dependencies 2025-05-20 14:04:58 +02:00
494197b5dd fix: move battery warning to dashboard 2025-05-20 14:04:57 +02:00
285c55228d feat: improve the safeguards (#2038) 2025-05-20 14:04:54 +02:00
aedc6e9970 fix: run props flow on correct dispatcher (#2035) 2025-05-20 14:04:51 +02:00
3ed2c87f45 feat: Automatic language detection (#2032) 2025-05-20 14:04:49 +02:00
d5b22258a6 fix: improve bundle page strings 2025-05-20 14:04:46 +02:00
e6361118a7 fix: cleanup advanced settings screen 2025-05-20 14:04:45 +02:00
edf2f28eca feat: dont ask for root on launch 2025-05-20 14:04:44 +02:00
b5abe1bbc3 feat: improve UX for failed or missing bundles 2025-05-20 14:04:41 +02:00
8654da0dfe feat: implement more patch option types (#2015) 2025-05-20 14:04:39 +02:00
c48698334c fix: crash when removing used bundles 2025-05-20 14:04:36 +02:00
f53299b2a6 fix: import export screen UX 2025-05-20 14:04:34 +02:00
8c1b8e1ee1 feat: add ability to share debug logs 2025-05-20 14:04:32 +02:00
500e0ad9b7 fix: import bundles on another thread 2025-05-20 14:04:30 +02:00
0d6ee98609 feat: get bundle information from jar manifest (#2027) 2025-05-20 14:04:29 +02:00
231cf52f30 fix: add bounds checks in patch selector 2025-05-20 14:04:28 +02:00
994cb6c4b0 feat: rename main bundle to Default 2025-05-20 14:04:26 +02:00
7365fc241a fix: use proper update icon 2025-05-20 14:04:24 +02:00
e2f02ebf22 feat: improve patcher screen labels 2025-05-20 14:04:21 +02:00
5150adeaff fix: scrolling in patch selector 2025-05-20 14:04:19 +02:00
92612f9aec feat: rename debug build to ReVanced Manager (dev) 2025-05-20 14:04:17 +02:00
44b5f7b3bc fix(downloader): versions not loading correctly 2025-05-20 14:04:15 +02:00
46bd2f48a8 fix: automatically focus search views 2025-05-20 14:04:13 +02:00
3ac2062992 feat: move update to notification card (#1917) 2025-05-20 14:04:11 +02:00
95be465b39 feat: revert to blue theme colors 2025-05-20 14:04:09 +02:00
226d9c9c23 refactor: fix more warnings 2025-05-20 14:04:06 +02:00
dabf16a436 build(deps): update ksp 2025-05-20 14:04:04 +02:00
ff0bf43c7d refactor: replace deprecated functions 2025-05-20 14:04:02 +02:00
016de8bb0d fix: crash caused by compose inlining bug
This is a bug in jetpack compose. Inlining this function wasn't very
important anyways so it's best to just stop inlining it to avoid the
crash.
2025-05-20 14:04:00 +02:00
b6c02b7be1 build(deps): bump aboutLibrariesGradlePlugin from 11.1.0 to 11.1.1 (#1813)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 14:03:58 +02:00
9e7b26b1c8 build(deps): bump androidx.compose.ui:ui-tooling from 1.6.3 to 1.6.4 (#1814)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 14:03:56 +02:00
05eb0d7457 build(deps): bump androidx.compose:compose-bom from 2024.02.02 to 2024.03.00 (#1812)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 14:03:55 +02:00
4b0706f8b0 build(deps): bump libsu from 5.2.1 to 5.2.2 (#1810)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 14:03:52 +02:00
9c6f0c324b build(deps): bump plugin.serialization from 1.9.22 to 1.9.23 (#1811)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 14:03:48 +02:00
c98ca70e08 fix: correctly patch apk files 2025-05-20 14:03:46 +02:00
424fe25dfb feat: add external process runtime (#1799) 2025-05-20 14:03:44 +02:00
666deda0b5 feat: check if the version being used is the recommended version (#1675) 2025-05-20 14:03:42 +02:00
5e4510eed5 feat: add social links (#1294)
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 14:03:39 +02:00
a9147ed0c0 chore: Upgrade dependencies (#1761)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-20 14:03:37 +02:00
bd7c4aa554 chore: upgrade dependencies (#1670) 2025-05-20 14:03:36 +02:00
9d0f3a3605 fix(VersionSelector): use correct LazyColumn item key 2025-05-20 14:03:33 +02:00
093a4ebf49 refactor: Disable update for dev build (#1673)
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2025-05-20 14:03:31 +02:00
17cc9f9e9e feat: Collapse ExtendedFAB on scroll (#1630) 2025-05-20 14:03:29 +02:00
bd85b254e4 feat: add toast feedback to the bundle update button 2025-05-20 14:03:26 +02:00
1460fd7be2 fix: patch options reset button being broken 2025-05-20 14:03:24 +02:00
bc3fe3f0f2 refactor: use consistent wording for the version compat check 2025-05-20 14:03:21 +02:00
bdc0fc89c3 docs(security): init (#1612)
Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 14:03:20 +02:00
aeefe644c2 refactor: fix terminology and wording related to patches (#1623) 2025-05-20 14:03:17 +02:00
48604804f9 feat: Scrollbars (#1479) 2025-05-20 14:03:14 +02:00
03ccea46e2 fix: progress bar not updating 2025-05-20 14:03:13 +02:00
b4bc14e4ed feat: improve patcher UI (#1494) 2025-05-20 14:03:09 +02:00
6dcbe271a7 feat: updater UI and code improvements (#1597) 2025-05-20 14:03:07 +02:00
3317fd5649 feat: Select bundle type before adding bundle (#1490) 2025-05-20 14:03:05 +02:00
c9eb3ffa14 feat: Purple default theme (#1601) 2025-05-20 14:03:02 +02:00
fe1e65ce9c chore: upgrade AGP to 8.2.0 + migrate deprecated functions (#1574) 2025-05-20 14:03:00 +02:00
f7426309b4 chore(deps): update jetpack compose 2025-05-20 14:02:58 +02:00
7f67a86413 feat(app-selector): show patchable installed apps first (#1496) 2025-05-20 14:02:56 +02:00
a22ef4d9b8 docs: update revanced url 2025-05-20 14:02:54 +02:00
ada99e80f9 build: bump Gradle to v8.5
build: update Gradle wrapper
2025-05-20 14:02:51 +02:00
111d8b6543 refactor: slight formatting of build.gradle.kts 2025-05-20 14:02:50 +02:00
15599dbb21 chore(template): update label name for feature 2025-05-20 14:02:49 +02:00
24cd2dca75 ci: caching with gradle-build-action
Allow for automatic capture of buildscan in job summary, and smarter
caching than the one provided by `setup-java`.
2025-05-20 14:02:46 +02:00
c48f5b2488 chore(deps): bump revanced patcher and library 2025-05-20 14:02:44 +02:00
06d4485032 fix: specify multithreadingDexFileWriter in PatcherOptions (#1402)
Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 14:02:43 +02:00
73fdf92780 fix: load patch bundles earlier 2025-05-20 14:02:42 +02:00
0fda344952 feat(Update Screen): changelogs & handle states (#1464)
Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 14:02:38 +02:00
9c0665acb2 feat(Contributors Screen): implement design from Figma (#1465)
Co-authored-by: Robert <72943079+CnC-Robert@users.noreply.github.com>
Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 14:02:36 +02:00
6bafa23bb4 fix: parcel error for nullable types 2025-05-20 14:02:34 +02:00
8387ada245 feat: Use correct casing in module description 2025-05-20 14:02:32 +02:00
048ba12703 chore: bump patcher 2025-05-20 14:02:31 +02:00
1b6a77a463 feat: check for updates on startup (#1462) 2025-05-20 14:02:29 +02:00
ff9d021a2b feat(Changelogs): overall improvement (#1429) 2025-05-20 14:02:26 +02:00
6ac4819478 feat(Installer): use BottomAppBar (#1428) 2025-05-20 14:02:25 +02:00
4b5e2e97f7 fix: option state crash (#1456)
Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 14:02:21 +02:00
7a4b0bd7c8 refactor(ui-components): deduplicate colors and move to settings folder 2025-05-20 14:02:18 +02:00
205650865a feat(NotificationCard): rewrite & consistent usage (#1426) 2025-05-20 14:02:17 +02:00
39ff42db01 feat(Settings): use SettingsListItem consistently and overall improvements (#1427) 2025-05-20 14:02:13 +02:00
62f5acee1a feat: remember patch options (#1449) 2025-05-20 14:02:11 +02:00
67ecc13a28 chore: add issue template (#1432) 2025-05-20 14:02:09 +02:00
ad10a19acd feat(installer): sign apk in patcher worker 2025-05-20 14:02:07 +02:00
a35c62a99d fix: use correct checksum 2025-05-20 14:02:05 +02:00
8450243ddc chore: upgrade dependencies (#1401) 2025-05-20 14:02:03 +02:00
d239efcf14 fix: perform selected app operations in the correct order 2025-05-20 14:02:01 +02:00
691b615b02 feat(bundles tab): add BackHandler 2025-05-20 14:01:59 +02:00
3f34407741 docs: clarify license 2025-05-20 14:01:57 +02:00
da4153039c feat: show toast when no patches are selected 2025-05-20 14:01:54 +02:00
1de59f420b feat: add checkboxes to the downloaded apps page 2025-05-20 14:01:51 +02:00
464aa753f4 fix: more android 34 fixes 2025-05-20 14:01:48 +02:00
0cf49998e0 fix: handle exceptions when checking for bundle updates 2025-05-20 14:01:47 +02:00
991a8cb5d1 feat(patch-selector): remove TODO about an unplanned feature 2025-05-20 14:01:45 +02:00
ac75d1da27 fix: bundles not loading on Android 14 2025-05-20 14:01:42 +02:00
5907659cc8 fix: jvm signature clash error 2025-05-20 14:01:40 +02:00
d8d2478d0f fix: use upsert when modifying installed apps 2025-05-20 14:01:38 +02:00
4ad3c3fb72 feat: selected app info page (#1395) 2025-05-20 14:01:35 +02:00
0e00b9f526 refactor: move mount code to when block 2025-05-20 14:01:32 +02:00
88f3701a6c fix: hide patch button (#1284) 2025-05-20 14:01:31 +02:00
a15924617e feat: add user agent (#1382) 2025-05-20 14:01:30 +02:00
db04672d72 chore: bump patcher 2025-05-20 14:01:27 +02:00
977345e5aa chore: bump compose 2025-05-20 14:01:25 +02:00
76e5731eb8 fix: broken logo in about page on release builds 2025-05-20 14:01:23 +02:00
99bfd84e03 feat: hide unfinished pages in release mode 2025-05-20 14:01:20 +02:00
edb387e1a8 feat: armv7 warning 2025-05-20 14:01:18 +02:00
80ff6711f4 refactor(downloaders): improve file system code (#1379) 2025-05-20 14:01:16 +02:00
cadbb3f46d feat: settings migration (compose) (#1309) 2025-05-20 14:01:15 +02:00
e1742fd4c0 feat: add patches selector bottom sheet (#1360) 2025-05-20 14:01:14 +02:00
c2c4895a29 feat: use revanced api for changelogs 2025-05-20 14:01:11 +02:00
ffe5c058e0 fix: delete temporary files (#1341) 2025-05-20 14:01:08 +02:00
59ddd9f393 fix: use correct classes to determine option type
I can't believe this happened
2025-05-20 14:01:06 +02:00
57ba3ad374 feat(settings): move experimental patches option to advanced 2025-05-20 14:01:05 +02:00
6fed17705b feat(installer): adjust arrow icon size 2025-05-20 14:01:03 +02:00
f915b544c4 feat(installer): adjust step icon size and alignment 2025-05-20 14:01:02 +02:00
11a383a13a chore: switch to revanced library and bump patcher (#1314) 2025-05-20 14:01:01 +02:00
4b178d947c feat(patch-selector): default patches selection (#1272) 2025-05-20 14:00:58 +02:00
f2e7661b5c feat: remove dead help icons
These never did anything and were removed from the figma a while ago.
2025-05-20 14:00:57 +02:00
e33862f436 chore: fully remove idea project files 2025-05-20 14:00:55 +02:00
51dc429330 fix: remove misc.xml and kotlinc.xml 2025-05-20 14:00:53 +02:00
5a41cc1162 docs: init (#1224) 2025-05-20 14:00:32 +02:00
28ab79d962 ci: Add release workflow (#1235) 2025-05-20 14:00:30 +02:00
8f2c18585f fix: Updates popup shows incorrect names (#1283) 2025-05-20 14:00:29 +02:00
2f533d12b9 fix: use ReVanced ring logo in about section (#1302) 2025-05-20 14:00:27 +02:00
44cec48a7f feat: implement Submit Issue button (#1276) 2025-05-20 14:00:25 +02:00
395da595a2 refactor: update progress onBackClick function (#1277) 2025-05-20 14:00:23 +02:00
18ea6adb20 fix: disable WebView history (#1278) 2025-05-20 14:00:21 +02:00
daeb534692 fix(ui): make entire patches view button selectable (#1271) 2025-05-20 14:00:19 +02:00
0b2ddbe0bf feat: change appID and name of debug builds 2025-05-20 14:00:17 +02:00
3c3ff64b18 ci: build pull requests (#1228) 2025-05-20 14:00:15 +02:00
43befa8713 fix: typo in string name import_keystore_description (#1273) 2025-05-20 14:00:13 +02:00
3c820405a8 fix: contributors screen fix (#1256) 2025-05-20 14:00:10 +02:00
d65e830467 chore: update dependencies (#1247) 2025-05-20 14:00:08 +02:00
154b23202c feat: root installation (#1243) 2025-05-20 14:00:05 +02:00
91e0d48721 fix: minify crash on building release (#1245) 2025-05-20 14:00:02 +02:00
ae5eef0f2c fix: providers.gradleProperty (#1223) 2025-05-20 14:00:01 +02:00
382c068a03 feat: make bundles selectable (#1237) 2025-05-20 13:59:58 +02:00
cfaf874326 ci(config): appreciation for first-time contributors
Show appreciation message for new contributors
2025-05-20 13:59:55 +02:00
97d25b5602 docs: update readme badges (#1227) 2025-05-20 13:59:54 +02:00
cde470f867 ci(release): don't build when not necessary
Add paths-ignore to all markdown files, and .idea folder
2025-05-20 13:59:52 +02:00
1ad3e3423c docs: update badge's repository
The repository was moved from `revanced-manager-compose` to the main one, which is `revanced-manager`.

The organisation's name has also switched to `ReVanced` (used to be `revanced`).
2025-05-20 13:59:50 +02:00
d62f0a96fb chore: bump kotlinx.serialization plugin and patcher 2025-05-20 13:59:47 +02:00
d4ee3334e0 build: updates (#85) 2025-05-20 13:59:44 +02:00
384fb19ddf fix(deps): use correct work-runtime version string 2025-05-20 13:59:42 +02:00
ab04ef99c3 feat: more info for the select from application screen (#81) 2025-05-20 13:59:41 +02:00
c812ce2011 ci(release): migrate from node12 to node16
This bump `actions/upload-artifact`@v2 to `actions/upload-artifact`@v3
2025-05-20 13:59:39 +02:00
fa8f154d65 feat: store patched apps (#79)
* feat: store patched apps

* fix: missing string

* feat: save patch selection

* feat: things

* fix: fix broken query

* fix: remove redundant `withContext`

* fix: fix
2025-05-20 13:59:36 +02:00
af03eec4b5 ci(release): use correct vars context object
why am i so stupid
2025-05-20 13:59:33 +02:00
da66b43497 ci(release): no longer store keystore alias in secrets
fixes an issue where GitHub Actions logs would be censored
2025-05-20 13:59:32 +02:00
e302ea9f9e fix: patches not being reloaded 2025-05-20 13:59:30 +02:00
6aa3b6c4b0 fix: permission error when using installed app 2025-05-20 13:59:27 +02:00
5cb887ebe6 feat: patch options UI (#80) 2025-05-20 13:59:25 +02:00
4cd00c122d feat: switch to the new api (#75) 2025-05-20 13:59:22 +02:00
5744bdda80 chore: bump patcher 2025-05-20 13:59:20 +02:00
89e373f98c feat: improve bundle dialog UI 2025-05-20 13:59:19 +02:00
ecd4b01108 feat: finish implementing the sources system (#70) 2025-05-20 13:59:15 +02:00
08686252bb fix: library info not being embedded 2025-05-20 13:59:13 +02:00
ab1dd8862d ci(release): task naming consistency 2025-05-20 13:59:11 +02:00
c4abf8a324 fix: don't store app list in parcel 2025-05-20 13:59:09 +02:00
05adb78932 fix(installer): progress tracking 2025-05-20 13:59:07 +02:00
3ae1d3374a ci: init 2025-05-20 13:59:06 +02:00
067f8adf4b feat: show installed app in version selector 2025-05-20 13:59:05 +02:00
83f6d287b3 feat: download apps in patcher screen (#73) 2025-05-20 13:59:01 +02:00
Pun
3dde82fc18 docs(readme): minor fix to displaying url
When you hover on Commit & Activity badges, `revanced` will appear in url display, but on License badge, `ReVanced` will display

This commit fix that by changing the organisation to what we're supposed to be using which is {org_name}/{repo_name} (ReVanced/...)
2025-05-20 13:58:59 +02:00
de0af4c489 feat: add patch bundle info screen (#55) 2025-05-20 13:58:56 +02:00
f98386dcc8 fix: serialization not working 2025-05-20 13:58:54 +02:00
49209ca562 fix: buildfile syntax (#66)
Signed-off-by: Patryk Miś <foss@patrykmis.com>
2025-05-20 13:58:53 +02:00
d68e7f71e9 build: updates (#63)
* Update Java base to 17
* update Kotlin to 1.8.22
* update Bouncycastle
* update all dependencies
* follow the manifest on jni libs packaging
* enhance app optimization by specifying resource configurations, excluding dependencies info and unnessesary files
* Remove obsolete SDK check as we are already using minSdk 26

Signed-off-by: Patryk Miś <foss@patrykmis.com>
2025-05-20 13:58:49 +02:00
fffdb314a1 feat: improve accessibility (#64)
* Label Back button
* Mark group section headings as headings

Signed-off-by: Patryk Miś <foss@patrykmis.com>
2025-05-20 13:58:47 +02:00
ee41e315fb feat: switch to Preferences DataStore (#60) 2025-05-20 13:58:45 +02:00
cd3d654318 feat: disable filter chips when there are no patches 2025-05-20 13:58:43 +02:00
3bd1ef3de7 feat: ReVanced theme colors 2025-05-20 13:58:41 +02:00
ba1a152231 fix: release builds not working properly 2025-05-20 13:58:40 +02:00
55573eb94f chore: migrate dependencies to version catalogs (#58) 2025-05-20 13:58:38 +02:00
80e78f544b feat: app downloader (#43) 2025-05-20 13:58:35 +02:00
7572944c9e build: update gradle to v8.2.1 2025-05-20 13:58:34 +02:00
Pun
f5e9826dfb docs(readme): minor changes to how badges works
* Better description for the repository license badge

* Clicking on badges open you the relevant url
2025-05-20 13:58:32 +02:00
c8ac94d82d feat: improve keystore UI and UX (#52) 2025-05-20 13:58:29 +02:00
d9ff833100 revert: downgrade Kotlin to 1.8.21
"A what? 1.8.22 isn't compatible, but the version bump indicate that it's supposed to be bug fixes????"
2025-05-20 13:58:27 +02:00
7150fb4435 feat: advanced settings page with device info (#51) 2025-05-20 13:58:25 +02:00
34c331f39b build: update dependencies
There are 9 dependencies update, changelog of this commit are available
below here.

Android Gradle Plugin: 8.0.1 -> 8.0.2
Kotlin: 1.8.21 -> 1.8.22
Android Compose BOM: 2023.05.01 -> 2023.06.01
Room: 2.5.1 -> 2.5.2
ReVanced Patcher: 11.0.1 -> 11.0.4
APKsig: 8.2.0-alpha05 -> 8.2.0-alpha10
Koin (Android, workmanager): 3.4.0 -> 3.4.2
Koin (Androidx Compose): 3.4.4 -> 3.4.5
Ktor: 2.3.0 -> 2.3.1
2025-05-20 13:58:24 +02:00
1ff76cf584 fix(installer): sign and install on threads
This is needed to avoid ANRs because it takes a while if the Apk is 100+
MB.
2025-05-20 13:58:23 +02:00
1de0e87983 feat: updater changelogs (#48)
---------

Co-authored-by: Aunali321 <aunvakil.aa@gmail.com>
2025-05-20 13:58:20 +02:00
93b2dd6176 feat: allow user to save logs 2025-05-20 13:58:18 +02:00
f3e2435fef feat: save patch options and selected patches in bundle (#50) 2025-05-20 13:58:17 +02:00
b42d8842d5 feat: patch options (#45) 2025-05-20 13:58:15 +02:00
c052a0c0f5 refactor: use getDir instead of filesDir directly 2025-05-20 13:58:13 +02:00
34cf91d4b6 fix: use correct directory 2025-05-20 13:58:10 +02:00
f99504d3e4 build: bump patcher 2025-05-20 13:58:08 +02:00
3ec1df9650 build: update gradle to v8.2 2025-05-20 13:58:05 +02:00
871a34df23 feat: licenses screen (#47) 2025-05-20 13:58:03 +02:00
b65ec4560f chore: update links in about page 2025-05-20 13:58:01 +02:00
0eaeb5d5ea feat: animate the arrow button 2025-05-20 13:57:59 +02:00
060f39fb9b refactor: use correct coroutine scopes 2025-05-20 13:57:57 +02:00
722dfadb3c fix(installer): save step incorrectly being marked as completed 2025-05-20 13:57:56 +02:00
6567be40cb fix: sources screen being misaligned during transitions 2025-05-20 13:57:54 +02:00
9539d23c12 feat: contributors screen (#42)
* Contributors page
- https://github.com/revanced/revanced-manager-compose/issues/34

* feat: adding ContributorScreen as clickable icons like the website

* feat: adding ContributorScreen
- Made changes that were asked for in prev PR
- Currently just waiting on a git merge to get ArrowButton in

* feat: adding ContributorScreen
- Made changes that were asked for in prev PR
- ArrowButton is also in use

* feat: adding ContributorScreen
- Made changes that were asked for in prev PR
- ArrowButton is also in use
- Fixed other PR comment changes

* Apply suggestions from code review

* Remove unused string resources

---------

Co-authored-by: Ax333l <main@axelen.xyz>
2025-05-20 13:57:51 +02:00
d0d0a17a55 fix: pass worker inputs without serialization (#44)
Because androidx.work.Data sucks and causes our app to crash.
2025-05-20 13:57:50 +02:00
d2e965f056 fix(installer): make the correct column scrollable 2025-05-20 13:57:49 +02:00
cda0e127d9 feat: experimental patches setting 2025-05-20 13:57:45 +02:00
fea11dfef6 feat: save patch selection using room db (#38) 2025-05-20 13:57:43 +02:00
dcc4477e3e refactor: better PatchBundle docs and naming 2025-05-20 13:57:40 +02:00
6eb21e1fab build: bump patcher 2025-05-20 13:57:38 +02:00
b8902d04d7 feat: show stacktrace in installer ui (#36) 2025-05-20 13:57:36 +02:00
99efdb130f feat: filter options for patches 2025-05-20 13:57:34 +02:00
5177cd3083 fix: run blocking IO operations in the correct context 2025-05-20 13:57:32 +02:00
ff4b9ab960 fix(patcher): add notification and wakelock to worker; chore: add app icon 2025-05-20 13:57:30 +02:00
ad998ac22d feat: keystore import/export (#30) 2025-05-20 13:57:27 +02:00
881d2430c3 fix(installer): properly track worker state (#32) 2025-05-20 13:57:25 +02:00
b07ae90c86 feat(koin): use the android logger 2025-05-20 13:57:23 +02:00
8e6519cfb0 feat: ProGuard 2025-05-20 13:57:22 +02:00
bb90cc6e81 feat: rename package to app.revanced.manager 2025-05-20 13:57:18 +02:00
fd02e0799c feat: improved compose stability 2025-05-20 13:57:17 +02:00
f07204460c fix: use correct getViewModel 2025-05-20 13:57:15 +02:00
66be0f96e0 feat: rename ViewModels for consistency 2025-05-20 13:57:13 +02:00
a1ca19b289 feat: hide tabs when 1 bundle is used 2025-05-20 13:57:09 +02:00
af779153d5 refactor: PackageManager (#31)
* refactor: refactor `PM`

* feat: use plurals for patch count

* fix: support apk's from storage

* feat: use ViewModel for loading apps and bundles

* fix: fix file selector that has no reason to be broken

* refactor: rename parameter

* refactor: `MainViewModel`

* feat: make all apps use `path`

* build: target java 11
2025-05-20 13:57:05 +02:00
78966e13c4 refactor(logs): use consistent tag 2025-05-20 13:57:03 +02:00
8bdcf76832 refactor(di): use constructor DSL for VMs
Instead of doing it manually with viewModel { }
2025-05-20 13:57:00 +02:00
05ecbde6c2 chore(deps): bump revanced-patcher to 9.0.0 2025-05-20 13:56:57 +02:00
e558a47204 feat: better installer ui (#29)
based cossale

Co-authored-by: Aunali321 <aunvakil.aa@gmail.com>
2025-05-20 13:56:56 +02:00
61de7568cb feat: patch bundle sources system (#24) 2025-05-20 13:56:51 +02:00
2e7f8457d3 feat: in-app updater (#25) 2025-05-20 13:56:47 +02:00
332bad699d feat(settings screen): add battery optimization notification 2025-05-20 13:56:43 +02:00
0b5ab33b3e feat(update screen): complete main update screen 2025-05-20 13:56:40 +02:00
5b4242d28b feat(about screen): complete about screen 2025-05-20 13:56:38 +02:00
0c76ed3af0 feat(settings screen): match typography from figma 2025-05-20 13:56:36 +02:00
39d698e545 refactor(settings screen): clean code up a bit 2025-05-20 13:56:34 +02:00
18e91e7cbc fix: dont crash when the bundle cannot be downloaded 2025-05-20 13:56:32 +02:00
14dfe07795 feat(installer): apk signing and installation 2025-05-20 13:56:30 +02:00
8e011a5d6b fix(patches selector): copy the selected patches list 2025-05-20 13:56:28 +02:00
fc5f97e54b refactor(ui): move PatchItem to the only file where it is used 2025-05-20 13:56:27 +02:00
78728c1f2a refactor(net apis): remove unnecessary interfaces
Having interfaces like that is only really useful if you have unit
tests, which we don't.

Other similar compose projects don't make interfaces either.
Not having them is more readable.
2025-05-20 13:56:25 +02:00
90c95c0669 style: run formatter 2025-05-20 13:56:23 +02:00
fbd1e221da build: updates (#23) 2025-05-20 13:56:21 +02:00
c35c776ce2 feat: integrate revanced patcher (#22) 2025-05-20 13:56:18 +02:00
f275f57c11 feat: improved dashboard screen 2025-05-20 13:56:15 +02:00
520b86df0a feat: patches selector screen 2025-05-20 13:56:13 +02:00
8991827ac7 feat: settings screen 2025-05-20 13:56:11 +02:00
0871180dcc build: updates (#21)
* perf: obsolete sdk check

Signed-off-by: Patryk Mis <foss@patrykmis.com>

* chore: bump dependencies

Signed-off-by: Patryk Mis <foss@patrykmis.com>

---------

Signed-off-by: Patryk Mis <foss@patrykmis.com>
2025-05-20 13:56:08 +02:00
7103bd2ec1 feat: app selector screen 2025-05-20 13:56:06 +02:00
e5029c7d2c feat: Dashboard Screen (#18)
* feat: add Dashboard Screen and Sources Screen

* fix: fix tab onClick not working

* refactor: remove AppBar

---------

Co-authored-by: CnC-Robert <CnC.Rob3rt@gmail.com>
2025-05-20 13:56:05 +02:00
a512af50b5 fix: gradlew permissions on unix 2025-05-20 13:54:32 +02:00
cc59d60dfd build: dependency and syntax updates (#17)
* build: Update Gradle to v8.1.1

* build: Bump dependencies

* build: move repo configurations to settings

---------

Co-authored-by: Patryk Mis <24607131+PatrickMis@users.noreply.github.com>
2025-05-20 13:54:31 +02:00
4d894e908e feat: backend 2025-05-20 13:54:29 +02:00
77b499ef29 Create README.md 2025-05-20 13:54:27 +02:00
0142b85ede feat: splash screen 2025-05-20 13:54:25 +02:00
d9633906f5 feat: implement navigation 2025-05-20 13:54:22 +02:00
3dd14fd34b feat: implement DI 2025-05-20 13:54:21 +02:00
0b19a9865d chore: Migrate to compose-dev branch 2025-05-20 13:49:36 +02:00
b0464408f1 ci: Run Crowdin Cron task on dev branch (#2543) 2025-05-12 14:51:42 +02:00
767fa77436 chore(release): 1.25.0-dev.1 [skip ci]
# [1.25.0-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.24.1-dev.5...v1.25.0-dev.1) (2025-05-05)

### Bug Fixes

* Fix installation being cancelled at installation by not prematurely deleting patched APK  ([#2490](https://github.com/ReVanced/revanced-manager/issues/2490)) ([dedcb3c](dedcb3c51a))
* Use device locale for app language (Default to English) ([#2488](https://github.com/ReVanced/revanced-manager/issues/2488)) ([3074766](3074766ff2))

### Features

* Add toggle to use pre-releases ([#2485](https://github.com/ReVanced/revanced-manager/issues/2485)) ([89b48ce](89b48cebcf))
2025-05-05 14:15:17 +00:00
89b48cebcf feat: Add toggle to use pre-releases (#2485)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2025-05-05 16:00:41 +02:00
dedcb3c51a fix: Fix installation being cancelled at installation by not prematurely deleting patched APK (#2490) 2025-05-05 15:56:28 +02:00
3074766ff2 fix: Use device locale for app language (Default to English) (#2488) 2025-05-05 15:54:42 +02:00
722f2b645f chore(release): 1.24.1-dev.5 [skip ci]
## [1.24.1-dev.5](https://github.com/ReVanced/revanced-manager/compare/v1.24.1-dev.4...v1.24.1-dev.5) (2025-04-17)

### Bug Fixes

* Use device locale when no preference is set ([#2483](https://github.com/ReVanced/revanced-manager/issues/2483)) ([f79aa9e](f79aa9edd7))
2025-04-17 13:17:52 +00:00
f79aa9edd7 fix: Use device locale when no preference is set (#2483) 2025-04-17 20:06:57 +07:00
5127c7f599 ci: Cache Gradle on PR build 2025-04-16 02:12:11 +07:00
23dcbbecb2 ci: Avoid repository push access token 2025-04-14 19:08:01 +07:00
1c84265dc4 chore: Sync translations (#2384)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2025-04-14 18:53:36 +07:00
7ccc689bd3 chore: Modify language assets to match Nuke 2025-04-14 17:50:42 +07:00
007dce800e build: Nuke script now able to remove empty JSON/File 2025-04-14 17:50:15 +07:00
ba758f3d8b ci: Flutter caching for build PR 2025-04-14 17:20:20 +07:00
a1f9a2786f chore: Miscellaneous code clean-up 2025-04-14 17:17:51 +07:00
b11a720621 chore: Remove x86 libaapt2.so binary (#2480) 2025-04-14 17:16:22 +07:00
aedf475310 ci: Use correct directory for Gradle cache 2025-04-14 15:51:28 +07:00
10f35eb727 chore(release): 1.24.1-dev.4 [skip ci]
## [1.24.1-dev.4](https://github.com/ReVanced/revanced-manager/compare/v1.24.1-dev.3...v1.24.1-dev.4) (2025-04-13)

### Bug Fixes

* Log errors and warnings when compiling resources ([5c7d52c](5c7d52c8e9))
2025-04-13 15:48:47 +00:00
5c7d52c8e9 fix: Log errors and warnings when compiling resources 2025-04-13 17:38:20 +02:00
841d61278b chore: Ignore Dart analysis on generated slang file 2025-04-12 01:27:28 +07:00
534e4c2453 ci: Point to Android directory 2025-04-10 23:59:39 +07:00
062f28387f ci: Modernize workflows (#2473)
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2025-04-10 23:47:26 +07:00
a8a4ffabed chore(release): 1.24.1-dev.3 [skip ci]
## [1.24.1-dev.3](https://github.com/ReVanced/revanced-manager/compare/v1.24.1-dev.2...v1.24.1-dev.3) (2025-04-10)

### Bug Fixes

* Correct supported required patch option types  ([#2475](https://github.com/ReVanced/revanced-manager/issues/2475)) ([cde3f8d](cde3f8d62c))
2025-04-10 15:26:56 +00:00
cde3f8d62c fix: Correct supported required patch option types (#2475)
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2025-04-10 22:15:29 +07:00
8182228a46 chore: Default project Flutter devtools options configuration for debugging 2025-04-10 22:08:04 +07:00
7fa5daf623 chore: Remove Android cxx generated file
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2025-04-10 22:05:38 +07:00
221e663e47 chore(release): 1.24.1-dev.2 [skip ci]
## [1.24.1-dev.2](https://github.com/ReVanced/revanced-manager/compare/v1.24.1-dev.1...v1.24.1-dev.2) (2025-04-09)

### Bug Fixes

* Unable to Share Logs due to missing ProGuard rules ([#2474](https://github.com/ReVanced/revanced-manager/issues/2474)) ([915ec0e](915ec0e260))
2025-04-09 20:20:00 +00:00
915ec0e260 fix: Unable to Share Logs due to missing ProGuard rules (#2474)
Technical commit message: fix: Unable to Share Logs due to CCE in FileProvider

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2025-04-10 03:09:15 +07:00
783f313ed8 chore(release): 1.24.1-dev.1 [skip ci]
## [1.24.1-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.24.0...v1.24.1-dev.1) (2025-04-04)

### Bug Fixes

* Crash using when Integer type in Patch Options ([#2453](https://github.com/ReVanced/revanced-manager/issues/2453)) ([05575cc](05575cccfb))
2025-04-04 16:11:35 +00:00
05575cccfb fix: Crash using when Integer type in Patch Options (#2453) 2025-04-04 22:59:06 +07:00
a8e192b85f chore(release): 1.24.0 [skip ci]
# [1.24.0](https://github.com/ReVanced/revanced-manager/compare/v1.23.3...v1.24.0) (2025-03-07)

### Bug Fixes

* Build failure caused by Internal R8 NPE on field "b" ([08a9d2a](08a9d2a64f))
* Change duplicated app suffix and allow profile variant compilation ([5b6426c](5b6426c453))
* Flutter Impeller renderer causing artifacts on rare occasions ([7462291](746229120c))
* Slight tweak and use Flutter suggested config ([4b7b05a](4b7b05ac0f))

### Features

* Distinguish between release, debug, and profile variants ([64cbb68](64cbb68344))
2025-03-07 17:53:22 +00:00
4b591effed chore: Merge branch dev to main (#2406) 2025-03-08 00:42:05 +07:00
123c51794b chore(release): 1.24.0-dev.1 [skip ci]
# [1.24.0-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.23.4-dev.1...v1.24.0-dev.1) (2025-03-06)

### Bug Fixes

* Flutter Impeller renderer causing artifacts on rare occasions ([7462291](746229120c))

### Features

* Distinguish between release, debug, and profile variants ([64cbb68](64cbb68344))
2025-03-06 16:56:44 +00:00
53d64a0636 build: Use dependency meant for Stable branch of Flutter
Signed-off-by: validcube <pun.butrach@gmail.com>
2025-03-06 23:44:47 +07:00
64cbb68344 feat: Distinguish between release, debug, and profile variants
Signed-off-by: validcube <pun.butrach@gmail.com>
2025-03-06 23:12:35 +07:00
00950c79f0 build: Bump pubspec dependencies
Signed-off-by: validcube <pun.butrach@gmail.com>
2025-03-06 23:06:09 +07:00
746229120c fix: Flutter Impeller renderer causing artifacts on rare occasions
This sets minimum flutter version to 3.29.0 so that it will discourage any version lower than that.

Signed-off-by: validcube <pun.butrach@gmail.com>
2025-03-06 22:36:06 +07:00
133f6ee28f chore(release): 1.23.4-dev.1 [skip ci]
## [1.23.4-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.23.3...v1.23.4-dev.1) (2025-03-06)

### Bug Fixes

* Build failure caused by Internal R8 NPE on field "b" ([08a9d2a](08a9d2a64f))
* Change duplicated app suffix and allow profile variant compilation ([5b6426c](5b6426c453))
* Slight tweak and use Flutter suggested config ([4b7b05a](4b7b05ac0f))
2025-03-06 14:56:29 +00:00
08a9d2a64f fix: Build failure caused by Internal R8 NPE on field "b"
See: https://issuetracker.google.com/issues/389508413
2025-03-06 21:45:11 +07:00
4b7b05ac0f fix: Slight tweak and use Flutter suggested config
Signed-off-by: validcube <pun.butrach@gmail.com>
2025-02-15 17:25:29 +07:00
5b6426c453 fix: Change duplicated app suffix and allow profile variant compilation 2025-02-15 13:54:57 +07:00
235489dcdf ci: Use american spelling
ReVanced uses US EN spelling.
2025-02-14 21:35:19 +07:00
b4e5c66f9c ci: Fix commit hash related issues 2025-02-14 21:22:42 +07:00
5c58f624de ci: Cover before build failure and registry authentication 2025-02-14 21:20:47 +07:00
89ad88c0ef ci: Improve build pull request v3 2025-02-14 21:06:18 +07:00
d3036105bb ci: Make attestation runs on every release (stable)
Sometimes build will not be made due to CI Configuration
2025-02-11 19:54:39 +07:00
3e8862ea5a ci: Generate release artifact provenance (#2315) 2025-02-10 19:34:12 +07:00
0c59bbb7be build(deps-dev): bump the npm group with 2 updates (#2404) 2025-02-01 10:23:30 +07:00
f4b279d1fd chore(release): 1.23.3 [skip ci]
## [1.23.3](https://github.com/ReVanced/revanced-manager/compare/v1.23.2...v1.23.3) (2025-01-15)

### Bug Fixes

* Delete cached APK only after successful patch ([#2331](https://github.com/ReVanced/revanced-manager/issues/2331)) ([4ba7ec1](4ba7ec1854))
2025-01-15 15:21:07 +00:00
c652d196fc ci: Move Nuke script to after normalisation 2025-01-15 21:39:44 +07:00
632b9502b2 chore: Sync translations (#2316)
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2025-01-15 21:32:42 +07:00
dfb3fe3749 build(deps): bump slang_flutter and slang (#2374)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2025-01-15 21:15:30 +07:00
b3ba0fcd6a chore: Remove deprecated linter rules 2025-01-03 23:39:32 +07:00
8a98b8448b build(deps-dev): bump semantic-release-pub from 0.9.1 to 0.9.3 in the npm group (#2372)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 11:21:20 +07:00
da604e89ac build(deps): bump the pubspec group with 2 updates (#2373)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-01 11:18:54 +07:00
624b43733e chore(release): 1.23.3-dev.1 [skip ci]
## [1.23.3-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.23.2...v1.23.3-dev.1) (2024-12-24)

### Bug Fixes

* Delete cached APK only after successful patch ([#2331](https://github.com/ReVanced/revanced-manager/issues/2331)) ([4ba7ec1](4ba7ec1854))
2024-12-24 00:59:50 +00:00
4ba7ec1854 fix: Delete cached APK only after successful patch (#2331) 2024-12-24 01:48:57 +01:00
1d6b074856 build(deps): bump the pubspec group with 13 updates (#2338)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2024-12-19 19:35:55 +07:00
695329088b docs: Navigate to next sub-page and explain mounting [skip ci] 2024-12-18 04:18:23 +01:00
f2b20e6e7f build(deps-dev): bump the npm group with 2 updates (#2334)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-01 11:03:14 +07:00
a5c3aa3744 chore: Sync translations (#2314) 2024-11-13 22:56:59 +07:00
900058a6e5 chore: Sync translations (#2296) 2024-11-13 22:50:41 +07:00
4c51ad3650 chore(release): 1.23.2 [skip ci]
## [1.23.2](https://github.com/ReVanced/revanced-manager/compare/v1.23.1...v1.23.2) (2024-11-12)

### Bug Fixes

* Handle migration of default URL used in v1.22 as well ([851b06b](851b06b0d2))
2024-11-12 23:45:30 +00:00
a0c2a17bab chore: Merge branch dev to main (#2311) 2024-11-13 00:34:25 +01:00
851b06b0d2 fix: Handle migration of default URL used in v1.22 as well 2024-11-13 00:33:58 +01:00
57018a65df chore(release): 1.23.1 [skip ci]
## [1.23.1](https://github.com/ReVanced/revanced-manager/compare/v1.23.0...v1.23.1) (2024-11-10)
2024-11-10 16:24:53 +00:00
b44419133a build(Needs bump): Put keystore to correct file path 2024-11-10 17:14:10 +01:00
8961cf9044 chore(release): 1.23.0 [skip ci]
# [1.23.0](https://github.com/ReVanced/revanced-manager/compare/v1.22.0...v1.23.0) (2024-11-10)

### Bug Fixes

* Don't show toasts when export cancelled ([#2230](https://github.com/ReVanced/revanced-manager/issues/2230)) ([bd79496](bd79496433))
* Fix the connectivity check toast again ([#2216](https://github.com/ReVanced/revanced-manager/issues/2216)) ([a7e2281](a7e2281805))
* Get changelogs for alternative sources ([#1766](https://github.com/ReVanced/revanced-manager/issues/1766)) ([c729842](c7298424e5))
* missing parameter in translations ([1c6c5d5](1c6c5d53ae))
* Resolve EACCESS error in special cases ([#2135](https://github.com/ReVanced/revanced-manager/issues/2135)) ([1f95767](1f95767aeb))
* Restore apk renaming during compile ([abdd9dc](abdd9dc430))

### Features

* Also show new patches in the removed patches dialog ([#2257](https://github.com/ReVanced/revanced-manager/issues/2257)) ([8872165](8872165a99))
* Import and export manager settings ([#2268](https://github.com/ReVanced/revanced-manager/issues/2268)) ([a45d959](a45d9598cc))
* Show changelogs from the latest to the last used patches version ([#2219](https://github.com/ReVanced/revanced-manager/issues/2219)) ([daba737](daba737ecb))
* Use ReVanced API v4 ([7b7d91d](7b7d91d661))

### Performance Improvements

* Don't recalculate universal patches or compatible packages if not necessary ([7e3afe0](7e3afe0cb2))
2024-11-10 15:04:46 +00:00
5139873f79 chore: Merge branch dev to main (#2217) 2024-11-10 15:56:03 +01:00
5caa79eb0d chore: Sync translations (#2267) 2024-11-10 05:57:57 +01:00
9552b2ebc5 chore(release): 1.23.0-dev.7 [skip ci]
# [1.23.0-dev.7](https://github.com/ReVanced/revanced-manager/compare/v1.23.0-dev.6...v1.23.0-dev.7) (2024-11-10)

### Features

* Use ReVanced API v4 ([7b7d91d](7b7d91d661))

### Performance Improvements

* Don't recalculate universal patches or compatible packages if not necessary ([7e3afe0](7e3afe0cb2))
2024-11-10 04:04:12 +00:00
7e3afe0cb2 perf: Don't recalculate universal patches or compatible packages if not necessary 2024-11-10 04:53:59 +01:00
7b7d91d661 feat: Use ReVanced API v4 2024-11-10 04:53:59 +01:00
44b8d4ceee build: Configure output file name 2024-11-08 19:43:45 +01:00
aaa97ebb71 chore(release): 1.23.0-dev.6 [skip ci]
# [1.23.0-dev.6](https://github.com/ReVanced/revanced-manager/compare/v1.23.0-dev.5...v1.23.0-dev.6) (2024-11-08)
2024-11-08 17:49:03 +00:00
d99e5af384 build: Fix build 2024-11-08 18:39:02 +01:00
c47c7c0a88 build(Needs bump): Bump dependencies 2024-11-05 20:13:08 +01:00
3e32c0fd90 chore(release): 1.23.0-dev.5 [skip ci]
# [1.23.0-dev.5](https://github.com/ReVanced/revanced-manager/compare/v1.23.0-dev.4...v1.23.0-dev.5) (2024-11-05)

### Features

* Import and export manager settings ([#2268](https://github.com/ReVanced/revanced-manager/issues/2268)) ([a45d959](a45d9598cc))
2024-11-05 18:52:52 +00:00
a45d9598cc feat: Import and export manager settings (#2268) 2024-11-05 19:43:35 +01:00
8c8df698d4 chore(release): 1.23.0-dev.4 [skip ci]
# [1.23.0-dev.4](https://github.com/ReVanced/revanced-manager/compare/v1.23.0-dev.3...v1.23.0-dev.4) (2024-10-26)
2024-10-26 15:50:06 +00:00
8d0d782ab5 build(Needs bump): Bump ReVanced Patcher (#2242)
Co-authored-by: aAbed <aabedhkhan@gmail.com>
2024-10-26 17:41:49 +02:00
4db4789a06 chore(release): 1.23.0-dev.3 [skip ci]
# [1.23.0-dev.3](https://github.com/ReVanced/revanced-manager/compare/v1.23.0-dev.2...v1.23.0-dev.3) (2024-10-22)

### Bug Fixes

* Restore apk renaming during compile ([abdd9dc](abdd9dc430))
2024-10-22 16:16:20 +00:00
abdd9dc430 fix: Restore apk renaming during compile
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-10-22 23:01:51 +07:00
5193042e6b chore(release): 1.23.0-dev.2 [skip ci]
# [1.23.0-dev.2](https://github.com/ReVanced/revanced-manager/compare/v1.23.0-dev.1...v1.23.0-dev.2) (2024-10-21)

### Features

* Show changelogs from the latest to the last used patches version ([#2219](https://github.com/ReVanced/revanced-manager/issues/2219)) ([daba737](daba737ecb))
2024-10-21 10:27:00 +00:00
daba737ecb feat: Show changelogs from the latest to the last used patches version (#2219) 2024-10-21 17:17:23 +07:00
bd96701103 chore: Sync translations (#2233) 2024-10-21 17:16:15 +07:00
69c20b74cf chore: Restore format consistency 2024-10-21 04:27:53 +07:00
7297436ab4 ci: Update config 2024-10-21 03:18:21 +07:00
a329626715 build(deps-dev): bump semantic-release from 23.1.1 to 24.1.3 (#2265)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-20 03:47:39 +07:00
50a20d0535 ci: Use semantic-release-pub for updating build number (#2263) 2024-10-19 05:34:26 +02:00
c52edc99c0 chore(release): 1.23.0-dev.1 [skip ci]
# [1.23.0-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.22.1-dev.2...v1.23.0-dev.1) (2024-10-17)

### Bug Fixes

* Don't show toasts when export cancelled ([#2230](https://github.com/ReVanced/revanced-manager/issues/2230)) ([bd79496](bd79496433))
* missing parameter in translations ([1c6c5d5](1c6c5d53ae))

### Features

* Also show new patches in the removed patches dialog ([#2257](https://github.com/ReVanced/revanced-manager/issues/2257)) ([8872165](8872165a99))
2024-10-17 19:10:51 +00:00
1c6c5d53ae fix: missing parameter in translations 2024-10-18 00:02:54 +05:45
1b110e5bd5 fixup: string correction 2024-10-17 22:00:11 +05:45
8872165a99 feat: Also show new patches in the removed patches dialog (#2257)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-10-17 17:48:19 +02:00
bd79496433 fix: Don't show toasts when export cancelled (#2230) 2024-10-17 17:48:04 +02:00
820cd720b5 chore: Modernize project setup
Update dependencies, move to Gradle KTs and overall improve build and project files.
2024-10-06 03:14:12 +02:00
31ff1e0492 chore: Sync translations (#2200) 2024-10-01 00:02:20 +07:00
8b429f03c2 ci: Use the correct expression to grab translation files (#2232) 2024-09-30 23:59:43 +07:00
a68a83940d chore(release): 1.22.1-dev.2 [skip ci]
## [1.22.1-dev.2](https://github.com/ReVanced/revanced-manager/compare/v1.22.1-dev.1...v1.22.1-dev.2) (2024-09-19)

### Bug Fixes

* Get changelogs for alternative sources ([#1766](https://github.com/ReVanced/revanced-manager/issues/1766)) ([c729842](c7298424e5))
* Resolve EACCESS error in special cases ([#2135](https://github.com/ReVanced/revanced-manager/issues/2135)) ([1f95767](1f95767aeb))
2024-09-19 23:07:33 +00:00
1f95767aeb fix: Resolve EACCESS error in special cases (#2135)
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
2024-09-20 00:59:27 +02:00
c7298424e5 fix: Get changelogs for alternative sources (#1766) 2024-09-20 00:57:07 +02:00
d53f8cf130 chore(release): 1.22.1-dev.1 [skip ci]
## [1.22.1-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.22.0...v1.22.1-dev.1) (2024-09-17)

### Bug Fixes

* Fix the connectivity check toast again ([#2216](https://github.com/ReVanced/revanced-manager/issues/2216)) ([a7e2281](a7e2281805))
2024-09-17 12:56:13 +00:00
a7e2281805 fix: Fix the connectivity check toast again (#2216) 2024-09-17 19:48:05 +07:00
0ce23d2d60 chore(release): 1.22.0 [skip ci]
# [1.22.0](https://github.com/ReVanced/revanced-manager/compare/v1.21.2...v1.22.0) (2024-09-09)

### Bug Fixes

* Bump SDK of each plugin using SDK lower than 31 ([01e4a76](01e4a76caa)), closes [/github.com/flutter/flutter/issues/153281#issuecomment-2292201697](https://github.com//github.com/flutter/flutter/issues/153281/issues/issuecomment-2292201697)
* Empty “tmp-XXXXXX” directory keeps growing in cacheDir ([#2194](https://github.com/ReVanced/revanced-manager/issues/2194)) ([f5a12e0](f5a12e01bd))
* Fix missing notification icon when shrinking resouces ([#2195](https://github.com/ReVanced/revanced-manager/issues/2195)) ([224be29](224be29a3d))
* Handle selecting files and folders for patch options correctly ([#2144](https://github.com/ReVanced/revanced-manager/issues/2144)) ([f1c2f41](f1c2f4146c))
* Lack of connectivity toast not showing due to incorrect comparison ([81f05e1](81f05e1b19))
* Migrate to onPopInvokedWithResult ([43d5888](43d5888182))
* Move temporary files outside of the cache directory ([#2193](https://github.com/ReVanced/revanced-manager/issues/2193)) ([1ef1f8d](1ef1f8d47a))
* Reland commit 01e4a76caa06b4ab7934cc786ca57204501dd983 ([3dc695e](3dc695eafb))
* Specify our own FGS Type ([37c912b](37c912b598))

### Features

* Improve "Installation incompatible" dialog message ([#2164](https://github.com/ReVanced/revanced-manager/issues/2164)) ([51c0f14](51c0f14055))
* Support Flutter 3.24 ([3d8318d](3d8318da14))
2024-09-09 10:59:13 +00:00
d0fe57970f chore: Merge branch dev to main (#2149) 2024-09-09 13:51:11 +03:00
4dcdc57ffd chore(release): 1.22.0-dev.4 [skip ci]
# [1.22.0-dev.4](https://github.com/ReVanced/revanced-manager/compare/v1.22.0-dev.3...v1.22.0-dev.4) (2024-09-09)

### Bug Fixes

* Move temporary files outside of the cache directory ([#2193](https://github.com/ReVanced/revanced-manager/issues/2193)) ([1ef1f8d](1ef1f8d47a))
2024-09-09 10:50:05 +00:00
1ef1f8d47a fix: Move temporary files outside of the cache directory (#2193)
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2024-09-09 17:42:03 +07:00
d688f38a63 chore: Sync translations (#2166)
Signed-off-by: validcube <pun.butrach@gmail.com>
Co-authored-by: validcube <pun.butrach@gmail.com>
2024-09-09 14:14:59 +07:00
582db18d83 chore(release): 1.22.0-dev.3 [skip ci]
# [1.22.0-dev.3](https://github.com/ReVanced/revanced-manager/compare/v1.22.0-dev.2...v1.22.0-dev.3) (2024-09-07)

### Bug Fixes

* Empty “tmp-XXXXXX” directory keeps growing in cacheDir ([#2194](https://github.com/ReVanced/revanced-manager/issues/2194)) ([f5a12e0](f5a12e01bd))
2024-09-07 03:09:04 +00:00
f5a12e01bd fix: Empty “tmp-XXXXXX” directory keeps growing in cacheDir (#2194) 2024-09-07 09:59:37 +07:00
09fd9c4e04 chore(release): 1.22.0-dev.2 [skip ci]
# [1.22.0-dev.2](https://github.com/ReVanced/revanced-manager/compare/v1.22.0-dev.1...v1.22.0-dev.2) (2024-09-06)

### Bug Fixes

* Bump SDK of each plugin using SDK lower than 31 ([01e4a76](01e4a76caa)), closes [/github.com/flutter/flutter/issues/153281#issuecomment-2292201697](https://github.com//github.com/flutter/flutter/issues/153281/issues/issuecomment-2292201697)
* Fix missing notification icon when shrinking resouces ([#2195](https://github.com/ReVanced/revanced-manager/issues/2195)) ([224be29](224be29a3d))
* Lack of connectivity toast not showing due to incorrect comparison ([81f05e1](81f05e1b19))
* Migrate to onPopInvokedWithResult ([43d5888](43d5888182))
* Reland commit 01e4a76caa06b4ab7934cc786ca57204501dd983 ([3dc695e](3dc695eafb))
* Specify our own FGS Type ([37c912b](37c912b598))

### Features

* Support Flutter 3.24 ([3d8318d](3d8318da14))
2024-09-06 14:53:03 +00:00
43d5888182 fix: Migrate to onPopInvokedWithResult
Reference: https://docs.flutter.dev/release/breaking-changes/popscope-with-result
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 21:44:56 +07:00
646feae0ec build: Bump dependency and resolve removed function(s)
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 21:44:55 +07:00
e73ce99f1d build: Restrict Flutter 4.0.0
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 21:44:55 +07:00
af2d8226de docs: Specify Android 8.x version & CPU arch requirements
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 21:44:55 +07:00
37c912b598 fix: Specify our own FGS Type
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 21:44:54 +07:00
3102272a31 build: Reduce clutter in buildTypes
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 21:44:54 +07:00
3dc695eafb fix: Reland commit 01e4a76caa06b4ab7934cc786ca57204501dd983
Amended: Remove secret @ Fri Sep 6 21:06:58 2024 +0700

Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 21:44:33 +07:00
6f0721b066 chore: Temporary disable workaround for testing
The local enviroment deemed unreliable, before applying it doesn't work - after applying the workaround, it work - after removing the workaround with clearing cache, it doesn't work. (what?)

Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 20:52:21 +07:00
3dfe6b1080 ci: Attempt to group all dependabot dependency update
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 20:44:40 +07:00
02e5641227 build: Bump Gradle to v8.10
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 20:18:53 +07:00
01e4a76caa fix: Bump SDK of each plugin using SDK lower than 31
Reference: https://github.com/flutter/flutter/issues/153281#issuecomment-2292201697
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 20:12:01 +07:00
59838a51ca ci: Potientially improve Gradle detection
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-09-06 19:27:55 +07:00
224be29a3d fix: Fix missing notification icon when shrinking resouces (#2195) 2024-09-06 18:10:30 +07:00
921052acce build(deps): bump burrunan/gradle-cache-action from 1 to 2 (#2177)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 06:02:32 +07:00
81f05e1b19 fix: Lack of connectivity toast not showing due to incorrect comparison
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-08-28 00:26:41 +07:00
b769a66d16 chore: Sync translations (#2090)
Signed-off-by: validcube <pun.butrach@gmail.com>
Co-authored-by: validcube <pun.butrach@gmail.com>
2024-08-27 22:01:29 +07:00
5d612fe790 ci: Run nuke in correct steps 2024-08-27 21:11:52 +07:00
61251deffa ci: Fix permission not given to Slang 2024-08-27 21:09:33 +07:00
f2931443d9 ci: Fix translation normalization feature (#2165) 2024-08-27 21:04:15 +07:00
3d8318da14 feat: Support Flutter 3.24
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-08-27 21:01:41 +07:00
f6bfe0d3f9 chore(release): 1.22.0-dev.1 [skip ci]
# [1.22.0-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.21.3-dev.1...v1.22.0-dev.1) (2024-08-27)

### Features

* Improve "Installation incompatible" dialog message ([#2164](https://github.com/ReVanced/revanced-manager/issues/2164)) ([51c0f14](51c0f14055))
2024-08-27 08:07:13 +00:00
51c0f14055 feat: Improve "Installation incompatible" dialog message (#2164) 2024-08-27 09:59:18 +02:00
2a6dc09a9b chore(release): 1.21.3-dev.1 [skip ci]
## [1.21.3-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.21.2...v1.21.3-dev.1) (2024-08-18)

### Bug Fixes

* Handle selecting files and folders for patch options correctly ([#2144](https://github.com/ReVanced/revanced-manager/issues/2144)) ([f1c2f41](f1c2f4146c))
2024-08-18 08:19:05 +00:00
f1c2f4146c fix: Handle selecting files and folders for patch options correctly (#2144) 2024-08-18 12:11:10 +04:00
2f46b3c84e chore(release): 1.21.2 [skip ci]
## [1.21.2](https://github.com/ReVanced/revanced-manager/compare/v1.21.1...v1.21.2) (2024-08-11)

### Bug Fixes

* Add haptics to save last APK switch ([#2133](https://github.com/ReVanced/revanced-manager/issues/2133)) ([e063b3d](e063b3d102))
* Don't crash installation when saving last APK is disabled ([#2128](https://github.com/ReVanced/revanced-manager/issues/2128)) ([427928e](427928e542))
* Don't crash when installing the last patched APK ([#2131](https://github.com/ReVanced/revanced-manager/issues/2131)) ([cb722f2](cb722f2634))
* Unable to scroll in the removed patches dialog ([#2113](https://github.com/ReVanced/revanced-manager/issues/2113)) ([295c5a7](295c5a74ea))
2024-08-11 16:08:42 +00:00
5f388abf95 chore: Merge branch dev to main (#2118) 2024-08-11 09:00:47 -07:00
7acdb8e660 chore(release): 1.21.2-dev.3 [skip ci]
## [1.21.2-dev.3](https://github.com/ReVanced/revanced-manager/compare/v1.21.2-dev.2...v1.21.2-dev.3) (2024-08-11)

### Bug Fixes

* Add haptics to save last APK switch ([#2133](https://github.com/ReVanced/revanced-manager/issues/2133)) ([e063b3d](e063b3d102))
* Don't crash when installing the last patched APK ([#2131](https://github.com/ReVanced/revanced-manager/issues/2131)) ([cb722f2](cb722f2634))
2024-08-11 15:59:16 +00:00
e063b3d102 fix: Add haptics to save last APK switch (#2133) 2024-08-11 08:51:18 -07:00
cb722f2634 fix: Don't crash when installing the last patched APK (#2131) 2024-08-11 08:51:02 -07:00
0499d2b08a chore(release): 1.21.2-dev.2 [skip ci]
## [1.21.2-dev.2](https://github.com/ReVanced/revanced-manager/compare/v1.21.2-dev.1...v1.21.2-dev.2) (2024-08-11)

### Bug Fixes

* Don't crash installation when saving last APK is disabled ([#2128](https://github.com/ReVanced/revanced-manager/issues/2128)) ([427928e](427928e542))
2024-08-11 15:39:29 +00:00
427928e542 fix: Don't crash installation when saving last APK is disabled (#2128) 2024-08-11 19:31:18 +04:00
ceb9d66f17 chore(release): 1.21.2-dev.1 [skip ci]
## [1.21.2-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.21.1...v1.21.2-dev.1) (2024-08-06)

### Bug Fixes

* Unable to scroll in the removed patches dialog ([#2113](https://github.com/ReVanced/revanced-manager/issues/2113)) ([295c5a7](295c5a74ea))
2024-08-06 00:55:10 +00:00
295c5a74ea fix: Unable to scroll in the removed patches dialog (#2113) 2024-08-06 03:46:01 +03:00
400df69528 chore(release): 1.21.1 [skip ci]
## [1.21.1](https://github.com/ReVanced/revanced-manager/compare/v1.21.0...v1.21.1) (2024-07-29)

### Bug Fixes

* Revert commit b26760b2 to fix file and folder selection ([e707e51](e707e51719))
2024-07-29 20:47:18 +00:00
5bc7b135d5 chore: Merge branch dev to main (#2092) 2024-07-30 02:22:56 +05:45
6dce353d78 chore(release): 1.21.1-dev.1 [skip ci]
## [1.21.1-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.21.0...v1.21.1-dev.1) (2024-07-29)

### Bug Fixes

* Revert commit b26760b2 to fix file and folder selection ([e707e51](e707e51719))
2024-07-29 20:12:35 +00:00
e707e51719 fix: Revert commit b26760b2 to fix file and folder selection 2024-07-29 22:00:25 +02:00
1cea9600a2 chore(release): 1.21.0 [skip ci]
# [1.21.0](https://github.com/ReVanced/revanced-manager/compare/v1.20.1...v1.21.0) (2024-07-29)

### Bug Fixes

* Add missing import to patch options field ([d60f9aa](d60f9aa1d8))
* Adjust scroll from clipping children form fields in `AlertDialog` from `showSourcesDialog` ([#1782](https://github.com/ReVanced/revanced-manager/issues/1782)) ([bbeb836](bbeb836923))
* Cache external API calls  ([#1911](https://github.com/ReVanced/revanced-manager/issues/1911)) ([2c3e2e6](2c3e2e639f))
* Change problematic translation string ([6b03f3a](6b03f3a169))
* Correct architecture to armeabi-v7a ([63c6412](63c6412736))
* Download latest integrations non-pre-release ([4a72267](4a72267d41))
* Follow language update immediately ([#1944](https://github.com/ReVanced/revanced-manager/issues/1944)) ([c13827e](c13827e8e1))
* Follow system theme immediately ([#1942](https://github.com/ReVanced/revanced-manager/issues/1942)) ([694f2a9](694f2a9fae))
* Handle selecting files and folders for patch options correctly ([#1941](https://github.com/ReVanced/revanced-manager/issues/1941)) ([b26760b](b26760b216))
* Increase dashboard RefreshIndicator edge offset ([#1859](https://github.com/ReVanced/revanced-manager/issues/1859)) ([232b702](232b702789))
* Patching Screen draw-behind Navigation Bar ([#1945](https://github.com/ReVanced/revanced-manager/issues/1945)) ([f1b25d0](f1b25d09da))
* Restore consistency with the app ([ea9654e](ea9654edec))
* SecurityException when patching application ([#1856](https://github.com/ReVanced/revanced-manager/issues/1856)) ([e0a6de2](e0a6de2c2b))
* Select previously applied patches when loading patch selection ([#1865](https://github.com/ReVanced/revanced-manager/issues/1865)) ([7ef8f04](7ef8f0454b))
* Unable to install application regardless of preference ([c7627ce](c7627ced8e))
* Unsupported patch toast says "patchItem.unsupportedPatchVersion" ([#2011](https://github.com/ReVanced/revanced-manager/issues/2011)) ([3209c0e](3209c0e430))
* Update dialog shows dev version & loading gets stuck in certain circumstances ([#1792](https://github.com/ReVanced/revanced-manager/issues/1792)) ([fc52560](fc52560244))

### Features

* Add ability to set `null` in patch options ([#1947](https://github.com/ReVanced/revanced-manager/issues/1947)) ([5c68d51](5c68d513a3))
* Include primary architecture in external search ([#2068](https://github.com/ReVanced/revanced-manager/issues/2068)) ([23690a9](23690a98df))
* open browser when clicking on changelog link ([bc300d8](bc300d81d9))
* Save last patched app ([#1414](https://github.com/ReVanced/revanced-manager/issues/1414)) ([7720408](77204087bb))
* Support patching on ARMv7a ([a766352](a7663524e6))
2024-07-29 18:38:53 +00:00
d81808ad7b chore: Merge branch dev to main (#1857) 2024-07-30 01:30:51 +07:00
ea9654edec fix: Restore consistency with the app 2024-07-30 01:30:59 +07:00
ced37f7c76 chore(release): 1.21.0-dev.9 [skip ci]
# [1.21.0-dev.9](https://github.com/ReVanced/revanced-manager/compare/v1.21.0-dev.8...v1.21.0-dev.9) (2024-07-29)

### Bug Fixes

* Patching Screen draw-behind Navigation Bar ([#1945](https://github.com/ReVanced/revanced-manager/issues/1945)) ([f1b25d0](f1b25d09da))
2024-07-29 18:24:51 +00:00
4c6e214bf6 refactor: Remove empty keys 2024-07-30 01:16:48 +07:00
d10abd4829 ci: Remove redundancy 2024-07-30 01:15:23 +07:00
25f1640fd6 ci: Remove empty value 2024-07-30 01:13:05 +07:00
5690adc0de chore: Sync translations (#2005) 2024-07-30 01:02:02 +07:00
f1b25d09da fix: Patching Screen draw-behind Navigation Bar (#1945)
Co-authored-by: surya-technovert <surya.m@technovert.com>
2024-07-30 00:58:40 +07:00
96a21a5564 chore(release): 1.21.0-dev.8 [skip ci]
# [1.21.0-dev.8](https://github.com/ReVanced/revanced-manager/compare/v1.21.0-dev.7...v1.21.0-dev.8) (2024-07-29)

### Bug Fixes

* Correct architecture to armeabi-v7a ([63c6412](63c6412736))
* Unable to install application regardless of preference ([c7627ce](c7627ced8e))

### Features

* Support patching on ARMv7a ([a766352](a7663524e6))
2024-07-29 17:51:14 +00:00
0b21bb9807 build: Allocate more memory 2024-07-30 00:43:25 +07:00
557ee8d472 ci: Fix accident 2024-07-30 00:22:22 +07:00
6da3751a8a ci: Don't include Slang's analyser generated file 2024-07-30 00:17:29 +07:00
cf708de005 ci: Remove deleted strings from translated file 2024-07-30 00:12:43 +07:00
b649c4539f chore: Remove all long forever deleted translated strings 2024-07-30 00:11:09 +07:00
c63342bc21 chore: Normalise all translated strings 2024-07-30 00:03:06 +07:00
9f56b277ca ci: Use Slang's Normalisation feature 2024-07-30 00:03:06 +07:00
73c92b9c72 build: Update multiple dependencies at once
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-07-30 00:03:06 +07:00
c7627ced8e fix: Unable to install application regardless of preference
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-07-30 00:03:06 +07:00
63c6412736 fix: Correct architecture to armeabi-v7a
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-07-30 00:03:05 +07:00
a7663524e6 feat: Support patching on ARMv7a
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-07-30 00:03:05 +07:00
65feb34242 chore(release): 1.21.0-dev.7 [skip ci]
# [1.21.0-dev.7](https://github.com/ReVanced/revanced-manager/compare/v1.21.0-dev.6...v1.21.0-dev.7) (2024-07-29)

### Features

* Include primary architecture in external search ([#2068](https://github.com/ReVanced/revanced-manager/issues/2068)) ([23690a9](23690a98df))
2024-07-29 16:04:12 +00:00
23690a98df feat: Include primary architecture in external search (#2068) 2024-07-29 22:56:00 +07:00
7449d4e318 docs: Link user to the latest version of app (#2077) 2024-07-25 09:27:29 +07:00
c6f9e36f4b refactor: Migrate deprecated member 2024-07-13 17:32:34 +07:00
e9cee0abe2 ci: Prefer installing NPM dependencies from lock 2024-07-13 17:04:43 +07:00
9440f23b55 chore: Remove NDK constraint (#2016)
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2024-07-13 16:55:02 +07:00
c67b4b438c build(deps): bump flutter_markdown from 0.7.1 to 0.7.3 (#2022)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-12 14:07:16 +07:00
1bdb820aed refactor: Remove unused strings (#2010) 2024-07-11 11:28:02 +07:00
a28d77bc65 chore(release): 1.21.0-dev.6 [skip ci]
# [1.21.0-dev.6](https://github.com/ReVanced/revanced-manager/compare/v1.21.0-dev.5...v1.21.0-dev.6) (2024-06-30)

### Bug Fixes

* Add missing import to patch options field ([d60f9aa](d60f9aa1d8))
* Follow system theme immediately ([#1942](https://github.com/ReVanced/revanced-manager/issues/1942)) ([694f2a9](694f2a9fae))
* Handle selecting files and folders for patch options correctly ([#1941](https://github.com/ReVanced/revanced-manager/issues/1941)) ([b26760b](b26760b216))
* Increase dashboard RefreshIndicator edge offset ([#1859](https://github.com/ReVanced/revanced-manager/issues/1859)) ([232b702](232b702789))
* Select previously applied patches when loading patch selection ([#1865](https://github.com/ReVanced/revanced-manager/issues/1865)) ([7ef8f04](7ef8f0454b))
* Unsupported patch toast says "patchItem.unsupportedPatchVersion" ([#2011](https://github.com/ReVanced/revanced-manager/issues/2011)) ([3209c0e](3209c0e430))

### Features

* Save last patched app ([#1414](https://github.com/ReVanced/revanced-manager/issues/1414)) ([7720408](77204087bb))
2024-06-30 20:45:38 +00:00
d60f9aa1d8 fix: Add missing import to patch options field
Patch options fields was missing the `patch_options_viewmodel` import, preventing building to complete successfully
2024-06-30 13:38:01 -07:00
3209c0e430 fix: Unsupported patch toast says "patchItem.unsupportedPatchVersion" (#2011) 2024-06-30 15:24:25 +07:00
7ef8f0454b fix: Select previously applied patches when loading patch selection (#1865) 2024-06-29 14:40:20 +02:00
232b702789 fix: Increase dashboard RefreshIndicator edge offset (#1859) 2024-06-29 14:40:04 +02:00
694f2a9fae fix: Follow system theme immediately (#1942)
Co-authored-by: surya-technovert <surya.m@technovert.com>
2024-06-29 14:39:00 +02:00
77204087bb feat: Save last patched app (#1414)
Co-authored-by: aAbed <39409020+TheAabedKhan@users.noreply.github.com>
Co-authored-by: Ushie <ushiekane@gmail.com>
Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
Co-authored-by: Mr. X <79870712+n30mrx@users.noreply.github.com>
Co-authored-by: festry0 <153519925+festry0@users.noreply.github.com>
2024-06-29 14:38:00 +02:00
b26760b216 fix: Handle selecting files and folders for patch options correctly (#1941) 2024-06-29 14:34:34 +02:00
3c36950aeb chore(release): 1.21.0-dev.5 [skip ci]
# [1.21.0-dev.5](https://github.com/ReVanced/revanced-manager/compare/v1.21.0-dev.4...v1.21.0-dev.5) (2024-06-26)

### Bug Fixes

* Adjust scroll from clipping children form fields in `AlertDialog` from `showSourcesDialog` ([#1782](https://github.com/ReVanced/revanced-manager/issues/1782)) ([bbeb836](bbeb836923))
2024-06-26 22:53:56 +00:00
bbeb836923 fix: Adjust scroll from clipping children form fields in AlertDialog from showSourcesDialog (#1782) 2024-06-27 05:45:55 +07:00
a99406f0a9 chore(release): 1.21.0-dev.4 [skip ci]
# [1.21.0-dev.4](https://github.com/ReVanced/revanced-manager/compare/v1.21.0-dev.3...v1.21.0-dev.4) (2024-06-24)

### Bug Fixes

* Cache external API calls  ([#1911](https://github.com/ReVanced/revanced-manager/issues/1911)) ([2c3e2e6](2c3e2e639f))
* Follow language update immediately ([#1944](https://github.com/ReVanced/revanced-manager/issues/1944)) ([c13827e](c13827e8e1))
* SecurityException when patching application ([#1856](https://github.com/ReVanced/revanced-manager/issues/1856)) ([e0a6de2](e0a6de2c2b))
* Update dialog shows dev version & loading gets stuck in certain circumstances ([#1792](https://github.com/ReVanced/revanced-manager/issues/1792)) ([fc52560](fc52560244))

### Features

* Add ability to set `null` in patch options ([#1947](https://github.com/ReVanced/revanced-manager/issues/1947)) ([5c68d51](5c68d513a3))
2024-06-24 17:03:46 +00:00
73368b58be build: Support for Flutter 3.22 (#1921)
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-06-24 23:55:37 +07:00
ca14e77ba3 chore: Sync translations (#1899) 2024-06-24 23:55:03 +07:00
cafdfcda47 ci: Don't fail validation on unimportant warnings 2024-06-24 23:52:23 +07:00
5c68d513a3 feat: Add ability to set null in patch options (#1947) 2024-06-24 23:37:16 +07:00
fc52560244 fix: Update dialog shows dev version & loading gets stuck in certain circumstances (#1792)
Signed-off-by: validcube <pun.butrach@gmail.com>
Co-authored-by: validcube <pun.butrach@gmail.com>
2024-06-19 14:44:09 +07:00
46f6a49a7a ci: Always run on dev branch only 2024-06-15 17:36:25 +07:00
c13827e8e1 fix: Follow language update immediately (#1944)
Co-authored-by: surya-technovert <surya.m@technovert.com>
2024-06-15 17:21:47 +07:00
e0a6de2c2b fix: SecurityException when patching application (#1856) 2024-05-28 11:36:31 +07:00
afdba00722 build: Fix invalid Gradle wrapper checksum (#1919) 2024-05-28 09:31:48 +07:00
9084c71aa3 build: Bump dependencies 2024-05-26 01:21:14 +02:00
8fc5fb6a80 docs: Improve issue templates 2024-05-26 00:43:38 +02:00
5f762c5442 build: Update Dart dependencies
Signed-off-by: validcube <pun.butrach@gmail.com>
2024-05-19 19:15:35 +07:00
8b21ec1ea3 ci: Switch to Flutter instead 2024-05-19 18:54:48 +07:00
e83fbb864e ci: Run slang first before validating translation 2024-05-19 18:46:49 +07:00
f03af17f71 docs: Fix issue template mistakes (#1910) 2024-05-19 01:33:18 +07:00
2c3e2e639f fix: Cache external API calls (#1911) 2024-05-18 10:52:13 -07:00
cc85b393dc docs: Fix punctuation in issue forms (#1909) 2024-05-18 01:18:29 +07:00
fa6ad214f9 chore(release): 1.21.0-dev.3 [skip ci]
# [1.21.0-dev.3](https://github.com/ReVanced/revanced-manager/compare/v1.21.0-dev.2...v1.21.0-dev.3) (2024-05-07)

### Bug Fixes

* Change problematic translation string ([6b03f3a](6b03f3a169))
2024-05-07 14:01:16 +00:00
3ceb63be1d build: Downgrade intl to 0.18.1
1.19.0 is for beta channel atm
2024-05-07 20:53:43 +07:00
200483d733 ci: Always validate Dart file during translation 2024-05-07 20:51:34 +07:00
6b03f3a169 fix: Change problematic translation string 2024-05-07 20:51:01 +07:00
612a3bab49 build: Safely upgrade dependencies 2024-05-07 20:50:26 +07:00
3ac08512f3 chore: Sync translations (#1888)
Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
2024-05-06 21:24:51 +07:00
1adc673c44 chore: Sync translations (#1842) 2024-04-29 10:24:25 +07:00
1aa1bd84cf chore(release): 1.21.0-dev.2 [skip ci]
# [1.21.0-dev.2](https://github.com/ReVanced/revanced-manager/compare/v1.21.0-dev.1...v1.21.0-dev.2) (2024-04-28)

### Bug Fixes

* Download latest integrations non-pre-release ([4a72267](4a72267d41))
2024-04-28 21:49:47 +00:00
4a72267d41 fix: Download latest integrations non-pre-release 2024-04-28 23:40:28 +02:00
7e0f18e3b7 build: Bump dependencies 2024-04-28 23:39:20 +02:00
aab5d4411b docs: Remove duplicate section in README (#1879)
[skip ci]
2024-04-23 18:29:06 +02:00
e5d83f424a chore(release): 1.21.0-dev.1 [skip ci]
# [1.21.0-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.20.1...v1.21.0-dev.1) (2024-04-16)

### Features

* open browser when clicking on changelog link ([bc300d8](bc300d81d9))
2024-04-16 14:39:51 +00:00
bc300d81d9 feat: open browser when clicking on changelog link 2024-04-16 20:00:46 +05:30
5e6cc86c7e build(deps-dev): bump semantic-release from 23.0.6 to 23.0.7 (#1844)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:57:28 +07:00
d91ea62903 build(deps): bump flutter_local_notifications from 16.3.2 to 17.0.0 (#1848)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:57:16 +07:00
f00dc4d3e6 build(deps): bump flutter_markdown from 0.6.20+1 to 0.6.22+1 (#1851)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:55:48 +07:00
6c0c961ca0 build(deps): bump build_runner from 2.4.8 to 2.4.9 (#1850)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:54:31 +07:00
a99de99202 build(deps): bump share_plus from 7.2.2 to 8.0.2 (#1853)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:53:59 +07:00
a31ec9d1fe build(deps): bump permission_handler from 11.3.0 to 11.3.1 (#1852)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 14:53:30 +07:00
a23f032fd2 chore(release): 1.20.1 [skip ci]
## [1.20.1](https://github.com/ReVanced/revanced-manager/compare/v1.20.0...v1.20.1) (2024-04-05)

### Bug Fixes

* Don't crash on patch ([a7e481c](a7e481c827))
2024-04-05 02:52:15 +00:00
95a8234e2d chore: Merge branch dev to main (#1855) 2024-04-05 05:43:17 +03:00
a7e481c827 fix: Don't crash on patch
This reverts commit 7833a0d552d05946f50434e799c46272e6eb30a3.
2024-04-05 05:35:36 +03:00
975870e254 chore(release): 1.20.0 [skip ci]
# [1.20.0](https://github.com/ReVanced/revanced-manager/compare/v1.19.3...v1.20.0) (2024-04-05)

### Bug Fixes

* disable proguard obfuscation ([401646a](401646ace4))
* Do not crash when selecting an APK from storage ([#1768](https://github.com/ReVanced/revanced-manager/issues/1768)) ([8564c1a](8564c1a72e))
* Don't translation ReVanced repository ([c265794](c265794d0e))
* Ensure safe area usage in Changelogs Modal Bottom Sheet ([#1772](https://github.com/ReVanced/revanced-manager/issues/1772)) ([c981cb4](c981cb4a41))
* Pre-releases changelog being shown ([#1767](https://github.com/ReVanced/revanced-manager/issues/1767)) ([add49e1](add49e14fb))
* Replace Spacer with Expanded to avoid overflow ([#1791](https://github.com/ReVanced/revanced-manager/issues/1791)) ([6f70a07](6f70a07970))
* Set text colour on dropdown menu for Custom Value ([966796d](966796dfec)), closes [#1584](https://github.com/ReVanced/revanced-manager/issues/1584)
* **ui:** Support free-scroll and auto-scroll for the installer logs ([#1736](https://github.com/ReVanced/revanced-manager/issues/1736)) ([#1836](https://github.com/ReVanced/revanced-manager/issues/1836)) ([025ff52](025ff527ee))

### Features

* Improve language update settings ([#1838](https://github.com/ReVanced/revanced-manager/issues/1838)) ([f9e6ef3](f9e6ef3fd3))
2024-04-05 01:19:30 +00:00
b7c838fd25 chore: Merge branch dev to main (#1763) 2024-04-05 04:11:17 +03:00
3776674eb4 chore(release): 1.20.0-dev.1 [skip ci]
# [1.20.0-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.19.4-dev.7...v1.20.0-dev.1) (2024-04-05)

### Bug Fixes

* Do not crash when selecting an APK from storage ([#1768](https://github.com/ReVanced/revanced-manager/issues/1768)) ([8564c1a](8564c1a72e))

### Features

* Improve language update settings ([#1838](https://github.com/ReVanced/revanced-manager/issues/1838)) ([f9e6ef3](f9e6ef3fd3))
2024-04-05 01:10:39 +00:00
4293e27681 chore: Sync translations (#1804) 2024-04-05 04:03:11 +03:00
8564c1a72e fix: Do not crash when selecting an APK from storage (#1768) 2024-04-05 03:58:59 +03:00
f9e6ef3fd3 feat: Improve language update settings (#1838) 2024-04-05 03:55:16 +03:00
e80ee09893 chore(release): 1.19.4-dev.7 [skip ci]
## [1.19.4-dev.7](https://github.com/ReVanced/revanced-manager/compare/v1.19.4-dev.6...v1.19.4-dev.7) (2024-04-04)

### Bug Fixes

* **ui:** Support free-scroll and auto-scroll for the installer logs ([#1736](https://github.com/ReVanced/revanced-manager/issues/1736)) ([#1836](https://github.com/ReVanced/revanced-manager/issues/1836)) ([025ff52](025ff527ee))
2024-04-04 02:35:20 +00:00
025ff527ee fix(ui): Support free-scroll and auto-scroll for the installer logs (#1736) (#1836) 2024-04-04 09:27:47 +07:00
35fdbb5988 chore(release): 1.19.4-dev.6 [skip ci]
## [1.19.4-dev.6](https://github.com/ReVanced/revanced-manager/compare/v1.19.4-dev.5...v1.19.4-dev.6) (2024-04-02)

### Bug Fixes

* disable proguard obfuscation ([401646a](401646ace4))
2024-04-02 16:19:30 +00:00
401646ace4 fix: disable proguard obfuscation 2024-04-02 18:09:38 +02:00
a62a8852e7 build(deps): bump connectivity_plus from 5.0.2 to 6.0.1 (#1808)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 11:49:03 +07:00
04a3df3642 build(deps): bump package_info_plus from 5.0.1 to 6.0.0 (#1806)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 11:48:46 +07:00
ecb041187b build(deps-dev): bump semantic-release from 23.0.2 to 23.0.6 (#1816)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 11:43:57 +07:00
1fd44e1cfc build(deps-dev): bump @droidsolutions-oss/semantic-release-update-file from 1.4.0-beta.1 to 1.4.0 (#1815)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 11:43:29 +07:00
fb29036d0a build(deps): bump flutter_lints from 3.0.1 to 3.0.2 (#1805)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-01 10:18:52 +07:00
aba2ed4378 ci: Don't specify bundle 2024-03-30 03:16:39 +03:00
076e17d670 chore: Don't preserve hierachy in Crowdin 2024-03-30 03:12:06 +03:00
a971cbd519 chore(release): 1.19.4-dev.5 [skip ci]
## [1.19.4-dev.5](https://github.com/ReVanced/revanced-manager/compare/v1.19.4-dev.4...v1.19.4-dev.5) (2024-03-28)

### Bug Fixes

* Don't translation ReVanced repository ([c265794](c265794d0e))
2024-03-28 06:23:34 +00:00
c265794d0e fix: Don't translation ReVanced repository
Regex:

,
    "patcherContributors":.*,
    "patchesContributors":.*,
    "integrationsContributors":.*,
    "cliContributors":.*,
    "managerContributors":.*
2024-03-28 06:13:05 +00:00
ecadb80113 chore(release): 1.19.4-dev.4 [skip ci]
## [1.19.4-dev.4](https://github.com/ReVanced/revanced-manager/compare/v1.19.4-dev.3...v1.19.4-dev.4) (2024-03-28)

### Bug Fixes

* Set text colour on dropdown menu for Custom Value ([966796d](966796dfec)), closes [#1584](https://github.com/ReVanced/revanced-manager/issues/1584)
2024-03-28 05:35:25 +00:00
9a66357f7a refactor: slight format change
This is so unreadable, there must've been a better way to do this.
2024-03-28 05:26:35 +00:00
63d83a43ad chore: Remove unused en_US file
This file contains absolulely nothing, whereabout: Unknown.
2024-03-28 05:20:32 +00:00
7833a0d552 build: Switch flutter_background to official sources
https://github.com/JulianAssmann/flutter_background/pull/79 is merged.
2024-03-28 05:17:49 +00:00
966796dfec fix: Set text colour on dropdown menu for Custom Value
This fix #1584 and a continuation of acb1e2434b28efca852297e0a0a8ffce155e67e4

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2024-03-28 05:15:02 +00:00
2d19f36901 chore(release): 1.19.4-dev.3 [skip ci]
## [1.19.4-dev.3](https://github.com/ReVanced/revanced-manager/compare/v1.19.4-dev.2...v1.19.4-dev.3) (2024-03-28)

### Bug Fixes

* Replace Spacer with Expanded to avoid overflow ([#1791](https://github.com/ReVanced/revanced-manager/issues/1791)) ([6f70a07](6f70a07970))
2024-03-28 04:45:28 +00:00
6f70a07970 fix: Replace Spacer with Expanded to avoid overflow (#1791) 2024-03-28 11:38:07 +07:00
e85ed5a8e3 build: Bump language_code to v0.4.2
This fix #1714 regarding country name of es-AR (Argentina) does not exist.

Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2024-03-28 04:06:52 +00:00
ad416387c2 ci(Crowdin): Specify bundle to download 2024-03-28 02:02:55 +03:00
58d8e7f34f build: Bump dependencies (#1796) 2024-03-27 13:46:37 +01:00
bb105b5662 chore(Branding): Update ReVanced Logo name (#1794) 2024-03-27 17:33:42 +07:00
a71a930125 chore(release): 1.19.4-dev.2 [skip ci]
## [1.19.4-dev.2](https://github.com/ReVanced/revanced-manager/compare/v1.19.4-dev.1...v1.19.4-dev.2) (2024-03-23)

### Bug Fixes

* Ensure safe area usage in Changelogs Modal Bottom Sheet ([#1772](https://github.com/ReVanced/revanced-manager/issues/1772)) ([c981cb4](c981cb4a41))
2024-03-23 11:03:27 +00:00
af7e39b7f0 chore(i18n): Sync translations (#1719)
Co-authored-by: revanced-bot <github@revanced.app>
2024-03-23 17:55:11 +07:00
c981cb4a41 fix: Ensure safe area usage in Changelogs Modal Bottom Sheet (#1772) 2024-03-23 17:51:17 +07:00
3ea6ef0bbf ci(Dependabot): Add Gradle ecosystem to RVM Flutter 2024-03-22 04:54:57 +00:00
2772a96727 docs(Build): Shorten build_runner args 2024-03-22 04:41:34 +00:00
50b4a5f1d8 ci: Fix PR build success message 2024-03-18 11:51:07 +01:00
e52a6ce734 chore(release): 1.19.4-dev.1 [skip ci]
## [1.19.4-dev.1](https://github.com/ReVanced/revanced-manager/compare/v1.19.3...v1.19.4-dev.1) (2024-03-17)

### Bug Fixes

* Pre-releases changelog being shown ([#1767](https://github.com/ReVanced/revanced-manager/issues/1767)) ([add49e1](add49e14fb))
2024-03-17 17:22:14 +00:00
add49e14fb fix: Pre-releases changelog being shown (#1767) 2024-03-17 10:14:22 -07:00
ab13895196 docs(Security): Improve badges' accessibility
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2024-03-11 15:05:40 +07:00
846afb420b ci(PR Sync): Use revanced-bot acount
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2024-03-11 14:59:29 +07:00
dca8a1dab6 ci(Crowdin): Add workflow change to trigger event
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2024-03-11 14:49:46 +07:00
d1c36c1bcc ci(Crowdin): Improve configuration of the workflow
Signed-off-by: Pun Butrach <pun.butrach@gmail.com>
2024-03-11 14:49:13 +07:00
453 changed files with 20588 additions and 32677 deletions

View File

@ -1,7 +1,7 @@
name: 🐞 Bug report
description: Report a bug or an issue.
title: "bug: "
labels: ["Bug report"]
title: 'bug: '
labels: ['Bug report']
body:
- type: markdown
attributes:
@ -70,7 +70,7 @@ body:
Before creating a new bug report, please keep the following in mind:
- **Do not submit a duplicate bug report**: You can review existing bug reports [here](https://github.com/ReVanced/revanced-manager/labels/Bug%20report).
- **Do not submit a duplicate bug report**: Search for existing bug reports [here](https://github.com/ReVanced/revanced-manager/issues?q=label%3A%22Bug+report%22).
- **Review the contribution guidelines**: Make sure your bug report adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-manager/blob/main/CONTRIBUTING.md).
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
- type: textarea
@ -80,47 +80,30 @@ body:
- Describe your bug in detail
- Add steps to reproduce the bug if possible (Step 1. ... Step 2. ...)
- Add images and videos if possible
- List used patches if applicable
validations:
required: true
- type: textarea
attributes:
label: Version of ReVanced Manager and version & name of app you are patching
validations:
required: true
- type: dropdown
attributes:
label: Installation method
options:
- Regular
- Mount
validations:
required: false
- type: textarea
attributes:
label: ReVanced Manager logs
description: Export logs in ReVanced Manager settings.
render: shell
- List used patches, downloader and settings if applicable
validations:
required: true
- type: textarea
attributes:
label: Patch logs
description: Export logs in "Patcher" screen.
description: Patch logs can be exported by clicking on the "Logs" button in the "Patcher" screen, when patching finishes.
render: shell
- type: textarea
attributes:
label: Debug logs
description: Debug logs can be exported by clicking on "Export debug logs" in "Settings" > "Advanced".
validations:
required: false
required: true
- type: checkboxes
id: acknowledgements
attributes:
label: Acknowledgements
description: Your bug report will be closed if you don't follow the checklist below.
options:
- label: This issue is not a duplicate of an existing bug report.
- label: I have checked all open and closed bug reports and this is not a duplicate.
required: true
- label: I have chosen an appropriate title.
required: true
- label: All requested information has been provided properly.
required: true
- label: The bug is only related to ReVanced Manager
- label: The bug is only related to ReVanced Manager.
required: true

View File

@ -2,4 +2,4 @@ blank_issues_enabled: false
contact_links:
- name: 🗨 Discussions
url: https://github.com/revanced/revanced-suggestions/discussions
about: Have something unspecific to ReVanced Manager in mind? Search for or start a new discussion!
about: Have something unspecific to ReVanced Manager in mind? Search for or start a new discussion!

View File

@ -1,7 +1,3 @@
name: ⭐ Feature request
description: Create a detailed request for a new feature.
title: "feat: "
labels: ["Feature request"]
body:
- type: markdown
attributes:
@ -70,7 +66,7 @@ body:
Before creating a new feature request, please keep the following in mind:
- **Do not submit a duplicate feature request**: You can review existing feature requests [here](https://github.com/ReVanced/revanced-manager//labels/Feature%20request).
- **Do not submit a duplicate feature request**: Search for existing feature requests [here](https://github.com/ReVanced/revanced-manager/issues?q=label%3A%22Feature+request%22).
- **Review the contribution guidelines**: Make sure your feature request adheres to it. You can find the guidelines [here](https://github.com/ReVanced/revanced-manager/blob/main/CONTRIBUTING.md).
- **Do not use the issue page for support**: If you need help or have questions, check out other platforms on [revanced.app](https://revanced.app).
- type: textarea
@ -79,13 +75,12 @@ body:
description: |
- Describe your feature in detail
- Add images, videos, links, examples, references, etc. if possible
- Add the target application name in case you request a new patch
- type: textarea
attributes:
label: Motivation
description: |
A strong motivation is necessary for a feature request to be considered.
- Why should this feature be implemented?
- What is the explicit use case?
- What are the benefits?
@ -98,9 +93,11 @@ body:
label: Acknowledgements
description: Your feature request will be closed if you don't follow the checklist below.
options:
- label: This issue is not a duplicate of an existing feature request.
- label: I have checked all open and closed feature requests and this is not a duplicate
required: true
- label: I have chosen an appropriate title.
required: true
- label: The feature request is only related to ReVanced Manager
- label: All requested information has been provided properly.
required: true
- label: The feature request is only related to ReVanced Manager.
required: true

View File

@ -1,29 +0,0 @@
version: 2
updates:
- package-ecosystem: github-actions
labels: []
directory: /
target-branch: dev
schedule:
interval: monthly
- package-ecosystem: npm
labels: []
directory: /
target-branch: dev
schedule:
interval: monthly
- package-ecosystem: pub
labels: []
directory: /
target-branch: dev
schedule:
interval: monthly
- package-ecosystem: gradle
labels: [ "ReVanced Manager Compose" ]
directory: /
target-branch: compose-dev
schedule:
interval: monthly

View File

@ -2,115 +2,24 @@ name: Build pull request
on:
workflow_dispatch:
inputs:
# Enable or disable cache
flutter-cache:
description: Cache
type: boolean
default: true
# Select app flavour
app-flavour:
description: App flavour
default: 'release'
type: choice
options:
- release
- debug
- profile
# Select pull request
pr-number:
description: PR number (Without hashtag)
required: true
pull_request:
branches:
- dev
run-name: "Build pull request ${{ inputs.pr-number }}"
jobs:
build:
release:
name: Build
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Setup pull request
env:
GH_TOKEN: ${{ github.token }}
run: |
gh repo clone "${{ github.repository }}"
cd revanced-manager
gh repo set-default "${{ github.repository }}"
gh pr checkout "${{ inputs.pr-number }}"
echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Cache Gradle
uses: burrunan/gradle-cache-action@v1
- name: Setup Java
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: ${{ inputs.flutter-cache }}
- name: Get dependencies
run: flutter pub get
- name: Generate translations
run: dart run slang
- name: Generate code files
run: dart run build_runner build --delete-conflicting-outputs
- name: Build
continue-on-error: true
id: flutter-build
env:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
flutter build apk --"${{ inputs.app-flavour }}";
- name: Prepare comment
run: |
if [[ "${{ steps.flutter-build.outcome }}" == "success" ]]; then
echo "MESSAGE=✅ Failed build on ${{ env.COMMIT_HASH }}." >> $GITHUB_ENV
else
echo "MESSAGE=🚫 Failed build on ${{ env.COMMIT_HASH }}." >> $GITHUB_ENV
fi
- name: "Comment on pull request #${{ inputs.pr-number }}"
uses: thollander/actions-comment-pull-request@v2
with:
GITHUB_TOKEN: ${{ github.token }}
pr_number: ${{ inputs.pr-number }}
mode: recreate
message: |
## ⚒️ Build status
${{ env.MESSAGE }}
Details: [${{ github.run_id }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})!
### ⚙️ Workflow run configuration
- Flutter cache: ${{ inputs.flutter-cache }}
- App flavor: ${{ inputs.app-flavour }}
- name: Upload
uses: actions/upload-artifact@v4
with:
if-no-files-found: error
name: revanced-manager-(${{ env.COMMIT_HASH }}-${{ inputs.pr-number }}-${{ inputs.app-flavour }})
path: |
build/app/outputs/flutter-apk/app-${{ inputs.app-flavour }}.apk
build/app/outputs/flutter-apk/app-${{ inputs.app-flavour }}.apk.sha1
run: ./gradlew build --no-daemon

View File

@ -22,6 +22,5 @@ jobs:
with:
destination_branch: 'main'
pr_title: 'chore: ${{ env.MESSAGE }}'
pr_body: |
This pull request will ${{ env.MESSAGE }}.
pr_body: 'This pull request will ${{ env.MESSAGE }}.'
pr_draft: true

View File

@ -6,16 +6,14 @@ on:
branches:
- main
- dev
paths:
- ".github/workflows/release.yml"
- "android/**"
- "assets/**"
- "lib/**"
- "pubspec.yaml"
jobs:
release:
name: Release
permissions:
contents: write
id-token: write
attestations: write
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -24,7 +22,18 @@ jobs:
fetch-depth: 0
- name: Setup Java
run: echo "JAVA_HOME=$JAVA_HOME_17_X64" >> $GITHUB_ENV
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Cache Gradle
uses: burrunan/gradle-cache-action@v1
- name: Build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew assembleRelease
- name: Setup Node.js
uses: actions/setup-node@v4
@ -32,30 +41,24 @@ jobs:
node-version: "lts/*"
cache: 'npm'
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install dependencies
run: npm install
run: npm ci
- name: Get dependencies
run: flutter pub get
- name: Generate translations
run: dart run slang
- name: Generate code files
run: dart run build_runner build --delete-conflicting-outputs
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.REPOSITORY_PUSH_ACCESS }}
signingKey: "keystore.jks"
keyStorePassword: ${{ secrets.SIGNING_KEYSTORE_PASSWORD }}
keyAlias: ${{ secrets.SIGNING_KEY_ALIAS }}
keyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}
- name: Setup keystore
run: |
echo "${{ secrets.SIGNING_KEYSTORE }}" | base64 --decode > android/app/keystore.jks
npx semantic-release
echo "${{ secrets.KEYSTORE }}" | base64 --decode > "app/keystore.jks"
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v4
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_ENTRY_ALIAS: ${{ secrets.KEYSTORE_ENTRY_ALIAS }}
KEYSTORE_ENTRY_PASSWORD: ${{ secrets.KEYSTORE_ENTRY_PASSWORD }}
- name: Attest
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/attest-build-provenance@v2
with:
subject-path: build/app/outputs/apk/release/revanced-manager-*.apk

View File

@ -1,55 +0,0 @@
name: Sync Crowdin
on:
workflow_dispatch:
push:
branches:
- dev
jobs:
sync:
name: Sync
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Dart
uses: dart-lang/setup-dart@v1
- name: Sync translations from Crowdin
uses: crowdin/github-action@v1
with:
config: crowdin.yml
upload_sources: true
upload_translations: false
download_translations: true
localization_branch_name: feat/translations
create_pull_request: true
pull_request_title: "chore: Sync translations"
pull_request_body: "Sync translations from [crowdin.com/project/revanced](https://crowdin.com/project/revanced)"
pull_request_base_branch_name: "dev"
commit_message: "chore: Sync translations"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Remove empty values from JSON
run: |
cd assets/i18n
sudo chmod 777 *
dart nuke.dart >> $GITHUB_STEP_SUMMARY
- name: Commit translations
run: |
git config user.name revanced-bot
git config user.email github@revanced.app
sudo chown -R $USER:$USER .git
git add assets/i18n/*.json
git commit -m "chore: Remove empty values from JSON" assets/i18n/*.json
git push origin HEAD:feat/translations
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -16,4 +16,4 @@ jobs:
token: ${{ secrets.DOCUMENTATION_REPO_ACCESS_TOKEN }}
repository: revanced/revanced-documentation
event-type: update-documentation
client-payload: '{"repo": "${{ github.event.repository.name }}", "ref": "${{ github.ref }}"}'
client-payload: '{"repo": "${{ github.event.repository.name }}", "ref": "${{ github.ref }}"}'

160
.gitignore vendored
View File

@ -1,50 +1,132 @@
# See https://www.dartlang.org/guides/libraries/private-files
### Java template
# Compiled class file
*.class
# Files and directories created by pub
.dart_tool/
.packages
build/
# If you're building an application, you may want to check-in your pubspec.lock
# pubspec.lock
# Log file
*.log
# Directory created by dartdoc
# If you don't generate documentation locally you can remove this line.
doc/api/
# BlueJ files
*.ctxt
# dotenv environment variables file
.env*
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Avoid committing generated Javascript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.js_
*.js.deps
*.js.map
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
.flutter-plugins
.flutter-plugins-dependencies
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# Generated Builder file
**/*.g.dart
**/*.locator.dart
**/*.router.dart
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
flutter_*.png
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
#### Custom
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/artifacts
.idea/compiler.xml
.idea/jarRepositories.xml
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Gradle template
.gradle
**/build/
!src/**/build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
# Potentially copyrighted test APK
*.apk
# Ignore vscode config
.vscode/
# Dependency directories
node_modules/
# Ignore IDEA files
.idea/
.kotlin/
local.properties
# IntelliJ related
*.iml
*.ipr
*.iws
.idea/
# Node Dependency directories
node_modules/
# FVM
.fvm
.cxx

View File

@ -1,45 +0,0 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.
version:
revision: 85684f9300908116a78138ea4c6036c35c9a1236
channel: stable
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: android
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: ios
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: linux
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: macos
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: web
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
- platform: windows
create_revision: 85684f9300908116a78138ea4c6036c35c9a1236
base_revision: 85684f9300908116a78138ea4c6036c35c9a1236
# User provided section
# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'

View File

@ -14,32 +14,17 @@
]
}
],
"@semantic-release/changelog",
"@semantic-release/release-notes-generator",
[
"@droidsolutions-oss/semantic-release-update-file",
{
"files": [
{
"path": ["pubspec.yaml"],
"type": "flutter",
"branches": ["main", "dev"]
}
]
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "flutter build apk"
}
],
"@semantic-release/changelog",
"gradle-semantic-release-plugin",
[
"@semantic-release/git",
{
"assets": [
"pubspec.yaml"
]
"CHANGELOG.md",
"gradle.properties",
],
"message": "chore: Release v${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
@ -47,17 +32,17 @@
{
"assets": [
{
"path": "build/app/outputs/apk/release/revanced-manager*.apk"
}
"path": "app/build/outputs/apk/release/revanced-manager*.apk?(.asc)"
},
],
"successComment": false
successComment: false
}
],
[
"@saithodev/semantic-release-backmerge",
{
"backmergeBranches": [{"from": "main", "to": "dev"}],
"clearWorkspace": true
backmergeBranches: [{"from": "main", "to": "dev"}],
clearWorkspace: true
}
]
]

91
.vscode/tasks.json vendored
View File

@ -1,91 +0,0 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Generate (Builder)",
"type": "shell",
"command": "flutter packages pub run build_runner build --delete-conflicting-outputs",
"problemMatcher": []
},
{
"label": "Build (Android)",
"type": "shell",
"command": "flutter build apk",
"problemMatcher": [],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Install (Android)",
"type": "shell",
"command": "adb install build\\app\\outputs\\flutter-apk\\app-release.apk",
"problemMatcher": []
},
{
"label": "Clean (Flutter)",
"type": "shell",
"command": "flutter clean && flutter pub get",
"problemMatcher": []
},
{
"label": "Clean (Builder)",
"type": "shell",
"command": "flutter packages pub run build_runner clean",
"problemMatcher": []
},
{
"label": "Build all (Android)",
"dependsOrder": "sequence",
"dependsOn": [
"Generate (Builder)",
"Build (Android)"
],
"problemMatcher": []
},
{
"label": "Clean all",
"dependsOrder": "sequence",
"dependsOn": [
"Clean (Flutter)",
"Clean (Builder)"
],
"problemMatcher": []
},
{
"label": "Clean all & Build all (Android)",
"dependsOrder": "sequence",
"dependsOn": [
"Clean all",
"Build all (Android)"
],
"problemMatcher": []
},
{
"label": "Clean all & Install (Android)",
"dependsOrder": "sequence",
"dependsOn": [
"Clean all",
"Build all (Android)",
"Install (Android)",
],
"problemMatcher": []
},
{
"label": "Build & Install (Android)",
"dependsOrder": "sequence",
"dependsOn": [
"Build (Android)",
"Install (Android)"
],
"problemMatcher": []
},
{
"label": "Validate translations",
"type": "shell",
"command": "flutter pub run flutter_i18n diff en.json pt.json",
"problemMatcher": []
}
]
}

View File

@ -13,8 +13,8 @@
<br>
<a href="https://revanced.app/">
<picture>
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo-round.svg" />
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo.svg" />
<img height="24px" src="assets/revanced-logo/revanced-logo.svg" />
</picture>
</a>&nbsp;&nbsp;&nbsp;
<a href="https://github.com/ReVanced">
@ -96,7 +96,7 @@ If you encounter a bug while using ReVanced Manager, open an issue using the
## 🤚 I want to contribute but don't know how to code
Even if you don't know how to code, you can still contribute by
Even if you don't know how to code, you can still contribute by
translating ReVanced Manager on [Crowdin](https://translate.revanced.app/).
❤️ Thank you for considering contributing to ReVanced Manager,

View File

@ -13,8 +13,8 @@
<br>
<a href="https://revanced.app/">
<picture>
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo-round.svg" />
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo.svg" />
<img height="24px" src="assets/revanced-logo/revanced-logo.svg" />
</picture>
</a>&nbsp;&nbsp;&nbsp;
<a href="https://github.com/ReVanced">
@ -73,14 +73,13 @@ ReVanced Manager is an application that uses [ReVanced Patcher](https://github.c
Some of the features ReVanced Manager provides are:
- 💉 **Patch apps**: Apply any patch of your choice to Android apps
- 📱 **Portable**: ReVanced Patcher that fits in your pocket
- 🤗 **Simple UI**: Quickly understand the ins and outs of ReVanced Manager
- 🛠️ **Customization**: Configurable API, custom sources, language, signing keystore, theme and more
- ⬇️ **Download**: Automatically download apps using the ReVanced Manager downloader plugin system
- 💉 **Patch**: Select and apply patches to any Android app
- 🛠️ **Customize**: Manage patches, apps, signing, themes, updates, and many more settings
## 🔽 Download
You can download the most recent version of ReVanced Manager at [revanced.app/download](https://revanced.app/download) or from [GitHub releases](https://github.com/ReVanced/revanced-manager/releases).
You can download the most recent version of ReVanced Manager at [revanced.app/download](https://revanced.app/download) or from [GitHub releases](https://github.com/ReVanced/revanced-manager/releases/latest).
Learn how to use ReVanced Manager by following the [documentation](/docs).
## 📚 Everything else
@ -98,10 +97,6 @@ To build a ReVanced Manager, you can follow the [documentation](/docs).
You can find the documentation for ReVanced Manager [here](/docs).
### 👋 Contributing
Thank you for considering contributing to ReVanced Manager. You can find the contribution guidelines [here](/CONTRIBUTING.md).
## ⚖️ License
ReVanced Manager is licensed under the GPLv3 license. Please see the [license file](LICENSE) for more information.

View File

@ -1,77 +0,0 @@
<p align="center">
<picture>
<source
width="256px"
media="(prefers-color-scheme: dark)"
srcset="assets/revanced-headline/revanced-headline-vertical-dark.svg"
>
<img
width="256px"
src="assets/revanced-headline/revanced-headline-vertical-light.svg"
>
</picture>
<br>
<a href="https://revanced.app/">
<picture>
<source height="24px" media="(prefers-color-scheme: dark)" srcset="assets/revanced-logo/revanced-logo-round.svg" />
<img height="24px" src="assets/revanced-logo/revanced-logo-round.svg" />
</picture>
</a>&nbsp;&nbsp;&nbsp;
<a href="https://github.com/ReVanced">
<picture>
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://i.ibb.co/dMMmCrW/Git-Hub-Mark.png" />
<img height="24px" src="https://i.ibb.co/9wV3HGF/Git-Hub-Mark-Light.png" />
</picture>
</a>&nbsp;&nbsp;&nbsp;
<a href="http://revanced.app/discord">
<picture>
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032563-d4e084b7-244e-4358-af50-26bde6dd4996.png" />
</picture>
</a>&nbsp;&nbsp;&nbsp;
<a href="https://reddit.com/r/revancedapp">
<picture>
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032351-9d9d5619-8ef7-470a-9eec-2744ece54553.png" />
</picture>
</a>&nbsp;&nbsp;&nbsp;
<a href="https://t.me/app_revanced">
<picture>
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032213-faf25ab8-0bc3-4a94-a730-b524c96df124.png" />
</picture>
</a>&nbsp;&nbsp;&nbsp;
<a href="https://x.com/revancedapp">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/93124920/270180600-7c1b38bf-889b-4d68-bd5e-b9d86f91421a.png">
<img height="24px" src="https://user-images.githubusercontent.com/93124920/270108715-d80743fa-b330-4809-b1e6-79fbdc60d09c.png" />
</picture>
</a>&nbsp;&nbsp;&nbsp;
<a href="https://www.youtube.com/@ReVanced">
<picture>
<source height="24px" media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
<img height="24px" src="https://user-images.githubusercontent.com/13122796/178032714-c51c7492-0666-44ac-99c2-f003a695ab50.png" />
</picture>
</a>
<br>
<br>
Continuing the legacy of Vanced
</p>
# 🔒 Security Policy
This document describes how to report security vulnerabilities for ReVanced Manager.
## 🚨 Reporting a Vulnerability
Please open an issue in our [advisory tracker](https://github.com/ReVanced/revanced-manager/security/advisories/new) or reach out privately to us on [Discord](https://discord.gg/revanced).
If a vulnerability is confirmed and accepted, you can join our [Discord](https://discord.gg/revanced) server to receive a special contributor role.
### ⏳ Supported Versions
| Version | Branch | Supported |
| -------------------------------------------------------------------------------------------------------- | ----------- | ------------------ |
| ![GitHub Release](https://img.shields.io/github/v/release/ReVanced/revanced-manager?style=for-the-badge) | main | :white_check_mark: |
| ![Static Badge](https://img.shields.io/badge/version-latest-brightgreen?style=for-the-badge) | dev | :white_check_mark: |
| ![Static Badge](https://img.shields.io/badge/version-latest-brightgreen?style=for-the-badge) | compose-dev | :white_check_mark: |

View File

@ -1,161 +0,0 @@
# This file configures the analyzer, which statically analyzes Dart code to
# check for errors, warnings, and lints.
#
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
# invoked from the command line by running `flutter analyze`.
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml
analyzer:
exclude:
- lib/app/app.locator.dart
- lib/app/app.router.dart
- lib/models/patch.g.dart
- lib/models/patched_application.g.dart
linter:
rules:
- always_declare_return_types
- require_trailing_commas
- always_put_control_body_on_new_line
- always_use_package_imports # we do this commonly
- annotate_overrides
- avoid_bool_literals_in_conditional_expressions
- avoid_double_and_int_checks
- avoid_empty_else
- avoid_equals_and_hash_code_on_mutable_classes
- avoid_escaping_inner_quotes
- avoid_field_initializers_in_const_classes
- avoid_function_literals_in_foreach_calls
- avoid_implementing_value_types
- avoid_init_to_null
- avoid_js_rounded_ints
- avoid_null_checks_in_equality_operators
- avoid_print
- avoid_redundant_argument_values
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
- avoid_returning_null_for_void
- avoid_setters_without_getters
- avoid_shadowing_type_parameters
- avoid_single_cascade_in_expression_statements
- avoid_type_to_string
- avoid_types_as_parameter_names
- avoid_unnecessary_containers
- avoid_void_async
- avoid_web_libraries_in_flutter # we use web libraries in web-specific code, and our tests prevent us from using them elsewhere
- await_only_futures
- camel_case_extensions
- camel_case_types
- cancel_subscriptions
- cast_nullable_to_non_nullable
- close_sinks # not reliable enough
- control_flow_in_finally
- curly_braces_in_flow_control_structures
- depend_on_referenced_packages
- deprecated_consistency
- directives_ordering
- empty_catches
- empty_constructor_bodies
- empty_statements
- eol_at_end_of_file
- exhaustive_cases
- file_names
- flutter_style_todos
- hash_and_equals
- implementation_imports
- collection_methods_unrelated_type
- leading_newlines_in_multiline_strings
- library_names
- library_prefixes
- library_private_types_in_public_api
- missing_whitespace_between_adjacent_strings
- no_adjacent_strings_in_list
- no_duplicate_case_values
- no_logic_in_create_state
- non_constant_identifier_names
- noop_primitive_operations
- null_check_on_nullable_type_parameter
- null_closures
- overridden_fields
- package_api_docs
- package_names
- package_prefixed_library_names
- prefer_adjacent_string_concatenation
- prefer_asserts_in_initializer_lists
- prefer_collection_literals
- prefer_conditional_assignment
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- prefer_contains
- prefer_final_fields
- prefer_final_in_for_each
- prefer_final_locals
- prefer_for_elements_to_map_fromIterable
- prefer_foreach
- prefer_function_declarations_over_variables
- prefer_generic_function_type_aliases
- prefer_if_elements_to_conditional_expressions
- prefer_if_null_operators
- prefer_initializing_formals
- prefer_inlined_adds
- prefer_interpolation_to_compose_strings
- prefer_is_empty
- prefer_is_not_empty
- prefer_is_not_operator
- prefer_iterable_whereType
- prefer_mixin # Has false positives, see https://github.com/dart-lang/linter/issues/3018
- prefer_null_aware_method_calls # "call()" is confusing to people new to the language since it's not documented anywhere
- prefer_null_aware_operators
- prefer_single_quotes
- prefer_spread_collections
- prefer_typing_uninitialized_variables
- prefer_void_to_null
- provide_deprecation_message
- recursive_getters
- sized_box_for_whitespace
- slash_for_doc_comments
- sort_child_properties_last
- sort_constructors_first
- sort_pub_dependencies
- sort_unnamed_constructors_first
- test_types_in_equals
- throw_in_finally
- tighten_type_of_initializing_formals
- type_init_formals
- unnecessary_brace_in_string_interps
- unnecessary_const
- unnecessary_getters_setters
- unnecessary_new
- unnecessary_null_aware_assignments
- unnecessary_null_checks
- unnecessary_null_in_if_null_operators
- unnecessary_nullable_for_final_variable_declarations
- unnecessary_overrides
- unnecessary_parenthesis
- unnecessary_statements
- unnecessary_string_escapes
- unnecessary_string_interpolations
- unnecessary_this
- unrelated_type_equality_checks
- unsafe_html
- use_build_context_synchronously
- use_full_hex_values_for_flutter_colors
- use_function_type_syntax_for_parameters
- use_if_null_to_convert_nulls_to_bools
- use_is_even_rather_than_modulo
- use_key_in_widget_constructors
- use_late_for_private_fields_and_variables
- use_named_constants
- use_raw_strings
- use_rethrow_when_possible
- use_setters_to_change_properties
- use_test_throws_matchers
- valid_regexps
- void_checks

13
android/.gitignore vendored
View File

@ -1,13 +0,0 @@
gradle-wrapper.jar
/.gradle
/captures/
/gradlew
/gradlew.bat
/local.properties
GeneratedPluginRegistrant.java
# Remember to never publicly share your keystore.
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
key.properties
**/*.keystore
**/*.jks

View File

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

View File

@ -1,120 +0,0 @@
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
android {
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = '17'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
applicationId "app.revanced.manager.flutter"
minSdk 26
targetSdk 34
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
if (System.getenv("signingKey") != null) {
signingConfigs {
create("release") {
storeFile = file(System.getenv("signingKey"))
storePassword = System.getenv("keyStorePassword")
keyAlias = System.getenv("keyAlias")
keyPassword = System.getenv("keyPassword")
}
}
signingConfig = signingConfigs.release
resValue "string", "app_name", "ReVanced Manager"
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "revanced-manager-v${flutterVersionName}.apk"
}
}
} else {
signingConfig = signingConfigs.debug
resValue "string", "app_name", "ReVanced Manager Debug"
applicationIdSuffix ".debug"
}
}
debug {
shrinkResources false
minifyEnabled false
resValue "string", "app_name", "ReVanced Manager Debug"
applicationIdSuffix ".debug"
signingConfig signingConfigs.debug
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
profile {
shrinkResources false
minifyEnabled false
resValue "string", "app_name", "ReVanced Manager Profile"
applicationIdSuffix ".profile"
signingConfig signingConfigs.debug
ndk {
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
}
}
}
packagingOptions {
jniLibs {
useLegacyPackaging true
excludes += ['/prebuilt/**']
}
resources {
excludes += ['/prebuilt/**']
}
}
namespace 'app.revanced.manager.flutter'
}
kotlin {
jvmToolchain(17)
}
flutter {
source '../..'
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.22")
implementation("app.revanced:revanced-patcher:19.3.1")
implementation("app.revanced:revanced-library:2.2.1")
}

View File

@ -1,19 +0,0 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
-keep class app.revanced.** { *; }
-keep class com.android.tools.smali.** { *; }
-keep class kotlin.** { *; }
-keep class com.google.auto.value.** { *; }
-keep class com.android.apksig.internal.** { *; }
-keepnames class com.google.common.collect.**
-keepnames class org.xmlpull.** { *; }
-dontwarn com.google.auto.value.**
-dontwarn com.google.j2objc.annotations.*
-dontwarn java.awt.**
-dontwarn javax.**

View File

@ -1,3 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@ -1,80 +0,0 @@
<manifest xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
<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"
android:maxSdkVersion="32" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />
<application
android:label="@string/app_name"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher"
android:largeHeap="true"
android:requestLegacyExternalStorage="true">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ExportSettingsActivity"
android:exported="true">
</activity>
<meta-data
android:name="flutterEmbedding"
android:value="2" />
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<receiver
android:name=".utils.packageInstaller.InstallerReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="APP_INSTALL_ACTION" />
</intent-filter>
</receiver>
<receiver
android:name=".utils.packageInstaller.UninstallerReceiver"
android:enabled="true"
android:exported="false">
<intent-filter>
<action android:name="APP_UNINSTALL_ACTION" />
</intent-filter>
</receiver>
</application>
</manifest>

View File

@ -1,83 +0,0 @@
package app.revanced.manager.flutter
import android.app.Activity
import android.content.Context
import android.content.Intent
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.os.Bundle
import android.util.Base64
import org.json.JSONObject
import java.io.ByteArrayInputStream
import java.io.File
import java.security.cert.CertificateFactory
import java.security.cert.X509Certificate
import java.security.MessageDigest
class ExportSettingsActivity : Activity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val callingPackageName = getCallingPackage()!!
if (getFingerprint(callingPackageName) == getFingerprint(getPackageName())) {
// Create JSON Object
val json = JSONObject()
// Default Data
json.put("keystorePassword", "s3cur3p@ssw0rd")
// Load Shared Preferences
val sharedPreferences = getSharedPreferences("FlutterSharedPreferences", Context.MODE_PRIVATE)
val allEntries: Map<String, *> = sharedPreferences.getAll()
for ((key, value) in allEntries.entries) {
json.put(key.replace("flutter.", ""), value)
}
// Load keystore
val keystoreFile = File(getExternalFilesDir(null), "/revanced-manager.keystore")
if (keystoreFile.exists()) {
val keystoreBytes = keystoreFile.readBytes()
val keystoreBase64 = Base64.encodeToString(keystoreBytes, Base64.DEFAULT)
json.put("keystore", keystoreBase64)
}
// Load saved patches
val storedPatchesFile = File(filesDir.parentFile.absolutePath, "/app_flutter/selected-patches.json")
if (storedPatchesFile.exists()) {
val patchesBytes = storedPatchesFile.readBytes()
val patches = String(patchesBytes, Charsets.UTF_8)
json.put("patches", JSONObject(patches))
}
// Send data back
val resultIntent = Intent()
resultIntent.putExtra("data", json.toString())
setResult(Activity.RESULT_OK, resultIntent)
finish()
} else {
val resultIntent = Intent()
setResult(Activity.RESULT_CANCELED)
finish()
}
}
fun getFingerprint(packageName: String): String {
// Get the signature of the app that matches the package name
val packageInfo = packageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES)
val signature = packageInfo.signatures[0]
// Get the raw certificate data
val rawCert = signature.toByteArray()
// Generate an X509Certificate from the data
val certFactory = CertificateFactory.getInstance("X509")
val x509Cert = certFactory.generateCertificate(ByteArrayInputStream(rawCert)) as X509Certificate
// Get the SHA256 fingerprint
val fingerprint = MessageDigest.getInstance("SHA256").digest(x509Cert.encoded).joinToString("") {
"%02x".format(it)
}
return fingerprint
}
}

View File

@ -1,420 +0,0 @@
package app.revanced.manager.flutter
import android.app.PendingIntent
import android.app.SearchManager
import android.content.Intent
import android.content.pm.PackageInstaller
import android.os.Build
import android.os.Handler
import android.os.Looper
import app.revanced.library.ApkUtils
import app.revanced.library.ApkUtils.applyTo
import app.revanced.manager.flutter.utils.Aapt
import app.revanced.manager.flutter.utils.packageInstaller.InstallerReceiver
import app.revanced.manager.flutter.utils.packageInstaller.UninstallerReceiver
import app.revanced.patcher.PatchBundleLoader
import app.revanced.patcher.PatchSet
import app.revanced.patcher.Patcher
import app.revanced.patcher.PatcherConfig
import app.revanced.patcher.patch.PatchResult
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import kotlinx.coroutines.flow.FlowCollector
import kotlinx.coroutines.runBlocking
import org.json.JSONArray
import org.json.JSONObject
import java.io.File
import java.io.PrintWriter
import java.io.StringWriter
import java.util.logging.LogRecord
import java.util.logging.Logger
class MainActivity : FlutterActivity() {
private val handler = Handler(Looper.getMainLooper())
private lateinit var installerChannel: MethodChannel
private var cancel: Boolean = false
private var stopResult: MethodChannel.Result? = null
private lateinit var patches: PatchSet
override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)
val patcherChannel = "app.revanced.manager.flutter/patcher"
val installerChannel = "app.revanced.manager.flutter/installer"
val openBrowserChannel = "app.revanced.manager.flutter/browser"
MethodChannel(
flutterEngine.dartExecutor.binaryMessenger,
openBrowserChannel
).setMethodCallHandler { call, result ->
if (call.method == "openBrowser") {
val searchQuery = call.argument<String>("query")
openBrowser(searchQuery)
result.success(null)
} else {
result.notImplemented()
}
}
val mainChannel =
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, patcherChannel)
this.installerChannel =
MethodChannel(flutterEngine.dartExecutor.binaryMessenger, installerChannel)
mainChannel.setMethodCallHandler { call, result ->
when (call.method) {
"runPatcher" -> {
val inFilePath = call.argument<String>("inFilePath")
val outFilePath = call.argument<String>("outFilePath")
val integrationsPath = call.argument<String>("integrationsPath")
val selectedPatches = call.argument<List<String>>("selectedPatches")
val options = call.argument<Map<String, Map<String, Any>>>("options")
val tmpDirPath = call.argument<String>("tmpDirPath")
val keyStoreFilePath = call.argument<String>("keyStoreFilePath")
val keystorePassword = call.argument<String>("keystorePassword")
if (
inFilePath != null &&
outFilePath != null &&
integrationsPath != null &&
selectedPatches != null &&
options != null &&
tmpDirPath != null &&
keyStoreFilePath != null &&
keystorePassword != null
) {
cancel = false
runPatcher(
result,
inFilePath,
outFilePath,
integrationsPath,
selectedPatches,
options,
tmpDirPath,
keyStoreFilePath,
keystorePassword
)
} else result.notImplemented()
}
"stopPatcher" -> {
cancel = true
stopResult = result
}
"getPatches" -> {
val patchBundleFilePath = call.argument<String>("patchBundleFilePath")!!
val cacheDirPath = call.argument<String>("cacheDirPath")!!
try {
val patchBundleFile = File(patchBundleFilePath)
patchBundleFile.setWritable(false)
patches = PatchBundleLoader.Dex(
patchBundleFile,
optimizedDexDirectory = File(cacheDirPath)
)
} catch (ex: Exception) {
return@setMethodCallHandler result.notImplemented()
} catch (err: Error) {
return@setMethodCallHandler result.notImplemented()
}
JSONArray().apply {
patches.forEach {
JSONObject().apply {
put("name", it.name)
put("description", it.description)
put("excluded", !it.use)
put("compatiblePackages", JSONArray().apply {
it.compatiblePackages?.forEach { compatiblePackage ->
val compatiblePackageJson = JSONObject().apply {
put("name", compatiblePackage.name)
put(
"versions",
JSONArray().apply {
compatiblePackage.versions?.forEach { version ->
put(version)
}
})
}
put(compatiblePackageJson)
}
})
put("options", JSONArray().apply {
it.options.values.forEach { option ->
JSONObject().apply {
put("key", option.key)
put("title", option.title)
put("description", option.description)
put("required", option.required)
fun JSONObject.putValue(
value: Any?,
key: String = "value"
) = if (value is Array<*>) put(
key,
JSONArray().apply {
value.forEach { put(it) }
})
else put(key, value)
putValue(option.default)
option.values?.let { values ->
put("values",
JSONObject().apply {
values.forEach { (key, value) ->
putValue(value, key)
}
})
} ?: put("values", null)
put("valueType", option.valueType)
}.let(::put)
}
})
}.let(::put)
}
}.toString().let(result::success)
}
"installApk" -> {
val apkPath = call.argument<String>("apkPath")!!
PackageInstallerManager.result = result
installApk(apkPath)
}
"uninstallApp" -> {
val packageName = call.argument<String>("packageName")!!
uninstallApp(packageName)
PackageInstallerManager.result = result
}
else -> result.notImplemented()
}
}
}
private fun openBrowser(query: String?) {
val intent = Intent(Intent.ACTION_WEB_SEARCH).apply {
putExtra(SearchManager.QUERY, query)
}
if (intent.resolveActivity(packageManager) != null) {
startActivity(intent)
}
}
private fun runPatcher(
result: MethodChannel.Result,
inFilePath: String,
outFilePath: String,
integrationsPath: String,
selectedPatches: List<String>,
options: Map<String, Map<String, Any>>,
tmpDirPath: String,
keyStoreFilePath: String,
keystorePassword: String
) {
val inFile = File(inFilePath)
val outFile = File(outFilePath)
val integrations = File(integrationsPath)
val keyStoreFile = File(keyStoreFilePath)
val tmpDir = File(tmpDirPath)
Thread {
fun updateProgress(progress: Double, header: String, log: String) {
handler.post {
installerChannel.invokeMethod(
"update",
mapOf(
"progress" to progress,
"header" to header,
"log" to log
)
)
}
}
fun postStop() = handler.post { stopResult!!.success(null) }
fun cancel(block: () -> Unit = {}): Boolean {
if (cancel) {
block()
postStop()
}
return cancel
}
// Setup logger
Logger.getLogger("").apply {
handlers.forEach {
it.close()
removeHandler(it)
}
object : java.util.logging.Handler() {
override fun publish(record: LogRecord) {
if (record.loggerName?.startsWith("app.revanced") != true || cancel) return
updateProgress(-1.0, "", record.message)
}
override fun flush() = Unit
override fun close() = flush()
}.let(::addHandler)
}
try {
updateProgress(0.0, "Reading APK...", "Reading APK")
val patcher = Patcher(
PatcherConfig(
inFile,
tmpDir,
Aapt.binary(applicationContext).absolutePath,
tmpDir.path,
true // TODO: Add option to disable this
)
)
if (cancel(patcher::close)) return@Thread
updateProgress(0.02, "Loading patches...", "Loading patches")
val patches = patches.filter { patch ->
val isCompatible = patch.compatiblePackages?.any {
it.name == patcher.context.packageMetadata.packageName
} ?: false
val compatibleOrUniversal =
isCompatible || patch.compatiblePackages.isNullOrEmpty()
compatibleOrUniversal && selectedPatches.any { it == patch.name }
}.onEach { patch ->
options[patch.name]?.forEach { (key, value) ->
patch.options[key] = value
}
}.toSet()
if (cancel(patcher::close)) return@Thread
updateProgress(0.05, "Executing...", "")
val patcherResult = patcher.use {
patcher.apply {
acceptIntegrations(setOf(integrations))
acceptPatches(patches)
}
runBlocking {
// Update the progress bar every time a patch is executed from 0.15 to 0.7
val totalPatchesCount = patches.size
val progressStep = 0.55 / totalPatchesCount
var progress = 0.05
patcher.apply(false).collect(FlowCollector { patchResult: PatchResult ->
if (cancel(patcher::close)) return@FlowCollector
val msg = patchResult.exception?.let {
val writer = StringWriter()
it.printStackTrace(PrintWriter(writer))
"${patchResult.patch.name} failed: $writer"
} ?: run {
"${patchResult.patch.name} succeeded"
}
updateProgress(progress, "", msg)
progress += progressStep
})
}
if (cancel(patcher::close)) return@Thread
updateProgress(0.75, "Building...", "")
patcher.get()
}
if (cancel(patcher::close)) return@Thread
patcherResult.applyTo(inFile)
if (cancel(patcher::close)) return@Thread
ApkUtils.sign(
inFile,
outFile,
ApkUtils.SigningOptions(
keyStoreFile,
keystorePassword,
"alias",
keystorePassword
)
)
updateProgress(.85, "Patched", "Patched APK")
} catch (ex: Throwable) {
if (!cancel) {
val stack = ex.stackTraceToString()
updateProgress(
-100.0,
"Failed",
"An error occurred:\n$stack"
)
}
}
handler.post { result.success(null) }
}.start()
}
private fun installApk(apkPath: String) {
val packageInstaller: PackageInstaller = applicationContext.packageManager.packageInstaller
val sessionParams =
PackageInstaller.SessionParams(PackageInstaller.SessionParams.MODE_FULL_INSTALL)
val sessionId: Int = packageInstaller.createSession(sessionParams)
val session: PackageInstaller.Session = packageInstaller.openSession(sessionId)
session.use { activeSession ->
val sessionOutputStream = activeSession.openWrite(applicationContext.packageName, 0, -1)
sessionOutputStream.use { outputStream ->
val apkFile = File(apkPath)
apkFile.inputStream().use { inputStream ->
inputStream.copyTo(outputStream)
}
}
}
val receiverIntent = Intent(applicationContext, InstallerReceiver::class.java).apply {
action = "APP_INSTALL_ACTION"
}
val receiverPendingIntent = PendingIntent.getBroadcast(
context,
sessionId,
receiverIntent,
PackageInstallerManager.flags
)
session.commit(receiverPendingIntent.intentSender)
session.close()
}
private fun uninstallApp(packageName: String) {
val packageInstaller: PackageInstaller = applicationContext.packageManager.packageInstaller
val receiverIntent = Intent(applicationContext, UninstallerReceiver::class.java).apply {
action = "APP_UNINSTALL_ACTION"
}
val receiverPendingIntent =
PendingIntent.getBroadcast(context, 0, receiverIntent, PackageInstallerManager.flags)
packageInstaller.uninstall(packageName, receiverPendingIntent.intentSender)
}
object PackageInstallerManager {
var result: MethodChannel.Result? = null
val flags = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
PendingIntent.FLAG_MUTABLE or PendingIntent.FLAG_UPDATE_CURRENT
} else {
PendingIntent.FLAG_UPDATE_CURRENT
}
}
}

View File

@ -1,12 +0,0 @@
package app.revanced.manager.flutter.utils
import android.content.Context
import java.io.File
object Aapt {
fun binary(context: Context): File {
return File(context.applicationInfo.nativeLibraryDir).resolveAapt()
}
}
private fun File.resolveAapt() = resolve(list { _, f -> !File(f).isDirectory && f.contains("aapt") }!!.first())

View File

@ -1,32 +0,0 @@
package app.revanced.manager.flutter.utils.packageInstaller
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.pm.PackageInstaller
import app.revanced.manager.flutter.MainActivity
class InstallerReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
when (val status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, -1)) {
PackageInstaller.STATUS_PENDING_USER_ACTION -> {
val confirmationIntent = intent.getParcelableExtra<Intent>(Intent.EXTRA_INTENT)
if (confirmationIntent != null) {
context.startActivity(confirmationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
}
}
else -> {
val packageName = intent.getStringExtra(PackageInstaller.EXTRA_PACKAGE_NAME)
val message = intent.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE)
val otherPackageName = intent.getStringExtra(PackageInstaller.EXTRA_OTHER_PACKAGE_NAME)
MainActivity.PackageInstallerManager.result!!.success(mapOf(
"status" to status,
"packageName" to packageName,
"message" to message,
"otherPackageName" to otherPackageName
))
}
}
}
}

View File

@ -1,24 +0,0 @@
package app.revanced.manager.flutter.utils.packageInstaller
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.content.pm.PackageInstaller
import app.revanced.manager.flutter.MainActivity
class UninstallerReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
when (val status = intent.getIntExtra(PackageInstaller.EXTRA_STATUS, -1)) {
PackageInstaller.STATUS_PENDING_USER_ACTION -> {
val confirmationIntent = intent.getParcelableExtra<Intent>(Intent.EXTRA_INTENT)
if (confirmationIntent != null) {
context.startActivity(confirmationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
}
}
else -> {
MainActivity.PackageInstallerManager.result!!.success(status)
}
}
}
}

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?android:colorBackground" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Modify this file to customize your launch splash screen -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/white" />
<!-- You can insert your own image assets here -->
<!-- <item>
<bitmap
android:gravity="center"
android:src="@mipmap/launch_image" />
</item> -->
</layer-list>

View File

@ -1,19 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_launcher_round</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_launcher_round</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

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

View File

@ -1,18 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">?android:colorBackground</item>
</style>
</resources>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<cache-path name="cache" path="." />
</paths>

View File

@ -1,3 +0,0 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

View File

@ -1,27 +0,0 @@
allprojects {
repositories {
google()
mavenCentral()
maven {
// A repository must be speficied for some reason. "registry" is a dummy.
url = uri("https://maven.pkg.github.com/revanced/registry")
credentials {
username = project.findProperty("gpr.user") as String ?: System.getenv("GITHUB_ACTOR")
password = project.findProperty("gpr.key") as String ?: System.getenv("GITHUB_TOKEN")
}
}
mavenLocal()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
tasks.register("clean", Delete) {
delete rootProject.buildDir
}

View File

@ -1,8 +0,0 @@
org.gradle.jvmargs=-Xmx1536M -XX:+UseParallelGC
org.gradle.parallel=true
org.gradle.daemon=true
org.gradle.caching=true
android.useAndroidX=true
android.defaults.buildfeatures.buildconfig=true
android.nonTransitiveRClass=false
android.nonFinalResIds=false

View File

@ -1,25 +0,0 @@
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.1.2" apply false
id "org.jetbrains.kotlin.android" version "1.9.10" apply false
}
include ":app"

182
api/api/api.api Normal file
View File

@ -0,0 +1,182 @@
public abstract interface class app/revanced/manager/plugin/downloader/BaseDownloadScope : app/revanced/manager/plugin/downloader/Scope {
}
public final class app/revanced/manager/plugin/downloader/ConstantsKt {
public static final field PLUGIN_HOST_PERMISSION Ljava/lang/String;
}
public final class app/revanced/manager/plugin/downloader/DownloadUrl : android/os/Parcelable {
public static final field $stable I
public static final field CREATOR Landroid/os/Parcelable$Creator;
public fun <init> (Ljava/lang/String;Ljava/util/Map;)V
public synthetic fun <init> (Ljava/lang/String;Ljava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/util/Map;
public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lapp/revanced/manager/plugin/downloader/DownloadUrl;
public static synthetic fun copy$default (Lapp/revanced/manager/plugin/downloader/DownloadUrl;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lapp/revanced/manager/plugin/downloader/DownloadUrl;
public final fun describeContents ()I
public fun equals (Ljava/lang/Object;)Z
public final fun getHeaders ()Ljava/util/Map;
public final fun getUrl ()Ljava/lang/String;
public fun hashCode ()I
public final fun toDownloadResult ()Lkotlin/Pair;
public fun toString ()Ljava/lang/String;
public final fun writeToParcel (Landroid/os/Parcel;I)V
}
public final class app/revanced/manager/plugin/downloader/DownloadUrl$Creator : android/os/Parcelable$Creator {
public fun <init> ()V
public final fun createFromParcel (Landroid/os/Parcel;)Lapp/revanced/manager/plugin/downloader/DownloadUrl;
public synthetic fun createFromParcel (Landroid/os/Parcel;)Ljava/lang/Object;
public final fun newArray (I)[Lapp/revanced/manager/plugin/downloader/DownloadUrl;
public synthetic fun newArray (I)[Ljava/lang/Object;
}
public final class app/revanced/manager/plugin/downloader/Downloader {
public static final field $stable I
}
public final class app/revanced/manager/plugin/downloader/DownloaderBuilder {
public static final field $stable I
}
public final class app/revanced/manager/plugin/downloader/DownloaderKt {
public static final fun Downloader (Lkotlin/jvm/functions/Function1;)Lapp/revanced/manager/plugin/downloader/DownloaderBuilder;
}
public final class app/revanced/manager/plugin/downloader/DownloaderScope : app/revanced/manager/plugin/downloader/Scope {
public static final field $stable I
public final fun download (Lkotlin/jvm/functions/Function3;)V
public final fun get (Lkotlin/jvm/functions/Function4;)V
public fun getHostPackageName ()Ljava/lang/String;
public fun getPluginPackageName ()Ljava/lang/String;
public final fun useService (Landroid/content/Intent;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class app/revanced/manager/plugin/downloader/ExtensionsKt {
public static final fun download (Lapp/revanced/manager/plugin/downloader/DownloaderScope;Lkotlin/jvm/functions/Function4;)V
}
public abstract interface class app/revanced/manager/plugin/downloader/GetScope : app/revanced/manager/plugin/downloader/Scope {
public abstract fun requestStartActivity (Landroid/content/Intent;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public abstract interface class app/revanced/manager/plugin/downloader/InputDownloadScope : app/revanced/manager/plugin/downloader/BaseDownloadScope {
}
public abstract interface class app/revanced/manager/plugin/downloader/OutputDownloadScope : app/revanced/manager/plugin/downloader/BaseDownloadScope {
public abstract fun reportSize (JLkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class app/revanced/manager/plugin/downloader/Package : android/os/Parcelable {
public static final field $stable I
public static final field CREATOR Landroid/os/Parcelable$Creator;
public fun <init> (Ljava/lang/String;Ljava/lang/String;)V
public final fun component1 ()Ljava/lang/String;
public final fun component2 ()Ljava/lang/String;
public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lapp/revanced/manager/plugin/downloader/Package;
public static synthetic fun copy$default (Lapp/revanced/manager/plugin/downloader/Package;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lapp/revanced/manager/plugin/downloader/Package;
public final fun describeContents ()I
public fun equals (Ljava/lang/Object;)Z
public final fun getName ()Ljava/lang/String;
public final fun getVersion ()Ljava/lang/String;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
public final fun writeToParcel (Landroid/os/Parcel;I)V
}
public final class app/revanced/manager/plugin/downloader/Package$Creator : android/os/Parcelable$Creator {
public fun <init> ()V
public final fun createFromParcel (Landroid/os/Parcel;)Lapp/revanced/manager/plugin/downloader/Package;
public synthetic fun createFromParcel (Landroid/os/Parcel;)Ljava/lang/Object;
public final fun newArray (I)[Lapp/revanced/manager/plugin/downloader/Package;
public synthetic fun newArray (I)[Ljava/lang/Object;
}
public abstract interface annotation class app/revanced/manager/plugin/downloader/PluginHostApi : java/lang/annotation/Annotation {
}
public abstract interface class app/revanced/manager/plugin/downloader/Scope {
public abstract fun getHostPackageName ()Ljava/lang/String;
public abstract fun getPluginPackageName ()Ljava/lang/String;
}
public abstract class app/revanced/manager/plugin/downloader/UserInteractionException : java/lang/Exception {
public static final field $stable I
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
}
public abstract class app/revanced/manager/plugin/downloader/UserInteractionException$Activity : app/revanced/manager/plugin/downloader/UserInteractionException {
public static final field $stable I
public synthetic fun <init> (Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
}
public final class app/revanced/manager/plugin/downloader/UserInteractionException$Activity$Cancelled : app/revanced/manager/plugin/downloader/UserInteractionException$Activity {
public static final field $stable I
}
public final class app/revanced/manager/plugin/downloader/UserInteractionException$Activity$NotCompleted : app/revanced/manager/plugin/downloader/UserInteractionException$Activity {
public static final field $stable I
public final fun getIntent ()Landroid/content/Intent;
public final fun getResultCode ()I
}
public final class app/revanced/manager/plugin/downloader/UserInteractionException$RequestDenied : app/revanced/manager/plugin/downloader/UserInteractionException {
public static final field $stable I
}
public final class app/revanced/manager/plugin/downloader/webview/APIKt {
public static final fun WebViewDownloader (Lkotlin/jvm/functions/Function4;)Lapp/revanced/manager/plugin/downloader/DownloaderBuilder;
public static final fun runWebView (Lapp/revanced/manager/plugin/downloader/GetScope;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public class app/revanced/manager/plugin/downloader/webview/IWebView$Default : app/revanced/manager/plugin/downloader/webview/IWebView {
public fun <init> ()V
public fun asBinder ()Landroid/os/IBinder;
public fun finish ()V
public fun load (Ljava/lang/String;)V
}
public abstract class app/revanced/manager/plugin/downloader/webview/IWebView$Stub : android/os/Binder, app/revanced/manager/plugin/downloader/webview/IWebView {
public fun <init> ()V
public fun asBinder ()Landroid/os/IBinder;
public static fun asInterface (Landroid/os/IBinder;)Lapp/revanced/manager/plugin/downloader/webview/IWebView;
public fun onTransact (ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
}
public class app/revanced/manager/plugin/downloader/webview/IWebViewEvents$Default : app/revanced/manager/plugin/downloader/webview/IWebViewEvents {
public fun <init> ()V
public fun asBinder ()Landroid/os/IBinder;
public fun download (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
public fun pageLoad (Ljava/lang/String;)V
public fun ready (Lapp/revanced/manager/plugin/downloader/webview/IWebView;)V
}
public abstract class app/revanced/manager/plugin/downloader/webview/IWebViewEvents$Stub : android/os/Binder, app/revanced/manager/plugin/downloader/webview/IWebViewEvents {
public fun <init> ()V
public fun asBinder ()Landroid/os/IBinder;
public static fun asInterface (Landroid/os/IBinder;)Lapp/revanced/manager/plugin/downloader/webview/IWebViewEvents;
public fun onTransact (ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
}
public final class app/revanced/manager/plugin/downloader/webview/WebViewActivity$Parameters$Creator : android/os/Parcelable$Creator {
public fun <init> ()V
public final fun createFromParcel (Landroid/os/Parcel;)Lapp/revanced/manager/plugin/downloader/webview/WebViewActivity$Parameters;
public synthetic fun createFromParcel (Landroid/os/Parcel;)Ljava/lang/Object;
public final fun newArray (I)[Lapp/revanced/manager/plugin/downloader/webview/WebViewActivity$Parameters;
public synthetic fun newArray (I)[Ljava/lang/Object;
}
public abstract interface class app/revanced/manager/plugin/downloader/webview/WebViewCallbackScope : app/revanced/manager/plugin/downloader/Scope {
public abstract fun finish (Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
public abstract fun load (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
}
public final class app/revanced/manager/plugin/downloader/webview/WebViewScope : app/revanced/manager/plugin/downloader/Scope {
public static final field $stable I
public final fun download (Lkotlin/jvm/functions/Function5;)V
public fun getHostPackageName ()Ljava/lang/String;
public fun getPluginPackageName ()Ljava/lang/String;
public final fun pageLoad (Lkotlin/jvm/functions/Function3;)V
}

150
api/build.gradle.kts Normal file
View File

@ -0,0 +1,150 @@
import java.io.IOException
plugins {
alias(libs.plugins.android.library)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.binary.compatibility.validator)
`maven-publish`
signing
}
group = "app.revanced"
dependencies {
implementation(libs.androidx.ktx)
implementation(libs.runtime.ktx)
implementation(libs.activity.compose)
implementation(libs.appcompat)
}
fun String.runCommand(): String {
val process = ProcessBuilder(split("\\s".toRegex()))
.redirectErrorStream(true)
.directory(rootDir)
.start()
val output = StringBuilder()
val reader = process.inputStream.bufferedReader()
val thread = Thread {
reader.forEachLine {
output.appendLine(it)
}
}
thread.start()
if (!process.waitFor(10, TimeUnit.SECONDS)) {
process.destroy()
throw IOException("Command timed out: $this")
}
thread.join()
return output.toString().trim()
}
val projectPath: String = projectDir.relativeTo(rootDir).path
val lastTag = "git describe --tags --abbrev=0".runCommand()
val hasChangesInThisModule = "git diff --name-only $lastTag..HEAD".runCommand().lineSequence().any {
it.startsWith(projectPath)
}
tasks.matching { it.name.startsWith("publish") }.configureEach {
onlyIf {
hasChangesInThisModule
}
}
android {
namespace = "app.revanced.manager.plugin.downloader"
compileSdk = 35
defaultConfig {
minSdk = 26
consumerProguardFiles("consumer-rules.pro")
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
aidl = true
}
}
apiValidation {
nonPublicMarkers += "app.revanced.manager.plugin.downloader.PluginHostApi"
}
publishing {
repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/revanced/revanced-manager")
credentials {
username = System.getenv("GITHUB_ACTOR") ?: extra["gpr.user"] as String?
password = System.getenv("GITHUB_TOKEN") ?: extra["gpr.key"] as String?
}
}
}
publications {
create<MavenPublication>("Api") {
afterEvaluate {
from(components["release"])
}
groupId = "app.revanced"
artifactId = "revanced-manager-api"
version = project.version.toString()
pom {
name = "ReVanced Manager API"
description = "API for ReVanced Manager."
url = "https://revanced.app"
licenses {
license {
name = "GNU General Public License v3.0"
url = "https://www.gnu.org/licenses/gpl-3.0.en.html"
}
}
developers {
developer {
id = "ReVanced"
name = "ReVanced"
email = "contact@revanced.app"
}
}
scm {
connection = "scm:git:git://github.com/revanced/revanced-manager.git"
developerConnection = "scm:git:git@github.com:revanced/revanced-manager.git"
url = "https://github.com/revanced/revanced-manager"
}
}
}
}
}
signing {
useGpgCmd()
sign(publishing.publications["Api"])
}

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
</manifest>

View File

@ -0,0 +1,8 @@
// IWebView.aidl
package app.revanced.manager.plugin.downloader.webview;
@JavaPassthrough(annotation="@app.revanced.manager.plugin.downloader.PluginHostApi")
oneway interface IWebView {
void load(String url);
void finish();
}

View File

@ -0,0 +1,11 @@
// IWebViewEvents.aidl
package app.revanced.manager.plugin.downloader.webview;
import app.revanced.manager.plugin.downloader.webview.IWebView;
@JavaPassthrough(annotation="@app.revanced.manager.plugin.downloader.PluginHostApi")
oneway interface IWebViewEvents {
void ready(IWebView iface);
void pageLoad(String url);
void download(String url, String mimetype, String userAgent);
}

View File

@ -0,0 +1,7 @@
package app.revanced.manager.plugin.downloader
/**
* The permission ID of the special plugin host permission. Only ReVanced Manager will have this permission.
* Plugin UI activities and internal services can be protected using this permission.
*/
const val PLUGIN_HOST_PERMISSION = "app.revanced.manager.permission.PLUGIN_HOST"

View File

@ -0,0 +1,165 @@
package app.revanced.manager.plugin.downloader
import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.ServiceConnection
import android.os.IBinder
import android.app.Activity
import android.os.Parcelable
import kotlinx.coroutines.withTimeout
import java.io.InputStream
import java.io.OutputStream
import kotlin.coroutines.resume
import kotlin.coroutines.suspendCoroutine
@RequiresOptIn(
level = RequiresOptIn.Level.ERROR,
message = "This API is only intended for plugin hosts, don't use it in a plugin.",
)
@Retention(AnnotationRetention.BINARY)
annotation class PluginHostApi
/**
* The base interface for all DSL scopes.
*/
interface Scope {
/**
* The package name of ReVanced Manager.
*/
val hostPackageName: String
/**
* The package name of the plugin.
*/
val pluginPackageName: String
}
/**
* The scope of [DownloaderScope.get].
*/
interface GetScope : Scope {
/**
* Ask the user to perform some required interaction in the activity specified by the provided [Intent].
* This function returns normally with the resulting [Intent] when the activity finishes with code [Activity.RESULT_OK].
*
* @throws UserInteractionException.RequestDenied User decided to skip this plugin.
* @throws UserInteractionException.Activity.Cancelled The activity was cancelled.
* @throws UserInteractionException.Activity.NotCompleted The activity finished with an unknown result code.
*/
suspend fun requestStartActivity(intent: Intent): Intent?
}
interface BaseDownloadScope : Scope
/**
* The scope for [DownloaderScope.download].
*/
interface InputDownloadScope : BaseDownloadScope
typealias Size = Long
typealias DownloadResult = Pair<InputStream, Size?>
typealias Version = String
typealias GetResult<T> = Pair<T, Version?>
class DownloaderScope<T : Parcelable> internal constructor(
private val scopeImpl: Scope,
internal val context: Context
) : Scope by scopeImpl {
// Returning an InputStream is the primary way for plugins to implement the download function, but we also want to offer an OutputStream API since using InputStream might not be convenient in all cases.
// It is much easier to implement the main InputStream API on top of OutputStreams compared to doing it the other way around, which is why we are using OutputStream here. This detail is not visible to plugins.
internal var download: (suspend OutputDownloadScope.(T, OutputStream) -> Unit)? = null
internal var get: (suspend GetScope.(String, String?) -> GetResult<T>?)? = null
private val inputDownloadScopeImpl = object : InputDownloadScope, Scope by scopeImpl {}
/**
* Define the download block of the plugin.
*/
fun download(block: suspend InputDownloadScope.(data: T) -> DownloadResult) {
download = { app, outputStream ->
val (inputStream, size) = inputDownloadScopeImpl.block(app)
inputStream.use {
if (size != null) reportSize(size)
it.copyTo(outputStream)
}
}
}
/**
* Define the get block of the plugin.
* The block should return null if the app cannot be found. The version in the result must match the version argument unless it is null.
*/
fun get(block: suspend GetScope.(packageName: String, version: String?) -> GetResult<T>?) {
get = block
}
/**
* Utilize the service specified by the provided [Intent]. The service will be unbound when the scope ends.
*/
suspend fun <R : Any?> useService(intent: Intent, block: suspend (IBinder) -> R): R {
var onBind: ((IBinder) -> Unit)? = null
val serviceConn = object : ServiceConnection {
override fun onServiceConnected(name: ComponentName?, service: IBinder?) =
onBind!!(service!!)
override fun onServiceDisconnected(name: ComponentName?) {}
}
return try {
val binder = withTimeout(10000L) {
suspendCoroutine { continuation ->
onBind = continuation::resume
context.bindService(intent, serviceConn, Context.BIND_AUTO_CREATE)
}
}
block(binder)
} finally {
onBind = null
context.unbindService(serviceConn)
}
}
}
class DownloaderBuilder<T : Parcelable> internal constructor(private val block: DownloaderScope<T>.() -> Unit) {
@PluginHostApi
fun build(scopeImpl: Scope, context: Context) =
with(DownloaderScope<T>(scopeImpl, context)) {
block()
Downloader(
download = download!!,
get = get!!
)
}
}
class Downloader<T : Parcelable> internal constructor(
@property:PluginHostApi val get: suspend GetScope.(packageName: String, version: String?) -> GetResult<T>?,
@property:PluginHostApi val download: suspend OutputDownloadScope.(data: T, outputStream: OutputStream) -> Unit
)
/**
* Define a downloader plugin.
*/
fun <T : Parcelable> Downloader(block: DownloaderScope<T>.() -> Unit) = DownloaderBuilder(block)
/**
* @see GetScope.requestStartActivity
*/
sealed class UserInteractionException(message: String) : Exception(message) {
class RequestDenied @PluginHostApi constructor() :
UserInteractionException("Request denied by user")
sealed class Activity(message: String) : UserInteractionException(message) {
class Cancelled @PluginHostApi constructor() : Activity("Interaction cancelled")
/**
* @param resultCode The result code of the activity.
* @param intent The [Intent] of the activity.
*/
class NotCompleted @PluginHostApi constructor(val resultCode: Int, val intent: Intent?) :
Activity("Unexpected activity result code: $resultCode")
}
}

View File

@ -0,0 +1,42 @@
package app.revanced.manager.plugin.downloader
import android.app.Activity
import android.app.Service
import android.content.Intent
import android.os.IBinder
import android.os.Parcelable
import java.io.OutputStream
/**
* The scope of the [OutputStream] version of [DownloaderScope.download].
*/
interface OutputDownloadScope : BaseDownloadScope {
suspend fun reportSize(size: Long)
}
/**
* A replacement for [DownloaderScope.download] that uses [OutputStream].
* The provided [OutputStream] does not need to be closed manually.
*/
fun <T : Parcelable> DownloaderScope<T>.download(block: suspend OutputDownloadScope.(T, OutputStream) -> Unit) {
download = block
}
/**
* Performs [GetScope.requestStartActivity] with an [Intent] created using the type information of [ACTIVITY].
* @see [GetScope.requestStartActivity]
*/
suspend inline fun <reified ACTIVITY : Activity> GetScope.requestStartActivity() =
requestStartActivity(
Intent().apply { setClassName(pluginPackageName, ACTIVITY::class.qualifiedName!!) }
)
/**
* Performs [DownloaderScope.useService] with an [Intent] created using the type information of [SERVICE].
* @see [DownloaderScope.useService]
*/
suspend inline fun <reified SERVICE : Service, R : Any?> DownloaderScope<*>.useService(
noinline block: suspend (IBinder) -> R
) = useService(
Intent().apply { setClassName(pluginPackageName, SERVICE::class.qualifiedName!!) }, block
)

View File

@ -0,0 +1,39 @@
package app.revanced.manager.plugin.downloader
import android.os.Parcelable
import kotlinx.parcelize.Parcelize
import java.net.HttpURLConnection
import java.net.URI
/**
* A simple parcelable data class for storing a package name and version.
* This can be used as the data type for plugins that only need a name and version to implement their [DownloaderScope.download] function.
*
* @param name The package name.
* @param version The version.
*/
@Parcelize
data class Package(val name: String, val version: String) : Parcelable
/**
* A data class for storing a download URL.
*
* @param url The download URL.
* @param headers The headers to use for the request.
*/
@Parcelize
data class DownloadUrl(val url: String, val headers: Map<String, String> = emptyMap()) : Parcelable {
/**
* Converts this into a [DownloadResult].
*/
fun toDownloadResult(): DownloadResult = with(URI.create(url).toURL().openConnection() as HttpURLConnection) {
useCaches = false
allowUserInteraction = false
headers.forEach(::setRequestProperty)
connectTimeout = 10_000
connect()
inputStream to getHeaderField("Content-Length").toLong()
}
}

View File

@ -0,0 +1,176 @@
package app.revanced.manager.plugin.downloader.webview
import android.content.Intent
import app.revanced.manager.plugin.downloader.DownloadUrl
import app.revanced.manager.plugin.downloader.DownloaderScope
import app.revanced.manager.plugin.downloader.GetScope
import app.revanced.manager.plugin.downloader.Scope
import app.revanced.manager.plugin.downloader.Downloader
import app.revanced.manager.plugin.downloader.PluginHostApi
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.cancelChildren
import kotlinx.coroutines.launch
import kotlinx.coroutines.supervisorScope
import kotlinx.coroutines.withContext
import kotlin.properties.Delegates
typealias InitialUrl = String
typealias PageLoadCallback<T> = suspend WebViewCallbackScope<T>.(url: String) -> Unit
typealias DownloadCallback<T> = suspend WebViewCallbackScope<T>.(url: String, mimeType: String, userAgent: String) -> Unit
interface WebViewCallbackScope<T> : Scope {
/**
* Finishes the activity and returns the [result].
*/
suspend fun finish(result: T)
/**
* Tells the WebView to load the specified [url].
*/
suspend fun load(url: String)
}
@OptIn(PluginHostApi::class)
class WebViewScope<T> internal constructor(
coroutineScope: CoroutineScope,
private val scopeImpl: Scope,
setResult: (T) -> Unit
) : Scope by scopeImpl {
private var onPageLoadCallback: PageLoadCallback<T> = {}
private var onDownloadCallback: DownloadCallback<T> = { _, _, _ -> }
@OptIn(ExperimentalCoroutinesApi::class)
private val dispatcher = Dispatchers.Default.limitedParallelism(1)
private lateinit var webView: IWebView
internal lateinit var initialUrl: String
internal val binder = object : IWebViewEvents.Stub() {
override fun ready(iface: IWebView?) {
coroutineScope.launch(dispatcher) {
webView = iface!!.also {
it.load(initialUrl)
}
}
}
override fun pageLoad(url: String?) {
coroutineScope.launch(dispatcher) { onPageLoadCallback(callbackScope, url!!) }
}
override fun download(url: String?, mimetype: String?, userAgent: String?) {
coroutineScope.launch(dispatcher) {
onDownloadCallback(
callbackScope,
url!!,
mimetype!!,
userAgent!!
)
}
}
}
private val callbackScope = object : WebViewCallbackScope<T>, Scope by scopeImpl {
override suspend fun finish(result: T) {
setResult(result)
// Tell the WebViewActivity to finish
webView.let { withContext(Dispatchers.IO) { it.finish() } }
}
override suspend fun load(url: String) {
webView.let { withContext(Dispatchers.IO) { it.load(url) } }
}
}
/**
* Called when the WebView attempts to download a file to disk.
*/
fun download(block: DownloadCallback<T>) {
onDownloadCallback = block
}
/**
* Called when the WebView finishes loading a page.
*/
fun pageLoad(block: PageLoadCallback<T>) {
onPageLoadCallback = block
}
}
@JvmInline
private value class Container<U>(val value: U)
/**
* Run a [android.webkit.WebView] Activity controlled by the provided code block.
* The activity will keep running until it is cancelled or an event handler calls [WebViewCallbackScope.finish].
* The [block] defines the event handlers and returns the initial URL.
*
* @param title The string displayed in the action bar.
* @param block The control block.
*/
@OptIn(PluginHostApi::class)
suspend fun <T> GetScope.runWebView(
title: String,
block: suspend WebViewScope<T>.() -> InitialUrl
) = supervisorScope {
var result by Delegates.notNull<Container<T>>()
val scope = WebViewScope<T>(this@supervisorScope, this@runWebView) { result = Container(it) }
scope.initialUrl = scope.block()
// Start the webview activity and wait until it finishes.
requestStartActivity(Intent().apply {
putExtra(
WebViewActivity.KEY,
WebViewActivity.Parameters(title, scope.binder)
)
setClassName(
hostPackageName,
WebViewActivity::class.qualifiedName!!
)
})
// Return the result and cancel any leftover coroutines.
coroutineContext.cancelChildren()
result.value
}
/**
* Implement a downloader using [runWebView] and [DownloadUrl]. This function will automatically define a handler for download events unlike [runWebView].
* Returning null inside the [block] is equivalent to returning null inside [DownloaderScope.get].
*
* @see runWebView
*/
fun WebViewDownloader(block: suspend WebViewScope<DownloadUrl>.(packageName: String, version: String?) -> InitialUrl?) =
Downloader<DownloadUrl> {
val label = context.applicationInfo.loadLabel(
context.packageManager
).toString()
get { packageName, version ->
class ReturnNull : Exception()
try {
runWebView(label) {
download { url, _, userAgent ->
finish(
DownloadUrl(
url,
mapOf("User-Agent" to userAgent)
)
)
}
block(this@runWebView, packageName, version) ?: throw ReturnNull()
} to version
} catch (_: ReturnNull) {
null
}
}
download {
it.toDownloadResult()
}
}

View File

@ -0,0 +1,161 @@
package app.revanced.manager.plugin.downloader.webview
import android.annotation.SuppressLint
import android.os.Bundle
import android.os.IBinder
import android.os.Parcelable
import android.view.MenuItem
import android.webkit.CookieManager
import android.webkit.WebSettings
import android.webkit.WebView
import android.webkit.WebViewClient
import androidx.activity.ComponentActivity
import androidx.activity.addCallback
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.ViewModel
import androidx.lifecycle.lifecycleScope
import androidx.lifecycle.repeatOnLifecycle
import androidx.lifecycle.viewModelScope
import app.revanced.manager.plugin.downloader.PluginHostApi
import app.revanced.manager.plugin.downloader.R
import kotlinx.coroutines.channels.Channel
import kotlinx.coroutines.flow.receiveAsFlow
import kotlinx.coroutines.launch
import kotlinx.parcelize.Parcelize
@OptIn(PluginHostApi::class)
@PluginHostApi
class WebViewActivity : ComponentActivity() {
@SuppressLint("SetJavaScriptEnabled")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val vm by viewModels<WebViewModel>()
enableEdgeToEdge()
setContentView(R.layout.activity_webview)
ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
val webView = findViewById<WebView>(R.id.webview)
onBackPressedDispatcher.addCallback {
if (webView.canGoBack()) webView.goBack()
else cancelActivity()
}
val params = intent.getParcelableExtra<Parameters>(KEY)!!
actionBar?.apply {
title = params.title
setHomeAsUpIndicator(android.R.drawable.ic_menu_close_clear_cancel)
setDisplayHomeAsUpEnabled(true)
}
val events = IWebViewEvents.Stub.asInterface(params.events)!!
vm.setup(events)
webView.apply {
settings.apply {
cacheMode = WebSettings.LOAD_NO_CACHE
allowContentAccess = false
domStorageEnabled = true
javaScriptEnabled = true
}
webViewClient = vm.webViewClient
setDownloadListener { url, userAgent, _, mimetype, _ ->
vm.onDownload(url, mimetype, userAgent)
}
}
lifecycleScope.launch {
repeatOnLifecycle(Lifecycle.State.STARTED) {
vm.commands.collect {
when (it) {
is WebViewModel.Command.Finish -> {
setResult(RESULT_OK)
finish()
}
is WebViewModel.Command.Load -> webView.loadUrl(it.url)
}
}
}
}
}
private fun cancelActivity() {
setResult(RESULT_CANCELED)
finish()
}
override fun onOptionsItemSelected(item: MenuItem) = if (item.itemId == android.R.id.home) {
cancelActivity()
true
} else super.onOptionsItemSelected(item)
@Parcelize
internal class Parameters(
val title: String, val events: IBinder
) : Parcelable
internal companion object {
const val KEY = "params"
}
}
@OptIn(PluginHostApi::class)
internal class WebViewModel : ViewModel() {
init {
CookieManager.getInstance().apply {
removeAllCookies(null)
setAcceptCookie(true)
}
}
private val commandChannel = Channel<Command>()
val commands = commandChannel.receiveAsFlow()
private var eventBinder: IWebViewEvents? = null
private val ctrlBinder = object : IWebView.Stub() {
override fun load(url: String?) {
viewModelScope.launch {
commandChannel.send(Command.Load(url!!))
}
}
override fun finish() {
viewModelScope.launch {
commandChannel.send(Command.Finish)
}
}
}
val webViewClient = object : WebViewClient() {
override fun onPageFinished(view: WebView?, url: String?) {
super.onPageFinished(view, url)
eventBinder!!.pageLoad(url)
}
}
fun onDownload(url: String, mimeType: String, userAgent: String) {
eventBinder!!.download(url, mimeType, userAgent)
}
fun setup(binder: IWebViewEvents) {
if (eventBinder != null) return
eventBinder = binder
binder.ready(ctrlBinder)
}
sealed interface Command {
data class Load(val url: String) : Command
data object Finish : Command
}
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/main">
<WebView
android:id="@+id/webview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@ -0,0 +1 @@
<resources></resources>

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.WebViewActivity" parent="Theme.AppCompat.DayNight">
<item name="android:windowActionBar">true</item>
<item name="android:windowNoTitle">false</item>
</style>
</resources>

1
app/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/build

256
app/build.gradle.kts Normal file
View File

@ -0,0 +1,256 @@
import kotlin.random.Random
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.devtools)
alias(libs.plugins.about.libraries)
signing
}
val outputApkFileName = "${rootProject.name}-$version.apk"
dependencies {
// AndroidX Core
implementation(libs.androidx.ktx)
implementation(libs.runtime.ktx)
implementation(libs.runtime.compose)
implementation(libs.splash.screen)
implementation(libs.activity.compose)
implementation(libs.work.runtime.ktx)
implementation(libs.preferences.datastore)
implementation(libs.appcompat)
// Compose
implementation(platform(libs.compose.bom))
implementation(libs.compose.ui)
implementation(libs.compose.ui.preview)
implementation(libs.compose.ui.tooling)
implementation(libs.compose.livedata)
implementation(libs.compose.material.icons.extended)
implementation(libs.compose.material3)
implementation(libs.navigation.compose)
// Accompanist
implementation(libs.accompanist.drawablepainter)
// Placeholder
implementation(libs.placeholder.material3)
// HTML Scraper
implementation(libs.skrapeit.dsl)
implementation(libs.skrapeit.parser)
// Coil (async image loading, network image)
implementation(libs.coil.compose)
implementation(libs.coil.appiconloader)
// KotlinX
implementation(libs.kotlinx.serialization.json)
implementation(libs.kotlinx.collection.immutable)
implementation(libs.kotlinx.datetime)
// Room
implementation(libs.room.runtime)
implementation(libs.room.ktx)
annotationProcessor(libs.room.compiler)
ksp(libs.room.compiler)
// ReVanced
implementation(libs.revanced.patcher)
implementation(libs.revanced.library)
// Downloader plugins
implementation(project(":api"))
// Native processes
implementation(libs.kotlin.process)
// HiddenAPI
compileOnly(libs.hidden.api.stub)
// LibSU
implementation(libs.libsu.core)
implementation(libs.libsu.service)
implementation(libs.libsu.nio)
// Koin
implementation(libs.koin.android)
implementation(libs.koin.compose)
implementation(libs.koin.compose.navigation)
implementation(libs.koin.workmanager)
// Licenses
implementation(libs.about.libraries)
// Ktor
implementation(libs.ktor.core)
implementation(libs.ktor.logging)
implementation(libs.ktor.okhttp)
implementation(libs.ktor.content.negotiation)
implementation(libs.ktor.serialization)
// Markdown
implementation(libs.markdown.renderer)
// Fading Edges
implementation(libs.fading.edges)
// Scrollbars
implementation(libs.scrollbars)
// EnumUtil
implementation(libs.enumutil)
ksp(libs.enumutil.ksp)
// Reorderable lists
implementation(libs.reorderable)
// Compose Icons
implementation(libs.compose.icons.fontawesome)
}
android {
namespace = "app.revanced.manager"
compileSdk = 35
buildToolsVersion = "35.0.1"
defaultConfig {
applicationId = "app.revanced.manager"
minSdk = 26
targetSdk = 35
versionCode = 1
versionName = "0.0.1"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
debug {
applicationIdSuffix = ".debug"
resValue("string", "app_name", "ReVanced Manager (Debug)")
isPseudoLocalesEnabled = true
buildConfigField("long", "BUILD_ID", "${Random.nextLong()}L")
}
release {
if (!project.hasProperty("noProguard")) {
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
val keystoreFile = file("keystore.jks")
if (project.hasProperty("signAsDebug") || !keystoreFile.exists()) {
applicationIdSuffix = ".debug_signed"
resValue("string", "app_name", "ReVanced Manager (Debug signed)")
signingConfig = signingConfigs.getByName("debug")
isPseudoLocalesEnabled = true
} else {
signingConfig = signingConfigs.create("release") {
storeFile = keystoreFile
storePassword = System.getenv("KEYSTORE_PASSWORD")
keyAlias = System.getenv("KEYSTORE_ENTRY_ALIAS")
keyPassword = System.getenv("KEYSTORE_ENTRY_PASSWORD")
}
}
buildConfigField("long", "BUILD_ID", "0L")
}
}
applicationVariants.all {
outputs.all {
this as com.android.build.gradle.internal.api.ApkVariantOutputImpl
outputFileName = outputApkFileName
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
dependenciesInfo {
includeInApk = false
includeInBundle = false
}
packaging {
resources.excludes.addAll(
listOf(
"/prebuilt/**",
"META-INF/DEPENDENCIES",
"META-INF/**.version",
"DebugProbesKt.bin",
"kotlin-tooling-metadata.json",
"org/bouncycastle/pqc/**.properties",
"org/bouncycastle/x509/**.properties",
)
)
jniLibs {
useLegacyPackaging = true
}
}
ksp {
arg("room.schemaLocation", "$projectDir/schemas")
}
kotlinOptions {
jvmTarget = "17"
}
buildFeatures {
compose = true
aidl = true
buildConfig = true
}
android {
androidResources {
generateLocaleConfig = true
}
}
externalNativeBuild {
cmake {
path = file("src/main/cpp/CMakeLists.txt")
version = "3.22.1"
}
}
}
kotlin {
jvmToolchain(17)
}
tasks {
// Needed by gradle-semantic-release-plugin.
// Tracking: https://github.com/KengoTODA/gradle-semantic-release-plugin/issues/435.
val publish by registering {
group = "publishing"
description = "Build the release APK"
dependsOn("assembleRelease")
val apk = project.layout.buildDirectory.file("outputs/apk/release/${outputApkFileName}")
val ascFile = apk.map { it.asFile.resolveSibling("${it.asFile.name}.asc") }
inputs.file(apk).withPropertyName("inputApk")
outputs.file(ascFile).withPropertyName("outputAsc")
doLast {
signing {
useGpgCmd()
sign(apk.get().asFile)
}
}
}
}

63
app/proguard-rules.pro vendored Normal file
View File

@ -0,0 +1,63 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.kts.kts.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
-dontobfuscate
# Required for serialization to work properly
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
}
-if @kotlinx.serialization.Serializable class ** {
static **$* *;
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}
-if @kotlinx.serialization.Serializable class ** {
public static ** INSTANCE;
}
-keepclassmembers class <1> {
public static <1> INSTANCE;
kotlinx.serialization.KSerializer serializer(...);
}
# This required for the process runtime.
-keep class app.revanced.manager.patcher.runtime.process.* {
*;
}
# Required for the patcher to function correctly
-keep class app.revanced.patcher.** {
*;
}
-keep class brut.** {
*;
}
-keep class org.xmlpull.** {
*;
}
-keep class kotlin.** {
*;
}
-keep class org.jf.** {
*;
}
-keep class com.android.** {
*;
}
-keep class app.revanced.manager.plugin.** {
*;
}
-dontwarn com.google.auto.value.**
-dontwarn java.awt.**
-dontwarn javax.**
-dontwarn org.slf4j.**
-dontwarn it.skrape.fetcher.*
-dontwarn com.google.j2objc.annotations.*
-keepattributes RuntimeVisibleAnnotations,AnnotationDefault

View File

@ -0,0 +1,429 @@
{
"formatVersion": 1,
"database": {
"version": 1,
"identityHash": "d0119047505da435972c5247181de675",
"entities": [
{
"tableName": "patch_bundles",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER NOT NULL, `name` TEXT NOT NULL, `version` TEXT, `source` TEXT NOT NULL, `auto_update` INTEGER NOT NULL, PRIMARY KEY(`uid`))",
"fields": [
{
"fieldPath": "uid",
"columnName": "uid",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "name",
"columnName": "name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "version",
"columnName": "version",
"affinity": "TEXT",
"notNull": false
},
{
"fieldPath": "source",
"columnName": "source",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "autoUpdate",
"columnName": "auto_update",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"uid"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "patch_selections",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER NOT NULL, `patch_bundle` INTEGER NOT NULL, `package_name` TEXT NOT NULL, PRIMARY KEY(`uid`), FOREIGN KEY(`patch_bundle`) REFERENCES `patch_bundles`(`uid`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "uid",
"columnName": "uid",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "patchBundle",
"columnName": "patch_bundle",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "packageName",
"columnName": "package_name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"uid"
]
},
"indices": [
{
"name": "index_patch_selections_patch_bundle_package_name",
"unique": true,
"columnNames": [
"patch_bundle",
"package_name"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_patch_selections_patch_bundle_package_name` ON `${TABLE_NAME}` (`patch_bundle`, `package_name`)"
}
],
"foreignKeys": [
{
"table": "patch_bundles",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"patch_bundle"
],
"referencedColumns": [
"uid"
]
}
]
},
{
"tableName": "selected_patches",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`selection` INTEGER NOT NULL, `patch_name` TEXT NOT NULL, PRIMARY KEY(`selection`, `patch_name`), FOREIGN KEY(`selection`) REFERENCES `patch_selections`(`uid`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "selection",
"columnName": "selection",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "patchName",
"columnName": "patch_name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"selection",
"patch_name"
]
},
"indices": [],
"foreignKeys": [
{
"table": "patch_selections",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"selection"
],
"referencedColumns": [
"uid"
]
}
]
},
{
"tableName": "downloaded_app",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`package_name` TEXT NOT NULL, `version` TEXT NOT NULL, `directory` TEXT NOT NULL, `last_used` INTEGER NOT NULL, PRIMARY KEY(`package_name`, `version`))",
"fields": [
{
"fieldPath": "packageName",
"columnName": "package_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "version",
"columnName": "version",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "directory",
"columnName": "directory",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "lastUsed",
"columnName": "last_used",
"affinity": "INTEGER",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"package_name",
"version"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "installed_app",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`current_package_name` TEXT NOT NULL, `original_package_name` TEXT NOT NULL, `version` TEXT NOT NULL, `install_type` TEXT NOT NULL, PRIMARY KEY(`current_package_name`))",
"fields": [
{
"fieldPath": "currentPackageName",
"columnName": "current_package_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "originalPackageName",
"columnName": "original_package_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "version",
"columnName": "version",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "installType",
"columnName": "install_type",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"current_package_name"
]
},
"indices": [],
"foreignKeys": []
},
{
"tableName": "applied_patch",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`package_name` TEXT NOT NULL, `bundle` INTEGER NOT NULL, `patch_name` TEXT NOT NULL, PRIMARY KEY(`package_name`, `bundle`, `patch_name`), FOREIGN KEY(`package_name`) REFERENCES `installed_app`(`current_package_name`) ON UPDATE NO ACTION ON DELETE CASCADE , FOREIGN KEY(`bundle`) REFERENCES `patch_bundles`(`uid`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "packageName",
"columnName": "package_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "bundle",
"columnName": "bundle",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "patchName",
"columnName": "patch_name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"package_name",
"bundle",
"patch_name"
]
},
"indices": [
{
"name": "index_applied_patch_bundle",
"unique": false,
"columnNames": [
"bundle"
],
"orders": [],
"createSql": "CREATE INDEX IF NOT EXISTS `index_applied_patch_bundle` ON `${TABLE_NAME}` (`bundle`)"
}
],
"foreignKeys": [
{
"table": "installed_app",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"package_name"
],
"referencedColumns": [
"current_package_name"
]
},
{
"table": "patch_bundles",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"bundle"
],
"referencedColumns": [
"uid"
]
}
]
},
{
"tableName": "option_groups",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`uid` INTEGER NOT NULL, `patch_bundle` INTEGER NOT NULL, `package_name` TEXT NOT NULL, PRIMARY KEY(`uid`), FOREIGN KEY(`patch_bundle`) REFERENCES `patch_bundles`(`uid`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "uid",
"columnName": "uid",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "patchBundle",
"columnName": "patch_bundle",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "packageName",
"columnName": "package_name",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"uid"
]
},
"indices": [
{
"name": "index_option_groups_patch_bundle_package_name",
"unique": true,
"columnNames": [
"patch_bundle",
"package_name"
],
"orders": [],
"createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_option_groups_patch_bundle_package_name` ON `${TABLE_NAME}` (`patch_bundle`, `package_name`)"
}
],
"foreignKeys": [
{
"table": "patch_bundles",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"patch_bundle"
],
"referencedColumns": [
"uid"
]
}
]
},
{
"tableName": "options",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`group` INTEGER NOT NULL, `patch_name` TEXT NOT NULL, `key` TEXT NOT NULL, `value` TEXT NOT NULL, PRIMARY KEY(`group`, `patch_name`, `key`), FOREIGN KEY(`group`) REFERENCES `option_groups`(`uid`) ON UPDATE NO ACTION ON DELETE CASCADE )",
"fields": [
{
"fieldPath": "group",
"columnName": "group",
"affinity": "INTEGER",
"notNull": true
},
{
"fieldPath": "patchName",
"columnName": "patch_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "key",
"columnName": "key",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "value",
"columnName": "value",
"affinity": "TEXT",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"group",
"patch_name",
"key"
]
},
"indices": [],
"foreignKeys": [
{
"table": "option_groups",
"onDelete": "CASCADE",
"onUpdate": "NO ACTION",
"columns": [
"group"
],
"referencedColumns": [
"uid"
]
}
]
},
{
"tableName": "trusted_downloader_plugins",
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`package_name` TEXT NOT NULL, `signature` BLOB NOT NULL, PRIMARY KEY(`package_name`))",
"fields": [
{
"fieldPath": "packageName",
"columnName": "package_name",
"affinity": "TEXT",
"notNull": true
},
{
"fieldPath": "signature",
"columnName": "signature",
"affinity": "BLOB",
"notNull": true
}
],
"primaryKey": {
"autoGenerate": false,
"columnNames": [
"package_name"
]
},
"indices": [],
"foreignKeys": []
}
],
"views": [],
"setupQueries": [
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'd0119047505da435972c5247181de675')"
]
}
}

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<permission
android:name="app.revanced.manager.permission.PLUGIN_HOST"
android:protectionLevel="signature"
android:label="@string/plugin_host_permission_label"
android:description="@string/plugin_host_permission_description"
/>
<uses-permission android:name="app.revanced.manager.permission.PLUGIN_HOST" />
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="QueryAllPackagesPermission" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_SPECIAL_USE" />
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:name=".ManagerApplication"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:largeHeap="true"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.ReVancedManager"
android:enableOnBackInvokedCallback="true"
tools:targetApi="34">
<activity
android:name=".MainActivity"
android:exported="true"
android:theme="@style/Theme.ReVancedManager">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".plugin.downloader.webview.WebViewActivity" android:exported="false" android:theme="@style/Theme.WebViewActivity" />
<service android:name=".service.InstallService" />
<service android:name=".service.UninstallService" />
<service
android:name="androidx.work.impl.foreground.SystemForegroundService"
android:foregroundServiceType="specialUse"
android:exported="false"
tools:node="merge">
<property
android:name="android.app.PROPERTY_SPECIAL_USE_FGS_SUBTYPE"
android:value="patching"
/>
</service>
<provider
android:name="androidx.startup.InitializationProvider"
android:authorities="${applicationId}.androidx-startup"
android:exported="false"
tools:node="merge">
<meta-data
android:name="androidx.work.WorkManagerInitializer"
android:value="androidx.startup"
tools:node="remove" />
</provider>
</application>
</manifest>

View File

@ -0,0 +1,8 @@
// IRootService.aidl
package app.revanced.manager;
// Declare any non-default types here with import statements
interface IRootSystemService {
IBinder getFileSystemService();
}

View File

@ -0,0 +1,11 @@
// IPatcherEvents.aidl
package app.revanced.manager.patcher.runtime.process;
// Interface for sending events back to the main app process.
oneway interface IPatcherEvents {
void log(String level, String msg);
void patchSucceeded();
void progress(String name, String state, String msg);
// The patching process has ended. The exceptionStackTrace is null if it finished successfully.
void finished(String exceptionStackTrace);
}

View File

@ -0,0 +1,14 @@
// IPatcherProcess.aidl
package app.revanced.manager.patcher.runtime.process;
import app.revanced.manager.patcher.runtime.process.Parameters;
import app.revanced.manager.patcher.runtime.process.IPatcherEvents;
interface IPatcherProcess {
// Returns BuildConfig.BUILD_ID, which is used to ensure the main app and runner process are running the same code.
long buildId();
// Makes the patcher process exit with code 0
oneway void exit();
// Starts patching.
oneway void start(in Parameters parameters, IPatcherEvents events);
}

View File

@ -0,0 +1,4 @@
// Parameters.aidl
package app.revanced.manager.patcher.runtime.process;
parcelable Parameters;

View File

@ -0,0 +1,6 @@
id=__PKG_NAME__-ReVanced
name=__LABEL__ ReVanced
version=__VERSION__
versionCode=0
author=ReVanced
description=Mounts the patched APK on top of the original one

View File

@ -0,0 +1,40 @@
#!/system/bin/sh
DIR=${0%/*}
package_name="__PKG_NAME__"
version="__VERSION__"
rm "$DIR/log"
{
until [ "$(getprop sys.boot_completed)" = 1 ]; do sleep 5; done
sleep 5
base_path="$DIR/$package_name.apk"
stock_path="$(pm path "$package_name" | grep base | sed 's/package://g')"
stock_version="$(dumpsys package "$package_name" | grep versionName | cut -d "=" -f2)"
echo "base_path: $base_path"
echo "stock_path: $stock_path"
echo "base_version: $version"
echo "stock_version: $stock_version"
if mount | grep -q "$stock_path" ; then
echo "Not mounting as stock path is already mounted"
exit 1
fi
if [ "$version" != "$stock_version" ]; then
echo "Not mounting as versions don't match"
exit 1
fi
if [ -z "$stock_path" ]; then
echo "Not mounting as app info could not be loaded"
exit 1
fi
mount -o bind "$base_path" "$stock_path"
} >> "$DIR/log"

View File

@ -0,0 +1,38 @@
# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html.
# For more examples on how to use CMake, see https://github.com/android/ndk-samples.
# Sets the minimum CMake version required for this project.
cmake_minimum_required(VERSION 3.22.1)
# Declares the project name. The project name can be accessed via ${ PROJECT_NAME},
# Since this is the top level CMakeLists.txt, the project name is also accessible
# with ${CMAKE_PROJECT_NAME} (both CMake variables are in-sync within the top level
# build script scope).
project("prop_override")
# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.
#
# In this top level CMakeLists.txt, ${CMAKE_PROJECT_NAME} is used to define
# the target library name; in the sub-module's CMakeLists.txt, ${PROJECT_NAME}
# is preferred for the same purpose.
#
# In order to load a library into your app from Java/Kotlin, you must call
# System.loadLibrary() and pass the name of the library defined here;
# for GameActivity/NativeActivity derived applications, the same library name must be
# used in the AndroidManifest.xml file.
add_library(${CMAKE_PROJECT_NAME} SHARED
# List C/C++ source files with relative paths to this CMakeLists.txt.
prop_override.cpp)
# Specifies libraries CMake should link to your target library. You
# can link libraries from various origins, such as libraries defined in this
# build script, prebuilt third-party libraries, or Android system libraries.
target_link_libraries(${CMAKE_PROJECT_NAME}
# List libraries link to the target library
android
log)

View File

@ -0,0 +1,62 @@
// Library for overriding Android system properties via environment variables.
//
// Usage: LD_PRELOAD=prop_override.so PROP_dalvik.vm.heapsize=123M getprop dalvik.vm.heapsize
// Output: 123M
#include <string>
#include <cstring>
#include <cstdlib>
#include <dlfcn.h>
// Source: https://android.googlesource.com/platform/system/core/+/100b08a848d018eeb1caa5d5e7c7c2aaac65da15/libcutils/include/cutils/properties.h
#define PROP_VALUE_MAX 92
// This is the mangled name of "android::base::GetProperty".
#define GET_PROPERTY_MANGLED_NAME "_ZN7android4base11GetPropertyERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEES9_"
extern "C" typedef int (*property_get_ptr)(const char *, char *, const char *);
typedef std::string (*GetProperty_ptr)(const std::string &, const std::string &);
char *GetPropOverride(const std::string &key) {
auto envKey = "PROP_" + key;
return getenv(envKey.c_str());
}
// See: https://android.googlesource.com/platform/system/core/+/100b08a848d018eeb1caa5d5e7c7c2aaac65da15/libcutils/properties.cpp
extern "C" int property_get(const char *key, char *value, const char *default_value) {
auto replacement = GetPropOverride(std::string(key));
if (replacement) {
int len = strnlen(replacement, PROP_VALUE_MAX);
strncpy(value, replacement, len);
return len;
}
static property_get_ptr original = NULL;
if (!original) {
// Get the address of the original function.
original = reinterpret_cast<property_get_ptr>(dlsym(RTLD_NEXT, "property_get"));
}
return original(key, value, default_value);
}
// Defining android::base::GetProperty ourselves won't work because std::string has a slightly different "path" in the NDK version of the C++ standard library.
// We can get around this by forcing the function to adopt a specific name using the asm keyword.
std::string GetProperty(const std::string &, const std::string &) asm(GET_PROPERTY_MANGLED_NAME);
// See: https://android.googlesource.com/platform/system/libbase/+/1a34bb67c4f3ba0a1ea6f4f20ac9fe117ba4fe64/properties.cpp
// This isn't used for the properties we want to override, but property_get is deprecated so that could change in the future.
std::string GetProperty(const std::string &key, const std::string &default_value) {
auto replacement = GetPropOverride(key);
if (replacement) {
return std::string(replacement);
}
static GetProperty_ptr original = NULL;
if (!original) {
original = reinterpret_cast<GetProperty_ptr>(dlsym(RTLD_NEXT, GET_PROPERTY_MANGLED_NAME));
}
return original(key, default_value);
}

View File

@ -0,0 +1,336 @@
package app.revanced.manager
import android.content.ActivityNotFoundException
import android.os.Bundle
import android.os.Parcelable
import androidx.activity.ComponentActivity
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.result.contract.ActivityResultContracts
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.core.view.WindowCompat
import androidx.lifecycle.lifecycleScope
import androidx.navigation.NavBackStackEntry
import androidx.navigation.NavController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.navigation
import androidx.navigation.compose.rememberNavController
import androidx.navigation.toRoute
import app.revanced.manager.ui.model.navigation.AppSelector
import app.revanced.manager.ui.model.navigation.ComplexParameter
import app.revanced.manager.ui.model.navigation.Dashboard
import app.revanced.manager.ui.model.navigation.InstalledApplicationInfo
import app.revanced.manager.ui.model.navigation.Patcher
import app.revanced.manager.ui.model.navigation.SelectedApplicationInfo
import app.revanced.manager.ui.model.navigation.Settings
import app.revanced.manager.ui.model.navigation.Update
import app.revanced.manager.ui.screen.AppSelectorScreen
import app.revanced.manager.ui.screen.DashboardScreen
import app.revanced.manager.ui.screen.InstalledAppInfoScreen
import app.revanced.manager.ui.screen.PatcherScreen
import app.revanced.manager.ui.screen.PatchesSelectorScreen
import app.revanced.manager.ui.screen.RequiredOptionsScreen
import app.revanced.manager.ui.screen.SelectedAppInfoScreen
import app.revanced.manager.ui.screen.SettingsScreen
import app.revanced.manager.ui.screen.UpdateScreen
import app.revanced.manager.ui.screen.settings.AboutSettingsScreen
import app.revanced.manager.ui.screen.settings.AdvancedSettingsScreen
import app.revanced.manager.ui.screen.settings.ContributorSettingsScreen
import app.revanced.manager.ui.screen.settings.DeveloperSettingsScreen
import app.revanced.manager.ui.screen.settings.DownloadsSettingsScreen
import app.revanced.manager.ui.screen.settings.GeneralSettingsScreen
import app.revanced.manager.ui.screen.settings.ImportExportSettingsScreen
import app.revanced.manager.ui.screen.settings.LicensesSettingsScreen
import app.revanced.manager.ui.screen.settings.update.ChangelogsSettingsScreen
import app.revanced.manager.ui.screen.settings.update.UpdatesSettingsScreen
import app.revanced.manager.ui.theme.ReVancedManagerTheme
import app.revanced.manager.ui.theme.Theme
import app.revanced.manager.ui.viewmodel.MainViewModel
import app.revanced.manager.ui.viewmodel.SelectedAppInfoViewModel
import app.revanced.manager.util.EventEffect
import kotlinx.coroutines.launch
import org.koin.androidx.compose.koinViewModel
import org.koin.androidx.compose.navigation.koinNavViewModel
import org.koin.core.parameter.parametersOf
import org.koin.androidx.viewmodel.ext.android.getViewModel as getActivityViewModel
class MainActivity : ComponentActivity() {
@ExperimentalAnimationApi
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
WindowCompat.setDecorFitsSystemWindows(window, false)
enableEdgeToEdge()
installSplashScreen()
val vm: MainViewModel = getActivityViewModel()
setContent {
val launcher = rememberLauncherForActivityResult(
ActivityResultContracts.StartActivityForResult(),
onResult = vm::applyLegacySettings
)
val theme by vm.prefs.theme.getAsState()
val dynamicColor by vm.prefs.dynamicColor.getAsState()
EventEffect(vm.legacyImportActivityFlow) {
try {
launcher.launch(it)
} catch (_: ActivityNotFoundException) {
}
}
ReVancedManagerTheme(
darkTheme = theme == Theme.SYSTEM && isSystemInDarkTheme() || theme == Theme.DARK,
dynamicColor = dynamicColor
) {
ReVancedManager(vm)
}
}
}
}
@Composable
private fun ReVancedManager(vm: MainViewModel) {
val navController = rememberNavController()
EventEffect(vm.appSelectFlow) { app ->
navController.navigateComplex(
SelectedApplicationInfo,
SelectedApplicationInfo.ViewModelParams(app)
)
}
NavHost(
navController = navController,
startDestination = Dashboard,
enterTransition = { slideInHorizontally(initialOffsetX = { it }) },
exitTransition = { slideOutHorizontally(targetOffsetX = { -it / 3 }) },
popEnterTransition = { slideInHorizontally(initialOffsetX = { -it / 3 }) },
popExitTransition = { slideOutHorizontally(targetOffsetX = { it }) },
) {
composable<Dashboard> {
DashboardScreen(
onSettingsClick = { navController.navigate(Settings) },
onAppSelectorClick = {
navController.navigate(AppSelector)
},
onUpdateClick = {
navController.navigate(Update())
},
onDownloaderPluginClick = {
navController.navigate(Settings.Downloads)
},
onAppClick = { packageName ->
navController.navigate(InstalledApplicationInfo(packageName))
}
)
}
composable<InstalledApplicationInfo> {
val data = it.toRoute<InstalledApplicationInfo>()
InstalledAppInfoScreen(
onPatchClick = vm::selectApp,
onBackClick = navController::popBackStack,
viewModel = koinViewModel { parametersOf(data.packageName) }
)
}
composable<AppSelector> {
AppSelectorScreen(
onSelect = vm::selectApp,
onStorageSelect = vm::selectApp,
onBackClick = navController::popBackStack
)
}
composable<Patcher> {
PatcherScreen(
onBackClick = {
navController.navigate(route = Dashboard) {
launchSingleTop = true
popUpTo<Dashboard> {
inclusive = false
}
}
},
viewModel = koinViewModel { parametersOf(it.getComplexArg<Patcher.ViewModelParams>()) }
)
}
composable<Update> {
val data = it.toRoute<Update>()
UpdateScreen(
onBackClick = navController::popBackStack,
vm = koinViewModel { parametersOf(data.downloadOnScreenEntry) }
)
}
navigation<SelectedApplicationInfo>(startDestination = SelectedApplicationInfo.Main) {
composable<SelectedApplicationInfo.Main> {
val parentBackStackEntry = navController.navGraphEntry(it)
val data =
parentBackStackEntry.getComplexArg<SelectedApplicationInfo.ViewModelParams>()
val viewModel =
koinNavViewModel<SelectedAppInfoViewModel>(viewModelStoreOwner = parentBackStackEntry) {
parametersOf(data)
}
SelectedAppInfoScreen(
onBackClick = navController::popBackStack,
onPatchClick = {
it.lifecycleScope.launch {
navController.navigateComplex(
Patcher,
viewModel.getPatcherParams()
)
}
},
onPatchSelectorClick = { app, patches, options ->
navController.navigateComplex(
SelectedApplicationInfo.PatchesSelector,
SelectedApplicationInfo.PatchesSelector.ViewModelParams(
app,
patches,
options
)
)
},
onRequiredOptions = { app, patches, options ->
navController.navigateComplex(
SelectedApplicationInfo.RequiredOptions,
SelectedApplicationInfo.PatchesSelector.ViewModelParams(
app,
patches,
options
)
)
},
vm = viewModel
)
}
composable<SelectedApplicationInfo.PatchesSelector> {
val data =
it.getComplexArg<SelectedApplicationInfo.PatchesSelector.ViewModelParams>()
val selectedAppInfoVm = koinNavViewModel<SelectedAppInfoViewModel>(
viewModelStoreOwner = navController.navGraphEntry(it)
)
PatchesSelectorScreen(
onBackClick = navController::popBackStack,
onSave = { patches, options ->
selectedAppInfoVm.updateConfiguration(patches, options)
navController.popBackStack()
},
viewModel = koinViewModel { parametersOf(data) }
)
}
composable<SelectedApplicationInfo.RequiredOptions> {
val data =
it.getComplexArg<SelectedApplicationInfo.PatchesSelector.ViewModelParams>()
val selectedAppInfoVm = koinNavViewModel<SelectedAppInfoViewModel>(
viewModelStoreOwner = navController.navGraphEntry(it)
)
RequiredOptionsScreen(
onBackClick = navController::popBackStack,
onContinue = { patches, options ->
selectedAppInfoVm.updateConfiguration(patches, options)
it.lifecycleScope.launch {
navController.navigateComplex(
Patcher,
selectedAppInfoVm.getPatcherParams()
)
}
},
vm = koinViewModel { parametersOf(data) }
)
}
}
navigation<Settings>(startDestination = Settings.Main) {
composable<Settings.Main> {
SettingsScreen(
onBackClick = navController::popBackStack,
navigate = navController::navigate
)
}
composable<Settings.General> {
GeneralSettingsScreen(onBackClick = navController::popBackStack)
}
composable<Settings.Advanced> {
AdvancedSettingsScreen(onBackClick = navController::popBackStack)
}
composable<Settings.Developer> {
DeveloperSettingsScreen(onBackClick = navController::popBackStack)
}
composable<Settings.Updates> {
UpdatesSettingsScreen(
onBackClick = navController::popBackStack,
onChangelogClick = { navController.navigate(Settings.Changelogs) },
onUpdateClick = { navController.navigate(Update()) }
)
}
composable<Settings.Downloads> {
DownloadsSettingsScreen(onBackClick = navController::popBackStack)
}
composable<Settings.ImportExport> {
ImportExportSettingsScreen(onBackClick = navController::popBackStack)
}
composable<Settings.About> {
AboutSettingsScreen(
onBackClick = navController::popBackStack,
navigate = navController::navigate
)
}
composable<Settings.Changelogs> {
ChangelogsSettingsScreen(onBackClick = navController::popBackStack)
}
composable<Settings.Contributors> {
ContributorSettingsScreen(onBackClick = navController::popBackStack)
}
composable<Settings.Licenses> {
LicensesSettingsScreen(onBackClick = navController::popBackStack)
}
}
}
}
@Composable
private fun NavController.navGraphEntry(entry: NavBackStackEntry) =
remember(entry) { getBackStackEntry(entry.destination.parent!!.id) }
// Androidx Navigation does not support storing complex types in route objects, so we have to store them inside the saved state handle of the back stack entry instead.
private fun <T : Parcelable, R : ComplexParameter<T>> NavController.navigateComplex(
route: R,
data: T
) {
navigate(route)
getBackStackEntry(route).savedStateHandle["args"] = data
}
private fun <T : Parcelable> NavBackStackEntry.getComplexArg() = savedStateHandle.get<T>("args")!!

View File

@ -0,0 +1,110 @@
package app.revanced.manager
import android.app.Activity
import android.app.Application
import android.os.Bundle
import android.util.Log
import app.revanced.manager.data.platform.Filesystem
import app.revanced.manager.di.*
import app.revanced.manager.domain.manager.PreferencesManager
import app.revanced.manager.domain.repository.DownloaderPluginRepository
import app.revanced.manager.domain.repository.PatchBundleRepository
import app.revanced.manager.util.tag
import kotlinx.coroutines.Dispatchers
import coil.Coil
import coil.ImageLoader
import com.topjohnwu.superuser.Shell
import com.topjohnwu.superuser.internal.BuilderImpl
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.launch
import me.zhanghai.android.appiconloader.coil.AppIconFetcher
import me.zhanghai.android.appiconloader.coil.AppIconKeyer
import org.koin.android.ext.android.inject
import org.koin.android.ext.koin.androidContext
import org.koin.android.ext.koin.androidLogger
import org.koin.androidx.workmanager.koin.workManagerFactory
import org.koin.core.context.startKoin
class ManagerApplication : Application() {
private val scope = MainScope()
private val prefs: PreferencesManager by inject()
private val patchBundleRepository: PatchBundleRepository by inject()
private val downloaderPluginRepository: DownloaderPluginRepository by inject()
private val fs: Filesystem by inject()
override fun onCreate() {
super.onCreate()
startKoin {
androidContext(this@ManagerApplication)
androidLogger()
workManagerFactory()
modules(
httpModule,
preferencesModule,
repositoryModule,
serviceModule,
managerModule,
workerModule,
viewModelModule,
databaseModule,
rootModule
)
}
val pixels = 512
Coil.setImageLoader(
ImageLoader.Builder(this)
.components {
add(AppIconKeyer())
add(AppIconFetcher.Factory(pixels, true, this@ManagerApplication))
}
.build()
)
val shellBuilder = BuilderImpl.create().setFlags(Shell.FLAG_MOUNT_MASTER)
Shell.setDefaultBuilder(shellBuilder)
scope.launch {
prefs.preload()
}
scope.launch(Dispatchers.Default) {
downloaderPluginRepository.reload()
}
scope.launch(Dispatchers.Default) {
with(patchBundleRepository) {
reload()
updateCheck()
}
}
registerActivityLifecycleCallbacks(object : ActivityLifecycleCallbacks {
private var firstActivityCreated = false
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
if (firstActivityCreated) return
firstActivityCreated = true
// We do not want to call onFreshProcessStart() if there is state to restore.
// This can happen on system-initiated process death.
if (savedInstanceState == null) {
Log.d(tag, "Fresh process created")
onFreshProcessStart()
} else Log.d(tag, "System-initiated process death detected")
}
override fun onActivityStarted(activity: Activity) {}
override fun onActivityResumed(activity: Activity) {}
override fun onActivityPaused(activity: Activity) {}
override fun onActivityStopped(activity: Activity) {}
override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) {}
override fun onActivityDestroyed(activity: Activity) {}
})
}
private fun onFreshProcessStart() {
fs.uiTempDir.apply {
deleteRecursively()
mkdirs()
}
}
}

View File

@ -0,0 +1,51 @@
package app.revanced.manager.data.platform
import android.Manifest
import android.app.Application
import android.content.Context
import android.content.pm.PackageManager
import android.os.Build
import android.os.Environment
import androidx.activity.result.contract.ActivityResultContract
import androidx.activity.result.contract.ActivityResultContracts
import app.revanced.manager.util.RequestManageStorageContract
import java.io.File
import java.nio.file.Path
class Filesystem(private val app: Application) {
val contentResolver = app.contentResolver // TODO: move Content Resolver operations to here.
/**
* A directory that gets cleared when the app restarts.
* Do not store paths to this directory in a parcel.
*/
val tempDir: File = app.getDir("ephemeral", Context.MODE_PRIVATE).apply {
deleteRecursively()
mkdirs()
}
/**
* A directory for storing temporary files related to UI.
* This is the same as [tempDir], but does not get cleared on system-initiated process death.
* Paths to this directory can be safely stored in parcels.
*/
val uiTempDir: File = app.getDir("ui_ephemeral", Context.MODE_PRIVATE)
fun externalFilesDir(): Path = Environment.getExternalStorageDirectory().toPath()
private fun usesManagePermission() = Build.VERSION.SDK_INT >= Build.VERSION_CODES.R
private val storagePermissionName =
if (usesManagePermission()) Manifest.permission.MANAGE_EXTERNAL_STORAGE else Manifest.permission.READ_EXTERNAL_STORAGE
fun permissionContract(): Pair<ActivityResultContract<String, Boolean>, String> {
val contract =
if (usesManagePermission()) RequestManageStorageContract() else ActivityResultContracts.RequestPermission()
return contract to storagePermissionName
}
fun hasStoragePermission() =
if (usesManagePermission()) Environment.isExternalStorageManager() else app.checkSelfPermission(
storagePermissionName
) == PackageManager.PERMISSION_GRANTED
}

View File

@ -0,0 +1,19 @@
package app.revanced.manager.data.platform
import android.app.Application
import android.net.ConnectivityManager
import android.net.NetworkCapabilities
import androidx.core.content.getSystemService
class NetworkInfo(app: Application) {
private val connectivityManager = app.getSystemService<ConnectivityManager>()!!
private fun getCapabilities() = connectivityManager.activeNetwork?.let { connectivityManager.getNetworkCapabilities(it) }
fun isConnected() = connectivityManager.activeNetwork != null
fun isUnmetered() = getCapabilities()?.hasCapability(NetworkCapabilities.NET_CAPABILITY_NOT_METERED) ?: true
/**
* Returns true if it is safe to download large files.
*/
fun isSafe() = isConnected() && isUnmetered()
}

View File

@ -0,0 +1,39 @@
package app.revanced.manager.data.room
import androidx.room.Database
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import app.revanced.manager.data.room.apps.downloaded.DownloadedAppDao
import app.revanced.manager.data.room.apps.downloaded.DownloadedApp
import app.revanced.manager.data.room.apps.installed.AppliedPatch
import app.revanced.manager.data.room.apps.installed.InstalledApp
import app.revanced.manager.data.room.apps.installed.InstalledAppDao
import app.revanced.manager.data.room.selection.PatchSelection
import app.revanced.manager.data.room.selection.SelectedPatch
import app.revanced.manager.data.room.selection.SelectionDao
import app.revanced.manager.data.room.bundles.PatchBundleDao
import app.revanced.manager.data.room.bundles.PatchBundleEntity
import app.revanced.manager.data.room.options.Option
import app.revanced.manager.data.room.options.OptionDao
import app.revanced.manager.data.room.options.OptionGroup
import app.revanced.manager.data.room.plugins.TrustedDownloaderPlugin
import app.revanced.manager.data.room.plugins.TrustedDownloaderPluginDao
import kotlin.random.Random
@Database(
entities = [PatchBundleEntity::class, PatchSelection::class, SelectedPatch::class, DownloadedApp::class, InstalledApp::class, AppliedPatch::class, OptionGroup::class, Option::class, TrustedDownloaderPlugin::class],
version = 1
)
@TypeConverters(Converters::class)
abstract class AppDatabase : RoomDatabase() {
abstract fun patchBundleDao(): PatchBundleDao
abstract fun selectionDao(): SelectionDao
abstract fun downloadedAppDao(): DownloadedAppDao
abstract fun installedAppDao(): InstalledAppDao
abstract fun optionDao(): OptionDao
abstract fun trustedDownloaderPluginDao(): TrustedDownloaderPluginDao
companion object {
fun generateUid() = Random.Default.nextInt()
}
}

View File

@ -0,0 +1,26 @@
package app.revanced.manager.data.room
import androidx.room.TypeConverter
import app.revanced.manager.data.room.bundles.Source
import app.revanced.manager.data.room.options.Option.SerializedValue
import java.io.File
class Converters {
@TypeConverter
fun sourceFromString(value: String) = Source.from(value)
@TypeConverter
fun sourceToString(value: Source) = value.toString()
@TypeConverter
fun fileFromString(value: String) = File(value)
@TypeConverter
fun fileToString(file: File): String = file.path
@TypeConverter
fun serializedOptionFromString(value: String) = SerializedValue.fromJsonString(value)
@TypeConverter
fun serializedOptionToString(value: SerializedValue) = value.toJsonString()
}

View File

@ -0,0 +1,16 @@
package app.revanced.manager.data.room.apps.downloaded
import androidx.room.ColumnInfo
import androidx.room.Entity
import java.io.File
@Entity(
tableName = "downloaded_app",
primaryKeys = ["package_name", "version"]
)
data class DownloadedApp(
@ColumnInfo(name = "package_name") val packageName: String,
@ColumnInfo(name = "version") val version: String,
@ColumnInfo(name = "directory") val directory: File,
@ColumnInfo(name = "last_used") val lastUsed: Long = System.currentTimeMillis()
)

View File

@ -0,0 +1,26 @@
package app.revanced.manager.data.room.apps.downloaded
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Upsert
import kotlinx.coroutines.flow.Flow
@Dao
interface DownloadedAppDao {
@Query("SELECT * FROM downloaded_app")
fun getAllApps(): Flow<List<DownloadedApp>>
@Query("SELECT * FROM downloaded_app WHERE package_name = :packageName AND version = :version")
suspend fun get(packageName: String, version: String): DownloadedApp?
@Upsert
suspend fun upsert(downloadedApp: DownloadedApp)
@Query("UPDATE downloaded_app SET last_used = :newValue WHERE package_name = :packageName AND version = :version")
suspend fun markUsed(packageName: String, version: String, newValue: Long = System.currentTimeMillis())
@Delete
suspend fun delete(downloadedApps: Collection<DownloadedApp>)
}

View File

@ -0,0 +1,35 @@
package app.revanced.manager.data.room.apps.installed
import android.os.Parcelable
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import app.revanced.manager.data.room.bundles.PatchBundleEntity
import kotlinx.parcelize.Parcelize
@Parcelize
@Entity(
tableName = "applied_patch",
primaryKeys = ["package_name", "bundle", "patch_name"],
foreignKeys = [
ForeignKey(
InstalledApp::class,
parentColumns = ["current_package_name"],
childColumns = ["package_name"],
onDelete = ForeignKey.CASCADE
),
ForeignKey(
PatchBundleEntity::class,
parentColumns = ["uid"],
childColumns = ["bundle"],
onDelete = ForeignKey.CASCADE
)
],
indices = [Index(value = ["bundle"], unique = false)]
)
data class AppliedPatch(
@ColumnInfo(name = "package_name") val packageName: String,
@ColumnInfo(name = "bundle") val bundle: Int,
@ColumnInfo(name = "patch_name") val patchName: String
) : Parcelable

View File

@ -0,0 +1,20 @@
package app.revanced.manager.data.room.apps.installed
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
import app.revanced.manager.R
enum class InstallType(val stringResource: Int) {
DEFAULT(R.string.default_install),
MOUNT(R.string.mount_install)
}
@Entity(tableName = "installed_app")
data class InstalledApp(
@PrimaryKey
@ColumnInfo(name = "current_package_name") val currentPackageName: String,
@ColumnInfo(name = "original_package_name") val originalPackageName: String,
@ColumnInfo(name = "version") val version: String,
@ColumnInfo(name = "install_type") val installType: InstallType
)

View File

@ -0,0 +1,46 @@
package app.revanced.manager.data.room.apps.installed
import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.MapColumn
import androidx.room.Query
import androidx.room.Transaction
import androidx.room.Upsert
import kotlinx.coroutines.flow.Flow
@Dao
interface InstalledAppDao {
@Query("SELECT * FROM installed_app")
fun getAll(): Flow<List<InstalledApp>>
@Query("SELECT * FROM installed_app WHERE current_package_name = :packageName")
suspend fun get(packageName: String): InstalledApp?
@Query(
"SELECT bundle, patch_name FROM applied_patch" +
" WHERE package_name = :packageName"
)
suspend fun getPatchesSelection(packageName: String): Map<@MapColumn("bundle") Int, List<@MapColumn(
"patch_name"
) String>>
@Transaction
suspend fun upsertApp(installedApp: InstalledApp, appliedPatches: List<AppliedPatch>) {
upsertApp(installedApp)
deleteAppliedPatches(installedApp.currentPackageName)
insertAppliedPatches(appliedPatches)
}
@Upsert
suspend fun upsertApp(installedApp: InstalledApp)
@Insert
suspend fun insertAppliedPatches(appliedPatches: List<AppliedPatch>)
@Query("DELETE FROM applied_patch WHERE package_name = :packageName")
suspend fun deleteAppliedPatches(packageName: String)
@Delete
suspend fun delete(installedApp: InstalledApp)
}

View File

@ -0,0 +1,37 @@
package app.revanced.manager.data.room.bundles
import androidx.room.*
import kotlinx.coroutines.flow.Flow
@Dao
interface PatchBundleDao {
@Query("SELECT * FROM patch_bundles")
suspend fun all(): List<PatchBundleEntity>
@Query("SELECT version, auto_update FROM patch_bundles WHERE uid = :uid")
fun getPropsById(uid: Int): Flow<BundleProperties?>
@Query("UPDATE patch_bundles SET version = :patches WHERE uid = :uid")
suspend fun updateVersion(uid: Int, patches: String?)
@Query("UPDATE patch_bundles SET auto_update = :value WHERE uid = :uid")
suspend fun setAutoUpdate(uid: Int, value: Boolean)
@Query("UPDATE patch_bundles SET name = :value WHERE uid = :uid")
suspend fun setName(uid: Int, value: String)
@Query("DELETE FROM patch_bundles WHERE uid != 0")
suspend fun purgeCustomBundles()
@Transaction
suspend fun reset() {
purgeCustomBundles()
updateVersion(0, null) // Reset the main source
}
@Query("DELETE FROM patch_bundles WHERE uid = :uid")
suspend fun remove(uid: Int)
@Insert
suspend fun add(source: PatchBundleEntity)
}

View File

@ -0,0 +1,44 @@
package app.revanced.manager.data.room.bundles
import androidx.room.*
import io.ktor.http.*
sealed class Source {
object Local : Source() {
const val SENTINEL = "local"
override fun toString() = SENTINEL
}
object API : Source() {
const val SENTINEL = "api"
override fun toString() = SENTINEL
}
data class Remote(val url: Url) : Source() {
override fun toString() = url.toString()
}
companion object {
fun from(value: String) = when (value) {
Local.SENTINEL -> Local
API.SENTINEL -> API
else -> Remote(Url(value))
}
}
}
@Entity(tableName = "patch_bundles")
data class PatchBundleEntity(
@PrimaryKey val uid: Int,
@ColumnInfo(name = "name") val name: String,
@ColumnInfo(name = "version") val version: String? = null,
@ColumnInfo(name = "source") val source: Source,
@ColumnInfo(name = "auto_update") val autoUpdate: Boolean
)
data class BundleProperties(
@ColumnInfo(name = "version") val version: String? = null,
@ColumnInfo(name = "auto_update") val autoUpdate: Boolean
)

View File

@ -0,0 +1,116 @@
package app.revanced.manager.data.room.options
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.ForeignKey
import app.revanced.manager.patcher.patch.Option
import kotlinx.serialization.Serializable
import kotlinx.serialization.SerializationException
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonElement
import kotlinx.serialization.json.JsonNull
import kotlinx.serialization.json.JsonPrimitive
import kotlinx.serialization.json.add
import kotlinx.serialization.json.boolean
import kotlinx.serialization.json.buildJsonArray
import kotlinx.serialization.json.float
import kotlinx.serialization.json.int
import kotlinx.serialization.json.jsonArray
import kotlinx.serialization.json.jsonPrimitive
import kotlinx.serialization.json.long
import kotlin.reflect.KClass
import kotlin.reflect.KType
import kotlin.reflect.typeOf
@Entity(
tableName = "options",
primaryKeys = ["group", "patch_name", "key"],
foreignKeys = [ForeignKey(
OptionGroup::class,
parentColumns = ["uid"],
childColumns = ["group"],
onDelete = ForeignKey.CASCADE
)]
)
data class Option(
@ColumnInfo(name = "group") val group: Int,
@ColumnInfo(name = "patch_name") val patchName: String,
@ColumnInfo(name = "key") val key: String,
// Encoded as Json.
@ColumnInfo(name = "value") val value: SerializedValue,
) {
@Serializable
data class SerializedValue(val raw: JsonElement) {
fun toJsonString() = json.encodeToString(raw)
fun deserializeFor(option: Option<*>): Any? {
if (raw is JsonNull) return null
val errorMessage = "Cannot deserialize value as ${option.type}"
try {
if (option.type.classifier == List::class) {
val elementType = option.type.arguments.first().type!!
return raw.jsonArray.map { deserializeBasicType(elementType, it.jsonPrimitive) }
}
return deserializeBasicType(option.type, raw.jsonPrimitive)
} catch (e: IllegalArgumentException) {
throw SerializationException(errorMessage, e)
} catch (e: IllegalStateException) {
throw SerializationException(errorMessage, e)
} catch (e: kotlinx.serialization.SerializationException) {
throw SerializationException(errorMessage, e)
}
}
companion object {
private val json = Json {
// Patcher does not forbid the use of these values, so we should support them.
allowSpecialFloatingPointValues = true
}
private fun deserializeBasicType(type: KType, value: JsonPrimitive) = when (type) {
typeOf<Boolean>() -> value.boolean
typeOf<Int>() -> value.int
typeOf<Long>() -> value.long
typeOf<Float>() -> value.float
typeOf<String>() -> value.content.also {
if (!value.isString) throw SerializationException(
"Expected value to be a string: $value"
)
}
else -> throw SerializationException("Unknown type: $type")
}
fun fromJsonString(value: String) = SerializedValue(json.decodeFromString(value))
fun fromValue(value: Any?) = SerializedValue(when (value) {
null -> JsonNull
is Number -> JsonPrimitive(value)
is Boolean -> JsonPrimitive(value)
is String -> JsonPrimitive(value)
is List<*> -> buildJsonArray {
var elementClass: KClass<out Any>? = null
value.forEach {
when (it) {
null -> throw SerializationException("List elements must not be null")
is Number -> add(it)
is Boolean -> add(it)
is String -> add(it)
else -> throw SerializationException("Unknown element type: ${it::class.simpleName}")
}
if (elementClass == null) elementClass = it::class
else if (elementClass != it::class) throw SerializationException("List elements must have the same type")
}
}
else -> throw SerializationException("Unknown type: ${value::class.simpleName}")
})
}
}
class SerializationException(message: String, cause: Throwable? = null) :
Exception(message, cause)
}

View File

@ -0,0 +1,50 @@
package app.revanced.manager.data.room.options
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.MapColumn
import androidx.room.Query
import androidx.room.Transaction
import kotlinx.coroutines.flow.Flow
@Dao
abstract class OptionDao {
@Transaction
@Query(
"SELECT patch_bundle, `group`, patch_name, `key`, value FROM option_groups" +
" LEFT JOIN options ON uid = options.`group`" +
" WHERE package_name = :packageName"
)
abstract suspend fun getOptions(packageName: String): Map<@MapColumn("patch_bundle") Int, List<Option>>
@Query("SELECT uid FROM option_groups WHERE patch_bundle = :bundleUid AND package_name = :packageName")
abstract suspend fun getGroupId(bundleUid: Int, packageName: String): Int?
@Query("SELECT package_name FROM option_groups")
abstract fun getPackagesWithOptions(): Flow<List<String>>
@Insert
abstract suspend fun createOptionGroup(group: OptionGroup)
@Query("DELETE FROM option_groups WHERE patch_bundle = :uid")
abstract suspend fun clearForPatchBundle(uid: Int)
@Query("DELETE FROM option_groups WHERE package_name = :packageName")
abstract suspend fun clearForPackage(packageName: String)
@Query("DELETE FROM option_groups")
abstract suspend fun reset()
@Insert
protected abstract suspend fun insertOptions(patches: List<Option>)
@Query("DELETE FROM options WHERE `group` = :groupId")
protected abstract suspend fun clearGroup(groupId: Int)
@Transaction
open suspend fun updateOptions(options: Map<Int, List<Option>>) =
options.forEach { (groupId, options) ->
clearGroup(groupId)
insertOptions(options)
}
}

View File

@ -0,0 +1,24 @@
package app.revanced.manager.data.room.options
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey
import app.revanced.manager.data.room.bundles.PatchBundleEntity
@Entity(
tableName = "option_groups",
foreignKeys = [ForeignKey(
PatchBundleEntity::class,
parentColumns = ["uid"],
childColumns = ["patch_bundle"],
onDelete = ForeignKey.CASCADE
)],
indices = [Index(value = ["patch_bundle", "package_name"], unique = true)]
)
data class OptionGroup(
@PrimaryKey val uid: Int,
@ColumnInfo(name = "patch_bundle") val patchBundle: Int,
@ColumnInfo(name = "package_name") val packageName: String
)

View File

@ -0,0 +1,11 @@
package app.revanced.manager.data.room.plugins
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey
@Entity(tableName = "trusted_downloader_plugins")
class TrustedDownloaderPlugin(
@PrimaryKey @ColumnInfo(name = "package_name") val packageName: String,
@ColumnInfo(name = "signature") val signature: ByteArray
)

View File

@ -0,0 +1,22 @@
package app.revanced.manager.data.room.plugins
import androidx.room.Dao
import androidx.room.Query
import androidx.room.Transaction
import androidx.room.Upsert
@Dao
interface TrustedDownloaderPluginDao {
@Query("SELECT signature FROM trusted_downloader_plugins WHERE package_name = :packageName")
suspend fun getTrustedSignature(packageName: String): ByteArray?
@Upsert
suspend fun upsertTrust(plugin: TrustedDownloaderPlugin)
@Query("DELETE FROM trusted_downloader_plugins WHERE package_name = :packageName")
suspend fun remove(packageName: String)
@Transaction
@Query("DELETE FROM trusted_downloader_plugins WHERE package_name IN (:packageNames)")
suspend fun removeAll(packageNames: Set<String>)
}

View File

@ -0,0 +1,24 @@
package app.revanced.manager.data.room.selection
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey
import app.revanced.manager.data.room.bundles.PatchBundleEntity
@Entity(
tableName = "patch_selections",
foreignKeys = [ForeignKey(
PatchBundleEntity::class,
parentColumns = ["uid"],
childColumns = ["patch_bundle"],
onDelete = ForeignKey.CASCADE
)],
indices = [Index(value = ["patch_bundle", "package_name"], unique = true)]
)
data class PatchSelection(
@PrimaryKey val uid: Int,
@ColumnInfo(name = "patch_bundle") val patchBundle: Int,
@ColumnInfo(name = "package_name") val packageName: String
)

View File

@ -0,0 +1,20 @@
package app.revanced.manager.data.room.selection
import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.ForeignKey
@Entity(
tableName = "selected_patches",
primaryKeys = ["selection", "patch_name"],
foreignKeys = [ForeignKey(
PatchSelection::class,
parentColumns = ["uid"],
childColumns = ["selection"],
onDelete = ForeignKey.CASCADE
)]
)
data class SelectedPatch(
@ColumnInfo(name = "selection") val selection: Int,
@ColumnInfo(name = "patch_name") val patchName: String
)

View File

@ -0,0 +1,58 @@
package app.revanced.manager.data.room.selection
import androidx.room.Dao
import androidx.room.Insert
import androidx.room.MapColumn
import androidx.room.Query
import androidx.room.Transaction
@Dao
abstract class SelectionDao {
@Transaction
@Query(
"SELECT patch_bundle, patch_name FROM patch_selections" +
" LEFT JOIN selected_patches ON uid = selected_patches.selection" +
" WHERE package_name = :packageName"
)
abstract suspend fun getSelectedPatches(packageName: String): Map<@MapColumn("patch_bundle") Int, List<@MapColumn(
"patch_name"
) String>>
@Transaction
@Query(
"SELECT package_name, patch_name FROM patch_selections" +
" LEFT JOIN selected_patches ON uid = selected_patches.selection" +
" WHERE patch_bundle = :bundleUid"
)
abstract suspend fun exportSelection(bundleUid: Int): Map<@MapColumn("package_name") String, List<@MapColumn(
"patch_name"
) String>>
@Query("SELECT uid FROM patch_selections WHERE patch_bundle = :bundleUid AND package_name = :packageName")
abstract suspend fun getSelectionId(bundleUid: Int, packageName: String): Int?
@Insert
abstract suspend fun createSelection(selection: PatchSelection)
@Query("DELETE FROM patch_selections WHERE patch_bundle = :uid")
abstract suspend fun clearForPatchBundle(uid: Int)
@Query("DELETE FROM patch_selections WHERE package_name = :packageName")
abstract suspend fun clearForPackage(packageName: String)
@Query("DELETE FROM patch_selections")
abstract suspend fun reset()
@Insert
protected abstract suspend fun selectPatches(patches: List<SelectedPatch>)
@Query("DELETE FROM selected_patches WHERE selection = :selectionId")
protected abstract suspend fun clearSelection(selectionId: Int)
@Transaction
open suspend fun updateSelections(selections: Map<Int, Set<String>>) =
selections.forEach { (selectionUid, patches) ->
clearSelection(selectionUid)
selectPatches(patches.map { SelectedPatch(selectionUid, it) })
}
}

View File

@ -0,0 +1,15 @@
package app.revanced.manager.di
import android.content.Context
import androidx.room.Room
import app.revanced.manager.data.room.AppDatabase
import org.koin.android.ext.koin.androidContext
import org.koin.dsl.module
val databaseModule = module {
fun provideAppDatabase(context: Context) = Room.databaseBuilder(context, AppDatabase::class.java, "manager").build()
single {
provideAppDatabase(androidContext())
}
}

View File

@ -0,0 +1,60 @@
package app.revanced.manager.di
import android.content.Context
import app.revanced.manager.BuildConfig
import io.ktor.client.*
import io.ktor.client.engine.okhttp.*
import io.ktor.client.plugins.HttpTimeout
import io.ktor.client.plugins.UserAgent
import io.ktor.client.plugins.contentnegotiation.*
import io.ktor.serialization.kotlinx.json.*
import kotlinx.serialization.json.Json
import okhttp3.Cache
import okhttp3.Dns
import org.koin.android.ext.koin.androidContext
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module
import java.net.Inet4Address
import java.net.InetAddress
val httpModule = module {
fun provideHttpClient(context: Context, json: Json) = HttpClient(OkHttp) {
engine {
config {
dns(object : Dns {
override fun lookup(hostname: String): List<InetAddress> {
val addresses = Dns.SYSTEM.lookup(hostname)
return if (hostname == "raw.githubusercontent.com") {
addresses.filterIsInstance<Inet4Address>()
} else {
addresses
}
}
})
cache(Cache(context.cacheDir.resolve("cache").also { it.mkdirs() }, 1024 * 1024 * 100))
followRedirects(true)
followSslRedirects(true)
}
}
install(ContentNegotiation) {
json(json)
}
install(HttpTimeout) {
socketTimeoutMillis = 10000
}
install(UserAgent) {
agent = "ReVanced-Manager/${BuildConfig.VERSION_CODE}"
}
}
fun provideJson() = Json {
encodeDefaults = true
isLenient = true
ignoreUnknownKeys = true
}
single {
provideHttpClient(androidContext(), get())
}
singleOf(::provideJson)
}

View File

@ -0,0 +1,11 @@
package app.revanced.manager.di
import app.revanced.manager.domain.manager.KeystoreManager
import app.revanced.manager.util.PM
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module
val managerModule = module {
singleOf(::KeystoreManager)
singleOf(::PM)
}

View File

@ -0,0 +1,9 @@
package app.revanced.manager.di
import app.revanced.manager.domain.manager.PreferencesManager
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module
val preferencesModule = module {
singleOf(::PreferencesManager)
}

View File

@ -0,0 +1,29 @@
package app.revanced.manager.di
import app.revanced.manager.data.platform.Filesystem
import app.revanced.manager.data.platform.NetworkInfo
import app.revanced.manager.domain.repository.*
import app.revanced.manager.domain.worker.WorkerRepository
import app.revanced.manager.network.api.ReVancedAPI
import org.koin.core.module.dsl.createdAtStart
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module
val repositoryModule = module {
singleOf(::ReVancedAPI)
singleOf(::Filesystem) {
createdAtStart()
}
singleOf(::NetworkInfo)
singleOf(::PatchBundlePersistenceRepository)
singleOf(::PatchSelectionRepository)
singleOf(::PatchOptionsRepository)
singleOf(::PatchBundleRepository) {
// It is best to load patch bundles ASAP
createdAtStart()
}
singleOf(::DownloaderPluginRepository)
singleOf(::WorkerRepository)
singleOf(::DownloadedAppRepository)
singleOf(::InstalledAppRepository)
}

View File

@ -0,0 +1,9 @@
package app.revanced.manager.di
import app.revanced.manager.domain.installer.RootInstaller
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module
val rootModule = module {
singleOf(::RootInstaller)
}

View File

@ -0,0 +1,9 @@
package app.revanced.manager.di
import app.revanced.manager.network.service.HttpService
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module
val serviceModule = module {
singleOf(::HttpService)
}

View File

@ -0,0 +1,26 @@
package app.revanced.manager.di
import app.revanced.manager.ui.viewmodel.*
import org.koin.androidx.viewmodel.dsl.viewModelOf
import org.koin.dsl.module
val viewModelModule = module {
viewModelOf(::MainViewModel)
viewModelOf(::DashboardViewModel)
viewModelOf(::SelectedAppInfoViewModel)
viewModelOf(::PatchesSelectorViewModel)
viewModelOf(::GeneralSettingsViewModel)
viewModelOf(::AdvancedSettingsViewModel)
viewModelOf(::AppSelectorViewModel)
viewModelOf(::PatcherViewModel)
viewModelOf(::UpdateViewModel)
viewModelOf(::ChangelogsViewModel)
viewModelOf(::ImportExportViewModel)
viewModelOf(::AboutViewModel)
viewModelOf(::DeveloperOptionsViewModel)
viewModelOf(::ContributorViewModel)
viewModelOf(::DownloadsViewModel)
viewModelOf(::InstalledAppsViewModel)
viewModelOf(::InstalledAppInfoViewModel)
viewModelOf(::UpdatesSettingsViewModel)
}

View File

@ -0,0 +1,9 @@
package app.revanced.manager.di
import app.revanced.manager.patcher.worker.PatcherWorker
import org.koin.androidx.workmanager.dsl.workerOf
import org.koin.dsl.module
val workerModule = module {
workerOf(::PatcherWorker)
}

View File

@ -0,0 +1,21 @@
package app.revanced.manager.domain.bundles
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import java.io.File
import java.io.InputStream
class LocalPatchBundle(name: String, id: Int, directory: File) :
PatchBundleSource(name, id, directory) {
suspend fun replace(patches: InputStream) {
withContext(Dispatchers.IO) {
patchBundleOutputStream().use { outputStream ->
patches.copyTo(outputStream)
}
}
reload()?.also {
saveVersion(it.readManifestAttribute("Version"))
}
}
}

View File

@ -0,0 +1,114 @@
package app.revanced.manager.domain.bundles
import android.app.Application
import android.util.Log
import androidx.compose.runtime.Composable
import androidx.compose.runtime.Stable
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import app.revanced.manager.R
import app.revanced.manager.domain.repository.PatchBundlePersistenceRepository
import app.revanced.manager.patcher.patch.PatchBundle
import app.revanced.manager.util.tag
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.map
import org.koin.core.component.KoinComponent
import org.koin.core.component.inject
import java.io.File
import java.io.OutputStream
/**
* A [PatchBundle] source.
*/
@Stable
sealed class PatchBundleSource(initialName: String, val uid: Int, directory: File) : KoinComponent {
protected val configRepository: PatchBundlePersistenceRepository by inject()
private val app: Application by inject()
protected val patchesFile = directory.resolve("patches.jar")
private val _state = MutableStateFlow(load())
val state = _state.asStateFlow()
private val _nameFlow = MutableStateFlow(initialName)
val nameFlow =
_nameFlow.map { it.ifEmpty { app.getString(if (isDefault) R.string.patches_name_default else R.string.patches_name_fallback) } }
suspend fun getName() = nameFlow.first()
/**
* Returns true if the bundle has been downloaded to local storage.
*/
fun hasInstalled() = patchesFile.exists()
protected fun patchBundleOutputStream(): OutputStream = with(patchesFile) {
// Android 14+ requires dex containers to be readonly.
try {
setWritable(true, true)
outputStream()
} finally {
setReadOnly()
}
}
private fun load(): State {
if (!hasInstalled()) return State.Missing
return try {
State.Loaded(PatchBundle(patchesFile))
} catch (t: Throwable) {
Log.e(tag, "Failed to load patch bundle with UID $uid", t)
State.Failed(t)
}
}
suspend fun reload(): PatchBundle? {
val newState = load()
_state.value = newState
val bundle = newState.patchBundleOrNull()
// Try to read the name from the patch bundle manifest if the bundle does not have a name.
if (bundle != null && _nameFlow.value.isEmpty()) {
bundle.readManifestAttribute("Name")?.let { setName(it) }
}
return bundle
}
/**
* Create a flow that emits the [app.revanced.manager.data.room.bundles.BundleProperties] of this [PatchBundleSource].
* The flow will emit null if the associated [PatchBundleSource] is deleted.
*/
fun propsFlow() = configRepository.getProps(uid).flowOn(Dispatchers.Default)
suspend fun getProps() = propsFlow().first()!!
suspend fun currentVersion() = getProps().version
protected suspend fun saveVersion(version: String?) =
configRepository.updateVersion(uid, version)
suspend fun setName(name: String) {
configRepository.setName(uid, name)
_nameFlow.value = name
}
sealed interface State {
fun patchBundleOrNull(): PatchBundle? = null
data object Missing : State
data class Failed(val throwable: Throwable) : State
data class Loaded(val bundle: PatchBundle) : State {
override fun patchBundleOrNull() = bundle
}
}
companion object Extensions {
val PatchBundleSource.isDefault inline get() = uid == 0
val PatchBundleSource.asRemoteOrNull inline get() = this as? RemotePatchBundle
val PatchBundleSource.nameState
@Composable inline get() = nameFlow.collectAsStateWithLifecycle(
""
)
}
}

View File

@ -0,0 +1,71 @@
package app.revanced.manager.domain.bundles
import androidx.compose.runtime.Stable
import app.revanced.manager.network.api.ReVancedAPI
import app.revanced.manager.network.dto.ReVancedAsset
import app.revanced.manager.network.service.HttpService
import app.revanced.manager.network.utils.getOrThrow
import io.ktor.client.request.url
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.koin.core.component.inject
import java.io.File
@Stable
sealed class RemotePatchBundle(name: String, id: Int, directory: File, val endpoint: String) :
PatchBundleSource(name, id, directory) {
protected val http: HttpService by inject()
protected abstract suspend fun getLatestInfo(): ReVancedAsset
private suspend fun download(info: ReVancedAsset) = withContext(Dispatchers.IO) {
patchBundleOutputStream().use {
http.streamTo(it) {
url(info.downloadUrl)
}
}
saveVersion(info.version)
reload()
}
suspend fun downloadLatest() {
download(getLatestInfo())
}
suspend fun update(): Boolean = withContext(Dispatchers.IO) {
val info = getLatestInfo()
if (hasInstalled() && info.version == currentVersion())
return@withContext false
download(info)
true
}
suspend fun deleteLocalFiles() = withContext(Dispatchers.Default) {
patchesFile.delete()
reload()
}
suspend fun setAutoUpdate(value: Boolean) = configRepository.setAutoUpdate(uid, value)
companion object {
const val updateFailMsg = "Failed to update patches"
}
}
class JsonPatchBundle(name: String, id: Int, directory: File, endpoint: String) :
RemotePatchBundle(name, id, directory, endpoint) {
override suspend fun getLatestInfo() = withContext(Dispatchers.IO) {
http.request<ReVancedAsset> {
url(endpoint)
}.getOrThrow()
}
}
class APIPatchBundle(name: String, id: Int, directory: File, endpoint: String) :
RemotePatchBundle(name, id, directory, endpoint) {
private val api: ReVancedAPI by inject()
override suspend fun getLatestInfo() = api.getPatchesUpdate().getOrThrow()
}

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