From: Marius Gavrilescu Date: Mon, 25 Aug 2014 11:21:21 +0000 (+0300) Subject: Move to /system/priv-app instead of /system/app when api level >= 19 X-Git-Tag: 0.000_002~6 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=6378595ca19bc3b4552e937e6715e0e5b2e02245;p=fonbot.git Move to /system/priv-app instead of /system/app when api level >= 19 --- diff --git a/src/ro/ieval/fonbot/FonBotPreferenceActivity.java b/src/ro/ieval/fonbot/FonBotPreferenceActivity.java index 89b8682..eae2b0f 100644 --- a/src/ro/ieval/fonbot/FonBotPreferenceActivity.java +++ b/src/ro/ieval/fonbot/FonBotPreferenceActivity.java @@ -106,10 +106,11 @@ public final class FonBotPreferenceActivity extends PreferenceActivity { return true; try { + final String privapp = android.os.Build.VERSION.SDK_INT < 19 ? "app" : "priv-app"; final String remountCommand="mount -o remount,rw /system"; - final String copyToSystemCommand="cp "+info.sourceDir+" /system/app/FonBot.apk"; - final String chmodSystemCommand="chmod 644 /system/app/FonBot.apk"; - final String rmSystemCommand="rm /system/app/FonBot.apk"; + final String copyToSystemCommand="cp "+info.sourceDir+" /system/" + privapp + "/FonBot.apk"; + final String chmodSystemCommand="chmod 644 /system/" + privapp + "/FonBot.apk"; + final String rmSystemCommand="rm /system/" + privapp + "/FonBot.apk"; final String copyToUserCommand="cp "+info.sourceDir+" /data/app/FonBot.apk"; final String chmodUserCommand="chmod 644 /data/app/FonBot.apk"; final String rmUserCommand="rm "+info.sourceDir;