-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 61f55cd
Showing
26 changed files
with
1,800 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Set the default behavior, in case people don't have core.autocrlf set. | ||
* text=auto eol=lf | ||
|
||
# Declare files that will always have CRLF line endings on checkout. | ||
*.bat text eol=crlf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.so binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: self-host | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: temurin | ||
java-version: 21 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
|
||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
with: | ||
packages: '' | ||
|
||
- name: Build with Gradle | ||
run: | | ||
./gradlew zipRelease | ||
./gradlew zipDebug | ||
- name: Package symbols and mappings | ||
run: | | ||
zip -r -9 "module/release/symbols-${{ github.sha }}.zip" module/build/symbols/ service/build/outputs/mapping/ | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: Post to Telegram | ||
if: success() | ||
env: | ||
CHANNEL_ID: ${{ secrets.CHANNEL_ID }} | ||
BOT_TOKEN: ${{ secrets.BOT_TOKEN }} | ||
EVENT_NAME: ${{ github.event_name }} | ||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | ||
COMMIT_URL: ${{ github.event.head_commit.url }} | ||
PULL_REQUEST_TITLE: ${{ github.event.pull_request.title }} | ||
PULL_REQUEST_BODY: ${{ github.event.pull_request.body }} | ||
PULL_REQUEST_URL: ${{ github.event.pull_request.html_url }} | ||
REF: ${{ github.ref }} | ||
SHA: ${{ github.sha }} | ||
run: | | ||
if [ -n "$BOT_TOKEN" ] && [ -n "$CHANNEL_ID" ]; then | ||
python3 -m pip install --upgrade telethon | ||
python3 .github/workflows/post.py module/release | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import os, asyncio, sys | ||
from pathlib import Path | ||
from telethon import TelegramClient, utils | ||
from telethon.tl.functions.help import GetConfigRequest | ||
|
||
|
||
API_ID = 611335 | ||
API_HASH = "d524b414d21f4d37f08684c1df41ac9c" | ||
bot_token = os.environ["BOT_TOKEN"] | ||
channel_id = int(os.environ["CHANNEL_ID"]) | ||
event_name = os.environ["EVENT_NAME"] | ||
if event_name == "push": | ||
msg = f'**Push:** [{os.environ["SHA"][:7]}]({os.environ["COMMIT_URL"]})\n{os.environ["COMMIT_MESSAGE"]}' | ||
elif event_name == "pull_request": | ||
msg = f'**Pull request:** [{os.environ["PULL_REQUEST_TITLE"]}]({os.environ["PULL_REQUEST_URL"]})\n{os.environ["PULL_REQUEST_BODY"]}' | ||
elif event_name == "workflow_dispatch": | ||
msg = f'**Workflow dispatch** on `{os.environ["REF"]}`' | ||
|
||
|
||
async def main(): | ||
if len(sys.argv) < 2: | ||
raise ValueError("No files to upload") | ||
files = [] | ||
for file in list(Path(sys.argv[1]).glob("*.zip")): | ||
files.append(open(file, "rb")) | ||
caption = [""] * len(files) | ||
caption[-1] = msg[:1024] | ||
async with await TelegramClient( | ||
session="/tmp/znbot", api_id=API_ID, api_hash=API_HASH | ||
).start(bot_token=bot_token) as bot: | ||
await bot.send_file(entity=channel_id, file=files, caption=caption) | ||
|
||
|
||
if __name__ == "__main__": | ||
try: | ||
asyncio.run(main()) | ||
except Exception as e: | ||
print(f"Error: {e}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx | ||
local.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Build Vars Spoofing | ||
|
||
Build Vars Spoofing. **Android 8.1 or above is required**. | ||
|
||
## Usage | ||
|
||
1. Flash this module and reboot. | ||
2. Enjoy! | ||
|
||
You can try enabling/disabling Build variable spoofing by creating/deleting the file `/data/adb/boot_var_spoof/spoof_build_vars`. | ||
|
||
Build Vars Spoofing will automatically generate example config props inside `/data/adb/boot_var_spoof/spoof_build_vars` once created, on next reboot, then you may manually edit your spoof config. | ||
|
||
Here is an example of a spoof config: | ||
|
||
``` | ||
MANUFACTURER=Google | ||
MODEL=Pixel 8 Pro | ||
FINGERPRINT=google/husky_beta/husky:15/AP31.240617.009/12094726:user/release-keys | ||
BRAND=google | ||
PRODUCT=husky_beta | ||
DEVICE=husky | ||
RELEASE=15 | ||
ID=AP31.240617.009 | ||
INCREMENTAL=12094726 | ||
TYPE=user | ||
TAGS=release-keys | ||
SECURITY_PATCH=2024-07-05 | ||
``` | ||
|
||
## Acknowledgement | ||
|
||
- [PlayIntegrityFix](https://github.com/chiteroman/PlayIntegrityFix) | ||
- [LSPosed](https://github.com/LSPosed/LSPosed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import com.android.build.gradle.AppExtension | ||
import java.io.ByteArrayOutputStream | ||
|
||
plugins { | ||
alias(libs.plugins.agp.app) apply false | ||
alias(libs.plugins.jetbrains.kotlin.android) apply false | ||
} | ||
|
||
fun String.execute(currentWorkingDir: File = file("./")): String { | ||
val byteOut = ByteArrayOutputStream() | ||
project.exec { | ||
workingDir = currentWorkingDir | ||
commandLine = split("\\s".toRegex()) | ||
standardOutput = byteOut | ||
} | ||
return String(byteOut.toByteArray()).trim() | ||
} | ||
|
||
val gitCommitCount = "git rev-list HEAD --count".execute().toInt() | ||
val gitCommitHash = "git rev-parse --verify --short HEAD".execute() | ||
|
||
// also the soname | ||
val moduleId by extra("boot_var_spoof") | ||
val moduleName by extra("Boot var Spoof") | ||
val author by extra("LSPosed Developers") | ||
val description by extra("Build Vars Spoofing") | ||
val verName by extra("v1.0.0") | ||
val verCode by extra(gitCommitCount) | ||
val commitHash by extra(gitCommitHash) | ||
val abiList by extra(listOf("arm64-v8a", "x86_64", "armeabi-v7a", "x86")) | ||
|
||
val androidMinSdkVersion by extra(27) | ||
val androidTargetSdkVersion by extra(34) | ||
val androidCompileSdkVersion by extra(34) | ||
val androidBuildToolsVersion by extra("34.0.0") | ||
val androidCompileNdkVersion by extra("27.0.12077973") | ||
val androidSourceCompatibility by extra(JavaVersion.VERSION_17) | ||
val androidTargetCompatibility by extra(JavaVersion.VERSION_17) | ||
|
||
tasks.register("Delete", Delete::class) { | ||
delete(layout.buildDirectory) | ||
} | ||
|
||
subprojects { | ||
plugins.withId("com.android.application") { | ||
extensions.configure(AppExtension::class.java) { | ||
compileSdkVersion(androidCompileSdkVersion) | ||
ndkVersion = androidCompileNdkVersion | ||
buildToolsVersion = androidBuildToolsVersion | ||
|
||
defaultConfig { | ||
minSdk = androidMinSdkVersion | ||
targetSdk = androidCompileSdkVersion | ||
versionCode = verCode | ||
versionName = verName | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = androidSourceCompatibility | ||
targetCompatibility = androidTargetCompatibility | ||
} | ||
} | ||
} | ||
plugins.withType(JavaPlugin::class.java) { | ||
extensions.configure(JavaPluginExtension::class.java) { | ||
sourceCompatibility = androidSourceCompatibility | ||
targetCompatibility = androidTargetCompatibility | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Project-wide Gradle settings. | ||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | ||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true | ||
# AndroidX package structure to make it clearer which packages are bundled with the | ||
# Android operating system, and which are packaged with your app"s APK | ||
# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
android.useAndroidX=true | ||
# Automatically convert third-party libraries to use AndroidX | ||
android.enableJetifier=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[versions] | ||
agp = "8.5.2" | ||
kotlin = "2.0.0" | ||
|
||
[libraries] | ||
cxx = { module = "org.lsposed.libcxx:libcxx", version = "27.0.12077973" } | ||
|
||
[plugins] | ||
agp-app = { id = "com.android.application", version.ref = "agp" } | ||
android-library = { id = "com.android.library", version.ref = "agp" } | ||
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } | ||
lsplugin-cmaker = { id = "org.lsposed.lsplugin.cmaker", version = "1.2" } |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip | ||
networkTimeout=10000 | ||
validateDistributionUrl=true | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.