Skip to content

Permanently modify routing table (to make connection to OBD dongle hotspot via ethernet wifi bridge working) #250

Answered by gauner1986
gauner1986 asked this question in Q&A
Discussion options

You must be logged in to vote

Figured it out myself.
I just remounted the system partition with

adb root
adb remount system

installed two files

/etc/init/custom.rc

service custom /system/bin/custom.sh

    enabled

    seclabel u:r:su:s0

on property:sys.boot_completed=1
    start custom

/system/bin/custom.sh

echo "$(date): Starting program..."
watch -n2 "ip addr add 192.168.4.2/24 dev eth0 && ip route add 192.168.4.0/24 dev eth0 table eth1"

and gave the correct access rights to those files:

chown 0.0 /system/bin/custom.sh
chmod 554 /system/bin/custom.sh
chcon u:object_r:system_file:s0 /system/bin/custom.sh

chown 0.0 /etc/init/custom.rc
chmod 644 /etc/init/custom.rc
chcon u:object_r:system_file:s0 /etc/init/cust…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gauner1986
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant