[SuperSU] gottlasz:
Some of you might face the next error during systemless SuperSU install:

...

- Decompressing ramdisk

failed

--- Failure, aborting

*************************

IMPORTANT NOTICES

*************************

First reboot may take a

few minutes. It can also

...

This means that the ramdisk of your boot image was compressed in a non gzip format.

Unfortunately SuperSU can only decompress and tweak gzip compressed ramdisks up to now.

However i tried to make a little script that will uncompress your boot image/ramdisk and recompress it to gzip then after flashing SuperSU it recompresses the ramdisk to the original format.

This way one can achieve systemless root temporarily on such devices by installing SuperSU.

Idk maybe it can also be used for Magisk???

Download v1.1 (rce_univ.zip):

http://viid.me/qoESak

in case you face any proglems with the above version, try the old one v1.0 (rce_univ_1.0):

http://viid.me/qir1u5

How to:

Boot into TWRP 3.0.0 or above (never tested below) and install rce_univ.zip before and after SuperSU.zip!

Video: http://viid.me/quIbOi

Consider flashing Chainfire's Boot image signer (in case you get soft bricked after the above steps):

https://xdaforums.com/android/software-hacking/signing-boot-images-android-verified-t3600606

Detailed description in comment nr.3 (https://xdaforums.com/showpost.php?p=70428981&postcount=3)

Supported ramdisk compressions:

bzip2, lz4, lzo, lzma, xz

Requirements:

Unlocked bootloader on most newer (marshmallow and lollipop) devices

Don't expect it to be working on every device!

The script is basically fool proof. I mean if anything goes wrong it will promt you and quit.

Then you can simply restore your boot partition (if you didn't forget to back it up) and boot up normally and deal with the non rooted idea...

Also it's not supposed to mess up anything that would cost you a hard brick. Soft brick is only possible if you forget to make backup of your boot image or if you get SuperSU intalled and rec_univ.zip cannot recompress your ramdisk (this is pretty much impossible anyways)

Naturally there are those Samsung and Sony devices with some tricky boot images... idk. Never tested but most likely not gonna work.

Probably there will be many devices on which there are not enough space to decompress and recompress ramdisks/boot images in TWRP.

In comment nr. 2 i will collect the devices that are compatible with this script and the method itself.

If you can't find your device there as i said it's fool proof but you better be careful! You can simply test it by backing up your boot images between each install and with the mount mtp function you put it on PC (you can't quit TWRP during the whole process - i mean during step 2) and with carliv image kitchen (https://xdaforums.com/android/development/tool-cika-carliv-image-kitchen-android-t3013658) you check if you can unpack them normally.

Or if you don't care so much you just try and the worst case you reflash your framework...

If you are about to post any errors or complains do it the right way:

- attach recovery.log

- describe your device (model name, firmware version, ...)

- attach your boot image you backed up (upload it somewhere and link it)

If you are about to post a succesful attempt of a not yet added device:

- describe your device (model name, firmware version, ...)

- maybe link to its thread

No promises... and no responsibility i take... !!!

Please don't upload it anywhere else just use link to this thread!

I have to say thanks jcadduono for LazyFlasher boot image patcher script i used for the ramdisk compression exchanger and also thanks goes to Chainfire for SuperSU (especially for the boot image finder srcipt which is took from the SuperSU installer).

The xz archiver was used from XZ Utility For Android by Tukaani http://tukaani.org/xz/ - i hope he doesn't mind. Let me know if he does!