Well, I've been diving in the murky waters of low-level Android programming (native C/C++ using the CodeSourcery toolchain). I tried out the executable on an emulator and it worked. I'd like to try it out on a real device. So I plugged in my nexus and pushed the files on to the filesystem. Then I tried to execute the binary, and I got a permission error. It really doesn't matter how I mount it, or where I send it, I'm not root and it's not letting me execute it. Is there any way to run a program like this on a non-rooted phone?
Is it possible to run a native arm binary on a non-rooted android phone?
16k Views Asked by AnimatedRNG At
1
There are 1 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in ANDROID-NDK
- Debug native code in Android Studio
- dlopen failed: cannot locate symbol "cblas_sdsdot" referenced by "libgsl.so"
- GSL: nm outputs "undefined Symbol (U)"
- Eclipse not recognizing CygWin gcc
- Android APK filepath layout for NDK binary executables how-to
- Android : Loading pre-built library - Circular dependency dropped
- Android NDK code (jni interface)
- Android NDK - multlib support using gradle
- Android Crashlytics ndk; values of NdkOut and NdkLibsOut in build.gradle
- How to update Android NDK in place?
- Android NDK / Exceptions?
- Android NDK - Including prebuilt static libraries gives undefined reference errors
- Receiving sensor events in worker thread (Android native)
- ndk-build outputs ‘error adding symbols. File in wrong format’
- How to update Android jni code changings
Related Questions in ARM
- Why Device Tree Structure (DTS) file is needed both in bootloader and kernel source code?
- How can I use LD to place ARM reset vectors in a program segment
- Errors in makefile for qemu 0.14.1 in ubuntu 15.04 64 bit
- Text as parameter in inline assembly (ARM)?
- GSL: nm outputs "undefined Symbol (U)"
- How to address multiple definition compiler error
- Did anyone compiled GSL for androind?
- Linker Error on cross compiling Project in eclipse
- How to set privilaged mode in ARM Cortex-A8?
- Why is a write to a memory-mapped peripheral register not actioned (LPC43xx)?
- what's ARM TCM memory
- Traversing a string using arm assembly inside V8 source
- C Global declared in ISR
- Which is better? int8_t vs int32_t in 32 bits MCU
- Cannot find -lgtk-x11-2.0. Also, some modules are not found by cmake, though they are installed
Related Questions in ROOT
- MySql can not grant privileges to root
- MariaDB installed without password prompt
- .htaccess root changed with mod_rewrite
- Go root, create tmux, send commands and then attach - all via a single SSH command in a bash script
- PHP: take a path from site root given an absolute path
- Redirect from server root directory to apache root directory
- Access denied for user 'root'@'localhost' (using password: YES) EVEN when the Password works on PhpMyAdmin
- Reading eeprom on linux without root right
- Vanilla Android allow direct SU/Root access
- How do I connect the RIGHT way from One Server SQL to another and make updates?
- How to define custom location for crossdomain.xml file?
- MySQL: Access denied for user 'root'@'localhost' Mac osx
- Control another tab bar controller's view to root view by Swift code
- Get the output from executed commands through android app
- Is it possible to pipe the password to login as root , rather that typing the password when it prompts in command line?? - Korn shell
Related Questions in CODESOURCERY
- CodeSourcery linker errors to static library
- Cross-compiling Linux kernel for ARM on Windows using Sourcery Toolchain
- MIPS GCC compiling wrong MIPS release?
- Anyway to see list of preprocessor defined macros?
- Cross Compiling Perl or Expect for MIPS Processor
- Pthread support for Power arch in Codesourcery toolchain on Windows
- Unable to build static library for arm6/arm7 using sourcery lite edition toolchain, C++, Eclipse on Mac OS?
- Compiling For Powerpc using gcc
- Cross-Compiling Armadillo Linear Algebra Library
- gdb - generate-core-file for remote target?
- Comparing ELF/binary files generated from different versions of a toolchain
- Linux USB debug connection to LuminaryMicro evaluation board
- Replacement for Sourcery CodeBench for Verifone DTK
- Using OpenOCD for debugging STM32F1xx Discovery board (ST-Link)
- CodeSourcery CS3 interrupt handler override
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
After using the toolchain included in the Android NDK to compile your binaries, it is possible to package them with a typical Android app and have them spawn as subprocesses.
You'll have to include all the necessary files within the assets folder of your application. In order to run them, you have to have the program copy them from the assets folder to a runnable location like: /data/data/com.yourdomain.yourapp/nativeFolder
You can do this like so:
Keep in mind that the assetPath is not absolute but in respect to assets/.
IE: "assets/nativeFolder" is just "nativeFolder"
To then run your application and read its output you could do something like this: