Skip to content
Advertisement

android Use Linux tools stored at assets folder

I want to use tools from Linux which not available in Android by default such as iw and iperf. I saw Android applications that use this tools (like this). There are two ways to do it.

First: get root rights on device and put file of the tool to the system/bin/ folder.

Second: put file of the tool to assets folder of Android project and somehow use it.

Applications from Play Market use second way. But I don’t know, how it cuold be done. Is there any description of implementation of second way?

Advertisement

Answer

https://xjaphx.wordpress.com/2011/10/02/store-and-use-files-in-assets/

This the best example of what you want to do.

For putting executable in assest see https://stackoverflow.com/a/5642593/775964

Advertisement