File tree 1 file changed +25
-0
lines changed
1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,30 @@ do_chroot()
43
43
do_shell " chroot /cache/system $@ "
44
44
}
45
45
46
+ check_busybox ()
47
+ {
48
+ export device_architecture=$( do_shell " uname -m" )
49
+ export busybox_exists=$( do_shell " if [ -d /sbin/busybox ]; then echo true; else echo false; fi" )
50
+ mkdir busybox
51
+
52
+ if [ $busybox_exists = " true" ]; then
53
+ echo ' Using already installed busybox'
54
+ else
55
+ if [ $device_architecture = x86_64 ]; then
56
+ wget https://github.com/meefik/busybox/raw/master/app/src/main/assets/intel/static/bin/busybox -O busybox/busybox
57
+ elif [ $device_architecture = armv7l ]; then
58
+ wget https://github.com/meefik/busybox/raw/master/app/src/main/assets/arm/static/bin/busybox -O busybox/busybox
59
+ elif [ $device_architecture = arm64 ]; then
60
+ wget https://github.com/meefik/busybox/raw/master/app/src/main/assets/arm/static/bin/busybox -O busybox/busybox
61
+ fi
62
+
63
+ adb push busybox/busybox /sbin/busybox
64
+ do_shell " /sbin/busybox --install"
65
+ fi
66
+
67
+ rm busybox -r
68
+ }
69
+
46
70
convert_android_img ()
47
71
{
48
72
if file $SYSIMG | grep -v " : Linux rev 1.0 ext4" > /dev/null; then
@@ -170,6 +194,7 @@ if ! adb devices | grep -q recovery; then
170
194
exit 1
171
195
fi
172
196
197
+ check_busybox
173
198
check_mounts
174
199
175
200
WORKDIR=$( mktemp -d /tmp/halium-install.XXXXX)
You can’t perform that action at this time.
0 commit comments