]> iEval git - fonbot.git/commitdiff
Move to /system/priv-app instead of /system/app when api level >= 19
authorMarius Gavrilescu <marius@ieval.ro>
Mon, 25 Aug 2014 11:21:21 +0000 (14:21 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Mon, 25 Aug 2014 11:21:21 +0000 (14:21 +0300)
src/ro/ieval/fonbot/FonBotPreferenceActivity.java

index 89b8682055c949050d33f68535abd65a61da3344..eae2b0f714acf1e6a49b8afe882e11412393c5ad 100644 (file)
@@ -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;
This page took 0.020485 seconds and 4 git commands to generate.