aboutsummaryrefslogtreecommitdiff
path: root/prepare-device.sh
blob: b816dfe96a3b9183d9f4d78199456105055416b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash

echo "Preparing device for mode: $1"

if [ $1 == 'mp' ]
then
    # disable IKS
    IPADDR=`cat IPADDR`
    echo "Disable IKS for $IPADDR"
    adb connect $IPADDR:5555
    adb -s $IPADDR:5555 shell "echo 0 > /sys/kernel/bL_switcher/active"
fi

if [ $1 == 'iks' ]
then
    # enable IKS
    IPADDR=`cat IPADDR`
    echo "Enable IKS for $IPADDR"
    adb connect $IPADDR:5555
    adb -s $IPADDR:5555 shell "echo 1 > /sys/kernel/bL_switcher/active"
fi

exit 0