adb-toolkit/android-helper/build.sh
jegly 26d82c68d5 Add GSI Loader, APK Audit, Firmware, Intent Lab, Screen Mirror, Magisk, and App Lock features; bump to v1.2.0
- New sidebar views: GSI Loader (DSU + permanent fastboot flash), APK Audit,
  Firmware, Intent Lab, Screen Mirror
- New backend modules: backend_gsi.go, backend_apkaudit*.go, backend_firmware.go,
  backend_intent.go, backend_magisk.go, backend_applock.go, backend_scrcpy.go,
  backend_payload.go, backend_privacy.go, backend_overview.go, backend_bootinfo.go,
  backend_flasher.go, backend_transfer.go, backend_filehttp.go
- App Lock / danger-gate infrastructure (DangerGate, LockGate, applock.ts)
- Privileged uninstall via embedded Android helper dex (android-helper/)
- nfpm packaging version bump to 1.2.0
2026-07-06 15:17:59 +10:00

23 lines
1,004 B
Bash

#!/usr/bin/env bash
# Rebuild the ATK privileged-uninstall helper dex (android-helper/atk-helper.dex).
#
# This is the on-device helper ATK pushes and runs via `app_process` (as the
# shell user, uid 2000) to remove protected system apps that `pm uninstall`
# refuses - the same technique Canta uses via Shizuku, but driven over adb with
# no root and no Shizuku app. It calls IPackageInstaller.uninstall() directly
# with the DELETE_SYSTEM_APP flag.
#
# Requires: a JDK (javac) and Android SDK build-tools (d8) + a platform android.jar.
set -euo pipefail
cd "$(dirname "$0")"
JAVAC="${JAVAC:-$(command -v javac)}"
ANDROID_JAR="${ANDROID_JAR:-$HOME/Android/Sdk/platforms/android-37.0/android.jar}"
D8="${D8:-$HOME/Android/Sdk/build-tools/37.0.0/d8}"
rm -rf classes && mkdir -p classes
"$JAVAC" --release 17 -cp "$ANDROID_JAR" -d classes Main.java
"$D8" --min-api 26 --output . classes/*.class
mv classes.dex atk-helper.dex
rm -rf classes
echo "Built atk-helper.dex ($(stat -c%s atk-helper.dex) bytes)"