using android aapt in java program-Collection of common programming errors
Old question, I know, but try this out:
String[] cmd = {"aapt", "package", "-u", "-f", "-F", "/"//home//jay//testing_FILES.apk/"", "/"//home//jay//testing_FILES/""};
Runtime run = Runtime.getRuntime();
Process pr = null;
try {
pr = run.exec(cmd);
pr.waitFor();
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
} finally {
if(pr != null){
close(pr.getOutputStream());
close(pr.getInputStream());
close(pr.getErrorStream());
pr.destroy();
}
}