You've already forked Tricky-Addon-Update-Target-List
mirror of
https://github.com/KOWX712/Tricky-Addon-Update-Target-List.git
synced 2025-09-06 06:37:09 +00:00
Initial
This commit is contained in:
33
module/META-INF/com/google/android/update-binary
Normal file
33
module/META-INF/com/google/android/update-binary
Normal file
@@ -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
|
||||
1
module/META-INF/com/google/android/updater-script
Normal file
1
module/META-INF/com/google/android/updater-script
Normal file
@@ -0,0 +1 @@
|
||||
#MAGISK
|
||||
9
module/action.sh
Normal file
9
module/action.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
MODDIR=${0%/*}
|
||||
echo "**********************************************"
|
||||
echo "- Staring script..."
|
||||
echo " "
|
||||
|
||||
sh "$MODDIR"/common/UpdateTargetList.sh || true
|
||||
|
||||
echo "**********************************************"
|
||||
echo "\(__All set!__)/"
|
||||
1
module/common/.keybox
Normal file
1
module/common/.keybox
Normal file
@@ -0,0 +1 @@
|
||||
nothing here
|
||||
9
module/common/ADDITION
Normal file
9
module/common/ADDITION
Normal file
@@ -0,0 +1,9 @@
|
||||
# This is the list of additional apps to include in the target file
|
||||
# DO NOT remove the default app here
|
||||
# You can add your custom addition app's package name here
|
||||
# Each app package name should be on a new line
|
||||
|
||||
com.google.android.gms
|
||||
io.github.vvb2060.keyattestation
|
||||
io.github.vvb2060.mahoshojo
|
||||
icu.nullptr.nativetest
|
||||
9
module/common/EXCLUDE
Normal file
9
module/common/EXCLUDE
Normal file
@@ -0,0 +1,9 @@
|
||||
# This is the list of apps to exclude from the target file
|
||||
# DO NOT remove the default app here
|
||||
# You can add your custom exclusion app here
|
||||
# Each app package name should be on a new line
|
||||
|
||||
oneplus
|
||||
coloros
|
||||
com.android.patch
|
||||
me.bmax.apatch
|
||||
58
module/common/UpdateTargetList.sh
Normal file
58
module/common/UpdateTargetList.sh
Normal file
@@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
|
||||
# by KOW, telegram channel: https://t.me/kowchannel
|
||||
|
||||
# This script will put all non-system app into /data/adb/tricky_store/target.txt
|
||||
# Using module to put normal app into system app may exclude corresponding app from this script too, please disable it if you found this script doesn't work.
|
||||
|
||||
# Define the mod path
|
||||
MODDIR="/data/adb/tricky_store/target_list_config"
|
||||
|
||||
# Config file check
|
||||
echo "- Checking config files..."
|
||||
echo " "
|
||||
if [ ! -f "$MODDIR/EXCLUDE" ]; then
|
||||
echo "! Exclude list is missing!"
|
||||
exit 1
|
||||
else
|
||||
echo "- Exclude config file found."
|
||||
echo " "
|
||||
fi
|
||||
if [ ! -f "$MODDIR/ADDITION" ]; then
|
||||
echo "! Addition list is missing"
|
||||
exit 1
|
||||
else
|
||||
echo "- Addition config file found."
|
||||
echo " "
|
||||
fi
|
||||
|
||||
# Read exclution and addition config
|
||||
EXCLUDE=$(grep -vE '^#|^$' "$MODDIR/EXCLUDE" | tr '\n' '|' | sed 's/|$//')
|
||||
ADDITIONS=$(grep -vE '^#|^$' "$MODDIR/ADDITION")
|
||||
|
||||
# Create or overwrite the target.txt file
|
||||
echo "- Overwritting target.txt"
|
||||
echo " "
|
||||
su -c > /data/adb/tricky_store/target.txt
|
||||
|
||||
# Add all non-system apps to the target file and remove exclusions
|
||||
echo "- Adding apps into /data/adb/tricky_store/target.txt"
|
||||
echo " "
|
||||
su -c pm list packages -3 </dev/null 2>&1 | cat | awk -F: '{print $2}' | grep -Ev "$EXCLUDE" > /data/adb/tricky_store/target.txt
|
||||
sleep 1
|
||||
|
||||
# Add additional apps to the target file if they are not already present
|
||||
echo "- Adding addition app... "
|
||||
echo " "
|
||||
for app in $ADDITIONS; do
|
||||
if ! grep -qx "$app" /data/adb/tricky_store/target.txt; then
|
||||
echo "$app" >> /data/adb/tricky_store/target.txt
|
||||
fi
|
||||
done
|
||||
|
||||
# Force stop gms. Not necessary, you can add it if you want
|
||||
#su -c killall com.google.android.gms
|
||||
#su -c killall com.google.android.gms.unstable
|
||||
|
||||
echo "- target.txt updated successfully"
|
||||
echo " "
|
||||
3
module/common/system.prop
Normal file
3
module/common/system.prop
Normal file
@@ -0,0 +1,3 @@
|
||||
# To pass Minotaur native test Conventional Test (8), you can get your VerifiedBootHash from KeyAttestation app
|
||||
# Put verifiedBootHash after 'ro.boot.vbmeta.digest=' and remove the '#' infront of it.
|
||||
#ro.boot.vbmeta.digest=
|
||||
91
module/customize.sh
Normal file
91
module/customize.sh
Normal file
@@ -0,0 +1,91 @@
|
||||
SKIPUNZIP=0
|
||||
DEBUG=false
|
||||
if [ "$(which magisk)" ]; then
|
||||
BM="Magisk:$MAGISK_VER│$MAGISK_VER_CODE"
|
||||
elif [ "$KSU" ]; then
|
||||
BM="KSU:$KSU_KERNEL_VER_CODE│$KSU_VER_CODE"
|
||||
elif [ "$APATCH" ]; then
|
||||
BM="APatch:$APATCH_VER│$APATCH_VER_CODE"
|
||||
else
|
||||
ui_print " ";
|
||||
ui_print "! recovery is not supported";
|
||||
abort " ";
|
||||
fi
|
||||
|
||||
print_modname() {
|
||||
ui_print "*******************************************************"
|
||||
ui_print "Installing Tricky Addon: Update Target List"
|
||||
ui_print "Author: KOWX712"
|
||||
ui_print "*******************************************************"
|
||||
}
|
||||
|
||||
if [ -d /data/adb/modules/tricky_store ]; then
|
||||
echo "- Tricky store module installed"
|
||||
else
|
||||
echo "! Tricky store module is not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
key_check() {
|
||||
while true; do
|
||||
key_check=$(/system/bin/getevent -qlc 1)
|
||||
key_event=$(echo "$key_check" | awk '{ print $3 }' | grep 'KEY_')
|
||||
key_status=$(echo "$key_check" | awk '{ print $4 }')
|
||||
if [[ "$key_event" == *"KEY_"* && "$key_status" == "DOWN" ]]; then
|
||||
keycheck="$key_event"
|
||||
break
|
||||
fi
|
||||
done
|
||||
while true; do
|
||||
key_check=$(/system/bin/getevent -qlc 1)
|
||||
key_event=$(echo "$key_check" | awk '{ print $3 }' | grep 'KEY_')
|
||||
key_status=$(echo "$key_check" | awk '{ print $4 }')
|
||||
if [[ "$key_event" == *"KEY_"* && "$key_status" == "UP" ]]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
ui_print "- Installing..."
|
||||
COMPATH="$MODPATH/common"
|
||||
CONFIG_DIR="/data/adb/tricky_store/target_list_config"
|
||||
SCRIPT_DIR="/data/adb/tricky_store"
|
||||
cp "$MODPATH/module.prop" "$COMPATH/disabled"
|
||||
sed -i 's/^description=.*/description=Tricky store is disabled/' "$COMPATH/disabled"
|
||||
cp "$MODPATH/module.prop" "$COMPATH/ninstalled"
|
||||
sed -i 's/^description=.*/description=Tricky store is not installed/' "$COMPATH/ninstalled"
|
||||
cp "$MODPATH/module.prop" "$COMPATH/normal"
|
||||
CONFIG_DIR="/data/adb/tricky_store/target_list_config"
|
||||
SCRIPT_DIR="/data/adb/tricky_store"
|
||||
mkdir -p "$CONFIG_DIR"
|
||||
cp "$COMPATH/UpdateTargetList.sh" "$SCRIPT_DIR/UpdateTargetList.sh"
|
||||
mv "$COMPATH/EXCLUDE" "$CONFIG_DIR/EXCLUDE"
|
||||
mv "$COMPATH/ADDITION" "$CONFIG_DIR/ADDITION"
|
||||
|
||||
if [ ! -f "/data/adb/modules/TA_utl/system.prop" ]; then
|
||||
mv "$COMPATH/system.prop" "$MODPATH/system.prop"
|
||||
else
|
||||
rm -f "$COMPATH/system.prop"
|
||||
mv "/data/adb/modules/TA_utl/system.prop" "$MODPATH/system.prop"
|
||||
fi
|
||||
|
||||
kb="$COMPATH/.keybox"
|
||||
ui_print "*********************************************"
|
||||
ui_print "- Do you want to replace tricky store keybox?"
|
||||
ui_print " Volume up: YES"
|
||||
ui_print " Volume up: NO"
|
||||
ui_print "*********************************************"
|
||||
key_check
|
||||
if [[ "$keycheck" == "KEY_VOLUMEUP" ]]; then
|
||||
ui_print "*********************************************"
|
||||
ui_print "- Replacing keybox..."
|
||||
ui_print "*********************************************"
|
||||
mv "$SCRIPT_DIR/keybox.xml" "$COMPATH/origkeybox"
|
||||
mv "$kb" "$SCRIPT_DIR/keybox.xml"
|
||||
else
|
||||
rm -f "$kb"
|
||||
fi
|
||||
|
||||
ui_print " "
|
||||
ui_print "- Installation completed successfully! "
|
||||
ui_print " "
|
||||
7
module/module.prop
Normal file
7
module/module.prop
Normal file
@@ -0,0 +1,7 @@
|
||||
id=TA_utl
|
||||
name=Tricky Addon: Update Target List
|
||||
version=v1.2
|
||||
versionCode=12
|
||||
author=KOWX712
|
||||
description=Update tricky store target list with action button. Custom config: ADDITION and EXCLUDE in /data/adb/tricky_store/target_list_config
|
||||
updateJson=https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/refs/heads/master/update.json
|
||||
18
module/service.sh
Normal file
18
module/service.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
MODDIR=${0%/*}
|
||||
COMPATH="$MODDIR/common"
|
||||
# Check pm command functionality
|
||||
sleep 10
|
||||
until pm list packages > /dev/null 2>&1; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Check tricky store status
|
||||
TS="/data/adb/modules/tricky_store"
|
||||
if [ -f "$TS/disable" ]; then
|
||||
cat "$COMPATH/disabled" > "$MODDIR/module.prop"
|
||||
elif [ ! -d "$TS" ]; then
|
||||
cat "$COMPATH/ninstalled" > "$MODDIR/module.prop"
|
||||
else
|
||||
cat "$COMPATH/normal" > "$MODDIR/module.prop"
|
||||
sh "$MODDIR"/common/UpdateTargetList.sh || true
|
||||
fi
|
||||
9
module/uninstall.sh
Normal file
9
module/uninstall.sh
Normal file
@@ -0,0 +1,9 @@
|
||||
MODDIR="/data/adb/tricky_store"
|
||||
# Remove residue and restore original keybox.
|
||||
MODPATH=${0%/*}
|
||||
rm -rf "$MODDIR/target_list_config"
|
||||
rm -f "$MODDIR/UpdateTargetList.sh"
|
||||
if [ -f "$MODPATH/common/origkeybox" ]; then
|
||||
rm -f "$MODDIR/keybox.xml"
|
||||
mv "$MODPATH/common/origkeybox" "$MODDIR/keybox.xml"
|
||||
fi
|
||||
Reference in New Issue
Block a user