FORUMS
Remove All Ads from XDA

[STABLE][2016.07.05] SuperSU v2.76 [CLOSED]

10,814 posts
Thanks Meter: 80,695
 
By Chainfire, XDA Ad-Free Senior Moderator / Senior Recognized Developer - Where is my shirt? on 9th March 2012, 10:20 AM
Thread Closed Email Thread
THIS IS AN OLD THREAD

Stable releases have moved to the new thread here:
http://forum.xda-developers.com/apps...lease-t3452703

-------------------------------------------------------------


SuperSU is the Superuser access management tool of the future

!!! SuperSU requires a rooted device !!!

SuperSU allows for advanced management of Superuser access rights for all the apps on your device that need root. SuperSU has been built from the ground up to counter a number of problems with other Superuser access management tools.


Features include:

- Superuser access prompt
- Superuser access logging
- Superuser access notifications
- Per-app notification configuration
- Temporary unroot
- Deep process detection (no more unknowns)
- Works in recovery (no more segfaulting)
- Works when Android isn't properly booted
- Works with non-standard shell locations
- Always runs in ghost mode
- Wake on prompt
- Convert to /system app
- Complete unroot
- Backup script to survive CyanogenMod nightlies
- Icon selectable from 5 options + invisible
- Theme selectable from 4 options
- Launch from dialer: *#*#1234#*#* or *#*#7873778#*#* (*#*#SUPERSU#*#*)
NOTE: Not all phones take both codes. On some phones you need to use single *# instead of double *#*#

The Pro version additionally offers:

- OTA survival mode (no guarantees)
- Full color-coded command content logging (input/output/error)
- Per-app logging configuration
- Per-app user override
- Grant/deny root to an app for a set amount of time
- PIN protection
- Per-app PIN protection
- Adjust auto-deny countdown


PROTIP:

For extra performance, disable notifications. Logging does not impact performance much.


Redistribution

Yes, you are allowed to embed the (free, non-Pro) SuperSU apk and su binaries in your own custom ROMs ! As is standard (and done by the attached ZIP), normal is to use /system/app/Superuser.apk for the apk and /system/xbin/su for the binary.


Want to help translate ?

See SuperSU project on GetLocalization ! http://www.getlocalization.com/supersu/


Download:

SuperSU on Google Play (free)

SuperSU *Pro* on Google Play (Pro/donate addon, requires free version)

TWRP / FlashFire installable ZIP:
Stable: http://download.chainfire.eu/supersu-stable
Beta: http://download.chainfire.eu/supersu-beta
Latest: http://download.chainfire.eu/supersu
Note that if you are already rooted, installing through Play is by far the easiest way to install SuperSU !


Issues installing / updating binaries ?

There's a thread for that: http://forum.xda-developers.com/apps...lures-t2907365


Education

Want to learn how to use "su" correctly from your own apps ? How-To SU !


ROM Developers

Feel free to include the (free version, unmodified) SuperSU APK in your ROMs. You do not need to ask me for permission to include it.

It would be nice if you would include minor advertisement in your ROM description, such as "Powered by SuperSU", or "Please support SuperSU". This is not a requirement, merely a request.
Attached Thumbnails
Click image for larger version

Name:	screenshot_inapp.png
Views:	1360083
Size:	47.0 KB
ID:	938854   Click image for larger version

Name:	screenshot_apps.png
Views:	871102
Size:	74.5 KB
ID:	938855   Click image for larger version

Name:	screenshot_apps_2.png
Views:	820334
Size:	69.2 KB
ID:	938856   Click image for larger version

Name:	screenshot_logs.png
Views:	717583
Size:	59.8 KB
ID:	938857   Click image for larger version

Name:	screenshot_logs_2.png
Views:	691889
Size:	78.5 KB
ID:	938858   Click image for larger version

Name:	screenshot_settings.png
Views:	657318
Size:	46.8 KB
ID:	938859   Click image for larger version

Name:	sacreenshot_pin.png
Views:	644712
Size:	56.5 KB
ID:	938860  
The Following 4,460 Users Say Thank You to Chainfire For This Useful Post: [ View ]
 
 
9th March 2012, 10:25 AM |#2  
Chainfire's Avatar
OP Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 80,695
 
