I’m trying to execute a command within an application. I’m doing it using a library called RootTools. The command I’m using is:
RootTools.getShell(true).add(new CommandCapture(0, 'dd if=boot.img of=/dev/block/platform/omap/omap_hsmmc.0/by-name/boot')).waitForFinish();
The application works fine when I enabled Eclipse debugging mode. However that line did not work when it runs normal mode.
This class uses AsyncTask which allows me to execute another command once the main task is completed in a method called onPostExecute().
I noticed that under any mode the method onPostExecute works perfectly. But not the main method, doInBackground().
I tried placing a Thread.sleep to add some delay but that didn’t help either.
Try turning RootTools debugging on when running that command and verify that the command is being executed by examining the debug output in logcat.
RootTools.debugMode = true;