| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -321,14 +321,17 @@ public static String getAppProcessRelocate(Context context, String appProcessBas | |||
| 321 | 321 | } | |
| 322 | 322 | } | |
| 323 | 323 | ||
| 324 | + boolean onData = path.startsWith("/data/"); | ||
| 325 | + | ||
| 324 | 326 | String appProcessCopy; | |
| 325 | 327 | if (guessIfAppProcessIs64Bits(appProcessBase)) { | |
| 326 | 328 | appProcessCopy = path + "/.app_process64_" + uuid; | |
| 327 | 329 | } else { | |
| 328 | 330 | appProcessCopy = path + "/.app_process32_" + uuid; | |
| 329 | 331 | } | |
| 330 | 332 | preLaunch.add(String.format(Locale.ENGLISH, "%s cp %s %s >/dev/null 2>/dev/null", box, appProcessBase, appProcessCopy)); | |
| 331 | - preLaunch.add(String.format(Locale.ENGLISH, "%s chmod 0700 %s >/dev/null 2>/dev/null", box, appProcessCopy)); | ||
| 333 | + preLaunch.add(String.format(Locale.ENGLISH, "%s chmod %s %s >/dev/null 2>/dev/null", box, onData ? "0766" : "0700", appProcessCopy)); | ||
| 334 | + if (onData) preLaunch.add(String.format(Locale.ENGLISH, "restorecon %s >/dev/null 2>/dev/null", appProcessCopy)); | ||
| 332 | 335 | postExecution.add(String.format(Locale.ENGLISH, "%s rm %s >/dev/null 2>/dev/null", box, appProcessCopy)); | |
| 333 | 336 | return appProcessCopy; | |
| 334 | 337 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -76,8 +76,11 @@ public static List<String> patchLaunchScript(Context context, List<String> scrip | |||
| 76 | 76 | // copy our executable | |
| 77 | 77 | String libSrc = RootJava.getLibraryPath(context, "daemonize"); | |
| 78 | 78 | String libDest = app_process_path + "/.daemonize_" + AppProcess.uuid; | |
| 79 | + boolean onData = libDest.startsWith("/data/"); | ||
| 80 | + | ||
| 79 | 81 | ret.add(String.format(Locale.ENGLISH, "%s cp %s %s >/dev/null 2>/dev/null", AppProcess.box, libSrc, libDest)); | |
| 80 | - ret.add(String.format(Locale.ENGLISH, "%s chmod 0700 %s >/dev/null 2>/dev/null", AppProcess.box, libDest)); | ||
| 82 | + ret.add(String.format(Locale.ENGLISH, "%s chmod %s %s >/dev/null 2>/dev/null", AppProcess.box, onData ? "0766" : "0700", libDest)); | ||
| 83 | + if (onData) ret.add(String.format(Locale.ENGLISH, "restorecon %s >/dev/null 2>/dev/null", libDest)); | ||
| 81 | 84 | ||
| 82 | 85 | // inject executable into command | |
| 83 | 86 | int idx = line.indexOf(app_process); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments