Commits

Anonymous committed 931a44a Draft

log more ish

Comments (0)

Files changed (2)

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

 					exit_value = process.waitFor();
 					stdout = getStreamLines(process.getInputStream());
 					stderr = getStreamLines(process.getErrorStream());
+					if (Constants.IS_DEBUG) {
+						Log.i(TAG, "cmd: " + s);
+						Log.i(TAG, "exit_value: " + exit_value);
+						Log.i(TAG, "stdout: " + stdout);
+						Log.i(TAG, "stderr: " + stderr);
+					}
 				} catch (final InterruptedException e) {
 					Log.e(TAG, "runWaitFor " + e.toString());
 				} catch (final NullPointerException e) {
 					setenv = "LD_LIBRARY_PATH=" + LD_LIBRARY_PATH + " ";
 				}
 				for (String cmd : cmds) {
+					if (Constants.IS_DEBUG) {
+						Log.i(TAG, "running cmd: " + cmd);
+					}
 					toProcess.writeBytes(setenv + cmd + "\n");
 				}
 				toProcess.writeBytes("exit\n");

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

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