aboutsummaryrefslogtreecommitdiffstats
path: root/run-as/Android.mk
diff options
context:
space:
mode:
authorDavid 'Digit' Turner <digit@google.com>2010-03-02 18:05:23 -0800
committerDavid 'Digit' Turner <digit@google.com>2010-03-17 11:02:08 -0700
commit1f4d95296acf34a93128332441782a80c10845b4 (patch)
tree2b8cf38a4716b2c622c564d3a7da82022cdaf9c9 /run-as/Android.mk
parent5fc070be8593f39f5140ab63fb6f5eccceb1dc83 (diff)
downloadsystem_core-1f4d95296acf34a93128332441782a80c10845b4.tar.gz
system_core-1f4d95296acf34a93128332441782a80c10845b4.tar.bz2
system_core-1f4d95296acf34a93128332441782a80c10845b4.zip
Add 'run-as' command implementation as set-uid program.
Typical usage is 'run-as <package-name> <command>' to run <command> in the data directory, and the user id, of <package-name> if, and only if <package-name> is the name of an installed and debuggable application. This relies on the /data/system/packages.list file generated by the PackageManager service. BEWARE: This is intended to be available on production devices !
Diffstat (limited to 'run-as/Android.mk')
-rw-r--r--run-as/Android.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/run-as/Android.mk b/run-as/Android.mk
new file mode 100644
index 00000000..326f5afe
--- /dev/null
+++ b/run-as/Android.mk
@@ -0,0 +1,12 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES:= run-as.c package.c
+
+LOCAL_MODULE:= run-as
+
+LOCAL_FORCE_STATIC_EXECUTABLE := true
+
+LOCAL_STATIC_LIBRARIES := libc
+
+include $(BUILD_EXECUTABLE)