24

[FLASHABLE ZIP] Enable integrated superuser

  1. jak Ice Cream Sandwich Aug 1, 2014

    jak, Aug 1, 2014 :
    New: CM 12.0 full support

    Here's the CM12.0-YNG1TAS0YL release of the full zip:
    http://jak-linux.org/cm/cm-unofficial-12.0-YNG1TAS0YL-bacon-signed-superuser.zip

    Please discuss in the CM12 thread: https://forums.oneplus.net/threads/flashable-zip-cm12-enable-integrated-superuser.297089/

    New: "light" Survives OTA updates (since Aug 22, 20:50 UTC)

    As some of you know, if you enable developer options, you will see a superuser menu entry in the settings. This superuser integration works if you install a su binary from a normal CyanogenMod build and flash the debuggable boot.img, or patch the su binary to not require this.

    Standard (Light) version: App & Shell root (same as other rooting packages)
    This zip flashes a su binary that enables root for everything except adb

    http://jak-linux.org/cm/cm-unofficial-11-signed-superuser-light.zip

    This survives OTA updates (as long as /data is not wiped)

    Full version: with adb root support (match with corresponding OTA)
    This zip flashes a su binary and a debuggable boot.img, so you have adb root support.

    http://jak-linux.org/cm/cm-unofficial-11.0-XNPH05Q-bacon-signed-superuser.zip

    It will also delete any existing superuser apk (but not SuperSU, at least not entirely).
    It does not survive OTA updates, as it flashes a debugabble boot image. After an OTA, wait for an updated zip here.

    Older releases and OpenPGP signatures: http://jak-linux.org/cm/

    The source code of the included official debuggable kernel can be found at:
    https://github.com/CyanogenMod/android_kernel_oneplus_msm8974

    Notes
    The code used to build the update zips is available at:
    https://github.com/julian-klode/bacon-superuser

    Edits: (1) Now signed with testkeys, (2) This does not survive OTA updates, (3) Added GPL information, (4) Fixed URLs and cleaned up a bit, (5) light version, (6)
    XNPH30O build, (7) cleanup, (8) OTA survival, (9) light works correctly with debuggable images.
     
    Last edited: Apr 14, 2015

    #1
  2. ineedinvitation Ice Cream Sandwich Aug 1, 2014

  3. jak Ice Cream Sandwich Aug 1, 2014


    #3
  4. TeamValor91 Marshmallow Community Expert Aug 1, 2014


    #4
  5. TeamValor91 Marshmallow Community Expert Aug 1, 2014


    #5
  6. jak Ice Cream Sandwich Aug 1, 2014

    jak, Aug 1, 2014 :
    Simple: It does not create an additional superuser/supersu app, but makes the built-in one in settings work.

    It's for people who like to verify that I built this zip. It's a digital signature.
     

    #6
    Jeffr0 and TeamValor91 like this.
  7. TeamValor91 Marshmallow Community Expert Aug 1, 2014

    TeamValor91, Aug 1, 2014 :
    Thank you for clarifying. Will download this now and let you know how it works. :)
     

    #7
    StormyGirl and Jeffr0 like this.
  8. yossigrosskopf Froyo Aug 1, 2014

    yossigrosskopf, Aug 1, 2014 :
    Looks great but I only fully understood after reading the first few commentes.
    U should add the reason of the second zip just above the link.
    And thanks mate
     

    #8
  9. TeamValor91 Marshmallow Community Expert Aug 1, 2014


    #9
  10. jak Ice Cream Sandwich Aug 1, 2014

    jak, Aug 1, 2014 :
    That's not cool :( I flashed it via TWRP myself.
     

    #10
  11. yossigrosskopf Froyo Aug 1, 2014

    yossigrosskopf, Aug 1, 2014 :
    Ouch
    Have u mounted system?
     

    #11
  12. TeamValor91 Marshmallow Community Expert Aug 1, 2014

    TeamValor91, Aug 1, 2014 :
    So I must mount system first and then flash?
     

    #12
    yossigrosskopf likes this.
  13. yossigrosskopf Froyo Aug 1, 2014

    yossigrosskopf, Aug 1, 2014 :
    Im not sure but give it a try.
    It won't hurt.
     

    #13
  14. jak Ice Cream Sandwich Aug 1, 2014

    jak, Aug 1, 2014 :
    The zip mounts /system, updater-script contains

    Code:
    mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
    
    In fact the entire updater-script is:
    Code:
    assert(getprop("ro.product.device") == "bacon" || getprop("ro.build.product") == "bacon" || 
           getprop("ro.product.device") == "A0001" || getprop("ro.build.product") == "A0001" || abort("This package is for \"bacon,A0001\" devices; this is a \"" + getprop("ro.product.device") + "\"."););
    show_progress(0.500000, 0);
    mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
    
    delete("/system/xbin/su");
    delete("/system/app/Superuser.apk");
    delete("/system/app/Supersu.apk");
    delete("/system/app/superuser.apk");
    delete("/system/app/supersu.apk");
    delete("/system/app/SuperUser.apk");
    delete("/system/app/SuperSU.apk");
    delete("/system/etc/install-recovery.sh");
    delete("/system/etc/.installed_su_daemon");
    
    package_extract_dir("system", "/system");
    set_metadata("/system/xbin/su", "uid", 0, "gid", 0, "mode", 06755, "capabilities", 0x0, "selabel", "u:object_r:su_exec:s0");
    package_extract_file("boot.img", "/dev/block/platform/msm_sdcc.1/by-name/boot");
    show_progress(0.100000, 0);
    unmount("/system");
    
    
     

    #14
  15. yossigrosskopf Froyo Aug 1, 2014

    yossigrosskopf, Aug 1, 2014 :
    Take a screenshot so we could see what Failed
     

    #15
    jak likes this.
  16. TeamValor91 Marshmallow Community Expert Aug 1, 2014

    TeamValor91, Aug 1, 2014 :
    Mounted system and failed again.
     

    #16
  17. UnknownSoul Jelly Bean Aug 1, 2014


    #17
    jak and yossigrosskopf like this.
  18. yossigrosskopf Froyo Aug 1, 2014

    yossigrosskopf, Aug 1, 2014 :
    Well if your to lazy to root then don't as u will be to lazy to repair it if you soft brick:p
     

    #18
    Jeffr0 likes this.
  19. TeamValor91 Marshmallow Community Expert Aug 1, 2014


    #19
  20. yossigrosskopf Froyo Aug 1, 2014

    yossigrosskopf, Aug 1, 2014 :
    I actually downloaded the zip and checked the contents, everything makes sense.
    u should include screenshots of it working on your device.
     

    #20
    Grownunda likes this.