Code example for DataOutputStream

Methods: flush, writeBytes

0
					final Runtime run = Runtime.getRuntime(); 
					DataOutputStream out = null; 
					Process p = null; 
					try { 
		                p = run.exec("su"); 
						out = new DataOutputStream(p.getOutputStream()); 
						out.writeBytes("busybox mount -o remount rw /system\n");				 
						out.writeBytes("busybox rm /system/app/Wallpapers.apk\n");	 
						out.writeBytes("busybox mount -o remount ro /system\n");										 
                        out.writeBytes("reboot\n"); 
						out.flush(); 
					    } catch (IOException e) { 
						    e.printStackTrace(); 
						    return; 
					    } 
 
				    } 
			    }; 
			    cmdThread.start(); 
			} 
			mWallpapers.setEnabled(false);