forked from WSA-Community/WSA-Linux-Kernel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wsa-kernelsu-addons.sh
34 lines (27 loc) · 953 Bytes
/
wsa-kernelsu-addons.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
#!/bin/bash
#
# Copyright (C) 2002-2022 Jim Wu <[email protected]>. All Rights Reserved.
#
if ! [[ -d .git && -f configs/wsa/config-wsa-5.10 && -f configs/wsa/config-wsa-arm64-5.10 ]]; then
echo "[!] Please run this from the top level of your kernel tree." >&2
exit 1
fi
config_patch="#
# Kernel-Assisted Superuser
#
# Jim.Wu, 2021/10/25
#
CONFIG_ASSISTED_SUPERUSER=y
# end of Kernel-Assisted Superuser"
echo "[+] Patching"
#
# Config patch
#
# Jim.Wu, 2021/10/25
#
grep -q CONFIG_ASSISTED_SUPERUSER=y configs/wsa/config-wsa-5.10 || echo "${config_patch}" >> configs/wsa/config-wsa-5.10
grep -q CONFIG_ASSISTED_SUPERUSER=y configs/wsa/config-wsa-arm64-5.10 || echo "${config_patch}" >> configs/wsa/config-wsa-arm64-5.10
echo "[+] Committing"
git add configs/wsa/config-wsa-5.10 configs/wsa/config-wsa-arm64-5.10
git commit -s -m "android: Add superuser addons" configs/wsa/config-wsa-5.10 configs/wsa/config-wsa-arm64-5.10
echo "[+] Done!"