|Superuser||2016-01-06||Paulo Sergio Travaglia||[1fc4df] Fixes for koush's Superuser on marshmallow|
|.gitignore||2013-11-14||Koushik Dutta||[6d95bf] execv invocation fixes|
|Android.mk||2014-08-16||Ricardo Cerqueira||[012a22] su: Don't forcefully add the bin symlink to the...|
|LICENSE||2013-02-27||Koushik Dutta||[91799b] license|
|README.md||2013-11-15||Kevin Cernekee||[b8d17b] README: Update required SDK and NDK versions|
|init.superuser.rc||2014-11-26||Ricardo Cerqueira||[7c7a44] init: Update daemon contexts for enforcing seli...|
|local_manifest.xml||2013-02-28||Koushik Dutta||[9628a3] add local_manfest.xml for AOSP embedding|
Translations are very much appreciated, but please do not submit translations on Github! Instead, use the review submission process on CyanogenMod's gerrit instance.
You'll need the "Widgets" dependency.
These repositories do not keep the actual projects in the top level directory.
This is because they contain tests, libs, and samples.
Make sure the SDK Platform for API 19 is installed, through the Android SDK Manager. Install NDK Revision 9b from here.
In Eclipse, import Widgets/Widgets and Superuser/Superuser. It should Just Work (TM).
In this directory, create a file called local.properties. This file is used by ant for custom properties. You need to specify the location of the ndk directory and your keystore parameters:
ndk.dir=/Users/koush/src/android-ndk key.store=/Users/koush/.keystore key.alias=mykey
If you do not have a release key yet, create one using keytool.
Set up your SDK path (this is the directory containing platform-tools/, tools/, etc.):
Then you can build:
bin/update.zip - Recovery installable zip
bin/Superuser-release.apk - Superuser Android app
libs/armeabi/su - ARM su binary
libs/x86/su - x86 su binary
* libs/mips/su - MIPS su binary
You can use ant as shown above, to build the binary, but it can also be built without building the APK.
Make sure you have the android-ndk downloaded with the tool "ndk-build" in your path.
The su binary will built into Superuser/Superuser/libs/armeabi/su.
ROM developers are welcome to distribute the official Superuser APK and binary that I publish. That will
allow them to receive updates with Google Play. However, you can also build Superuser as part of your
build, if you choose to.
There are two ways to include Superuser in your build. The easiest is to build the APK as a separate app.
To do that, simply add the local_manifest.xml as described below. The second way is by embedding it
into the native Android System Settings.
Add the local_manifest.xml to your .repo/local_manifests
The Superuser distributed on Google Play is in the package name com.koushikdutta.superuser.
To prevent conflicts with the Play store version, the build process changes the package
name to com.thirdparty.superuser. You can configure this value by setting the following
in your vendor makefile or BoardConfig:
SUPERUSER_PACKAGE := com.mypackagename.superuser
You will not need to change the package name as described above. Superuser will simply go
into the com.android.settings package.
First, in a product makefile (like vendor/cm/config/common.mk), specify the following:
SUPERUSER_EMBEDDED := true
To modify packages/apps/Settings, you will need this patch.
The patch simply references the sources checked out to external/koush and makes changes
to XML preference files and the AndroidManifest.xml. It is a very minimal change.