[Sony Ericsson Xperia Mini, Mini Pro, Xperia Pro, A] f0k:
Dear everyone,

Since my Xperia Ray has grown too old to run some apps I need, I'm moving over to a Z3 compact. Instead of figuring out how to backup and move each app, I'd like to use "adb backup". This requires BackupRestoreConfirmation.apk, which Sony excluded from its stock ROM. I've extracted the corresponding .apk and .odex from a system image and would like to install it on the Ray (by copying it to /system/app).

For this I need a root shell. I'd like to know what's the best way to get a root prompt on the Xperia Ray.

My criteria would be as follows:

Runs on the ST18i stock ROM (4.1.b.1.13, Android 4.0.4, Kernel 2.6.32-9)

No need to unlock the bootloader or flash anything

No need for a Windows machine

Understandable, "transparent", not a precompiled binary/app that could do other things under the hood

There are many threads on rooting this device, but many are dated, so there may be better ways by now that are not specific to the ST18i. There are also several one-click tools which are not transparent at all (and often require Windows).

I already did my research and found the following:

zergRush: only applies to Android 2.1-2.3

https://xdaforums.com/t/04-jan-root...ooting-toolkit-v4-0-zergrush-exploit.1321582/

https://xdaforums.com/t/daily-updat...-2011-v1-5-without-unlock-bootloader.1346198/

https://xdaforums.com/t/rooting-xpe...devices-without-unlocking-bootloader.1466042/

eroot: supposedly explained on eroot.me, but that web site is dead

https://xdaforums.com/t/new-one-click-root-4-1-b-0-587-431-4-0-2-a-0-62-all-2011-xperias.2219781/

https://xdaforums.com/t/one-key-roo...res-with-locked-bootloader-fingers-c.2204321/

iroot: intransparent, seems to install additional software

Download iRoot For PC v1.8.9.21144 (Latest Version) | Root My Device

Download iRoot for PC v1.8.9.21144 (latest version) from here, install it on your Windows computer and root your Android device easily.

rootmydevice.com

towelroot, kingroot, kingoroot: intransparent, sometimes considered malware

framaroot: not listed among supported devices

https://xdaforums.com/t/sticky-framaroot-supported-devices.2722980/

ln -s /data /data/local/tmp: very neat and understandable, but requires /data/local to be writeable and /data/local.prop to be missing, both of which is not given on my device

Full Disclosure: Re: debugfs exploit for a number of Android	devices

seclists.org

adb restore remount timing issue: requires "adb backup" to work, which is not given on my device

https://xdaforums.com/t/root-many-android-upd-20-07-2014-updated-new-z2-root-by-cubeandcube.1886460/

adb restore directory traversal: again requires "adb backup" to work, which is not given on my device

Full Disclosure: Android ICS "adb restore" directory traversal	vulnerability

seclists.org

mempodipper / mempodroid: requires kernel 2.6.39 or above, which is not given on my device

GitHub - saurik/mempodroid

Contribute to saurik/mempodroid development by creating an account on GitHub.

github.com

DirtyCow: I'd consider this transparent enough if I compile things myself, any idea whether this works?

GitHub - timwr/CVE-2016-5195: CVE-2016-5195 (dirtycow/dirtyc0w) proof of concept for Android

CVE-2016-5195 (dirtycow/dirtyc0w) proof of concept for Android - timwr/CVE-2016-5195

github.com

GitHub - j0nk0/GetRoot-Android-DirtyCow: Get temporary root by exploiting the dirtycow vulnerability.

Get temporary root by exploiting the dirtycow vulnerability. - j0nk0/GetRoot-Android-DirtyCow

github.com

Since there are one-click tools, there ought to be a way that works, but I'd prefer to know what exploit they'd use for this device and then do it myself. I hope some of you can recommend an exploit!

Thanks a lot and A Happy New Year!