Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
15 changes: 12 additions & 3 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@ name: Android CI

on:
push:
branches: [ master ]
branches:
- master
pull_request:
branches: [ master ]
branches:
- master
paths:
- '.github/workflows/*.yml'
workflow_dispatch:

jobs:
build:
Expand All @@ -20,6 +25,10 @@ jobs:
with:
java-version: 1.8

- name: Sync latest Unblocked Music source code
run:
git clone --depth=1 https://github.com/luoxingran/server.git && cd server && zip -r ../UnblockNeteaseMusic.zip . && cd .. && rm ./app/src/main/assets/UnblockNeteaseMusic.zip && rm -rf server && mv ./UnblockNeteaseMusic.zip ./app/src/main/assets/UnblockNeteaseMusic.zip

- name: Grant execute permission for gradlew
run: chmod +x gradlew

Expand All @@ -32,4 +41,4 @@ jobs:
name: app-release
path: ${{github.workspace}}/app/build/outputs/apk/release/*.apk
if-no-files-found: warn
retention-days: 30
retention-days: 30
67 changes: 67 additions & 0 deletions .github/workflows/upUnblockMusic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build Modified APK

on:
workflow_dispatch:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup environment
run: |
sudo apt-get update
sudo apt-get install -y wget curl unzip zipalign openjdk-11-jdk

- name: Download tools
run: |
# 下载apktool
wget -q https://github.com/iBotPeaches/Apktool/releases/download/v2.8.1/apktool_2.8.1.jar -O apktool.jar
wget -q https://raw.githubusercontent.com/iBotPeaches/Apktool/master/scripts/linux/apktool
chmod +x apktool

# 下载签名工具
wget -q https://github.com/patrickfav/uber-apk-signer/releases/download/v1.3.0/uber-apk-signer-1.3.0.jar

- name: Get latest APK
run: |
# 获取最新发布的APK
LATEST_URL=$(curl -s https://api.github.com/repos/luoxingran/dolby_beta/releases/latest | grep browser_download_url | grep .apk | head -1 | cut -d '"' -f 4)
wget -O original.apk "$LATEST_URL"

- name: Update UnblockNeteaseMusic
run: |
git clone --depth=1 https://github.com/UnblockNeteaseMusic/server.git
cd server && zip -r ../UnblockNeteaseMusic.zip . && cd ..

- name: Decompile and modify
run: |
./apktool d original.apk -o decoded
cp UnblockNeteaseMusic.zip decoded/assets/

- name: Rebuild APK
run: |
./apktool b decoded -o unsigned.apk

- name: Sign APK
run: |
java -jar uber-apk-signer-1.3.0.jar \
--apks unsigned.apk \
--ks app/lin.jks \
--ksAlias lin \
--ksPass 123456 \
--ksKeyPass 123456 \
--out .
mv unsigned-aligned-signed.apk dolby_beta_modified.apk

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: modified-apk
path: dolby_beta_modified.apk
retention-days: 30
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

## 下载方式

[GitHub Release](https://github.com/nining377/dolby_beta/releases/latest)
[GitHub Release](https://github.com/luoxingran/dolby_beta/releases/latest)

[杜比大喇叭β版](https://wwi.lanzoui.com/b0cqxgwje) 访问密码:brdb

Expand Down
13 changes: 13 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
apply plugin: 'com.android.application'

Properties props = new Properties()
props.load(new FileInputStream(file("signing.properties")))

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
Expand All @@ -16,12 +19,22 @@ android {
}
}

signingConfigs {
release{
keyAlias props['KEY_ALIAS']
keyPassword props['KEY_PASSWORD']
storeFile file(props['KEYSTORE_FILE'])
storePassword props['KEYSTORE_PASSWORD']
}
}

buildTypes {
release {
buildConfigField "boolean", "LOG_DEBUG", "false" //不显示log
shrinkResources false //资源压缩
minifyEnabled false //混淆
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}

Expand Down
Binary file added app/lin.jks
Binary file not shown.
4 changes: 4 additions & 0 deletions app/signing.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
KEYSTORE_FILE = ./lin.jks
KEYSTORE_PASSWORD = 123456
KEY_ALIAS = lin
KEY_PASSWORD = 123456
3 changes: 1 addition & 2 deletions app/src/main/java/com/raincat/dolby_beta/Hook.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
}
//一起听
if (SettingHelper.getInstance().isEnable(SettingHelper.listen_key)) {
new ListentogetherHook(context, versionCode);

new ListentogetherHook(context,versionCode);
}
//不变灰
new GrayHook(context);
Expand Down
Loading
Loading