Donate to Me
More
Who, what, why ?!
As you may know, I make a lot of apps that use or require root. I also release rooted kernels. I run into a lot of issues with existing Superuser tools. More importantly, a lot of my users run into these issues as well and then email me about it. So I decided to do something about this. Doesn't mean these were problems you have ever seen, or will ever see.

And thus, I have written - pretty much from scratch - SuperSU. I have taken the su binary command line parameter parsing from Superuser, to make sure that is compatible. Aside from that, it is completely rewritten, because how I wanted to do a number of things was incompatible with the existing codebase.

This is not a stab at ChainsDD, or his skills. He has done great work and will no doubt continue to do so, however, I felt the need for some of these changes, and thus made them. This is an early release, so I expect there will be some unforseen issues somewhere.

From now on, all CF-Root and Mobile ODIN Pro (EverRoot) releases will be built around SuperSU.

Please note that SuperSU is not hardened-security-tested or reviewed, and may be exploitable (... as may other solutions ...).
The Following 1,029 Users Say Thank You to Chainfire For This Useful Post: [ View ]
9th March 2012, 10:25 AM |#3  
Chainfire's Avatar
OP Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 80,695
 
Donate to Me
More
Changelogs
14.01.2017 - v2.79 - SR3 - RELEASE NOTES
- Fix erroneously deleting SuperSU's copy of app_process on 6.0 since 2.79-SR1
- GUI: Fix app_process requirement detection when supersu context used
- Fully eliminate sugote binary, no longer needed due to SELinux handling improvements in earlier versions
- Support /system/xbin/sush as default shell
- Adjust LD_PRELOAD filtering to exclude suhide's libraries
- ZIP: Motorola: default to systemless mode

03.01.2017 - v2.79 - SR2 - RELEASE NOTES
- supolicy: fix some segfaults(NPEs) in pre-7.0 sepolicy handling
- ZIP: write boot block device once instead of twice (@_alexndr)
- (c) 2017 + CCMT

22.12.2016 - v2.79 - SR1 - RELEASE NOTES
- Expand Samsung detection
- GUI: reworked portions to work with 'supersu' context on 7.0+
- GUI: fix binary update notice when superuser disabled by user in some cases
- su: reworked portions to work with 'supersu' context on 7.0+
- su/GUI: improve responsiveness when device busy on 7.0+
- sukernel: fix cpio restore failure with very short filenames
- sukernel: no longer patches file_contexts(.bin)
- sukernel: revert force seclabel (no longer needed with 'supersu' context)
- supolicy: add "create", "auditallow", "auditdeny" policy commands
- supolicy: support "*" for permission/range parameter of "allow", "deny", "auditallow", "auditdeny", "allowxperm" policy commands
- supolicy: --live/--file no longer apply default patches if custom patches are supplied
- supolicy: --sdk=X option added (required for 7.0+)
- supolicy: reworked all SELinux rules for 7.0+, run as 'supersu' context
- ZIP: Separate slotselect and system_root logic
- ZIP: Adjust system/system_root device and mount-point detection
- ZIP: Fix minor errors in documentation
- ZIP/frp: Explicitly label /su

15.12.2016 - v2.79 - CCMT
- CCMT: Change "Upgrade to Pro" button color

30.11.2016 - v2.78 - SR5 - RELEASE NOTES
- Fix shell-based scripts/services possibly not being executed on 7.x firmwares
- Add SecurityLogAgent to Samsung KNOX detection
- sukernel: force seclabel

15.11.2016 - v2.78 - SR4 - RELEASE NOTES
- sukernel: improve FBE detection
- suinit: TWRP compatibility on slot-based systems
- ZIP: TWRP compatibility on slot-based systems

03.11.2016 - v2.78 - SR3 - RELEASE NOTES
- Fix 'Full Unroot' on slot-based systems
- sukernel: replace system symlink with bind mount
- sukernel: add missing slot check for system_root import
- sukernel: fix ramdisk backup segmentation fault
- supolicy: adjust priv_app policy to be able to call su
- launch_daemonsu: adjust su.img size detection
- ZIP: improve loop device setup
- ZIP: add factory reset protection (FRP variable, default if slots used)

