OSDN Git Service

Use new assets/<ARCH>/reboot binary
authorKevin Cernekee <cernekee@gmail.com>
Thu, 7 Nov 2013 01:26:42 +0000 (17:26 -0800)
committerKevin Cernekee <cernekee@gmail.com>
Thu, 7 Nov 2013 04:39:53 +0000 (20:39 -0800)
Now that we are building the reboot binary from source, we'll need to
retrieve it from the proper subdirectory according to the device's CPU
architecture.

Superuser/assets/reboot [deleted file]
Superuser/src/com/koushikdutta/superuser/MainActivity.java

diff --git a/Superuser/assets/reboot b/Superuser/assets/reboot
deleted file mode 100755 (executable)
index 3f54857..0000000
Binary files a/Superuser/assets/reboot and /dev/null differ
index 9eca379..ca50336 100644 (file)
@@ -117,7 +117,7 @@ public class MainActivity extends BetterListActivity {
                     zout.close();
 
                     ZipFile zf = new ZipFile(getPackageCodePath());
-                    ZipEntry ze = zf.getEntry("assets/reboot");
+                    ZipEntry ze = zf.getEntry("assets/" + getArch() + "/reboot");
                     InputStream in;
                     FileOutputStream reboot;
                     StreamUtility.copyStream(in = zf.getInputStream(ze), reboot = openFileOutput("reboot", MODE_PRIVATE));