private boolean setLcdDensity(int newDensity) { Helpers.getMount("rw"); if (!(new CMDProcessor() .su .runWaitFor( "busybox sed -i 's|ro.sf.lcd_density=.*|" + "ro.sf.lcd_density" + "=" + newDensity + "|' " + "/system/build.prop") .success())) { showRootDeniedInfoDialog(); return false; } Helpers.getMount("ro"); return true; }