Full Code of yujincheng08/BiliRoaming for AI

master b0fd682058c3 cached
129 files
1.0 MB
278.3k tokens
58 symbols
1 requests
Download .txt
Showing preview only (1,095K chars total). Download the full file or copy to clipboard to get everything.
Repository: yujincheng08/BiliRoaming
Branch: master
Commit: b0fd682058c3
Files: 129
Total size: 1.0 MB

Directory structure:
gitextract_l3jd6_pi/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   ├── feature_request.yml
│   │   └── new_server.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── PR.yml
│       └── android.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle.kts
│   ├── proguard-rules.pro
│   └── src/
│       ├── .gitignore
│       └── main/
│           ├── AndroidManifest.xml
│           ├── assets/
│           │   ├── xhook.js
│           │   └── xposed_init
│           ├── java/
│           │   └── me/
│           │       └── iacn/
│           │           └── biliroaming/
│           │               ├── ARGBColorChooseDialog.kt
│           │               ├── BaseWidgetDialog.kt
│           │               ├── BiliBiliPackage.kt
│           │               ├── ColorChooseDialog.kt
│           │               ├── CommentFilterDialog.kt
│           │               ├── Constant.kt
│           │               ├── CustomSubtitleDialog.kt
│           │               ├── DynamicFilterDialog.kt
│           │               ├── HomeFilterDialog.kt
│           │               ├── MainActivity.kt
│           │               ├── SearchFilterDialog.kt
│           │               ├── SettingDialog.kt
│           │               ├── SpeedTestDialog.kt
│           │               ├── VideoExportDialog.kt
│           │               ├── XposedInit.kt
│           │               ├── hook/
│           │               │   ├── AllowMiniPlayHook.kt
│           │               │   ├── AutoLikeHook.kt
│           │               │   ├── BangumiPageAdHook.kt
│           │               │   ├── BangumiPlayUrlHook.kt
│           │               │   ├── BangumiSeasonHook.kt
│           │               │   ├── BaseHook.kt
│           │               │   ├── BlockUpdateHook.kt
│           │               │   ├── CommentImageHook.kt
│           │               │   ├── CopyCommentHook.kt
│           │               │   ├── CopyHook.kt
│           │               │   ├── CoverHook.kt
│           │               │   ├── CustomThemeHook.kt
│           │               │   ├── DanmakuHook.kt
│           │               │   ├── DialogBlurBackgroundHook.kt
│           │               │   ├── DownloadThreadHook.kt
│           │               │   ├── DrawerHook.kt
│           │               │   ├── DynamicHook.kt
│           │               │   ├── EnvHook.kt
│           │               │   ├── FullStoryHook.kt
│           │               │   ├── HintHook.kt
│           │               │   ├── JsonHook.kt
│           │               │   ├── KillDelayBootHook.kt
│           │               │   ├── LiveQualityHook.kt
│           │               │   ├── LiveRoomHook.kt
│           │               │   ├── LongPressSpeed.kt
│           │               │   ├── MultiWindowHook.kt
│           │               │   ├── MusicNotificationHook.kt
│           │               │   ├── P2pHook.kt
│           │               │   ├── PegasusHook.kt
│           │               │   ├── PlayArcConfHook.kt
│           │               │   ├── PlayerLongPressHook.kt
│           │               │   ├── ProtoBufHook.kt
│           │               │   ├── PublishToFollowingHook.kt
│           │               │   ├── QualityHook.kt
│           │               │   ├── RewardAdHook.kt
│           │               │   ├── SSLHook.kt
│           │               │   ├── SettingHook.kt
│           │               │   ├── ShareHook.kt
│           │               │   ├── SpeedHook.kt
│           │               │   ├── SplashHook.kt
│           │               │   ├── StartActivityHook.kt
│           │               │   ├── StoryPlayerAdHook.kt
│           │               │   ├── SubtitleHook.kt
│           │               │   ├── TeenagersModeHook.kt
│           │               │   ├── TryWatchVipQualityHook.kt
│           │               │   ├── UposReplaceHook.kt
│           │               │   ├── VideoQualityHook.kt
│           │               │   ├── VipSectionHook.kt
│           │               │   └── WebViewHook.kt
│           │               ├── network/
│           │               │   └── BiliRoamingApi.kt
│           │               └── utils/
│           │                   ├── Coroutines.kt
│           │                   ├── DexHelper.java
│           │                   ├── KotlinXposedHelper.kt
│           │                   ├── Log.kt
│           │                   ├── StrokeSpan.kt
│           │                   ├── SubtitleHelper.kt
│           │                   ├── UposReplaceHelper.kt
│           │                   ├── Utils.kt
│           │                   └── json/
│           │                       ├── FastjsonHelper.kt
│           │                       ├── GsonHelper.kt
│           │                       └── JsonHelper.kt
│           ├── jni/
│           │   ├── CMakeLists.txt
│           │   └── biliroaming.cc
│           ├── proto/
│           │   └── me/
│           │       └── iacn/
│           │           └── biliroaming/
│           │               ├── api.proto
│           │               └── configs.proto
│           └── res/
│               ├── drawable/
│               │   ├── ic_clear.xml
│               │   └── ic_launcher_foreground.xml
│               ├── layout/
│               │   ├── cdn_speedtest_item.xml
│               │   ├── custom_button.xml
│               │   ├── custom_subtitle_dialog.xml
│               │   ├── customize_backup_dialog.xml
│               │   ├── dialog_argb_color_choose.xml
│               │   ├── dialog_color_choose.xml
│               │   ├── feature.xml
│               │   ├── search_bar.xml
│               │   ├── seekbar_dialog.xml
│               │   └── video_choose.xml
│               ├── mipmap-anydpi-v26/
│               │   └── ic_launcher.xml
│               ├── values/
│               │   ├── arrays.xml
│               │   ├── colors.xml
│               │   ├── strings.xml
│               │   ├── strings_raw.xml
│               │   └── styles.xml
│               ├── values-night/
│               │   ├── colors.xml
│               │   └── styles.xml
│               ├── values-zh-rTW/
│               │   ├── arrays.xml
│               │   └── strings.xml
│               └── xml/
│                   ├── main_activity.xml
│                   └── prefs_setting.xml
├── build.gradle.kts
├── gradle/
│   ├── libs.versions.toml
│   └── wrapper/
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle.kts

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.yml
================================================
name: 反馈 Bug
description: 反馈遇到的问题
labels: [bug]
title: "[Bug] "
body:
  - type: markdown
    attributes:
      value: |
        为了使我们更好地帮助你,请提供以下信息。
  - type: textarea
    id: desc
    attributes:
      label: 问题描述
      description: 发生了什么情况?有什么现状?
    validations:
      required: true
  - type: textarea
    id: steps
    attributes:
      label: 复现步骤
      description: 如何复现
      placeholder: |
        1. 打开...
        2. 点击...
        3. 出现...状况
    validations:
      required: true
  - type: textarea
    id: expected
    attributes:
      label: 预期行为
      description: 正常情况下应该发生什么
    validations:
      required: true
  - type: textarea
    id: actual
    attributes:
      label: 实际行为
      description: 实际上发生了什么
    validations:
      required: true
  - type: textarea
    id: media
    attributes:
      label: 截图或录屏
      description: 问题复现时候的截图或录屏
      placeholder: 点击文本框下面小长条可以上传文件
  - type: input
    id: android-ver
    attributes:
      label: 安卓版本
      placeholder: "12"
    validations:
      required: true
  - type: input
    id: romaing-ver
    attributes:
      label: 哔哩漫游版本
      placeholder: 1.6.2
    validations:
      required: true
  - type: dropdown
    id: client
    attributes:
      label: 哔哩哔哩版本
      options:
        - 粉版(普通版)
        - 概念版
        - HD 版
        - play 版
      description: 目前仅支持粉版、概念版、HD 版和 play 版
    validations:
      required: true
  - type: input
    id: client-ver
    attributes:
      label: 哔哩哔哩版本号
      description: 非最新版本可能不受理
      placeholder: 6.74.0
    validations:
      required: true
  - type: input
    id: framework
    attributes:
      label: 使用的框架和版本
      placeholder: LSPosed 1.8.2
    validations:
      required: true
  - type: textarea
    id: misc
    attributes:
      label: 其他
      description: 如哪部番、Magisk 版本等
  - type: textarea
    id: logs
    attributes:
      label: 日志
      description: 请使用漫游自带的导出日志功能或者使用 `adb logcat`。无日志提交会被关闭。
      placeholder: 点击文本框下面小长条可以上传文件
    validations:
      required: true


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
  - name: Telegram 频道
    url: https://t.me/biliroaming
    about: 可以订阅更新、讨论交流
  - name: QQ 频道
    url: https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&inviteCode=NVoD5&from=246610&biz=ka
    about: 可以订阅更新、讨论交流

================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.yml
================================================
name: 功能请求
description: 想要请求添加某个功能
labels: [enhancement]
title: "[Feature] "
body:
  - type: textarea
    id: reason
    attributes:
      label: 原因
      description: 为什么想要这个功能
    validations:
      required: true
  - type: textarea
    id: desc
    attributes:
      label: 功能简述
      description: 想要个怎样的功能
    validations:
      required: true
  - type: textarea
    id: logic
    attributes:
      label: 功能逻辑
      description: 如何互交、如何使用等
    validations:
      required: true
  - type: textarea
    id: ref
    attributes:
      label: 实现参考
      description: 该功能可能的实现方式,或者其他已经实现该功能的应用等


================================================
FILE: .github/ISSUE_TEMPLATE/new_server.yml
================================================
name: 添加公共服务器
description: 把自己的服务器添加到公共服务器列表
labels: [server]
title: "[Server] "
body:
  - type: input
    id: contact
    attributes:
      label: 联系方式
      description: Telegram、Github 账号等联系方式
    validations:
      required: true
  - type: input
    id: domain
    attributes:
      label: 域名
      description: 服务器域名
    validations:
      required: true
  - type: checkboxes
    id: areas
    attributes:
      label: 支持地区
      description: 服务器支持解析的地区
      options:
        - label: 中国大陆
        - label: 港澳
        - label: 台湾
        - label: 东南亚
  - type: checkboxes
    id: premium
    attributes:
      label: 带会员专享
      options:
        - label: 服务器只有带会员用户能解析
  - type: input
    id: sponsor
    attributes:
      label: 赞助地址
      description: 爱发电等


================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
  - package-ecosystem: gradle
    directory: "/"
    schedule:
      interval: daily
      time: "21:00"
    open-pull-requests-limit: 10
    target-branch: master
    registries:
      - maven-google
      - gralde-plugin
    groups:
      maven-dependencies:
        patterns:
          - "*"
registries:
  maven-google:
    type: maven-repository
    url: "https://dl.google.com/dl/android/maven2/"
  gralde-plugin:
    type: maven-repository
    url: "https://plugins.gradle.org/m2/"


================================================
FILE: .github/workflows/PR.yml
================================================
name: PR Build

on: [pull_request]

jobs:
  build:
    name: Build on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    env:
      CCACHE_DIR: ${{ github.workspace }}/.ccache
      CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
      CCACHE_NOHASHDIR: true
      CCACHE_MAXSIZE: 1G
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-latest ]

    steps:
    - name: Check out
      uses: actions/checkout@v3
      with:
        submodules: 'recursive'
        fetch-depth: 0
    - name: Set up JDK 17
      uses: actions/setup-java@v3
      with:
        distribution: 'temurin'
        java-version: '17'
        cache: 'gradle'
    - name: Set up ccache
      uses: hendrikmuhs/ccache-action@v1.2
      with:
        key: ${{ runner.os }}-${{ github.sha }}
        restore-keys: ${{ runner.os }}
    - name: Build with Gradle
      run: |
        echo 'org.gradle.caching=true' >> gradle.properties
        echo 'org.gradle.parallel=true' >> gradle.properties
        echo 'org.gradle.vfs.watch=true' >> gradle.properties
        echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
        echo 'android.native.buildOutput=verbose' >> gradle.properties
        ./gradlew assemble
    - name: Stop gradle daemon
      run: ./gradlew --stop
    - name: Upload build artifact
      uses: actions/upload-artifact@v4
      with:
        name: ${{ matrix.os }}-artifact
        path: |
          app/build/outputs
          app/release


================================================
FILE: .github/workflows/android.yml
================================================
name: Android CI

on:
  push:
    branches: [ master ]

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      CCACHE_DIR: ${{ github.workspace }}/.ccache
      CCACHE_COMPILERCHECK: "%compiler% -dumpmachine; %compiler% -dumpversion"
      CCACHE_NOHASHDIR: true
      CCACHE_MAXSIZE: 1G
    steps:
      - uses: actions/checkout@v3
        with:
          submodules: 'recursive'
          fetch-depth: 0
      - name: Setup JDK 17
        uses: actions/setup-java@v3
        with:
          distribution: 'temurin'
          java-version: 17
          cache: 'gradle'
      - name: Retrieve version
        run: |
          echo VERSION=$(echo ${{ github.event.head_commit.id }} | head -c 10) >> $GITHUB_ENV
      - name: Set up ccache
        uses: hendrikmuhs/ccache-action@v1.2
        with:
          key: ${{ runner.os }}-${{ github.sha }}
          restore-keys: ${{ runner.os }}
      - name: Write key
        if: ${{ ( github.event_name != 'pull_request' && github.ref == 'refs/heads/master' ) || github.ref_type == 'tag' }}
        run: |
          if [ ! -z "${{ secrets.SIGNING_KEY }}" ]; then
            echo 'Writing sign key'
            echo releaseStorePassword='${{ secrets.KEY_STORE_PASSWORD }}' >> gradle.properties
            echo releaseKeyAlias='${{ secrets.ALIAS }}' >> gradle.properties
            echo releaseKeyPassword='${{ secrets.KEY_PASSWORD }}' >> gradle.properties
            echo releaseStoreFile='key.jks' >> gradle.properties
            echo '${{ secrets.SIGNING_KEY }}' | base64 --decode > key.jks
          fi
      - name: Build with Gradle
        run: |
          echo 'org.gradle.caching=true' >> gradle.properties
          echo 'org.gradle.parallel=true' >> gradle.properties
          echo 'org.gradle.vfs.watch=true' >> gradle.properties
          echo 'org.gradle.jvmargs=-Xmx2048m' >> gradle.properties
          echo 'android.native.buildOutput=verbose' >> gradle.properties
          ./gradlew -PappVerName=${{ env.VERSION }} assembleRelease assembleDebug
      - name: Upload built apk
        if: success()
        uses: actions/upload-artifact@v4
        with:
          name: snapshot
          path: |
              app/build/outputs/apk
              app/build/outputs/mapping
              app/release
      - name: Post to channel
        if: github.ref == 'refs/heads/master'
        env:
          CHANNEL_ID: ${{ secrets.TELEGRAM_TO }}
          BOT_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
          FILE: app/release/BiliRoaming_${{ env.VERSION }}.apk
          COMMIT_MESSAGE: |+
            New push to github\!
            ```
            ${{ github.event.head_commit.message }}
            ```by `${{ github.event.head_commit.author.name }}`
            See commit detail [here](${{ github.event.head_commit.url }})
            Snapshot apk is attached \(unsupported by TAICHI\)
        run: |
          ESCAPED=`python3 -c 'import json,os,urllib.parse; print(urllib.parse.quote(json.dumps(os.environ["COMMIT_MESSAGE"])))'`
          curl -v "https://api.telegram.org/bot${BOT_TOKEN}/sendMediaGroup?chat_id=${CHANNEL_ID}&media=%5B%7B%22type%22:%22document%22,%20%22media%22:%22attach://release%22,%22parse_mode%22:%22MarkdownV2%22,%22caption%22:${ESCAPED}%7D%5D"  -F release="@$FILE"


================================================
FILE: .gitignore
================================================
*.iml
.gradle
/local.properties
.idea
.DS_Store
/build
/captures
.externalNativeBuild
*.apk
*.jar
/.kotlin


================================================
FILE: .gitmodules
================================================
[submodule "app/src/main/jni/dex_builder"]
	path = app/src/main/jni/dex_builder
	url = git@github.com:LSPosed/DexBuilder.git


