0

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 :(

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
CodeBlue
  • 340
  • 2
  • 4
  • 9

1 Answers1

1

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.

CodeBlue
  • 340
  • 2
  • 4
  • 9