Note: This is for CM12S.
For those who are a bit paranoid and/or conscious of the risk in using magical "root my phone" programs...
(note: there's a .zip here
that will do this for you; I've checked that the files used are the same you'd get by following this guide)
The first step is enabling a "debuggable" kernel. This will allow you to use root from ADB. To do so, download the boot-debuggable image (link in post), put the device in fastboot mode (adb reboot bootloader
or hold volume-up while booting) and run fastboot flash boot cm-12.0-YNG1TAS0YL-bacon-boot-debuggable.img
Now boot the phone normally, go to Settings -> About Phone. Tap a bunch on Build Number until it tells you that developer settings are active. Go back, enter "Developer options". Turn "Android debugging" on and set "Root access" to "Apps and ADB".
Make sure adb is working (device needs to show as "device" under adb devices
). Restart adb with root privileges: adb root
and make sure /system is mounted for write: adb remount
Now, download a CM12 (not 12.1) nightly for the device. You'll need to convert the system.new.dat file (sparse filesystem image) to a mountable, standard filesystem. I used https://github.com/xpirt/sdat2img
(python script). Run it like so: sdat2img.py cm-12-20150414-NIGHTLY-bacon/system.transfer.list cm-12-20150414-NIGHTLY-bacon/system.new.dat system.img
Now the system image needs to be mounted; the right way to do this depends on your OS.
On Linux, this is trivial; mount it as any other device. (sudo mount system.img /mnt
On Mac OS, install ext4-fuse (brew cask install osxfuse
; brew install ext4-fuse
) and run ext4fuse system.img /some/directory
On Windows...well, find a way to do this. You might be better off with a Linux VM here.
Once it's mounted, navigate to the root of the image and copy xbin/su
somewhere. cp /mnt/xbin/su ~
Now, we just need to drop this su binary on the device. adb push su /system/xbin/su
Now, you have to tell SELinux that this binary can act as su. To do so, open a shell: adb shell
and set the context... chcon u:object_r:su_exec:s0 /system/xbin/su
and set the right owner and permissions... chown 0:0 /system/xbin/su chmod 06755 /system/xbin/su
Close the shell. Reboot the device, and root should now be working (though do note - it's managed in Privacy Guard now, there is no preference pane for it).
Unlike CM11, you do not need to arrange for the su daemon to be run. /init.superuser.rc will do this for you.
+Friendly interface and few clicks options +Universal English language +Supports android 5.0 till android 10 ROM's zip +Supports the typical format of zip's ROM containing .dat.br, .dat, .img, payload.bin and tar.md5 formats +Added support for Samsung's stock ROMs (tar.md5) +Drag and drop option for .img and .xz filesystem formats on the executable original sdat2img tool only support "new" command Ok, but how to Patch the system.img with OTA files? All instructions are below. binaries are involved. Please read carefully step by step. You can use/modify these files and/or include them in your work as long as proper credits and a link to this thread are given. If you have questions or problems python3 for sdat2img; Linux with sudo access; Workflow. NB! All scripts should be executed from the directory with the scripts. Android ZIPs can be somewhere else in the system. Download two Android ZIPs. In this example we will use cm-12.1-20151007-SNAPSHOT-YOG4PAO334-mako.zip and cm-12.1-20160928-UNOFFICIAL-mako.zip. Binary Options Pro-signaalit Review. Binary Options Pro-signaalit on Platinum Trading Partners LLC. NB: n binääriasetusten signaalipalvelu. aloita rahaa binary options org verkkokauppa valuuttavinkit sdat2img binaariset vaihtoehdot binary xemarkets kuinka ennustaa binaariset vaihtoehdot tarkistaa forex - ja binaarivalinnat Vaihtoehdot pro - i don't think a windows version of the img2simg binary will come, though you can use cygwin for it (guide will follow in the future) - i've updated the original guide to avoid some confusion, now the raw ext4 image is in format .ext4, the sparse one in classic .img. (the ext4 & img formats are the same for an raw ext4 image) enjoy!
herramientas a usar http://adf.ly/1aAWIu pagina para descargar pyphon http://adf.ly/1aAWKH comandos por si no quieres escribirlo en el cmd sdat2img.py system... Auto Tool Unpack Repack .DAT & .IMG For Windows v2.0 (Marshmallow Supported) Tool by: MTK THAI ROM MODDER (Thailand) Create tool by : Kritsada Chaitan Thank Team Work : PraPhon KeawJan , Eisada ...