How to root BPI-M64


#1

Hi guys, I recently bought M64 and everything runs smoothly and nice, but I’ve got some problems to get root access. I’ve tried Kingroot, Kingoroot, One Click Root, tried to get through terminal but nothing. Can you help me get this option enabled? It’s very important to me :slight_smile:


(bpi team) #2

you can reference:

or


(Sven) #3

Sorry to bring this thread up again… Is there any recommendation on how to root the M64’s Android 6.0.1 v3 image (HDMI version) released in May 2017 (and are you working on an updated version of Android, btw)? The bootloader is unlocked via the developer options already.

I’ve been reading through the two posts, I’ve been trying to use several automated rooting apps (for both Android and Windows) without success. After that I’ve been tinkering with ADB and found out that you’re root when connecting to the M64 via “adb shell” command.

Knowing that I pushed busybox, su and Superuser.apk to /data/local/tmp/ and chmodded the permissions according to this guide https://forum.xda-developers.com/showthread.php?t=2684210

I moved su and busybox to /system/bin/ and Superuser.apk to /system/app/Superuser/, so in theory all files are placed, permissions are set and SuperSU shows up in the app drawer. But when starting it, SuperSU still returns “No root” errors.

Atm I’m thinking about finding a generic TWRP image, but that wouldn’t help since i don’t see myself able to flash anything to the device’s partitions. Both commands reboot bootloader and reboot recovery fail anyway, they result in a boot loop, i guess.

Any advice would be greatly appreciated, guys.


(tim) #4

hello, do you disable the selinux? you should firstly use setenforce 0 to disable selinux.


(Sven) #5

Hi Tim and thanks for the advice… I had forgotten about SELinux, but even after disabling it I’m still not getting SuperSU to work (other apps also report no root). I went through all the setps again, first of all removing the files I previously had pushed to the device and rebooting once. I also downloaded the latest SuperSU flashable zip and extracted the Superuser.apk and su, and also downloaded some “latest” version of busybox - 1.22.x but should do the trick - and began from scratch.

  1. Pushing files to /data/local/tmp/ via ADB
  2. Connecting to shell via ADB
  3. Disabling SELinux
  4. Mounting /system/ as rw
  5. Setting permissions for files in /data/local/tmp/ (6755 for su, 755 for busybox and 644 for Superuser.apk)
  6. Creating a new dir Superuser for Superuser.apk in /system/app/
  7. Moving Superuser.apk to /system/app/Superuser/
  8. Moving su and busybox to /system/bin/
  9. Rebooting

I’m still clueless… Even the one-click root apps don’t succeed with SELinux disabled and /system/ mounted as rw. Maybe using those one-clickers have broken the system already and I need to reflash it. Guess I gonna get it done tomorrow.


(Sven) #6

Well, after reflashing the image several times I am still unable to get this device or rather this ROM rooted. Last week, after another reflash, I’ve tried to work my way through the notes of the update-binary script from SuperSU flashable zip, trying to establish a SuperSU system installation - still no success. Last chance I see is to try and install SuperSU system-less using its boot image patcher. I need a little timeout before working my way through that section of the script.