phhusson / Superuser

Keeping koush's Superuser fresh
GNU General Public License v3.0
426 stars 50 forks source link

Why another Superuser?

Why NOT use this Superuser?

Checking out the source

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 developer.android.com or use the latest and set NDK_TOOLCHAIN_VERSION=4.9.

Building the su and placeholder binaries

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, and the placeholder will be built into Superuser/Superuser/libs/armeabi/placeholder

Building the application

(Yes I use debug builds for the moment.)

Configuring the Package Name

//The Superuser distributed on Google Play is in the package name com.koushikdutta.superuser. (To be changed) 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 build.gradle

applicationId "com.thirdparty.superuser"

How to install?

You can install su in various different ways. All are not listed here.

Editing /system partition, and using placeholder binary

One way is through placeholder binary. It doesn't require to modify boot.img, only system partition. This doesn't work on Android M, and is considered obsolete. (SELinux policies aren't keeping up)

To install it this way, here are the needed steps:

From sources

Please refer to https://github.com/seSuperuser/AOSP-SU-PATCH/

Editing boot partition

Please refer to https://github.com/phhusson/super-bootimg/

TODO List

Here is a list of what's left to do, to be compatible with Chainfire's SuperSU (as documented at su.chainfire.eu):

Here is an additional TODO list:

Contact me

Communication

This project is in REALLY early state, though some points have to be mentioned:

Organisation

https://trello.com/b/adDbOmV0/superuser

Prebuilt images

I setup a robot to build rooted boot.img. The result is available at superuser.phh.me. Each boot.img is signed with the keystore at superuser.phh.me/keystore.img. Every boot.img contains the latest su and SELinux policy.

The matching APK is available at play.google.com/store/apps/details?id=me.phh.superuser.

If you want to add some ROMs or boot.img configurations into the auto-builder, open a pull-request or create an issue at github.com/phhusson/super-bootimg/tree/master/known-imgs.