From 06d736b22dcd6fddb60d5c28a0648ca5a83076a3 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Sat, 18 Oct 2014 09:58:40 +0800 Subject: [PATCH] fix all issues for lollipop --- src/main/AndroidManifest.xml | 4 ++-- .../scala/com/github/shadowsocks/Shadowsocks.scala | 4 ---- .../github/shadowsocks/ShadowsocksNatService.scala | 12 ++---------- 3 files changed, 4 insertions(+), 16 deletions(-) diff --git a/src/main/AndroidManifest.xml b/src/main/AndroidManifest.xml index f04532fd..e942af4c 100644 --- a/src/main/AndroidManifest.xml +++ b/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionCode="75" + android:versionName="2.3.0"> diff --git a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala index 5026aae0..d6151646 100644 --- a/src/main/scala/com/github/shadowsocks/Shadowsocks.scala +++ b/src/main/scala/com/github/shadowsocks/Shadowsocks.scala @@ -827,10 +827,6 @@ class Shadowsocks copyAssets(System.getABI) - if (Build.VERSION.SDK_INT >= 20) { - copyToSystem() - } - val ab = new ArrayBuffer[String] for (executable <- Shadowsocks.EXECUTABLES) { ab.append("chmod 755 " + Path.BASE + executable) diff --git a/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala b/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala index 477f3af6..9d30e727 100644 --- a/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala +++ b/src/main/scala/com/github/shadowsocks/ShadowsocksNatService.scala @@ -160,12 +160,8 @@ class ShadowsocksNatService extends Service with BaseService { }) val args = "pdnsd -c " + Path.BASE + "pdnsd.conf" + val cmd = Path.BASE + args - val cmd = if (Build.VERSION.SDK_INT >= 20) { - "/system/bin/" + args - } else { - Path.BASE + args - } if (BuildConfig.DEBUG) Log.d(TAG, cmd) Console.runRootCommand(cmd) } @@ -190,11 +186,7 @@ class ShadowsocksNatService extends Service with BaseService { ConfigUtils.printToFile(new File(Path.BASE + "redsocks.conf"))(p => { p.println(conf) }) - val cmd = if (Build.VERSION.SDK_INT >= 20) { - "/system/bin/" + args - } else { - Path.BASE + args - } + val cmd = Path.BASE + args Console.runRootCommand(cmd) }