29.10.2016 - v2.78 - SR2 - RELEASE NOTES
- File-based-encryption support
- CCMT: Add privacy policy dialog
- CCMT: Update translation files
- su+gui: support /system_root paths
- sukernel: add kernel binary extract/replace
- sukernel: add kernel cmdline extract/replace
- sukernel: add system_root import
- sukernel: add slot-kernel patch
- sukernel: support /boot paths
- suinit: new binary component
- launch_daemonsu: restructure to support /su in initramfs or system_root
- ZIP: Support systemless on 5.0 (requires 3rd party patches)
- ZIP: Support for A/B slot systems with / inside system partition

15.09.2016 - v2.78 - SR1 - RELEASE NOTES
- subinary: Adjust app_process detection with manipulated mount namespaces
- subinary: Adjust Zygote PID detection to prefer 64-bit
- subinary: Fix possible NPE in LD_PRELOAD sanitization
- subinary: In systemless mode, ensure PATH contains /su/bin and /su/xbin
- supolicy: Ensure zero-on-alloc for new rules
- supolicy: Fix parsing allowxperm with multiple sources/targets in a single definition
- ZIP/Systemless: Give su.d 60 seconds to execute (from 4 seconds)

01.09.2016 - v2.78 - CCMT
- CCMT: Change default icon from Emblem to Material
- CCMT: Update detection activity
- CCMT: Update guide activity
- CCMT: Update translation files

27.08.2016 - v2.77 - BETA - RELEASE NOTES
- ZIP/Systemless: Support for hexpatches (Note7)
- ZIP/Systemless: Additional logging in daemonsu launcher script

05.07.2016 - v2.76
- Clear logs now asks for confirmation
- Fixed memory leak that could ultimately lead to reboots or root not working
- Fixed an issue that might have causes root loss on temporary unroot
- ZIP/Systemless: /data/su.img resized from 32M to 96M, to make sure enough space is available for systemless modes such as xposed
- ZIP/Systemless: launch daemon on post-fs-data, if supported by device (6.0+, fallback to service)
- CCMT: Added guide screen for new users

19.05.2016 - v2.74-2 - BETA - RELEASE NOTES
- supolicy/sukernel: Prevent security updates to SELinux from being applied
- sukernel: backup and restore modified ramdisk files, to be able to re-root if boot image backup got lost
- ZIP: Only show TWRP warning on TWRP v2.x

10.05.2016 - v2.72 - BETA - RELEASE NOTES
- Add support for ChromeOS boot images (Pixel C)
- supolicy: Fix logging to logcat for some processes on some firmwares
- supolicy: Fix fsck of /data/su.img being denied on some firmwares
- ZIP: Add LESSLOGGING flag
- ZIP: Add KEEPVERITY flag
- ZIP: Add KEEPFORCEENCRYPT flag
- ZIP: Also read flags from /cache/.supersu (aside from /data/.supersu and /system/.supersu)

31.03.2016 - v2.71 - BETA
- Massive speed improvement in handling permissive domains
- N/RC/BETA merged with normal BETA release

14.03.2016 - v2.70 - BETA RC - RELEASE NOTES
- Rewrote re-enabling root after temp-disable
- supolicy: Improve permissive domain handling
- N: Disable forced encryption
- N: Fix remounting /system for some apps (relatime becomes noatime for ro mounts)
- ZIP: call users scripts without setting LD_LIBRARY_PATH

13.03.2016 - v2.69 - BETA RC - RELEASE NOTES
- su: Escape from audit-based safe mode
- supolicy: Update to new v30 sepolicy format
- supolicy: Add support for special case M sepolicy format
- supolicy: Add support for XPERM rules
- sukernel: Add support for binary version of file_contexts
- ZIP: Create mount point in ramdisk instead of script
- ZIP: Add support for binary version of file_contexts
- BINDSYSTEMXBIN: Now disabled by default
- launch_daemonsu: Perform fsck before mounting

28.02.2016 - v2.68 - BETA - RELEASE NOTES
- su: Add -mns/--mount-namespace option
- su: Fix issue with sdcard on Note4/5.1
- sukernel: Fix issue where writing to /dev could truncate early at 64k barriers
- supolicy: Fix logcat issue on Omni/CM/etc
- supolicy: Disable AUDITDENY entries, to make debugging easier for devs
- supolicy: Extend fake-permissive to work with new Samsung firmwares
- ZIP: Fix TWRP log truncating and screen output on installs embedded in other ZIPs
- ZIP: Improve loopback device setup handling
- ZIP: Add PERMISSIVE flag
- ZIP: Move variable reading to after /system and /data have been mounted
- ZIP: Added call to custom patcher script, if any (/data/custom_ramdisk_patch.sh)
- ZIP: chmod 0751 /su/bin

