Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix disabled resourcepatching #32

Closed
wants to merge 143 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
4eb5df4
Barebones-AboutScreen.
Aunali321 Jun 29, 2022
1cc7da7
Added temp revanced logo.
Aunali321 Jun 29, 2022
a4d88f5
Added socials.
Aunali321 Jun 29, 2022
a857102
Click on icon works now.
Aunali321 Jun 29, 2022
aa91139
Rough text buttons
Ushie Jun 29, 2022
ee08326
refactor: moved PreferenceRow to a separate file.
Aunali321 Jun 29, 2022
9b75c55
Merge branch 'revanced:main' into main
Aunali321 Jun 29, 2022
96edeb4
updated patcher version.
Aunali321 Jun 29, 2022
630765b
updated patcher version.
Aunali321 Jun 29, 2022
2bcdeb8
updated patcher version.
Aunali321 Jun 29, 2022
2de71df
improvement: made warning text yellow.
Aunali321 Jun 29, 2022
c28d9aa
updated patcher version.
Aunali321 Jun 29, 2022
ae6a417
Revert "updated patcher version."
Aunali321 Jun 30, 2022
22eed91
Fixed duplicate Help Translate.
Aunali321 Jun 30, 2022
6a85328
WIP credits ExpandableCard.
Aunali321 Jun 30, 2022
0ad6a75
feat: partial fetching contributors using GH Api.
Aunali321 Jun 30, 2022
a309c1a
refactor: header image
Ushie Jun 30, 2022
8bfc984
feat: material colored socials
Ushie Jun 30, 2022
de13974
Merge branch 'revanced:main' into main
Aunali321 Jun 30, 2022
8aa76d8
added telegram icons files
Ushie Jun 30, 2022
95b4a9e
feat: added telegram logo and commented yt logo.
Aunali321 Jun 30, 2022
4a06c8a
tinted header icon
Ushie Jun 30, 2022
c8c73c9
feat: add github workflows
Jun 29, 2022
92ae636
make websiteUrl public
Ushie Jul 1, 2022
18b98cd
feat: fetch top contributor of patches.
Aunali321 Jul 1, 2022
5877a85
refactor: added strings to strings.xml for easier translation.
Aunali321 Jul 1, 2022
ee7b66e
refactor: moved AboutViewModel.kt to separate file.
Aunali321 Jul 1, 2022
2f0ef84
feat: patcher credits. and lots of refactoring.
Aunali321 Jul 1, 2022
f3e2be5
feat: grid of avatars and fixed duplicate contributors.
Aunali321 Jul 1, 2022
e579e5d
UI changes: new navbar tab, added a proper about page, renamed credit…
Ushie Jul 2, 2022
cce98a8
fix: settings and about page titles
Ushie Jul 2, 2022
0cd7b02
feat: make ExpandableCard reusable.
Aunali321 Jul 2, 2022
bdb4f33
feat: added all other contributors.
Aunali321 Jul 2, 2022
44c6f61
feat: fixed scroll but card doesn't expand.
Aunali321 Jul 2, 2022
537a214
feat: added all other contributors.
Aunali321 Jul 2, 2022
b915fbe
feat: fixed scroll but card doesn't expand.
Aunali321 Jul 2, 2022
95a40cc
feat: fixed scroll a bit. good enough for now.
Aunali321 Jul 2, 2022
47a42e7
feat: manager app icon.
Aunali321 Jul 2, 2022
6b0b066
fix: delete duplicate files for manager icon.
Aunali321 Jul 2, 2022
469987b
feat: toast to tell users to select apk before spamming patch button.
Aunali321 Jul 2, 2022
11736f5
feat: add theme changer switch (UI only).
Aunali321 Jul 2, 2022
085f04c
feat: app version in about
Ushie Jul 2, 2022
1b76d66
refactor: make IconHeader reusable
Ushie Jul 2, 2022
bd371e1
refactor: title names for Patcher and More pages
Ushie Jul 2, 2022
e7457e6
fix: set missing IconHeader padding
Ushie Jul 3, 2022
4d938e4
feat: experimental about version pop-up.
Aunali321 Jul 3, 2022
41f9f78
feat: fixed about version pop-up.
Aunali321 Jul 3, 2022
618f655
refactor: version popup dialog
Ushie Jul 3, 2022
3acc385
feat: Primitive help button.
Aunali321 Jul 3, 2022
ea73cf8
feat: added debuginfo
Ushie Jul 3, 2022
265c2c2
feat: added copy to about version
Ushie Jul 3, 2022
c9ac1a1
feat: copy debug on hold, added label
Ushie Jul 3, 2022
8c02833
feat: Moved help button functionality to FAQ button. (Better suited.)
Aunali321 Jul 4, 2022
47e7629
feat: github button in contributors screen
Ushie Jul 5, 2022
d5a3e44
feat: dialog for help button
Ushie Jul 5, 2022
b096949
refactor: merge dialog files
Ushie Jul 5, 2022
3021e29
feat: changed IconHeader to match app icon
Ushie Jul 5, 2022
4e265aa
fix: contributor screen uses IconHeader now
Ushie Jul 5, 2022
e1ec65d
fix: import lol (doing on gh web guh)
Ushie Jul 5, 2022
8701905
fix: reverted back to actual placeholder logo.
Aunali321 Jul 5, 2022
c40e98f
feat: replace ExpandableCards with ContributorsCard.
Aunali321 Jul 5, 2022
612ac9c
fix: reverse button color
Ushie Jul 5, 2022
13ec6d0
refactor: remove contributors from more screen
Ushie Jul 5, 2022
33a2f66
fix: manifest error
Ushie Jul 6, 2022
e9f4d63
feat: move patching to foreground service
danthe1st Jul 6, 2022
e16b5b1
feat: uncommented youtube in socials as we now have permission to use…
Ushie Jul 8, 2022
70531d9
feat: added copyToClipboard and showToast functions
Ushie Jul 8, 2022
e47a7a7
feat: added expanding text to patch descriptions.
Aunali321 Jul 9, 2022
a11fe28
feat: patch compatibility versions in patch descriptions.
Aunali321 Jul 9, 2022
38edf73
fix: moved patch compatibility to right place.
Aunali321 Jul 9, 2022
3750f5c
refactor: renamed incorrectly named function.
Aunali321 Jul 9, 2022
44d96e0
Merge pull request #1 from Aunali321/patch-compatibility
Aunali321 Jul 9, 2022
53306a3
feat: Searchbar in PatchesSelectorScreen.
Aunali321 Jul 10, 2022
ee7a525
feat: replace Button with IconButton
Ushie Jul 11, 2022
a0a4d75
feat: combine version and unsupported into chip
Ushie Jul 11, 2022
136d722
refactor: use version property of Package to show compatible version.
Aunali321 Jul 11, 2022
6b40244
fix: sort compatible version from latest to oldest.
Aunali321 Jul 11, 2022
84d506e
feat: change Card to ElevatedCard & improve layout
Ushie Jul 12, 2022
0d6f6d3
feat: change search TextField to OutlinedTextField
Ushie Jul 12, 2022
cd78957
refactor: remove ellipse
Ushie Jul 12, 2022
fd5bf9e
fix: scrolling vertical contributor grid
Jul 13, 2022
65d2cf2
feat: replace contributor screen with redirect to readme
Ushie Jul 13, 2022
9c1dbfc
feat: switch to material 3 AlertDialog
Ushie Jul 14, 2022
310efec
feat: remove Debug info dialog and FAQ dialog
Ushie Jul 14, 2022
3d2bdd7
feat: remove supported versions dialog in supported patches
Ushie Jul 14, 2022
92aaea6
feat: use Text instead of ExpandableText for description
Ushie Jul 14, 2022
3548ab9
feat: move social media icons to the bottom
Ushie Jul 14, 2022
edb56e9
fix: hopefully now only correct values
Jul 15, 2022
ee0dab2
Merge remote-tracking branch 'origin/main'
Jul 15, 2022
f31c45b
fix: i
Jul 15, 2022
65c7da4
fix: dark theme by default
Jul 15, 2022
5205250
fix: you've been trolled you've been trolled yes you probably been told
Jul 15, 2022
6dfcca8
feat: disable selection of unsupported card
Ushie Jul 15, 2022
61cce61
fix: revert premature push for searchbar
Ushie Jul 15, 2022
db6f806
feat: match searchbar roundness w rest of the UI
Ushie Jul 15, 2022
f7e2885
feat: add arrow to expandable description
Ushie Jul 16, 2022
169cc8e
revert removing contributors & remove expand arrow
Ushie Jul 16, 2022
4d8ee7c
feat: change description text style
Ushie Jul 16, 2022
811a0f7
feat: load contributors in another thread.
Aunali321 Jul 16, 2022
017651b
feat: splashscreen
Ushie Jul 18, 2022
a2c9b27
feat: material you toggle in settings
Ushie Jul 18, 2022
bceb864
Merge branch 'patching-foreground-service' of https://github.com/dant…
Ushie Jul 18, 2022
1209353
Revert "Merge branch 'patching-foreground-service' of https://github.…
Ushie Jul 18, 2022
28ddf9b
chore: bump patcher version to 2.5.1
Aunali321 Jul 21, 2022
c13b336
chore: bump java version to 17.
Aunali321 Jul 21, 2022
9de720e
chore: bump java version to 17 for kotlinOptions.
Aunali321 Jul 21, 2022
7e52514
use CoroutineWorker instead of foreground service
danthe1st Jul 24, 2022
68032c4
comment out nonroot installation logic
danthe1st Jul 24, 2022
32a45b4
Merge pull request #3 from danthe1st/worker
Aunali321 Jul 24, 2022
74d60d7
Update build_debug_apk.yml
Jul 24, 2022
a90e4d9
Merge pull request #4 from Canny1913/workflow
Ushie Jul 24, 2022
e707b6b
ci: remove unused stuff
Sculas Jul 24, 2022
033f326
chore: double quotes aren't needed [skip ci]
Sculas Jul 24, 2022
5429c83
ci: remove chmod [skip ci]
Sculas Jul 24, 2022
e1efc6b
Merge branch 'revanced:main' into main
Sculas Jul 24, 2022
bbcb609
Workflow trigger
Aunali321 Jul 24, 2022
bdff87d
build: update dependencies
Sculas Jul 24, 2022
95f83f6
chore: cleanup
Sculas Jul 24, 2022
1f18f21
Merge remote-tracking branch 'origin/main' into main
Sculas Jul 24, 2022
7f4a03b
fix: path component error once and for good
Sculas Jul 24, 2022
0ff70ba
chore: cleanup
Sculas Jul 24, 2022
116337b
fix: input file not being copied to output
Sculas Jul 24, 2022
1caaf44
fix: zfs wip (contains debug code)
Sculas Jul 24, 2022
fffcb11
feat: wip zip impl
Sculas Jul 24, 2022
7757e21
chore: disable root for now
Ushie Jul 24, 2022
02fcdbe
chore: add todo [skip ci]
Sculas Jul 25, 2022
f062ac4
feat: zip improvements
bogadana Jul 25, 2022
0749cd5
Merge pull request #6 from bogadana/zip
Aunali321 Jul 25, 2022
8236023
fix: make PatcherWorker not restart
danthe1st Jul 25, 2022
1a4dcad
fix: Stop previous patching instead of patching multiple times in par…
danthe1st Jul 25, 2022
159bbf2
Merge pull request #7 from danthe1st/worker
Aunali321 Jul 25, 2022
f9eb177
feat: SearchBar in AppSelectorScreen.
Aunali321 Jul 25, 2022
6ac1335
refactor: keep existing work instead of replacing
Sculas Jul 25, 2022
8eecb46
refactor: cleanup
Sculas Jul 25, 2022
9134676
feat: remove seperate zipalign step (#9)
bogadana Jul 25, 2022
65bf529
feat: partial custom apkselector.
Aunali321 Jul 25, 2022
da7ca80
refactor: cleanup
Sculas Jul 25, 2022
e875ab5
refactor: cleanup
Sculas Jul 25, 2022
d339dcb
refactor: wip stuff for file picker functionality
Sculas Jul 25, 2022
c7ec5d8
feat: add shitty implementation for filtering by bundle
Sculas Jul 25, 2022
d693b38
fix: disable forceDark
Ushie Jul 26, 2022
eefbb13
refactor: rename IconHeader to LogoHeader
Ushie Jul 27, 2022
8652ef5
fix: not copy resources if resource patching is disabled
danthe1st Jul 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/build_debug_apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Build with Gradle
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ./gradlew assembleDebug
- name: Store generated APK file
uses: actions/upload-artifact@v2
with:
name: revanced-manager
path: ./app/build/outputs/apk/debug/app-debug.apk
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,4 @@ lint/generated/
lint/outputs/
lint/tmp/
*.hprof
/.idea/deploymentTargetDropDown.xml
123 changes: 123 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

60 changes: 38 additions & 22 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@ repositories {
maven {
url = uri("https://maven.pkg.github.com/revanced/revanced-patcher")
credentials {
username =
(project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")) as String
password =
(project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")) as String
username = (project.findProperty("gpr.user") ?: System.getenv("GITHUB_ACTOR")) as String
password = (project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")) as String
}
}
}
Expand All @@ -39,43 +37,50 @@ android {
minSdk = 26
targetSdk = 32 // TODO: update to 33 when sources are available
versionCode = 1
versionName = "1.0"
versionName = "0.1"
buildConfigField("String", "VERSION_TYPE", "\"Alpha\"")

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}

applicationVariants.all {
kotlin.sourceSets {
getByName(name) {
kotlin.srcDir("build/generated/ksp/$name/kotlin")
}
}
}

buildTypes {
getByName("release") {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
)
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
jvmTarget = JavaVersion.VERSION_17.toString()
optIn("kotlin.RequiresOptIn")
}

buildFeatures {
compose = true
}

composeOptions {
kotlinCompilerExtensionVersion = composeVersion
}

packagingOptions {
jniLibs {
useLegacyPackaging = true
Expand All @@ -84,36 +89,44 @@ android {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}

buildToolsVersion = "33.0.0"
}

dependencies {
// Core
implementation("androidx.core:core-ktx:1.8.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.4.1")
implementation("androidx.activity:activity-compose:1.4.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.5.0")
implementation("androidx.activity:activity-compose:1.5.0")
implementation("androidx.compose.ui:ui:$composeVersion")
implementation("androidx.compose.ui:ui-tooling-preview:$composeVersion")
implementation("androidx.navigation:navigation-compose:2.5.0-rc02")
implementation("androidx.navigation:navigation-compose:2.5.0")
implementation("androidx.appcompat:appcompat:1.4.2")
implementation("androidx.core:core-splashscreen:1.0.0-rc01")

// ReVanced
implementation("app.revanced:revanced-patcher:2.0.4")
implementation("app.revanced:revanced-patcher:2.5.2")

// Signing & aligning
implementation("org.bouncycastle:bcpkix-jdk15on:1.70")
implementation("com.android.tools.build:apksig:7.2.1")

// Compose Destinations
implementation("io.github.raamcosta.compose-destinations:core:1.5.5-beta")
ksp("io.github.raamcosta.compose-destinations:ksp:1.5.5-beta")
implementation("io.github.raamcosta.compose-destinations:core:1.6.12-beta")
implementation("androidx.work:work-runtime-ktx:2.7.1")
ksp("io.github.raamcosta.compose-destinations:ksp:1.6.12-beta")

// Accompanist
implementation("com.google.accompanist:accompanist-drawablepainter:0.24.8-beta")
implementation("com.google.accompanist:accompanist-systemuicontroller:0.24.10-beta")
implementation("com.google.accompanist:accompanist-systemuicontroller:0.24.13-rc")

// libsu
implementation("com.github.topjohnwu.libsu:core:4.0.3")
implementation("com.github.topjohnwu.libsu:io:4.0.3")
// implementation("com.github.topjohnwu.libsu:core:4.0.3")
// implementation("com.github.topjohnwu.libsu:io:4.0.3")

// AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
implementation("com.github.JamalMulla:ComposePrefs3:1.0.2")
implementation("androidx.datastore:datastore-preferences:1.0.0")

// Room
implementation("androidx.room:room-runtime:$roomVersion")
Expand All @@ -128,8 +141,8 @@ dependencies {
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")

// Material 3 + 2
implementation("androidx.compose.material3:material3-window-size-class:1.0.0-alpha13")
implementation("androidx.compose.material3:material3:1.0.0-alpha13")
implementation("androidx.compose.material3:material3-window-size-class:1.0.0-alpha14")
implementation("androidx.compose.material3:material3:1.0.0-alpha14")
implementation("androidx.compose.material:material:1.1.1")

// Tests
Expand All @@ -139,8 +152,11 @@ dependencies {
androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0")
androidTestImplementation("androidx.compose.ui:ui-test-junit4:$composeVersion")
implementation(kotlin("script-runtime"))

// Coil for network image
implementation("io.coil-kt:coil-compose:2.1.0")
}

fun org.jetbrains.kotlin.gradle.dsl.KotlinJvmOptions.optIn(library: String) {
freeCompilerArgs = freeCompilerArgs + "-opt-in=$library"
}
}
21 changes: 11 additions & 10 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<permission
android:name="android.permission.QUERY_ALL_PACKAGES"
tools:ignore="ReservedSystemPermission" />

<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.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission
android:name="android.permission.MANAGE_EXTERNAL_STORAGE"
tools:ignore="ScopedStorage" />
Expand All @@ -21,17 +24,17 @@

<application
android:allowBackup="true"
android:extractNativeLibs="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:requestLegacyExternalStorage="true"
android:extractNativeLibs="true"

android:theme="@style/Theme.ReVancedManager"

tools:targetApi="32">
<activity
android:name=".ShellHeater"
android:name=".MainActivity"
android:exported="true"
android:theme="@style/Theme.ReVancedManager">

Expand All @@ -41,10 +44,8 @@
</intent-filter>
</activity>

<activity
android:name=".MainActivity"
android:exported="false"
android:theme="@style/Theme.ReVancedManager" />
<service android:name=".ui.screens.mainsubscreens.PatcherWorker"
android:isolatedProcess="true"
android:foregroundServiceType="" />
</application>

</manifest>
Binary file added app/src/main/ic_launcher-playstore.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 12 additions & 3 deletions app/src/main/java/app/revanced/manager/Global.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ package app.revanced.manager

class Global {
companion object {
private const val websiteUrl = "https://revanced.app"
const val githubUrl = "$websiteUrl/github"
const val discordUrl = "$websiteUrl/discord"
const val websiteUrl = "https://revanced.app"

val socialLinks = mapOf(
R.drawable.ic_web to "$websiteUrl",
R.drawable.ic_discord to "$websiteUrl/discord",
R.drawable.ic_github to "$websiteUrl/github",
R.drawable.ic_twitter to "https://twitter.com/revancedapp",
R.drawable.ic_reddit to "https://reddit.com/r/revancedapp",
R.drawable.ic_telegram to "https://t.me/app_revanced",
R.drawable.ic_youtube to "https://youtube.com/channel/UCLktAUh5Gza9zAJBStwxNdw",

)

private const val ghOrg = "revanced"
const val ghPatches = "$ghOrg/revanced-patches"
Expand Down
Loading