external/koush/Superuser
修订版 | 3913a4f8a07d1f413fcceeb45b53716ede301b7b (tree) |
---|---|
时间 | 2014-08-04 23:08:23 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Run the Superuser app in system uid
The app needs system uid to change the property persist.sys.root_access.
Always install init.superuser.rc no matter it's embedded or not.
@@ -50,8 +50,6 @@ ALL_DEFAULT_INSTALLED_MODULES += $(SYMLINKS) | ||
50 | 50 | ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ |
51 | 51 | $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SYMLINKS) |
52 | 52 | |
53 | -ifdef SUPERUSER_EMBEDDED | |
54 | - | |
55 | 53 | # make sure init.superuser.rc is imported from |
56 | 54 | # init.rc or similar |
57 | 55 |
@@ -59,13 +57,16 @@ SUPERUSER_RC := $(TARGET_ROOT_OUT)/init.superuser.rc | ||
59 | 57 | $(SUPERUSER_RC): $(LOCAL_PATH)/init.superuser.rc | $(ACP) |
60 | 58 | $(copy-file-to-new-target) |
61 | 59 | |
60 | +ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(SUPERUSER_RC) | |
61 | + | |
62 | +ifdef SUPERUSER_EMBEDDED | |
63 | + | |
62 | 64 | SUPERUSER_MARKER := $(TARGET_OUT_ETC)/.has_su_daemon |
63 | 65 | $(SUPERUSER_MARKER): $(LOCAL_INSTALLED_MODULE) |
64 | 66 | @mkdir -p $(dir $@) |
65 | 67 | @rm -rf $@ |
66 | 68 | $(hide) touch $@ |
67 | 69 | |
68 | -ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ | |
69 | - $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(SUPERUSER_RC) $(SUPERUSER_MARKER) | |
70 | +ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(SUPERUSER_MARKER) | |
70 | 71 | |
71 | 72 | endif |
@@ -3,6 +3,8 @@ include $(CLEAR_VARS) | ||
3 | 3 | |
4 | 4 | LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 |
5 | 5 | LOCAL_PACKAGE_NAME := Superuser |
6 | +LOCAL_CERTIFICATE := platform | |
7 | +LOCAL_PRIVILEGED_MODULE := true | |
6 | 8 | LOCAL_SRC_FILES := $(call all-java-files-under,src) $(call all-java-files-under,../../Widgets/Widgets/src) |
7 | 9 | |
8 | 10 | LOCAL_AAPT_INCLUDE_ALL_RESOURCES := true |
@@ -1,6 +1,7 @@ | ||
1 | 1 | <?xml version="1.0" encoding="utf-8"?> |
2 | 2 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 | package="com.koushikdutta.superuser" |
4 | + android:sharedUserId="android.uid.system" | |
4 | 5 | android:versionCode="1030" |
5 | 6 | android:versionName="1.0.3.0" > |
6 | 7 |