================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    {one line to give the program's name and a brief idea of what it does.}
    Copyright (C) {year}  {name of author}

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    {project}  Copyright (C) {year}  {fullname}
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

================================================
FILE: README.md
================================================
<div align="center">

<img width="160" src="imgs/icon.png" alt="logo">
 
Logo来自[哔哩哔哩漫游娘](https://www.weibo.com/p/230418139a6f1100102vlj6)

[![Android CI](https://github.com/yujincheng08/BiliRoaming/workflows/Android%20CI/badge.svg)](https://github.com/yujincheng08/BiliRoaming/actions)
[![Chat](https://img.shields.io/badge/Join-QQ%E9%A2%91%E9%81%93-red?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMjEgMTQzLjg5Ij48cGF0aCBmaWxsPSIjZmFhYjA3IiBkPSJNNjAuNTAzIDE0Mi4yMzdjLTEyLjUzMyAwLTI0LjAzOC00LjE5NS0zMS40NDUtMTAuNDYtMy43NjIgMS4xMjQtOC41NzQgMi45MzItMTEuNjEgNS4xNzUtMi42IDEuOTE4LTIuMjc1IDMuODc0LTEuODA3IDQuNjYzIDIuMDU2IDMuNDcgMzUuMjczIDIuMjE2IDQ0Ljg2MiAxLjEzNnptMCAwYzEyLjUzNSAwIDI0LjAzOS00LjE5NSAzMS40NDctMTAuNDYgMy43NiAxLjEyNCA4LjU3MyAyLjkzMiAxMS42MSA1LjE3NSAyLjU5OCAxLjkxOCAyLjI3NCAzLjg3NCAxLjgwNSA0LjY2My0yLjA1NiAzLjQ3LTM1LjI3MiAyLjIxNi00NC44NjIgMS4xMzZ6bTAgMCIvPjxwYXRoIGQ9Ik02MC41NzYgNjcuMTE5YzIwLjY5OC0uMTQgMzcuMjg2LTQuMTQ3IDQyLjkwNy01LjY4MyAxLjM0LS4zNjcgMi4wNTYtMS4wMjQgMi4wNTYtMS4wMjQuMDA1LS4xODkuMDg1LTMuMzcuMDg1LTUuMDFDMTA1LjYyNCAyNy43NjggOTIuNTguMDAxIDYwLjUgMCAyOC40Mi4wMDEgMTUuMzc1IDI3Ljc2OSAxNS4zNzUgNTUuNDAxYzAgMS42NDIuMDggNC44MjIuMDg2IDUuMDEgMCAwIC41ODMuNjE1IDEuNjUuOTEzIDUuMTkgMS40NDQgMjIuMDkgNS42NSA0My4zMTIgNS43OTV6bTU2LjI0NSAyMy4wMmMtMS4yODMtNC4xMjktMy4wMzQtOC45NDQtNC44MDgtMTMuNTY4IDAgMC0xLjAyLS4xMjYtMS41MzcuMDIzLTE1LjkxMyA0LjYyMy0zNS4yMDIgNy41Ny00OS45IDcuMzkyaC0uMTUzYy0xNC42MTYuMTc1LTMzLjc3NC0yLjczNy00OS42MzQtNy4zMTUtLjYwNi0uMTc1LTEuODAyLS4xLTEuODAyLS4xLTEuNzc0IDQuNjI0LTMuNTI1IDkuNDQtNC44MDggMTMuNTY4LTYuMTE5IDE5LjY5LTQuMTM2IDI3LjgzOC0yLjYyNyAyOC4wMiAzLjIzOS4zOTIgMTIuNjA2LTE0LjgyMSAxMi42MDYtMTQuODIxIDAgMTUuNDU5IDEzLjk1NyAzOS4xOTUgNDUuOTE4IDM5LjQxM2guODQ4YzMxLjk2LS4yMTggNDUuOTE3LTIzLjk1NCA0NS45MTctMzkuNDEzIDAgMCA5LjM2OCAxNS4yMTMgMTIuNjA3IDE0LjgyMiAxLjUwOC0uMTgzIDMuNDkxLTguMzMyLTIuNjI3LTI4LjAyMSIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik00OS4wODUgNDAuODI0Yy00LjM1Mi4xOTctOC4wNy00Ljc2LTguMzA0LTExLjA2My0uMjM2LTYuMzA1IDMuMDk4LTExLjU3NiA3LjQ1LTExLjc3MyA0LjM0Ny0uMTk1IDguMDY0IDQuNzYgOC4zIDExLjA2NS4yMzggNi4zMDYtMy4wOTcgMTEuNTc3LTcuNDQ2IDExLjc3MW0zMS4xMzMtMTEuMDYzYy0uMjMzIDYuMzAyLTMuOTUxIDExLjI2LTguMzAzIDExLjA2My00LjM1LS4xOTUtNy42ODQtNS40NjUtNy40NDYtMTEuNzcuMjM2LTYuMzA1IDMuOTUyLTExLjI2IDguMy0xMS4wNjYgNC4zNTIuMTk3IDcuNjg2IDUuNDY4IDcuNDQ5IDExLjc3MyIvPjxwYXRoIGZpbGw9IiNmYWFiMDciIGQ9Ik04Ny45NTIgNDkuNzI1Qzg2Ljc5IDQ3LjE1IDc1LjA3NyA0NC4yOCA2MC41NzggNDQuMjhoLS4xNTZjLTE0LjUgMC0yNi4yMTIgMi44Ny0yNy4zNzUgNS40NDZhLjg2My44NjMgMCAwMC0uMDg1LjM2Ny44OC44OCAwIDAwLjE2LjQ5NmMuOTggMS40MjcgMTMuOTg1IDguNDg3IDI3LjMgOC40ODdoLjE1NmMxMy4zMTQgMCAyNi4zMTktNy4wNTggMjcuMjk5LTguNDg3YS44NzMuODczIDAgMDAuMTYtLjQ5OC44NTYuODU2IDAgMDAtLjA4NS0uMzY1Ii8+PHBhdGggZD0iTTU0LjQzNCAyOS44NTRjLjE5OSAyLjQ5LTEuMTY3IDQuNzAyLTMuMDQ2IDQuOTQzLTEuODgzLjI0Mi0zLjU2OC0xLjU4LTMuNzY4LTQuMDctLjE5Ny0yLjQ5MiAxLjE2Ny00LjcwNCAzLjA0My00Ljk0NCAxLjg4Ni0uMjQ0IDMuNTc0IDEuNTggMy43NzEgNC4wN20xMS45NTYuODMzYy4zODUtLjY4OSAzLjAwNC00LjMxMiA4LjQyNy0yLjk5MyAxLjQyNS4zNDcgMi4wODQuODU3IDIuMjIzIDEuMDU3LjIwNS4yOTYuMjYyLjcxOC4wNTMgMS4yODYtLjQxMiAxLjEyNi0xLjI2MyAxLjA5NS0xLjczNC44NzUtLjMwNS0uMTQyLTQuMDgyLTIuNjYtNy41NjIgMS4wOTctLjI0LjI1Ny0uNjY4LjM0Ni0xLjA3My4wNC0uNDA3LS4zMDgtLjU3NC0uOTMtLjMzNC0xLjM2MiIvPjxwYXRoIGZpbGw9IiNmZmYiIGQ9Ik02MC41NzYgODMuMDhoLS4xNTNjLTkuOTk2LjEyLTIyLjExNi0xLjIwNC0zMy44NTQtMy41MTgtMS4wMDQgNS44MTgtMS42MSAxMy4xMzItMS4wOSAyMS44NTMgMS4zMTYgMjIuMDQzIDE0LjQwNyAzNS45IDM0LjYxNCAzNi4xaC44MmMyMC4yMDgtLjIgMzMuMjk4LTE0LjA1NyAzNC42MTYtMzYuMS41Mi04LjcyMy0uMDg3LTE2LjAzNS0xLjA5Mi0yMS44NTQtMTEuNzM5IDIuMzE1LTIzLjg2MiAzLjY0LTMzLjg2IDMuNTE4Ii8+PHBhdGggZmlsbD0iI2ViMTkyMyIgZD0iTTMyLjEwMiA4MS4yMzV2MjEuNjkzczkuOTM3IDIuMDA0IDE5Ljg5My42MTZWODMuNTM1Yy02LjMwNy0uMzU3LTEzLjEwOS0xLjE1Mi0xOS44OTMtMi4zIi8+PHBhdGggZmlsbD0iI2ViMTkyMyIgZD0iTTEwNS41MzkgNjAuNDEycy0xOS4zMyA2LjEwMi00NC45NjMgNi4yNzVoLS4xNTNjLTI1LjU5MS0uMTcyLTQ0Ljg5Ni02LjI1NS00NC45NjItNi4yNzVMOC45ODcgNzYuNTdjMTYuMTkzIDQuODgyIDM2LjI2MSA4LjAyOCA1MS40MzYgNy44NDVoLjE1M2MxNS4xNzUuMTgzIDM1LjI0Mi0yLjk2MyA1MS40MzctNy44NDV6bTAgMCIvPjwvc3ZnPg==)](https://qun.qq.com/qqweb/qunpro/share?_wv=3&_wwv=128&inviteCode=NVoD5&from=246610&biz=ka)
[![Channel](https://img.shields.io/badge/Follow-Telegram-blue.svg?logo=telegram)](https://t.me/biliroaming)
[![Download](https://img.shields.io/github/v/release/yujincheng08/biliroaming?color=critical&label=Downloads&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/yujincheng08/BiliRoaming/releases/latest)
[![Stars](https://img.shields.io/github/stars/yujincheng08/biliroaming?label=Stars&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/yujincheng08/BiliRoaming)

# 哔哩漫游
解除B站客户端番剧区域限制的Xposed模块,并且提供其他小功能

# BiliRoaming
An Xposed module that unblocks bangumi area limit of BILIBILI, and miscellaneous features

</div>

# 支持以下功能

- 解除B站番剧区域限制
- 港澳台CDN加速
- 缓存番剧
- 支持国际版和概念版
- 自定义主题色
- 关闭青少年模式弹窗
- 显示评论区楼层
- ~概念版添加直播入口~
- 不以小程序形式分享
- 自动点赞视频
- 把我的页面移到侧边栏
- ~替换音乐状态栏为原生样式~
- 提取视频、直播封面
- 自定义屏启动图

# Features

- Unlock bangumi area limit
- CDN speedup
- Download bangumi
- Support International ver and blue ver
- Customize theme
- Close teenager dialog
- Show comment floor
- ~Add live entry to blue ver~
- Share without mini programs
- Like videos automatically
- Move 'Mine page' to sidebar drawer
- ~Change music notification style to Primitive~
- Extra covers from videos and live rooms
- Customized splash images

# download/下载
https://github.com/yujincheng08/BiliRoaming/releases/latest

https://modules.lsposed.org/module/me.iacn.biliroaming

# 使用方法
https://github.com/yujincheng08/BiliRoaming/wiki#%E4%BD%BF%E7%94%A8%E6%96%B9%E6%B3%95

# 特别鸣谢
- [原作者](https://github.com/iAcn/BiliRoaming)
- [BiliPlus](https://www.biliplus.com/)
- [Kghost](https://github.com/kghost/bilibili-area-limit)

### 交流
Telegram: [@biliroaming](https://t.me/biliroaming)
### License
[GNU General Public License, version 3](LICENSE)


### 本项目 CDN 加速及安全防护由 Tencent EdgeOne 赞助
[亚洲最佳CDN、边缘和安全解决方案 - Tencent EdgeOne](https://edgeone.ai/zh?from=github)
![](https://edgeone.ai/media/34fe3a45-492d-4ea4-ae5d-ea1087ca7b4b.png)


================================================
FILE: app/.gitignore
================================================
/build
/release
/.cxx


================================================
FILE: app/build.gradle.kts
================================================
import com.google.protobuf.gradle.*

plugins {
    alias(libs.plugins.agp.app)
    alias(libs.plugins.kotlin)
    alias(libs.plugins.protobuf)
    alias(libs.plugins.lsplugin.resopt)
    alias(libs.plugins.lsplugin.jgit)
    alias(libs.plugins.lsplugin.apksign)
    alias(libs.plugins.lsplugin.apktransform)
    alias(libs.plugins.lsplugin.cmaker)
}

val appVerCode = jgit.repo()?.commitCount("refs/remotes/origin/master") ?: 0
val appVerName: String by rootProject

apksign {
    storeFileProperty = "releaseStoreFile"
    storePasswordProperty = "releaseStorePassword"
    keyAliasProperty = "releaseKeyAlias"
    keyPasswordProperty = "releaseKeyPassword"
}

apktransform {
    copy {
        when (it.buildType) {
            "release" -> file("${it.name}/BiliRoaming_${appVerName}.apk")
            else -> null
        }
    }
}

cmaker {
    default {
        targets("biliroaming")
        abiFilters("armeabi-v7a", "arm64-v8a", "x86")
        arguments += arrayOf(
            "-DANDROID_STL=none",
            "-DCMAKE_CXX_STANDARD=23",
            "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON",
        )
        cFlags += "-flto"
        cppFlags += "-flto"
    }

    buildTypes {
        arguments += "-DDEBUG_SYMBOLS_PATH=${layout.buildDirectory.file("symbols/${it.name}").get().asFile.absolutePath}"
    }
}

android {
    namespace = "me.iacn.biliroaming"
    compileSdk = 35
    buildToolsVersion = "35.0.0"
    ndkVersion = "29.0.14206865"

    buildFeatures {
        prefab = true
        buildConfig = true
    }

    defaultConfig {
        applicationId = "me.iacn.biliroaming"
        minSdk = 24
        targetSdk = 35  // Target Android U
        versionCode = appVerCode
        versionName = appVerName
    }

    buildTypes {
        release {
            isMinifyEnabled = true
            isShrinkResources = true
            proguardFiles("proguard-rules.pro")
        }
    }

    compileOptions {
        sourceCompatibility(JavaVersion.VERSION_11)
        targetCompatibility(JavaVersion.VERSION_11)
    }

    kotlinOptions {
        jvmTarget = "11"
        freeCompilerArgs = listOf(
            "-Xno-param-assertions",
            "-Xno-call-assertions",
            "-Xno-receiver-assertions",
            "-language-version=2.0",
        )
    }

    sourceSets {
        named("main") {
            proto {
                srcDir("src/main/proto")
                include("**/*.proto")
            }
        }
    }

    packaging {
        resources {
            excludes += "**"
        }
    }

    lint {
        checkReleaseBuilds = false
    }

    dependenciesInfo {
        includeInApk = false
    }

    androidResources {
        additionalParameters += arrayOf("--allow-reserved-package-id", "--package-id", "0x23")
    }

    externalNativeBuild {
        cmake {
            path("src/main/jni/CMakeLists.txt")
            version = "4.1.0+"
        }
    }
}

protobuf {
    protoc {
        artifact = libs.protobuf.protoc.get().toString()
    }

    generateProtoTasks {
        all().forEach { task ->
            task.builtins {
                id("java") {
                    option("lite")
                }
                id("kotlin") {
                    option("lite")
                }
            }
        }
    }
}

configurations.all {
    exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk7")
    exclude("org.jetbrains.kotlin", "kotlin-stdlib-jdk8")
}

dependencies {
    compileOnly(libs.xposed)
    implementation(libs.protobuf.kotlin)
    implementation(libs.protobuf.java)
    compileOnly(libs.protobuf.protoc)
    implementation(libs.kotlin.stdlib)
    implementation(libs.kotlin.coroutines.android)
    implementation(libs.kotlin.coroutines.jdk)
    implementation(libs.androidx.documentfile)
    implementation(libs.cxx)
}

val adbExecutable: String = androidComponents.sdkComponents.adb.get().asFile.absolutePath

val restartBiliBili = task("restartBiliBili").apply {
    doLast {
        exec {
            commandLine(adbExecutable, "shell", "am", "force-stop", "tv.danmaku.bili")
        }
        exec {
            commandLine(
                adbExecutable,
                "shell",
                "am",
                "start",
                "$(pm resolve-activity --components tv.danmaku.bili)"
            )
        }
    }
}

afterEvaluate {
    tasks.getByPath("installDebug").finalizedBy(restartBiliBili)
}


================================================
FILE: app/proguard-rules.pro
================================================
-repackageclasses "biliroaming"

-keep class me.iacn.biliroaming.XposedInit {
    <init>();
}

-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
  <fields>;
}

-keepclasseswithmembers class me.iacn.biliroaming.utils.DexHelper {
 native <methods>;
 long token;
 java.lang.ClassLoader classLoader;
}

-keepattributes RuntimeVisible*Annotations

-keepclassmembers class * {
    @android.webkit.JavascriptInterface <methods>;
}

-keepclassmembers class * implements android.os.Parcelable {
    public static final ** CREATOR;
}

-keepclassmembers class me.iacn.biliroaming.MainActivity$Companion {
    boolean isModuleActive();
}

-assumenosideeffects class kotlin.jvm.internal.Intrinsics {
    public static void check*(...);
    public static void throw*(...);
}

-assumenosideeffects class java.util.Objects {
    public static ** requireNonNull(...);
}

-allowaccessmodification
-overloadaggressively


================================================
FILE: app/src/.gitignore
================================================
generated


================================================
FILE: app/src/main/AndroidManifest.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <queries>
        <intent>
            <action android:name="android.intent.action.MAIN" />
        </intent>
    </queries>

    <application
        android:allowBackup="true"
        android:fullBackupContent="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/MainTheme"
        tools:ignore="GoogleAppIndexingWarning">

        <activity-alias
            android:name=".MainActivityAlias"
            android:exported="true"
            android:targetActivity=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity-alias>

        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:showForAllUsers="true"
            android:launchMode="singleInstance">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="de.robv.android.xposed.category.MODULE_SETTINGS" />
            </intent-filter>
        </activity>

        <meta-data
            android:name="xposedmodule"
            android:value="true" />
        <meta-data
            android:name="xposeddescription"
            android:value="@string/xposed_description" />
        <meta-data
            android:name="xposedminversion"
            android:value="53" />

        <meta-data
            android:name="xposedscope"
            android:resource="@array/xposed_scope" />
    </application>

</manifest>


================================================
FILE: app/src/main/assets/xhook.js
================================================
(function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=[].indexOf||function(a){for(var b=0,c=this.length;b<c;b++)if(b in this&&this[b]===a)return b;return-1};q=null,q="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:"undefined"!=typeof global?global:a,x=q.document,d="before",c="after",o="readyState",n="addEventListener",m="removeEventListener",h="dispatchEvent",u="XMLHttpRequest",g="fetch",i="FormData",p=["load","loadend","loadstart"],e=["progress","abort","error","timeout"],E="undefined"!=typeof navigator&&navigator.useragent?navigator.userAgent:"",A=parseInt((/msie (\d+)/.exec(E.toLowerCase())||[])[1]),isNaN(A)&&(A=parseInt((/trident\/.*; rv:(\d+)/.exec(E.toLowerCase())||[])[1])),(G=Array.prototype).indexOf||(G.indexOf=function(a){var b,c,d,e;for(b=d=0,e=this.length;d<e;b=++d)if(c=this[b],c===a)return b;return-1}),D=function(a,b){return Array.prototype.slice.call(a,b)},w=function(a){return"returnValue"===a||"totalSize"===a||"position"===a},z=function(a,b){var c;for(c in a)if(a[c],!w(c))try{b[c]=a[c]}catch(a){}return b},B=function(a){return void 0===a?null:a},C=function(a,b,c){var d,e,f,g;for(e=function(a){return function(d){var e,f,g;e={};for(f in d)w(f)||(g=d[f],e[f]=g===b?c:g);return c[h](a,e)}},f=0,g=a.length;f<g;f++)d=a[f],c._has(d)&&(b["on"+d]=e(d))},y=function(a){var b;if(x&&null!=x.createEventObject)return b=x.createEventObject(),b.type=a,b;try{return new Event(a)}catch(b){return{type:a}}},f=function(a){var c,d,e;return d={},e=function(a){return d[a]||[]},c={},c[n]=function(a,c,f){d[a]=e(a),d[a].indexOf(c)>=0||(f=f===b?d[a].length:f,d[a].splice(f,0,c))},c[m]=function(a,c){var f;if(a===b)return void(d={});c===b&&(d[a]=[]),f=e(a).indexOf(c),f!==-1&&e(a).splice(f,1)},c[h]=function(){var b,d,f,g,h,i,j,k;for(b=D(arguments),d=b.shift(),a||(b[0]=z(b[0],y(d))),g=c["on"+d],g&&g.apply(c,b),k=e(d).concat(e("*")),f=i=0,j=k.length;i<j;f=++i)h=k[f],h.apply(c,b)},c._has=function(a){return!(!d[a]&&!c["on"+a])},a&&(c.listeners=function(a){return D(e(a))},c.on=c[n],c.off=c[m],c.fire=c[h],c.once=function(a,b){var d;return d=function(){return c.off(a,d),b.apply(null,arguments)},c.on(a,d)},c.destroy=function(){return d={}}),c},F=f(!0),F.EventEmitter=f,F[d]=function(a,b){if(a.length<1||a.length>2)throw"invalid hook";return F[n](d,a,b)},F[c]=function(a,b){if(a.length<2||a.length>3)throw"invalid hook";return F[n](c,a,b)},F.enable=function(){q[u]=t,"function"==typeof r&&(q[g]=r),k&&(q[i]=s)},F.disable=function(){q[u]=F[u],q[g]=F[g],k&&(q[i]=k)},v=F.headers=function(a,b){var c,d,e,f,g,h,i,j,k;switch(null==b&&(b={}),typeof a){case"object":d=[];for(e in a)g=a[e],f=e.toLowerCase(),d.push(f+":\t"+g);return d.join("\n")+"\n";case"string":for(d=a.split("\n"),i=0,j=d.length;i<j;i++)c=d[i],/([^:]+):\s*(.+)/.test(c)&&(f=null!=(k=RegExp.$1)?k.toLowerCase():void 0,h=RegExp.$2,null==b[f]&&(b[f]=h));return b}},k=q[i],s=function(a){var b;this.fd=a?new k(a):new k,this.form=a,b=[],Object.defineProperty(this,"entries",{get:function(){var c;return c=a?D(a.querySelectorAll("input,select")).filter(function(a){var b;return"checkbox"!==(b=a.type)&&"radio"!==b||a.checked}).map(function(a){return[a.name,"file"===a.type?a.files:a.value]}):[],c.concat(b)}}),this.append=function(a){return function(){var c;return c=D(arguments),b.push(c),a.fd.append.apply(a.fd,c)}}(this)},k&&(F[i]=k,q[i]=s),l=q[u],F[u]=l,t=q[u]=function(){var a,b,g,i,j,k,l,m,q,r,t,w,x,y,D,E,G,I,J,K,L;a=-1,I=new F[u],t={},y=null,l=void 0,D=void 0,w=void 0,r=function(){var b,c,d,e;if(w.status=y||I.status,y===a&&A<10||(w.statusText=I.statusText),y!==a){e=v(I.getAllResponseHeaders());for(b in e)d=e[b],w.headers[b]||(c=b.toLowerCase(),w.headers[c]=d)}},q=function(){if(I.responseType&&"text"!==I.responseType)"document"===I.responseType?(w.xml=I.responseXML,w.data=I.responseXML):w.data=I.response;else{w.text=I.responseText,w.data=I.responseText;try{w.xml=I.responseXML}catch(a){}}"responseURL"in I&&(w.finalUrl=I.responseURL)},G=function(){k.status=w.status,k.statusText=w.statusText},E=function(){"text"in w&&(k.responseText=w.text),"xml"in w&&(k.responseXML=w.xml),"data"in w&&(k.response=w.data),"finalUrl"in w&&(k.responseURL=w.finalUrl)},i=function(a){for(;a>b&&b<4;)k[o]=++b,1===b&&k[h]("loadstart",{}),2===b&&G(),4===b&&(G(),E()),k[h]("readystatechange",{}),4===b&&(t.async===!1?g():setTimeout(g,0))},g=function(){l||k[h]("load",{}),k[h]("loadend",{}),l&&(k[o]=0)},b=0,x=function(a){var b,d;if(4!==a)return void i(a);b=F.listeners(c),(d=function(){var a;return b.length?(a=b.shift(),2===a.length?(a(t,w),d()):3===a.length&&t.async?a(t,w,d):d()):i(4)})()},k=t.xhr=f(),I.onreadystatechange=function(a){try{2===I[o]&&r()}catch(a){}4===I[o]&&(D=!1,r(),q()),x(I[o])},m=function(){l=!0},k[n]("error",m),k[n]("timeout",m),k[n]("abort",m),k[n]("progress",function(){b<3?x(3):k[h]("readystatechange",{})}),("withCredentials"in I||F.addWithCredentials)&&(k.withCredentials=!1),k.status=0,L=e.concat(p);for(J=0,K=L.length;J<K;J++)j=L[J],k["on"+j]=null;return k.open=function(a,c,d,e,f){b=0,l=!1,D=!1,t.headers={},t.headerNames={},t.status=0,w={},w.headers={},t.method=a,t.url=c,t.async=d!==!1,t.user=e,t.pass=f,x(1)},k.send=function(a){var b,c,f,g,h,i,j,l;for(l=["type","timeout","withCredentials"],i=0,j=l.length;i<j;i++)c=l[i],f="type"===c?"responseType":c,f in k&&(t[c]=k[f]);t.body=a,h=function(){var a,b,d,g,h,i;for(C(e,I,k),k.upload&&C(e.concat(p),I.upload,k.upload),D=!0,I.open(t.method,t.url,t.async,t.user,t.pass),h=["type","timeout","withCredentials"],d=0,g=h.length;d<g;d++)c=h[d],f="type"===c?"responseType":c,c in t&&(I[f]=t[c]);i=t.headers;for(a in i)b=i[a],a&&I.setRequestHeader(a,b);t.body instanceof s&&(t.body=t.body.fd),I.send(t.body)},b=F.listeners(d),(g=function(){var a,c;return b.length?(a=function(a){if("object"==typeof a&&("number"==typeof a.status||"number"==typeof w.status))return z(a,w),H.call(a,"data")<0&&(a.data=a.response||a.text),void x(4);g()},a.head=function(a){return z(a,w),x(2)},a.progress=function(a){return z(a,w),x(3)},c=b.shift(),1===c.length?a(c(t)):2===c.length&&t.async?c(t,a):a()):h()})()},k.abort=function(){y=a,D?I.abort():k[h]("abort",{})},k.setRequestHeader=function(a,b){var c,d;c=null!=a?a.toLowerCase():void 0,d=t.headerNames[c]=t.headerNames[c]||a,t.headers[d]&&(b=t.headers[d]+", "+b),t.headers[d]=b},k.getResponseHeader=function(a){var b;return b=null!=a?a.toLowerCase():void 0,B(w.headers[b])},k.getAllResponseHeaders=function(){return B(v(w.headers))},I.overrideMimeType&&(k.overrideMimeType=function(){return I.overrideMimeType.apply(I,arguments)}),I.upload&&(k.upload=t.upload=f()),k.UNSENT=0,k.OPENED=1,k.HEADERS_RECEIVED=2,k.LOADING=3,k.DONE=4,k.response="",k.responseText="",k.responseXML=null,k.readyState=0,k.statusText="",k},"function"==typeof q[g]&&(j=q[g],F[g]=j,r=q[g]=function(a,b){var e,f,g;return null==b&&(b={headers:{}}),b.url=a,g=null,f=F.listeners(d),e=F.listeners(c),new Promise(function(a,c){var d,h,i,k,l;h=function(){return b.body instanceof s&&(b.body=b.body.fd),b.headers&&(b.headers=new Headers(b.headers)),g||(g=new Request(b.url,b)),z(b,g)},i=function(b){var c;return e.length?(c=e.shift(),2===c.length?(c(h(),b),i(b)):3===c.length?c(h(),b,i):i(b)):a(b)},d=function(b){var c;if(void 0!==b)return c=new Response(b.body||b.text,b),a(c),void i(c);k()},k=function(){var a;return f.length?(a=f.shift(),1===a.length?d(a(b)):2===a.length?a(h(),d):void 0):void l()},l=function(){return j(h()).then(function(a){return i(a)}).catch(function(a){return i(a),c(a)})},k()})}),t.UNSENT=0,t.OPENED=1,t.HEADERS_RECEIVED=2,t.LOADING=3,t.DONE=4,"function"==typeof define&&define.amd?define("xhook",[],function(){return F}):"object"==typeof module&&module.exports?module.exports={xhook:F}:q&&(q.xhook=F)}).call(this,window);

window.XMLHttpRequest.prototype.addEventListener = xhook.addEventListener;

xhook.after(function(request, response) {
    response.text = hooker.hook(request.url, response.text)
});


================================================
FILE: app/src/main/assets/xposed_init
================================================
me.iacn.biliroaming.XposedInit


================================================
FILE: app/src/main/java/me/iacn/biliroaming/ARGBColorChooseDialog.kt
================================================
package me.iacn.biliroaming

import android.app.AlertDialog
import android.content.Context
import android.graphics.Color
import android.text.Editable
import android.text.TextWatcher
import android.view.View
import android.widget.EditText
import android.widget.SeekBar
import android.widget.SeekBar.OnSeekBarChangeListener
import android.widget.TextView
import me.iacn.biliroaming.utils.inflateLayout

/**
 * Created by iAcn on 2019/7/14
 * Email i@iacn.me
 *
 * Copy & Modify from ColorChooseDialog on 2021/7/6
 */
class ARGBColorChooseDialog(context: Context, defColor: Int) : AlertDialog.Builder(context) {
    private val view = context.inflateLayout(R.layout.dialog_argb_color_choose)
    private val sampleView: View = view.findViewById(R.id.view_sample2)
    private val etColor: EditText = view.findViewById(R.id.et_color2)
    private val sbColorA: SeekBar = view.findViewById(R.id.sb_colorA2)
    private val sbColorR: SeekBar = view.findViewById(R.id.sb_colorR2)
    private val sbColorG: SeekBar = view.findViewById(R.id.sb_colorG2)
    private val sbColorB: SeekBar = view.findViewById(R.id.sb_colorB2)
    private val tvColorA: TextView = view.findViewById(R.id.tv_colorA2)
    private val tvColorR: TextView = view.findViewById(R.id.tv_colorR2)
    private val tvColorG: TextView = view.findViewById(R.id.tv_colorG2)
    private val tvColorB: TextView = view.findViewById(R.id.tv_colorB2)
    val color: Int
        get() = Color.argb(
            sbColorA.progress,
            sbColorR.progress,
            sbColorG.progress,
            sbColorB.progress
        )

    private fun setEditTextListener() {
        etColor.addTextChangedListener(object : TextWatcher {
            override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
            override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
                updateValue(handleUnknownColor(s.toString()))
            }

            override fun afterTextChanged(s: Editable) {}
        })
    }

    private fun setSeekBarListener() {
        val listener: OnSeekBarChangeListener = object : OnSeekBarChangeListener {
            override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
                if (fromUser) {
                    val color = Color.argb(
                        sbColorA.progress,
                        sbColorR.progress,
                        sbColorG.progress,
                        sbColorB.progress
                    )
                    etColor.setText(String.format("%08X", 0xFFFFFFFF.toInt() and color))
                }
                tvColorA.text = sbColorA.progress.toString()
                tvColorR.text = sbColorR.progress.toString()
                tvColorG.text = sbColorG.progress.toString()
                tvColorB.text = sbColorB.progress.toString()
            }

            override fun onStartTrackingTouch(seekBar: SeekBar) {}
            override fun onStopTrackingTouch(seekBar: SeekBar) {}
        }
        sbColorA.setOnSeekBarChangeListener(listener)
        sbColorR.setOnSeekBarChangeListener(listener)
        sbColorG.setOnSeekBarChangeListener(listener)
        sbColorB.setOnSeekBarChangeListener(listener)
    }

    private fun updateValue(color: Int) {
        sampleView.setBackgroundColor(color)
        val progressA = Color.alpha(color)
        val progressR = Color.red(color)
        val progressG = Color.green(color)
        val progressB = Color.blue(color)
        sbColorA.progress = progressA
        sbColorR.progress = progressR
        sbColorG.progress = progressG
        sbColorB.progress = progressB
        tvColorA.text = progressA.toString()
        tvColorR.text = progressR.toString()
        tvColorG.text = progressG.toString()
        tvColorB.text = progressB.toString()
    }

    private fun handleUnknownColor(color: String) =
        try {
            Color.parseColor("#$color")
        } catch (e: IllegalArgumentException) {
            Color.BLACK
        }

    init {
        setView(view)
        setEditTextListener()
        setSeekBarListener()
        updateValue(defColor)
        etColor.setText(String.format("%08X", 0xFFFFFFFF.toInt() and defColor))
        setTitle("拾色器")
        setNegativeButton("取消", null)
    }
}


================================================
FILE: app/src/main/java/me/iacn/biliroaming/BaseWidgetDialog.kt
================================================
package me.iacn.biliroaming

import android.app.AlertDialog
import android.content.Context
import android.graphics.Color
import android.graphics.Typeface
import android.text.TextUtils
import android.util.TypedValue
import android.view.Gravity
import android.view.View
import android.view.ViewGroup
import android.view.inputmethod.EditorInfo
import android.widget.*
import me.iacn.biliroaming.utils.children
import me.iacn.biliroaming.utils.dp
import me.iacn.biliroaming.utils.setRippleBackground

open class BaseWidgetDialog(context: Context) : AlertDialog.Builder(context) {
    protected fun string(resId: Int) = context.getString(resId)

    protected fun categoryTitle(title: String) = TextView(context).apply {
        text = title
        typeface = Typeface.DEFAULT_BOLD
        setTextSize(TypedValue.COMPLEX_UNIT_SP, 18F)
        layoutParams = LinearLayout.LayoutParams(
            LinearLayout.LayoutParams.MATCH_PARENT,
            LinearLayout.LayoutParams.WRAP_CONTENT
        ).apply { topMargin = 10.dp }
    }

    protected fun textInputTitle(title: String) = TextView(context).apply {
        text = title
        setTextSize(TypedValue.COMPLEX_UNIT_SP, 18F)
        layoutParams = LinearLayout.LayoutParams(
            LinearLayout.LayoutParams.WRAP_CONTENT,
            LinearLayout.LayoutParams.WRAP_CONTENT
        )
    }

    protected fun textInputItem(
        name: String,
        type: Int = EditorInfo.TYPE_CLASS_NUMBER
    ): Pair<LinearLayout, EditText> {
        val layout = LinearLayout(context).apply {
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
        }
        val textView = TextView(context).apply {
            text = name
            setSingleLine()
            ellipsize = TextUtils.TruncateAt.END
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
        }
        val editText = EditText(context).apply {
            setSingleLine()
            inputType = type
            layoutParams = LinearLayout.LayoutParams(
                0,
                LinearLayout.LayoutParams.WRAP_CONTENT
            ).apply { weight = 1F }
        }
        layout.addView(textView)
        layout.addView(editText)
        return Pair(layout, editText)
    }

    private fun keywordTypeHeader(
        group: ViewGroup,
        name: String,
        namMinWidth: Int,
        showRegex: Boolean,
        onAdd: (v: View) -> Unit,
    ): Triple<LinearLayout, Button, Switch> {
        val layout = LinearLayout(context).apply {
            gravity = Gravity.START
            orientation = LinearLayout.HORIZONTAL
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
        }
        val nameView = TextView(context).apply {
            text = name
            typeface = Typeface.DEFAULT_BOLD
            setTextSize(TypedValue.COMPLEX_UNIT_SP, 16F)
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
            minWidth = namMinWidth
        }
        val addView = Button(context).apply {
            text = string(R.string.keyword_group_add)
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
            minWidth = 60.dp
            minimumWidth = 60.dp
            setOnClickListener(onAdd)
        }
        val clearView = Button(context).apply {
            text = string(R.string.keyword_group_clear)
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
            visibility = View.GONE
            minWidth = 60.dp
            minimumWidth = 60.dp
            setOnClickListener { group.removeAllViews() }
        }
        val regexModeView = TextView(context).apply {
            text = string(R.string.regex_mode)
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            ).apply { marginStart = 4.dp }
        }
        val regexModeSwitch = Switch(context).apply {
            isSoundEffectsEnabled = false
            isHapticFeedbackEnabled = false
        }
        if (!showRegex) {
            regexModeView.visibility = View.GONE
            regexModeSwitch.visibility = View.GONE
        }
        layout.addView(nameView)
        layout.addView(addView)
        layout.addView(clearView)
        layout.addView(regexModeView)
        layout.addView(regexModeSwitch)
        return Triple(layout, clearView, regexModeSwitch)
    }

    protected fun keywordInputItem(
        parent: ViewGroup,
        keyword: String = "",
        type: Int = EditorInfo.TYPE_CLASS_TEXT,
    ): Pair<LinearLayout, EditText> {
        val layout = LinearLayout(context).apply {
            orientation = LinearLayout.HORIZONTAL
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
        }
        val editText = EditText(context).apply {
            inputType = type
            setText(keyword)
            setTextSize(TypedValue.COMPLEX_UNIT_SP, 16F)
            setSingleLine()
            layoutParams = LinearLayout.LayoutParams(
                0,
                LinearLayout.LayoutParams.WRAP_CONTENT
            ).apply { weight = 1F }
        }
        val button = Button(context).apply {
            text = string(R.string.keyword_group_delete)
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
            minWidth = 60.dp
            minimumWidth = 60.dp
            setOnClickListener { parent.removeView(layout) }
        }
        layout.addView(editText)
        layout.addView(button)
        return Pair(layout, editText)
    }

    protected fun LinearLayout.addKeywordGroup(
        name: String,
        namMinWidth: Int = 64.dp,
        showRegex: Boolean = false,
        inputType: Int = EditorInfo.TYPE_CLASS_TEXT,
    ): Pair<ViewGroup, Switch> {
        val group = LinearLayout(context).apply {
            orientation = LinearLayout.VERTICAL
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
        }
        val (_, clearButton, regexModeSwitch) = keywordTypeHeader(
            group, name, namMinWidth, showRegex
        ) {
            keywordInputItem(group, type = inputType).let {
                group.addView(it.first)
                it.second.requestFocus()
            }
        }.also { addView(it.first) }
        group.setOnHierarchyChangeListener(object : ViewGroup.OnHierarchyChangeListener {
            override fun onChildViewAdded(parent: View, child: View) {
                if (group.childCount == 0) {
                    clearButton.visibility = View.GONE
                } else {
                    clearButton.visibility = View.VISIBLE
                }
            }

            override fun onChildViewRemoved(parent: View, child: View) {
                if (group.childCount == 0) {
                    clearButton.visibility = View.GONE
                } else {
                    clearButton.visibility = View.VISIBLE
                }
            }
        })
        addView(group)
        return Pair(group, regexModeSwitch)
    }

    protected fun switchPrefsItem(title: String): Pair<LinearLayout, Switch> {
        val layout = LinearLayout(context).apply {
            gravity = Gravity.CENTER_VERTICAL
            orientation = LinearLayout.HORIZONTAL
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MATCH_PARENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
        }
        val titleView = TextView(context).apply {
            text = title
            setTextSize(TypedValue.COMPLEX_UNIT_SP, 16F)
            setSingleLine()
            ellipsize = TextUtils.TruncateAt.END
            setPadding(0, 8.dp, 0, 8.dp)
            layoutParams = LinearLayout.LayoutParams(
                0,
                LinearLayout.LayoutParams.WRAP_CONTENT
            ).apply { weight = 1F; marginEnd = 10.dp }
        }
        val switcher = Switch(context).apply {
            isClickable = false
            isSoundEffectsEnabled = false
            isHapticFeedbackEnabled = false
            setBackgroundColor(Color.TRANSPARENT)
            layoutParams = LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.WRAP_CONTENT,
                LinearLayout.LayoutParams.WRAP_CONTENT
            )
        }
        layout.setOnClickListener { switcher.toggle() }
        layout.setRippleBackground()
        layout.addView(titleView)
        layout.addView(switcher)
        return Pair(layout, switcher)
    }

    protected fun ViewGroup.getKeywords() = children
        .filterIsInstance<ViewGroup>()
        .flatMap { it.children }
        .filterIsInstance<EditText>()
        .map { it.text.toString().trim() }
        .filter { it.isNotEmpty() }
        .toSet()
}


================================================
FILE: app/src/main/java/me/iacn/biliroaming/BiliBiliPackage.kt
================================================
@file:Suppress("DEPRECATION")

package me.iacn.biliroaming

import android.app.AndroidAppHelper
import android.content.Context
import android.content.SharedPreferences
import android.net.Uri
import android.text.style.ClickableSpan
import android.text.style.LineBackgroundSpan
import android.util.SparseArray
import android.view.View
import android.view.ViewGroup
import android.widget.TextView
import dalvik.system.BaseDexClassLoader
import me.iacn.biliroaming.utils.*
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import java.io.InputStream
import java.lang.reflect.Constructor
import java.lang.reflect.Method
import java.lang.reflect.Modifier
import java.lang.reflect.ParameterizedType
import java.util.Objects
import kotlin.math.max
import kotlin.system.measureTimeMillis
import kotlin.time.ExperimentalTime
import kotlin.time.measureTimedValue


infix fun Configs.Class.from(cl: ClassLoader) = if (hasName()) name.findClassOrNull(cl) else null
val Configs.Method.orNull get() = if (hasName()) name else null
val Configs.Field.orNull get() = if (hasName()) name else null

class BiliBiliPackage constructor(private val mClassLoader: ClassLoader, mContext: Context) {
    init {
        instance = this
    }

    @OptIn(ExperimentalTime::class)
    private val mHookInfo: Configs.HookInfo = run {
        val (result, time) = measureTimedValue { readHookInfo(mContext) }
        Log.d("load hookinfo $time")
        Log.d(result.copy { clearMapIds() }.print())
        result
    }
    val bangumiApiResponseClass by Weak { mHookInfo.bangumiApiResponse from mClassLoader }
    val rxGeneralResponseClass by Weak { "com.bilibili.okretro.call.rxjava.RxGeneralResponse" from mClassLoader }
    val fastJsonClass by Weak { mHookInfo.fastJson.class_ from mClassLoader }
    val bangumiUniformSeasonClass by Weak { mHookInfo.bangumiSeason from mClassLoader }
    val kingPositionComponentClass by Weak { mHookInfo.autoLike.kingPositionComponent.class_ from mClassLoader }
    val storyAbsControllerClass by Weak { mHookInfo.autoLike.storyAbsController.class_ from mClassLoader }
    val storyDetailClass by Weak { "com.bilibili.video.story.StoryDetail" from mClassLoader }
    val retrofitResponseClass by Weak { mHookInfo.retrofitResponse from mClassLoader }
    val themeHelperClass by Weak { mHookInfo.themeHelper.class_ from mClassLoader }
    val themeIdHelperClass by Weak { mHookInfo.themeIdHelper.class_ from mClassLoader }
    val columnHelperClass by Weak { mHookInfo.columnHelper.class_ from mClassLoader }
    val settingRouterClass by Weak { mHookInfo.settings.settingRouter from mClassLoader }
    val themeListClickClass by Weak { mHookInfo.themeListClick from mClassLoader }
    val themeNameClass by Weak { mHookInfo.themeName.class_ from mClassLoader }
    val themeProcessorClass by Weak { mHookInfo.themeProcessor.class_ from mClassLoader }
    val drawerClass by Weak { mHookInfo.drawer.class_ from mClassLoader }
    val generalResponseClass by Weak { mHookInfo.generalResponse from mClassLoader }
    val seasonParamsMapClass by Weak { "com.bilibili.bangumi.data.page.detail.BangumiDetailApiService\$UniformSeasonParamsMap" from mClassLoader }
    val seasonParamsClass by Weak { mHookInfo.bangumiParams.class_ from mClassLoader }
    val brandSplashClass by Weak { "tv.danmaku.bili.ui.splash.brand.ui.BaseBrandSplashFragment" from mClassLoader }
    val urlConnectionClass by Weak { "com.bilibili.lib.okhttp.huc.OkHttpURLConnection" from mClassLoader }
    val downloadThreadListenerClass by Weak { mHookInfo.downloadThread.listener from mClassLoader }
    val downloadThreadViewHostClass by Weak { mHookInfo.downloadThread.viewHost from mClassLoader }
    val reportDownloadThreadClass by Weak { mHookInfo.downloadThread.reportDownload.class_ from mClassLoader }
    val libBiliClass by Weak { mHookInfo.signQuery.class_ from mClassLoader }
    val splashActivityClass by Weak {
        "tv.danmaku.bili.ui.splash.SplashActivity" from mClassLoader
            ?: "tv.danmaku.bili.MainActivityV2" from mClassLoader
    }
    val mainActivityClass by Weak { "tv.danmaku.bili.MainActivityV2" from mClassLoader }
    val gripperBootExpClass by Weak { "com.bilibili.gripper.exp.a\$a" from mClassLoader }
    val homeUserCenterClass by Weak { if (mHookInfo.settings.homeUserCenterCount == 1) mHookInfo.settings.homeUserCenterList.first().class_ from mClassLoader else null }
    val menuGroupItemClass by Weak { mHookInfo.settings.menuGroupItem from mClassLoader }
    val drawerLayoutClass by Weak { mHookInfo.drawer.layout from mClassLoader }
    val drawerLayoutParamsClass by Weak { mHookInfo.drawer.layoutParams from mClassLoader }
    val splashInfoClass by Weak {
        "tv.danmaku.bili.ui.splash.brand.BrandShowInfo" from mClassLoader
            ?: "tv.danmaku.bili.ui.splash.brand.model.BrandShowInfo" from mClassLoader
    }
    val commentCopyClass by Weak { mHookInfo.commentLongClick from mClassLoader }
    val commentCopyNewClass by Weak { mHookInfo.commentLongClickNew from mClassLoader }
    val comment3CopyClass by Weak { mHookInfo.comment3Copy.class_ from mClassLoader }
    val kotlinJsonClass by Weak { "kotlinx.serialization.json.Json" from mClassLoader }
    val gsonConverterClass by Weak { mHookInfo.gsonHelper.gsonConverter from mClassLoader }
    val playerCoreServiceV2Class by Weak { mHookInfo.playerCoreService.class_ from mClassLoader }
    val teenagersModeDialogActivityClass by Weak {
        "com.bilibili.teenagersmode.ui.TeenagersModeDialogActivity" from mClassLoader
    }
    val pegasusFeedClass by Weak { mHookInfo.pegasusFeed.class_ from mClassLoader }
    val popularClass by Weak { mHookInfo.popular.class_ from mClassLoader }
    val subtitleSpanClass by Weak { mHookInfo.subtitleSpan from mClassLoader }
    val chronosSwitchClass by Weak { mHookInfo.chronosSwitch from mClassLoader }
    val biliSpaceClass by Weak { "com.bilibili.app.authorspace.api.BiliSpace" from mClassLoader }
    val biliVideoDetailClass by Weak {
        ("tv.danmaku.bili.ui.video.api.BiliVideoDetail" from mClassLoader)
            ?: ("tv.danmaku.bili.videopage.data.view.model.BiliVideoDetail" from mClassLoader)
    }
    val commentSpanTextViewClass by Weak { mHookInfo.commentSpan from mClassLoader }
    val commentSpanEllipsisTextViewClass by Weak { "com.bilibili.app.comm.comment2.widget.CommentSpanEllipsisTextView" from mClassLoader }
    val liveRoomActivityClass by Weak { "com.bilibili.bililive.room.ui.roomv3.LiveRoomActivityV3" from mClassLoader }
    val liveKvConfigHelperClass by Weak { "com.bilibili.bililive.tec.kvcore.LiveKvConfigHelper" from mClassLoader }
    val storyVideoActivityClass by Weak { "com.bilibili.video.story.StoryVideoActivity" from mClassLoader }
    val okioWrapperClass by Weak { mHookInfo.okio.class_ from mClassLoader }
    val ellipsizingTextViewClass by Weak { "com.bilibili.bplus.followingcard.widget.EllipsizingTextView" from mClassLoader }
    val shareClickResultClass by Weak { "com.bilibili.lib.sharewrapper.online.api.ShareClickResult" from mClassLoader }
    val kanbanCallbackClass by Weak { mHookInfo.kanBan.class_ from mClassLoader }
    val toastHelperClass by Weak { mHookInfo.toastHelper.class_ from mClassLoader }
    val biliAccountsClass by Weak { mHookInfo.biliAccounts.class_ from mClassLoader }
    val networkExceptionClass by Weak { "com.bilibili.lib.moss.api.NetworkException" from mClassLoader }
    val brotliInputStreamClass by Weak { mHookInfo.brotliInputStream from mClassLoader }
    val commentInvalidFragmentClass by Weak {
        "com.bilibili.bangumi.ui.page.detail.OGVCommentFragment".from(mClassLoader)
            ?: "com.bilibili.bangumi.ui.page.detail.BangumiCommentInvalidFragmentV2"
                .from(mClassLoader)
    }
    val playerQualityServiceClass by Weak { "com.bilibili.playerbizcommon.features.quality.PlayerQualityService" from mClassLoader }
    val mossResponseHandlerClass by Weak { "com.bilibili.lib.moss.api.MossResponseHandler" from mClassLoader }
    val projectionPlayUrlClass by Weak { "com.bilibili.lib.projection.internal.api.model.ProjectionPlayUrl" from mClassLoader }
    val responseBodyClass by Weak { mHookInfo.okHttp.responseBody.class_ from mClassLoader }
    val mediaTypeClass by Weak { mHookInfo.okHttp.mediaType.class_ from mClassLoader }
    val biliCallClass by Weak { mHookInfo.biliCall.class_ from mClassLoader }
    val parserClass by Weak { mHookInfo.biliCall.parser from mClassLoader }
    val livePagerRecyclerViewClass by Weak { mHookInfo.livePagerRecyclerView from mClassLoader }
    val cronCanvasClass by Weak { "com.bilibili.cron.Canvas" from mClassLoader }
    val subtitleConfigGetClass by Weak { "tv.danmaku.biliplayerv2.service.interact.biz.chronos.chronosrpc.methods.receive.GetDanmakuConfig\$SubtitleConfig" from mClassLoader }
    val subtitleConfigChangeClass by Weak { "tv.danmaku.biliplayerv2.service.interact.biz.chronos.chronosrpc.methods.send.DanmakuConfigChange\$SubtitleConfig" from mClassLoader }
    val liveRoomPlayerViewClass by Weak { "com.bilibili.bililive.room.ui.roomv3.player.container.LiveRoomPlayerContainerView" from mClassLoader }
    val biliConfigClass by Weak { mHookInfo.biliConfig.class_ from mClassLoader }
    val updateInfoSupplierClass by Weak { mHookInfo.updateInfoSupplier.class_ from mClassLoader }
    val latestVersionExceptionClass by Weak { "tv.danmaku.bili.update.internal.exception.LatestVersionException" from mClassLoader }
    val playerPreloadHolderClass by Weak { mHookInfo.playerPreloadHolder.class_ from mClassLoader }
    val playerSettingHelperClass by Weak { mHookInfo.playerSettingHelper.class_ from mClassLoader }
    val autoSupremumQualityClass by Weak { mHookInfo.autoSupremumQuality.class_ from mClassLoader }
    val qualityStrategyProviderClass by Weak { mHookInfo.qualityStrategyProvider.class_ from mClassLoader }
    val liveRtcEnableClass by Weak { mHookInfo.liveRtcHelper.liveRtcEnableClass from mClassLoader }
    val playURLMossClass by Weak { "com.bapis.bilibili.app.playurl.v1.PlayURLMoss" from mClassLoader }
    val playViewReqClass by Weak { "com.bapis.bilibili.app.playurl.v1.PlayViewReq" from mClassLoader }
    val playerMossClass by Weak { "com.bapis.bilibili.app.playerunite.v1.PlayerMoss" from mClassLoader }
    val playViewUniteReqClass by Weak { "com.bapis.bilibili.app.playerunite.v1.PlayViewUniteReq" from mClassLoader }
    val viewMossClass by Weak { "com.bapis.bilibili.app.view.v1.ViewMoss" from mClassLoader }
    val viewReqClass by Weak { "com.bapis.bilibili.app.view.v1.ViewReq" from mClassLoader }
    val viewUniteMossClass by Weak { "com.bapis.bilibili.app.viewunite.v1.ViewMoss" from mClassLoader }
    val viewUniteReqClass by Weak { "com.bapis.bilibili.app.viewunite.v1.ViewReq" from mClassLoader }
    val bkArcPartClass by Weak { "com.bapis.bilibili.app.listener.v1.BKArcPart" from mClassLoader }
    val builtInThemesClass by Weak { mHookInfo.builtInThemes.class_ from mClassLoader }
    val themeColorsConstructor by Weak {
        mHookInfo.themeColors.from(mClassLoader)?.declaredConstructors?.firstOrNull { it.isPrivate }
            ?.apply { isAccessible = true }
    }
    val biliGlobalPreferenceClass by Weak { mHookInfo.biliGlobalPreference.class_ from mClassLoader }
    val dmMossClass by Weak { "com.bapis.bilibili.community.service.dm.v1.DMMoss" from mClassLoader }
    val dmViewReqClass by Weak { "com.bapis.bilibili.community.service.dm.v1.DmViewReq" from mClassLoader }
    val treePointItemClass by Weak { "com.bilibili.app.comm.list.common.data.ThreePointItem" from mClassLoader }
    val dislikeReasonClass by Weak { "com.bilibili.app.comm.list.common.data.DislikeReason" from mClassLoader }
    val cardClickProcessorClass by Weak { mHookInfo.cardClickProcessor.class_ from mClassLoader }
    val publishToFollowingConfigClass by Weak { mHookInfo.publishToFollowingConfig from mClassLoader }
    val imageFragmentClass by Weak { "com.bilibili.lib.imageviewer.fragment.ImageFragment" from mClassLoader }
    val unknownFieldSetLiteInstance by Weak {
        "com.google.protobuf.UnknownFieldSetLite".from(mClassLoader)
            ?.callStaticMethod("getDefaultInstance")
    }
    val searchAllResponseClass by Weak { "com.bapis.bilibili.polymer.app.search.v1.SearchAllResponse" from mClassLoader }
    val searchVideoCardClass by Weak { "com.bapis.bilibili.polymer.app.search.v1.SearchVideoCard" from mClassLoader }
    val playSpeedManager by Weak { mHookInfo.playSpeedManager from mClassLoader }
    val continuationClass by Weak { mHookInfo.continuation.class_ from mClassLoader }
    val vipQualityTrialService by Weak { mHookInfo.vipQualityTrialService.class_ from mClassLoader }
    val livePlayUrlSelectUtilClass by Weak { mHookInfo.liveQuality.selectUtil.class_ from mClassLoader }
    val liveRTCSourceServiceImplClass by Weak { mHookInfo.liveQuality.sourceService.class_ from mClassLoader }
    val defaultRequestInterceptClass by Weak { mHookInfo.liveQuality.interceptor.class_ from mClassLoader }
    val httpUrlClass by Weak { mHookInfo.okHttp.httpUrl.class_ from mClassLoader }
    val preBuiltConfigClass by Weak { mHookInfo.preBuiltConfig.class_ from mClassLoader }
    val dataSPClass by Weak { mHookInfo.dataSP.class_ from mClassLoader }
    val fastjsonFieldAnnotation by Weak { "com.alibaba.fastjson.annotation.JSONField" from mClassLoader }
    val gsonFieldAnnotation by Weak { "com.google.gson.annotations.SerializedName" from mClassLoader }
    val pegasusParserClass by Weak { mHookInfo.pegasusParser from mClassLoader }
    val resolveClientCompanionClass by Weak { mHookInfo.resolveClientCompanion.class_ from mClassLoader }
    val videoDownloadEntryClass by Weak { "com.bilibili.videodownloader.model.VideoDownloadEntry" from mClassLoader }
    val rewardAdClass by Weak { mHookInfo.rewardAd.class_ from mClassLoader }
    val tripleSpeedServiceClass by Weak { "com.bilibili.ship.theseus.united.player.TripleSpeedService\$runOldTripleSpeed\$1\$listener\$1\$onLongPress\$1" from mClassLoader }
    val storyPagerPlayerClass by Weak { mHookInfo.storyPagerPlayer.class_ from mClassLoader }

    // for v8.17.0+
    val useNewMossFunc = instance.viewMossClass?.declaredMethods?.any {
        it.name == "executeRelatesFeed"
    } ?: false

    private val unitedVideoActivity by Weak { "com.bilibili.ship.theseus.detail.UnitedBizDetailsActivity" from mClassLoader }
    val hasUnitedVideoActivity = !Objects.isNull(unitedVideoActivity)

    val ids: Map<String, Int> by lazy {
        mHookInfo.mapIds.idsMap
    }

    fun getCustomizeAccessKey(area: String): String? {
        var key = sPrefs.getString("${area}_accessKey", null)
        if (key.isNullOrBlank()) key = accessKey
        return key
    }

    val biliAccounts by lazy {
        biliAccountsClass?.callStaticMethodOrNull(
            mHookInfo.biliAccounts.get.orNull,
            AndroidAppHelper.currentApplication()
        )
    }

    val accessKey by lazy {
        biliAccounts?.callMethodOrNullAs<String>(mHookInfo.biliAccounts.getAccessKey.orNull)
    }

    val appKey by lazy {
        mHookInfo.biliConfig.getAppKey.orNull?.let {
            biliConfigClass?.callStaticMethodOrNullAs<String>(it)
        } ?: appKeyMap[packageName] ?: "1d8b6e7d45233436"
    }

    val clientVersionCode get() = mHookInfo.clientVersionCode

    fun fastJsonParse() = mHookInfo.fastJson.parse.orNull

    fun colorArray() = mHookInfo.themeHelper.colorArray.orNull

    fun colorId() = mHookInfo.themeIdHelper.colorId.orNull

    fun columnColorArray() = mHookInfo.columnHelper.colorArray.orNull

    fun signQueryName() = mHookInfo.signQuery.method.orNull

    fun skinList() = mHookInfo.skinList.orNull

    fun themeReset() = mHookInfo.themeProcessor.methodsList.map { it.orNull }

    fun homeCenters() = mHookInfo.settings.homeUserCenterList.map {
        it.class_ from mClassLoader to it.addSetting.orNull
    }

    fun requestField() = mHookInfo.okHttp.response.request.orNull

    fun componentMapField() = mHookInfo.autoLike.kingPositionComponent.componentMap.orNull

    fun setMDataMethod() = mHookInfo.autoLike.storyAbsController.setMData.orNull

    fun getMPlayerMethod() = mHookInfo.autoLike.storyAbsController.getMPlayer.orNull

    fun themeName() = mHookInfo.themeName.field.orNull

    fun downloadingThread() = mHookInfo.downloadThread.field.orNull

    fun reportDownloadThread() = mHookInfo.downloadThread.reportDownload.method.orNull

    fun openDrawer() = mHookInfo.drawer.open.orNull

    fun closeDrawer() = mHookInfo.drawer.close.orNull

    fun isDrawerOpen() = mHookInfo.drawer.isOpen.orNull

    fun paramsToMap() = mHookInfo.bangumiParams.paramsToMap.orNull

    fun gson() = mHookInfo.gsonHelper.gson.orNull

    fun getPlaybackSpeed() = mHookInfo.playerCoreService.getPlaybackSpeed.orNull

    fun urlField() = mHookInfo.okHttp.request.url.orNull

    fun gsonToJson() = mHookInfo.gsonHelper.toJson.orNull

    fun gsonFromJson() = mHookInfo.gsonHelper.fromJson.orNull

    fun pegasusFeed() = mHookInfo.pegasusFeed.method.orNull

    fun descCopy() = mHookInfo.descCopy.methodsList.map { it.orNull }

    fun descCopyView() = mHookInfo.descCopy.classesList.map { it from mClassLoader }

    fun comment3Copy() = mHookInfo.comment3Copy.method.orNull

    fun comment3ViewIndex() = mHookInfo.comment3Copy.comment3ViewIndex

    fun responseDataField() = runCatchingOrNull {
        rxGeneralResponseClass?.getDeclaredField("data")?.name
    } ?: "_data"

    fun okio() = mHookInfo.okio.field.orNull

    fun okioLength() = mHookInfo.okio.length.orNull

    fun okioInputStream() = mHookInfo.okioBuffer.inputStream.orNull

    fun okioReadFrom() = mHookInfo.okioBuffer.readFrom.orNull

    fun seekTo() = mHookInfo.playerCoreService.seekTo.orNull

    fun onSeekComplete() = mHookInfo.playerCoreService.onSeekComplete.orNull

    fun kanbanCallback() = mHookInfo.kanBan.method.orNull

    fun showToast() = mHookInfo.toastHelper.show.orNull

    fun cancelShowToast() = mHookInfo.toastHelper.cancel.orNull

    fun canTrialMethod() = mHookInfo.vipQualityTrialService.canTrial.orNull

    fun setInvalidTips() = commentInvalidFragmentClass?.declaredMethods?.find { m ->
        m.parameterTypes.let { it.size == 2 && it[0] == commentInvalidFragmentClass && it[1].name == "kotlin.Pair" }
    }?.name

    fun create() = mHookInfo.okHttp.responseBody.create.orNull

    fun string() = mHookInfo.okHttp.responseBody.string.orNull

    fun get() = mHookInfo.okHttp.mediaType.get.orNull

    fun setParser() = mHookInfo.biliCall.setParser.orNull

    fun biliCallRequestField() = mHookInfo.biliCall.request.orNull

    fun onOperateClick() = mHookInfo.onOperateClick.orNull

    fun getContentString() = mHookInfo.getContentString.orNull

    fun check() = mHookInfo.updateInfoSupplier.check.orNull

    fun dynamicDescHolderListeners() =
        mHookInfo.dynDescHolderListenerList.map { it.from(mClassLoader) }

    fun playerFullStoryWidgets() =
        mHookInfo.playerFullStoryWidgetList.map { it.class_.from(mClassLoader) to it.method.orNull }

    fun bangumiUniformSeasonActivityEntrance() = mHookInfo.bangumiSeasonActivityEntrance.orNull

    fun getPreload() = mHookInfo.playerPreloadHolder.get.orNull

    fun playerQualityServices() =
        mHookInfo.playerQualityServiceList.map { it.class_.from(mClassLoader) to it.getDefaultQnThumb.orNull }

    fun getDefaultQn() = mHookInfo.playerSettingHelper.getDefaultQn.orNull

    fun selectQuality() = mHookInfo.qualityStrategyProvider.selectQuality.orNull

    fun liveRtcEnable() = mHookInfo.liveRtcHelper.liveRtcEnableMethod.orNull

    fun allThemesField() = mHookInfo.builtInThemes.all.orNull

    fun getBLKVPrefs() = mHookInfo.biliGlobalPreference.get.orNull

    fun onFeedClicked() = mHookInfo.cardClickProcessor.onFeedClicked.orNull

    fun buildSelectorDataMethod() = mHookInfo.liveQuality.selectUtil.buildSelectorData.orNull

    fun switchAutoMethod() = mHookInfo.liveQuality.sourceService.switchAuto.orNull

    fun interceptMethod() = mHookInfo.liveQuality.interceptor.intercept.orNull

    fun httpUrlParseMethod() = mHookInfo.okHttp.httpUrl.parse.orNull

    fun getPreBuiltConfigMethod() = mHookInfo.preBuiltConfig.get.orNull

    fun getDataSPMethod() = mHookInfo.dataSP.get.orNull

    fun buildCommonResolverParamsMethod() =
        mHookInfo.resolveClientCompanion.buildCommonResolverParams.orNull

    fun setExtraContentMethod() = mHookInfo.gCommonResolverParams.setExtraContent.orNull

    fun rewardFlag() = mHookInfo.rewardAd.rewardFlag.orNull

    fun addVideo() = mHookInfo.storyPagerPlayer.addVideo.orNull

    private fun readHookInfo(context: Context): Configs.HookInfo {
        try {
            val hookInfoFile = File(context.cacheDir, Constant.HOOK_INFO_FILE_NAME)
            Log.d("Reading hook info: $hookInfoFile")
            val t = measureTimeMillis {
                if (hookInfoFile.isFile && hookInfoFile.canRead()) {
                    val lastUpdateTime = context.packageManager.getPackageInfo(
                        AndroidAppHelper.currentPackageName(),
                        0
                    ).lastUpdateTime
                    val lastModuleUpdateTime = try {
                        context.packageManager.getPackageInfo(BuildConfig.APPLICATION_ID, 0)
                    } catch (e: Throwable) {
                        null
                    }?.lastUpdateTime ?: 0
                    val info = FileInputStream(hookInfoFile).use {
                        runCatchingOrNull { Configs.HookInfo.parseFrom(it) }
                            ?: Configs.HookInfo.newBuilder().build()
                    }
                    if (info.lastUpdateTime >= lastUpdateTime && info.lastUpdateTime >= lastModuleUpdateTime
                        && getVersionCode(context.packageName) == info.clientVersionCode
                        && BuildConfig.VERSION_CODE == info.moduleVersionCode
                        && BuildConfig.VERSION_NAME == info.moduleVersionName
                        && info.biliAccounts.getAccessKey.orNull != null
                    )
                        return info
                }
            }
            Log.d("Read hook info completed: take $t ms")
        } catch (e: Throwable) {
            Log.w(e)
        }
        return initHookInfo(context).also {
            try {
                val hookInfoFile = File(context.cacheDir, Constant.HOOK_INFO_FILE_NAME)
                if (hookInfoFile.exists()) hookInfoFile.delete()
                FileOutputStream(hookInfoFile).use { o -> it.writeTo(o) }
            } catch (e: Exception) {
                Log.e(e)
            }
        }
    }

    companion object {
        @JvmStatic
        fun findRealClassloader(classloader: BaseDexClassLoader): BaseDexClassLoader {
            val serviceField = classloader.javaClass.findFirstFieldByExactTypeOrNull(
                "com.bilibili.lib.tribe.core.internal.loader.DefaultClassLoaderService" from classloader
            )
            val delegateField = classloader.javaClass.findFirstFieldByExactTypeOrNull(
                "com.bilibili.lib.tribe.core.internal.loader.TribeLoaderDelegate" from classloader
            )
            return if (serviceField != null) {
                serviceField.type.declaredFields.filter { f ->
                    f.type == ClassLoader::class.java
                }.map { f ->
                    classloader.getObjectFieldOrNull(serviceField.name)
                        ?.getObjectFieldOrNull(f.name)
                }.firstOrNull { o ->
                    o?.javaClass?.name?.startsWith("com.bilibili") == false
                } as? BaseDexClassLoader ?: classloader
            } else if (delegateField != null) {
                val loaderField =
                    delegateField.type.findFirstFieldByExactTypeOrNull(ClassLoader::class.java)
                val out = classloader.getObjectFieldOrNull(delegateField.name)
                    ?.getObjectFieldOrNull(loaderField?.name)
                if (BaseDexClassLoader::class.java.isInstance(out)) out as BaseDexClassLoader else classloader
            } else classloader
        }

        @JvmStatic
        fun initHookInfo(context: Context) = hookInfo {
            val classloader = context.classLoader
            val classesList = context.classLoader.allClassesList(::findRealClassloader).asSequence()

            try {
                System.loadLibrary("biliroaming")
            } catch (e: Throwable) {
                Log.e(e)
                Log.toast("不支持该架构或框架,部分功能可能失效")
                return@hookInfo
            }

            val dexHelper =
                DexHelper(classloader.findDexClassLoader(::findRealClassloader) ?: return@hookInfo)
            lastUpdateTime = max(
                context.packageManager.getPackageInfo(
                    AndroidAppHelper.currentPackageName(),
                    0
                ).lastUpdateTime,
                runCatchingOrNull {
                    context.packageManager.getPackageInfo(
                        BuildConfig.APPLICATION_ID,
                        0
                    )
                }?.lastUpdateTime ?: 0
            )
            clientVersionCode = getVersionCode(context.packageName)
            moduleVersionCode = BuildConfig.VERSION_CODE
            moduleVersionName = BuildConfig.VERSION_NAME
            mapIds = mapIds {
                val reg = Regex("^tv\\.danmaku\\.bili\\.[^.]*$")
                val mask = Modifier.STATIC or Modifier.PUBLIC or Modifier.FINAL
                classesList.filter {
                    it.startsWith("tv.danmaku.bili")
                }.filter {
                    it.matches(reg)
                }.flatMap { c ->
                    c.findClass(classloader).declaredFields.filter {
                        it.modifiers == mask
                                && it.type == Int::class.javaPrimitiveType
                    }
                }.forEach { ids[it.name] = it.get(null) as Int }
            }

            bangumiApiResponse = class_ {
                name = "com.bilibili.bangumi.data.common.api.BangumiApiResponse"
            }
            retrofitResponse = class_ {
                name = "retrofit2.Response".from(classloader)?.name
                    ?: dexHelper.findMethodUsingString(
                        "rawResponse must be successful response",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).asSequence().firstNotNullOfOrNull {
                        dexHelper.decodeMethodIndex(it)
                    }?.declaringClass?.name ?: return@class_
            }
            val responseBodyClass = "okhttp3.ResponseBody".from(classloader)
                ?: dexHelper.findMethodUsingString(
                    "Cannot buffer entire body for content length: ",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    false
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it)
                }.firstOrNull {
                    it.declaringClass?.name?.startsWith("okhttp3") == true
                }?.declaringClass
            okHttp = okHttp {
                val responseClass = "okhttp3.Response".from(classloader)
                    ?: dexHelper.findMethodUsingString(
                        "Response{protocol=",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        false
                    ).asSequence().mapNotNull {
                        dexHelper.decodeMethodIndex(it)
                    }.firstOrNull {
                        it.declaringClass?.name?.startsWith("okhttp3") == true
                    }?.declaringClass ?: return@okHttp
                val requestClass = "okhttp3.Request".from(classloader)
                    ?: dexHelper.findMethodUsingString(
                        "Request{method=",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        false
                    ).asSequence().mapNotNull {
                        dexHelper.decodeMethodIndex(it)
                    }.firstOrNull {
                        it.declaringClass?.name?.startsWith("okhttp3") == true
                    }?.declaringClass ?: return@okHttp
                val urlClass = "okhttp3.HttpUrl".from(classloader)
                    ?: dexHelper.findMethodUsingString(
                        ":@",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        false
                    ).asSequence().mapNotNull {
                        dexHelper.decodeMethodIndex(it)
                    }.firstOrNull {
                        it.declaringClass?.name?.startsWith("okhttp3") == true
                    }?.declaringClass ?: return@okHttp
                val parseMethod = urlClass.declaredMethods.firstOrNull {
                    it.isStatic && it.returnType == urlClass && it.parameterCount == 1 && it.parameterTypes[0] == String::class.java
                } ?: return@okHttp
                responseBodyClass ?: return@okHttp
                val getMethod = dexHelper.findMethodUsingString(
                    "No subtype found for:",
                    true,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    false
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it)
                }.firstOrNull {
                    it.declaringClass?.name?.startsWith("okhttp3") == true
                } ?: return@okHttp
                request = request {
                    class_ = class_ { name = requestClass.name }
                    url = field {
                        name = requestClass.findFirstFieldByExactTypeOrNull(urlClass)?.name
                            ?: return@field
                    }
                }
                response = response {
                    class_ = class_ { name = responseClass.name }
                    request = field {
                        name = responseClass.findFirstFieldByExactTypeOrNull(requestClass)?.name
                            ?: return@field
                    }
                }
                responseBody = responseBody {
                    class_ = class_ { name = responseBodyClass.name }
                    create = method {
                        name = responseBodyClass.methods.find {
                            it.isStatic && it.parameterTypes.size == 2 && it.parameterTypes[1] == String::class.java
                        }?.name ?: return@method
                    }
                    string = method {
                        name = responseBodyClass.declaredMethods.find {
                            it.parameterTypes.isEmpty() && it.returnType == String::class.java
                        }?.name ?: return@method
                    }
                }
                mediaType = mediaType {
                    class_ = class_ { name = getMethod.declaringClass.name }
                    get = method { name = getMethod.name }
                }
                httpUrl = httpUrl {
                    class_ = class_ { name = urlClass.name }
                    parse = method { name = parseMethod.name }
                }
            }
            fastJson = fastJson {
                val fastJsonClass = dexHelper.findMethodUsingString(
                    "toJSON error",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                }?.declaringClass ?: return@fastJson
                val notObfuscated = "JSON" == fastJsonClass.simpleName
                class_ = class_ { name = fastJsonClass.name }
                parse = method { name = if (notObfuscated) "parseObject" else "a" }
            }
            biliAccounts = biliAccounts {
                val biliAccountsClass = dexHelper.findMethodUsingString(
                    "logout with account exception",
                    false,
                    -1,
                    1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                }?.declaringClass ?: return@biliAccounts
                class_ = class_ { name = biliAccountsClass.name }
                val biliAccountIndex = dexHelper.encodeClassIndex(biliAccountsClass)
                val biliAuthFragmentMethodIndex = dexHelper.findMethodUsingString(
                    "initFacial enter",
                    true,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull() ?: return@biliAccounts
                val calledMethods = dexHelper.findMethodInvoking(
                    biliAuthFragmentMethodIndex,
                    -1,
                    -1,
                    null,
                    biliAccountIndex,
                    null,
                    null,
                    null,
                    false
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it) as? Method
                }

                get = method {
                    name = calledMethods.firstOrNull {
                        it.isStatic && it.parameterTypes.size == 1 && it.parameterTypes[0] == Context::class.java && it.returnType == biliAccountsClass
                    }?.name ?: return@method
                }

                getAccessKey = method {
                    name = calledMethods.firstOrNull {
                        it.isNotStatic && it.parameterTypes.isEmpty() && it.returnType == String::class.java
                    }?.name ?: return@method
                }
            }
            themeHelper = themeHelper {
                val colorArrayMethod = dexHelper.findMethodUsingString(
                    "theme_entries_last_key",
                    false,
                    dexHelper.encodeClassIndex(Int::class.java),
                    1,
                    null,
                    -1,
                    longArrayOf(dexHelper.encodeClassIndex(Context::class.java)),
                    null,
                    null,
                    true
                ).firstOrNull()?.let {
                    dexHelper.decodeMethodIndex(it)
                } ?: return@themeHelper

                class_ = class_ { name = colorArrayMethod.declaringClass.name }
                colorArray = field { name = colorArrayMethod.name }
            }
            themeIdHelper = themeIdHelper {
                val mWebActivityClass = "tv.danmaku.bili.ui.webview.MWebActivity".from(classloader)
                    ?: return@themeIdHelper
                val mWebActivityIndex = dexHelper.encodeClassIndex(mWebActivityClass)
                val themeIdHelperClass = dexHelper.findMethodUsingString(
                    "native.theme",
                    false,
                    -1,
                    -1,
                    null,
                    mWebActivityIndex,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.run {
                    dexHelper.findMethodInvoking(
                        this,
                        -1,
                        0,
                        "I",
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).firstOrNull()?.let {
                        dexHelper.decodeMethodIndex(it)
                    }?.declaringClass
                } ?: return@themeIdHelper
                class_ = class_ { name = themeIdHelperClass.name }
                colorId = field {
                    name = themeIdHelperClass.declaredFields.find {
                        it.type == SparseArray::class.java
                    }?.name ?: return@field
                }
            }
            columnHelper = columnHelper {
                val columnHelperClass = classesList.filter {
                    it.startsWith("com.bilibili.column.helper")
                }.firstNotNullOfOrNull { c ->
                    c.findClass(classloader).takeIf {
                        it.declaredFields.count { f ->
                            Modifier.isStatic(it.modifiers) && f.type == SparseArray::class.java
                        } > 1
                    }
                } ?: return@columnHelper
                class_ = class_ {
                    name = columnHelperClass.name ?: return@class_
                }
                colorArray = field {
                    name = columnHelperClass.declaredFields.firstOrNull {
                        it.type == SparseArray::class.java &&
                                (it.genericType as ParameterizedType).actualTypeArguments[0].toString() == "int[]"
                    }?.name ?: return@field
                }
            }
            skinList = method {
                val biliSkinListClass =
                    "tv.danmaku.bili.ui.theme.api.BiliSkinList".findClassOrNull(classloader)
                        ?: return@method
                name =
                    "tv.danmaku.bili.ui.theme.ThemeStoreActivity".findClassOrNull(classloader)?.declaredMethods?.firstOrNull {
                        it.parameterTypes.size == 2 && it.parameterTypes[0] == biliSkinListClass &&
                                it.parameterTypes[1] == Boolean::class.javaPrimitiveType
                    }?.name ?: return@method
            }
            themeProcessor = themeProcessor {
                val biliSkinListClass =
                    "tv.danmaku.bili.ui.theme.api.BiliSkinList".findClassOrNull(classloader)
                val themeProcessorClass = classesList.filter {
                    it.startsWith("tv.danmaku.bili.ui.theme")
                }.firstNotNullOfOrNull { c ->
                    c.findClass(classloader).takeIf {
                        it.declaredFields.count { f ->
                            f.type == biliSkinListClass
                        } > 1
                    }
                } ?: return@themeProcessor
                class_ = class_ { name = themeProcessorClass.name }
                methods += themeProcessorClass.declaredMethods.filter {
                    it.parameterTypes.isEmpty() && it.modifiers == 0
                }.map { method { name = it.name } }
            }
            themeListClick = class_ {
                name =
                    "tv.danmaku.bili.ui.theme.ThemeStoreActivity".findClassOrNull(classloader)?.declaredClasses?.firstOrNull {
                        it.interfaces.contains(View.OnClickListener::class.java)
                    }?.name ?: return@class_
            }
            themeName = themeName {
                val mainGarbClass = dexHelper.findMethodUsingString(
                    ".garb.GARB_CHANGE",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it)?.declaringClass
                }.firstOrNull() ?: return@themeName
                val id2NameIndex = dexHelper.findMethodUsingString(
                    "white",
                    false,
                    -1,
                    1,
                    null,
                    dexHelper.encodeClassIndex(mainGarbClass),
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstOrNull() ?: return@themeName
                val themeNameClass = dexHelper.findMethodInvoking(
                    id2NameIndex,
                    dexHelper.encodeClassIndex(Map::class.java),
                    0,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it)?.declaringClass
                }.firstOrNull() ?: return@themeName
                class_ = class_ {
                    name = themeNameClass.name
                }
                field = field {
                    name = themeNameClass.declaredFields.firstOrNull {
                        it.type == Map::class.java
                                && Modifier.isStatic(it.modifiers)
                    }?.name ?: return@field
                }
            }
            autoLike = autoLike {
                kingPositionComponent = kingPositionComponent {
                    val kingPositionComponentClass = dexHelper.findMethodUsingString(
                        "LikeClicked(view=",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).asSequence().firstNotNullOfOrNull {
                        dexHelper.decodeMethodIndex(it)?.declaringClass?.run {
                            var outerClass = this
                            while (outerClass.declaringClass != null) {
                                outerClass = outerClass.declaringClass!!
                            }
                            outerClass
                        }
                    } ?: return@kingPositionComponent
                    val componentMapField = kingPositionComponentClass.declaredFields.firstOrNull {
                        it.type == Map::class.java
                    } ?: return@kingPositionComponent
                    class_ = class_ { name = kingPositionComponentClass.name }
                    componentMap = field { name = componentMapField.name }
                }
                storyAbsController = storyAbsController {
                    val storyAbsControllerClass = dexHelper.findMethodUsingString(
                        "notify player state fail",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).asSequence().mapNotNull {
                        dexHelper.decodeMethodIndex(it)?.declaringClass
                    }.firstOrNull() ?: return@storyAbsController
                    val storyPagerPlayerInterface = dexHelper.findMethodUsingString(
                        " play item but is inactivate",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).asSequence().mapNotNull {
                        dexHelper.decodeMethodIndex(it)?.declaringClass?.interfaces?.getOrNull(0)
                    }.firstOrNull() ?: return@storyAbsController
                    val storyDetailClass = "com.bilibili.video.story.StoryDetail".from(classloader)
                    val setMDataMethod = storyAbsControllerClass.declaredMethods.firstOrNull {
                        it.returnType == Void.TYPE && it.parameterCount == 1 && it.parameterTypes[0] == storyDetailClass
                    } ?: return@storyAbsController
                    val getMPlayerMethod = storyAbsControllerClass.declaredMethods.firstOrNull {
                        storyPagerPlayerInterface.isAssignableFrom(it.returnType) && it.parameterCount == 0
                    } ?: return@storyAbsController
                    class_ = class_ { name = storyAbsControllerClass.name }
                    setMData = method { name = setMDataMethod.name }
                    getMPlayer = method { name = getMPlayerMethod.name }
                }
            }
            signQuery = signQuery {
                val signedQueryClass =
                    "com.bilibili.nativelibrary.SignedQuery".findClassOrNull(classloader)
                        ?: return@signQuery
                val libBiliClass =
                    "com.bilibili.nativelibrary.LibBili" from classloader ?: return@signQuery
                class_ = class_ { name = libBiliClass.name }
                method = method {
                    name = libBiliClass.declaredMethods.firstOrNull {
                        it.parameterTypes.size == 1 && it.parameterTypes[0] == Map::class.java &&
                                it.returnType == signedQueryClass
                    }?.name ?: return@method
                }
            }
            settings = settings {
                val menuGroupItemClass =
                    "com.bilibili.lib.homepage.mine.MenuGroup\$Item" from classloader
                        ?: return@settings
                menuGroupItem = class_ { name = menuGroupItemClass.name }
                settingRouter = class_ {
                    name = dexHelper.findMethodUsingString(
                        "UperHotMineSolution",
                        false,
                        -1,
                        0,
                        "V",
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).asSequence().firstNotNullOfOrNull {
                        dexHelper.decodeMethodIndex(it)
                    }?.declaringClass?.interfaces?.firstOrNull()?.let {
                        dexHelper.encodeClassIndex(it)
                    }?.let {
                        dexHelper.findField(it, null, true).asSequence().firstNotNullOfOrNull { f ->
                            dexHelper.decodeFieldIndex(f)
                        }?.declaringClass
                    }?.name ?: return@class_
                }
                val contextIndex = dexHelper.encodeClassIndex(Context::class.java)
                val listIndex = dexHelper.encodeClassIndex(List::class.java)
                dexHelper.findMethodUsingString(
                    "main.my-information.noportrait.0.show",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    false
                ).asSequence().mapNotNull { dexHelper.decodeMethodIndex(it)?.declaringClass }
                    .forEach { homeUserCenterClass ->
                        val homeUserCenterIndex = dexHelper.encodeClassIndex(homeUserCenterClass)
                        val addSettingMethod = dexHelper.findMethodUsingString(
                            "bilibili://main/scan",
                            true,
                            -1,
                            -1,
                            null,
                            homeUserCenterIndex,
                            null,
                            longArrayOf(contextIndex),
                            null,
                            false
                        ).asSequence().mapNotNull {
                            dexHelper.decodeMethodIndex(it) as? Method
                        }.firstOrNull {
                            it.parameterTypes.size == 2 &&
                                    it.parameterTypes[1] != List::class.java
                        } ?: dexHelper.findMethodUsingString(
                            "activity://main/preference",
                            true,
                            -1,
                            -1,
                            null,
                            homeUserCenterIndex,
                            null,
                            longArrayOf(contextIndex, listIndex),
                            null,
                            true
                        ).asSequence().firstNotNullOfOrNull {
                            dexHelper.decodeMethodIndex(it)
                        } ?: dexHelper.findMethodUsingString(
                            "bilibili://main/preference",
                            true,
                            -1,
                            -1,
                            null,
                            homeUserCenterIndex,
                            null,
                            longArrayOf(contextIndex, listIndex),
                            null,
                            true
                        ).asSequence().firstNotNullOfOrNull {
                            dexHelper.decodeMethodIndex(it)
                        } ?: return@settings
                        homeUserCenter += homeUserCenter {
                            class_ = class_ { name = homeUserCenterClass.name }
                            addSetting = method { name = addSettingMethod.name }
                        }
                    }
            }
            drawer = drawer {
                val navigationViewClass =
                    "android.support.design.widget.NavigationView" from classloader
                val regex = Regex("^tv\\.danmaku\\.bili\\.ui\\.main2\\.[^.]*$")
                class_ = class_ {
                    name = classesList.filter {
                        it.startsWith("tv.danmaku.bili.ui.main2")
                    }.filter { it.matches(regex) }.firstOrNull { c ->
                        c.findClass(classloader).declaredFields.any {
                            it.type == navigationViewClass
                        }
                    } ?: return@class_
                }
                val drawerLayoutClass = "androidx.drawerlayout.widget.DrawerLayout" from classloader
                    ?: "android.support.v4.widget.DrawerLayout" from classloader ?: return@drawer
                layout = class_ { name = drawerLayoutClass.name }
                layoutParams = class_ {
                    name = drawerLayoutClass.declaredClasses.firstOrNull {
                        it.superclass == ViewGroup.MarginLayoutParams::class.java
                    }?.name ?: return@class_
                }
                try {
                    open = method {
                        name = drawerLayoutClass.getMethod(
                            "openDrawer",
                            View::class.java,
                            Boolean::class.javaPrimitiveType
                        ).name ?: throw Throwable()
                    }
                    close = method {
                        name = drawerLayoutClass.getMethod(
                            "closeDrawer",
                            View::class.java,
                            Boolean::class.javaPrimitiveType
                        ).name ?: throw Throwable()
                    }
                } catch (e: Throwable) {
                    val a = drawerLayoutClass.declaredMethods.filter {
                        Modifier.isPublic(it.modifiers) &&
                                it.parameterTypes.size == 2 && it.parameterTypes[0] == View::class.java &&
                                it.parameterTypes[1] == Boolean::class.javaPrimitiveType
                    }.map { it.name }.toTypedArray()
                    if (a.size == 2) {
                        open = method { name = a[0] }
                        close = method { name = a[1] }
                    }
                }
                isOpen = method {
                    name = runCatchingOrNull {
                        drawerLayoutClass.getMethod("isDrawerOpen", View::class.java).name
                    } ?: drawerLayoutClass.declaredMethods.firstOrNull {
                        Modifier.isPublic(it.modifiers) &&
                                it.parameterTypes.size == 1 && it.parameterTypes[0] == View::class.java &&
                                it.returnType == Boolean::class.javaPrimitiveType
                    }?.name ?: return@method
                }
            }
            downloadThread = downloadThread {
                val viewHostClass = (if (platform == "android_hd")
                    "tv.danmaku.bili.ui.offline.HdOfflineDowningFragment".from(classloader)
                else
                    "tv.danmaku.bili.ui.offline.DownloadingActivity".from(classloader))
                    ?: return@downloadThread
                viewHost = class_ { name = viewHostClass.name }
                field = field {
                    name = viewHostClass.declaredFields.find {
                        it.type == Int::class.javaPrimitiveType
                    }?.name ?: return@downloadThread
                }
                val onTaskCountClickMethod = viewHostClass.declaredMethods.find { m ->
                    m.isSynthetic && m.parameterTypes.let {
                        it.size == 4 && if (platform == "android_hd") {
                            it[0] == TextView::class.java && it[1] == viewHostClass
                        } else it[0] == viewHostClass && it[1] == TextView::class.java
                    }
                } ?: return@downloadThread
                val listenerClass = dexHelper.findMethodInvoked(
                    dexHelper.encodeMethodIndex(onTaskCountClickMethod),
                    -1,
                    1,
                    "VL",
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.let {
                    dexHelper.decodeMethodIndex(it)
                }?.declaringClass ?: return@downloadThread
                listener = class_ { name = listenerClass.name }
                val reportMethod = dexHelper.findMethodUsingString(
                    "meantime",
                    false,
                    -1,
                    -1,
                    null,
                    dexHelper.encodeClassIndex(viewHostClass),
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.run {
                    dexHelper.findMethodInvoking(
                        this,
                        -1,
                        2,
                        "VLI",
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).firstOrNull()?.let {
                        dexHelper.decodeMethodIndex(it)
                    }
                } ?: return@downloadThread
                reportDownload = reportDownload {
                    class_ = class_ { name = reportMethod.declaringClass.name }
                    method = method { name = reportMethod.name }
                }
            }
            bangumiParams = bangumiParams {
                val bangumiParamsClass = dexHelper.findMethodUsingString(
                    "UniformSeasonParams(",
                    true,
                    -1,
                    0,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.let {
                    dexHelper.decodeMethodIndex(it)
                }?.declaringClass ?: return@bangumiParams
                class_ = class_ { name = bangumiParamsClass.name }
                paramsToMap = method {
                    name = bangumiParamsClass.declaredMethods.firstOrNull {
                        it.returnType == java.util.Map::class.java
                    }?.name ?: return@method
                }
            }
            gsonHelper = gsonHelper {
                val gsonClass = dexHelper.findMethodUsingString(
                    "AssertionError (GSON",
                    true,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                }?.declaringClass ?: return@gsonHelper
                val gsonConverterClass =
                    dexHelper.findField(dexHelper.encodeClassIndex(gsonClass), null, false)
                        .asSequence().firstNotNullOfOrNull {
                            dexHelper.decodeFieldIndex(it)?.takeIf { f ->
                                f.isStatic && f.isFinal && f.isPublic
                            }?.declaringClass?.takeIf { c ->
                                c.declaredMethods.any { m ->
                                    m.returnType == gsonClass && m.isNotStatic
                                }
                            }
                        } ?: return@gsonHelper
                gsonConverter = class_ { name = gsonConverterClass.name }
                gson = field {
                    name = gsonConverterClass.declaredMethods.firstOrNull { m ->
                        m.returnType == gsonClass && m.isNotStatic
                    }?.name ?: return@field
                }
                toJson = method {
                    name = gsonClass.declaredMethods.firstOrNull { m ->
                        m.returnType == String::class.java && m.parameterTypes.size == 1 && m.parameterTypes[0] == Object::class.java
                    }?.name ?: return@method
                }
                fromJson = method {
                    name = gsonClass.declaredMethods.firstOrNull { m ->
                        m.returnType == Object::class.java && m.parameterTypes.size == 2 && m.parameterTypes[0] == String::class.java && m.parameterTypes[1] == Class::class.java
                    }?.name ?: return@method
                }
            }
            playerCoreService = playerCoreService {
                val seekToMethod = dexHelper.findMethodUsingString(
                    "[player]seek to",
                    true,
                    -1,
                    1,
                    "VI",
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                } ?: run {
                    val doSeekToIndex = dexHelper.findMethodUsingString(
                        "[player]seek to",
                        true,
                        -1,
                        2,
                        "VIZ",
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).firstOrNull() ?: return@playerCoreService
                    val doSeekToMethod =
                        dexHelper.decodeMethodIndex(doSeekToIndex) ?: return@playerCoreService
                    val playerCoreServiceIndex =
                        dexHelper.encodeClassIndex(doSeekToMethod.declaringClass)
                    dexHelper.findMethodInvoked(
                        doSeekToIndex,
                        -1,
                        1,
                        "VI",
                        playerCoreServiceIndex,
                        null,
                        null,
                        null,
                        true
                    ).asSequence().firstNotNullOfOrNull {
                        dexHelper.decodeMethodIndex(it)
                    } ?: run {
                        dexHelper.findMethodInvoked(
                            doSeekToIndex,
                            -1,
                            2,
                            "VIZ",
                            playerCoreServiceIndex,
                            null,
                            null,
                            null,
                            true
                        ).asSequence().firstNotNullOfOrNull {
                            dexHelper.decodeMethodIndex(it)
                        }
                    } ?: doSeekToMethod
                }
                val playerCoreServiceClass = seekToMethod.declaringClass
                seekTo = method { name = seekToMethod.name }
                class_ = class_ { name = playerCoreServiceClass.name }
                val onSeekCompleteMethod = dexHelper.findMethodUsingString(
                    "[player]seek complete",
                    true,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                } ?: return@playerCoreService
                onSeekComplete = method { name = onSeekCompleteMethod.name }
                seekCompleteListener =
                    class_ { name = onSeekCompleteMethod.declaringClass.name }
                getPlaybackSpeed = method {
                    name = dexHelper.findMethodUsingString(
                        "player_key_video_speed",
                        true,
                        -1,
                        1,
                        "FZ",
                        dexHelper.encodeClassIndex(playerCoreServiceClass),
                        null,
                        null,
                        null,
                        true
                    ).asSequence().firstNotNullOfOrNull {
                        dexHelper.decodeMethodIndex(it)
                    }?.name ?: return@method
                }
            }
            val playSpeedManagerClass = ("com.bilibili.player.tangram.basic.PlaySpeedManagerImpl" from classloader) ?: run {
                val pcsFacadeClass = dexHelper.findMethodUsingString(
                        "Cannot switch to quality ",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                }?.declaringClass ?: return@run null

                val playSpeedManagerInterface = pcsFacadeClass.declaredFields.firstNotNullOfOrNull { f ->
                    if (f.type.isInterface && f.type.declaredMethods.size == 1) f.type else null
                }
                classesList.filter {
                    it.startsWith("com.bilibili.player.tangram")
                }.firstNotNullOfOrNull { c ->
                    c.findClass(classloader).takeIf { it.interfaces.contains(playSpeedManagerInterface) }
                }
            }
            playSpeedManager = class_ {
                name = playSpeedManagerClass?.name ?: return@class_
            }
            generalResponse = class_ {
                name = "com.bilibili.okretro.GeneralResponse"
            }
            pegasusFeed = pegasusFeed {
                val fastJSONObject =
                    dexHelper.encodeClassIndex(
                        "com.alibaba.fastjson.JSONObject" from classloader ?: return@pegasusFeed
                    )
                val pegasusFeedClass = dexHelper.findMethodUsingString(
                    "card_type is empty",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    longArrayOf(fastJSONObject),
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                }?.declaringClass ?: return@pegasusFeed
                class_ = class_ { name = pegasusFeedClass.name }
                method = method {
                    name = pegasusFeedClass.declaredMethods.firstOrNull {
                        it.parameterTypes.size == 1 && it.parameterTypes[0].name == this@hookInfo.okHttp.responseBody.class_.name
                                && it.returnType != Object::class.java
                    }?.name ?: return@method
                }
            }
            popular = popular {
                class_ = class_ { name = "com.bapis.bilibili.app.show.popular.v1.PopularMoss" }
                method = method {
                    name = "index"
                }
            }
            chronosSwitch = class_ {
                val regex = Regex("""^tv\.danmaku\.chronos\.wrapper\.[^.]*$""")
                name = classesList.filter {
                    it.matches(regex)
                }.firstOrNull { c ->
                    c.findClass(classloader).declaredFields.count {
                        it.type == Boolean::class.javaObjectType
                    } >= 5
                } ?: return@class_
            }
            subtitleSpan = class_ {
                name = classesList.filter {
                    it.startsWith("tv.danmaku.danmaku.subititle") ||
                            it.startsWith("tv.danmaku.danmaku.subtitle")
                }.firstOrNull { c ->
                    c.findClass(classloader).interfaces.contains(LineBackgroundSpan::class.java)
                } ?: return@class_
            }
            val commentSpanClass = "com.bilibili.app.comm.comment2.widget.CommentExpandableTextView"
                .from(classloader) ?: dexHelper.findMethodUsingString(
                "comment.catch_on_draw_exception",
                false,
                -1,
                -1,
                null,
                -1,
                null,
                null,
                null,
                true
            ).asSequence().firstNotNullOfOrNull {
                dexHelper.decodeMethodIndex(it)
            }?.declaringClass
            commentSpan = class_ {
                name = commentSpanClass?.name ?: return@class_
            }
            val viewIndex = dexHelper.encodeClassIndex(View::class.java)
            commentLongClick = class_ {
                val onLongClickListenerIndex = dexHelper.encodeMethodIndex(
                    View::class.java.getDeclaredMethod(
                        "setOnLongClickListener",
                        View.OnLongClickListener::class.java
                    )
                )
                name = dexHelper.findMethodInvoked(
                    onLongClickListenerIndex,
                    -1,
                    2,
                    "VLL",
                    -1,
                    longArrayOf(viewIndex, -1),
                    null,
                    null,
                    false
                ).firstOrNull {
                    dexHelper.decodeMethodIndex(it)?.run {
                        this !is Constructor<*> && isStatic && isPublic && (this as? Method)?.parameterTypes.let { t ->
                            t?.get(0) == View::class.java && t[1] != CharSequence::class.java
                        }
                    } == true
                }?.let {
                    dexHelper.findMethodInvoking(it, -1, 2, "VLL", -1, null, null, null, false)
                        .asSequence()
                        .firstNotNullOfOrNull { m -> dexHelper.decodeMethodIndex(m) }?.declaringClass?.name
                } ?: return@class_
            }
            commentLongClickNew = class_ {
                val setExpandLinesMethod = commentSpanClass?.declaredMethods?.find {
                    it.parameterTypes.size == 1 && it.parameterTypes[0] == Int::class.javaPrimitiveType
                } ?: return@class_
                val setExpandLinesIndex = dexHelper.encodeMethodIndex(setExpandLinesMethod)
                name = dexHelper.findMethodInvoked(
                    setExpandLinesIndex,
                    -1,
                    1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.let {
                    dexHelper.findMethodInvoking(it, -1, 2, "VLL", -1, null, null, null, true)
                        .map { m -> dexHelper.decodeMethodIndex(m) }
                        .firstOrNull()?.declaringClass?.name
                } ?: return@class_
            }
            okio = okIO {
                val responseClassIndex =
                    dexHelper.encodeClassIndex(responseBodyClass ?: return@okIO)
                val createMethodIndex = dexHelper.findMethodUsingString(
                    "source == null",
                    false,
                    -1,
                    -1,
                    null,
                    responseClassIndex,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull() ?: return@okIO
                val wrapperClass = dexHelper.findMethodInvoking(
                    createMethodIndex,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    false
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it).takeIf { m ->
                        m is Constructor<*>
                    }
                }?.declaringClass ?: return@okIO
                class_ = class_ { name = wrapperClass.name }
                val okioField = wrapperClass.declaredFields.firstOrNull { f ->
                    f.type.isAbstract
                } ?: return@okIO
                field = field { name = okioField.name }
                val okioLenField = wrapperClass.declaredFields.firstOrNull { f ->
                    f.type == Long::class.javaPrimitiveType
                } ?: return@okIO
                length = field { name = okioLenField.name }
            }
            okioBuffer = okIOBuffer {
                val okioBufferClass = dexHelper.findMethodUsingString(
                    "already attached to a buffer",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    false
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it)
                }.firstNotNullOfOrNull {
                    val method = it as? Method ?: return@firstNotNullOfOrNull null
                    val firstParameterType = method.parameterTypes.firstOrNull()
                    val returnType = method.returnType
                    when {
                        method.declaringClass?.name?.startsWith("okio") != true -> null
                        // https://github.com/square/okio/blob/okio-parent-2.0.0-RC1/okio/jvm/src/main/java/okio/Buffer.kt#L1717
                        firstParameterType == null || firstParameterType == returnType -> it.declaringClass
                        // https://github.com/square/okio/blob/parent-2.10.0/okio/src/commonMain/kotlin/okio/internal/Buffer.kt#L1509
                        else -> firstParameterType
                    }
                } ?: return@okIOBuffer
                class_ = class_ { name = okioBufferClass.name }
                val okioInputStreamMethod = okioBufferClass.declaredMethods.firstOrNull {
                    it.parameterTypes.isEmpty() && it.returnType == InputStream::class.java
                } ?: return@okIOBuffer
                inputStream = method { name = okioInputStreamMethod.name }
                val okioReadFromMethod = okioBufferClass.declaredMethods.firstOrNull {
                    it.parameterTypes.size == 1 && it.parameterTypes[0] == InputStream::class.java
                } ?: return@okIOBuffer
                readFrom = method { name = okioReadFromMethod.name }
            }
            classesList.filter {
                it.startsWith("com.bilibili.bplus.followinglist.module.item")
                        && View.OnLongClickListener::class.java.isAssignableFrom(it.on(classloader))
            }.let { l -> dynDescHolderListener.addAll(l.toList().map { class_ { name = it } }) }
            descCopy = descCopy {
                classesList.filter {
                    it.startsWith("com.bilibili.ship.theseus.ugc.intro.ugcheadline.UgcIntroductionComponent")
                }.map { it.on(classloader) }.flatMap { c ->
                    c.declaredMethods.filter {
                        it.isPublic && it.parameterCount == 2 && it.parameterTypes[0] == View::class.java && it.parameterTypes[1] == ClickableSpan::class.java
                    }
                }.forEach {
                    classes += class_ { name = it.declaringClass.name }
                    methods += method { name = it.name }
                }

                val descViewHolderClass = dexHelper.findMethodUsingString(
                    "AV%d",
                    false,
                    -1,
                    0,
                    "V",
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                }?.declaringClass ?: return@descCopy
                val descViewHolderIndex = dexHelper.encodeClassIndex(descViewHolderClass)
                val copyMethodIndex = dexHelper.findMethodUsingString(
                    "clipboard",
                    false,
                    -1,
                    -1,
                    null,
                    descViewHolderIndex,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull() ?: return@descCopy
                val toCopyMethodIndex = dexHelper.findMethodInvoked(
                    copyMethodIndex,
                    -1,
                    3,
                    "VLZL",
                    descViewHolderIndex,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull() ?: return@descCopy
                val clickableSpanIndex = dexHelper.encodeClassIndex(ClickableSpan::class.java)
                dexHelper.findMethodInvoked(
                    toCopyMethodIndex,
                    -1,
                    2,
                    "VLL",
                    -1,
                    longArrayOf(viewIndex, clickableSpanIndex),
                    null,
                    null,
                    false
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it)
                }.forEach {
                    classes += class_ { name = it.declaringClass.name }
                    methods += method { name = it.name }
                }
            }
            comment3Copy = comment3Copy {
                classesList.filter {
                    it.startsWith("com.bilibili.app.comment3.ui.holder.handle.CommentContentRichTextHandler")
                }.map { it.on(classloader) }.flatMap { c ->
                    c.declaredMethods.filter {
                        (it.isPrivate && it.parameterCount == 6 && it.parameterTypes[5] == View::class.java) ||
                                (it.isPrivate && it.parameterCount == 3 && it.parameterTypes[2] == View::class.java)
                    }
                }.firstOrNull()?.let {
                    Log.d(it.declaringClass.name + it.name)
                    class_ = class_ { name = it.declaringClass.name }
                    method = method { name = it.name }
                    comment3ViewIndex = it.parameterCount - 1
                }
            }
            dexHelper.findMethodUsingString(
                "BangumiAllButton",
                true, -1, 0, null, -1, null, null, null, true
            ).firstOrNull()?.let {
                dexHelper.decodeMethodIndex(it)
            }?.declaringClass?.declaringClass?.let {
                bangumiSeason = class_ { name = it.name }
                bangumiSeasonActivityEntrance = method {
                    name = it.declaredMethods.firstOrNull {
                        it.parameterTypes.isEmpty() && it.genericReturnType.toString()
                            .contains("ActivityEntrance")
                    }?.name ?: return@method
                }
            }
            kanBan = kanBan {
                val statusClass =
                    "tv.danmaku.bili.ui.kanban.KanBanUserStatus".findClassOrNull(classloader)
                        ?: return@kanBan
                statusClass.runCatchingOrNull {
                    getDeclaredMethod("isUseKanBan")
                }?.let {
                    dexHelper.findMethodInvoked(
                        dexHelper.encodeMethodIndex(it),
                        -1,
                        1,
                        "VL",
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).firstOrNull()
                }?.let {
                    dexHelper.decodeMethodIndex(it)
                }?.let {
                    class_ = class_ { name = it.declaringClass.name }
                    method = method { name = it.name }
                }
            }
            toastHelper = toastHelper {
                val showToastCallerIndex = dexHelper.findMethodUsingString(
                    "main.lessonmodel.enterdetail.change-pswd-success.click",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull() ?: return@toastHelper
                val contextIndex = dexHelper.encodeClassIndex(Context::class.java)
                val stringIndex = dexHelper.encodeClassIndex(String::class.java)
                val showToastMethod = dexHelper.findMethodInvoking(
                    showToastCallerIndex,
                    -1,
                    3,
                    "VLLI",
                    -1,
                    longArrayOf(contextIndex, stringIndex, -1),
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                } ?: return@toastHelper
                val toastHelperClass = showToastMethod.declaringClass
                class_ = class_ { name = toastHelperClass.name }
                show = method { name = showToastMethod.name }
                cancel = method {
                    name = toastHelperClass.declaredMethods.firstOrNull {
                        it.isStatic && it.parameterTypes.isEmpty()
                    }?.name ?: return@method
                }
            }
            brotliInputStream = class_ {
                name = dexHelper.findMethodUsingString(
                    "Brotli decoder initialization failed",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                }?.declaringClass?.name ?: return@class_
            }
            dexHelper.findMethodUsingString(
                "player.player.story-button.0.player",
                false,
                -1,
                -1,
                null,
                -1,
                null,
                null,
                null,
                false
            ).asSequence().mapNotNull {
                val clazz = dexHelper.decodeMethodIndex(it)?.declaringClass
                val method = clazz?.declaredMethods?.find { m ->
                    m.isStatic && m.parameterTypes.size == 1 && m.parameterTypes[0] == clazz && m.returnType == Boolean::class.javaPrimitiveType
                }
                if (clazz != null && method != null) {
                    playerFullStoryWidget {
                        class_ = class_ { name = clazz.name }
                        this.method = method { name = method.name }
                    }
                } else null
            }.let { playerFullStoryWidget.addAll(it.toList()) }
            biliCall = biliCall {
                val biliCallClass = "com.bilibili.okretro.call.BiliCall".from(classloader)
                    ?: dexHelper.findMethodUsingString(
                        "Any arguments of BiliCall constructor can not be null",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).asSequence().firstNotNullOfOrNull {
                        dexHelper.decodeMethodIndex(it)
                    }?.declaringClass ?: return@biliCall
                val setParserMethod = biliCallClass.methods.find {
                    it.parameterTypes.size == 1 && it.parameterTypes[0].let { c ->
                        c.isInterface && c.interfaces.size == 1 && c.interfaces[0].declaredMethods.size == 1
                    }
                } ?: return@biliCall
                val requestFiled = biliCallClass.declaredFields.find {
                    it.type.name == this@hookInfo.okHttp.request.class_.name
                } ?: return@biliCall
                class_ = class_ { name = biliCallClass.name }
                parser = class_ { name = setParserMethod.parameterTypes[0].name }
                setParser = method { name = setParserMethod.name }
                request = field { name = requestFiled.name }
            }
            biliConfig = biliConfig {
                val biliConfigClass = "com.bilibili.api.BiliConfig".from(classloader)
                    ?: dexHelper.findMethodUsingString(
                        "Call BiliConfig.init() first!",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).asSequence().firstNotNullOfOrNull {
                        dexHelper.decodeMethodIndex(it)
                    }?.declaringClass ?: return@biliConfig
                class_ = class_ {
                    name = biliConfigClass.name
                }
                val biliConfigClassIdx = dexHelper.encodeClassIndex(biliConfigClass)
                val loginMethodIdx = dexHelper.findMethodUsingString(
                    "url_find_pwd_no_sms",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstOrNull() ?: return@biliConfig
                dexHelper.findMethodInvoking(
                    loginMethodIdx,
                    -1,
                    0,
                    null,
                    biliConfigClassIdx,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                }?.let {
                    getAppKey = method { name = it.name }
                }
            }
            dexHelper.findMethodUsingString(
                "im.chat-group.msg.repost.click",
                false,
                -1,
                -1,
                null,
                -1,
                null,
                null,
                null,
                true
            ).asSequence().firstNotNullOfOrNull {
                dexHelper.decodeMethodIndex(it) as? Method
            }?.let {
                val getContentStringMethod = it.parameterTypes[1].declaredMethods.find { m ->
                    m.returnType == String::class.java && m.parameterTypes.isEmpty()
                } ?: return@let
                onOperateClick = method { name = it.name }
                getContentString = method { name = getContentStringMethod.name }
            }
            livePagerRecyclerView = class_ {
                val liveVerticalPagerView =
                    "com.bilibili.bililive.room.ui.roomv3.vertical.widget.LiveVerticalPagerView"
                        .from(classloader) ?: return@class_
                name = liveVerticalPagerView.declaredFields.find {
                    View::class.java.isAssignableFrom(it.type)
                }?.type?.name ?: return@class_
            }
            updateInfoSupplier = updateInfoSupplier {
                val checkMethod = dexHelper.findMethodUsingString(
                    "Do sync http request.",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.let {
                    dexHelper.decodeMethodIndex(it)
                } ?: return@updateInfoSupplier
                class_ = class_ { name = checkMethod.declaringClass.name }
                check = method { name = checkMethod.name }
            }
            playerPreloadHolder = playerPreloadHolder {
                dexHelper.findMethodUsingString(
                    "preloadKey is null",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.run {
                    val stringClassIndex = dexHelper.encodeClassIndex(String::class.java)
                    dexHelper.findMethodInvoking(
                        this,
                        stringClassIndex,
                        2,
                        "LLL",
                        -1,
                        null,
                        longArrayOf(stringClassIndex),
                        null,
                        true
                    ).firstOrNull()?.let {
                        dexHelper.decodeMethodIndex(it)
                    }
                }?.let {
                    class_ = class_ { name = it.declaringClass.name }
                    get = method { name = it.name }
                    return@playerPreloadHolder
                }
                // 粉版 7.39.0+
                val geminiPreloadClass = dexHelper.findMethodUsingString(
                    "PreloadData(type=",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.let {
                    dexHelper.decodeMethodIndex(it)?.declaringClass?.declaringClass
                } ?: return@playerPreloadHolder
                geminiPreloadClass.declaredMethods.firstOrNull {
                    it.isPublic && it.parameterTypes.count() == 1
                }?.let {
                    class_ = class_ { name = it.declaringClass.name }
                    get = method { name = it.name }
                }
            }
            dexHelper.findMethodUsingString(
                "player.unite_login_qn",
                false,
                -1,
                -1,
                null,
                -1,
                null,
                null,
                null,
                false
            ).asSequence().mapNotNull {
                dexHelper.decodeMethodIndex(it)?.let { m ->
                    playerQualityService {
                        class_ = class_ { name = m.declaringClass.name }
                        getDefaultQnThumb = method { name = m.name }
                    }
                }
            }.let { playerQualityService.addAll(it.toList()) }
            playerSettingHelper = playerSettingHelper {
                val getDefaultQnMethod = dexHelper.findMethodUsingString(
                    "quality settings:",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.let {
                    dexHelper.decodeMethodIndex(it)
                } ?: return@playerSettingHelper
                class_ = class_ { name = getDefaultQnMethod.declaringClass.name }
                getDefaultQn = method { name = getDefaultQnMethod.name }
            }
            val autoSupremumQualityClass = dexHelper.findMethodUsingString(
                "AutoSupremumQuality(loginHalfScreen=",
                false,
                -1,
                -1,
                null,
                -1,
                null,
                null,
                null,
                true
            ).asSequence().firstNotNullOfOrNull {
                dexHelper.decodeMethodIndex(it)
            }?.declaringClass?.also {
                autoSupremumQuality = autoSupremumQuality {
                    class_ = class_ {
                        name = it.name
                    }
                }
            }
            qualityStrategyProvider = qualityStrategyProvider {
                val buildStrategyMethod = dexHelper.findMethodUsingString(
                    "Quality Strategy share:",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)
                } ?: return@qualityStrategyProvider
                val providerClass = buildStrategyMethod.declaringClass
                val selectQualityMethod = providerClass.declaredMethods.asSequence().filter {
                    it.parameterCount == 3 && it.parameterTypes.contentEquals(
                        arrayOf(
                            autoSupremumQualityClass,
                            Boolean::class.javaPrimitiveType,
                            Boolean::class.javaPrimitiveType
                        )
                    )
                }.firstNotNullOfOrNull { method ->
                    val methodIdx = dexHelper.encodeMethodIndex(method)
                    val isConnectedMethods = dexHelper.findMethodInvoking(
                        methodIdx,
                        dexHelper.encodeClassIndex(Int::class.javaPrimitiveType!!),
                        1,
                        null,
                        -1,
                        longArrayOf(dexHelper.encodeClassIndex(Context::class.java)),
                        null,
                        null,
                        true
                    )
                    if (isConnectedMethods.isEmpty()) method else null
                } ?: return@qualityStrategyProvider
                class_ = class_ { name = providerClass.name }
                selectQuality = method { name = selectQualityMethod.name }
            }
            liveRtcHelper = liveRtcHelper {
                val liveRtcEnable = dexHelper.findMethodUsingString(
                    "systemSupportLiveP2P",
                    true,
                    dexHelper.encodeClassIndex(Boolean::class.java),
                    0,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.let {
                    dexHelper.decodeMethodIndex(it)
                } ?: return@liveRtcHelper
                liveRtcEnableClass = class_ { name = liveRtcEnable.declaringClass.name }
                liveRtcEnableMethod = method { name = liveRtcEnable.name }
            }
            val themeColorsClass = dexHelper.findMethodUsingString(
                "GarbThemeColors(garb=",
                false,
                -1,
                -1,
                null,
                -1,
                null,
                null,
                null,
                true
            ).firstOrNull()?.let {
                dexHelper.decodeMethodIndex(it)
            }?.declaringClass?.also {
                themeColors = class_ { name = it.name }
            }
            builtInThemes = builtInThemes {
                val themeColorsConstIdx = themeColorsClass?.declaredConstructors?.maxByOrNull {
                    it.parameterTypes.size
                }?.let { dexHelper.encodeMethodIndex(it) } ?: return@builtInThemes
                val clazz = dexHelper.findMethodInvoked(
                    themeColorsConstIdx,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.run {
                    dexHelper.findMethodInvoking(
                        this,
                        dexHelper.encodeClassIndex(Map::class.java),
                        0,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        true
                    ).firstOrNull()?.let {
                        dexHelper.decodeMethodIndex(it)
                    }
                }?.declaringClass ?: return@builtInThemes
                val field = clazz.declaredFields.firstOrNull {
                    it.type == Map::class.java
                } ?: return@builtInThemes
                class_ = class_ { name = clazz.name }
                all = field { name = field.name }
            }
            biliGlobalPreference = biliGlobalPreference {
                val clazz = "com.bilibili.base.BiliGlobalPreferenceHelper".from(classloader)
                    ?: dexHelper.findMethodUsingString(
                        "instance.bili_preference",
                        false,
                        -1,
                        -1,
                        null,
                        -1,
                        null,
                        null,
                        null,
                        false
                    ).asSequence().firstNotNullOfOrNull { idx ->
                        dexHelper.decodeMethodIndex(idx)?.declaringClass?.takeIf { !it.superclass.isAbstract }
                    } ?: return@biliGlobalPreference
                val method = clazz.declaredMethods.firstOrNull {
                    it.isStatic && it.parameterTypes.isEmpty() && it.returnType == SharedPreferences::class.java
                } ?: return@biliGlobalPreference
                class_ = class_ { name = clazz.name }
                get = method { name = method.name }
            }
            cardClickProcessor = cardClickProcessor {
                val method = dexHelper.findMethodUsingString(
                    "action:feed:dislike_reason",
                    false,
                    -1,
                    5,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).firstOrNull()?.let {
                    dexHelper.decodeMethodIndex(it)
                } ?: return@cardClickProcessor
                class_ = class_ { name = method.declaringClass.name }
                onFeedClicked = method { name = method.name }
            }
            dexHelper.findMethodUsingString(
                "PublishToFollowingConfig(visible=",
                false,
                -1,
                -1,
                null,
                -1,
                null,
                null,
                null,
                true
            ).firstOrNull()?.let {
                dexHelper.decodeMethodIndex(it)?.declaringClass
            }?.let {
                publishToFollowingConfig = class_ { name = it.name }
            }

            continuation = continuation {
                val continuationImpl = dexHelper.findMethodUsingString(
                    "create(Continuation) has not been overridden",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)?.declaringClass
                } ?: return@continuation
                val continuation = continuationImpl.interfaces.firstOrNull() ?: return@continuation
                class_ = class_ { name = continuation.name }
            }
            vipQualityTrialService = vipQualityTrialService {
                val serviceClass = dexHelper.findMethodUsingString(
                    "go to buy vip: ",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    false
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it)?.declaringClass
                }.firstOrNull {
                    it.name.startsWith("com.bilibili")
                } ?: return@vipQualityTrialService
                val canTrialMethod = serviceClass.declaredMethods.asSequence().filter {
                    it.returnType == Boolean::class.javaPrimitiveType && it.parameterCount == 0
                }.firstNotNullOfOrNull { candidate ->
                    val getTrialInfoMethods = dexHelper.findMethodInvoking(
                        dexHelper.encodeMethodIndex(candidate),
                        -1,
                        0,
                        null,
                        dexHelper.encodeClassIndex(serviceClass),
                        null,
                        null,
                        null,
                        true
                    )
                    if (getTrialInfoMethods.isNotEmpty()) candidate else null
                } ?: return@vipQualityTrialService
                class_ = class_ { name = serviceClass.name }
                canTrial = method { name = canTrialMethod.name }
            }
            liveQuality = liveQuality {
                val utilClass = dexHelper.findMethodUsingString(
                    "select 秒开 play url --codec:",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).map {
                    dexHelper.decodeMethodIndex(it)?.declaringClass
                }.firstOrNull() ?: return@liveQuality
                val selectorDataClass = dexHelper.findMethodUsingString(
                    "LiveUrlSelectorData(playUrl=",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).map {
                    dexHelper.decodeMethodIndex(it)?.declaringClass
                }.firstOrNull() ?: return@liveQuality
                val buildSelectorDataMethod = utilClass.declaredMethods.firstOrNull {
                    it.returnType == selectorDataClass && it.parameterCount == 1 && it.parameterTypes[0] == Uri::class.java
                } ?: return@liveQuality
                val switchAutoMethod = dexHelper.findMethodUsingString(
                    "switchAuto ",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).map {
                    dexHelper.decodeMethodIndex(it)
                }.firstOrNull() ?: return@liveQuality
                val interceptorClass = dexHelper.findMethodUsingString(
                    "inject common param to body failure : ",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).map {
                    dexHelper.decodeMethodIndex(it)?.declaringClass
                }.firstOrNull() ?: return@liveQuality
                val interceptMethod = interceptorClass.declaredMethods.firstOrNull {
                    it.isPublic && it.parameterCount == 1 && it.returnType == it.parameterTypes[0]
                } ?: return@liveQuality
                selectUtil = livePlayUrlSelectUtil {
                    class_ = class_ { name = utilClass.name }
                    buildSelectorData = method { name = buildSelectorDataMethod.name }
                }
                sourceService = liveRTCSourceServiceImpl {
                    class_ = class_ { name = switchAutoMethod.declaringClass.name }
                    switchAuto = method { name = switchAutoMethod.name }
                }
                interceptor = defaultRequestIntercept {
                    class_ = class_ { name = interceptorClass.name }
                    intercept = method { name = interceptMethod.name }
                }
            }
            preBuiltConfig = preBuiltConfig {
                val getMap = dexHelper.findMethodUsingString(
                    "/config.json",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().mapNotNull { dexHelper.decodeMethodIndex(it) }.firstOrNull()
                    ?: return@preBuiltConfig
                class_ = class_ { name = getMap.declaringClass.name }
                get = method { name = getMap.name }
            }
            dataSP = dataSP {
                val spxClass =
                    ("com.bilibili.lib.blkv.SharedPrefX" from classloader) ?: return@dataSP
                val blkvClass = ("com.bilibili.lib.blkv.BLKV" from classloader) ?: return@dataSP
                val getBLSP = runCatchingOrNull {
                    blkvClass.getDeclaredMethod(
                        "getBLSharedPreferences",
                        Context::class.java,
                        File::class.java,
                        Boolean::class.javaPrimitiveType,
                        Int::class.javaPrimitiveType
                    )
                } ?: return@dataSP
                val getDataSP = dexHelper.findMethodInvoked(
                    dexHelper.encodeMethodIndex(getBLSP),
                    dexHelper.encodeClassIndex(spxClass),
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    false
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it)
                }.firstOrNull {
                    Log.d(it)
                    it.declaringClass.name.startsWith("com.bilibili.lib.blconfig.internal.TypedContext")
                } ?: return@dataSP
                class_ = class_ { name = getDataSP.declaringClass.name }
                get = method { name = getDataSP.name }
            }
            pegasusParser = class_ {
                val getPegasusParser = dexHelper.findMethodUsingString(
                    "[Pegasus]PegasusParser",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().mapNotNull { dexHelper.decodeMethodIndex(it) }.firstOrNull()
                    ?: return@class_
                name = getPegasusParser.declaringClass.name
            }
            resolveClientCompanion = resolveClientCompanion {
                val resolveClientClass = dexHelper.findMethodUsingString(
                    "Invalid segment id: %s, segment list size:%s",
                    false,
                    -1,
                    -1,
                    null,
                    -1,
                    null,
                    null,
                    null,
                    true
                ).asSequence().firstNotNullOfOrNull {
                    dexHelper.decodeMethodIndex(it)?.declaringClass
                } ?: return@resolveClientCompanion
                val resolveClientCompanionClass = "${resolveClientClass.name}\$a".from(classloader)
                    ?: return@resolveClientCompanion
                val paramsClass =
                    "com.bilibili.app.gemini.base.player.GeminiCommonResolverParams".from(
                        classloader
                    )
                val videoDownloadEntryClass =
                    "com.bilibili.videodownloader.model.VideoDownloadEntry".from(classloader)
                val buildParamsMethod = resolveClientCompanionClass.declaredMethods.firstOrNull {
                    it.returnType == paramsClass && it.parameterCount == 1 && it.parameterTypes[0] == videoDownloadEntryClass
                } ?: return@resolveClientCompanion
                class_ = class_ { name = resolveClientCompanionClass.name }
                buildCommonResolverParams = method { name = buildParamsMethod.name }
            }
            gCommonResolverParams = gCommonResolverParams {
                val commonResolverParamsClass =
                    "com.bilibili.app.gemini.base.player.GeminiCommonResolverParams".from(
                        classloader
                    ) ?: return@gCommonResolverParams
                val setExtraContentMethod = commonResolverParamsClass.declaredMethods?.firstOrNull {
                    it.returnType == Void.TYPE && it.parameterCount == 1 && it.parameterTypes[0] == Map::class.java
                } ?: return@gCommonResolverParams
                class_ = class_ { name = commonResolverParamsClass.name }
                setExtraContent = method { name = setExtraContentMethod.name }
            }
            rewardAd = rewardAd {
                val rewardAdActivityClass =
                    "com.bilibili.ad.reward.RewardAdActivity".from(classloader) ?: return@rewardAd

                class_ = class_ { name = rewardAdActivityClass.name }
                val rewardFlagField =
                    rewardAdActivityClass.declaredFields.filter { it.type == Boolean::class.javaPrimitiveType }
                        .getOrNull(1) ?: return@rewardAd

                rewardFlag = field { name = rewardFlagField.name }

            }
            storyPagerPlayer = storyPagerPlayer {
                val storyPagerPlayerClass =
                    "com.bilibili.video.story.player.StoryPagerPlayer".from(classloader) ?: return@storyPagerPlayer

                class_ = class_ { name = storyPagerPlayerClass.name }

                val addVideoMethod = dexHelper.findMethodUsingString(
                    " add ",
                    false,
                    -1,
                    -1,
                    null,
                    dexHelper.encodeClassIndex(storyPagerPlayerClass),
                    null,
                    longArrayOf(dexHelper.encodeClassIndex(List::class.java)),
                    null,
                    true
                ).asSequence().mapNotNull {
                    dexHelper.decodeMethodIndex(it)
                }.firstOrNull() ?: return@storyPagerPlayer

                addVideo = method { name = addVideoMethod.name }
            }

            dexHelper.close()
        }

        @Volatile
        lateinit var instance: BiliBiliPackage
    }
}


================================================
FILE: app/src/main/java/me/iacn/biliroaming/ColorChooseDialog.kt
================================================
package me.iacn.biliroaming

import android.app.AlertDialog
import android.content.Context
import android.graphics.Color
import android.text.Editable
import android.text.TextWatcher
import android.view.View
import android.widget.EditText
import android.widget.SeekBar
import android.widget.SeekBar.OnSeekBarChangeListener
import android.widget.TextView
import me.iacn.biliroaming.utils.inflateLayout

/**
 * Created by iAcn on 2019/7/14
 * Email i@iacn.me
 */
class ColorChooseDialog(context: Context, defColor: Int) : AlertDialog.Builder(context) {
    private val view = context.inflateLayout(R.layout.dialog_color_choose)
    private val sampleView: View = view.findViewById(R.id.view_sample)
    private val etColor: EditText = view.findViewById(R.id.et_color)
    private val sbColorR: SeekBar = view.findViewById(R.id.sb_colorR)
    private val sbColorG: SeekBar = view.findViewById(R.id.sb_colorG)
    private val sbColorB: SeekBar = view.findViewById(R.id.sb_colorB)
    private val tvColorR: TextView = view.findViewById(R.id.tv_colorR)
    private val tvColorG: TextView = view.findViewById(R.id.tv_colorG)
    private val tvColorB: TextView = view.findViewById(R.id.tv_colorB)
    val color: Int
        get() = Color.rgb(sbColorR.progress, sbColorG.progress, sbColorB.progress)

    private fun setEditTextListener() {
        etColor.addTextChangedListener(object : TextWatcher {
            override fun beforeTextChanged(s: CharSequence, start: Int, count: Int, after: Int) {}
            override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) {
                updateValue(handleUnknownColor(s.toString()))
            }

            override fun afterTextChanged(s: Editable) {}
        })
    }

    private fun setSeekBarListener() {
        val listener: OnSeekBarChangeListener = object : OnSeekBarChangeListener {
            override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
                if (fromUser) {
                    val color = Color.rgb(sbColorR.progress, sbColorG.progress, sbColorB.progress)
                    etColor.setText(String.format("%06X", 0xFFFFFF and color))
                }
                tvColorR.text = sbColorR.progress.toString()
                tvColorG.text = sbColorG.progress.toString()
                tvColorB.text = sbColorB.progress.toString()
            }

            override fun onStartTrackingTouch(seekBar: SeekBar) {}
            override fun onStopTrackingTouch(seekBar: SeekBar) {}
        }
        sbColorR.setOnSeekBarChangeListener(listener)
        sbColorG.setOnSeekBarChangeListener(listener)
        sbColorB.setOnSeekBarChangeListener(listener)
    }

    private fun updateValue(color: Int) {
        sampleView.setBackgroundColor(color)
        val progressR = Color.red(color)
        val progressG = Color.green(color)
        val progressB = Color.blue(color)
        sbColorR.progress = progressR
        sbColorG.progress = progressG
        sbColorB.progress = progressB
        tvColorR.text = progressR.toString()
        tvColorG.text = progressG.toString()
        tvColorB.text = progressB.toString()
    }

    private fun handleUnknownColor(color: String) =
        try {
            Color.parseColor("#$color")
        } catch (e: IllegalArgumentException) {
            Color.BLACK
        }

    init {
        setView(view)
        setEditTextListener()
        setSeekBarListener()
        updateValue(defColor)
        etColor.setText(String.format("%06X", 0xFFFFFF and defColor))
        setTitle("自
Download .txt
gitextract_l3jd6_pi/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.yml
│   │   ├── config.yml
│   │   ├── feature_request.yml
│   │   └── new_server.yml
│   ├── dependabot.yml
│   └── workflows/
│       ├── PR.yml
│       └── android.yml
├── .gitignore
├── .gitmodules
├── LICENSE
├── README.md
├── app/
│   ├── .gitignore
│   ├── build.gradle.kts
│   ├── proguard-rules.pro
│   └── src/
│       ├── .gitignore
│       └── main/
│           ├── AndroidManifest.xml
│           ├── assets/
│           │   ├── xhook.js
│           │   └── xposed_init
│           ├── java/
│           │   └── me/
│           │       └── iacn/
│           │           └── biliroaming/
│           │               ├── ARGBColorChooseDialog.kt
│           │               ├── BaseWidgetDialog.kt
│           │               ├── BiliBiliPackage.kt
│           │               ├── ColorChooseDialog.kt
│           │               ├── CommentFilterDialog.kt
│           │               ├── Constant.kt
│           │               ├── CustomSubtitleDialog.kt
│           │               ├── DynamicFilterDialog.kt
│           │               ├── HomeFilterDialog.kt
│           │               ├── MainActivity.kt
│           │               ├── SearchFilterDialog.kt
│           │               ├── SettingDialog.kt
│           │               ├── SpeedTestDialog.kt
│           │               ├── VideoExportDialog.kt
│           │               ├── XposedInit.kt
│           │               ├── hook/
│           │               │   ├── AllowMiniPlayHook.kt
│           │               │   ├── AutoLikeHook.kt
│           │               │   ├── BangumiPageAdHook.kt
│           │               │   ├── BangumiPlayUrlHook.kt
│           │               │   ├── BangumiSeasonHook.kt
│           │               │   ├── BaseHook.kt
│           │               │   ├── BlockUpdateHook.kt
│           │               │   ├── CommentImageHook.kt
│           │               │   ├── CopyCommentHook.kt
│           │               │   ├── CopyHook.kt
│           │               │   ├── CoverHook.kt
│           │               │   ├── CustomThemeHook.kt
│           │               │   ├── DanmakuHook.kt
│           │               │   ├── DialogBlurBackgroundHook.kt
│           │               │   ├── DownloadThreadHook.kt
│           │               │   ├── DrawerHook.kt
│           │               │   ├── DynamicHook.kt
│           │               │   ├── EnvHook.kt
│           │               │   ├── FullStoryHook.kt
│           │               │   ├── HintHook.kt
│           │               │   ├── JsonHook.kt
│           │               │   ├── KillDelayBootHook.kt
│           │               │   ├── LiveQualityHook.kt
│           │               │   ├── LiveRoomHook.kt
│           │               │   ├── LongPressSpeed.kt
│           │               │   ├── MultiWindowHook.kt
│           │               │   ├── MusicNotificationHook.kt
│           │               │   ├── P2pHook.kt
│           │               │   ├── PegasusHook.kt
│           │               │   ├── PlayArcConfHook.kt
│           │               │   ├── PlayerLongPressHook.kt
│           │               │   ├── ProtoBufHook.kt
│           │               │   ├── PublishToFollowingHook.kt
│           │               │   ├── QualityHook.kt
│           │               │   ├── RewardAdHook.kt
│           │               │   ├── SSLHook.kt
│           │               │   ├── SettingHook.kt
│           │               │   ├── ShareHook.kt
│           │               │   ├── SpeedHook.kt
│           │               │   ├── SplashHook.kt
│           │               │   ├── StartActivityHook.kt
│           │               │   ├── StoryPlayerAdHook.kt
│           │               │   ├── SubtitleHook.kt
│           │               │   ├── TeenagersModeHook.kt
│           │               │   ├── TryWatchVipQualityHook.kt
│           │               │   ├── UposReplaceHook.kt
│           │               │   ├── VideoQualityHook.kt
│           │               │   ├── VipSectionHook.kt
│           │               │   └── WebViewHook.kt
│           │               ├── network/
│           │               │   └── BiliRoamingApi.kt
│           │               └── utils/
│           │                   ├── Coroutines.kt
│           │                   ├── DexHelper.java
│           │                   ├── KotlinXposedHelper.kt
│           │                   ├── Log.kt
│           │                   ├── StrokeSpan.kt
│           │                   ├── SubtitleHelper.kt
│           │                   ├── UposReplaceHelper.kt
│           │                   ├── Utils.kt
│           │                   └── json/
│           │                       ├── FastjsonHelper.kt
│           │                       ├── GsonHelper.kt
│           │                       └── JsonHelper.kt
│           ├── jni/
│           │   ├── CMakeLists.txt
│           │   └── biliroaming.cc
│           ├── proto/
│           │   └── me/
│           │       └── iacn/
│           │           └── biliroaming/
│           │               ├── api.proto
│           │               └── configs.proto
│           └── res/
│               ├── drawable/
│               │   ├── ic_clear.xml
│               │   └── ic_launcher_foreground.xml
│               ├── layout/
│               │   ├── cdn_speedtest_item.xml
│               │   ├── custom_button.xml
│               │   ├── custom_subtitle_dialog.xml
│               │   ├── customize_backup_dialog.xml
│               │   ├── dialog_argb_color_choose.xml
│               │   ├── dialog_color_choose.xml
│               │   ├── feature.xml
│               │   ├── search_bar.xml
│               │   ├── seekbar_dialog.xml
│               │   └── video_choose.xml
│               ├── mipmap-anydpi-v26/
│               │   └── ic_launcher.xml
│               ├── values/
│               │   ├── arrays.xml
│               │   ├── colors.xml
│               │   ├── strings.xml
│               │   ├── strings_raw.xml
│               │   └── styles.xml
│               ├── values-night/
│               │   ├── colors.xml
│               │   └── styles.xml
│               ├── values-zh-rTW/
│               │   ├── arrays.xml
│               │   └── strings.xml
│               └── xml/
│                   ├── main_activity.xml
│                   └── prefs_setting.xml
├── build.gradle.kts
├── gradle/
│   ├── libs.versions.toml
│   └── wrapper/
│       └── gradle-wrapper.properties
├── gradle.properties
├── gradlew
├── gradlew.bat
└── settings.gradle.kts
Download .txt
SYMBOL INDEX (58 symbols across 2 files)

FILE: app/src/main/java/me/iacn/biliroaming/utils/DexHelper.java
  class DexHelper (line 10) | public class DexHelper implements AutoCloseable, Closeable {
    method DexHelper (line 15) | public DexHelper(@NonNull ClassLoader classLoader) {
    method findMethodUsingString (line 20) | @NonNull
    method findMethodInvoking (line 26) | @NonNull
    method findMethodInvoked (line 33) | @NonNull
    method findMethodSettingField (line 40) | @NonNull
    method findMethodGettingField (line 46) | @NonNull
    method findField (line 52) | @NonNull
    method decodeMethodIndex (line 55) | @Nullable
    method encodeMethodIndex (line 58) | public native long encodeMethodIndex(@NonNull Member method);
    method decodeFieldIndex (line 60) | @Nullable
    method encodeFieldIndex (line 63) | public native long encodeFieldIndex(@NonNull Field field);
    method encodeClassIndex (line 65) | public native long encodeClassIndex(@NonNull Class<?> clazz);
    method decodeClassIndex (line 67) | @Nullable
    method createFullCache (line 70) | public native void createFullCache();
    method close (line 72) | @Override
    method finalize (line 75) | @Override
    method load (line 80) | private native long load(@NonNull ClassLoader classLoader);

FILE: app/src/main/jni/biliroaming.cc
  type MemMap (line 46) | struct MemMap {
    method MemMap (line 47) | MemMap() = default;
    method MemMap (line 48) | explicit MemMap(std::string file_name) {
    method MemMap (line 61) | explicit MemMap(size_t size) {
    method ok (line 75) | [[nodiscard]] bool ok() const { return addr_ && len_; }
    method addr (line 77) | [[nodiscard]] auto addr() const { return addr_; }
    method len (line 78) | [[nodiscard]] auto len() const { return len_; }
    method MemMap (line 80) | MemMap(MemMap &&other) noexcept : addr_(other.addr_), len_(other.len_) {
    method MemMap (line 84) | MemMap &operator=(MemMap &&other) noexcept {
    method MemMap (line 89) | MemMap(const MemMap &) = delete;
    method MemMap (line 90) | MemMap &operator=(const MemMap &) = delete;
  type ZipLocalFile (line 97) | struct [[gnu::packed]] ZipLocalFile {
    method ZipLocalFile (line 98) | static ZipLocalFile *from(uint8_t *begin) {
    method ZipLocalFile (line 106) | ZipLocalFile *next() {
    method MemMap (line 111) | MemMap uncompress() {
    method file_name (line 159) | std::string_view file_name() { return {name, file_name_length}; }
  class ZipFile (line 180) | class ZipFile {
    method Open (line 182) | static std::unique_ptr<ZipFile> Open(const MemMap &map) {
    method ZipLocalFile (line 193) | ZipLocalFile *Find(std::string_view entry_name) {
  function jclass (line 217) | jclass LoadClass(JNIEnv *env, jobject class_loader,
  function jobject (line 306) | jobject LoadField(JNIEnv *env, jclass clazz, std::string_view name) {
  function jobject (line 318) | jobject LoadMethod(JNIEnv *env, jobject class_loader, jclass clazz, std:...
  function GetClassDescriptor (line 340) | std::string GetClassDescriptor(JNIEnv *env, jclass clazz) {
  type MyDexFile (line 373) | struct MyDexFile {
  function JNIEXPORT (line 380) | JNIEXPORT jlongArray JNICALL
  function JNIEXPORT (line 454) | JNIEXPORT jlong JNICALL
  function JNIEXPORT (line 556) | JNIEXPORT jlongArray JNICALL
  function JNIEXPORT (line 624) | JNIEXPORT jlongArray JNICALL
  function JNIEXPORT (line 692) | JNIEXPORT jlongArray JNICALL
  function JNIEXPORT (line 760) | JNIEXPORT jlongArray JNICALL
  function JNIEXPORT (line 828) | JNIEXPORT jlongArray JNICALL
  function JNIEXPORT (line 862) | JNIEXPORT jobject JNICALL
  function JNIEXPORT (line 886) | JNIEXPORT jobject JNICALL
  function JNIEXPORT (line 906) | JNIEXPORT jlong JNICALL
  function JNIEXPORT (line 919) | JNIEXPORT jlong JNICALL
  function JNIEXPORT (line 936) | JNIEXPORT jlong JNICALL
  function JNIEXPORT (line 972) | JNIEXPORT jclass JNICALL
  function JNIEXPORT (line 988) | JNIEXPORT void JNICALL
  function JNIEXPORT (line 996) | JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *) {
  function JNIEXPORT (line 1044) | JNIEXPORT void JNICALL
Condensed preview — 129 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,116K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.yml",
    "chars": 2106,
    "preview": "name: 反馈 Bug\r\ndescription: 反馈遇到的问题\r\nlabels: [bug]\r\ntitle: \"[Bug] \"\r\nbody:\r\n  - type: markdown\r\n    attributes:\r\n      va"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 265,
    "preview": "blank_issues_enabled: false\r\ncontact_links:\r\n  - name: Telegram 频道\r\n    url: https://t.me/biliroaming\r\n    about: 可以订阅更新"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.yml",
    "chars": 625,
    "preview": "name: 功能请求\r\ndescription: 想要请求添加某个功能\r\nlabels: [enhancement]\r\ntitle: \"[Feature] \"\r\nbody:\r\n  - type: textarea\r\n    id: reas"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/new_server.yml",
    "chars": 805,
    "preview": "name: 添加公共服务器\r\ndescription: 把自己的服务器添加到公共服务器列表\r\nlabels: [server]\r\ntitle: \"[Server] \"\r\nbody:\r\n  - type: input\r\n    id: con"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 508,
    "preview": "version: 2\nupdates:\n  - package-ecosystem: gradle\n    directory: \"/\"\n    schedule:\n      interval: daily\n      time: \"21"
  },
  {
    "path": ".github/workflows/PR.yml",
    "chars": 1485,
    "preview": "name: PR Build\n\non: [pull_request]\n\njobs:\n  build:\n    name: Build on ${{ matrix.os }}\n    runs-on: ${{ matrix.os }}\n   "
  },
  {
    "path": ".github/workflows/android.yml",
    "chars": 3256,
    "preview": "name: Android CI\n\non:\n  push:\n    branches: [ master ]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    env:\n      CCACHE_"
  },
  {
    "path": ".gitignore",
    "chars": 107,
    "preview": "*.iml\n.gradle\n/local.properties\n.idea\n.DS_Store\n/build\n/captures\n.externalNativeBuild\n*.apk\n*.jar\n/.kotlin\n"
  },
  {
    "path": ".gitmodules",
    "chars": 125,
    "preview": "[submodule \"app/src/main/jni/dex_builder\"]\n\tpath = app/src/main/jni/dex_builder\n\turl = git@github.com:LSPosed/DexBuilder"
  },
  {
    "path": "LICENSE",
    "chars": 35140,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "README.md",
    "chars": 9235,
    "preview": "<div align=\"center\">\n\n<img width=\"160\" src=\"imgs/icon.png\" alt=\"logo\">\n \nLogo来自[哔哩哔哩漫游娘](https://www.weibo.com/p/2304181"
  },
  {
    "path": "app/.gitignore",
    "chars": 22,
    "preview": "/build\n/release\n/.cxx\n"
  },
  {
    "path": "app/build.gradle.kts",
    "chars": 4406,
    "preview": "import com.google.protobuf.gradle.*\n\nplugins {\n    alias(libs.plugins.agp.app)\n    alias(libs.plugins.kotlin)\n    alias("
  },
  {
    "path": "app/proguard-rules.pro",
    "chars": 928,
    "preview": "-repackageclasses \"biliroaming\"\n\n-keep class me.iacn.biliroaming.XposedInit {\n    <init>();\n}\n\n-keepclassmembers class *"
  },
  {
    "path": "app/src/.gitignore",
    "chars": 10,
    "preview": "generated\n"
  },
  {
    "path": "app/src/main/AndroidManifest.xml",
    "chars": 2014,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:to"
  },
  {
    "path": "app/src/main/assets/xhook.js",
    "chars": 7914,
    "preview": "(function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H=[].indexOf||function(a){for(var b=0,c"
  },
  {
    "path": "app/src/main/assets/xposed_init",
    "chars": 31,
    "preview": "me.iacn.biliroaming.XposedInit\n"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/ARGBColorChooseDialog.kt",
    "chars": 4309,
    "preview": "package me.iacn.biliroaming\n\nimport android.app.AlertDialog\nimport android.content.Context\nimport android.graphics.Color"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/BaseWidgetDialog.kt",
    "chars": 9755,
    "preview": "package me.iacn.biliroaming\n\nimport android.app.AlertDialog\nimport android.content.Context\nimport android.graphics.Color"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/BiliBiliPackage.kt",
    "chars": 110377,
    "preview": "@file:Suppress(\"DEPRECATION\")\n\npackage me.iacn.biliroaming\n\nimport android.app.AndroidAppHelper\nimport android.content.C"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/ColorChooseDialog.kt",
    "chars": 3618,
    "preview": "package me.iacn.biliroaming\n\nimport android.app.AlertDialog\nimport android.content.Context\nimport android.graphics.Color"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/CommentFilterDialog.kt",
    "chars": 4913,
    "preview": "package me.iacn.biliroaming\n\nimport android.app.Activity\nimport android.content.SharedPreferences\nimport android.view.in"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/Constant.kt",
    "chars": 944,
    "preview": "package me.iacn.biliroaming\n\n/**\n * Created by iAcn on 2019/4/12\n * Email i@iacn.me\n */\nobject Constant {\n    const val "
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/CustomSubtitleDialog.kt",
    "chars": 9411,
    "preview": "@file:Suppress(\"DEPRECATION\")\n\npackage me.iacn.biliroaming\n\nimport android.app.Activity\nimport android.app.AlertDialog\ni"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/DynamicFilterDialog.kt",
    "chars": 8155,
    "preview": "package me.iacn.biliroaming\n\nimport android.app.Activity\nimport android.content.SharedPreferences\nimport android.view.in"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/HomeFilterDialog.kt",
    "chars": 8160,
    "preview": "package me.iacn.biliroaming\n\nimport android.app.Activity\nimport android.content.SharedPreferences\nimport android.view.in"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/MainActivity.kt",
    "chars": 7514,
    "preview": "@file:Suppress(\"DEPRECATION\")\n\npackage me.iacn.biliroaming\n\nimport android.app.Activity\nimport android.app.AlertDialog\ni"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/SearchFilterDialog.kt",
    "chars": 3409,
    "preview": "package me.iacn.biliroaming\n\nimport android.app.Activity\nimport android.content.SharedPreferences\nimport android.view.in"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/SettingDialog.kt",
    "chars": 52144,
    "preview": "@file:Suppress(\"DEPRECATION\")\n\npackage me.iacn.biliroaming\n\nimport android.annotation.SuppressLint\nimport android.app.Ac"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/SpeedTestDialog.kt",
    "chars": 6113,
    "preview": "@file:Suppress(\"DEPRECATION\")\n\npackage me.iacn.biliroaming\n\nimport android.app.Activity\nimport android.app.AlertDialog\ni"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/VideoExportDialog.kt",
    "chars": 4769,
    "preview": "@file:Suppress(\"DEPRECATION\")\n\npackage me.iacn.biliroaming\n\nimport android.annotation.SuppressLint\nimport android.app.Ac"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/XposedInit.kt",
    "chars": 9747,
    "preview": "package me.iacn.biliroaming\n\nimport android.app.Activity\nimport android.app.Application\nimport android.app.Instrumentati"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/AllowMiniPlayHook.kt",
    "chars": 1587,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.utils.from\nimport me.iacn.biliroaming.utils.getStaticObject"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/AutoLikeHook.kt",
    "chars": 4264,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.view.View\nimport android.widget.LinearLayout\nimport de.robv.android.xpo"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/BangumiPageAdHook.kt",
    "chars": 1227,
    "preview": "package me.iacn.biliroaming.hook\r\n\r\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\r\nimport me.iacn.biliro"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/BangumiPlayUrlHook.kt",
    "chars": 51827,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.net.Uri\nimport com.google.protobuf.any\nimport me.iacn.biliroaming.*\nimp"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/BangumiSeasonHook.kt",
    "chars": 76525,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.annotation.SuppressLint\nimport android.app.Activity\nimport android.app."
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/BaseHook.kt",
    "chars": 211,
    "preview": "package me.iacn.biliroaming.hook\n\n/**\n * Created by iAcn on 2019/3/27\n * Email i@iacn.me\n */\nabstract class BaseHook(val"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/BlockUpdateHook.kt",
    "chars": 749,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.content.Context\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.in"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/CommentImageHook.kt",
    "chars": 4274,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.content.ContentValues\nimport android.os.Build\nimport android.os.Bundle\n"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/CopyCommentHook.kt",
    "chars": 2087,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.AlertDialog\nimport android.content.ClipboardManager\nimport android."
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/CopyHook.kt",
    "chars": 6897,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.Activity\nimport android.app.AlertDialog\nimport android.content.Cont"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/CoverHook.kt",
    "chars": 11389,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.annotation.SuppressLint\nimport android.app.Activity\nimport android.cont"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/CustomThemeHook.kt",
    "chars": 10667,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.graphics.Color\nimport android.util.SparseArray\nimport android.view.View"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/DanmakuHook.kt",
    "chars": 1590,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/DialogBlurBackgroundHook.kt",
    "chars": 617,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.Dialog\nimport me.iacn.biliroaming.utils.Log\nimport me.iacn.biliroam"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/DownloadThreadHook.kt",
    "chars": 2844,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.AlertDialog\nimport android.content.Context\nimport android.view.View"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/DrawerHook.kt",
    "chars": 3720,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.Activity\nimport android.os.Bundle\nimport android.view.Gravity\nimpor"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/DynamicHook.kt",
    "chars": 10121,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/EnvHook.kt",
    "chars": 4806,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.content.SharedPreferences\nimport me.iacn.biliroaming.BiliBiliPackage.Co"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/FullStoryHook.kt",
    "chars": 502,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/HintHook.kt",
    "chars": 1055,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.Activity\nimport android.app.AlertDialog\nimport android.os.Bundle\nim"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/JsonHook.kt",
    "chars": 30352,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/KillDelayBootHook.kt",
    "chars": 543,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/LiveQualityHook.kt",
    "chars": 7723,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.net.Uri\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\ni"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/LiveRoomHook.kt",
    "chars": 2821,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.os.Bundle\nimport android.view.MotionEvent\nimport me.iacn.biliroaming.Bi"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/LongPressSpeed.kt",
    "chars": 663,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/MultiWindowHook.kt",
    "chars": 748,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.Activity\nimport me.iacn.biliroaming.utils.Log\nimport me.iacn.biliro"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/MusicNotificationHook.kt",
    "chars": 1728,
    "preview": "package me.iacn.biliroaming.hook\n\nimport de.robv.android.xposed.XposedHelpers\nimport me.iacn.biliroaming.utils.Log\nimpor"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/P2pHook.kt",
    "chars": 1710,
    "preview": "package me.iacn.biliroaming.hook\r\n\r\nimport android.content.Context\r\nimport android.os.Bundle\r\nimport me.iacn.biliroaming"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/PegasusHook.kt",
    "chars": 33406,
    "preview": "package me.iacn.biliroaming.hook\n\nimport de.robv.android.xposed.XC_MethodHook\nimport me.iacn.biliroaming.BiliBiliPackage"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/PlayArcConfHook.kt",
    "chars": 9816,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.net.Uri\nimport me.iacn.biliroaming.*\nimport me.iacn.biliroaming.BiliBil"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/PlayerLongPressHook.kt",
    "chars": 1360,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.view.MotionEvent\nimport me.iacn.biliroaming.utils.*\n\nclass PlayerLongPr"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/ProtoBufHook.kt",
    "chars": 22514,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/PublishToFollowingHook.kt",
    "chars": 699,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/QualityHook.kt",
    "chars": 710,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.utils.Log\nimport me.iacn.biliroaming.utils.hookBeforeMethod"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/RewardAdHook.kt",
    "chars": 797,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.os.Bundle\nimport android.widget.TextView\nimport me.iacn.biliroaming.Bil"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/SSLHook.kt",
    "chars": 6233,
    "preview": "@file:Suppress(\"DEPRECATION\")\n\npackage me.iacn.biliroaming.hook\n\nimport android.annotation.SuppressLint\nimport android.n"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/SettingHook.kt",
    "chars": 4960,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.Activity\nimport android.os.Bundle\nimport android.view.LayoutInflate"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/ShareHook.kt",
    "chars": 5259,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.net.Uri\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\ni"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/SpeedHook.kt",
    "chars": 1116,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/SplashHook.kt",
    "chars": 3001,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.content.res.Configuration\nimport android.graphics.Color\nimport android."
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/StartActivityHook.kt",
    "chars": 4911,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.Activity\nimport android.app.Instrumentation\nimport android.content."
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/StoryPlayerAdHook.kt",
    "chars": 3016,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/SubtitleHook.kt",
    "chars": 19082,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.graphics.*\nimport android.net.Uri\nimport android.text.Layout\nimport and"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/TeenagersModeHook.kt",
    "chars": 888,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.app.Activity\nimport android.os.Bundle\nimport me.iacn.biliroaming.BiliBi"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/TryWatchVipQualityHook.kt",
    "chars": 563,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/UposReplaceHook.kt",
    "chars": 4318,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.utils.Log\nimport me.iacn.biliroaming.utils.UposReplaceHelpe"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/VideoQualityHook.kt",
    "chars": 2484,
    "preview": "package me.iacn.biliroaming.hook\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.biliroami"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/VipSectionHook.kt",
    "chars": 1318,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.os.Bundle\nimport android.view.View\nimport me.iacn.biliroaming.BiliBiliP"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/hook/WebViewHook.kt",
    "chars": 3260,
    "preview": "package me.iacn.biliroaming.hook\n\nimport android.graphics.Bitmap\nimport android.webkit.JavascriptInterface\nimport androi"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/network/BiliRoamingApi.kt",
    "chars": 30561,
    "preview": "package me.iacn.biliroaming.network\n\nimport android.annotation.SuppressLint\nimport android.app.AndroidAppHelper\nimport a"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/Coroutines.kt",
    "chars": 441,
    "preview": "package me.iacn.biliroaming.utils\n\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.withContext\nimport or"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/DexHelper.java",
    "chars": 3243,
    "preview": "package me.iacn.biliroaming.utils;\n\nimport androidx.annotation.NonNull;\nimport androidx.annotation.Nullable;\n\nimport jav"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/KotlinXposedHelper.kt",
    "chars": 16012,
    "preview": "@file:Suppress(\"unused\")\n\npackage me.iacn.biliroaming.utils\n\nimport android.content.res.XResources\nimport dalvik.system."
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/Log.kt",
    "chars": 2429,
    "preview": "@file:Suppress(\"unused\")\n\npackage me.iacn.biliroaming.utils\n\nimport android.os.Handler\nimport android.os.Looper\nimport a"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/StrokeSpan.kt",
    "chars": 1341,
    "preview": "package me.iacn.biliroaming.utils\n\nimport android.graphics.Canvas\nimport android.graphics.Paint\nimport android.text.Text"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/SubtitleHelper.kt",
    "chars": 7041,
    "preview": "package me.iacn.biliroaming.utils\n\nimport android.graphics.Bitmap\nimport android.graphics.BitmapFactory\nimport android.g"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/UposReplaceHelper.kt",
    "chars": 6267,
    "preview": "package me.iacn.biliroaming.utils\n\nimport android.net.Uri\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutine"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/Utils.kt",
    "chars": 15898,
    "preview": "package me.iacn.biliroaming.utils\n\nimport android.annotation.SuppressLint\nimport android.app.AndroidAppHelper\nimport and"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/json/FastjsonHelper.kt",
    "chars": 829,
    "preview": "package me.iacn.biliroaming.utils.json\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.bil"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/json/GsonHelper.kt",
    "chars": 884,
    "preview": "package me.iacn.biliroaming.utils.json\n\nimport me.iacn.biliroaming.BiliBiliPackage.Companion.instance\nimport me.iacn.bil"
  },
  {
    "path": "app/src/main/java/me/iacn/biliroaming/utils/json/JsonHelper.kt",
    "chars": 1180,
    "preview": "package me.iacn.biliroaming.utils.json\n\nimport java.lang.reflect.Field\n\ninterface JsonHelper {\n    var data: Any\n    fun"
  },
  {
    "path": "app/src/main/jni/CMakeLists.txt",
    "chars": 785,
    "preview": "cmake_minimum_required(VERSION 3.28)\nproject(biliroaming)\n\nset(CMAKE_CXX_SCAN_FOR_MODULES ON)\n\nfind_package(cxx REQUIRED"
  },
  {
    "path": "app/src/main/jni/biliroaming.cc",
    "chars": 41035,
    "preview": "#include <algorithm>\n#include <android/log.h>\n#include <errno.h>\n#include <fcntl.h>\n#include <jni.h>\n#include <list>\n#in"
  },
  {
    "path": "app/src/main/proto/me/iacn/biliroaming/api.proto",
    "chars": 39817,
    "preview": "syntax = \"proto3\";\n\nimport \"google/protobuf/any.proto\";\n\npackage me.iacn.biliroaming;\n\noption java_package = \"me.iacn.bi"
  },
  {
    "path": "app/src/main/proto/me/iacn/biliroaming/configs.proto",
    "chars": 9672,
    "preview": "syntax = \"proto3\";\n\npackage me.iacn.biliroaming;\n\noption java_package = \"me.iacn.biliroaming\";\noption java_outer_classna"
  },
  {
    "path": "app/src/main/res/drawable/ic_clear.xml",
    "chars": 417,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:wi"
  },
  {
    "path": "app/src/main/res/drawable/ic_launcher_foreground.xml",
    "chars": 61383,
    "preview": "<vector xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    android:width=\"108dp\"\n    android:height=\"108dp\"\n"
  },
  {
    "path": "app/src/main/res/layout/cdn_speedtest_item.xml",
    "chars": 775,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andr"
  },
  {
    "path": "app/src/main/res/layout/custom_button.xml",
    "chars": 4367,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:"
  },
  {
    "path": "app/src/main/res/layout/custom_subtitle_dialog.xml",
    "chars": 17585,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:"
  },
  {
    "path": "app/src/main/res/layout/customize_backup_dialog.xml",
    "chars": 2709,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<GridLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:"
  },
  {
    "path": "app/src/main/res/layout/dialog_argb_color_choose.xml",
    "chars": 6943,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:"
  },
  {
    "path": "app/src/main/res/layout/dialog_color_choose.xml",
    "chars": 5291,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<ScrollView xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmlns:"
  },
  {
    "path": "app/src/main/res/layout/feature.xml",
    "chars": 1316,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andr"
  },
  {
    "path": "app/src/main/res/layout/search_bar.xml",
    "chars": 1277,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    andr"
  },
  {
    "path": "app/src/main/res/layout/seekbar_dialog.xml",
    "chars": 959,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    xmln"
  },
  {
    "path": "app/src/main/res/layout/video_choose.xml",
    "chars": 1414,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<RelativeLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n    an"
  },
  {
    "path": "app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml",
    "chars": 268,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<adaptive-icon xmlns:android=\"http://schemas.android.com/apk/res/android\">\n    <b"
  },
  {
    "path": "app/src/main/res/values/arrays.xml",
    "chars": 9331,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string-array name=\"upos_entries\">\n        <item>不替换</item>\n     "
  },
  {
    "path": "app/src/main/res/values/colors.xml",
    "chars": 169,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#fff</color>\n    <color name"
  },
  {
    "path": "app/src/main/res/values/strings.xml",
    "chars": 20426,
    "preview": "<resources xmlns:tools=\"http://schemas.android.com/tools\">\n    <string name=\"app_name\">哔哩漫游</string>\n    <string name=\"x"
  },
  {
    "path": "app/src/main/res/values/strings_raw.xml",
    "chars": 2754,
    "preview": "<!-- Here place some not translatable string resources -->\n<resources xmlns:tools=\"http://schemas.android.com/tools\" too"
  },
  {
    "path": "app/src/main/res/values/styles.xml",
    "chars": 649,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<resources xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <style name=\"Mai"
  },
  {
    "path": "app/src/main/res/values-night/colors.xml",
    "chars": 172,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <color name=\"ic_launcher_background\">#303030</color>\n    <color n"
  },
  {
    "path": "app/src/main/res/values-night/styles.xml",
    "chars": 644,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<resources xmlns:tools=\"http://schemas.android.com/tools\">\n\n    <style name=\"Mai"
  },
  {
    "path": "app/src/main/res/values-zh-rTW/arrays.xml",
    "chars": 4174,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n    <string-array name=\"upos_entries\">\n        <item>不取代</item>\n     "
  },
  {
    "path": "app/src/main/res/values-zh-rTW/strings.xml",
    "chars": 18805,
    "preview": "<resources xmlns:tools=\"http://schemas.android.com/tools\">\n    <string name=\"app_name\">嗶哩漫遊</string>\n    <string name=\"x"
  },
  {
    "path": "app/src/main/res/xml/main_activity.xml",
    "chars": 2252,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--suppress DeprecatedClassUsageInspection -->\n<PreferenceScreen xmlns:android=\"h"
  },
  {
    "path": "app/src/main/res/xml/prefs_setting.xml",
    "chars": 26213,
    "preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?><!--suppress DeprecatedClassUsageInspection -->\n<PreferenceScreen xmlns:android=\"h"
  },
  {
    "path": "build.gradle.kts",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "gradle/libs.versions.toml",
    "chars": 1508,
    "preview": "[versions]\nprotobuf = \"4.30.2\"\ncoroutine = \"1.10.2\"\nkotlin = \"2.1.20\"\n\n[plugins]\nkotlin = { id = \"org.jetbrains.kotlin.a"
  },
  {
    "path": "gradle/wrapper/gradle-wrapper.properties",
    "chars": 251,
    "preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\ndistributionUrl=https\\://services.gradle.org/distributi"
  },
  {
    "path": "gradle.properties",
    "chars": 812,
    "preview": "# Project-wide Gradle settings.\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will ov"
  },
  {
    "path": "gradlew",
    "chars": 8740,
    "preview": "#!/bin/sh\n\n#\n# Copyright © 2015-2021 the original authors.\n#\n# Licensed under the Apache License, Version 2.0 (the \"Lice"
  },
  {
    "path": "gradlew.bat",
    "chars": 2966,
    "preview": "@rem\r\n@rem Copyright 2015 the original author or authors.\r\n@rem\r\n@rem Licensed under the Apache License, Version 2.0 (th"
  },
  {
    "path": "settings.gradle.kts",
    "chars": 434,
    "preview": "include(\":app\")\nbuildCache { local { removeUnusedEntriesAfterDays = 1 } }\npluginManagement {\n    repositories {\n        "
  }
]

About this extraction

This page contains the full source code of the yujincheng08/BiliRoaming GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 129 files (1.0 MB), approximately 278.3k tokens, and a symbol index with 58 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!