├── .github └── workflows │ ├── Build-cn.yml │ ├── Build-hd.yml │ ├── Build-play.yml │ ├── Build.yml │ ├── Check-bili-update.yml │ ├── Init.yml │ ├── Nightly-Build.yml │ ├── Release-Build.yml │ └── recompose.yml ├── .gitignore ├── BiliRoamingX.p12 ├── Build.prop ├── LICENSE ├── Merge-Resource ├── BiliRoamingX-CI-Build.zip ├── Build.prop ├── README.md ├── Upgrade.kt ├── biliroaming_setting_custom_update_source.xml ├── ci.yml ├── head-commit-id.txt ├── old-commit-id.txt └── version.txt ├── Nightly.jpg ├── README.md ├── build ├── Build.prop ├── Changelog.txt ├── Changelog_Nightly.txt ├── integrations.apk └── patches.jar └── composed ├── MiscFragment.kt ├── Settings.kt ├── SettingsResourcePatch.kt ├── arrays.xml ├── biliroaming_setting_misc.xml ├── fragments.kt ├── strings.xml └── strings_raw.xml /.github/workflows/Build-cn.yml: -------------------------------------------------------------------------------- 1 | name: Build Bilix-cn 2 | 3 | on: 4 | repository_dispatch: 5 | types: [Build-cn] 6 | 7 | jobs: 8 | Build-Bilix-cn: 9 | name: Build Bilix-cn 10 | strategy: 11 | fail-fast: false 12 | 13 | runs-on: ubuntu-latest 14 | steps: 15 | 16 | # Get $publishTime 17 | - name: Get Current Time 18 | run: | 19 | TIME=$EPOCHSECONDS 20 | echo "TIME=$TIME" >> $GITHUB_ENV 21 | Day=$(date +"%-m.%-d") 22 | echo "Day=$Day" >> $GITHUB_ENV 23 | 24 | # Check repo 25 | - name: Checkout code 26 | uses: actions/checkout@v4 27 | 28 | # Save env 29 | - name: Initialize variables 30 | run: | 31 | # Check custom 32 | echo "url-custom-cn=`awk -F "=" '$1 == "url.custom.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 33 | echo "url-custom-revanced-cli=`awk -F "=" '$1 == "url.custom.revanced.cli" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 34 | # Get custom url 35 | echo "cn-url=`awk -F "=" '$1 == "url.custom.bilibili.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 36 | echo "cli-url=`awk -F "=" '$1 == "url.custom.revanced.cli.url" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 37 | # Get version info 38 | echo "ver=`awk -F "=" '$1 == "BiliRoamingX.ver.full" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 39 | echo "bigver=`awk -F "=" '$1 == "BiliRoamingX.ver.code" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 40 | # Build need 41 | echo "Build-Bilix=`awk -F "=" '$1 == "Bilix.build.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 42 | echo "with-release=`awk -F "=" '$1 == "temp.with.release" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 43 | echo "release=`awk -F "=" '$1 == "temp.release.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 44 | # Changelog need 45 | echo "push-changelog=`awk -F "=" '$1 == "push.changelog" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 46 | echo "Nightly-Changelog<> $GITHUB_ENV 47 | cat ./build/Changelog_Nightly.txt >> $GITHUB_ENV 48 | echo "EOF" >> $GITHUB_ENV 49 | cd ./ 50 | git clone https://github.com/sti-233/Bilix-PreBuilds.git 51 | cd ./Bilix-PreBuilds 52 | echo "commit-count=`git rev-list HEAD --count`" >> $GITHUB_ENV 53 | echo "hash=`git log -1 --format="%h"`" >> $GITHUB_ENV 54 | cd $GITHUB_WORKSPACE 55 | rm -r ./Bilix-PreBuilds 56 | 57 | # Get revanced-cli 58 | - name: Get Revanced-cli 59 | if: ${{ env.Build-Bilix == 'true' }} 60 | run: | 61 | cd ./ 62 | echo Downloading modified revanced-cli 63 | wget https://github.com/zjns/revanced-cli/releases/download/v4.6.0.1/revanced-cli.jar 64 | cp ./build/patches.jar ./patches.jar 65 | cp ./build/integrations.apk ./integrations.apk 66 | 67 | # Get original bilibili url 68 | - name: Get original bilibili url 69 | if: ${{ env.url-custom-cn == 'false' && env.Build-Bilix == 'true' }} 70 | run: | 71 | wget https://t.me/s/bilibili_apk_beta 72 | echo "cn-url=$(grep '
原版64位 ' bilibili_apk_beta | tee original-message.txt | grep -oP '\(\K[0-9]+' | sort -n | tail -1 | xargs -I {} grep {} original-message.txt | sed -n 's/.*rel="noopener">\(.*\)<\/a>.*/\1/p')" >> $GITHUB_ENV 73 | 74 | # Get original bilibili 75 | - name: Get original bilibili-cn 76 | if: ${{ env.Build-Bilix == 'true' }} 77 | run: | 78 | aria2c --out "cn.apk" ${{ env.cn-url }} 79 | 80 | # Check $version & $versionCode 81 | - name: "Get Cn Info" 82 | if: ${{ env.Build-Bilix == 'true' }} 83 | id: "apk-info-cn" 84 | uses: "8Mi-Tech/get-apk-info-action@master" 85 | with: 86 | apkPath: "cn.apk" 87 | #版本号:${{steps.apk-info.outputs.versionNum}} 88 | #版本代码:${{steps.apk-info.outputs.versionCode}} 89 | 90 | # Get cn $patchVersion $patchVersionCode 91 | - name: Get Bilibili-cn info 92 | if: ${{ env.Build-Bilix == 'true' }} 93 | run: | 94 | echo "Bilix-ver=${{steps.apk-info-cn.outputs.versionNum}}" >> $GITHUB_ENV 95 | echo "Bilix-vercode=${{steps.apk-info-cn.outputs.versionCode}}" >> $GITHUB_ENV 96 | 97 | # build part 98 | - name: Build Bilix 99 | if: ${{ env.Build-Bilix == 'true' }} 100 | run: | 101 | java -jar revanced-cli.jar patch --merge integrations.apk --patch-bundle patches.jar --signing-levels 1,2,3 cn.apk 102 | 103 | # named Bilix 104 | - name: Rename Bilix 105 | if: ${{ env.Build-Bilix == 'true' }} 106 | run: | 107 | mv cn-patched.apk Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 108 | 109 | # Signing Bilix 110 | - name: Resign Bilix 111 | if: ${{ env.Build-Bilix == 'true' }} 112 | run: | 113 | cd ./ 114 | echo Downloading uber-apk-signer 115 | wget https://github.com/patrickfav/uber-apk-signer/releases/download/v1.3.0/uber-apk-signer-1.3.0.jar 116 | java -jar uber-apk-signer-1.3.0.jar -a Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk --overwrite --allowResign --ks BiliRoamingX.p12 --ksAlias ${{ secrets.signalias }} --ksKeyPass ${{ secrets.signkey }} --ksPass ${{ secrets.signkey }} 117 | 118 | # Get $sn 119 | - name: Get sn from Bilix 120 | if: ${{ env.Build-Bilix == 'true' }} 121 | run: | 122 | sudo apt-get install aapt 123 | aapt dump xmltree ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk AndroidManifest.xml > AndroidManifest_output_cn.txt 124 | echo "cn-sn=$(grep "BUILD_SN" ./AndroidManifest_output_cn.txt -A 1 | grep "android:value" | cut -d'=' -f2 | cut -d')' -f2 | awk '{printf "%d\n", strtonum($1)}')" >> $GITHUB_ENV 125 | 126 | # Get $md5 127 | - name: Get md5 from Bilix 128 | if: ${{ env.Build-Bilix == 'true' }} 129 | run: | 130 | echo "cn-md5=$(md5sum ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk | cut -d ' ' -f 1)" >> $GITHUB_ENV 131 | 132 | # Get $size 133 | - name: Get size from Bilix 134 | if: ${{ env.Build-Bilix == 'true' }} 135 | run: | 136 | echo "cn-size=$(stat -c %s ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk)" >> $GITHUB_ENV 137 | 138 | # Release part 139 | - name: Release Bilix 140 | id: cn_release 141 | if: ${{ env.Build-Bilix == 'true' && (env.with-release == 'true' || env.release == 'true') }} 142 | uses: softprops/action-gh-release@v2 143 | with: 144 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 145 | fail_on_unmatched_files: true 146 | name: 'Bilix ${{ env.Bilix-ver }}(${{ env.Bilix-vercode }}) with BiliroamingX ${{ env.ver }}' 147 | tag_name: 'android-v${{ env.Bilix-ver }}-b${{ env.cn-sn }}-p${{ env.ver }}' 148 | body: | 149 | 版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }} 150 | > 合并主分支 151 | > Bump bili ver to ${{ env.Bilix-vercode }} 152 | 153 | ${{ env.Nightly-Changelog }} 154 | files: ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 155 | continue-on-error: true 156 | 157 | - name: Release Again 158 | run: | 159 | curl --request PATCH \ 160 | --header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ 161 | --header 'Content-type: application/json' \ 162 | --header 'User-Agent: Github-Action' \ 163 | --url https://api.github.com/repos/sti-233/Bilix-Prebuilds/releases/${{ steps.cn_release.outputs.id }} \ 164 | --data '{ "draft": false }' 165 | 166 | # Del Release Nightly ver 167 | - name: Delete old Nightly Bilix 168 | if: ${{ env.Build-Bilix == 'true' }} 169 | env: 170 | GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 171 | run: | 172 | gh release view "Nightly-android-Nightly" && gh release delete "Nightly-android-Nightly" -y --cleanup-tag 173 | continue-on-error: true 174 | 175 | # named Bilix-Nightly 176 | - name: Rename Bilix-Nightly 177 | if: ${{ env.Build-Bilix == 'true' }} 178 | run: | 179 | mv Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk Bilix-cn-Nightly@Aniruf_x.apk 180 | 181 | # Release Nightly 182 | - name: Release Bilix-Nightly 183 | id: cn_nightly 184 | if: ${{ env.Build-Bilix == 'true' }} 185 | uses: softprops/action-gh-release@v2 186 | with: 187 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 188 | fail_on_unmatched_files: false 189 | name: 'Bilix Nightly - BiliRoamingX ${{ env.ver }}' 190 | tag_name: 'Nightly-android-Nightly' 191 | body: | 192 | 版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }} 193 | 194 | ![Nightly.jpg](https://github.com/sti-233/Bilix-PreBuilds/blob/main/Nightly.jpg) 195 | > 合并主分支 196 | > Bump bili-cn ver to ${{ env.Bilix-vercode }} 197 | 198 | ${{ env.Nightly-Changelog }} 199 | files: | 200 | ./Bilix-cn-Nightly@Aniruf_x.apk 201 | continue-on-error: true 202 | 203 | - name: Release Nightly Again 204 | run: | 205 | curl --request PATCH \ 206 | --header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ 207 | --header 'Content-type: application/json' \ 208 | --header 'User-Agent: Github-Action' \ 209 | --url https://api.github.com/repos/sti-233/Bilix-Prebuilds/releases/${{ steps.cn_nightly.outputs.id }} \ 210 | --data '{ "draft": false }' 211 | 212 | # output Bilix informations 213 | - name: Build Bilix Success 214 | if: ${{ env.Build-Bilix == 'true' }} 215 | run: | 216 | echo "### Build Bilix Success" >> $GITHUB_STEP_SUMMARY 217 | echo "版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 218 | echo " " >> $GITHUB_STEP_SUMMARY 219 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 220 | echo " > Bump bili ver to ${{ env.Bilix-vercode }}" >> $GITHUB_STEP_SUMMARY 221 | echo " " >> $GITHUB_STEP_SUMMARY 222 | echo "$(cat ./build/Changelog_Nightly.txt)" >> $GITHUB_STEP_SUMMARY 223 | continue-on-error: true 224 | 225 | - name: Upload Build Resource 226 | if: ${{ env.Build-Bilix == 'true' }} 227 | run: | 228 | cd ./ 229 | rm ./Build.prop 230 | cp ./build/Build.prop ./Build.prop 231 | git config --global user.name 'github-actions[bot]' 232 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 233 | git add Build.prop 234 | git commit -m "Push prop" 235 | git push 236 | continue-on-error: true 237 | 238 | - name: Setup Python 239 | uses: actions/setup-python@v5 240 | with: 241 | python-version: '3.9.x' 242 | 243 | - name: Prepare 244 | run : | 245 | mv ./Bilix-cn-Nightly@Aniruf_x.apk ./Bilix-cn-Nightly-n.${{ env.commit-count }}.${{ env.hash }}@Aniruf_x.apk 246 | echo "Nightly_apk=./Bilix-cn-Nightly-n.${{ env.commit-count }}.${{ env.hash }}@Aniruf_x.apk" >> $GITHUB_ENV 247 | pip install pyrogram tgcrypto 248 | 249 | - name: Post to Channel 250 | shell: python 251 | env: 252 | API_ID: ${{ secrets.TELEGRAM_API_ID }} 253 | API_HASH: ${{ secrets.TELEGRAM_API_HASH }} 254 | chat_id: ${{ secrets.CHANNEL_ID }} 255 | session: ${{ secrets.TELEGRAM_SESSION }} 256 | run: | 257 | import asyncio 258 | import inspect 259 | import os 260 | from pyrogram import Client 261 | from pyrogram.types import InputMediaDocument 262 | async def main(): 263 | session = os.environ["session"] 264 | bot = Client( 265 | "client", 266 | session_string=session, 267 | ) 268 | async with bot: 269 | Day = os.environ["Day"] 270 | RoamingXver = os.environ["ver"] 271 | ver = os.environ["Bilix-ver"] 272 | ver_code = os.environ["Bilix-vercode"] 273 | chat_id = os.environ["chat_id"] 274 | changelog = os.environ["Nightly-Changelog"] 275 | msg_p1 = f"Bilix Nightly - {Day}" 276 | msg_p2 = f"BiliRoamingX {RoamingXver}" 277 | msg_p3 = f"
cn {ver} {ver_code}
" 278 | msg_p4 = "New release to GitHub!
"
279 |               msg_p5 = inspect.cleandoc("""
280 |               > 合并 sti-233/BiliRoamingX
281 |                *现在具有切换更新源的能力\n
282 |               """)
283 |               msg_p6 = f"{changelog}
" 284 | msg_p7 = inspect.cleandoc(""" 285 | by sti-233 286 | 在Github查看详情 287 | 288 | *此为非官方构建 289 | Patched by @Aniruf_x 290 | #Biliroaming_X #cn 291 | """) 292 | caption = "{}\n\n{}\n{}\n\n{}\n{}\n{}{}".format(msg_p1, msg_p2, msg_p3, msg_p4, msg_p5, msg_p6, msg_p7) 293 | Nightly = InputMediaDocument(media=os.environ["Nightly_apk"], caption=caption) 294 | # 发送到指定的频道 295 | await bot.send_media_group( 296 | chat_id=chat_id, 297 | media=[Nightly], 298 | ) 299 | async def wait(): 300 | try: 301 | await asyncio.wait_for(main(), timeout=600) 302 | except asyncio.TimeoutError: 303 | print("message send timeout!!!") 304 | exit(1) 305 | asyncio.run(wait()) 306 | 307 | # Success 308 | - name: End 309 | run: echo "Build end." -------------------------------------------------------------------------------- /.github/workflows/Build-hd.yml: -------------------------------------------------------------------------------- 1 | name: Build Bilix-hd 2 | 3 | on: 4 | repository_dispatch: 5 | types: [Build-hd] 6 | 7 | jobs: 8 | Build-Bilix-hd: 9 | name: Build Bilix-hd 10 | strategy: 11 | fail-fast: false 12 | 13 | runs-on: ubuntu-latest 14 | steps: 15 | 16 | # Get $publishTime 17 | - name: Get Current Time 18 | run: | 19 | TIME=$EPOCHSECONDS 20 | echo "TIME=$TIME" >> $GITHUB_ENV 21 | Day=$(date +"%-m.%-d") 22 | echo "Day=$Day" >> $GITHUB_ENV 23 | 24 | # Check repo 25 | - name: Checkout code 26 | uses: actions/checkout@v4 27 | 28 | # Save env 29 | - name: Initialize variables 30 | run: | 31 | # Check custom 32 | echo "url-custom-hd=`awk -F "=" '$1 == "url.custom.hd" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 33 | echo "url-custom-revanced-cli=`awk -F "=" '$1 == "url.custom.revanced.cli" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 34 | # Get custom url 35 | echo "hd-url=`awk -F "=" '$1 == "url.custom.bilibili.hd" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 36 | echo "cli-url=`awk -F "=" '$1 == "url.custom.revanced.cli.url" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 37 | # Get version info 38 | echo "ver=`awk -F "=" '$1 == "BiliRoamingX.ver.full" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 39 | echo "bigver=`awk -F "=" '$1 == "BiliRoamingX.ver.code" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 40 | # Build need 41 | echo "Build-Bilix=`awk -F "=" '$1 == "Bilix.build.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 42 | echo "Build-Bilix-play=`awk -F "=" '$1 == "Bilix.build.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 43 | echo "Build-Bilix-hd=`awk -F "=" '$1 == "Bilix.build.hd" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 44 | echo "with-release=`awk -F "=" '$1 == "temp.with.release" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 45 | echo "release=`awk -F "=" '$1 == "temp.release.hd" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 46 | # Changelog need 47 | echo "push-changelog=`awk -F "=" '$1 == "push.changelog" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 48 | echo "Nightly-Changelog<> $GITHUB_ENV 49 | cat ./build/Changelog_Nightly.txt >> $GITHUB_ENV 50 | echo "EOF" >> $GITHUB_ENV 51 | cd ./ 52 | git clone https://github.com/sti-233/Bilix-PreBuilds.git 53 | cd ./Bilix-PreBuilds 54 | echo "commit-count=`git rev-list HEAD --count`" >> $GITHUB_ENV 55 | echo "hash=`git log -1 --format="%h"`" >> $GITHUB_ENV 56 | cd $GITHUB_WORKSPACE 57 | rm -r ./Bilix-PreBuilds 58 | 59 | # Get revanced-cli 60 | - name: Get Revanced-cli 61 | if: ${{ env.Build-Bilix-hd == 'true' }} 62 | run: | 63 | cd ./ 64 | echo Downloading modified revanced-cli 65 | wget https://github.com/zjns/revanced-cli/releases/download/v4.6.0.1/revanced-cli.jar 66 | cp ./build/patches.jar ./patches.jar 67 | cp ./build/integrations.apk ./integrations.apk 68 | 69 | # Get original bilibili url 70 | - name: Get original bilibili url 71 | if: ${{ env.url-custom-hd == 'false' && env.Build-Bilix-hd == 'true' }} 72 | run: | 73 | wget https://t.me/s/bilibili_apk_beta 74 | echo "hd-url=$(grep '
HD版64位 ' bilibili_apk_beta | tee original-message.txt | grep -oP '\(\K[0-9]+' | sort -n | tail -1 | xargs -I {} grep {} original-message.txt | sed -n 's/.*rel="noopener">\(.*\)<\/a>.*/\1/p')" >> $GITHUB_ENV 75 | 76 | # Get original bilibili 77 | - name: Get original bilibili-hd 78 | if: ${{ env.Build-Bilix-hd == 'true' }} 79 | run: | 80 | aria2c --out "hd.apk" ${{ env.hd-url }} 81 | 82 | # Check $version & $versionCode 83 | - name: "Get hd Info" 84 | if: ${{ env.Build-Bilix-hd == 'true' }} 85 | id: "apk-info-hd" 86 | uses: "8Mi-Tech/get-apk-info-action@master" 87 | with: 88 | apkPath: "hd.apk" 89 | #版本号:${{steps.apk-info.outputs.versionNum}} 90 | #版本代码:${{steps.apk-info.outputs.versionCode}} 91 | 92 | # Get hd $patchVersion $patchVersionCode 93 | - name: Get Bilibili-hd info 94 | if: ${{ env.Build-Bilix-hd == 'true' }} 95 | run: | 96 | echo "Bilix-hd-ver=${{steps.apk-info-hd.outputs.versionNum}}" >> $GITHUB_ENV 97 | echo "Bilix-hd-vercode=${{steps.apk-info-hd.outputs.versionCode}}" >> $GITHUB_ENV 98 | 99 | # build part 100 | - name: Build Bilix-hd 101 | if: ${{ env.Build-Bilix-hd == 'true' }} 102 | run: | 103 | java -jar revanced-cli.jar patch --merge integrations.apk --patch-bundle patches.jar --signing-levels 1,2,3 hd.apk 104 | 105 | # named Bilix-hd 106 | - name: Rename Bilix-hd 107 | if: ${{ env.Build-Bilix-hd == 'true' }} 108 | run: | 109 | mv hd-patched.apk Bilix-hd-${{ env.Bilix-hd-ver }}-${{ env.ver }}@Aniruf_x.apk 110 | 111 | # Signing Bilix-hd 112 | - name: Resign Bilix-hd 113 | if: ${{ env.Build-Bilix-hd == 'true' }} 114 | run: | 115 | cd ./ 116 | echo Downloading uber-apk-signer 117 | wget https://github.com/patrickfav/uber-apk-signer/releases/download/v1.3.0/uber-apk-signer-1.3.0.jar 118 | java -jar uber-apk-signer-1.3.0.jar -a Bilix-hd-${{ env.Bilix-hd-ver }}-${{ env.ver }}@Aniruf_x.apk --overwrite --allowResign --ks BiliRoamingX.p12 --ksAlias ${{ secrets.signalias }} --ksKeyPass ${{ secrets.signkey }} --ksPass ${{ secrets.signkey }} 119 | 120 | # Get $sn 121 | - name: Get sn from Bilix-hd 122 | if: ${{ env.Build-Bilix-hd == 'true' }} 123 | run: | 124 | sudo apt-get install aapt 125 | aapt dump xmltree ./Bilix-hd-${{ env.Bilix-hd-ver }}-${{ env.ver }}@Aniruf_x.apk AndroidManifest.xml > AndroidManifest_output_hd.txt 126 | echo "hd-sn=$(grep "BUILD_SN" ./AndroidManifest_output_hd.txt -A 1 | grep "android:value" | cut -d'=' -f2 | cut -d')' -f2 | awk '{printf "%d\n", strtonum($1)}')" >> $GITHUB_ENV 127 | 128 | # Get $md5 129 | - name: Get md5 from Bilix-hd 130 | if: ${{ env.Build-Bilix-hd == 'true' }} 131 | run: | 132 | echo "hd-md5=$(md5sum ./Bilix-hd-${{ env.Bilix-hd-ver }}-${{ env.ver }}@Aniruf_x.apk | cut -d ' ' -f 1)" >> $GITHUB_ENV 133 | 134 | # Get $size 135 | - name: Get size from Bilix-hd 136 | if: ${{ env.Build-Bilix-hd == 'true' }} 137 | run: | 138 | echo "hd-size=$(stat -c %s ./Bilix-hd-${{ env.Bilix-hd-ver }}-${{ env.ver }}@Aniruf_x.apk)" >> $GITHUB_ENV 139 | 140 | # Release part 141 | - name: Release Bilix-hd 142 | id: hd_release 143 | if: ${{ env.Build-Bilix-hd == 'true' && (env.with-release == 'true' || env.release == 'true') }} 144 | uses: softprops/action-gh-release@v2 145 | with: 146 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 147 | fail_on_unmatched_files: true 148 | name: 'Bilix-hd ${{ env.Bilix-hd-ver }}(${{ env.Bilix-hd-vercode }}) with BiliroamingX ${{ env.ver }}' 149 | tag_name: 'android_hd-v${{ env.Bilix-hd-ver }}-b${{ env.hd-sn }}-p${{ env.ver }}' 150 | body: | 151 | 版本信息:${{ env.Bilix-hd-ver }} ${{ env.Bilix-hd-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.hd-sn }} ${{ env.hd-size }} ${{ env.hd-md5 }} ${{ env.TIME }} 152 | > 合并主分支 153 | > Bump bili ver to ${{ env.Bilix-hd-vercode }} 154 | 155 | ${{ env.Nightly-Changelog }} 156 | files: ./Bilix-hd-${{ env.Bilix-hd-ver }}-${{ env.ver }}@Aniruf_x.apk 157 | continue-on-error: true 158 | 159 | - name: Release Again 160 | run: | 161 | curl --request PATCH \ 162 | --header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ 163 | --header 'Content-type: application/json' \ 164 | --header 'User-Agent: Github-Action' \ 165 | --url https://api.github.com/repos/sti-233/Bilix-Prebuilds/releases/${{ steps.hd_release.outputs.id }} \ 166 | --data '{ "draft": false }' 167 | 168 | # Del Release Nightly ver 169 | - name: Delete old Nightly Bilix-hd 170 | if: ${{ env.Build-Bilix-hd == 'true' }} 171 | env: 172 | GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 173 | run: | 174 | gh release view "Nightly-android_hd-Nightly" && gh release delete "Nightly-android_hd-Nightly" -y --cleanup-tag 175 | continue-on-error: true 176 | 177 | # named Bilix-hd-Nightly 178 | - name: Rename Bilix-hd-Nightly 179 | if: ${{ env.Build-Bilix-hd == 'true' }} 180 | run: | 181 | mv Bilix-hd-${{ env.Bilix-hd-ver }}-${{ env.ver }}@Aniruf_x.apk Bilix-hd-Nightly@Aniruf_x.apk 182 | 183 | # Release Nightly 184 | - name: Release Bilix-hd-Nightly 185 | id: hd_nightly 186 | if: ${{ env.Build-Bilix-hd == 'true' }} 187 | uses: softprops/action-gh-release@v2 188 | with: 189 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 190 | fail_on_unmatched_files: false 191 | name: 'Bilix-hd Nightly - BiliRoamingX ${{ env.ver }}' 192 | tag_name: 'Nightly-android_hd-Nightly' 193 | body: | 194 | 版本信息:${{ env.Bilix-hd-ver }} ${{ env.Bilix-hd-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.hd-sn }} ${{ env.hd-size }} ${{ env.hd-md5 }} ${{ env.TIME }} 195 | 196 | ![Nightly.jpg](https://github.com/sti-233/Bilix-PreBuilds/blob/main/Nightly.jpg) 197 | > 合并主分支 198 | > Bump bili-hd ver to ${{ env.Bilix-hd-vercode }} 199 | 200 | ${{ env.Nightly-Changelog }} 201 | files: | 202 | ./Bilix-hd-Nightly@Aniruf_x.apk 203 | continue-on-error: true 204 | 205 | - name: Release Nightly Again 206 | run: | 207 | curl --request PATCH \ 208 | --header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ 209 | --header 'Content-type: application/json' \ 210 | --header 'User-Agent: Github-Action' \ 211 | --url https://api.github.com/repos/sti-233/Bilix-Prebuilds/releases/${{ steps.hd_nightly.outputs.id }} \ 212 | --data '{ "draft": false }' 213 | 214 | # output Bilix-hd informations 215 | - name: Build Bilix-hd Success 216 | if: ${{ env.Build-Bilix-hd == 'true' }} 217 | run: | 218 | echo "### Build Bilix-hd Success" >> $GITHUB_STEP_SUMMARY 219 | echo "版本信息:${{ env.Bilix-hd-ver }} ${{ env.Bilix-hd-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.hd-sn }} ${{ env.hd-size }} ${{ env.hd-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 220 | echo " " >> $GITHUB_STEP_SUMMARY 221 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 222 | echo " > Bump bili ver to ${{ env.Bilix-hd-vercode }}" >> $GITHUB_STEP_SUMMARY 223 | echo " " >> $GITHUB_STEP_SUMMARY 224 | echo "$(cat ./build/Changelog_Nightly.txt)" >> $GITHUB_STEP_SUMMARY 225 | continue-on-error: true 226 | 227 | # output Nightly ver info 228 | - name: Build Bilix-hd-Nightly Success 229 | if: ${{ env.Build-Bilix-hd == 'true' }} 230 | run: | 231 | echo "### Build Bilix-hd-Nightly Success" >> $GITHUB_STEP_SUMMARY 232 | echo "版本信息:${{ env.Bilix-hd-ver }} ${{ env.Bilix-hd-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.hd-sn }} ${{ env.hd-size }} ${{ env.hd-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 233 | echo " " >> $GITHUB_STEP_SUMMARY 234 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 235 | echo " > Bump bili-hd ver to ${{ env.Bilix-hd-vercode }}" >> $GITHUB_STEP_SUMMARY 236 | echo " " >> $GITHUB_STEP_SUMMARY 237 | echo "$(cat ./build/Changelog_Nightly.txt)" >> $GITHUB_STEP_SUMMARY 238 | continue-on-error: true 239 | 240 | - name: Upload Build Resource 241 | if: ${{ env.Build-Bilix == 'false' && env.Build-Bilix-hd == 'true' && env.Build-Bilix-play == 'false' }} 242 | run: | 243 | cd ./ 244 | rm ./Build.prop 245 | cp ./build/Build.prop ./Build.prop 246 | git config --global user.name 'github-actions[bot]' 247 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 248 | git add Build.prop 249 | git commit -m "Push prop" 250 | git push 251 | continue-on-error: true 252 | 253 | - name: Setup Python 254 | uses: actions/setup-python@v5 255 | with: 256 | python-version: '3.9.x' 257 | 258 | - name: Prepare 259 | run : | 260 | mv ./Bilix-hd-Nightly@Aniruf_x.apk ./Bilix-hd-Nightly-n.${{ env.commit-count }}.${{ env.hash }}@Aniruf_x.apk 261 | echo "Nightly_apk=./Bilix-hd-Nightly-n.${{ env.commit-count }}.${{ env.hash }}@Aniruf_x.apk" >> $GITHUB_ENV 262 | pip install pyrogram tgcrypto 263 | 264 | - name: Post to Channel 265 | shell: python 266 | env: 267 | API_ID: ${{ secrets.TELEGRAM_API_ID }} 268 | API_HASH: ${{ secrets.TELEGRAM_API_HASH }} 269 | chat_id: ${{ secrets.CHANNEL_ID }} 270 | session: ${{ secrets.TELEGRAM_SESSION }} 271 | run: | 272 | import asyncio 273 | import inspect 274 | import os 275 | from pyrogram import Client 276 | from pyrogram.types import InputMediaDocument 277 | async def main(): 278 | session = os.environ["session"] 279 | bot = Client( 280 | "client", 281 | session_string=session, 282 | ) 283 | async with bot: 284 | Day = os.environ["Day"] 285 | RoamingXver = os.environ["ver"] 286 | ver = os.environ["Bilix-hd-ver"] 287 | ver_code = os.environ["Bilix-hd-vercode"] 288 | chat_id = os.environ["chat_id"] 289 | changelog = os.environ["Nightly-Changelog"] 290 | msg_p1 = f"Bilix Nightly - {Day}" 291 | msg_p2 = f"BiliRoamingX {RoamingXver}" 292 | msg_p3 = f"
hd {ver} {ver_code}
" 293 | msg_p4 = "New release to GitHub!
"
294 |               msg_p5 = inspect.cleandoc("""
295 |               > 合并 sti-233/BiliRoamingX
296 |                *现在具有切换更新源的能力\n
297 |               """)
298 |               msg_p6 = f"{changelog}
" 299 | msg_p7 = inspect.cleandoc(""" 300 | by sti-233 301 | 在Github查看详情 302 | 303 | *此为非官方构建 304 | Patched by @Aniruf_x 305 | #Biliroaming_X #hd 306 | """) 307 | caption = "{}\n\n{}\n{}\n\n{}\n{}\n{}{}".format(msg_p1, msg_p2, msg_p3, msg_p4, msg_p5, msg_p6, msg_p7) 308 | Nightly = InputMediaDocument(media=os.environ["Nightly_apk"], caption=caption) 309 | # 发送到指定的频道 310 | await bot.send_media_group( 311 | chat_id=chat_id, 312 | media=[Nightly], 313 | ) 314 | async def wait(): 315 | try: 316 | await asyncio.wait_for(main(), timeout=600) 317 | except asyncio.TimeoutError: 318 | print("message send timeout!!!") 319 | exit(1) 320 | asyncio.run(wait()) 321 | 322 | # Success 323 | - name: End 324 | run: echo "Build end." -------------------------------------------------------------------------------- /.github/workflows/Build-play.yml: -------------------------------------------------------------------------------- 1 | name: Build Bilix-play 2 | 3 | on: 4 | repository_dispatch: 5 | types: [Build-play] 6 | 7 | jobs: 8 | Build-Bilix-play: 9 | name: Build Bilix-play 10 | strategy: 11 | fail-fast: false 12 | 13 | runs-on: ubuntu-latest 14 | steps: 15 | 16 | # Get $publishTime 17 | - name: Get Current Time 18 | run: | 19 | TIME=$EPOCHSECONDS 20 | echo "TIME=$TIME" >> $GITHUB_ENV 21 | Day=$(date +"%-m.%-d") 22 | echo "Day=$Day" >> $GITHUB_ENV 23 | 24 | # Check repo 25 | - name: Checkout code 26 | uses: actions/checkout@v4 27 | 28 | # Save env 29 | - name: Initialize variables 30 | run: | 31 | # Check custom 32 | echo "url-custom-play=`awk -F "=" '$1 == "url.custom.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 33 | echo "url-custom-revanced-cli=`awk -F "=" '$1 == "url.custom.revanced.cli" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 34 | # Get custom url 35 | echo "play-url=`awk -F "=" '$1 == "url.custom.bilibili.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 36 | echo "cli-url=`awk -F "=" '$1 == "url.custom.revanced.cli.url" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 37 | # Get version info 38 | echo "ver=`awk -F "=" '$1 == "BiliRoamingX.ver.full" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 39 | echo "bigver=`awk -F "=" '$1 == "BiliRoamingX.ver.code" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 40 | # Build need 41 | echo "Build-Bilix=`awk -F "=" '$1 == "Bilix.build.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 42 | echo "Build-Bilix-play=`awk -F "=" '$1 == "Bilix.build.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 43 | echo "with-release=`awk -F "=" '$1 == "temp.with.release" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 44 | echo "release=`awk -F "=" '$1 == "temp.release.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 45 | # Changelog need 46 | echo "push-changelog=`awk -F "=" '$1 == "push.changelog" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 47 | echo "Nightly-Changelog<> $GITHUB_ENV 48 | cat ./build/Changelog_Nightly.txt >> $GITHUB_ENV 49 | echo "EOF" >> $GITHUB_ENV 50 | cd ./ 51 | git clone https://github.com/sti-233/Bilix-PreBuilds.git 52 | cd ./Bilix-PreBuilds 53 | echo "commit-count=`git rev-list HEAD --count`" >> $GITHUB_ENV 54 | echo "hash=`git log -1 --format="%h"`" >> $GITHUB_ENV 55 | cd $GITHUB_WORKSPACE 56 | rm -r ./Bilix-PreBuilds 57 | 58 | # Get revanced-cli 59 | - name: Get Revanced-cli 60 | if: ${{ env.Build-Bilix-play == 'true' }} 61 | run: | 62 | cd ./ 63 | echo Downloading modified revanced-cli 64 | wget https://github.com/zjns/revanced-cli/releases/download/v4.6.0.1/revanced-cli.jar 65 | cp ./build/patches.jar ./patches.jar 66 | cp ./build/integrations.apk ./integrations.apk 67 | 68 | # Get original bilibili 69 | - name: Get original bilibili-play 70 | if: ${{ env.Build-Bilix-play == 'true' }} 71 | run: | 72 | if [ "${{ env.url-custom-play }}" = "false" ]; then 73 | aria2c --out "play.apk" https://d.apkpure.com/b/APK/com.bilibili.app.in?version=latest 74 | fi 75 | if [ "${{ env.url-custom-play }}" = "true" ]; then 76 | aria2c --out "play.apk" ${{ env.play-url }} 77 | fi 78 | 79 | # Check $version & $versionCode 80 | - name: "Get play Info" 81 | if: ${{ env.Build-Bilix-play == 'true' }} 82 | id: "apk-info-play" 83 | uses: "8Mi-Tech/get-apk-info-action@master" 84 | with: 85 | apkPath: "play.apk" 86 | #版本号:${{steps.apk-info.outputs.versionNum}} 87 | #版本代码:${{steps.apk-info.outputs.versionCode}} 88 | 89 | # Get play $patchVersion $patchVersionCode 90 | - name: Get Bilibili-play info 91 | if: ${{ env.Build-Bilix-play == 'true' }} 92 | run: | 93 | echo "Bilix-play-ver=${{steps.apk-info-play.outputs.versionNum}}" >> $GITHUB_ENV 94 | echo "Bilix-play-vercode=${{steps.apk-info-play.outputs.versionCode}}" >> $GITHUB_ENV 95 | 96 | # build part 97 | - name: Build Bilix-play 98 | if: ${{ env.Build-Bilix-play == 'true' }} 99 | run: | 100 | java -jar revanced-cli.jar patch --merge integrations.apk --patch-bundle patches.jar --signing-levels 1,2,3 play.apk 101 | 102 | # named Bilix-play 103 | - name: Rename Bilix-play 104 | if: ${{ env.Build-Bilix-play == 'true' }} 105 | run: | 106 | mv play-patched.apk Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk 107 | 108 | # Signing Bilix-play 109 | - name: Resign Bilix-play 110 | if: ${{ env.Build-Bilix-play == 'true' }} 111 | run: | 112 | cd ./ 113 | echo Downloading uber-apk-signer 114 | wget https://github.com/patrickfav/uber-apk-signer/releases/download/v1.3.0/uber-apk-signer-1.3.0.jar 115 | java -jar uber-apk-signer-1.3.0.jar -a Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk --overwrite --allowResign --ks BiliRoamingX.p12 --ksAlias ${{ secrets.signalias }} --ksKeyPass ${{ secrets.signkey }} --ksPass ${{ secrets.signkey }} 116 | 117 | # Get $sn 118 | - name: Get sn from Bilix-play 119 | if: ${{ env.Build-Bilix-play == 'true' }} 120 | run: | 121 | sudo apt-get install aapt 122 | aapt dump xmltree ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk AndroidManifest.xml > AndroidManifest_output_play.txt 123 | echo "play-sn=$(grep "BUILD_SN" ./AndroidManifest_output_play.txt -A 1 | grep "android:value" | cut -d'=' -f2 | cut -d')' -f2 | awk '{printf "%d\n", strtonum($1)}')" >> $GITHUB_ENV 124 | 125 | # Get $md5 126 | - name: Get md5 from Bilix-play 127 | if: ${{ env.Build-Bilix-play == 'true' }} 128 | run: | 129 | echo "play-md5=$(md5sum ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk | cut -d ' ' -f 1)" >> $GITHUB_ENV 130 | 131 | # Get $size 132 | - name: Get size from Bilix-play 133 | if: ${{ env.Build-Bilix-play == 'true' }} 134 | run: | 135 | echo "play-size=$(stat -c %s ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk)" >> $GITHUB_ENV 136 | 137 | # Release part 138 | - name: Release Bilix-play 139 | id: play_release 140 | if: ${{ env.Build-Bilix-play == 'true' && (env.with-release == 'true' || env.release == 'true') }} 141 | uses: softprops/action-gh-release@v2 142 | with: 143 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 144 | fail_on_unmatched_files: true 145 | name: 'Bilix-play ${{ env.Bilix-play-ver }}(${{ env.Bilix-play-vercode }}) with BiliroamingX ${{ env.ver }}' 146 | tag_name: 'android_i-v${{ env.Bilix-play-ver }}-b${{ env.play-sn }}-p${{ env.ver }}' 147 | body: | 148 | 版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }} 149 | > 合并主分支 150 | > Bump bili ver to ${{ env.Bilix-play-vercode }} 151 | 152 | ${{ env.Nightly-Changelog }} 153 | files: ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk 154 | continue-on-error: true 155 | 156 | - name: Release Again 157 | run: | 158 | curl --request PATCH \ 159 | --header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ 160 | --header 'Content-type: application/json' \ 161 | --header 'User-Agent: Github-Action' \ 162 | --url https://api.github.com/repos/sti-233/Bilix-Prebuilds/releases/${{ steps.play_release.outputs.id }} \ 163 | --data '{ "draft": false }' 164 | 165 | # Del Release Nightly ver 166 | - name: Delete old Nightly Bilix-play 167 | if: ${{ env.Build-Bilix-play == 'true' }} 168 | env: 169 | GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 170 | run: | 171 | gh release view "Nightly-android_i-Nightly" && gh release delete "Nightly-android_i-Nightly" -y --cleanup-tag 172 | continue-on-error: true 173 | 174 | # named Bilix-play-Nightly 175 | - name: Rename Bilix-play-Nightly 176 | if: ${{ env.Build-Bilix-play == 'true' }} 177 | run: | 178 | mv Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk Bilix-play-Nightly@Aniruf_x.apk 179 | 180 | # Release Nightly 181 | - name: Release Bilix-play-Nightly 182 | id: play_nightly 183 | if: ${{ env.Build-Bilix-play == 'true' }} 184 | uses: softprops/action-gh-release@v2 185 | with: 186 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 187 | fail_on_unmatched_files: false 188 | name: 'Bilix-play Nightly - BiliRoamingX ${{ env.ver }}' 189 | tag_name: 'Nightly-android_i-Nightly' 190 | body: | 191 | 版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }} 192 | 193 | ![Nightly.jpg](https://github.com/sti-233/Bilix-PreBuilds/blob/main/Nightly.jpg) 194 | > 合并主分支 195 | > Bump bili-play ver to ${{ env.Bilix-play-vercode }} 196 | 197 | ${{ env.Nightly-Changelog }} 198 | files: | 199 | ./Bilix-play-Nightly@Aniruf_x.apk 200 | continue-on-error: true 201 | 202 | - name: Release Nightly Again 203 | run: | 204 | curl --request PATCH \ 205 | --header 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \ 206 | --header 'Content-type: application/json' \ 207 | --header 'User-Agent: Github-Action' \ 208 | --url https://api.github.com/repos/sti-233/Bilix-Prebuilds/releases/${{ steps.play_nightly.outputs.id }} \ 209 | --data '{ "draft": false }' 210 | 211 | # output Bilix-play informations 212 | - name: Build Bilix-play Success 213 | if: ${{ env.Build-Bilix-play == 'true' }} 214 | run: | 215 | echo "### Build Bilix-play Success" >> $GITHUB_STEP_SUMMARY 216 | echo "版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 217 | echo " " >> $GITHUB_STEP_SUMMARY 218 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 219 | echo " > Bump bili ver to ${{ env.Bilix-play-vercode }}" >> $GITHUB_STEP_SUMMARY 220 | echo " " >> $GITHUB_STEP_SUMMARY 221 | echo "$(cat ./build/Changelog_Nightly.txt)" >> $GITHUB_STEP_SUMMARY 222 | continue-on-error: true 223 | 224 | # output Nightly ver info 225 | - name: Build Bilix-play-Nightly Success 226 | if: ${{ env.Build-Bilix-play == 'true' }} 227 | run: | 228 | echo "### Build Bilix-play-Nightly Success" >> $GITHUB_STEP_SUMMARY 229 | echo "版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 230 | echo " " >> $GITHUB_STEP_SUMMARY 231 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 232 | echo " > Bump bili-play ver to ${{ env.Bilix-play-vercode }}" >> $GITHUB_STEP_SUMMARY 233 | echo " " >> $GITHUB_STEP_SUMMARY 234 | echo "$(cat ./build/Changelog_Nightly.txt)" >> $GITHUB_STEP_SUMMARY 235 | continue-on-error: true 236 | 237 | - name: Upload Build Resource 238 | if: ${{ env.Build-Bilix == 'false' && env.Build-Bilix-play == 'true' }} 239 | run: | 240 | cd ./ 241 | rm ./Build.prop 242 | cp ./build/Build.prop ./Build.prop 243 | git config --global user.name 'github-actions[bot]' 244 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 245 | git add Build.prop 246 | git commit -m "Push prop" 247 | git push 248 | continue-on-error: true 249 | 250 | - name: Setup Python 251 | uses: actions/setup-python@v5 252 | with: 253 | python-version: '3.9.x' 254 | 255 | - name: Prepare 256 | run : | 257 | mv ./Bilix-play-Nightly@Aniruf_x.apk ./Bilix-play-Nightly-n.${{ env.commit-count }}.${{ env.hash }}@Aniruf_x.apk 258 | echo "Nightly_apk=./Bilix-play-Nightly-n.${{ env.commit-count }}.${{ env.hash }}@Aniruf_x.apk" >> $GITHUB_ENV 259 | pip install pyrogram tgcrypto 260 | 261 | - name: Post to Channel 262 | shell: python 263 | env: 264 | API_ID: ${{ secrets.TELEGRAM_API_ID }} 265 | API_HASH: ${{ secrets.TELEGRAM_API_HASH }} 266 | chat_id: ${{ secrets.CHANNEL_ID }} 267 | session: ${{ secrets.TELEGRAM_SESSION }} 268 | run: | 269 | import asyncio 270 | import inspect 271 | import os 272 | from pyrogram import Client 273 | from pyrogram.types import InputMediaDocument 274 | async def main(): 275 | session = os.environ["session"] 276 | bot = Client( 277 | "client", 278 | session_string=session, 279 | ) 280 | async with bot: 281 | Day = os.environ["Day"] 282 | RoamingXver = os.environ["ver"] 283 | ver = os.environ["Bilix-play-ver"] 284 | ver_code = os.environ["Bilix-play-vercode"] 285 | chat_id = os.environ["chat_id"] 286 | changelog = os.environ["Nightly-Changelog"] 287 | msg_p1 = f"Bilix Nightly - {Day}" 288 | msg_p2 = f"BiliRoamingX {RoamingXver}" 289 | msg_p3 = f"
play {ver} {ver_code}
" 290 | msg_p4 = "New release to GitHub!
"
291 |               msg_p5 = inspect.cleandoc("""
292 |               > 合并 sti-233/BiliRoamingX
293 |                *现在具有切换更新源的能力\n
294 |               """)
295 |               msg_p6 = f"{changelog}
" 296 | msg_p7 = inspect.cleandoc(""" 297 | by sti-233 298 | 在Github查看详情 299 | 300 | *此为非官方构建 301 | Patched by @Aniruf_x 302 | #Biliroaming_X #play 303 | """) 304 | caption = "{}\n\n{}\n{}\n\n{}\n{}\n{}{}".format(msg_p1, msg_p2, msg_p3, msg_p4, msg_p5, msg_p6, msg_p7) 305 | Nightly = InputMediaDocument(media=os.environ["Nightly_apk"], caption=caption) 306 | # 发送到指定的频道 307 | await bot.send_media_group( 308 | chat_id=chat_id, 309 | media=[Nightly], 310 | ) 311 | async def wait(): 312 | try: 313 | await asyncio.wait_for(main(), timeout=600) 314 | except asyncio.TimeoutError: 315 | print("message send timeout!!!") 316 | exit(1) 317 | asyncio.run(wait()) 318 | 319 | # Success 320 | - name: End 321 | run: echo "Build end." -------------------------------------------------------------------------------- /.github/workflows/Build.yml: -------------------------------------------------------------------------------- 1 | name: Build Bilix 2 | 3 | on: 4 | workflow_dispatch: 5 | jobs: 6 | Build-Bilix: 7 | strategy: 8 | fail-fast: false 9 | env: 10 | # build need 11 | Build-Bilix: true 12 | Build-Bilix-play: false 13 | # Check ver 14 | Bilix-ver: 8.11.0 15 | Bilix-play-ver: 3.19.2 16 | Bilix-vercode: 8110200 17 | Bilix-play-vercode: 7750600 18 | # push type 19 | Nightly: false 20 | # torelease 21 | Bilix-torelease: false 22 | Bilix-play-torelease: false 23 | # Changelog need 24 | push-Changelog: true 25 | # release type 26 | Bilix-prerelease: true 27 | Bilix-play-prerelease: true 28 | 29 | runs-on: ubuntu-latest 30 | steps: 31 | 32 | # Check repo 33 | - name: Checkout code 34 | uses: actions/checkout@v4 35 | 36 | # Get $publishTime 37 | - name: Get Current Time 38 | run: | 39 | TIME=$EPOCHSECONDS 40 | echo "TIME=$TIME" >> $GITHUB_ENV 41 | 42 | - name: Setup JRE 43 | uses: actions/setup-java@v4 44 | with: 45 | distribution: 'temurin' 46 | java-version: '17' 47 | java-package: 'jre' 48 | 49 | - name: Setup Python 50 | uses: actions/setup-python@v5 51 | with: 52 | python-version: '3.9.x' 53 | 54 | # Get ci & revanced-cli 55 | - name: Get build resource 56 | run: | 57 | echo Downloading CI zip 58 | git clone --recurse-submodules https://github.com/sti-233/BiliRoamingX.git 59 | cp -r ./BiliRoamingX/* ./ 60 | echo Downloading modified revanced-cli 61 | wget https://github.com/zjns/revanced-cli/releases/download/v4.6.0.1/revanced-cli.jar 62 | 63 | - name: Cat commit ids 64 | if: ${{ env.push-Changelog == 'true' }} 65 | run: echo "old-commit-id=$(head -n 1 old-commit-id.txt)" >> $GITHUB_ENV 66 | 67 | # Get BiliRoamingX ci Changelog 68 | - name: Get Changelog from commits 69 | if: ${{ env.push-Changelog == 'true' }} 70 | run: | 71 | mkdir -p ./changelog 72 | cd ./changelog/ 73 | git clone --recurse-submodules https://github.com/BiliRoamingX/BiliRoamingX.git 74 | cd BiliRoamingX 75 | git log --oneline 66dc0506fec98441cb1156f57989fc42c9649fb0...HEAD | sed 's/^[0-9a-f]\{8\} /- /' > Changelog.txt 76 | cd /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/ 77 | ls -al /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/changelog/BiliRoamingX 78 | cp /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/changelog/BiliRoamingX/Changelog.txt /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Changelog.txt 79 | 80 | # return nothing to Changelog 81 | - name: val empty to Changelog 82 | if: ${{ env.push-Changelog == 'false' }} 83 | run: | 84 | echo -e " - no changlog now " >> Changelog.txt 85 | 86 | # Get original bilibili 87 | - name: Get original bilibili 88 | run: | 89 | aria2c --out "cn.apk" https://dl.hdslb.com/mobile/pack/android64/15848828/iBiliPlayer-apinkRelease-8.11.0-b15848828.apk 90 | aria2c --out "play.apk" https://d.apkpure.com/b/APK/com.bilibili.app.in?version=latest 91 | 92 | # Check $version & $versionCode 93 | - name: "Get Cn Info" 94 | id: "apk-info-cn" 95 | uses: "8Mi-Tech/get-apk-info-action@master" 96 | with: 97 | apkPath: "cn.apk" 98 | - name: "Get Play Info" 99 | id: "apk-info-play" 100 | uses: "8Mi-Tech/get-apk-info-action@master" 101 | with: 102 | apkPath: "play.apk" 103 | #版本号:${{steps.apk-info.outputs.versionNum}} 104 | #版本代码:${{steps.apk-info.outputs.versionCode}} 105 | 106 | - name: Check Bilibili ver 107 | run: | 108 | if [ "${{ steps.apk-info-cn.outputs.versionCode }}" == "${{ env.Bilix-vercode }}" ]; then 109 | echo "CnCorrectVersionCode=true" >> $GITHUB_ENV 110 | else 111 | echo "CnCorrectVersionCode=false" >> $GITHUB_ENV 112 | fi 113 | if [ "${{ steps.apk-info-cn.outputs.versionNum }}" == "${{ env.Bilix-ver }}" ]; then 114 | echo "CnCorrectVersion=true" >> $GITHUB_ENV 115 | else 116 | echo "CnCorrectVersion=false" >> $GITHUB_ENV 117 | fi 118 | 119 | - name: Check Bilibili-play ver 120 | run: | 121 | if [ "${{ steps.apk-info-play.outputs.versionCode }}" == "${{ env.Bilix-play-vercode }}" ]; then 122 | echo "PlayCorrectVersionCode=true" >> $GITHUB_ENV 123 | else 124 | echo "PlayCorrectVersionCode=false" >> $GITHUB_ENV 125 | fi 126 | if [ "${{ steps.apk-info-play.outputs.versionNum }}" == "${{ env.Bilix-play-ver }}" ]; then 127 | echo "PlayCorrectVersion=true" >> $GITHUB_ENV 128 | else 129 | echo "PlayCorrectVersion=false" >> $GITHUB_ENV 130 | fi 131 | 132 | - name: Check is Bilibili correct ver 133 | run: | 134 | if [ "${{ env.CnCorrectVersionCode }}" == "true" ] && [ "${{ env.CnCorrectVersion }}" == "true" ]; then 135 | echo "CnCorrectVer=true" >> $GITHUB_ENV 136 | else 137 | echo "CnCorrectVer=false" >> $GITHUB_ENV 138 | fi 139 | 140 | - name: Check is Bilibili-play correct ver 141 | run: | 142 | if [ "${{ env.PlayCorrectVersionCode }}" == "true" ] && [ "${{ env.PlayCorrectVersion }}" == "true" ]; then 143 | echo "PlayCorrectVer=true" >> $GITHUB_ENV 144 | else 145 | echo "PlayCorrectVer=false" >> $GITHUB_ENV 146 | fi 147 | 148 | - name: Check is correct ver 149 | run: | 150 | if [ "${{ env.CnCorrectVer }}" == "true" ] && [ "${{ env.PlayCorrectVer }}" == "true" ]; then 151 | echo "correctVer=true" >> $GITHUB_ENV 152 | else 153 | echo "correctVer=false" >> $GITHUB_ENV 154 | fi 155 | 156 | # Get $patchVersion 157 | - name: Get version 158 | run: echo "ver=$(cat version.txt)" >> $GITHUB_ENV 159 | 160 | # Get $patchVersionCode 161 | - name: Get bigver 162 | run: | 163 | getbigver=$(echo ${{ env.ver }} | cut -d '.' -f 1-3) 164 | bigver=$(echo "$getbigver" | awk -F. '{printf "%d0%d00%d\n", $1, $2, $3}') 165 | echo "bigver=$bigver" >> $GITHUB_ENV 166 | 167 | # get build resource in ci zip 168 | - name: Unzip CI zip and Rename 169 | run: | 170 | unzip BiliRoamingX-CI-Build.zip 171 | mv BiliRoamingX-integrations-${{ env.ver }}.apk integrations.apk 172 | mv BiliRoamingX-patches-${{ env.ver }}.jar patches.jar 173 | 174 | # build part 175 | - name: Build Bilix 176 | if: ${{ env.Build-Bilix == 'true' && env.CnCorrectVer == 'true' }} 177 | run: java -jar revanced-cli.jar patch --merge integrations.apk --patch-bundle patches.jar --signing-levels 1,2,3 cn.apk 178 | 179 | - name: Build Bilix-play 180 | if: ${{ env.Build-Bilix-play == 'true' && env.PlayCorrectVer == 'true' }} 181 | run: java -jar revanced-cli.jar patch --merge integrations.apk --patch-bundle patches.jar --signing-levels 1,2,3 play.apk 182 | 183 | # named Bilix 184 | - name: Rename Bilix 185 | if: ${{ env.Build-Bilix == 'true' && env.correctVer == 'true' }} 186 | run: mv cn-patched.apk Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 187 | 188 | - name: Rename Bilix-play 189 | if: ${{ env.Build-Bilix-play == 'true' && env.correctVer == 'true' }} 190 | run: mv play-patched.apk Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk 191 | 192 | # push Bilix to ci 193 | - name: Upload Bilix (CI) 194 | if: ${{ env.Build-Bilix == 'true' && env.correctVer == 'true' }} 195 | uses: actions/upload-artifact@v4 196 | with: 197 | name: Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 198 | path: ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 199 | 200 | - name: Upload Bilix-play (CI) 201 | if: ${{ env.Build-Bilix-play == 'true' && env.correctVer == 'true' }} 202 | uses: actions/upload-artifact@v4 203 | with: 204 | name: Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk 205 | path: ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk 206 | 207 | # Get $sn 208 | - name: Get sn from Bilix 209 | if: ${{ env.Build-Bilix == 'true' && env.correctVer == 'true' }} 210 | run: | 211 | sudo apt-get install aapt 212 | aapt dump xmltree ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk AndroidManifest.xml > AndroidManifest_output_cn.txt 213 | echo "cn-sn=$(grep "BUILD_SN" ./AndroidManifest_output_cn.txt -A 1 | grep "android:value" | cut -d'=' -f2 | cut -d')' -f2 | awk '{printf "%d\n", strtonum($1)}')" >> $GITHUB_ENV 214 | 215 | - name: Get sn from Bilix-play 216 | if: ${{ env.Build-Bilix-play == 'true' && env.correctVer == 'true' }} 217 | run: | 218 | aapt dump xmltree ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk AndroidManifest.xml > AndroidManifest_output_play.txt 219 | echo "play-sn=$(grep "BUILD_SN" ./AndroidManifest_output_play.txt -A 1 | grep "android:value" | cut -d'=' -f2 | cut -d')' -f2 | awk '{printf "%d\n", strtonum($1)}')" >> $GITHUB_ENV 220 | 221 | # Get $md5 222 | - name: Get md5 from Bilix 223 | if: ${{ env.Build-Bilix == 'true' && env.correctVer == 'true' }} 224 | run: | 225 | echo "cn-md5=$(md5sum ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk | cut -d ' ' -f 1)" >> $GITHUB_ENV 226 | 227 | - name: Get md5 from Bilix-play 228 | if: ${{ env.Build-Bilix-play == 'true' && env.correctVer == 'true' }} 229 | run: | 230 | echo "play-md5=$(md5sum ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk | cut -d ' ' -f 1)" >> $GITHUB_ENV 231 | 232 | # Get $size 233 | - name: Get size from Bilix 234 | if: ${{ env.Build-Bilix == 'true' && env.correctVer == 'true' }} 235 | run: | 236 | echo "cn-size=$(stat -c %s ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk)" >> $GITHUB_ENV 237 | 238 | - name: Get size from Bilix-play 239 | if: ${{ env.Build-Bilix-play == 'true' && env.correctVer == 'true' }} 240 | run: | 241 | echo "play-size=$(stat -c %s ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk)" >> $GITHUB_ENV 242 | 243 | # Release part 244 | - name: Release Bilix 245 | if: ${{ env.Bilix-torelease == 'true' && env.CnCorrectVer == 'true' && env.Build-Bilix == 'true' && env.Nightly == 'false' }} 246 | uses: softprops/action-gh-release@v2 247 | with: 248 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 249 | prerelease: ${{ env.Bilix-prerelease }} 250 | fail_on_unmatched_files: true 251 | name: 'Bilix ${{ env.Bilix-ver }}(${{ env.Bilix-vercode }}) with BiliroamingX ${{ env.ver }}' 252 | tag_name: 'android-v${{ env.Bilix-ver }}-b${{ env.cn-sn }}-p${{ env.ver }}' 253 | body: | 254 | 版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }} 255 | > 合并主分支 256 | > Bump bili ver to ${{ env.Bilix-vercode }} 257 | files: ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 258 | continue-on-error: true 259 | 260 | - name: Release Bilix Changelog 261 | if: ${{ env.Bilix-torelease == 'true' && env.CnCorrectVer == 'true' && env.Build-Bilix == 'true' && env.Nightly == 'false' }} 262 | uses: softprops/action-gh-release@v2 263 | with: 264 | append_body: true 265 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 266 | prerelease: ${{ env.Bilix-prerelease }} 267 | fail_on_unmatched_files: true 268 | name: 'Bilix ${{ env.Bilix-ver }}(${{ env.Bilix-vercode }}) with BiliroamingX ${{ env.ver }}' 269 | tag_name: 'android-v${{ env.Bilix-ver }}-b${{ env.cn-sn }}-p${{ env.ver }}' 270 | body_path: /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Changelog.txt 271 | 272 | - name: Release Bilix-play 273 | if: ${{ env.Bilix-play-torelease == 'true' && env.PlayCorrectVer == 'true' && env.Build-Bilix-play == 'true' && env.Nightly == 'false' }} 274 | uses: softprops/action-gh-release@v2 275 | with: 276 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 277 | prerelease: ${{ env.Bilix-play-prerelease }} 278 | fail_on_unmatched_files: true 279 | name: 'Bilix play ${{ env.Bilix-play-ver }}(${{ env.Bilix-play-vercode }}) with BiliroamingX ${{ env.ver }}' 280 | tag_name: 'android_i-v${{ env.Bilix-play-ver }}-b${{ env.play-sn }}-p${{ env.ver }}' 281 | body: | 282 | 版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }} 283 | > 合并主分支 284 | > Bump bili ver to ${{ env.Bilix-play-vercode }} 285 | files: ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk 286 | continue-on-error: true 287 | 288 | - name: Release Bilix-play Changelog 289 | if: ${{ env.Bilix-play-torelease == 'true' && env.PlayCorrectVer == 'true' && env.Build-Bilix-play == 'true' && env.Nightly == 'false' }} 290 | uses: softprops/action-gh-release@v2 291 | with: 292 | append_body: true 293 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 294 | prerelease: ${{ env.Bilix-play-prerelease }} 295 | fail_on_unmatched_files: true 296 | name: 'Bilix play ${{ env.Bilix-play-ver }}(${{ env.Bilix-play-vercode }}) with BiliroamingX ${{ env.ver }}' 297 | tag_name: 'android_i-v${{ env.Bilix-play-ver }}-b${{ env.play-sn }}-p${{ env.ver }}' 298 | body_path: /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Changelog.txt 299 | 300 | # Del Release Nightly ver 301 | - name: Delete old Nightly Bilix 302 | if: ${{ env.correctVer == 'true' && env.Nightly == 'true' }} 303 | env: 304 | GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 305 | run: | 306 | gh release view "Nightly" && gh release delete "Nightly" -y --cleanup-tag 307 | continue-on-error: true 308 | 309 | # named Bilix-Nightly 310 | - name: Rename Bilix-Nightly 311 | if: ${{ env.Build-Bilix == 'true' && env.Build-Bilix-play == 'true' && env.correctVer == 'true' && env.Nightly == 'true' }} 312 | run: | 313 | mv Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk Bilix-cn-Nightly@Aniruf_x.apk 314 | mv Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk Bilix-play-Nightly@Aniruf_x.apk 315 | 316 | # Release Nightly 317 | - name: Release Bilix-Nightly 318 | if: ${{ env.correctVer == 'true' && env.Nightly == 'true' }} 319 | uses: softprops/action-gh-release@v2 320 | with: 321 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 322 | prerelease: true 323 | fail_on_unmatched_files: false 324 | name: 'Bilix Nightly - BiliRoamingX ${{ env.ver }}' 325 | tag_name: 'Nightly' 326 | body: | 327 | ![Nightly.jpg](https://github.com/sti-233/Bilix-PreBuilds/blob/main/Nightly.jpg) 328 | > 合并主分支 329 | > Bump bili-cn ver to ${{ env.Bilix-vercode }} 330 | > Bump bili-play ver to ${{ env.Bilix-play-vercode }} 331 | files: | 332 | ./Bilix-cn-Nightly@Aniruf_x.apk 333 | ./Bilix-play-Nightly@Aniruf_x.apk 334 | continue-on-error: true 335 | 336 | - name: Release Bilix-Nightly Changelog 337 | if: ${{ env.correctVer == 'true' && env.Nightly == 'true' }} 338 | uses: softprops/action-gh-release@v2 339 | with: 340 | append_body: true 341 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 342 | prerelease: true 343 | fail_on_unmatched_files: true 344 | name: 'Bilix Nightly - BiliRoamingX ${{ env.ver }}' 345 | tag_name: 'Nightly' 346 | body_path: /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Changelog.txt 347 | 348 | # output Bilix informations 349 | - name: Build Bilix Success 350 | if: ${{ env.Build-Bilix == 'true' && env.CnCorrectVer == 'true' && env.Nightly == 'false' }} 351 | run: | 352 | echo "### Build Bilix Success" >> $GITHUB_STEP_SUMMARY 353 | echo "版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 354 | echo " " >> $GITHUB_STEP_SUMMARY 355 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 356 | echo " > Bump bili ver to ${{ env.Bilix-play-vercode }}" >> $GITHUB_STEP_SUMMARY 357 | echo " " >> $GITHUB_STEP_SUMMARY 358 | echo "$(cat /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Changelog.txt)" >> $GITHUB_STEP_SUMMARY 359 | continue-on-error: true 360 | 361 | - name: Build Bilix-play Success 362 | if: ${{ env.Build-Bilix-play == 'true' && env.PlayCorrectVer == 'true' && env.Nightly == 'false' }} 363 | run: | 364 | echo "### Build Bilix-play Success" >> $GITHUB_STEP_SUMMARY 365 | echo "版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 366 | echo " " >> $GITHUB_STEP_SUMMARY 367 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 368 | echo " > Bump bili ver to ${{ env.Bilix-play-vercode }}" >> $GITHUB_STEP_SUMMARY 369 | echo " " >> $GITHUB_STEP_SUMMARY 370 | echo "$(cat /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Changelog.txt)" >> $GITHUB_STEP_SUMMARY 371 | continue-on-error: true 372 | 373 | # output Nightly ver info 374 | - name: Build Bilix-Nightly Success 375 | if: ${{ env.correctVer == 'true' && env.Nightly == 'true' }} 376 | run: | 377 | echo "### Build Bilix-Nightly Success" >> $GITHUB_STEP_SUMMARY 378 | echo "Cn版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 379 | echo "play版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 380 | echo " " >> $GITHUB_STEP_SUMMARY 381 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 382 | echo " > Bump bili-cn ver to ${{ env.Bilix-vercode }}" >> $GITHUB_STEP_SUMMARY 383 | echo " > Bump bili-play ver to ${{ env.Bilix-play-vercode }}" >> $GITHUB_STEP_SUMMARY 384 | echo " " >> $GITHUB_STEP_SUMMARY 385 | echo "$(cat /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Changelog.txt)" >> $GITHUB_STEP_SUMMARY 386 | continue-on-error: true 387 | 388 | - name: Prepare 389 | run : | 390 | mv ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk ./Bilix-Dev-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 391 | echo "Nightly_Changelog<> $GITHUB_ENV 392 | cat /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Changelog.txt >> $GITHUB_ENV 393 | echo "EOF" >> $GITHUB_ENV 394 | echo "DEV_APK=./Bilix-Dev-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk" >> $GITHUB_ENV 395 | pip install pyrogram tgcrypto 396 | 397 | - name: Send to Telegram 398 | shell: python 399 | env: 400 | API_ID: ${{ secrets.TELEGRAM_API_ID }} 401 | API_HASH: ${{ secrets.TELEGRAM_API_HASH }} 402 | CHANNEL_ID: ${{ secrets.CHANNEL_ID }} 403 | SESSION: ${{ secrets.TELEGRAM_SESSION }} 404 | run: | 405 | import asyncio 406 | import inspect 407 | import os 408 | from pyrogram import Client 409 | from pyrogram.types import InputMediaDocument 410 | async def main(): 411 | session = os.environ["SESSION"] 412 | bot = Client( 413 | "client", 414 | session_string=session, 415 | ) 416 | async with bot: 417 | RoamingXver = os.environ["ver"] 418 | ver = os.environ["Bilix-ver"] 419 | ver_code = os.environ["Bilix-vercode"] 420 | chat_id = os.environ["CHANNEL_ID"] 421 | changelog = os.environ["Nightly_Changelog"] 422 | msg_p1 = f"Bilix Dev" 423 | msg_p2 = f"BiliRoamingX {RoamingXver}" 424 | msg_p3 = f"
cn {ver} {ver_code}
" 425 | msg_p4 = "New release to GitHub!
"
426 |               msg_p5 = inspect.cleandoc("""
427 |               > 合并 sti-233/BiliRoamingX
428 |                *现在具有切换更新源的能力\n
429 |               """)
430 |               msg_p6 = f"{changelog}
" 431 | msg_p7 = inspect.cleandoc(""" 432 | by sti-233 433 | 在Github查看详情 434 | 435 | *此为非官方构建 436 | Patched by @Aniruf_x 437 | #Biliroaming_X #dev 438 | """) 439 | caption = "{}\n\n{}\n{}\n\n{}\n{}\n{}{}".format(msg_p1, msg_p2, msg_p3, msg_p4, msg_p5, msg_p6, msg_p7) 440 | dev = InputMediaDocument(media=os.environ["DEV_APK"], caption=caption) 441 | # 发送到指定的频道 442 | await bot.send_media_group( 443 | chat_id=chat_id, 444 | media=[dev], 445 | ) 446 | async def wait(): 447 | try: 448 | await asyncio.wait_for(main(), timeout=600) 449 | except asyncio.TimeoutError: 450 | print("message send timeout!!!") 451 | exit(1) 452 | asyncio.run(wait()) 453 | 454 | # Success 455 | - name: End 456 | run: echo "Build end." -------------------------------------------------------------------------------- /.github/workflows/Check-bili-update.yml: -------------------------------------------------------------------------------- 1 | name: Check-bili-update 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' 6 | workflow_dispatch: 7 | 8 | jobs: 9 | Check-bili-update: 10 | name: Check bili update 11 | strategy: 12 | fail-fast: false 13 | 14 | runs-on: ubuntu-latest 15 | steps: 16 | 17 | # Check repo 18 | - name: Checkout code 19 | uses: actions/checkout@v4 20 | 21 | # Save env 22 | - name: Initialize variables 23 | run: | 24 | echo "Bilix-cn-ver-local=`awk -F "=" '$1 == "Bilix.ver.cn" {print $2}' Build.prop`" >> $GITHUB_ENV 25 | echo "Bilix-hd-ver-local=`awk -F "=" '$1 == "Bilix.ver.hd" {print $2}' Build.prop`" >> $GITHUB_ENV 26 | echo "Bilix-play-ver-local=`awk -F "=" '$1 == "Bilix.ver.play" {print $2}' Build.prop`" >> $GITHUB_ENV 27 | echo "Bilix-cn-vercode-local=`awk -F "=" '$1 == "Bilix.vercode.cn" {print $2}' Build.prop`" >> $GITHUB_ENV 28 | echo "Bilix-hd-vercode-local=`awk -F "=" '$1 == "Bilix.vercode.hd" {print $2}' Build.prop`" >> $GITHUB_ENV 29 | echo "Bilix-play-vercode-local=`awk -F "=" '$1 == "Bilix.vercode.play" {print $2}' Build.prop`" >> $GITHUB_ENV 30 | 31 | #{"code":0,"message":"0","ttl":1,"data":{"title":"升级提醒","content":"上B站,看S14!\n-HDR色彩体验升级,4K房间超高清晰度带你沉浸式感受团战细节,领略赛事魅力!\n-哔友评分再度来袭,热辣点评金句不断,谁是你心目中的MVP?","version":"8.15.0","version_code":8150400,"url":"https://dl.hdslb.com/mobile/pack/android64/16180804/iBiliPlayer-apinkRelease-8.15.0-b16180804.apk","size":134916842,"md5":"8496ff757cbedc7dd9b6f6e8d91755d1","silent":0,"upgrade_type":1,"cycle":4,"policy":0,"policy_url":"","is_gray":0,"ptime":1727338471}} 32 | - name: Get update info 33 | run: | 34 | echo "Bili-cn-vercode-online=$(curl -s -G 'https://app.bilibili.com/x/v2/version/fawkes/upgrade' -d 'build=${{ env.Bilix-cn-vercode-local }}' -d 'channel=master' -d 'mobi_app=android' -d 'ov=30' -d 'nt=1' -d 'sn=15088473' -d 'vn=${{ env.Bilix-cn-ver-local }}' --header 'app-key: android64' --header 'buvid: XU607DF6A8098F57B0BAF7FC107714C3035F0' --header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' | jq -r '.data.version_code')" >> $GITHUB_ENV 35 | echo "Bili-cn-url-online=$(curl -s -G 'https://app.bilibili.com/x/v2/version/fawkes/upgrade' -d 'build=${{ env.Bilix-cn-vercode-local }}' -d 'channel=master' -d 'mobi_app=android' -d 'ov=30' -d 'nt=1' -d 'sn=15088473' -d 'vn=${{ env.Bilix-cn-ver-local }}' --header 'app-key: android64' --header 'buvid: XU607DF6A8098F57B0BAF7FC107714C3035F0' --header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' | jq -r '.data.url')" >> $GITHUB_ENV 36 | echo "Bili-cn-version-online=$(curl -s -G 'https://app.bilibili.com/x/v2/version/fawkes/upgrade' -d 'build=${{ env.Bilix-cn-vercode-local }}' -d 'channel=master' -d 'mobi_app=android' -d 'ov=30' -d 'nt=1' -d 'sn=15088473' -d 'vn=${{ env.Bilix-cn-ver-local }}' --header 'app-key: android64' --header 'buvid: XU607DF6A8098F57B0BAF7FC107714C3035F0' --header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' | jq -r '.data.version')" >> $GITHUB_ENV 37 | 38 | - name: Check update 39 | run: | 40 | if [ "${{ env.Bilix-cn-vercode-local }}" -lt "${{ env.Bili-cn-vercode-online }}" ]; then 41 | sed -i 's#^.*url\.custom\.bilibili\.cn.*$#url.custom.bilibili.cn=${{ env.Bili-cn-url-online }}#' ./Build.prop 42 | sed -i 's/^.*Bilix\.vercode\.cn.*$/Bilix.vercode.cn=${{ env.Bili-cn-vercode-online }}/' ./Build.prop 43 | sed -i 's/^.*Bilix\.ver\.cn.*$/Bilix.ver.cn=${{ env.Bili-cn-version-online }}/' ./Build.prop 44 | fi 45 | 46 | - name: Commit and push 47 | run: | 48 | git config --global user.name 'github-actions[bot]' 49 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 50 | git add Build.prop 51 | git commit -m "Update bilibili apk url" 52 | git push 53 | continue-on-error: true 54 | -------------------------------------------------------------------------------- /.github/workflows/Init.yml: -------------------------------------------------------------------------------- 1 | name: Init Bilix Build 2 | 3 | on: 4 | # schedule: 5 | # - cron: '0 0 * * *' 6 | workflow_dispatch: 7 | inputs: 8 | Forced-Build: 9 | description: 'Forced Build' 10 | type: boolean 11 | default: false 12 | required: true 13 | Release-All: 14 | description: 'Release All' 15 | type: boolean 16 | default: false 17 | required: true 18 | Release-cn: 19 | description: 'Release cn' 20 | type: boolean 21 | default: false 22 | required: true 23 | Release-play: 24 | description: 'Release play' 25 | type: boolean 26 | default: false 27 | required: true 28 | Release-hd: 29 | description: 'Release hd' 30 | type: boolean 31 | default: false 32 | required: true 33 | 34 | jobs: 35 | Build-Init: 36 | name: Init build work 37 | runs-on: ubuntu-latest 38 | steps: 39 | # Check repo 40 | - name: Checkout code 41 | uses: actions/checkout@v4 42 | # Save env 43 | - name: Initialize variables 44 | run: | 45 | echo "latest-commit-id=`awk -F "=" '$1 == "commit.id.latest" {print $2}' Build.prop`" >> $GITHUB_ENV 46 | echo "Nightly-commit-id=`awk -F "=" '$1 == "commit.id.nightly.start" {print $2}' Build.prop`" >> $GITHUB_ENV 47 | echo "Bilix-ver=`awk -F "=" '$1 == "Bilix.ver.cn" {print $2}' Build.prop`" >> $GITHUB_ENV 48 | echo "Bilix-play-ver=`awk -F "=" '$1 == "Bilix.ver.play" {print $2}' Build.prop`" >> $GITHUB_ENV 49 | echo "Bilix-vercode=`awk -F "=" '$1 == "Bilix.vercode.cn" {print $2}' Build.prop`" >> $GITHUB_ENV 50 | echo "Bilix-play-vercode=`awk -F "=" '$1 == "Bilix.vercode.play" {print $2}' Build.prop`" >> $GITHUB_ENV 51 | echo "compare-smallver=`awk -F "=" '$1 == "BiliRoamingX.ver.small" {print $2}' Build.prop`" >> $GITHUB_ENV 52 | echo "compare-bigver=`awk -F "=" '$1 == "BiliRoamingX.ver.big" {print $2}' Build.prop`" >> $GITHUB_ENV 53 | echo "vercode=`awk -F "=" '$1 == "BiliRoamingX.ver.code" {print $2}' Build.prop`" >> $GITHUB_ENV 54 | echo "compare-ver=`awk -F "=" '$1 == "BiliRoamingX.ver.compare" {print $2}' Build.prop`" >> $GITHUB_ENV 55 | echo "push-changelog=`awk -F "=" '$1 == "push.changelog" {print $2}' Build.prop`" >> $GITHUB_ENV 56 | # Changelog part 57 | - name: Save commit info 58 | run: | 59 | git clone --recurse-submodules https://github.com/sti-233/BiliRoamingX.git 60 | cd ./BiliRoamingX 61 | git log --oneline ${{ env.latest-commits-id }}...HEAD | sed 's/^[0-9a-f]\{8\} /- /' > /home/runner/work/Bilix-PreBuilds/Changelog.txt 62 | git log --oneline ${{ env.Nightly-commit-id }}..HEAD | sed 's/^[0-9a-f]\{8\} /- /' > /home/runner/work/Bilix-PreBuilds/Changelog_Nightly.txt 63 | git log -1 --format="%H" > /home/runner/work/Bilix-PreBuilds/latest_commit.txt 64 | version=`awk -F "=" '$1 == "version" {print $2}' gradle.properties` 65 | commit_count=`git rev-list HEAD --count` 66 | echo "get-version=$version" >> $GITHUB_ENV 67 | echo "get-commit_count=$commit_count" >> $GITHUB_ENV 68 | echo "latest-commit-id=$(cat /home/runner/work/Bilix-PreBuilds/latest_commit.txt)" >> $GITHUB_ENV 69 | echo "$GITHUB_WORKSPACE" 70 | ls -al $GITHUB_WORKSPACE 71 | cp $GITHUB_WORKSPACE/Build.prop ./Build.prop 72 | # return nothing to Changelog 73 | - name: Check if Changelog Empty 74 | if: ${{ env.push-changelog == 'true' }} 75 | run: | 76 | if [ ! -s /home/runner/work/Bilix-PreBuilds/Changelog.txt ]; then 77 | echo -e " - no change " >> /home/runner/work/Bilix-PreBuilds/Changelog.txt 78 | fi 79 | if [ ! -s /home/runner/work/Bilix-PreBuilds/Changelog_Nightly.txt ]; then 80 | echo -e " - no change " >> /home/runner/work/Bilix-PreBuilds/Changelog_Nightly.txt 81 | fi 82 | - name: val empty to Changelog 83 | if: ${{ env.push-changelog == 'false' }} 84 | run: | 85 | echo -e " - no changelog now " >> /home/runner/work/Bilix-PreBuilds/Changelog.txt 86 | echo -e " - no changelog now " >> /home/runner/work/Bilix-PreBuilds/Changelog_Nightly.txt 87 | # Get resource 88 | - name: Get fork resource 89 | if: ${{ github.event.inputs.Forced-Build != 'true' }} 90 | run: | 91 | cd ./ 92 | git clone https://github.com/sti-233/Bilix-PreBuilds.git 93 | 94 | ## Build BiliRoamingX CI 95 | # from fork 96 | - name: Set up JDK 97 | if: ${{ github.event.inputs.Forced-Build != 'true' }} 98 | uses: actions/setup-java@v4 99 | with: 100 | distribution: 'temurin' 101 | java-version: '17' 102 | 103 | - name: Cache gradle 104 | if: ${{ github.event.inputs.Forced-Build != 'true' }} 105 | uses: actions/cache@v4 106 | with: 107 | path: | 108 | ~/.gradle/caches 109 | ~/.gradle/wrapper 110 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/*.versions.toml') }} 111 | restore-keys: | 112 | ${{ runner.os }}-gradle- 113 | 114 | # try setup ssh 115 | - name: Set up SSH 116 | uses: webfactory/ssh-agent@v0.5.2 117 | with: 118 | ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} 119 | 120 | - name: Save version info 121 | run: | 122 | getvercode=$(echo ${{ env.get-version }} | cut -d '.' -f 1-3) 123 | vercode=$(echo "$getvercode" | awk -F. '{printf "%d0%d00%d\n", $1, $2, $3}') 124 | comparevercode=$(echo ${{ env.compare-bigver }} | cut -d '.' -f 1-3) 125 | comparevercode=$(echo "$comparevercode" | awk -F. '{printf "%d0%d00%d\n", $1, $2, $3}') 126 | echo "vercode=$vercode" >> $GITHUB_ENV 127 | echo "comparevercode=$comparevercode" >> $GITHUB_ENV 128 | 129 | - name: Retrieve version 130 | run: | 131 | # 判断大版本是否大于记录版本 132 | if [ "${{ env.vercode }}" -gt "${{ env.comparevercode }}" ]; then 133 | # 是 进行 Release&Nightly 134 | echo "BiliRoamingX-ver=${{ env.get-version }}" >> $GITHUB_ENV 135 | echo "Build-Release=true" >> $GITHUB_ENV 136 | echo "Build-Nightly=true" >> $GITHUB_ENV 137 | # 存变量 138 | sed -i 's/^.*BiliRoamingX\.ver\.full.*$/BiliRoamingX.ver.full=${{ env.get-version }}/' ./Build.prop 139 | sed -i 's/^.*BiliRoamingX\.ver\.big.*$/BiliRoamingX.ver.big=${{ env.get-version }}/' ./Build.prop 140 | sed -i 's/^.*BiliRoamingX\.ver\.small.*$/BiliRoamingX.ver.small=${{ env.get-commit_count }}/' ./Build.prop 141 | sed -i 's/^.*commit\.id\.nightly\.start.*$/commit.id.nightly.start=${{ env.latest-commit-id }}/' ./Build.prop 142 | sed -i 's/^.*BiliRoamingX\.ver\.code.*$/BiliRoamingX.ver.code=${{ env.vercode }}/' ./Build.prop 143 | sed -i 's/^.*BiliRoamingX\.ver\.compare.*$/BiliRoamingX.ver.compare=${{ env.get-commit_count }}/' ./Build.prop 144 | sed -i 's/^.*temp\.with\.release.*$/temp.with.release=true/' ./Build.prop 145 | else 146 | # 否 判断小版本是否大于保留版本10次 147 | if [ $((${{ env.get-commit_count }} - 10)) -ge "${{ env.compare-ver }}" ]; then 148 | # 是 进行 Release&Nightly 149 | echo "Build-Release=true" >> $GITHUB_ENV 150 | echo "Build-Nightly=true" >> $GITHUB_ENV 151 | echo "BiliRoamingX-ver=${{ env.get-version }}.r${{ env.get-commit_count }}" >> $GITHUB_ENV 152 | # 存变量 153 | sed -i 's/^.*BiliRoamingX\.ver\.full.*$/BiliRoamingX.ver.full=${{ env.get-version }}.r${{ env.get-commit_count }}/' ./Build.prop 154 | sed -i 's/^.*commit\.id\.nightly\.start.*$/commit.id.nightly.start=${{ env.latest-commit-id }}/' ./Build.prop 155 | sed -i 's/^.*BiliRoamingX\.ver\.small.*$/BiliRoamingX.ver.small=${{ env.get-commit_count }}/' ./Build.prop 156 | sed -i 's/^.*BiliRoamingX\.ver\.big.*$/BiliRoamingX.ver.big=${{ env.get-version }}/' ./Build.prop 157 | sed -i 's/^.*BiliRoamingX\.ver\.compare.*$/BiliRoamingX.ver.compare=${{ env.get-commit_count }}/' ./Build.prop 158 | sed -i 's/^.*temp\.with\.release.*$/temp.with.release=true/' ./Build.prop 159 | else 160 | # 否 判断小版本是否大于记录版本 161 | if [ "${{ env.get-commit_count }}" -gt "${{ env.compare-smallver }}" ]; then 162 | # 是 进行 Nightly 163 | echo "BiliRoamingX-ver=${{ env.get-version }}.r${{ env.get-commit_count }}" >> $GITHUB_ENV 164 | echo "Build-Release=false" >> $GITHUB_ENV 165 | echo "Build-Nightly=true" >> $GITHUB_ENV 166 | # 存变量 167 | sed -i 's/^.*BiliRoamingX\.ver\.full.*$/BiliRoamingX.ver.full=${{ env.get-version }}.r${{ env.get-commit_count }}/' ./Build.prop 168 | sed -i 's/^.*BiliRoamingX\.ver\.small.*$/BiliRoamingX.ver.small=${{ env.get-commit_count }}/' ./Build.prop 169 | sed -i 's/^.*BiliRoamingX\.ver\.big.*$/BiliRoamingX.ver.big=${{ env.get-version }}/' ./Build.prop 170 | sed -i 's/^.*temp\.with\.release.*$/temp.with.release=false/' ./Build.prop 171 | else 172 | # 否 判断是否为强制构建 173 | if [ "${{ github.event.inputs.Forced-Build }}" == "true" ]; then 174 | # 是 进行 Nightly 175 | echo "BiliRoamingX-ver=${{ env.get-version }}.r${{ env.get-commit_count }}" >> $GITHUB_ENV 176 | echo "need-Build=true" >> $GITHUB_ENV 177 | echo "Build-Release=false" >> $GITHUB_ENV 178 | echo "Build-Nightly=true" >> $GITHUB_ENV 179 | sed -i 's/^.*temp\.with\.release.*$/temp.with.release=false/' ./Build.prop 180 | else 181 | # 否 不构建 182 | echo "need-Build=false" >> $GITHUB_ENV 183 | echo "Build-Release=false" >> $GITHUB_ENV 184 | echo "Build-Nightly=false" >> $GITHUB_ENV 185 | fi 186 | fi 187 | fi 188 | fi 189 | 190 | - name: Retrieve Release Result 191 | run: | 192 | if [ "${{ github.event.inputs.Release-All }}" == "true" ]; then 193 | sed -i 's/^.*temp\.with\.release.*$/temp.with.release=true/' ./Build.prop 194 | else 195 | sed -i 's/^.*temp\.with\.release.*$/temp.with.release=false/' ./Build.prop 196 | fi 197 | if [ "${{ github.event.inputs.Release-cn }}" == "true" ]; then 198 | sed -i 's/^.*temp\.release\.cn.*$/temp.release.cn=true/' ./Build.prop 199 | else 200 | sed -i 's/^.*temp\.release\.cn.*$/temp.release.cn=false/' ./Build.prop 201 | fi 202 | if [ "${{ github.event.inputs.Release-play }}" == "true" ]; then 203 | sed -i 's/^.*temp\.release\.play.*$/temp.release.play=true/' ./Build.prop 204 | else 205 | sed -i 's/^.*temp\.release\.play.*$/temp.release.play=false/' ./Build.prop 206 | fi 207 | if [ "${{ github.event.inputs.Release-hd }}" == "true" ]; then 208 | sed -i 's/^.*temp\.release\.hd.*$/temp.release.hd=true/' ./Build.prop 209 | else 210 | sed -i 's/^.*temp\.release\.hd.*$/temp.release.hd=false/' ./Build.prop 211 | fi 212 | 213 | - name: Build with gradle 214 | if: ${{ (github.event.inputs.Forced-Build != 'true' || github.event.inputs.Forced-Build == '') && (env.need-Build != 'false' || env.need-Build == '') }} 215 | env: 216 | GITHUB_TOKEN: ${{ github.token }} 217 | run: | 218 | rm ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/account/Accounts.kt 219 | git clone git@github.com:sti-233/Close-BiliRoamingX.git 220 | mv ./Close-BiliRoamingX/Accounts.kt ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/account/Accounts.kt 221 | cd ./BiliRoamingX 222 | ./gradlew --no-daemon -Dorg.gradle.jvmargs=-Xmx2g -Pversion=${{ env.BiliRoamingX-ver }} dist 223 | 224 | - name: Upload CI Resource 225 | uses: actions/upload-artifact@v4 226 | if: ${{ (github.event.inputs.Forced-Build != 'true' || github.event.inputs.Forced-Build == '') && (env.need-Build != 'false' || env.need-Build == '') && success() }} 227 | with: 228 | name: BiliRoamingX-${{ env.BiliRoamingX-ver }} 229 | path: /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/BiliRoamingX/build/* 230 | 231 | - name: Upload Build Resource 232 | uses: actions/upload-artifact@v4 233 | if: ${{ (github.event.inputs.Forced-Build != 'true' || github.event.inputs.Forced-Build == '') && (env.need-Build != 'false' || env.need-Build == '') && success() }} 234 | with: 235 | name: Build_resource 236 | path: | 237 | /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Build.prop 238 | /home/runner/work/Bilix-PreBuilds/Changelog.txt 239 | /home/runner/work/Bilix-PreBuilds/Changelog_Nightly.txt 240 | 241 | - name: Push Build Resource 242 | if: ${{ (github.event.inputs.Forced-Build != 'true' || github.event.inputs.Forced-Build == '') && (env.need-Build != 'false' || env.need-Build == '') && success() }} 243 | run: | 244 | cd ./ 245 | mkdir -p build 246 | cp /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/BiliRoamingX/build/BiliRoamingX-integrations-${{ env.BiliRoamingX-ver }}.apk ./build/integrations.apk 247 | cp /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/BiliRoamingX/build/BiliRoamingX-patches-${{ env.BiliRoamingX-ver }}.jar ./build/patches.jar 248 | cp /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Build.prop ./build/Build.prop 249 | cp /home/runner/work/Bilix-PreBuilds/Changelog.txt ./build/Changelog.txt 250 | cp /home/runner/work/Bilix-PreBuilds/Changelog_Nightly.txt ./build/Changelog_Nightly.txt 251 | git config --global user.name 'github-actions[bot]' 252 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 253 | git add build/Build.prop 254 | git add build/patches.jar 255 | git add build/integrations.apk 256 | git add build/Changelog.txt 257 | git add build/Changelog_Nightly.txt 258 | git commit -m "Push resource" 259 | git push 260 | continue-on-error: true 261 | 262 | - name: Push Build Resource 263 | if: ${{ github.event.inputs.Forced-Build == 'true' && (env.need-Build != 'false' || env.need-Build == '') }} 264 | run: | 265 | cd ./ 266 | mkdir -p build 267 | cp /home/runner/work/Bilix-PreBuilds/Bilix-PreBuilds/Build.prop ./build/Build.prop 268 | cp /home/runner/work/Bilix-PreBuilds/Changelog.txt ./build/Changelog.txt 269 | cp /home/runner/work/Bilix-PreBuilds/Changelog_Nightly.txt ./build/Changelog_Nightly.txt 270 | git config --global user.name 'github-actions[bot]' 271 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 272 | git add build/Build.prop 273 | git add build/Changelog.txt 274 | git add build/Changelog_Nightly.txt 275 | git commit -m "Push resource" 276 | git push 277 | continue-on-error: true 278 | 279 | ## Init Build work 280 | - name: Init Build cn 281 | if: ${{ env.need-Build != 'false' || env.need-Build == '' }} 282 | run: | 283 | curl -X POST \ 284 | -H "Accept: application/vnd.github.v3+json" \ 285 | -H "Authorization: token ${{ secrets.CUSTOM_GITHUB_TOKEN }}" \ 286 | https://api.github.com/repos/${{ github.repository }}/dispatches \ 287 | -d '{"event_type":"Build-cn"}' 288 | 289 | - name: Init Build play 290 | if: ${{ env.need-Build != 'false' || env.need-Build == '' }} 291 | run: | 292 | curl -X POST \ 293 | -H "Accept: application/vnd.github.v3+json" \ 294 | -H "Authorization: token ${{ secrets.CUSTOM_GITHUB_TOKEN }}" \ 295 | https://api.github.com/repos/${{ github.repository }}/dispatches \ 296 | -d '{"event_type":"Build-play"}' 297 | 298 | - name: Init Build hd 299 | if: ${{ env.need-Build != 'false' || env.need-Build == '' }} 300 | run: | 301 | curl -X POST \ 302 | -H "Accept: application/vnd.github.v3+json" \ 303 | -H "Authorization: token ${{ secrets.CUSTOM_GITHUB_TOKEN }}" \ 304 | https://api.github.com/repos/${{ github.repository }}/dispatches \ 305 | -d '{"event_type":"Build-hd"}' 306 | 307 | # Success 308 | - name: End 309 | run: echo "Init end." 310 | -------------------------------------------------------------------------------- /.github/workflows/Nightly-Build.yml: -------------------------------------------------------------------------------- 1 | name: Build Bilix-Nightly 2 | 3 | on: 4 | repository_dispatch: 5 | types: [Nightly] 6 | 7 | jobs: 8 | Build-Bilix-Nightly: 9 | name: Build Bilix-Nightly 10 | strategy: 11 | fail-fast: false 12 | 13 | runs-on: ubuntu-latest 14 | steps: 15 | 16 | # Get $publishTime 17 | - name: Get Current Time 18 | run: | 19 | TIME=$EPOCHSECONDS 20 | echo "TIME=$TIME" >> $GITHUB_ENV 21 | 22 | # Check repo 23 | - name: Checkout code 24 | uses: actions/checkout@v4 25 | 26 | # Save env 27 | - name: Initialize variables 28 | run: | 29 | # Check custom 30 | echo "url-custom-cn=`awk -F "=" '$1 == "url.custom.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 31 | echo "url-custom-play=`awk -F "=" '$1 == "url.custom.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 32 | echo "url-custom-revanced-cli=`awk -F "=" '$1 == "url.custom.revanced.cli" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 33 | # Get custom url 34 | echo "cn-url=`awk -F "=" '$1 == "url.custom.bilibili.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 35 | echo "play-url=`awk -F "=" '$1 == "url.custom.bilibili.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 36 | echo "cli-url=`awk -F "=" '$1 == "url.custom.revanced.cli" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 37 | # Get version info 38 | echo "ver=`awk -F "=" '$1 == "BiliRoamingX.ver.full" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 39 | echo "bigver=`awk -F "=" '$1 == "BiliRoamingX.ver.code" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 40 | # Changelog need 41 | echo "push-changelog=`awk -F "=" '$1 == "push.changelog" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 42 | # Build need 43 | echo "with-release=`awk -F "=" '$1 == "temp.with.release" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 44 | 45 | # Get revanced-cli 46 | - name: Get Revanced-cli 47 | run: | 48 | cd ./ 49 | echo Downloading modified revanced-cli 50 | wget https://github.com/zjns/revanced-cli/releases/download/v4.6.0.1/revanced-cli.jar 51 | 52 | # Get original bilibili url 53 | - name: Get original bilibili url 54 | if: ${{ env.url-custom-cn == 'false' }} 55 | run: | 56 | wget https://t.me/s/bilibili_apk_beta 57 | echo "cn-url=$(grep '
原版64位 ' bilibili_apk_beta | tee original-message.txt | grep -oP '\(\K[0-9]+' | sort -n | tail -1 | xargs -I {} grep {} original-message.txt | sed -n 's/.*rel="noopener">\(.*\)<\/a>.*/\1/p')" >> $GITHUB_ENV 58 | 59 | # Get original bilibili 60 | - name: Get original bilibili 61 | run: | 62 | aria2c --out "cn.apk" ${{ env.cn-url }} 63 | if [ "${{ env.url-custom-play }}" = "false" ]; then 64 | aria2c --out "play.apk" https://d.apkpure.com/b/APK/com.bilibili.app.in?version=latest 65 | fi 66 | if [ "${{ env.url-custom-play }}" = "true" ]; then 67 | aria2c --out "play.apk" ${{ env.play-url }} 68 | fi 69 | 70 | # Check $version & $versionCode 71 | - name: "Get Cn Info" 72 | id: "apk-info-cn" 73 | uses: "8Mi-Tech/get-apk-info-action@master" 74 | with: 75 | apkPath: "cn.apk" 76 | - name: "Get Play Info" 77 | id: "apk-info-play" 78 | uses: "8Mi-Tech/get-apk-info-action@master" 79 | with: 80 | apkPath: "play.apk" 81 | #版本号:${{steps.apk-info.outputs.versionNum}} 82 | #版本代码:${{steps.apk-info.outputs.versionCode}} 83 | 84 | # Get cn $patchVersion $patchVersionCode 85 | - name: Get Bilibili info 86 | run: | 87 | echo "Bilix-ver=${{steps.apk-info-cn.outputs.versionNum}}" >> $GITHUB_ENV 88 | echo "Bilix-vercode=${{steps.apk-info-cn.outputs.versionCode}}" >> $GITHUB_ENV 89 | echo "Bilix-play-ver=${{steps.apk-info-play.outputs.versionNum}}" >> $GITHUB_ENV 90 | echo "Bilix-play-vercode=${{steps.apk-info-play.outputs.versionCode}}" >> $GITHUB_ENV 91 | 92 | # build part 93 | - name: Build Bilix 94 | run: | 95 | cp ./build/patches.jar ./patches.jar 96 | cp ./build/integrations.apk ./integrations.apk 97 | java -jar revanced-cli.jar patch --merge integrations.apk --patch-bundle patches.jar --signing-levels 1,2,3 cn.apk 98 | java -jar revanced-cli.jar patch --merge integrations.apk --patch-bundle patches.jar --signing-levels 1,2,3 play.apk 99 | 100 | # named Bilix 101 | - name: Rename Bilix 102 | run: | 103 | mv cn-patched.apk Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 104 | mv play-patched.apk Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk 105 | 106 | # Signing Bilix 107 | - name: Resign Bilix 108 | run: | 109 | cd ./ 110 | echo Downloading uber-apk-signer 111 | wget https://github.com/patrickfav/uber-apk-signer/releases/download/v1.3.0/uber-apk-signer-1.3.0.jar 112 | java -jar uber-apk-signer-1.3.0.jar -a Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk --overwrite --allowResign --ks BiliRoamingX.p12 --ksAlias ${{ secrets.signalias }} --ksKeyPass ${{ secrets.signkey }} --ksPass ${{ secrets.signkey }} 113 | java -jar uber-apk-signer-1.3.0.jar -a Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk --overwrite --allowResign --ks BiliRoamingX.p12 --ksAlias ${{ secrets.signalias }} --ksKeyPass ${{ secrets.signkey }} --ksPass ${{ secrets.signkey }} 114 | 115 | 116 | # Get $sn 117 | - name: Get sn from Bilix 118 | run: | 119 | sudo apt-get install aapt 120 | aapt dump xmltree ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk AndroidManifest.xml > AndroidManifest_output_cn.txt 121 | echo "cn-sn=$(grep "BUILD_SN" ./AndroidManifest_output_cn.txt -A 1 | grep "android:value" | cut -d'=' -f2 | cut -d')' -f2 | awk '{printf "%d\n", strtonum($1)}')" >> $GITHUB_ENV 122 | aapt dump xmltree ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk AndroidManifest.xml > AndroidManifest_output_play.txt 123 | echo "play-sn=$(grep "BUILD_SN" ./AndroidManifest_output_play.txt -A 1 | grep "android:value" | cut -d'=' -f2 | cut -d')' -f2 | awk '{printf "%d\n", strtonum($1)}')" >> $GITHUB_ENV 124 | 125 | # Get $md5 126 | - name: Get md5 from Bilix 127 | run: | 128 | echo "cn-md5=$(md5sum ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk | cut -d ' ' -f 1)" >> $GITHUB_ENV 129 | echo "play-md5=$(md5sum ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk | cut -d ' ' -f 1)" >> $GITHUB_ENV 130 | 131 | # Get $size 132 | - name: Get size from Bilix 133 | run: | 134 | echo "cn-size=$(stat -c %s ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk)" >> $GITHUB_ENV 135 | echo "play-size=$(stat -c %s ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk)" >> $GITHUB_ENV 136 | 137 | # Release part 138 | # Del Release Nightly ver 139 | - name: Delete old Nightly Bilix 140 | env: 141 | GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 142 | run: | 143 | gh release view "Nightly" && gh release delete "Nightly" -y --cleanup-tag 144 | continue-on-error: true 145 | 146 | # named Bilix-Nightly 147 | - name: Rename Bilix-Nightly 148 | run: | 149 | mv Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk Bilix-cn-Nightly@Aniruf_x.apk 150 | mv Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk Bilix-play-Nightly@Aniruf_x.apk 151 | 152 | # Release Nightly 153 | - name: Release Bilix-Nightly 154 | uses: softprops/action-gh-release@v2 155 | with: 156 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 157 | fail_on_unmatched_files: false 158 | name: 'Bilix Nightly - BiliRoamingX ${{ env.ver }}' 159 | tag_name: 'Nightly' 160 | body: | 161 | ![Nightly.jpg](https://github.com/sti-233/Bilix-PreBuilds/blob/main/Nightly.jpg) 162 | Cn版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }} 163 | Play版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }} 164 | 165 | > 合并主分支 166 | > Bump bili-cn ver to ${{ env.Bilix-vercode }} 167 | > Bump bili-play ver to ${{ env.Bilix-play-vercode }} 168 | files: | 169 | ./Bilix-cn-Nightly@Aniruf_x.apk 170 | ./Bilix-play-Nightly@Aniruf_x.apk 171 | continue-on-error: true 172 | 173 | - name: Release Bilix-Nightly Changelog 174 | uses: softprops/action-gh-release@v2 175 | with: 176 | append_body: true 177 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 178 | fail_on_unmatched_files: true 179 | name: 'Bilix Nightly - BiliRoamingX ${{ env.ver }}' 180 | tag_name: 'Nightly' 181 | body_path: ./build/Changelog_Nightly.txt 182 | 183 | # output Bilix informations 184 | # output Nightly ver info 185 | - name: Build Bilix-Nightly Success 186 | run: | 187 | echo "### Build Bilix-Nightly Success" >> $GITHUB_STEP_SUMMARY 188 | echo "Cn版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 189 | echo "Play版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 190 | echo " " >> $GITHUB_STEP_SUMMARY 191 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 192 | echo " > Bump bili-cn ver to ${{ env.Bilix-vercode }}" >> $GITHUB_STEP_SUMMARY 193 | echo " > Bump bili-play ver to ${{ env.Bilix-play-vercode }}" >> $GITHUB_STEP_SUMMARY 194 | echo " " >> $GITHUB_STEP_SUMMARY 195 | echo "$(cat ./build/Changelog_Nightly.txt)" >> $GITHUB_STEP_SUMMARY 196 | continue-on-error: true 197 | 198 | - name: Upload Build Resource 199 | if: ${{ env.with-release == 'false' }} 200 | run: | 201 | cd ./ 202 | rm ./Build.prop 203 | cp ./build/Build.prop ./Build.prop 204 | git config --global user.name 'github-actions[bot]' 205 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 206 | git add Build.prop 207 | git commit -m "Push prop" 208 | git push 209 | continue-on-error: true 210 | 211 | # Success 212 | - name: End 213 | run: echo "Build end." 214 | -------------------------------------------------------------------------------- /.github/workflows/Release-Build.yml: -------------------------------------------------------------------------------- 1 | name: Build Bilix-Release 2 | 3 | on: 4 | repository_dispatch: 5 | types: [Release] 6 | 7 | jobs: 8 | Build-Bilix-Release: 9 | name: Build Bilix-Release 10 | strategy: 11 | fail-fast: false 12 | 13 | runs-on: ubuntu-latest 14 | steps: 15 | 16 | # Get $publishTime 17 | - name: Get Current Time 18 | run: | 19 | TIME=$EPOCHSECONDS 20 | echo "TIME=$TIME" >> $GITHUB_ENV 21 | 22 | # Check repo 23 | - name: Checkout code 24 | uses: actions/checkout@v4 25 | 26 | # Save env 27 | - name: Initialize variables 28 | run: | 29 | # Check custom 30 | echo "url-custom-cn=`awk -F "=" '$1 == "url.custom.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 31 | echo "url-custom-play=`awk -F "=" '$1 == "url.custom.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 32 | echo "url-custom-revanced-cli=`awk -F "=" '$1 == "url.custom.revanced.cli" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 33 | # Get custom url 34 | echo "cn-url=`awk -F "=" '$1 == "url.custom.bilibili.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 35 | echo "play-url=`awk -F "=" '$1 == "url.custom.bilibili.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 36 | echo "cli-url=`awk -F "=" '$1 == "url.custom.revanced.cli" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 37 | # Get version info 38 | echo "ver=`awk -F "=" '$1 == "BiliRoamingX.ver.full" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 39 | echo "bigver=`awk -F "=" '$1 == "BiliRoamingX.ver.code" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 40 | # Build need 41 | echo "Build-Bilix=`awk -F "=" '$1 == "Bilix.build.cn" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 42 | echo "Build-Bilix-play=`awk -F "=" '$1 == "Bilix.build.play" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 43 | echo "with-release=`awk -F "=" '$1 == "temp.with.release" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 44 | # Changelog need 45 | echo "push-changelog=`awk -F "=" '$1 == "push.changelog" {print $2}' ./build/Build.prop`" >> $GITHUB_ENV 46 | 47 | # Get revanced-cli 48 | - name: Get Revanced-cli 49 | if: ${{ env.with-release == 'true' }} 50 | run: | 51 | cd ./ 52 | echo Downloading modified revanced-cli 53 | wget https://github.com/zjns/revanced-cli/releases/download/v4.6.0.1/revanced-cli.jar 54 | cp ./build/patches.jar ./patches.jar 55 | cp ./build/integrations.apk ./integrations.apk 56 | 57 | - name: Get original bilibili url 58 | if: ${{ env.url-custom-cn == 'false' && env.Build-Bilix == 'true' && env.with-release == 'true' }} 59 | run: | 60 | wget https://t.me/s/bilibili_apk_beta 61 | echo "cn-url=$(grep '
原版64位 ' bilibili_apk_beta | tee original-message.txt | grep -oP '\(\K[0-9]+' | sort -n | tail -1 | xargs -I {} grep {} original-message.txt | sed -n 's/.*rel="noopener">\(.*\)<\/a>.*/\1/p')" >> $GITHUB_ENV 62 | 63 | # Get original bilibili 64 | - name: Get original bilibili-cn 65 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 66 | run: | 67 | aria2c --out "cn.apk" ${{ env.cn-url }} 68 | - name: Get original bilibili-play 69 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 70 | run: | 71 | if [ "${{ env.url-custom-play }}" = "false" ]; then 72 | aria2c --out "play.apk" https://d.apkpure.com/b/APK/com.bilibili.app.in?version=latest 73 | fi 74 | if [ "${{ env.url-custom-play }}" = "true" ]; then 75 | aria2c --out "play.apk" ${{ env.play-url }} 76 | fi 77 | 78 | # Check $version & $versionCode 79 | - name: "Get Cn Info" 80 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 81 | id: "apk-info-cn" 82 | uses: "8Mi-Tech/get-apk-info-action@master" 83 | with: 84 | apkPath: "cn.apk" 85 | - name: "Get Play Info" 86 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 87 | id: "apk-info-play" 88 | uses: "8Mi-Tech/get-apk-info-action@master" 89 | with: 90 | apkPath: "play.apk" 91 | #版本号:${{steps.apk-info.outputs.versionNum}} 92 | #版本代码:${{steps.apk-info.outputs.versionCode}} 93 | 94 | # Get cn $patchVersion $patchVersionCode 95 | - name: Get Bilibili-cn info 96 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 97 | run: | 98 | echo "Bilix-ver=${{steps.apk-info-cn.outputs.versionNum}}" >> $GITHUB_ENV 99 | echo "Bilix-vercode=${{steps.apk-info-cn.outputs.versionCode}}" >> $GITHUB_ENV 100 | - name: Get Bilibili-play info 101 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 102 | run: | 103 | echo "Bilix-play-ver=${{steps.apk-info-play.outputs.versionNum}}" >> $GITHUB_ENV 104 | echo "Bilix-play-vercode=${{steps.apk-info-play.outputs.versionCode}}" >> $GITHUB_ENV 105 | 106 | # build part 107 | - name: Build Bilix 108 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 109 | run: | 110 | java -jar revanced-cli.jar patch --merge integrations.apk --patch-bundle patches.jar --signing-levels 1,2,3 cn.apk 111 | - name: Build Bilix-play 112 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 113 | run: | 114 | java -jar revanced-cli.jar patch --merge integrations.apk --patch-bundle patches.jar --signing-levels 1,2,3 play.apk 115 | 116 | # named Bilix 117 | - name: Rename Bilix 118 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 119 | run: | 120 | mv cn-patched.apk Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 121 | - name: Rename Bilix-play 122 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 123 | run: | 124 | mv play-patched.apk Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk 125 | 126 | # Signing Bilix 127 | - name: Resign Bilix 128 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 129 | run: | 130 | cd ./ 131 | echo Downloading uber-apk-signer 132 | wget https://github.com/patrickfav/uber-apk-signer/releases/download/v1.3.0/uber-apk-signer-1.3.0.jar 133 | java -jar uber-apk-signer-1.3.0.jar -a Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk --overwrite --allowResign --ks BiliRoamingX.p12 --ksAlias ${{ secrets.signalias }} --ksKeyPass ${{ secrets.signkey }} --ksPass ${{ secrets.signkey }} 134 | - name: Resign Bilix 135 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 136 | run: | 137 | java -jar uber-apk-signer-1.3.0.jar -a Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk --overwrite --allowResign --ks BiliRoamingX.p12 --ksAlias ${{ secrets.signalias }} --ksKeyPass ${{ secrets.signkey }} --ksPass ${{ secrets.signkey }} 138 | 139 | 140 | # Get $sn 141 | - name: Get sn from Bilix 142 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 143 | run: | 144 | sudo apt-get install aapt 145 | aapt dump xmltree ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk AndroidManifest.xml > AndroidManifest_output_cn.txt 146 | echo "cn-sn=$(grep "BUILD_SN" ./AndroidManifest_output_cn.txt -A 1 | grep "android:value" | cut -d'=' -f2 | cut -d')' -f2 | awk '{printf "%d\n", strtonum($1)}')" >> $GITHUB_ENV 147 | 148 | - name: Get sn from Bilix-play 149 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 150 | run: | 151 | aapt dump xmltree ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk AndroidManifest.xml > AndroidManifest_output_play.txt 152 | echo "play-sn=$(grep "BUILD_SN" ./AndroidManifest_output_play.txt -A 1 | grep "android:value" | cut -d'=' -f2 | cut -d')' -f2 | awk '{printf "%d\n", strtonum($1)}')" >> $GITHUB_ENV 153 | 154 | # Get $md5 155 | - name: Get md5 from Bilix 156 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 157 | run: | 158 | echo "cn-md5=$(md5sum ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk | cut -d ' ' -f 1)" >> $GITHUB_ENV 159 | 160 | - name: Get md5 from Bilix-play 161 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 162 | run: | 163 | echo "play-md5=$(md5sum ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk | cut -d ' ' -f 1)" >> $GITHUB_ENV 164 | 165 | # Get $size 166 | - name: Get size from Bilix 167 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 168 | run: | 169 | echo "cn-size=$(stat -c %s ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk)" >> $GITHUB_ENV 170 | 171 | - name: Get size from Bilix-play 172 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 173 | run: | 174 | echo "play-size=$(stat -c %s ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk)" >> $GITHUB_ENV 175 | 176 | # Release part 177 | - name: Release Bilix 178 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 179 | uses: softprops/action-gh-release@v2 180 | with: 181 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 182 | fail_on_unmatched_files: true 183 | name: 'Bilix ${{ env.Bilix-ver }}(${{ env.Bilix-vercode }}) with BiliroamingX ${{ env.ver }}' 184 | tag_name: 'android-v${{ env.Bilix-ver }}-b${{ env.cn-sn }}-p${{ env.ver }}' 185 | body: | 186 | 版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }} 187 | > 合并主分支 188 | > Bump bili ver to ${{ env.Bilix-vercode }} 189 | files: ./Bilix-${{ env.Bilix-ver }}-${{ env.ver }}@Aniruf_x.apk 190 | continue-on-error: true 191 | 192 | - name: Release Bilix Changelog 193 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 194 | uses: softprops/action-gh-release@v2 195 | with: 196 | append_body: true 197 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 198 | fail_on_unmatched_files: true 199 | name: 'Bilix ${{ env.Bilix-ver }}(${{ env.Bilix-vercode }}) with BiliroamingX ${{ env.ver }}' 200 | tag_name: 'android-v${{ env.Bilix-ver }}-b${{ env.cn-sn }}-p${{ env.ver }}' 201 | body_path: ./build/Changelog_Nightly.txt 202 | 203 | - name: Release Bilix-play 204 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 205 | uses: softprops/action-gh-release@v2 206 | with: 207 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 208 | fail_on_unmatched_files: true 209 | name: 'Bilix play ${{ env.Bilix-play-ver }}(${{ env.Bilix-play-vercode }}) with BiliroamingX ${{ env.ver }}' 210 | tag_name: 'android_i-v${{ env.Bilix-play-ver }}-b${{ env.play-sn }}-p${{ env.ver }}' 211 | body: | 212 | 版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }} 213 | > 合并主分支 214 | > Bump bili ver to ${{ env.Bilix-play-vercode }} 215 | files: ./Bilix-play-${{ env.Bilix-play-ver }}-${{ env.ver }}@Aniruf_x.apk 216 | continue-on-error: true 217 | 218 | - name: Release Bilix-play Changelog 219 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 220 | uses: softprops/action-gh-release@v2 221 | with: 222 | append_body: true 223 | token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} 224 | fail_on_unmatched_files: true 225 | name: 'Bilix play ${{ env.Bilix-play-ver }}(${{ env.Bilix-play-vercode }}) with BiliroamingX ${{ env.ver }}' 226 | tag_name: 'android_i-v${{ env.Bilix-play-ver }}-b${{ env.play-sn }}-p${{ env.ver }}' 227 | body_path: ./build/Changelog_Nightly.txt 228 | 229 | # output Bilix informations 230 | - name: Build Bilix Success 231 | if: ${{ env.Build-Bilix == 'true' && env.with-release == 'true' }} 232 | run: | 233 | echo "### Build Bilix Success" >> $GITHUB_STEP_SUMMARY 234 | echo "版本信息:${{ env.Bilix-ver }} ${{ env.Bilix-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.cn-sn }} ${{ env.cn-size }} ${{ env.cn-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 235 | echo " " >> $GITHUB_STEP_SUMMARY 236 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 237 | echo " > Bump bili ver to ${{ env.Bilix-play-vercode }}" >> $GITHUB_STEP_SUMMARY 238 | echo " " >> $GITHUB_STEP_SUMMARY 239 | echo "$(cat ./build/Changelog_Nightly.txt)" >> $GITHUB_STEP_SUMMARY 240 | continue-on-error: true 241 | 242 | - name: Build Bilix-play Success 243 | if: ${{ env.Build-Bilix-play == 'true' && env.with-release == 'true' }} 244 | run: | 245 | echo "### Build Bilix-play Success" >> $GITHUB_STEP_SUMMARY 246 | echo "版本信息:${{ env.Bilix-play-ver }} ${{ env.Bilix-play-vercode }} ${{ env.ver }} ${{ env.bigver }} ${{ env.play-sn }} ${{ env.play-size }} ${{ env.play-md5 }} ${{ env.TIME }}" >> $GITHUB_STEP_SUMMARY 247 | echo " " >> $GITHUB_STEP_SUMMARY 248 | echo " > 合并主分支" >> $GITHUB_STEP_SUMMARY 249 | echo " > Bump bili ver to ${{ env.Bilix-play-vercode }}" >> $GITHUB_STEP_SUMMARY 250 | echo " " >> $GITHUB_STEP_SUMMARY 251 | echo "$(cat ./build/Changelog_Nightly.txt)" >> $GITHUB_STEP_SUMMARY 252 | continue-on-error: true 253 | 254 | - name: Upload Build Resource 255 | if: ${{ env.with-release == 'true' }} 256 | run: | 257 | cd ./ 258 | rm ./Build.prop 259 | cp ./build/Build.prop ./Build.prop 260 | git config --global user.name 'github-actions[bot]' 261 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 262 | git add Build.prop 263 | git commit -m "Push prop" 264 | git push 265 | 266 | # Success 267 | - name: End 268 | run: echo "Build end." 269 | -------------------------------------------------------------------------------- /.github/workflows/recompose.yml: -------------------------------------------------------------------------------- 1 | name: Recompose BiliRoamingX 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | Recompose-BiliRoamingX: 8 | name: Recompose BiliRoamingX 9 | runs-on: ubuntu-latest 10 | steps: 11 | # Check repo 12 | - name: Checkout code 13 | uses: actions/checkout@v4 14 | # Get resource 15 | - name: Recompose BiliRoamingX 16 | run: | 17 | git clone --recurse-submodules https://github.com/BiliRoamingX/BiliRoamingX.git 18 | cd ./ 19 | git clone https://github.com/sti-233/Bilix-PreBuilds.git 20 | cp ./Bilix-PreBuilds/Merge-Resource/biliroaming_setting_custom_update_source.xml ./BiliRoamingX/patches/src/main/resources/bilibili/xml/biliroaming_setting_custom_update_source.xml 21 | cp ./Bilix-PreBuilds/Merge-Resource/Upgrade.kt ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/patches/okhttp/hooks/Upgrade.kt 22 | rm ./Bilix-PreBuilds/Merge-Resource/Build.prop 23 | rm ./Bilix-PreBuilds/Merge-Resource/biliroaming_setting_custom_update_source.xml 24 | rm ./Bilix-PreBuilds/Merge-Resource/Upgrade.kt 25 | cp ./Bilix-PreBuilds/Merge-Resource/* ./BiliRoamingX 26 | echo "-" 27 | echo "./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings.xml" 28 | echo "-" 29 | sed -i '/ 哔哩漫游X<\/string>/c\ BiliRoamingX<\/string>' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings.xml 30 | sed -i '/ 哔哩漫游X:<\/string>/c\ BiliRoamingX:<\/string>' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings.xml 31 | sed -i '/ 允许APP检查作者官方项目提供的预构建漫游X集成包更新<\/string>/c\ 允许APP检查本Fork项目(sti-233)提供的预构建 Bilix 更新<\/string>' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings.xml 32 | sed -i '/ 欢迎使用基于ReVanced方案的修改版哔哩哔哩。以下几点说明请仔细阅读:\\n\\n1. 本修改方案完全开源免费,谨防被骗。\\n2. 本修改版不使用Xposed框架,追求极致性能。\\n3. 请勿在B站任何地方暗示\/提及\/宣传本修改版。\\n4. 设置入口:我的 -> 设置 -> 哔哩漫游X。<\/string>/c\ 欢迎使用基于ReVanced方案的修改版哔哩哔哩。以下几点说明请仔细阅读:\\n\\n1. 本修改方案完全开源免费,谨防被骗。\\n2. 本修改版不使用Xposed框架,追求极致性能。\\n3. 请勿在B站任何地方暗示\/提及\/宣传本修改版,否则将会被拉入黑名单,模块所有功能将被停用。\\n4. 设置入口:我的 -> 设置 -> BiliRoamingX。<\/string>' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings.xml 33 | awk '// { print; print " 自定义更新源\n 不同源间可能签名不同,请谨慎选择 !"; next }1' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings.xml > temp.xml && mv temp.xml ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings.xml 34 | echo "-" 35 | echo "./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings_raw.xml" 36 | echo "-" 37 | sed -i 's# https://github.com/BiliRoamingX/BiliRoamingX# https://github.com/sti-233/Bilix-PreBuilds#' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings_raw.xml 38 | sed -i 's# https://t.me/bb_show# https://t.me/Aniruf_x#' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings_raw.xml 39 | sed -i 's# https://github.com/BiliRoamingX/BiliRoamingX/issues/new/choose# https://github.com/sti-233/Bilix-PreBuilds/issues/new#' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings_raw.xml 40 | awk '// { print; print " https://api.github.com/repos/sti-233/Bilix-PreBuilds/releases\n https://api.github.com/repos/sti-233/Bilix-PreBuilds/releases/tag/Nightly\n https://api.github.com/repos/BiliRoamingX/BiliRoamingX-PreBuilds/releases"; next }1' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings_raw.xml > temp.xml && mv temp.xml ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings_raw.xml 41 | echo "-" 42 | echo "./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt" 43 | echo "-" 44 | sed -i '/^[[:space:]]*Utils\.isHd()/!b;n;c\ //}' ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt 45 | sed -i '0,/ disablePreference(/s// \/\/disablePreference(/' ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt 46 | sed -i '/ key = Settings.CustomUpdate.key,/c\ //key = Settings.CustomUpdate.key,' ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt 47 | sed -i '/ { Utils.getString("biliroaming_custom_update_only_64") } to { !isOsArchArm64 },/c\ //{ Utils.getString("biliroaming_custom_update_only_64") } to { !isOsArchArm64 },' ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt 48 | sed -i '/ { Utils.getString("biliroaming_custom_update_invalid_sig") } to { !isPrebuilt }/c\ //{ Utils.getString("biliroaming_custom_update_invalid_sig") } to { !isPrebuilt }' ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt 49 | sed -i '0,/ )/s// \/\/)/' ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt 50 | sed -i '/\ \ \ \ \ \ \ \ disablePreference(Settings.Skin.key, PrefsDisableReason.AppVersion) {/c\ //disablePreference(Settings.Skin.key, PrefsDisableReason.AppVersion) {' ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt 51 | sed -i '/ Utils.isHd()/c\ //Utils.isHd()' ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt 52 | echo "-" 53 | echo "./BiliRoamingX/patches/src/main/resources/bilibili/host/values/arrays.xml" 54 | echo "-" 55 | awk '// { print; print " \n Bilix-Release\n Bilix-Nightly\n BiliRoamingX/BiliRoamingX-Prebuilds\n \n \n @string/biliroaming_release_host\n @string/biliroaming_nightly_host\n @string/biliroaming_original_host\n \n \n 由 sti-233 (本fork) 提供的更新源 较慢\n 由 sti-233 (本fork) 提供的更新源 快\n 由 zjns (bb_show) 提供的更新源 很慢 (签名不同 !)\n "; next }1' ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/arrays.xml > temp.xml && mv temp.xml ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/arrays.xml 56 | echo "-" 57 | echo "./BiliRoamingX/patches/src/main/resources/bilibili/xml/biliroaming_setting_misc.xml" 58 | echo "-" 59 | awk '/android:title="@string\/biliroaming_custom_update_title" \/>/ { print; print " "; next }1' ./BiliRoamingX/patches/src/main/resources/bilibili/xml/biliroaming_setting_misc.xml > temp.xml && mv temp.xml ./BiliRoamingX/patches/src/main/resources/bilibili/xml/biliroaming_setting_misc.xml 60 | echo "-" 61 | echo "./BiliRoamingX/patches/src/main/kotlin/app/revanced/patches/bilibili/misc/settings/patch/SettingsResourcePatch.kt" 62 | echo "-" 63 | awk '/ private val xmls = arrayOf\(/ { print; print " \"biliroaming_setting_custom_update_source.xml\","; next }1' ./BiliRoamingX/patches/src/main/kotlin/app/revanced/patches/bilibili/misc/settings/patch/SettingsResourcePatch.kt > temp.kt && mv temp.kt ./BiliRoamingX/patches/src/main/kotlin/app/revanced/patches/bilibili/misc/settings/patch/SettingsResourcePatch.kt 64 | echo "-" 65 | echo "./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/fragments.kt" 66 | echo "-" 67 | echo -e "\n@SettingFragment(\"biliroaming_setting_custom_update_source\")\nclass UpdateSettingFragment : BiliRoamingBaseSettingFragment()" >> ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/fragments.kt 68 | echo "-" 69 | echo "./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/Settings.kt" 70 | echo "-" 71 | awk '/@JvmField val CustomUpdate = BooleanSetting\(key = "custom_update", defValue = true\)/ { print; print " @JvmField val UpdateApi = StringSetting(key = \"custom_update_source\", needReboot = true)"; next }1' ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/Settings.kt > temp.kt && mv temp.kt ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/Settings.kt 72 | echo "Recompose Succeed" 73 | # push resource 74 | - name: Push composed Resource 75 | run: | 76 | cd ./ 77 | mkdir -p composed 78 | cp ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings.xml ./composed/strings.xml 79 | cp ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/strings_raw.xml ./composed/strings_raw.xml 80 | cp ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/MiscFragment.kt ./composed/MiscFragment.kt 81 | cp ./BiliRoamingX/patches/src/main/resources/bilibili/host/values/arrays.xml ./composed/arrays.xml 82 | cp ./BiliRoamingX/patches/src/main/resources/bilibili/xml/biliroaming_setting_misc.xml ./composed/biliroaming_setting_misc.xml 83 | cp ./BiliRoamingX/patches/src/main/kotlin/app/revanced/patches/bilibili/misc/settings/patch/SettingsResourcePatch.kt ./composed/SettingsResourcePatch.kt 84 | cp ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/fragments/fragments.kt ./composed/fragments.kt 85 | cp ./BiliRoamingX/integrations/app/src/main/java/app/revanced/bilibili/settings/Settings.kt ./composed/Settings.kt 86 | rm -r ./BiliRoamingX 87 | rm -r ./Bilix-PreBuilds 88 | git config --global user.name 'github-actions[bot]' 89 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 90 | git add composed/strings.xml 91 | git add composed/strings_raw.xml 92 | git add composed/MiscFragment.kt 93 | git add composed/arrays.xml 94 | git add composed/biliroaming_setting_misc.xml 95 | git add composed/SettingsResourcePatch.kt 96 | git add composed/fragments.kt 97 | git add composed/Settings.kt 98 | git commit -m "Push resource" 99 | git push 100 | continue-on-error: true 101 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | AndroidManifest_output_*.txt 2 | *@Aniruf_x.apk.idsig 3 | bilibili_apk_beta 4 | *-patched-options.json 5 | *-patched-temporary-files/ 6 | *-patched.keystore 7 | *.apk 8 | original-message.txt 9 | patches.jar 10 | revanced-cli.jar 11 | uber-apk-signer-*.jar -------------------------------------------------------------------------------- /BiliRoamingX.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sti-233/Bilix-PreBuilds/6e575f0e8c99324234a1b21f07f4a7b653e19790/BiliRoamingX.p12 -------------------------------------------------------------------------------- /Build.prop: -------------------------------------------------------------------------------- 1 | #### Build for sti-233/Bilix-PreBuilds 2 | 3 | ### 兼容项 4 | ## 还原版本号 5 | # 多提交n次 6 | ahead.commits.number=1 7 | 8 | ### Build info 9 | ## 获取更新日志 10 | # use offical repo commit id 11 | # start commit id 12 | commit.id.latest=ae58109f3acdd53ec2d2b3fb439c2a2ef1886221 13 | commit.id.nightly.start=a02d615b21394ccba4b8cce4141e3a962a34600c 14 | # Changelog need 15 | push.changelog=true 16 | 17 | ## 原包 18 | # Build need 19 | Bilix.build.cn=true 20 | Bilix.build.play=true 21 | Bilix.build.hd=true 22 | # Latest version 23 | Bilix.ver.cn=8.47.0 24 | Bilix.ver.hd=1.47.0 25 | Bilix.ver.play=3.19.2 26 | Bilix.vercode.cn=8470300 27 | Bilix.vercode.hd=1470100 28 | Bilix.vercode.play=7750600 29 | 30 | ## BiliRoamingX ver 31 | # Latest 32 | BiliRoamingX.ver.full=1.24.0.r2093 33 | BiliRoamingX.ver.big=1.24.0 34 | BiliRoamingX.ver.small=2093 35 | BiliRoamingX.ver.code=1024000 36 | # Compare 37 | BiliRoamingX.ver.compare=2093 38 | 39 | ## Url 40 | url.custom.cn=true 41 | url.custom.play=false 42 | url.custom.hd=true 43 | url.custom.revanced.cli=false 44 | url.custom.bilibili.cn=https://dl.hdslb.com/mobile/pack/android64/19064993/iBiliPlayer-apinkRelease-8.47.0-b19064993.apk 45 | url.custom.bilibili.play= 46 | url.custom.bilibili.hd=https://dl.hdslb.com/mobile/pack/android_hd/16112542/iBiliPlayer-hdRelease-1.47.0-b16112542.apk 47 | url.custom.revanced.cli.url= 48 | 49 | ## Temp 50 | temp.with.release=false 51 | temp.release.cn=false 52 | temp.release.play=false 53 | temp.release.hd=false 54 | 55 | #### End 56 | -------------------------------------------------------------------------------- /Merge-Resource/BiliRoamingX-CI-Build.zip: -------------------------------------------------------------------------------- 1 | PK -------------------------------------------------------------------------------- /Merge-Resource/Build.prop: -------------------------------------------------------------------------------- 1 | #多提交n次 2 | ahead.commits.number=3 3 | -------------------------------------------------------------------------------- /Merge-Resource/README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # BiliroamingX 4 | 5 | [![CI](https://github.com/sti-233/BiliRoamingX/workflows/CI/badge.svg)](https://github.com/sti-233/BiliRoamingX/actions) 6 | [![Channel](https://img.shields.io/badge/Follow-Telegram-blue?logo=telegram)](https://t.me/Aniruf_x) 7 | [![Download](https://img.shields.io/github/downloads/sti-233/Bilix-PreBuilds/total?color=critical&label=Download&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAF2UlEQVRIiaVWS2xTRxQ9d2bs5y+O4zgEYkgoShcESIG2EQJRREFAKmABRFCpbOiioumqrNiQCmjFiiB1Q6kqwR6k0NIKUBdFLBAt31BBoUqC8xEhgXwcO7bfezPVTJyQkBA+vdKT5fdm7rn3zL3nDilMtlt1dRiOx+G3bSjO4TIGSLkOrrtJMfYBgEoA0cKmAVKqHUR/EXBBSnmJ53JQHg9UIIDA06dY3NwMmoAgMI2NLZDAXuW6XwGogQaeahHFWIUCPiKlvgZjLVKI7wn4gdSLqYzaFC96oSJ612HsiqvUjwZsJlMKE5wvkV7vCVeIq4poEU0I/jlgKATzhMOAEADRZunx3FVEq15c/DpmwIlq80LcsYGthhnLArxe85DasMFEqT/0BAIb7oVCFy3GQFK+Bdxzk4xB2jbmSVkXFOI3WWBBdEmpKYRDNK8rGr3Iddr5vHk3TjPnsAcH4aTTsEpKwDwenQVkLodcXx9EOAzPrFlQrju+h7suyONBq8/366yBgYWW67YaSnuKi/EkGkVnWdkvOifvRDAiEGPIJJPwRqMoWbUKJISJXIMxvx+l69bBE4kg/egRSO8r7NU+NEteXbVCnBfDw+CpFPiemhpIzj8lxvZ5HGdyZoxhuK0NsdpaLG5sxNy6OqQePMBASwucTAbFK1Zg0YEDiK9ejZGuLgzcuQNvUdEkarlScBgryVhW+0godJvpKIjoWzZanZNo1FHHVq5EzdGjhkpzBsGgoU4pNUotYL4tPXIEpWvXIqMz5XzcjyoUEvd4vrOIwPyMrVZEFeqFvrGHhoyjJY2Nk4vBtk3mmr6JZ6Zt8cGD8CcSyPf3T3pPpnvUHJVOf8wcxrabs5qQmTsygv6bN1G+dSu43z9ps/D7IR3HPMLnm+yYc1Ts2oX8s2fTFS6Uz7dDuMCH42BCINvdDR4KoaqhAXO3bDHvc6kUnnZ0AJyjv70dVjhsMhzo6EDX/fsg10VxeTl8RUWILl9uisgUle6/Md9SwhVihQBRhVELzjHS3Y1AeTmqDx5EsKJifPFQMokLu3fDF4thTiyGcDxuziadTOJKQwNSnZ3YfOoUymtr4S0uNi2SevgQwfnzIXS7OM5o9SpVzj9fuvQb3Q0ymzXOlx8/bkAnWjAeR0Sf69WrCCUScHW0uuQtCyKZRM2ePajcscM41YWkqzdYWYnBlha46bQpNJOULvwxucv29qJs40b4Zs+eSj4R3tm3DyXr1yPV2mrYYEIg1daGotpaVO3fj4nirsHm19djyeHDUDq4QjIoiPegOVDbRmjBgmkPe8x0FfrmzEH28WOjMN5IBEsOHXrp+kh1tendbE/P2KsUg5SPUFAIO5OZEZAHAqbfck+eIN3aasD0mc1k4YULTTIY7fMuRkL8qXvQikTQcfnyjJu1hauqsOzYMSxrakJRzcyTS1umr8/QrRjT+nqdsWz2jEa3YjEM3LiB66dPv9JJfM0alOkp8wpLp9N42NyMoFYpzWI2e4Ypy7pMQnS4SiGeSCB58iT+aGpCX0cHpp/ZrzatP49u3cLvDQ3g/f3gWl+l7FFCXKKr9fX6z2fSsk5zIUC2ja72duRLShBMJEw1vskg1kE62SwybW3Q6htNJJB1XXhcdy9X6ie6tnOn4dj2+/9WjrNIEMHDGHLpNNLDw6as3xSQcY5wURG4ZSHrOGC53L/efL5K0yr8paWGX18+/8mAZbXpsaOVgfl8iLygo28CqgPNOQ7cYBBWMFjH9KDXzT9SWWkW6QnwJB6va6uuPq/n4v+9YuhRZ+dyqLSsbdFY7NzYZJlyL729bduWodLSZjEyQm9ziRrL0A4EEO7t3b7s3LmzBR0136ZcE0U2+zPL55cCuIa3gCxcLW5wovc452ehM9PirX9ddyqg1NNayrtcqVqu1BcA7r0OSCG4f8hxvmSOs4KA29O11bQ377HMSKkTRHRCEW0iKTcpovcBzNMyWVipdbiTue51kvICgPPm5F/GDID/AISQbRffDZUGAAAAAElFTkSuQmCC)](https://github.com/sti-233/BiliRoamingX/releases/latest) 8 | [![Star](https://img.shields.io/github/stars/sti-233/BiliRoamingX?label=Star&color=important&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAdCAYAAAC5UQwxAAADKUlEQVRIib2WX0iTURTAz737tpWEissM6c9cOUUkCqmHpYEtfAiFyl4yCoQefOmhHozAECGweskMw+hRitRQsD8ULSl0H1mUIDRr5myVpgvJQvP7f+P7Nsfc9s3dMTpw4ePee87vnHvvOeeD/y2IEEKNFOYHMom8lGHedGKWVjcloDJu7QLxRz7exTtpdRlqmurlot+KAHAqutRKsu/YeaQABgIge/e30upTR2hY6K8FEzhADfE3q9DqU0Uo+uoaQFCpQU01UmXS2UJjg+7RjCI3EHBoQFUIABFhGO0lFcmaSDpC6cuZ01p0kZcQilL21TQmayfpCMkoGkIA5TEuKlqkLL/dVWG2ONe80xggH7iXj4XPdiz5rUicKgDBZ8OC36Y+EsDggGj/1HlZ+2KJectXhSnwEaN1Ckw2n8zs8JrzTn1ftZ2bbjeb5i42gwHKkLy0QVNWwBE2hiNGIlEixopTGFjtvg0Zf4kEb+W8C1e1CCVP2XXm1/t9kAGO1NI5gajwJWBJVqEXlXrrNfNMybtzYu6RXuCBTTMOgAOW5FYOqjCIfKVGe3+baDnaC8tphC4Dq+Q4Xcg+eGllatUBGgv72kRLbXdaoBrskAvbXc2R0zE3Zix80C5Zjgeh9I0kAlb1DNufN0cv6eahOFnXYFzoPgmMUk4FE9Gwkl39EO8cuBZvOWHiK2NZj7H053C4lK0lMgDBxpdot1CptzNhEmCymKnlYrKiWiNiwg6kC+R/9uWAqGCqvEQASAIszHYWUwOx4CkNVxwaIeBAwoSdGogEb6wSClUOtWvwoe/oI1cbszBeqmdX97yR4C2KcYcL1kcpt/4O4PUcE7h1VqudplBJDDmAhU9F9EDxY3EYKGiFmZWzK11SXlOLOftgsA1t67gvT9Q0GhYeaUcJ5tDfgOS36tkFNS3iDWUUhsgbIOQ1uGXPnhtcoGej3l5u/sk6yeNoJSPgJiNAyDtwc/MvcLy98Q3MdJSQIXArY9YubqbTrgeKHnzgbr78oeQ2eQVu8VtTVbw9cRNfnL58APFzmxnbzR7do0kg4lRjNWGwZNp65Wkq+ukTAPgHIIGzcZjmG+EAAAAASUVORK5CYII=)](https://github.com/sti-233/BiliRoamingX) 9 | 10 |
11 | 12 | 基于 ReVanced 实现的B站 Android 客户端增强模块。模块设置完美融入 APP 设置,功能丰富,自定义程度高。 13 | 得益于实现方式,对 APP 性能几乎没有影响,流畅、迅速、启动快。支持粉版、Play 版及 HD 版。 14 | 15 | ## · 源码构建 16 | 17 | - 更推荐使用[官方仓库](https://github.com/BiliroamingX/BiliRoamingX)进行构建 18 | 19 | ```shell 20 | git clone --recurse-submodules https://github.com/sti-233/BiliRoamingX.git 21 | cd BiliRoamingX 22 | ./gradlew dist 23 | ``` 24 | - Windows 系统上使用 `gradlew.bat` 命令而不是 `./gradlew` 25 | - 构建产物在 `build` 目录下 26 | 27 | ## · 下载使用 28 | 29 | - 前往 [Bilix-PreBuilds Release](https://github.com/sti-233/Bilix-PreBuilds/releases/latest) 下载 30 | 31 | ## Licence 32 | 33 | [![GitHub](https://img.shields.io/github/license/BiliRoamingX/BiliRoamingX?style=for-the-badge)](https://github.com/BiliRoamingX/BiliRoamingX/blob/main/LICENSE) -------------------------------------------------------------------------------- /Merge-Resource/Upgrade.kt: -------------------------------------------------------------------------------- 1 | package app.revanced.bilibili.patches.okhttp.hooks 2 | 3 | import android.content.pm.PackageManager 4 | import app.revanced.bilibili.integrations.BuildConfig 5 | import app.revanced.bilibili.patches.okhttp.ApiHook 6 | import app.revanced.bilibili.settings.Settings 7 | import app.revanced.bilibili.utils.* 8 | import org.json.JSONArray 9 | import org.json.JSONObject 10 | import java.net.URL 11 | 12 | /** 13 | * versionSum format: "$version $versionCode $patchVersion $patchVersionCode $sn $size $md5 publishTime" 14 | * 15 | * eg. "7.66.0 7660300 1.17 10170 14056308 135819602 2c2e2008ecb46c927981078811402151 1709975253" 16 | */ 17 | class BUpgradeInfo( 18 | versionSum: String, 19 | val url: String, 20 | val changelog: String, 21 | ) { 22 | private val versionInfo = versionSum.split(' ') 23 | val version get() = versionInfo[0] 24 | val versionCode get() = versionInfo[1].toLong() 25 | val patchVersion get() = versionInfo[2] 26 | val patchVersionCode get() = versionInfo[3].toInt() 27 | val sn get() = versionInfo[4].toLong() 28 | val size get() = versionInfo[5].toLong() 29 | val md5 get() = versionInfo[6] 30 | val publishTime get() = versionInfo[7].toLong() 31 | } 32 | 33 | object Upgrade : ApiHook() { 34 | private val UPGRADE_CHECK_API: String 35 | get() = Settings.UpdateApi() 36 | val updateApi = Settings.UpdateApi() 37 | private val changelogRegex = Regex("""版本信息:(.*?)\n(.*)""", RegexOption.DOT_MATCHES_ALL) 38 | var fromSelf = true 39 | 40 | fun customUpdate(fromSelf: Boolean = true): Boolean { 41 | return true 42 | } 43 | 44 | override fun shouldHook(url: String, status: Int): Boolean { 45 | return (Settings.BlockUpdate() || customUpdate(fromSelf = fromSelf)) 46 | && url.contains("/x/v2/version/fawkes/upgrade") 47 | } 48 | 49 | override fun hook(url: String, status: Int, request: String, response: String): String { 50 | return if (customUpdate(fromSelf = fromSelf)) 51 | (runCatchingOrNull { checkUpgrade().toString() } 52 | ?: """{"code":-1,"message":"检查更新失败,请稍后再试/(ㄒoㄒ)/~~""") 53 | .also { fromSelf = true } 54 | //else if (Settings.BlockUpdate()) 55 | //"""{"code":-1,"message":"哼,休想要我更新!<( ̄︶ ̄)>"}""" 56 | else response 57 | } 58 | 59 | private fun checkUpgrade(): JSONObject { 60 | var page = 1 61 | var result: JSONObject? 62 | do { 63 | result = pagingCheck(page++) 64 | } while (result == null) 65 | return result 66 | } 67 | 68 | private fun pagingCheck(page: Int): JSONObject? { 69 | if (updateApi in listOf("https://api.github.com/repos/sti-233/Bilix-PreBuilds/releases", "https://api.github.com/repos/BiliRoamingX/BiliRoamingX-PreBuilds/releases")) { 70 | val context = Utils.getContext() 71 | val sn = context.packageManager.getApplicationInfo( 72 | context.packageName, PackageManager.GET_META_DATA 73 | ).metaData.getInt("BUILD_SN").toLong() 74 | val patchVersion = BuildConfig.VERSION_NAME 75 | val patchVersionCode = BuildConfig.VERSION_CODE 76 | val pageUrl = "$UPGRADE_CHECK_API?page=$page&per_page=100" 77 | val response = JSONArray(URL(pageUrl).readText()) 78 | val mobiApp = Utils.getMobiApp() 79 | for (data in response) { 80 | Logger.debug { "Processing data: $data" } 81 | if (!data.optString("tag_name").startsWith("$mobiApp-")) { 82 | Logger.debug { "Skipping data due to tag_name not starting with $mobiApp- : ${data.optString("tag_name")}" } 83 | continue 84 | } 85 | val body = data.optString("body").replace("\r\n", "\n") 86 | Logger.debug { "Parsed body: $body" } 87 | val values = changelogRegex.matchEntire(body)?.groupValues 88 | if (values == null) { 89 | Logger.debug { "Regex match failed for body: $body" } 90 | break 91 | } 92 | val versionSum = values[1] 93 | val changelog = values[2].trim() 94 | val url = data.optJSONArray("assets") 95 | ?.optJSONObject(0)?.optString("browser_download_url") 96 | if (url == null) { 97 | Logger.debug { "URL not found in assets for data: $data" } 98 | break 99 | } 100 | Logger.debug { "Upgrade info: versionSum: $versionSum, changelog: $changelog, url: $url" } 101 | val info = BUpgradeInfo(versionSum, url, changelog) 102 | Logger.debug { "Parsed BUpgradeInfo: $info" } 103 | val patchVersionLong = convertVersion(patchVersion) 104 | val infoPatchVersionLong = convertVersion(info.patchVersion) 105 | Logger.debug { "BiliRoamingX version : now is $patchVersion->$patchVersionLong. Github is $info.patchVersion->$infoPatchVersionLong" } 106 | if (sn < info.sn || (sn == info.sn && patchVersionLong < infoPatchVersionLong)) { 107 | Logger.debug { "New version available: $info" } 108 | val sameApp = sn == info.sn 109 | val samePatch = patchVersion == info.patchVersion 110 | val newChangelog = StringBuilder(info.changelog) 111 | val appVersionChange = 112 | if (sameApp) "" else "APP版本:$versionName($versionCode) --> ${info.version}(${info.versionCode})" 113 | val patchVersionChange = 114 | if (samePatch) "" else "漫游X版本:$patchVersion --> ${info.patchVersion}" 115 | val changeSum = arrayOf(appVersionChange, patchVersionChange) 116 | .filterNot { it.isEmpty() }.joinToString(separator = "\n") 117 | if (changeSum.isNotEmpty()) { 118 | newChangelog.append("\n\n").append(changeSum) 119 | } 120 | return mapOf( 121 | "code" to 0, 122 | "message" to "0", 123 | "ttl" to 1, 124 | "data" to mapOf( 125 | "title" to "新版 Bilix", 126 | "content" to newChangelog.toString(), 127 | "version" to info.version, 128 | "version_code" to if (sameApp) info.versionCode + 1 else info.versionCode, 129 | "url" to speedupGhUrl(info.url), 130 | "size" to info.size, 131 | "md5" to info.md5, 132 | "silent" to 0, 133 | "upgrade_type" to 1, 134 | "cycle" to 1, 135 | "policy" to 0, 136 | "policy_url" to "", 137 | "ptime" to info.publishTime, 138 | ) 139 | ).toJSONObject().also { 140 | Logger.debug { "Upgrade check result: $it" } 141 | } 142 | } else { 143 | Logger.debug { "No new version found for Bilix." } 144 | return mapOf("code" to -1, "message" to "未发现新版 Bilix !").toJSONObject() 145 | } 146 | } 147 | Logger.debug { "Exiting loop, returning '更新源出错!'" } 148 | return null.also { 149 | Logger.debug { "Upgrade Api : $UPGRADE_CHECK_API" } 150 | Logger.debug { "Upgrade Api val : $updateApi" } 151 | Logger.debug { "Upgrade Api page : $page" } 152 | } 153 | } else { 154 | val context = Utils.getContext() 155 | val sn = context.packageManager.getApplicationInfo( 156 | context.packageName, PackageManager.GET_META_DATA 157 | ).metaData.getInt("BUILD_SN").toLong() 158 | val patchVersion = BuildConfig.VERSION_NAME 159 | val patchVersionCode = BuildConfig.VERSION_CODE 160 | val pageUrl = "https://api.github.com/repos/sti-233/Bilix-PreBuilds/releases?page=$page&per_page=100" 161 | val response = JSONArray(URL(pageUrl).readText()) 162 | val mobiApp = Utils.getMobiApp() 163 | val type = "Nightly" 164 | for (data in response) { 165 | Logger.debug { "Processing data: $data" } 166 | if (!data.optString("tag_name").startsWith("$type-$mobiApp-")) { 167 | Logger.debug { "Skipping data due to tag_name not starting with $mobiApp- : ${data.optString("tag_name")}" } 168 | continue 169 | } 170 | val body = data.optString("body").replace("\r\n", "\n") 171 | Logger.debug { "Parsed body: $body" } 172 | val values = changelogRegex.matchEntire(body)?.groupValues 173 | if (values == null) { 174 | Logger.debug { "Regex match failed for body: $body" } 175 | break 176 | } 177 | val versionSum = values!![1] 178 | val changelog = values!![2].trim() 179 | val url = data.optJSONArray("assets") 180 | ?.optJSONObject(0)?.optString("browser_download_url") 181 | if (url == null) { 182 | Logger.debug { "URL not found in assets for data: $data" } 183 | break 184 | } 185 | Logger.debug { "Upgrade, versionSum: $versionSum, changelog: $changelog, url: $url" } 186 | val info = BUpgradeInfo( 187 | versionSum!!, 188 | url!!, 189 | changelog!! 190 | ) 191 | Logger.debug { "Parsed BUpgradeInfo: $info" } 192 | val patchVersionLong = convertVersion(patchVersion) 193 | val infoPatchVersionLong = convertVersion(info.patchVersion) 194 | Logger.debug { "BiliRoamingX version : now is $patchVersion->$patchVersionLong. Github is $info.patchVersion->$infoPatchVersionLong" } 195 | if (sn < info.sn || (sn == info.sn && patchVersionLong < infoPatchVersionLong)) { 196 | Logger.debug { "New version available: $info" } 197 | val sameApp = sn == info.sn 198 | val samePatch = patchVersion == info.patchVersion 199 | val newChangelog = StringBuilder(info.changelog) 200 | val appVersionChange = 201 | if (sameApp) "" else "APP版本:$versionName($versionCode) --> ${info.version}(${info.versionCode})" 202 | val patchVersionChange = 203 | if (samePatch) "" else "漫游X版本:$patchVersion --> ${info.patchVersion}" 204 | val changeSum = arrayOf(appVersionChange, patchVersionChange) 205 | .filterNot { it.isEmpty() }.joinToString(separator = "\n") 206 | if (changeSum.isNotEmpty()) { 207 | newChangelog.append("\n\n") 208 | newChangelog.append(changeSum) 209 | } 210 | return mapOf( 211 | "code" to 0, 212 | "message" to "0", 213 | "ttl" to 1, 214 | "data" to mapOf( 215 | "title" to "新版 Bilix-Nightly", 216 | "content" to newChangelog.toString(), 217 | "version" to info.version, 218 | "version_code" to if (sameApp) info.versionCode + 1 else info.versionCode, 219 | "url" to speedupGhUrl(info.url), 220 | "size" to info.size, 221 | "md5" to info.md5, 222 | "silent" to 0, 223 | "upgrade_type" to 1, 224 | "cycle" to 1, 225 | "policy" to 0, 226 | "policy_url" to "", 227 | "ptime" to info.publishTime, 228 | ) 229 | ).toJSONObject().also { 230 | Logger.debug { "Upgrade check result: $it" } 231 | } 232 | } else { 233 | Logger.debug { "No new version found for Bilix." } 234 | return mapOf("code" to -1, "message" to "未发现新版 Bilix !").toJSONObject() 235 | } 236 | } 237 | Logger.debug { "Exiting loop, returning '更新源出错!'" } 238 | return null.also { 239 | Logger.debug { "Upgrade Api : $UPGRADE_CHECK_API" } 240 | Logger.debug { "Upgrade Api val : $updateApi" } 241 | Logger.debug { "Upgrade Api page : $page" } 242 | } 243 | } 244 | } 245 | 246 | // 1.22.5.r1864 247 | // 102200501864 248 | // 1.23.2->98005232704 249 | // 1.23.2.r1975->98005234679 250 | // 1.23.2.r1976->98005234680 251 | // What the fuck? 252 | fun convertVersion(version: String): String { 253 | val parts = version.split(".") 254 | if (parts.size < 3) return "".also { 255 | Logger.debug { "What the fuck? Why the versions don't match?" } 256 | } 257 | val major = parts[0] 258 | val minor = parts[1].padStart(3, '0') 259 | val patch = parts[2].padStart(3, '0') 260 | val release = parts[3].split("r").getOrNull(1)?.padStart(5, '0') ?: "00000" 261 | val combinedVersion = "$major$minor$patch$release" 262 | Logger.debug { "Get version: $combinedVersion" } 263 | return combinedVersion 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /Merge-Resource/biliroaming_setting_custom_update_source.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 14 | 15 | -------------------------------------------------------------------------------- /Merge-Resource/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: 7 | - main 8 | paths-ignore: 9 | - '**.md' 10 | - '**.txt' 11 | - '.github/**' 12 | - '!.github/workflows/*' 13 | - '.github/workflows/ci.yml' 14 | - 'gradle/*' 15 | - 'idea/*' 16 | 17 | jobs: 18 | build: 19 | env: 20 | onlybigver: false 21 | torelease: false 22 | Bilix-need-release: false 23 | name: Build BiliroamingX CI 24 | runs-on: ubuntu-latest 25 | 26 | steps: 27 | - name: Checkout 28 | uses: actions/checkout@v4 29 | with: 30 | fetch-depth: 0 31 | submodules: 'recursive' 32 | 33 | - name: Set up JDK 34 | uses: actions/setup-java@v4 35 | with: 36 | distribution: 'temurin' 37 | java-version: '17' 38 | 39 | - name: Cache gradle 40 | uses: actions/cache@v4 41 | with: 42 | path: | 43 | ~/.gradle/caches 44 | ~/.gradle/wrapper 45 | key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties', 'gradle/*.versions.toml') }} 46 | restore-keys: | 47 | ${{ runner.os }}-gradle- 48 | 49 | - name: Retrieve version (Only big ver) 50 | if: ${{ env.onlybigver == 'true' }} 51 | run: | 52 | version=`awk -F "=" '$1 == "version" {print $2}' gradle.properties` 53 | version="${version}" 54 | echo "ver=$version" >> $GITHUB_ENV 55 | 56 | - name: Retrieve version 57 | if: ${{ env.onlybigver == 'false' }} 58 | run: | 59 | version=`awk -F "=" '$1 == "version" {print $2}' gradle.properties` 60 | commit_count=`git rev-list HEAD --count` 61 | version="${version}.r${commit_count}" 62 | echo "version=$version" >> $GITHUB_ENV 63 | 64 | - name: Get ahead commits number 65 | if: ${{ env.onlybigver == 'false' }} 66 | run: | 67 | echo "ahead-commits-number=`awk -F "=" '$1 == "ahead.commits.number" {print $2}' Build.prop`" >> $GITHUB_ENV 68 | 69 | - name: Reset version 70 | if: ${{ env.onlybigver == 'false' }} 71 | run: | 72 | base_version=$(echo ${{ env.version }} | cut -d '.' -f 1-3) 73 | base_number=$(echo ${{ env.version }} | cut -d '.' -f 4 | cut -d 'r' -f 2) 74 | new_number=$(( base_number - ${{ env.ahead-commits-number }} )) 75 | new_version="$base_version.r$new_number" 76 | echo "ver=$new_version" >> $GITHUB_ENV 77 | 78 | - name: Build with gradle 79 | env: 80 | GITHUB_TOKEN: ${{ github.token }} 81 | run: ./gradlew --no-daemon -Dorg.gradle.jvmargs=-Xmx2g -Pversion=$ver dist 82 | 83 | - name: Upload artifacts 84 | uses: actions/upload-artifact@v4 85 | if: success() 86 | with: 87 | name: BiliRoamingX-${{ env.ver }}.zip 88 | path: 'build' 89 | 90 | - name: Download artifacts 91 | uses: actions/download-artifact@v4 92 | with: 93 | path: artifacts 94 | 95 | - name: Write VERSION to version.txt 96 | run: echo "${{ env.ver }}" > version.txt 97 | 98 | - name: Get commit resource 99 | run: | 100 | git clone --recurse-submodules https://github.com/sti-233/BiliRoamingX.git 101 | cp ./BiliRoamingX/head-commit-id.txt ./old-comnit-id.txt 102 | continue-on-error: true 103 | 104 | - name: Write infomations 105 | run: | 106 | echo "${{ github.event.head_commit.id }}" > head-commit-id.txt 107 | new-ahead-commits-number=$(( ${{ env.ahead-commits-number }} + 2 )) 108 | echo "$new-ahead-commits-number" > Build.prop 109 | 110 | - name: Push resource 111 | run: | 112 | cp -r /home/runner/work/BiliRoamingX/BiliRoamingX/artifacts/BiliRoamingX-${{ env.ver }}.zip/* ./ 113 | zip BiliRoamingX-CI-Build.zip BiliRoamingX-integrations-${{ env.ver }}.apk BiliRoamingX-patches-${{ env.ver }}.jar 114 | git config --global user.name 'github-actions[bot]' 115 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 116 | git add version.txt 117 | git add Build.prop 118 | git add old-commit-id.txt 119 | git add head-commit-id.txt 120 | git add BiliRoamingX-CI-Build.zip 121 | git commit -m "Push resource" 122 | git push 123 | -------------------------------------------------------------------------------- /Merge-Resource/head-commit-id.txt: -------------------------------------------------------------------------------- 1 | 6b30f47 -------------------------------------------------------------------------------- /Merge-Resource/old-commit-id.txt: -------------------------------------------------------------------------------- 1 | fded36da657f00fa5d61e45d7a60f0d85ef2ec77 2 | -------------------------------------------------------------------------------- /Merge-Resource/version.txt: -------------------------------------------------------------------------------- 1 | 1.22.5.r1928 2 | -------------------------------------------------------------------------------- /Nightly.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sti-233/Bilix-PreBuilds/6e575f0e8c99324234a1b21f07f4a7b653e19790/Nightly.jpg -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # Bilix-PreBuilds 4 | 5 | [![Channel](https://img.shields.io/badge/Follow-Telegram-blue?logo=telegram)](https://t.me/Aniruf_x) 6 | [![Download](https://img.shields.io/github/downloads/sti-233/Bilix-PreBuilds/total?color=critical&label=Download&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAF2UlEQVRIiaVWS2xTRxQ9d2bs5y+O4zgEYkgoShcESIG2EQJRREFAKmABRFCpbOiioumqrNiQCmjFiiB1Q6kqwR6k0NIKUBdFLBAt31BBoUqC8xEhgXwcO7bfezPVTJyQkBA+vdKT5fdm7rn3zL3nDilMtlt1dRiOx+G3bSjO4TIGSLkOrrtJMfYBgEoA0cKmAVKqHUR/EXBBSnmJ53JQHg9UIIDA06dY3NwMmoAgMI2NLZDAXuW6XwGogQaeahHFWIUCPiKlvgZjLVKI7wn4gdSLqYzaFC96oSJ612HsiqvUjwZsJlMKE5wvkV7vCVeIq4poEU0I/jlgKATzhMOAEADRZunx3FVEq15c/DpmwIlq80LcsYGthhnLArxe85DasMFEqT/0BAIb7oVCFy3GQFK+Bdxzk4xB2jbmSVkXFOI3WWBBdEmpKYRDNK8rGr3Iddr5vHk3TjPnsAcH4aTTsEpKwDwenQVkLodcXx9EOAzPrFlQrju+h7suyONBq8/366yBgYWW67YaSnuKi/EkGkVnWdkvOifvRDAiEGPIJJPwRqMoWbUKJISJXIMxvx+l69bBE4kg/egRSO8r7NU+NEteXbVCnBfDw+CpFPiemhpIzj8lxvZ5HGdyZoxhuK0NsdpaLG5sxNy6OqQePMBASwucTAbFK1Zg0YEDiK9ejZGuLgzcuQNvUdEkarlScBgryVhW+0godJvpKIjoWzZanZNo1FHHVq5EzdGjhkpzBsGgoU4pNUotYL4tPXIEpWvXIqMz5XzcjyoUEvd4vrOIwPyMrVZEFeqFvrGHhoyjJY2Nk4vBtk3mmr6JZ6Zt8cGD8CcSyPf3T3pPpnvUHJVOf8wcxrabs5qQmTsygv6bN1G+dSu43z9ps/D7IR3HPMLnm+yYc1Ts2oX8s2fTFS6Uz7dDuMCH42BCINvdDR4KoaqhAXO3bDHvc6kUnnZ0AJyjv70dVjhsMhzo6EDX/fsg10VxeTl8RUWILl9uisgUle6/Md9SwhVihQBRhVELzjHS3Y1AeTmqDx5EsKJifPFQMokLu3fDF4thTiyGcDxuziadTOJKQwNSnZ3YfOoUymtr4S0uNi2SevgQwfnzIXS7OM5o9SpVzj9fuvQb3Q0ymzXOlx8/bkAnWjAeR0Sf69WrCCUScHW0uuQtCyKZRM2ePajcscM41YWkqzdYWYnBlha46bQpNJOULvwxucv29qJs40b4Zs+eSj4R3tm3DyXr1yPV2mrYYEIg1daGotpaVO3fj4nirsHm19djyeHDUDq4QjIoiPegOVDbRmjBgmkPe8x0FfrmzEH28WOjMN5IBEsOHXrp+kh1tendbE/P2KsUg5SPUFAIO5OZEZAHAqbfck+eIN3aasD0mc1k4YULTTIY7fMuRkL8qXvQikTQcfnyjJu1hauqsOzYMSxrakJRzcyTS1umr8/QrRjT+nqdsWz2jEa3YjEM3LiB66dPv9JJfM0alOkp8wpLp9N42NyMoFYpzWI2e4Ypy7pMQnS4SiGeSCB58iT+aGpCX0cHpp/ZrzatP49u3cLvDQ3g/f3gWl+l7FFCXKKr9fX6z2fSsk5zIUC2ja72duRLShBMJEw1vskg1kE62SwybW3Q6htNJJB1XXhcdy9X6ie6tnOn4dj2+/9WjrNIEMHDGHLpNNLDw6as3xSQcY5wURG4ZSHrOGC53L/efL5K0yr8paWGX18+/8mAZbXpsaOVgfl8iLygo28CqgPNOQ7cYBBWMFjH9KDXzT9SWWkW6QnwJB6va6uuPq/n4v+9YuhRZ+dyqLSsbdFY7NzYZJlyL729bduWodLSZjEyQm9ziRrL0A4EEO7t3b7s3LmzBR0136ZcE0U2+zPL55cCuIa3gCxcLW5wovc452ehM9PirX9ddyqg1NNayrtcqVqu1BcA7r0OSCG4f8hxvmSOs4KA29O11bQ377HMSKkTRHRCEW0iKTcpovcBzNMyWVipdbiTue51kvICgPPm5F/GDID/AISQbRffDZUGAAAAAElFTkSuQmCC)](https://github.com/sti-233/Bilix-PreBuilds/releases/latest) 7 | [![Star](https://img.shields.io/github/stars/sti-233/Bilix-PreBuilds?label=Star&color=important&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAdCAYAAAC5UQwxAAADKUlEQVRIib2WX0iTURTAz737tpWEissM6c9cOUUkCqmHpYEtfAiFyl4yCoQefOmhHozAECGweskMw+hRitRQsD8ULSl0H1mUIDRr5myVpgvJQvP7f+P7Nsfc9s3dMTpw4ePee87vnHvvOeeD/y2IEEKNFOYHMom8lGHedGKWVjcloDJu7QLxRz7exTtpdRlqmurlot+KAHAqutRKsu/YeaQABgIge/e30upTR2hY6K8FEzhADfE3q9DqU0Uo+uoaQFCpQU01UmXS2UJjg+7RjCI3EHBoQFUIABFhGO0lFcmaSDpC6cuZ01p0kZcQilL21TQmayfpCMkoGkIA5TEuKlqkLL/dVWG2ONe80xggH7iXj4XPdiz5rUicKgDBZ8OC36Y+EsDggGj/1HlZ+2KJectXhSnwEaN1Ckw2n8zs8JrzTn1ftZ2bbjeb5i42gwHKkLy0QVNWwBE2hiNGIlEixopTGFjtvg0Zf4kEb+W8C1e1CCVP2XXm1/t9kAGO1NI5gajwJWBJVqEXlXrrNfNMybtzYu6RXuCBTTMOgAOW5FYOqjCIfKVGe3+baDnaC8tphC4Dq+Q4Xcg+eGllatUBGgv72kRLbXdaoBrskAvbXc2R0zE3Zix80C5Zjgeh9I0kAlb1DNufN0cv6eahOFnXYFzoPgmMUk4FE9Gwkl39EO8cuBZvOWHiK2NZj7H053C4lK0lMgDBxpdot1CptzNhEmCymKnlYrKiWiNiwg6kC+R/9uWAqGCqvEQASAIszHYWUwOx4CkNVxwaIeBAwoSdGogEb6wSClUOtWvwoe/oI1cbszBeqmdX97yR4C2KcYcL1kcpt/4O4PUcE7h1VqudplBJDDmAhU9F9EDxY3EYKGiFmZWzK11SXlOLOftgsA1t67gvT9Q0GhYeaUcJ5tDfgOS36tkFNS3iDWUUhsgbIOQ1uGXPnhtcoGej3l5u/sk6yeNoJSPgJiNAyDtwc/MvcLy98Q3MdJSQIXArY9YubqbTrgeKHnzgbr78oeQ2eQVu8VtTVbw9cRNfnL58APFzmxnbzR7do0kg4lRjNWGwZNp65Wkq+ukTAPgHIIGzcZjmG+EAAAAASUVORK5CYII=)](https://github.com/sti-233/Bilix-PreBuilds) 8 | 9 |
10 | 11 | 此仓库几乎已被弃用 请转至 [BiliroamingX-fork](https://github.com/sti-233/BiliRoamingX) 12 | 13 | [![CI](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Build.yml/badge.svg)](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Build.yml)[![CI](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Init.yml/badge.svg)](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Init.yml)

[![CI](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Build-cn.yml/badge.svg)](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Build-cn.yml)
[![CI](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Build-play.yml/badge.svg)](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Build-play.yml)[![CI](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Build-hd.yml/badge.svg)](https://github.com/sti-233/Bilix-PreBuilds/actions/workflows/Build-hd.yml) 14 | 15 | >[!Warning] 16 | >禁止B站站内及国内公众平台传播和宣传 17 | > 18 | >此项目与 [HFrost0/bilix](https://github.com/HFrost0/bilix) 无关! 19 | 20 | >[!Note] 21 | >本仓库使用 Github Action 进行构建并预发布 22 | 23 | ``` 24 | - 自动获取原包 25 | - 自动发布release 26 | - 自动获取sn 27 | - 自动获取md5 28 | - 自动获取字节大小 29 | - 自动获取发布时间时间戳 30 | - 自动填充更新日志 (commit title) 31 | - 自定义原包/cli获取链接 32 | - 使用固定的签名 33 | ``` 34 | 35 | >[!Important] 36 | >原包获取因渠道原因 可能无法及时更新最新包 37 | 38 | ## 待实现的功能 39 | ``` 40 | Wait for your issuse 41 | ``` 42 | 43 | ## 使用/参考的项目 44 | - [BiliRoamingX/BiliRoamingX](https://github.com/BiliRoamingX/BiliRoamingX)
45 | - [sti-233/BiliRoamingX](https://github.com/sti-233/BiliRoamingX)
46 | - [vc-teahouse/inital-biliroaming-maker](https://github.com/vc-teahouse/inital-biliroaming-maker)
47 | (ci基本框架) 48 | - [patrickfav/uber-apk-signer](https://github.com/patrickfav/uber-apk-signer)
49 | (Bilix签名) 50 | - [SocialSisterYi/bilibili-API-collect](https://github.com/SocialSisterYi/bilibili-API-collect) 51 | - [ho-dev/HattrickOrganizer/commit/c5ec184](https://github.com/ho-dev/HattrickOrganizer/commit/c5ec1842b35c658b5c5d0fe3297bded8cafed491) 52 | > **Actions Used** 53 | > - [8Mi-Tech/get-apk-info-action](https://github.com/8Mi-Tech/get-apk-info-action) 54 | > - [softprops/action-gh-release](https://github.com/softprops/action-gh-release) 55 | 56 | ## Licence 57 | - 本项目使用了[BiliRoamingX](https://github.com/BiliRoamingX/BiliRoamingX) 58 | 59 | [![GitHub](https://img.shields.io/github/license/sti-233/Bilix-PreBuilds?style=for-the-badge)](https://github.com/sti-233/Bilix-PreBuilds/blob/main/LICENSE) 60 | 61 | -------------------------------------------------------------------------------- /build/Build.prop: -------------------------------------------------------------------------------- 1 | #### Build for sti-233/Bilix-PreBuilds 2 | 3 | ### 兼容项 4 | ## 还原版本号 5 | # 多提交n次 6 | ahead.commits.number=1 7 | 8 | ### Build info 9 | ## 获取更新日志 10 | # use offical repo commit id 11 | # start commit id 12 | commit.id.latest=ae58109f3acdd53ec2d2b3fb439c2a2ef1886221 13 | commit.id.nightly.start=a02d615b21394ccba4b8cce4141e3a962a34600c 14 | # Changelog need 15 | push.changelog=true 16 | 17 | ## 原包 18 | # Build need 19 | Bilix.build.cn=true 20 | Bilix.build.play=true 21 | Bilix.build.hd=true 22 | # Latest version 23 | Bilix.ver.cn=8.23.0 24 | Bilix.ver.hd=1.47.0 25 | Bilix.ver.play=3.19.2 26 | Bilix.vercode.cn=8230200 27 | Bilix.vercode.hd=1470100 28 | Bilix.vercode.play=7750600 29 | 30 | ## BiliRoamingX ver 31 | # Latest 32 | BiliRoamingX.ver.full=1.24.0.r2093 33 | BiliRoamingX.ver.big=1.24.0 34 | BiliRoamingX.ver.small=2093 35 | BiliRoamingX.ver.code=1024000 36 | # Compare 37 | BiliRoamingX.ver.compare=2093 38 | 39 | ## Url 40 | url.custom.cn=true 41 | url.custom.play=false 42 | url.custom.hd=true 43 | url.custom.revanced.cli=false 44 | url.custom.bilibili.cn=https://dl.hdslb.com/mobile/pack/android64/16760339/iBiliPlayer-apinkRelease-8.23.0-b16760339.apk 45 | url.custom.bilibili.play= 46 | url.custom.bilibili.hd=https://dl.hdslb.com/mobile/pack/android_hd/16112542/iBiliPlayer-hdRelease-1.47.0-b16112542.apk 47 | url.custom.revanced.cli.url= 48 | 49 | ## Temp 50 | temp.with.release=false 51 | temp.release.cn=false 52 | temp.release.play=false 53 | temp.release.hd=false 54 | 55 | #### End 56 | -------------------------------------------------------------------------------- /build/Changelog.txt: -------------------------------------------------------------------------------- 1 | - no change 2 | -------------------------------------------------------------------------------- /build/Changelog_Nightly.txt: -------------------------------------------------------------------------------- 1 | - fix: ssh-agent [skip ci] 2 | - build(deps): bump kotlin from 2.0.21 to 2.1.0 (#11) 3 | - build(deps): bump com.google.protobuf:protobuf-javalite (#12) [skip ci] 4 | - build(deps): bump ksp from 2.0.21-1.0.28 to 2.1.0-1.0.29 (#13) [skip ci] 5 | - fix: crash of CustomUpdateSource [skip ci] 6 | - chore: optimize strings 7 | - revert: use official Blacklist [skip ci] 8 | - fix: cli build 9 | - fix: pr build [skip ci] 10 | - chore: setup ssh-agent [skip ci] 11 | - fix: can't find resource 12 | - fix: get correct Blacklist [skip ci] 13 | - fix: Missing } 14 | - chore: sponsor fragment part2 15 | - docs: readme 16 | - docs: recommend project 17 | - docs: readme 18 | - Chore: optimize customUpdate 19 | -------------------------------------------------------------------------------- /build/integrations.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sti-233/Bilix-PreBuilds/6e575f0e8c99324234a1b21f07f4a7b653e19790/build/integrations.apk -------------------------------------------------------------------------------- /build/patches.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sti-233/Bilix-PreBuilds/6e575f0e8c99324234a1b21f07f4a7b653e19790/build/patches.jar -------------------------------------------------------------------------------- /composed/MiscFragment.kt: -------------------------------------------------------------------------------- 1 | package app.revanced.bilibili.settings.fragments 2 | 3 | import android.app.Activity 4 | import android.app.AlertDialog 5 | import android.app.Dialog 6 | import android.content.ActivityNotFoundException 7 | import android.content.Intent 8 | import android.content.SharedPreferences 9 | import android.net.Uri 10 | import android.os.Bundle 11 | import android.widget.EditText 12 | import android.widget.FrameLayout 13 | import android.widget.ScrollView 14 | import androidx.preference.Preference 15 | import app.revanced.bilibili.patches.SplashPatch 16 | import app.revanced.bilibili.settings.Settings 17 | import app.revanced.bilibili.settings.search.annotation.SettingFragment 18 | import app.revanced.bilibili.utils.* 19 | import java.io.File 20 | 21 | @SettingFragment("biliroaming_setting_misc") 22 | class MiscFragment : BiliRoamingBaseSettingFragment() { 23 | companion object { 24 | private const val SELECTION_SPLASH = 222 25 | private const val SELECTION_LOGO = 223 26 | } 27 | 28 | override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) { 29 | super.onCreatePreferences(savedInstanceState, rootKey) 30 | findPreference("skin_json_pref")?.onClick { 31 | onSkinClick() 32 | true 33 | } 34 | findPreference(Settings.CustomSplash.key)?.onChange { _, newValue -> 35 | if (newValue == true) selectImage(SELECTION_SPLASH) 36 | true 37 | } 38 | findPreference(Settings.CustomSplashLogo.key)?.onChange { _, newValue -> 39 | if (newValue == true) selectImage(SELECTION_LOGO) 40 | true 41 | } 42 | //disablePreference( 43 | //key = Settings.CustomUpdate.key, 44 | //{ Utils.getString("biliroaming_custom_update_only_64") } to { !isOsArchArm64 }, 45 | //{ Utils.getString("biliroaming_custom_update_invalid_sig") } to { !isPrebuilt } 46 | //) 47 | //disablePreference(Settings.Skin.key, PrefsDisableReason.AppVersion) { 48 | //Utils.isHd() 49 | //} 50 | } 51 | 52 | override fun onPreferenceChanged(sharedPreferences: SharedPreferences, key: String?) { 53 | super.onPreferenceChanged(sharedPreferences, key) 54 | if (resumed && key == Settings.Skin.key) { 55 | changeThemeState(Settings.Skin()) 56 | } 57 | if (resumed && key == Settings.EnableDocProvider.key && Settings.EnableDocProvider()) { 58 | showRebootDialog() 59 | } 60 | } 61 | 62 | @Deprecated("Deprecated in Java") 63 | override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { 64 | @Suppress("DEPRECATION") 65 | super.onActivityResult(requestCode, resultCode, data) 66 | val uri = data?.data 67 | if (requestCode == SELECTION_SPLASH || requestCode == SELECTION_LOGO) { 68 | val destFile = File( 69 | Utils.getContext().filesDir, 70 | if (requestCode == SELECTION_SPLASH) SplashPatch.SPLASH_IMAGE else SplashPatch.LOGO_IMAGE 71 | ) 72 | if (resultCode == Activity.RESULT_CANCELED || uri == null) { 73 | destFile.delete() 74 | } else try { 75 | Utils.getContext().contentResolver.openInputStream(uri)?.use { input -> 76 | destFile.outputStream().use { output -> input.copyTo(output) } 77 | } 78 | } catch (e: Exception) { 79 | Logger.error(e) { "failed to apply splash image" } 80 | } 81 | } 82 | if (resultCode != Activity.RESULT_OK || uri == null) return 83 | if (requestCode == 2336) { 84 | try { 85 | Utils.getContext().contentResolver.openInputStream(uri)?.use { 86 | skinInput?.setText(it.bufferedReader().readText().trim()) 87 | } 88 | } catch (e: Exception) { 89 | Logger.error(e) { "failed to import skin" } 90 | } 91 | } 92 | } 93 | 94 | private fun changeThemeState( 95 | enabled: Boolean, 96 | onSuccess: () -> Unit = {} 97 | ) = Utils.async { 98 | if (enabled) runCatching { 99 | Themes.applyCustomTheme(context) 100 | }.onFailure { 101 | Logger.error(it) { "download current theme failed" } 102 | Toasts.showShortWithId("biliroaming_theme_apply_failed") 103 | }.onSuccess { 104 | onSuccess() 105 | } else runCatching { 106 | Themes.unloadTheme(context) 107 | }.onFailure { 108 | Logger.error(it) { "unload theme failed" } 109 | }.onSuccess { 110 | onSuccess() 111 | } 112 | } 113 | 114 | private var skinInput: EditText? = null 115 | private fun onSkinClick() { 116 | val view = EditText(context) 117 | val layoutParams = FrameLayout.LayoutParams( 118 | FrameLayout.LayoutParams.MATCH_PARENT, 119 | FrameLayout.LayoutParams.WRAP_CONTENT 120 | ) 121 | val wrapper = ScrollView(context) 122 | wrapper.addView(view, layoutParams) 123 | skinInput = view 124 | view.setText(Settings.SkinJson()) 125 | AlertDialog.Builder(context) 126 | .setView(wrapper) 127 | .setTitle(Utils.getString("biliroaming_skin_json_pref_title")) 128 | .setPositiveButton(android.R.string.ok, null) 129 | .setNegativeButton(Utils.getString("biliroaming_skin_get"), null) 130 | .setNeutralButton(Utils.getString("biliroaming_skin_import_from_file"), null) 131 | .create().constraintSize(maxHeight = -1).onShow { 132 | getButton(Dialog.BUTTON_POSITIVE)?.onClick { 133 | val text = view.text.toString().trim() 134 | if (text.runCatchingOrNull { toJSONObject() } == null) { 135 | Toasts.showShortWithId("biliroaming_skin_invalid") 136 | return@onClick 137 | } 138 | Settings.SkinJson.save(text) 139 | changeThemeState(true) 140 | dismiss() 141 | } 142 | getButton(Dialog.BUTTON_NEUTRAL)?.onClick { 143 | try { 144 | @Suppress("DEPRECATION") 145 | startActivityForResult( 146 | Intent.createChooser(Intent().apply { 147 | action = Intent.ACTION_GET_CONTENT 148 | type = "application/json" 149 | addCategory(Intent.CATEGORY_OPENABLE) 150 | }, Utils.getString("biliroaming_skin_choose")), 151 | 2336 152 | ) 153 | } catch (ex: ActivityNotFoundException) { 154 | Toasts.showShortWithId("biliroaming_pls_install_file_manager") 155 | } 156 | } 157 | getButton(Dialog.BUTTON_NEGATIVE)?.onClick { 158 | val uri = Uri.parse("https://github.com/Rovniced/bilibili-skin") 159 | val intent = Intent(Intent.ACTION_VIEW, uri) 160 | startActivity(intent) 161 | } 162 | }.show() 163 | } 164 | 165 | private fun selectImage(request: Int) = try { 166 | @Suppress("DEPRECATION") 167 | startActivityForResult(Intent.createChooser(Intent().apply { 168 | action = Intent.ACTION_GET_CONTENT 169 | type = "image/*" 170 | addCategory(Intent.CATEGORY_OPENABLE) 171 | }, Utils.getString("biliroaming_choose_image")), request) 172 | } catch (ex: ActivityNotFoundException) { 173 | Toasts.showShortWithId("biliroaming_pls_install_file_manager") 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /composed/Settings.kt: -------------------------------------------------------------------------------- 1 | package app.revanced.bilibili.settings 2 | 3 | import android.graphics.Color 4 | import app.revanced.bilibili.content.BiliDocumentsProvider 5 | import app.revanced.bilibili.utils.* 6 | 7 | object Settings { 8 | @JvmField val Debug = BooleanSetting(key = "debug", needReboot = true) 9 | @JvmField val ShowHint = BooleanSetting(key = "show_hint") 10 | 11 | 12 | // region Group: 解锁番剧限制 13 | @JvmField val UnlockAreaLimit = BooleanSetting(key = "main_func") 14 | @JvmField val AllowDownload = BooleanSetting(key = "allow_download", dependency = UnlockAreaLimit) 15 | @JvmField val AllowMiniPlay = BooleanSetting(key = "allow_mini_play") 16 | @JvmField val TaiWanServer = StringSetting(key = "tw_server") 17 | @JvmField val HongKongServer = StringSetting(key = "hk_server") 18 | @JvmField val ChinaServer = StringSetting(key = "cn_server") 19 | @JvmField val ThailandServer = StringSetting(key = "th_server") 20 | @JvmField val UposHost = StringSetting(key = "upos_host") 21 | @JvmField val SaveThailandHistory = 22 | BooleanSetting(key = "save_th_history", defValue = true, dependency = UnlockAreaLimit) 23 | // endregion 24 | 25 | 26 | // region Group: 播放器 27 | @JvmField val HalfScreenQuality = StringSetting(key = "half_screen_quality", defValue = "0") 28 | @JvmField val FullScreenQuality = StringSetting(key = "full_screen_quality", defValue = "0") 29 | @JvmField val MobileFullScreenQuality = StringSetting(key = "full_screen_quality_mobile", defValue = "0") 30 | @JvmField val PlayerVersion = StringSetting(key = "player_version", defValue = "0", needReboot = true) 31 | @JvmField val RememberLosslessSetting = BooleanSetting(key = "remember_lossless_setting") 32 | @JvmField val DefaultPlaybackSpeed = FloatSetting(key = "default_playback_speed") 33 | @JvmField val LongPressPlaybackSpeed = FloatSetting(key = "long_press_playback_speed") 34 | @JvmField val OverridePlaybackSpeed = StringSetting(key = "playback_speed_override", needReboot = true) 35 | @JvmField val TrialVipQuality = BooleanSetting(key = "trial_vip_quality") 36 | @JvmField val DisableSegmentedSection = BooleanSetting(key = "disable_segmented_section") 37 | @JvmField val DisableAutoNextPlay = BooleanSetting(key = "disable_auto_next_play") 38 | @JvmField val DisablePlayerLongPress = BooleanSetting(key = "disable_player_long_press") 39 | @JvmField val ScaleToSwitchRatio = BooleanSetting(key = "scale_to_switch_ratio") 40 | @JvmField val ForceHwCodec = BooleanSetting(key = "force_hw_codec") 41 | @JvmField val DisableP2PUpload = BooleanSetting(key = "disable_p2p_upload", needReboot = true) 42 | @JvmField val PreferStableCdn = BooleanSetting(key = "prefer_stable_cdn", needReboot = true) 43 | @JvmField val AccessKeyMain = StringSetting(key = "access_key_main") 44 | @JvmField val AccessKeyThailand = StringSetting(key = "access_key_th") 45 | @JvmField val RememberPlaybackSpeed = BooleanSetting(key = "remember_playback_speed") 46 | // endregion 47 | 48 | 49 | // region Group: 首页 50 | @JvmField val ShowingBottomItems = 51 | StringSetSetting(key = "showing_bottom_items", defValue = setOf(Constants.ALL_VALUE)) 52 | @JvmField val HidedHomeTab = StringSetSetting(key = "customize_home_tab") 53 | @JvmField val FilterHomeRecommend = StringSetSetting(key = "customize_home_recommend") 54 | @JvmField val HomeFilterApplyToVideo = BooleanSetting(key = "home_filter_apply_to_relate") 55 | @JvmField val HomeFilterApplyToPopular = BooleanSetting(key = "home_filter_apply_to_popular") 56 | @JvmField val HomeFilterApplyToStory = BooleanSetting(key = "home_filter_apply_to_story") 57 | @JvmField val LowPlayCountLimit = LongSetting(key = "hide_low_play_count_recommend_limit") 58 | @JvmField val ShortDurationLimit = IntSetting(key = "hide_short_duration_recommend_limit") 59 | @JvmField val LongDurationLimit = IntSetting(key = "hide_long_duration_recommend_limit") 60 | @JvmField val ShortDurationLimitStory = IntSetting(key = "hide_short_duration_story_limit") 61 | @JvmField val LongDurationLimitStory = IntSetting(key = "hide_long_duration_story_limit") 62 | @JvmField val HomeRcmdFilterTitle = StringSetSetting(key = "home_filter_keywords_title") 63 | @JvmField val HomeRcmdFilterTitleRegexMode = BooleanSetting(key = "home_filter_title_regex_mode") 64 | @JvmField val HomeRcmdFilterReason = StringSetSetting(key = "home_filter_keywords_reason") 65 | @JvmField val HomeRcmdFilterReasonRegexMode = BooleanSetting(key = "home_filter_reason_regex_mode") 66 | @JvmField val HomeRcmdFilterUid = StringSetSetting(key = "home_filter_keywords_uid") 67 | @JvmField val HomeRcmdFilterUp = StringSetSetting(key = "home_filter_keywords_up") 68 | @JvmField val HomeRcmdFilterUpRegexMode = BooleanSetting(key = "home_filter_up_regex_mode") 69 | @JvmField val HomeRcmdFilterCategory = StringSetSetting(key = "home_filter_keywords_category") 70 | @JvmField val HomeRcmdFilterChannel = StringSetSetting(key = "home_filter_keywords_channel") 71 | @JvmField val HomeDisableAutoRefresh = BooleanSetting(key = "disable_auto_refresh") 72 | @JvmField val AddBangumi = BooleanSetting(key = "add_bangumi", needReboot = true) 73 | @JvmField val AddMovie = BooleanSetting(key = "add_movie", needReboot = true) 74 | @JvmField val AddKorea = BooleanSetting(key = "add_korea", needReboot = true) 75 | @JvmField val PurifyGame = BooleanSetting(key = "purify_game", needReboot = true) 76 | @JvmField val Drawer = BooleanSetting(key = "drawer") 77 | @JvmField val DisableHomeStory = BooleanSetting(key = "disable_main_page_story", needReboot = true) 78 | @JvmField val BlockTopActivity = 79 | BooleanSetting(key = "block_top_activity", needReboot = true, onChange = { value, _ -> 80 | if (value) deleteTopActivityEntrance() 81 | }) 82 | @JvmField val BlockRecommendGuidance = BooleanSetting(key = "block_recommend_guidance", needReboot = true) 83 | @JvmField val BlockPopularTopEntrance = BooleanSetting(key = "block_popular_top_entrance") 84 | @JvmField val BlockPopularTopicList = BooleanSetting(key = "block_popular_topic_list") 85 | @JvmField val BlockPopularRcmdUp = BooleanSetting(key = "block_popular_rcmd_up") 86 | @JvmField val BlockPopularLive = BooleanSetting(key = "block_popular_live") 87 | @JvmField val BlockHomeRecentUsed = BooleanSetting(key = "block_home_recent_used") 88 | @JvmField val PegasusCoverRatio = StringSetting(key = "pegasus_cover_ratio", defValue = "0", needReboot = true) 89 | // endregion 90 | 91 | 92 | // region Group: 动态页 93 | @JvmField val DynPreferVideoTab = BooleanSetting(key = "prefer_video_tab") 94 | @JvmField val DynPurifyCity = BooleanSetting(key = "purify_city") 95 | @JvmField val DynPurifyCampus = BooleanSetting(key = "purify_campus") 96 | @JvmField val DynRmTopicOfAll = BooleanSetting(key = "customize_dynamic_all_rm_topic") 97 | @JvmField val DynRmUpOfAll = BooleanSetting(key = "customize_dynamic_all_rm_up") 98 | @JvmField val DynRmUpOfVideo = BooleanSetting(key = "customize_dynamic_video_rm_up") 99 | @JvmField val DynFilterApplyTopVideo = BooleanSetting(key = "filter_apply_to_video") 100 | @JvmField val DynRmBlocked = BooleanSetting(key = "customize_dynamic_rm_blocked") 101 | @JvmField val DynRmAdLink = BooleanSetting(key = "customize_dynamic_rm_ad_link") 102 | @JvmField val DynRmUpReservation = BooleanSetting(key = "customize_dynamic_rm_up_reservation") 103 | @JvmField val DynPurifyType = StringSetSetting(key = "customize_dynamic_type") 104 | @JvmField val DynPurifyContent = StringSetSetting(key = "customize_dynamic_keyword_content") 105 | @JvmField val DynPurifyContentRegexMode = BooleanSetting(key = "dynamic_content_regex_mode") 106 | @JvmField val DynPurifyUp = StringSetSetting(key = "customize_dynamic_keyword_upname") 107 | @JvmField val DynPurifyUid = StringSetSetting(key = "customize_dynamic_keyword_uid") 108 | @JvmField val DynPurifyTopic = StringSetSetting(key = "customize_dynamic_keyword_topic") 109 | @JvmField val DynForceOldTabStyle = BooleanSetting(key = "dynamic_force_old_tab", needReboot = true) 110 | @JvmField val DynRmCm = BooleanSetting(key = "dynamic_rm_cm") 111 | @JvmField val DynRmStory = BooleanSetting(key = "dynamic_rm_story") 112 | @JvmField val DynNoUpRecall = BooleanSetting(key = "dynamic_no_up_recall", needReboot = true) 113 | // endregion 114 | 115 | 116 | // region Group: 我的页 117 | @JvmField val DrawerStyle = StringSetting(key = "drawer_style_value", defValue = "0") 118 | @JvmField val PurifyDrawerRedDot = BooleanSetting(key = "purify_drawer_reddot") 119 | @JvmField val RemoveVipSection = BooleanSetting(key = "remove_vip_section") 120 | @JvmField val ShowingDrawerItems = 121 | StringSetSetting(key = "showing_drawer_items", defValue = setOf(Constants.ALL_VALUE)) 122 | @JvmField val SwitchDarkTipsDialog = BooleanSetting(key = "switch_dark_dialog") 123 | @JvmField val AddChannel = BooleanSetting(key = "add_channel", needReboot = true) 124 | @JvmField val AddPodcast = BooleanSetting(key = "add_podcast") 125 | @JvmField val BlockTips = BooleanSetting(key = "block_tips") 126 | // endregion 127 | 128 | 129 | // region Group: 直播间 130 | @JvmField val ForbidSwitchLiveRoom = BooleanSetting(key = "forbid_switch_live_room") 131 | @JvmField val DisableLiveRoomDoubleClick = BooleanSetting(key = "disable_live_room_double_click") 132 | @JvmField val PurifyLivePopups = StringSetSetting(key = "purify_live_popups") 133 | @JvmField val RemoveLiveMask = BooleanSetting(key = "remove_live_mask") 134 | @JvmField val DefaultMaxQn = BooleanSetting(key = "default_max_qn") 135 | @JvmField val DisableSlideLeft = BooleanSetting(key = "disable_slide_left") 136 | @JvmField val DisableAutoFloat = BooleanSetting(key = "disable_auto_float") 137 | @JvmField val RemoveLiveWatermark = BooleanSetting(key = "remove_live_watermark") 138 | @JvmField val LiveNoBlock = BooleanSetting(key = "live_no_block") 139 | // endregion 140 | 141 | 142 | // region Group: 视频详情页 143 | @JvmField val AutoLike = BooleanSetting(key = "auto_like") 144 | @JvmField val SaveCommentImage = BooleanSetting(key = "save_comment_image") 145 | @JvmField val UnlockPlayLimit = BooleanSetting(key = "play_arc_conf") 146 | @JvmField val ReplaceStoryVideo = BooleanSetting(key = "replace_story_video") 147 | @JvmField val DisableStoryFull = BooleanSetting(key = "disable_story_full") 148 | @JvmField @Deprecated("replaced by RemoveVideoPopups") val RemoveCmdDms = 149 | BooleanSetting(key = "remove_video_cmd_dms") 150 | @JvmField val RemoveVideoPopups = StringSetSetting(key = "remove_video_popups") 151 | @JvmField val BlockWordSearch = BooleanSetting(key = "block_word_search") 152 | @JvmField val BlockCommentGuide = BooleanSetting(key = "block_comment_guide") 153 | @JvmField val BlockVideoComment = BooleanSetting(key = "block_video_comment") 154 | @JvmField val BlockUpRcmdAds = BooleanSetting(key = "block_up_rcmd_ads") 155 | @JvmField val BlockBangumiPageAds = BooleanSetting(key = "block_bangumi_page_ads") 156 | @JvmField val RemoveRelatePromote = BooleanSetting(key = "remove_video_relate_promote") 157 | @JvmField val RemoveRelateOnlyAv = 158 | BooleanSetting(key = "remove_video_relate_only_av", dependency = RemoveRelatePromote) 159 | @JvmField val RemoveRelateNothing = 160 | BooleanSetting(key = "remove_video_relate_nothing", dependency = RemoveRelateOnlyAv) 161 | @JvmField val RemoveRelateCharge = BooleanSetting("remove_video_relate_charge") 162 | @JvmField val DisableAutoSelect = BooleanSetting(key = "disable_auto_select") 163 | @JvmField val DisableAutoSubscribe = BooleanSetting(key = "disable_auto_subscribe") 164 | @JvmField val FilterStory = StringSetSetting(key = "filter_story") 165 | @JvmField val BlockDmFeedback = BooleanSetting(key = "block_dm_feedback") 166 | @JvmField val BlockFanGuide = BooleanSetting(key = "block_fan_guide") 167 | @JvmField val RemoveChargeButton = BooleanSetting(key = "remove_elec_button") 168 | @JvmField val BlockLiveOrder = BooleanSetting(key = "block_live_order") 169 | @JvmField val BlockActivityTab = BooleanSetting(key = "block_activity_tab") 170 | @JvmField val ForceOldFav = BooleanSetting(key = "old_fav", needReboot = true) 171 | @JvmField val BlockOnlyAtComment = BooleanSetting(key = "block_comment_only_at") 172 | @JvmField val BlockCommentGoods = BooleanSetting(key = "block_comment_goods") 173 | @JvmField val BlockCommentUid = StringSetSetting(key = "block_comment_uid") 174 | @JvmField val BlockCommentUp = StringSetSetting(key = "block_comment_up") 175 | @JvmField val BlockCommentUpRegexMode = BooleanSetting(key = "block_comment_up_regex_mode") 176 | @JvmField val BlockCommentContent = StringSetSetting(key = "block_comment_content") 177 | @JvmField val BlockCommentContentRegexMode = BooleanSetting(key = "block_comment_content_regex_mode") 178 | @JvmField val BlockCommentUpLevel = IntSetting(key = "block_comment_up_level") 179 | @JvmField val ExternalDownloader = BooleanSetting(key = "external_downloader") 180 | @JvmField val ExternalDownloaderName = 181 | StringSetting(key = "external_downloader_name", defValue = "com.junkfood.seal") 182 | @JvmField val NoColorfulDanmaku = BooleanSetting(key = "no_colorful_danmaku") 183 | @JvmField val FakeNotInMultiWindow = BooleanSetting(key = "fake_not_in_multi_window") 184 | @JvmField val BlockCommentFeedback = BooleanSetting(key = "block_comment_feedback") 185 | @JvmField val NotLockOrientation = BooleanSetting(key = "not_lock_orientation") 186 | @JvmField val CheckComment = BooleanSetting(key = "check_comment") 187 | @JvmField val StoryUIStyle = StringSetting(key = "story_ui_style", defValue = "0") 188 | @JvmField val UnlockGif = BooleanSetting(key = "unlock_gif") 189 | @JvmField val TimeAirborne = BooleanSetting(key = "time_airborne") 190 | @JvmField val OldDmPanel = BooleanSetting(key = "old_dm_panel") 191 | // endregion 192 | 193 | 194 | // region Group: 用户空间页 195 | @JvmField val FixSpace = BooleanSetting(key = "fix_space", defValue = true) 196 | @JvmField val CustomizeSpace = StringSetSetting(key = "customize_space") 197 | @JvmField val AddArticleTab = BooleanSetting(key = "add_article_tab") 198 | @JvmField val IgnoreBlacklist = BooleanSetting(key = "ignore_blacklist") 199 | @JvmField val UidCopyNoPrefix = BooleanSetting(key = "uid_copy_no_prefix") 200 | // endregion 201 | 202 | 203 | // region Group: 搜索页 204 | @JvmField @Deprecated("replaced by PurifySearchTypes") val PurifySearch = BooleanSetting(key = "purify_search") 205 | @JvmField val PurifySearchTypes = StringSetSetting(key = "purify_search_types") 206 | @JvmField val SearchBangumi = BooleanSetting(key = "search_area_bangumi") 207 | @JvmField val SearchMovie = BooleanSetting(key = "search_area_movie") 208 | @JvmField val FilterSearchType = StringSetSetting(key = "filter_search_type") 209 | @JvmField val FilterSearchContent = StringSetSetting(key = "filter_search_content") 210 | @JvmField val FilterSearchContentRegexMode = BooleanSetting(key = "filter_search_content_regex") 211 | @JvmField val FilterSearchUp = StringSetSetting(key = "filter_search_up") 212 | @JvmField val FilterSearchUpRegexMode = BooleanSetting(key = "filter_search_up_regex") 213 | @JvmField val FilterSearchUid = StringSetSetting(key = "filter_search_uid") 214 | // endregion 215 | 216 | 217 | // region Group: 字幕 218 | @JvmField val AutoGenerateSubtitle = BooleanSetting(key = "auto_generate_subtitle") 219 | @JvmField val AutoSelectAISubtitle = BooleanSetting(key = "auto_select_ai_subtitle") 220 | @JvmField val EnableCustomSubtitleStyle = BooleanSetting(key = "custom_subtitle") 221 | @JvmField val RemoveSubtitleBg = BooleanSetting(key = "subtitle_remove_bg", defValue = true) 222 | @JvmField val BoldSubtitleText = BooleanSetting(key = "subtitle_bold", defValue = true) 223 | @JvmField val SubtitleFontSizePortrait = IntSetting(key = "subtitle_font_size_portrait") 224 | @JvmField val SubtitleFontSizeLandscape = IntSetting(key = "subtitle_font_size_landscape") 225 | @JvmField val SubtitleFillColor = StringSetting(key = "subtitle_font_color2", defValue = "FFFFFFFF") 226 | @JvmField val SubtitleStrokeColor = StringSetting(key = "subtitle_stroke_color", defValue = "FF000000") 227 | @JvmField val SubtitleStrokeWidth = FloatSetting(key = "subtitle_stroke_width", defValue = 5.0f) 228 | @JvmField val SubtitleOffset = IntSetting(key = "subtitle_offset") 229 | @JvmField val SubtitleTranslateServer = StringSetting(key = "subtitle_translate_server", defValue = "microsoft") 230 | @JvmField val SubtitleImportSave = BooleanSetting(key = "subtitle_import_save") 231 | // endregion 232 | 233 | 234 | // region Group: 杂项 235 | @JvmField val DisableTeenagerDialog = BooleanSetting(key = "teenagers_mode_dialog") 236 | @JvmField val CommentCopy = BooleanSetting(key = "comment_copy") 237 | @JvmField val EnhanceCommentCopy = BooleanSetting(key = "comment_copy_enhance", dependency = CommentCopy) 238 | @JvmField val BlockUpdate = BooleanSetting(key = "block_update") 239 | @JvmField val CustomUpdate = BooleanSetting(key = "custom_update", defValue = true) 240 | @JvmField val UpdateApi = StringSetting(key = "custom_update_source", needReboot = true) 241 | @JvmField val BlockFollowButton = StringSetSetting(key = "block_follow_button") 242 | @JvmField val CustomTheme = BooleanSetting(key = "custom_theme") 243 | @JvmField val Skin = BooleanSetting(key = "skin") 244 | @JvmField val TextFoldCommentMaxLines = 245 | IntSetting(key = "text_fold_comment_max_lines", defValue = Constants.DEF_COMMENT_MAX_LINES) 246 | @JvmField val TextFoldDynMaxLines = 247 | IntSetting(key = "text_fold_dyn_max_lines", defValue = Constants.DEF_DYN_MAX_LINES) 248 | @JvmField val TextFoldDynLinesToAll = 249 | IntSetting(key = "text_fold_dyn_lines_to_all", defValue = Constants.DEF_DYN_LINES_TO_ALL) 250 | @JvmField val DelayDownloadModules = 251 | BooleanSetting(key = "delay_download_modules", defValue = true, onChange = { value, async -> 252 | if (value) if (async) { 253 | Utils.async { deleteModuleResources() } 254 | } else { 255 | deleteModuleResources() 256 | } 257 | }) 258 | @JvmField val MusicNotification = BooleanSetting(key = "music_notification", needReboot = true) 259 | @JvmField val PurifyShare = BooleanSetting(key = "purify_share") 260 | @JvmField val FuckMiniProgram = BooleanSetting(key = "mini_program") 261 | @JvmField val NumberFormat = BooleanSetting(key = "number_format") 262 | @JvmField val AutoReceiveCoupon = BooleanSetting(key = "auto_receive_coupon") 263 | @JvmField val DisplaySize = StringSetting(key = "display_size", defValue = "0", needReboot = true) 264 | @JvmField val CustomSplash = BooleanSetting(key = "custom_splash") 265 | @JvmField val CustomSplashLogo = BooleanSetting(key = "custom_splash_logo") 266 | @JvmField val FullSplash = BooleanSetting(key = "full_splash") 267 | @JvmField val EnableAv = BooleanSetting(key = "enable_av", needReboot = true) 268 | @JvmField val EnableDocProvider = BooleanSetting(key = "enable_doc_provider", onChange = { value, _ -> 269 | changeComponentState(BiliDocumentsProvider::class.java, value) 270 | }) 271 | @JvmField val DisableAvif = BooleanSetting(key = "disable_avif", needReboot = true) 272 | @JvmField val PurifySplash = BooleanSetting(key = "purify_splash", onChange = { value, async -> 273 | if (value) if (async) { 274 | Utils.async { clearSplashConfigCache() } 275 | } else { 276 | clearSplashConfigCache() 277 | } 278 | }) 279 | @JvmField val DisallowCollectPrivacyInfo = BooleanSetting(key = "disallow_collect_privacy_info", needReboot = true) 280 | @JvmField val DisableWebViewNonOfficialAlert = BooleanSetting(key = "disable_non_official_alert") 281 | // endregion 282 | 283 | 284 | // region Group: 非配置项 285 | @JvmField val LosslessEnabled = BooleanSetting(key = "lossless_enabled") 286 | @JvmField val BgPlayingEnabled = BooleanSetting(key = "bg_playing_enabled") 287 | @JvmField val CustomColor = IntSetting(key = "biliroaming_custom_color", defValue = Color.WHITE) 288 | @JvmField val SkinJson = StringSetting(key = "skin_json", dependency = Skin) 289 | @JvmField val SelectedPlaybackSpeed = FloatSetting(key = "selected_playback_speed") 290 | // endregion 291 | } 292 | -------------------------------------------------------------------------------- /composed/SettingsResourcePatch.kt: -------------------------------------------------------------------------------- 1 | package app.revanced.patches.bilibili.misc.settings.patch 2 | 3 | import app.revanced.patcher.data.ResourceContext 4 | import app.revanced.patcher.patch.ResourcePatch 5 | import app.revanced.patcher.patch.annotation.CompatiblePackage 6 | import app.revanced.patcher.patch.annotation.Patch 7 | import app.revanced.patcher.util.Document 8 | import app.revanced.patches.shared.misc.mapping.ResourceMappingPatch 9 | import app.revanced.util.* 10 | 11 | @Patch( 12 | name = "BiliRoamingX settings entrance", 13 | description = "哔哩漫游X设置入口", 14 | compatiblePackages = [ 15 | CompatiblePackage(name = "tv.danmaku.bili"), 16 | CompatiblePackage(name = "tv.danmaku.bilibilihd"), 17 | CompatiblePackage(name = "com.bilibili.app.in") 18 | ], 19 | dependencies = [ResourceMappingPatch::class] 20 | ) 21 | object SettingsResourcePatch : ResourcePatch() { 22 | var packageName = "" 23 | private set 24 | 25 | val isPink get() = packageName == "tv.danmaku.bili" 26 | val isPlay get() = packageName == "com.bilibili.app.in" 27 | val isHd get() = packageName == "tv.danmaku.bilibilihd" 28 | 29 | private val xmls = arrayOf( 30 | "biliroaming_setting_custom_update_source.xml", 31 | "biliroaming_locales_config.xml", 32 | "biliroaming_search_result.xml", 33 | "biliroaming_settings.xml", 34 | "biliroaming_setting_half_screen_quality.xml", 35 | "biliroaming_setting_full_screen_quality.xml", 36 | "biliroaming_setting_full_screen_quality_mobile.xml", 37 | "biliroaming_setting_live_popups.xml", 38 | "biliroaming_setting_customize_mine.xml", 39 | "biliroaming_setting_customize_drawer.xml", 40 | "biliroaming_setting_customize_bottom.xml", 41 | "biliroaming_setting_customize_home.xml", 42 | "biliroaming_setting_home_tab.xml", 43 | "biliroaming_setting_filter_home.xml", 44 | "biliroaming_setting_filter_home_by_type.xml", 45 | "biliroaming_setting_customize_dynamic.xml", 46 | "biliroaming_setting_filter_dynamic_by_type.xml", 47 | "biliroaming_setting_customize_live_room.xml", 48 | "biliroaming_setting_customize_player.xml", 49 | "biliroaming_setting_customize_video_detail.xml", 50 | "biliroaming_setting_customize_space.xml", 51 | "biliroaming_setting_unlock_area_limit.xml", 52 | "biliroaming_setting_upos.xml", 53 | "biliroaming_setting_space.xml", 54 | "biliroaming_setting_customize_search.xml", 55 | "biliroaming_setting_filter_search_type.xml", 56 | "biliroaming_setting_about.xml", 57 | "biliroaming_setting_video_detail_filter.xml", 58 | "biliroaming_setting_block_follow.xml", 59 | "biliroaming_setting_filter_story.xml", 60 | "biliroaming_setting_misc.xml", 61 | "biliroaming_setting_backup.xml", 62 | "biliroaming_setting_player_version.xml", 63 | "biliroaming_setting_display_size.xml", 64 | "biliroaming_setting_filter_popular.xml", 65 | "biliroaming_setting_filter_comment.xml", 66 | "biliroaming_setting_subtitle_translate_server.xml", 67 | "biliroaming_setting_external_downloader.xml", 68 | "biliroaming_setting_story_ui_style.xml", 69 | "biliroaming_setting_filter_story_by_type.xml", 70 | "biliroaming_setting_tool.xml", 71 | "biliroaming_setting_cover_ratio.xml", 72 | "biliroaming_setting_video_popups.xml", 73 | "biliroaming_setting_purify_search_types.xml", 74 | ) 75 | private val layouts = arrayOf( 76 | "biliroaming_dialog_argb_color_choose.xml", 77 | "biliroaming_dialog_color_choose.xml", 78 | "biliroaming_dialog_area_server.xml", 79 | "biliroaming_dialog_access_key.xml", 80 | "biliroaming_search_bar.xml", 81 | ) 82 | private val drawables = arrayOf( 83 | "biliroaming_bg_transparent.webp", 84 | "biliroaming_ic_search.xml", 85 | "biliroaming_ic_clear.xml", 86 | ) 87 | 88 | override fun execute(context: ResourceContext) { 89 | arrayOf( 90 | ResourceGroup("xml", *xmls), 91 | ResourceGroup("layout", *layouts), 92 | ResourceGroup("drawable", *drawables), 93 | ).forEach { 94 | context.copyResources("bilibili", it) 95 | } 96 | context.mergeXmlNodes( 97 | "resources", 98 | "res/values/strings.xml", 99 | "bilibili/host/values/strings.xml", 100 | "bilibili/host/values/strings_raw.xml" 101 | ) 102 | context.mergeXmlNodes( 103 | "resources", 104 | "res/values/arrays.xml", 105 | "bilibili/host/values/arrays.xml" 106 | ) 107 | context.mergeXmlNodes( 108 | "resources", 109 | "res/values/ids.xml", 110 | "bilibili/host/values/ids.xml", 111 | ) 112 | context.document["res/xml/main_preferences.xml"].use { 113 | it.addBiliRoamingEntrance() 114 | } 115 | packageName = context.document["AndroidManifest.xml"].use { it["manifest"]["package"] } 116 | } 117 | 118 | private fun Document.addBiliRoamingEntrance() { 119 | this["androidx.preference.PreferenceScreen"].run { 120 | insertBefore(firstChild, "androidx.preference.PreferenceCategory") { 121 | appendChild("androidx.preference.PreferenceScreen") { 122 | this["android:title"] = "@string/biliroaming_settings_title" 123 | this["android:fragment"] = 124 | "app.revanced.bilibili.settings.fragments.BiliRoamingSettingsFragment" 125 | } 126 | } 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /composed/arrays.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bilix-Release 5 | Bilix-Nightly 6 | BiliRoamingX/BiliRoamingX-Prebuilds 7 | 8 | 9 | @string/biliroaming_release_host 10 | @string/biliroaming_nightly_host 11 | @string/biliroaming_original_host 12 | 13 | 14 | 由 sti-233 (本fork) 提供的更新源 较慢 15 | 由 sti-233 (本fork) 提供的更新源 快 16 | 由 zjns (bb_show) 提供的更新源 很慢 (签名不同 !) 17 | 18 | 19 | 默认 20 | 8K 超高清 21 | 杜比视界 22 | HDR 真彩 23 | 4K 超清 24 | 1080P 60帧 25 | 1080P 高码率 26 | 1080P 高清 27 | 720P 60帧 28 | 720P 高清 29 | 480P 清晰 30 | 360P 流畅 31 | 240P 极速 32 | 33 | 34 | 0 35 | 127 36 | 126 37 | 125 38 | 120 39 | 116 40 | 112 41 | 80 42 | 74 43 | 64 44 | 32 45 | 16 46 | 6 47 | 48 | 49 | 默认 50 | 跟随全屏清晰度 51 | 8K 超高清 52 | 杜比视界 53 | HDR 真彩 54 | 4K 超清 55 | 1080P 60帧 56 | 1080P 高码率 57 | 1080P 高清 58 | 720P 60帧 59 | 720P 高清 60 | 480P 清晰 61 | 360P 流畅 62 | 240P 极速 63 | 64 | 65 | 0 66 | 1 67 | 127 68 | 126 69 | 125 70 | 120 71 | 116 72 | 112 73 | 80 74 | 74 75 | 64 76 | 32 77 | 16 78 | 6 79 | 80 | 81 | 购物卡片 82 | 购物精选 83 | 关注提醒 84 | 直播预约 85 | 投喂支持 86 | 滚动横幅 87 | 电池任务 88 | 正在去买 89 | 礼物星球 90 | 主播帮玩 91 | 各种+1 92 | 心愿助力 93 | 直播效果打分 94 | 95 | 96 | shoppingCard 97 | shoppingSelected 98 | follow 99 | reserve 100 | gift 101 | banner 102 | task 103 | gotoBuy 104 | giftStar 105 | playTogether 106 | plusOne 107 | wish 108 | qoe 109 | 110 | 111 | 默认 112 | 按钮 113 | 列表 114 | 115 | 116 | 0 117 | 1 118 | 2 119 | 120 | 121 | 直播 122 | 推荐 123 | 热门 124 | 番剧 125 | 影视 126 | 韩综 127 | 其它 128 | 129 | 130 | live 131 | promo 132 | hottopic 133 | bangumi 134 | movie 135 | korea 136 | other_tabs 137 | 138 | 139 | 广告 140 | 游戏 141 | 轮播图 142 | 通知 143 | 文章 144 | 动态 145 | 竖屏视频 146 | 直播 147 | 内联视频 148 | PGC 内容 149 | 课堂 150 | 漫画 151 | 无权查看视频 152 | 大卡 153 | 中卡 154 | 小卡 155 | 156 | 157 | 包含轮播图的广告 158 | 159 | 160 | 追番更新、活动提示 161 | 162 | 一般带有图文标签 163 | 164 | 165 | 166 | 番剧、电影、电视剧、纪录片…… 167 | 168 | 169 | 例如充电专属 170 | 单列显示的 171 | 172 | 双列显示的 173 | 174 | 175 | advertisement 176 | game 177 | banner 178 | notify 179 | article 180 | picture 181 | vertical 182 | live 183 | inline 184 | bangumi 185 | course 186 | comic 187 | cannot_play 188 | large_cover 189 | middle_cover 190 | small_cover 191 | 192 | 193 | 转发 194 | 投稿视频 195 | 番剧、电影等 196 | 付费内容 1 197 | 付费内容 2 198 | 折叠 199 | 文字 200 | 图文 201 | 文章 202 | 音频 203 | 通用 方形 204 | 通用 竖形 205 | 直播 206 | 播放列表 207 | 广告 208 | 小程序 209 | 订阅 210 | 新订阅 211 | 直播推荐 212 | 横幅 213 | 合集 214 | 故事 215 | 话题推荐 216 | 付费更新 217 | 话题集合 218 | 通知 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 你可能感兴趣的UP主 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 1 250 | 2 251 | 3 252 | 4 253 | 14 254 | 5 255 | 6 256 | 7 257 | 8 258 | 9 259 | 10 260 | 11 261 | 12 262 | 13 263 | 15 264 | 16 265 | 17 266 | 21 267 | 18 268 | 19 269 | 20 270 | 22 271 | 23 272 | 24 273 | 25 274 | 26 275 | 276 | 277 | 分页:主页 278 | 分页:动态 279 | 分页:投稿 280 | 分页:商品 281 | 分页:追番 282 | 分页:课堂 283 | 直播 284 | 充电 285 | 大航海 286 | 推广橱窗 287 | 视频 288 | 专栏 289 | 音频 290 | 最近追番 291 | 最近投币 292 | 最近点赞 293 | 最近追漫 294 | 玩的游戏 295 | 课堂 296 | 粉丝装扮 297 | 收藏夹 298 | comic list 299 | ugc season list 300 | 数字藏品展现 301 | NFT头像 302 | 303 | 304 | tab.home 305 | tab.dynamic 306 | tab.contribute 307 | tab.shop 308 | tab.bangumi 309 | tab.cheese 310 | liveEntry 311 | chargeResult 312 | guard 313 | adV2 314 | archiveVideo 315 | article 316 | audio 317 | season 318 | coinVideo 319 | recommendVideo 320 | followComicList 321 | spaceGame 322 | cheeseVideo 323 | fansDress 324 | favoriteBox 325 | comicList 326 | ugcSeasonList 327 | contractResource 328 | nftShowModule 329 | 330 | 331 | 不替换 332 | ali(阿里) 333 | alib(阿里) 334 | alio1(阿里) 335 | bos(百度) 336 | cos(腾讯) 337 | cosb(腾讯) 338 | coso1(腾讯) 339 | hw(华为) 340 | hwb(华为) 341 | hwo1(华为) 342 | 08c(华为) 343 | 08h(华为) 344 | 08ct(华为) 345 | tf_hw(华为) 346 | tf_tx(腾讯) 347 | akamai(Akamai海外) 348 | aliov(阿里海外) 349 | cosov(腾讯海外) 350 | hwov(华为海外) 351 | hk_bcache(Bilibili海外) 352 | 353 | 354 | $1 355 | @string/biliroaming_ali_host 356 | @string/biliroaming_alib_host 357 | @string/biliroaming_alio1_host 358 | @string/biliroaming_bos_host 359 | @string/biliroaming_cos_host 360 | @string/biliroaming_cosb_host 361 | @string/biliroaming_coso1_host 362 | @string/biliroaming_hw_host 363 | @string/biliroaming_hwb_host 364 | @string/biliroaming_hwo1_host 365 | @string/biliroaming_hw_08c_host 366 | @string/biliroaming_hw_08h_host 367 | @string/biliroaming_hw_08ct_host 368 | @string/biliroaming_tf_hw_host 369 | @string/biliroaming_tf_tx_host 370 | @string/biliroaming_akamai_host 371 | @string/biliroaming_aliov_host 372 | @string/biliroaming_cosov_host 373 | @string/biliroaming_hwov_host 374 | @string/biliroaming_hk_bcache_host 375 | 376 | 377 | 热搜横幅 378 | 投稿视频 379 | 相关搜索 380 | 游戏 381 | UP主 382 | 广告 383 | 漫画 384 | 频道 385 | 番剧 386 | 话题 387 | 合集 388 | 专栏 389 | 动态 390 | 直播 391 | 课堂 392 | 393 | 394 | hot_banner 395 | video 396 | related_search 397 | game 398 | user 399 | ad 400 | comic 401 | channel 402 | bangumi 403 | subject 404 | collection 405 | article 406 | twitter 407 | live 408 | ketang 409 | 410 | 411 | 评论 412 | 动态 413 | 414 | 415 | comment 416 | dynamic 417 | 418 | 419 | 广告 420 | 直播 421 | 课堂 422 | 423 | 424 | ad 425 | live 426 | course 427 | 428 | 429 | 发布动态 430 | 431 | 432 | dynamic 433 | 434 | 435 | 默认 436 | 旧版 437 | 新版 438 | 439 | 440 | 0 441 | 1 442 | 2 443 | 444 | 445 | 446 | 较高版本上由于缺少官方维护,可能存在问题,不建议使用 447 | 448 | 449 | 450 | 更小 451 | 较小 452 | 453 | 默认 454 | 455 | 较大 456 | 更大 457 | 458 | 459 | -0.75 460 | -0.5 461 | -0.25 462 | 0 463 | 0.25 464 | 0.5 465 | 0.75 466 | 467 | 468 | 微软 469 | 谷歌 470 | 471 | 472 | microsoft 473 | google 474 | 475 | 476 | 默认 477 | 样式1 478 | 样式2 479 | 样式3 480 | 481 | 482 | 483 | 操作按钮在右侧,左滑展示UP主投稿视频 484 | 操作按钮在底部,左滑展示UP主投稿视频 485 | 操作按钮在底部,左滑展示评论 486 | 487 | 488 | 0 489 | 4 490 | 6 491 | 7 492 | 493 | 494 | 默认 495 | 16:9 496 | 4:3 497 | 498 | 499 | 0 500 | 1.777778 501 | 1.333333 502 | 503 | 504 | 投票弹幕 505 | 三连关注弹幕 506 | 评分弹幕 507 | 评分总结弹幕 508 | 关联视频弹幕 509 | 其它 510 | 511 | 512 | vote 513 | attention 514 | grade 515 | gradeSummary 516 | link 517 | other 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 云视听小电视、免流引导、投资UP主、跳转应用等 526 | 527 | 528 | 默认关键词 529 | 热搜 530 | 发现 531 | 532 | 533 | words 534 | trending 535 | recommend 536 | 537 | 538 | -------------------------------------------------------------------------------- /composed/biliroaming_setting_misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 9 | 14 | 19 | 24 | 28 | 32 | 36 | 45 | 49 | 53 | 57 | 61 | 65 | 66 | 67 | 71 | 75 | 78 | 82 | 83 | 84 | 88 | 92 | 97 | 98 | 99 | 103 | 107 | 111 | 112 | 113 | 117 | 121 | 125 | 129 | 130 | 131 | 135 | 138 | 143 | 153 | 154 | 155 | 156 | 160 | 161 | 162 | 166 | 171 | 176 | 181 | 186 | 191 | 192 | 193 | -------------------------------------------------------------------------------- /composed/fragments.kt: -------------------------------------------------------------------------------- 1 | package app.revanced.bilibili.settings.fragments 2 | 3 | import app.revanced.bilibili.patches.json.JSONPatch 4 | import app.revanced.bilibili.settings.Settings 5 | import app.revanced.bilibili.settings.search.annotation.SettingFragment 6 | 7 | @SettingFragment("biliroaming_setting_block_follow") 8 | class BlockFollowFragment : BiliRoamingBaseSettingFragment() 9 | 10 | @SettingFragment("biliroaming_setting_customize_bottom") 11 | class CustomizeBottomFragment : 12 | BaseDynamicItemsFragment(Settings.ShowingBottomItems, JSONPatch.bottomItems) 13 | 14 | @SettingFragment("biliroaming_setting_customize_dynamic") 15 | class CustomizeDynamicFragment : BiliRoamingBaseSettingFragment() 16 | 17 | @SettingFragment("biliroaming_setting_home_tab") 18 | class CustomizeHomeTabFragment : BiliRoamingBaseSettingFragment() 19 | 20 | @SettingFragment("biliroaming_setting_customize_live_room") 21 | class CustomizeLiveRoomFragment : BiliRoamingBaseSettingFragment() 22 | 23 | @SettingFragment("biliroaming_setting_customize_mine") 24 | class CustomizeMineFragment : BiliRoamingBaseSettingFragment() 25 | 26 | @SettingFragment("biliroaming_setting_customize_space") 27 | class CustomizeSpaceFragment : BiliRoamingBaseSettingFragment() 28 | 29 | @SettingFragment("biliroaming_setting_display_size") 30 | class DisplaySizeFragment : BiliRoamingBaseSettingFragment() 31 | 32 | @SettingFragment("biliroaming_setting_filter_comment") 33 | class FilterCommentFragment : BiliRoamingBaseSettingFragment() 34 | 35 | @SettingFragment("biliroaming_setting_filter_dynamic_by_type") 36 | class FilterDynamicByTypeFragment : BiliRoamingBaseSettingFragment() 37 | 38 | @SettingFragment("biliroaming_setting_filter_home_by_type") 39 | class FilterHomeRcmdByTypeFragment : BiliRoamingBaseSettingFragment() 40 | 41 | @SettingFragment("biliroaming_setting_filter_search_type") 42 | class FilterSearchTypeFragment : BiliRoamingBaseSettingFragment() 43 | 44 | @SettingFragment("biliroaming_setting_filter_story_by_type") 45 | class FilterStoryByTypeFragment : BiliRoamingBaseSettingFragment() 46 | 47 | @SettingFragment("biliroaming_setting_full_screen_quality_mobile") 48 | class FullScreenQualityMobileSettingFragment : BiliRoamingBaseSettingFragment() 49 | 50 | @SettingFragment("biliroaming_setting_full_screen_quality") 51 | class FullScreenQualitySettingFragment : BiliRoamingBaseSettingFragment() 52 | 53 | @SettingFragment("biliroaming_setting_half_screen_quality") 54 | class HalfScreenQualitySettingFragment : BiliRoamingBaseSettingFragment() 55 | 56 | @SettingFragment("biliroaming_setting_player_version") 57 | class PlayerVersionFragment : BiliRoamingBaseSettingFragment() 58 | 59 | @SettingFragment("biliroaming_setting_live_popups") 60 | class PurifyLivePopupsFragment : BiliRoamingBaseSettingFragment() 61 | 62 | @SettingFragment("biliroaming_setting_space") 63 | class SpaceFragment : BiliRoamingBaseSettingFragment() 64 | 65 | @SettingFragment("biliroaming_setting_subtitle_translate_server") 66 | class SubtitleTranslateServerFragment : BiliRoamingBaseSettingFragment() 67 | 68 | @SettingFragment("biliroaming_setting_upos") 69 | class UposSettingFragment : BiliRoamingBaseSettingFragment() 70 | 71 | @SettingFragment("biliroaming_setting_story_ui_style") 72 | class StoryUIStyleFragment : BiliRoamingBaseSettingFragment() 73 | 74 | @SettingFragment("biliroaming_setting_cover_ratio") 75 | class PegasusCoverRatioFragment : BiliRoamingBaseSettingFragment() 76 | 77 | @SettingFragment("biliroaming_setting_video_popups") 78 | class RemoveVideoPopupsFragment : BiliRoamingBaseSettingFragment() 79 | 80 | @SettingFragment("biliroaming_setting_purify_search_types") 81 | class PurifySearchTypesFragment : BiliRoamingBaseSettingFragment() 82 | 83 | @SettingFragment("biliroaming_setting_custom_update_source") 84 | class UpdateSettingFragment : BiliRoamingBaseSettingFragment() 85 | -------------------------------------------------------------------------------- /composed/strings_raw.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | https://api.github.com/repos/sti-233/Bilix-PreBuilds/releases 4 | https://api.github.com/repos/sti-233/Bilix-PreBuilds/releases/tag/Nightly 5 | https://api.github.com/repos/BiliRoamingX/BiliRoamingX-PreBuilds/releases 6 | https://github.com/yujincheng08/BiliRoaming/wiki/%E5%85%AC%E5%85%B1%E8%A7%A3%E6%9E%90%E6%9C%8D%E5%8A%A1%E5%99%A8 7 | upos-sz-mirrorali.bilivideo.com 8 | upos-sz-mirroralib.bilivideo.com 9 | upos-sz-mirroralio1.bilivideo.com 10 | upos-sz-mirrorbos.bilivideo.com 11 | upos-sz-mirrorcos.bilivideo.com 12 | upos-sz-mirrorcosb.bilivideo.com 13 | upos-sz-mirrorcoso1.bilivideo.com 14 | upos-sz-mirrorhw.bilivideo.com 15 | upos-sz-mirrorhwb.bilivideo.com 16 | upos-sz-mirrorhwo1.bilivideo.com 17 | upos-sz-mirror08c.bilivideo.com 18 | upos-sz-mirror08h.bilivideo.com 19 | upos-sz-mirror08ct.bilivideo.com 20 | upos-tf-all-hw.bilivideo.com 21 | upos-tf-all-tx.bilivideo.com 22 | upos-hz-mirrorakam.akamaized.net 23 | upos-sz-mirroraliov.bilivideo.com 24 | upos-sz-mirrorcosov.bilivideo.com 25 | upos-sz-mirrorhwov.bilivideo.com 26 | cn-hk-eq-bcache-01.bilivideo.com 27 | https://github.com/sti-233/Bilix-PreBuilds 28 | https://t.me/Aniruf_x 29 | https://github.com/sti-233/Bilix-PreBuilds/issues/new 30 | 31 | --------------------------------------------------------------------------------