Reputation: 350
I'm finding a way to use Runtime.exec() in Linux. I have an aapt Linux version and trying to get information of apk file with aapt. I tried:
rt.exec(new String[] {"bash", "-c","." + new File(".").getCanonicalPath() + "dist/lib/aapt d badging \"" + files + "\""});
but it seems wrong. It doesn't return result. Normal command in Terminal that worked:
$ ./home/codeblue/NetbeansProjects/APKTools/dist/lib/aapt d badging "Zing Mp3.apk"
Anyone please helps :(
Upvotes: 0
Views: 779
Reputation: 350
Oh i found out that using absolute path isn't working. With "-c" i use
Runtime.getRuntime().exec(new String[] { "/bin/bash", "-c", " ./lib/aapt d badging ZingMp3.apk"});
This's working fine. Thanks for helping me.
Upvotes: 1