0

Where, inside an apk - say one that's already written, and is decompiled via apkeditor - do I insert a shell script to launch it (I.e. using an existing link in an apk to fire a shell script {pm enable [packagename] } )?

This ia what was given in another post:

{
    proc = runtime.exec("Is_This_Where_It_Goes?");
    osw = new OutputStreamWriter(proc.getOutputStream());
    osw.write(command);
    osw.flush();
    osw.close();
}

Or somewhere else?

I'm looking to do a ' pm enable ' in a [de/re]compiled app, and this is probably the easiest method.

Thanks!

Nothing has been tried, since no location I could fathom worked. :(

  • 1
    Off the top of my head, I don't think apps have permission to run `pm disable`. See, e.g., [How to hide other apps in Android?](https://stackoverflow.com/q/36362056/208273) – Ryan M Apr 13 '23 at 00:01
  • No, apps generally don't, but I CAN run ' su -c ' passing the command over for permissions... I actually meant 'pm enable'. Sorry. – Emmanuel Goldstein Apr 13 '23 at 00:10
  • Oh, you have root. I'll link a relevant question, then. – Ryan M Apr 13 '23 at 01:51

0 Answers0