21.01.2016 - v2.67 - BETA
- (systemless) Improved deep sleep fix for Samsung 5.1+
- (systemless) Added fallback method to mounting /su on system boot
- supolicy: fix bug copying system_server capabilities to init
- supolicy: replaced transitions: copy capabilities and attributes, silence audits
- supolicy: work-around shell-based services being executed as undefined_service on Samsung 5.1+
- sukernel: refuse to patch ChromeOS boot image
- FSTABSYSTEMRW: flag removed; worked around remount /system r/w issue
- ZIP: improved handling of loop devices
- ZIP: detect boot image partition being a symlink to a file on /data, and skip wipe if so
- Updated translation files

03.01.2016 - v2.66 - BETA
- (systemless): Add deep sleep fix for Samsung 5.1+
- supolicy: Adjust Samsung 6.0 init shell
- ZIP: Patch recovery SELinux policy
- ZIP: Improve su.img mounting

Changelogs continue in the next post ...
The Following 190 Users Say Thank You to Chainfire For This Useful Post: [ View ]
9th March 2012, 10:25 AM |#4  
Chainfire's Avatar
OP Senior Moderator / Senior Recognized Developer - Where is my shirt?
Thanks Meter: 80,695
 
Donate to Me
More
Changelogs
Changelogs continued from the previous post ...

26.12.2015 - v2.65
- (systemless) Add /su/xbin to su.img and PATH
- ZIP: Fixed force close issue when custom boot image is used
- ZIP: Reworked remounting (prevents bugged write to r/o /system on flo)
- ZIP: Added warning that first reboot may take a few minutes/loops

20.12.2015 - v2.64 - BETA
- (systemless) Detect more boot image partition names
- (systemless) Blank partitions before writing to them
- (systemless) Ask to restore boot and recovery images on full unroot
- (systemless) Implement "uninstall competing superuser apps"
- (systemless) Samsung: prevent "KERNEL IS NOT SEANDROID ENFORCING" warning
- (systemless) Cleanup system install properly if present, fixes a number of possible bootloops
- ZIP: 6.0+: Detect firmwares that can reload sepolicy from /data and use system-based root on these ("allow init kernel:security { load_policy }")
- supolicy: Additional SELinux patches for M (reduced logging only)
- Update translations

10.12.2015 - v2.62 - BETA
- (systemless) Do not attempt to patch fstab symlinks
- (systemless) Implement feature to en/disable Superuser
- (systemless) Poor man's overlay on /system/xbin for compatibility reasons (hopefully temporary) [BINDSYSTEMXBIN]
- (systemless) ZIP: Add reading setup variables from /system/.supersu and /data/.supersu
- (systemless) ZIP: Add option to patch /system to rw in fstab [FSTABSYSTEMRW]
- (systemless) ZIP: Added call to custom patcher script, if any (/data/custom_boot_image_patch.sh)
-2 (systemless) ZIP: Fix calling wrong script name for custom patcher script
-2 (systemless) ZIP: Improve APK overwrite
-3 (systemless) ZIP: Do not move backups from /cache to /data, just copy them

07.12.2015 - v2.61 - BETA
- (systemless) Fix kernel partition detection for some Intel devices
- (systemless) Added warning not to allow TWRP to install its own SuperSU version
- (systemless) Wipe /data/security/ on flash
- (systemless) Simplified kernel partition detection
- (systemless) Added /system cleanup if needed, /data cleanup always
- (systemless) Fix fstab verity removal for devices that do not list partition in the option
- Full unroot: set partition read/write before writing to it
- ZIP: Silence many error message writing to TWRP's recovery log
- ZIP: Added more documentation to the script

05.12.2015 - v2.60 - BETA
- (systemless) Fixed ZIP installer breaking Pro
- (systemless) Added automatic kernel patcher to ZIP installer
- (systemless) Added sukernel tool
- (systemless) Bind mount /system/[x]bin/su to /su/bin/su
- (systemless) Fixed cleanup options in settings
- (systemless) Now available for 5.1.x (by default for Samsung only, full unroot/reflash system before update)
- Made reworked context switching available to 5.1.x (testing, should come to more APIs soon)
- Fixed recursive mount issue on Samsung 5.1.x that could ultimately lead to root being lost

