Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
鉴于我已经在资源/原始目录中编译了 linux exe 文件。我可以使用 Process.execute("./resources/raw/filename") 执行它还是我必须具有特殊权限(如 ROOT 或 smth)?
首先,您是如何编译可执行文件的?我希望你已经使用了交叉编译器。
是的,您可以执行应用程序...无需特殊权限。
我没有尝试过这种方法,(Process.execute())但我可以确认Runtime.getRuntime().exec("/path/a.out");工作...... :)
Process.execute()
Runtime.getRuntime().exec("/path/a.out");
当您执行它时,该应用程序将具有与您的应用程序相同的权限级别(非 root)......除非您对设备进行了 root。