Commit 1b626207 authored by Max Lv's avatar Max Lv

Fix all our own issues.

Waiting for Android's official fix for their broken NAT implementation.
parent 250e4171
......@@ -801,6 +801,8 @@ class Shadowsocks
ab.append("mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system")
for (executable <- Shadowsocks.EXECUTABLES) {
ab.append("cp %s%s /system/bin/".format(Path.BASE, executable))
ab.append("chmod 755 /system/bin/" + executable)
ab.append("chown root:shell /system/bin/" + executable)
}
ab.append("mount -o ro,remount -t yaffs2 /dev/block/mtdblock3 /system")
Console.runRootCommand(ab.toArray)
......@@ -826,6 +828,7 @@ class Shadowsocks
ab.append("chmod 755 " + Path.BASE + executable)
}
Console.runCommand(ab.toArray)
}
private def recovery() {
......
......@@ -151,7 +151,7 @@ class ShadowsocksNatService extends Service with BaseService {
}
val cmd = if (Build.VERSION.SDK_INT >= 20) {
args
"system/bin/" + args
} else {
Path.BASE + args
}
......@@ -185,7 +185,7 @@ class ShadowsocksNatService extends Service with BaseService {
p.println(conf)
})
val cmd = if (Build.VERSION.SDK_INT >= 20) {
args
"system/bin/" + args
} else {
Path.BASE + args
}
......@@ -195,10 +195,10 @@ class ShadowsocksNatService extends Service with BaseService {
/** Called when the activity is first created. */
def handleConnection: Boolean = {
startShadowsocksDaemon()
startDnsDaemon()
startRedsocksDaemon()
setupIptables
startShadowsocksDaemon()
setupIptables()
flushDNS()
true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment