Skip to content

jdexorg/jrunas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jrunas

A run-as implementation without the app-debuggable capability check — run a command in any installed app's uid / SELinux / data-directory context on a rooted device. (Equivalent in purpose to JEB's ranod.)

Building

Requires the Android NDK and CMake.

export NDK=/path/to/android-ndk
for ABI in arm64-v8a armeabi-v7a x86_64 x86; do
  cmake -S . -B build/$ABI \
    -DCMAKE_TOOLCHAIN_FILE=$NDK/build/cmake/android.toolchain.cmake \
    -DANDROID_ABI=$ABI -DANDROID_PLATFORM=android-24
  cmake --build build/$ABI -j
done

Binaries land at build/<abi>/jrunas.

Usage

jrunas is launched as root on a rooted device:

adb push build/arm64-v8a/jrunas /data/local/tmp/jrunas
adb shell su -c '/data/local/tmp/jrunas <package-name> [--user <id>] [<command> [<args>]]'

Host tests

The packages.list parser has host unit tests:

c++ -std=c++17 -I. tests/test_packages_list.cpp packages_list.cpp -o /tmp/jrunas_test_pl
/tmp/jrunas_test_pl

About

run-as implementation without app debugging capability check

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors