Skip to content

Commit

Permalink
Merge branch 'main' into troubleshooting-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kyujin-cho committed May 16, 2024
2 parents 0e3b225 + 737a605 commit 0d60015
Show file tree
Hide file tree
Showing 31 changed files with 1,368 additions and 690 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: 'Auto Author Assign'

on:
pull_request_target:
types: [opened, reopened]

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/[email protected]
15 changes: 12 additions & 3 deletions .github/workflows/build-aab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
filename: ${{ steps.build_aab.outputs.upload_filename }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
/usr/local/lib/android
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties' )}}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up OpenJDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -27,10 +36,10 @@ jobs:
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install required platform
run: sdkmanager "platforms;android-33" "build-tools;33.0.2"
run: sdkmanager "platforms;android-34" "build-tools;34.0.0"
- name: Replace android.jar
run: |
curl -L https://github.com/Reginer/aosp-android-jar/raw/main/android-33/android.jar > /usr/local/lib/android/sdk/platforms/android-33/android.jar
curl -L https://github.com/Reginer/aosp-android-jar/raw/main/android-34/android.jar > /usr/local/lib/android/sdk/platforms/android-34/android.jar
- name: Build App Bundle
id: build_aab
run: |
Expand All @@ -45,7 +54,7 @@ jobs:
- name: Sign APK
run: |
echo "${KEY_PASSWORD}" | \
$ANDROID_SDK_ROOT/build-tools/33.0.2/apksigner sign \
$ANDROID_SDK_ROOT/build-tools/34.0.0/apksigner sign \
--ks keystore.jks --ks-key-alias "${KEY_ALIAS}" \
--key-pass "env:KEY_PASSWORD" \
--out dev.bluehouse.enablevolte.aab \
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/build-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,15 @@ jobs:
filename: ${{ steps.build_apk.outputs.upload_filename }}
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
/usr/local/lib/android
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties' )}}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up OpenJDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -31,10 +40,10 @@ jobs:
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install required platform
run: sdkmanager "platforms;android-33" "build-tools;33.0.2"
run: sdkmanager "platforms;android-34" "build-tools;34.0.0"
- name: Replace android.jar
run: |
curl -L https://github.com/Reginer/aosp-android-jar/raw/main/android-33/android.jar > /usr/local/lib/android/sdk/platforms/android-33/android.jar
curl -L https://github.com/Reginer/aosp-android-jar/raw/main/android-34/android.jar > /usr/local/lib/android/sdk/platforms/android-34/android.jar
- name: Build APK
id: build_apk
run: |
Expand All @@ -51,7 +60,7 @@ jobs:
BUILD_TYPE: ${{ inputs.build-type }}
RUN_ID: ${{ github.run_id }}
- name: align APK with zipalign
run: $ANDROID_SDK_ROOT/build-tools/33.0.2/zipalign -v -p 4 app/build/outputs/apk/${BUILD_TYPE}/${FILENAME} app-unsigned-aligned.apk
run: $ANDROID_SDK_ROOT/build-tools/34.0.0/zipalign -v -p 4 app/build/outputs/apk/${BUILD_TYPE}/${FILENAME} app-unsigned-aligned.apk
env:
BUILD_TYPE: ${{ inputs.build-type }}
FILENAME: ${{ steps.build_apk.outputs.build_filename }}
Expand All @@ -60,11 +69,17 @@ jobs:
env:
KEYSTORE_B64: ${{ secrets.keystore }}
- name: Sign APK
run: echo "${KEY_PASSWORD}" | $ANDROID_SDK_ROOT/build-tools/33.0.2/apksigner sign --ks keystore.jks --ks-key-alias "${KEY_ALIAS}" --key-pass "env:KEY_PASSWORD" --out dev.bluehouse.enablevolte.apk app-unsigned-aligned.apk
run: echo "${KEY_PASSWORD}" | $ANDROID_SDK_ROOT/build-tools/34.0.0/apksigner sign --ks keystore.jks --ks-key-alias "${KEY_ALIAS}" --key-pass "env:KEY_PASSWORD" --out dev.bluehouse.enablevolte.apk app-unsigned-aligned.apk
env:
KEY_ALIAS: ${{ secrets.key-alias }}
KEY_PASSWORD: ${{ secrets.key-password }}
BUILD_TYPE: ${{ inputs.build-type }}
if: ${{ env.KEY_PASSWORD != '' }}
- name: Rename APK
run: mv app-unsigned-aligned.apk dev.bluehouse.enablevolte.apk
env:
KEY_PASSWORD: ${{ secrets.key-password }}
if: ${{ env.KEY_PASSWORD == '' }}
- name: Upload APK
uses: actions/upload-artifact@v3
with:
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/build-debug-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: default

on:
push:
paths:
- 'app/src/**'
pull_request:
paths:
- 'app/src/**'
permissions:
pull-requests: write

jobs:
build-debug-apk:
needs: [lint]
if: github.event_name == 'pull_request'
uses: ./.github/workflows/build-apk.yml
with:
build-type: debug
secrets:
key-alias: ${{ secrets.DEBUG_KEY_ALIAS }}
keystore: ${{ secrets.DEBUG_KEYSTORE_B64 }}
key-password: ${{ secrets.DEBUG_KEY_PASSWORD }}
post-apk-link:
needs: [build-debug-apk]
runs-on: ubuntu-latest
steps:
- name: Post link to action run detail page
uses: actions/github-script@v6
with:
script: |
try {
const commentResult = await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `APK build completed! Visit [action run detail page](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) to download the APK to test this pull request.`
})
console.log(commentResult)
} catch (e) {
console.log("Comment not posted:")
console.log(e)
}
25 changes: 0 additions & 25 deletions .github/workflows/default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,6 @@ jobs:
with:
report-path: build/*.xml # Support glob patterns by https://www.npmjs.com/package/@actions/glob
continue-on-error: false # If annotations contain error of severity, action-ktlint exit 1.
build-debug-apk:
needs: [lint]
if: github.event_name == 'pull_request'
uses: ./.github/workflows/build-apk.yml
with:
build-type: debug
secrets:
key-alias: ${{ secrets.DEBUG_KEY_ALIAS }}
keystore: ${{ secrets.DEBUG_KEYSTORE_B64 }}
key-password: ${{ secrets.DEBUG_KEY_PASSWORD }}
post-apk-link:
needs: [build-debug-apk]
runs-on: ubuntu-latest
steps:
- name: Post link to action run detail page
uses: actions/github-script@v6
with:
script: |
const commentResult = await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `APK build completed! Visit [action run detail page](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) to download the APK to test this pull request.`
})
console.log(commentResult)
build-release-apk:
needs: [lint]
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
Expand Down
9 changes: 9 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

2 changes: 1 addition & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ only if installing Shizuku using ADB
5. Restart your Pixel phone a couple of times until you can see VoLTE is working.

### Build application from source
Download [patched android.jar](https://github.com/Reginer/aosp-android-jar/raw/main/android-33/android.jar), put it under `$ANDROID_PATH/sdk/platforms/android-33` and start hacking as usual.
Download [patched android.jar](https://github.com/Reginer/aosp-android-jar/raw/main/android-34/android.jar), put it under `$ANDROID_PATH/sdk/platforms/android-34` and start hacking as usual.

## FAQ

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ English version available [here](https://github.com/kyujin-cho/pixel-volte-patch
6. VoLTE가 작동하는 것을 확인할 때 까지 5분 간격으로 2-3회 Pixel 기기를 다시 시작합니다.

### APK 직접 빌드
[패치된 android.jar](https://github.com/Reginer/aosp-android-jar/raw/main/android-33/android.jar) 파일을 다운로드 후에 `$ANDROID_PATH/sdk/platforms/android-33` 경로 아래에 붙여넣습니다. 이후에 앱을 빌드 및 시작합니다.
[패치된 android.jar](https://github.com/Reginer/aosp-android-jar/raw/main/android-34/android.jar) 파일을 다운로드 후에 `$ANDROID_PATH/sdk/platforms/android-34` 경로 아래에 붙여넣습니다. 이후에 앱을 빌드 및 시작합니다.

## 자주 묻는 질문

Expand Down
28 changes: 14 additions & 14 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ plugins {

android {
namespace 'dev.bluehouse.enablevolte'
compileSdk 33
compileSdk 34

defaultConfig {
applicationId "dev.bluehouse.enablevolte"
minSdk 29
targetSdk 33
targetSdk 34
versionCode 13
versionName "1.2.8"

Expand All @@ -36,6 +36,7 @@ android {
buildFeatures {
compose true
aidl true
buildConfig true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.0"
Expand All @@ -48,18 +49,17 @@ android {
}

dependencies {
def nav_version = "2.5.3"
def material3_version = "1.1.0-beta01"
debugImplementation 'androidx.compose.ui:ui-tooling:1.6.1'
def compose_runtime_version = "1.4.0-beta01"

implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.core:core-ktx:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.11.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

implementation 'androidx.activity:activity-compose:1.6.1'
implementation 'androidx.activity:activity-compose:1.8.2'

implementation "androidx.navigation:navigation-compose:$nav_version"
implementation "androidx.navigation:navigation-compose:2.7.7"

implementation "androidx.compose.runtime:runtime:$compose_runtime_version"
implementation "androidx.compose.runtime:runtime-livedata:$compose_runtime_version"
Expand All @@ -68,15 +68,15 @@ dependencies {
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"

implementation "androidx.compose.material:material:1.3.1"
implementation "androidx.compose.material3:material3:$material3_version"
implementation "androidx.compose.material:material:1.6.1"
implementation "androidx.compose.material3:material3:1.2.0"

implementation("io.arrow-kt:arrow-core:1.2.0-RC")
implementation("io.arrow-kt:arrow-fx-coroutines:1.2.0-RC")
implementation "io.arrow-kt:arrow-core:1.2.0-RC"
implementation "io.arrow-kt:arrow-fx-coroutines:1.2.0-RC"

implementation "com.google.accompanist:accompanist-systemuicontroller:0.28.0"

def shizuku_version = "13.1.0"
def shizuku_version = "13.1.5"
implementation "dev.rikka.shizuku:api:$shizuku_version"
implementation "dev.rikka.shizuku:provider:$shizuku_version"
implementation 'com.anggrayudi:android-hidden-api:30.0'
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/Theme.EnableVoLTE"
tools:targetApi="33"
tools:targetApi="34"
android:localeConfig="@xml/locales_config">
<activity
android:name=".HomeActivity"
Expand Down
Loading

0 comments on commit 0d60015

Please sign in to comment.