@@ -0,0 +1,33 @@
|
||||
#!/sbin/sh
|
||||
|
||||
#################
|
||||
# Initialization
|
||||
#################
|
||||
|
||||
umask 022
|
||||
|
||||
# echo before loading util_functions
|
||||
ui_print() { echo "$1"; }
|
||||
|
||||
require_new_magisk() {
|
||||
ui_print "*******************************"
|
||||
ui_print " Please install Magisk v20.4+! "
|
||||
ui_print "*******************************"
|
||||
exit 1
|
||||
}
|
||||
|
||||
#########################
|
||||
# Load util_functions.sh
|
||||
#########################
|
||||
|
||||
OUTFD=$2
|
||||
ZIPFILE=$3
|
||||
|
||||
mount /data 2>/dev/null
|
||||
|
||||
[ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
|
||||
. /data/adb/magisk/util_functions.sh
|
||||
[ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
|
||||
|
||||
install_module
|
||||
exit 0
|
||||
@@ -0,0 +1 @@
|
||||
#MAGISK
|
||||
@@ -0,0 +1,85 @@
|
||||
# shellcheck disable=SC2034
|
||||
SKIPUNZIP=1
|
||||
MIN_SDK=29
|
||||
CONFIG_DIR=/data/adb/tricky_store
|
||||
|
||||
# --- Installation Context Check ---
|
||||
if [ "$BOOTMODE" != true ]; then
|
||||
ui_print "! Please install in Magisk Manager or KernelSU Manager"
|
||||
abort "! Install from recovery is NOT supported"
|
||||
fi
|
||||
|
||||
if [ "$KSU" = true ] && [ "$KSU_VER_CODE" -lt 10670 ]; then
|
||||
abort "! Please update your KernelSU and KernelSU Manager"
|
||||
fi
|
||||
|
||||
# --- Version Info ---
|
||||
VERSION=$(grep_prop version "${TMPDIR}/module.prop")
|
||||
ui_print "- Installing Tricky Store OSS $VERSION"
|
||||
ui_print ""
|
||||
|
||||
# --- Architecture Handling ---
|
||||
case "$ARCH" in
|
||||
arm64) ABI_DIR="arm64-v8a" ;;
|
||||
arm) ABI_DIR="armeabi-v7a" ;;
|
||||
x64) ABI_DIR="x86_64" ;;
|
||||
x86) ABI_DIR="x86" ;;
|
||||
*) abort "! Unsupported architecture: $ARCH" ;;
|
||||
esac
|
||||
|
||||
ui_print "- Device platform: $ARCH"
|
||||
ui_print "- Using ABI dir: $ABI_DIR"
|
||||
|
||||
# --- SDK Check ---
|
||||
if [ "$API" -lt "$MIN_SDK" ]; then
|
||||
abort "! Unsupported SDK: $API. Minimum required is $MIN_SDK"
|
||||
else
|
||||
ui_print "- Device SDK: $API"
|
||||
fi
|
||||
ui_print ""
|
||||
|
||||
# --- Helper to install files ---
|
||||
install_file() {
|
||||
if ! unzip -qqjo "$ZIPFILE" "$1" -d "$2"; then
|
||||
abort "! Failed to extract $1"
|
||||
fi
|
||||
ui_print "- Extracted $1"
|
||||
}
|
||||
|
||||
# --- Installation ---
|
||||
ui_print "- Extracting module files"
|
||||
for file in customize.sh module.prop post-fs-data.sh service.sh sepolicy.rule daemon; do
|
||||
install_file "$file" "$MODPATH"
|
||||
done
|
||||
|
||||
# Handle service.apk or classes.dex
|
||||
if unzip -l "$ZIPFILE" | grep -q "service.apk"; then
|
||||
install_file "service.apk" "$MODPATH"
|
||||
elif unzip -l "$ZIPFILE" | grep -q "classes.dex"; then
|
||||
install_file "classes.dex" "$MODPATH"
|
||||
else
|
||||
abort "! Neither service.apk nor classes.dex found"
|
||||
fi
|
||||
|
||||
chmod 755 "$MODPATH/daemon"
|
||||
ui_print ""
|
||||
|
||||
|
||||
ui_print "- Extracting $ARCH libraries"
|
||||
install_file "lib/$ABI_DIR/libTrickyStoreOSS.so" "$MODPATH"
|
||||
install_file "lib/$ABI_DIR/libinject.so" "$MODPATH"
|
||||
ui_print ""
|
||||
|
||||
mv "$MODPATH/libinject.so" "$MODPATH/inject"
|
||||
chmod 755 "$MODPATH/inject"
|
||||
|
||||
# --- Configuration Files ---
|
||||
if [ ! -d "$CONFIG_DIR" ]; then
|
||||
ui_print "- Creating configuration directory"
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
fi
|
||||
|
||||
if [ ! -f "$CONFIG_DIR/target.txt" ]; then
|
||||
ui_print "- Adding default target scope"
|
||||
install_file "target.txt" "$CONFIG_DIR"
|
||||
fi
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/system/bin/sh
|
||||
|
||||
MODDIR=$1
|
||||
|
||||
# Determine classpath
|
||||
if [ -f "$MODDIR/classes.dex" ]; then
|
||||
CLASSPATH="$MODDIR/classes.dex"
|
||||
elif [ -f "$MODDIR/service.apk" ]; then
|
||||
CLASSPATH="$MODDIR/service.apk"
|
||||
else
|
||||
echo "Error: Neither classes.dex nor service.apk found in $MODDIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec /system/bin/app_process -Djava.class.path="$CLASSPATH" "$MODDIR" --nice-name=TrickyStoreOSS io.github.beakthoven.TrickyStoreOSS.MainKt
|
||||
@@ -0,0 +1,7 @@
|
||||
id=tricky_store
|
||||
name=Tricky Store OSS
|
||||
version=REPLACEMEVER
|
||||
versionCode=REPLACEMEVERCODE
|
||||
author=beakthoven
|
||||
description=A trick of keystore but open source.
|
||||
updateJson=https://raw.githubusercontent.com/beakthoven/TrickyStore/changelog/update.json
|
||||
@@ -0,0 +1 @@
|
||||
MODDIR=${0%/*}
|
||||
@@ -0,0 +1,4 @@
|
||||
allow keystore system_file unix_dgram_socket *
|
||||
allow system_file keystore unix_dgram_socket *
|
||||
allow keystore system_file file *
|
||||
allow crash_dump keystore process *
|
||||
@@ -0,0 +1,14 @@
|
||||
DEBUG=false
|
||||
|
||||
MODDIR=${0%/*}
|
||||
|
||||
cd $MODDIR
|
||||
|
||||
(
|
||||
while [ true ]; do
|
||||
$MODDIR/daemon "$MODDIR"
|
||||
if [ $? -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
) &
|
||||
@@ -0,0 +1,6 @@
|
||||
com.google.android.gsf
|
||||
com.google.android.gms
|
||||
com.android.vending
|
||||
io.github.vvb2060.keyattestation
|
||||
io.github.vvb2060.mahoshojo
|
||||
icu.nullptr.nativetest
|
||||
Reference in New Issue
Block a user