-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
service.sh
67 lines (58 loc) · 1.34 KB
/
service.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/system/bin/sh
# Magisk Module: Magisk built-in BusyBox v1.0.7
# Copyright (c) zgfg @ xda, 2022-
# GitHub source: https://github.com/zgfg/BuiltIn-BusyBox
# Module's own path (local path)
MODDIR=${0%/*}
# Log file for debugging
LogFile="$MODDIR/service.log"
exec 3>&1 4>&2 2>$LogFile 1>&2
set -x
date +%c
# Log Magisk version and magisk --path
magisk -c
magisk --path
# Log dual-slots ROM info
getprop ro.product.cpu.abi
getprop ro.product.cpu.abilist
# Log results for BusyBox
BB=busybox
$BB | head -n 1
BBBIN=$(which $BB)
ls -lZ $BBBIN
BBDIR=$(echo "$BBBIN" | sed "s,/$BB$,,")
if [ -d $BBDIR ]
then
cd $BBDIR
pwd
ls -la | grep $BB | grep ^lr.x | rev | cut -d ' ' -f 3 | rev
ls -la | grep $BB | grep ^lr.x | wc -l
fi
# Log results for ToyBox
TB=toybox
$TB --version
TBBIN=$(which $TB)
ls -lZ $TBBIN
TBDIR=$(echo "$TBBIN" | sed "s,/$TB$,,")
if [ -d $TBDIR ]
then
cd $TBDIR
pwd
ls -la | grep $TB | grep ^lr.x | rev | cut -d ' ' -f 3 | rev
ls -la | grep $TB | grep ^lr.x | wc -l
fi
# Log results for ToyBox-Ext
TBEXT=toybox-ext
$TBEXT --version
TBEXTBIN=$(which $TBEXT)
ls -lZ $TBEXTBIN
TBEXTDIR=$(echo "$TBEXTBIN" | sed "s,/$TBEXT$,,")
if [ "$TBEXTDIR" != "$TBDIR" ] && [ -d $TBEXTDIR ]
then
cd $TBEXTDIR
pwd
ls -la | grep $TB | grep ^lr.x | rev | cut -d ' ' -f 3 | rev
ls -la | grep $TB | grep ^lr.x | wc -l
fi
set +x
exec 1>&3 2>&4 3>&- 4>&-