30.10.2015 - v2.56 - BETA
- Support for systemless su binary locations

10.10.2015 - v2.52 - BETA
- Adjusted more policies for M
- Fixed an issue with reading logs on M
- Reworked --context/--cn parameter (testing, currently M only, should eventually move to all APIs)

08.10.2015 - v2.51 - BETA
- Add support for x86 PIE binaries

06.10.2015 - v2.50 - BETA
- Fixed tapjacking protection not working < 4.4.3 (AOSP issue 54193)
- Updated libsupol headers
- armv5/x86 binaries now NDK built instead of AOSP
- supolicy adjustments for Samsung 5.1.1
- Removed extra donation feature
- Toybox support

28.04.2015 - v2.49 - BETA
- Fixed some audits on 5.x (found on S6)

02.04.2015 - v2.48 - BETA
- TWRP/M9 issue fixed

02.04.2015 - v2.47 - BETA
- Improved King removal
- Detect 'OEM' (bad) TWRP

13.02.2015 - v2.46
- Backupscript adjustments
- Remove more alternate su binaries

20.01.2015 - v2.45
- Installer adjustments
- Backupscript adjustments
- Updated language files

07.01.2015 - v2.44 - BETA
- su.d scripts no longer use logwrapper, this can prevent some scripts from running
- supolicy timing adjustment (MotoG 2014 fix?)

03.01.2015 - v2.43 - BETA
- Backuptool script adjusted again
- Fix native NPE in username resolution
- Fix some update failures when coming from a different root tool on 5.0
- LD_PRELOAD sanitization
- (C) 2015

21.12.2014 - v2.42 - BETA
- Fix rootfs remount issue that could lead to strange behavior on (for example) HTC M7 and M8
- Backuptool support for /system/su.d
- Some policy adjustments for CM12

17.12.2014 - v2.41 - BETA
- Improved dumpstate work-around
- Improved killing dead per-uid daemonsu
- Backuptool support for Lollipop

16.12.2014 - v2.40
- /system/su.d now executed for all daemonsu firmwares
- Adjust sysinit context if present
- Updated language files

10.12.2014 - v2.39 - BETA
- Skip reverse connection watch on firmwares using supolicy (SGS5 5.0 fix?)
- Fixed daemonsu not starting on truly permissive Lollipop
- Adjust daemonisation code
- Small L theme adjustments
- Updated language files

07.12.2014 - v2.38 - BETA
- Watch for and kill dead per-uid daemonsu (SGS5 5.0 fix?)
- Fix crash on clearing logs on 2.x
- Fix possible NPE on open
- Fix possible NPE on en/disable root
- Moved additional donations to the bottom of settings
- Small L theme adjustments

01.12.2014 - v2.37 (Gingerbread? )
- Binary update requires less space on /system
- Updated language files

28.11.2014 - v2.36
- Use material theme on 5.0 when launched from settings
- Fixed crash on 2.x and 3.x devices
- Fixed TWRP installer issue for 4.2
- Updated language files

27.11.2014 - v2.35 - RELEASE NOTES
- Fix mount namespace separation somtimes being disabled
- Donations via IAPs (user request)

25.11.2014 - v2.30 - BETA - RELEASE NOTES
- Layout adjustments for Nexus Player
- Installer adjustments for latest TWRPs
- Hiding icon now also hides from Leanback launcher
- Icon replacements
- ACCESS_SUPERUSER permission is gone

20.11.2014 - v2.27 - BETA - RELEASE NOTES
- 3rd generation app_process hijack

19.11.2014 - v2.24, v2.25 - BETA - RELEASE NOTES
- Updated policy patches

17.11.2014 - v2.23 - BETA - RELEASE NOTES
- Add PID tracer (--id) option to su
- Updated policy patches

16.11.2014 - v2.22 - BETA
- Fixed double refresh icon in logs in Holo theme (one should be delete)
- Add option to stop asking about disabling KNOX
- Updated backuptool script
- Disallow root access via daemonsu
- Updated policy patches
- Added kernel patching support