Commits

Anonymous committed 9c5d8dc Draft

Add license file

Comments (0)

Files changed (4)

+Copyright (C) 2012 Jared Rummler
+
+This program is free software: you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free Software
+Foundation, either version 3 of the License, or (at your option) any later
+version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+details.
+
+You should have received a copy of the GNU General Public License along with
+this program. If not, see <http://www.gnu.org/licenses/>.
+Busybox Installer attemps to install busybox on a rooted Android device. 
+
+Google Play Link:
+https://play.google.com/store/apps/details?id=com.jrummy.busybox.installer
+
+Licensed under GPL v3

project.properties

 # project structure.
 
 # Project target.
-target=android-15
+target=android-14

src/com/jrummy/busybox/installer/util/Helpers.java

 	}
 
 	public static boolean getMount(String path, String mount) {
-		CMDProcessor cmd = new CMDProcessor();
+		CMDProcessor.SH shell = new CMDProcessor().su;
 		String mounts[] = getMounts(path);
 		CMDProcessor.CommandResult result;
 		if (mounts != null && mounts.length >= 3) {
-			result = cmd.su.runWaitFor(
-					"mount -o " + mount + ",remount -t " + mounts[2] + " " + mounts[0] + " " + mounts[1]);
+			String point = mounts[2];
+			String device = mounts[0];
+			result = shell.runWaitFor("mount -o " + mount + ",remount -t " + 
+					point + " " + device + " " + path);
 			if (result.success()) {
 				return true;
 			}
-			result = cmd.su.runWaitFor(
-					"toolbox mount -o " + mount + ",remount -t " + mounts[2] + " " + mounts[0] + " " + mounts[1]);
+			result = shell.runWaitFor("toolbox mount -o " + mount + ",remount -t " + 
+					point + " " + device + " " + path);
 			if (result.success()) {
 				return true;
 			}
 		}
-		return cmd.su.runWaitFor(
+		return shell.runWaitFor(
 				"busybox mount -o remount," + mount + " " + path).success();
 	}
 
 	public static String getMountCommand(String path, String mount) {
-		final String mounts[] = getMounts(path);
+		String mounts[] = getMounts(path);
 		if (mounts != null && mounts.length >= 3) {
-			return "mount -o " + mount + ",remount -t " + mounts[2] + " " + mounts[0] + " " + mounts[1];
+			String point = mounts[2];
+			String device = mounts[0];
+			return "mount -o " + mount + ",remount -t " 
+					+ point + " " + device + " " + path;
 		}
 		return "busybox mount -o remount,rw " + path;
 	}