Thanks, Dom, that worked great! (Well, with one amendment: after patching, it tries to write the result into /out/, which doesn't exist on my machine… I changed it to write to
"$(dirname "$BOOTIMAGE")/root-boot.img", so it writes to the same directory as the original.)
And I
think my Astro is now rooted! (It'll be a while before I've installed Termux and can be sure — but it now shows Magisk in the app drawer, which is a good sign.)
To save anyone else the hassle, I've formatted exactly what I did into a list of instructions, (just as I'd have liked to see them
):
Andy's Instructions For Rooting The AstroYou will need:
- Astro Slide 5G (obviously).
- A machine running Linux. (I did this with Linux Mint, but I expect this'll work on most flavours.) It'll need to be a fairly recent version, to satisfy the mtk requirements.
- USB cable to connect the Astro (USB-C) to the Linux machine.
Procedure:
- If you've used the Astro already, take a backup of anything you want to keep (apps, data, settings, etc.) as this will wipe it to factory settings.
- Install mtkclient on the Linux box, following all the Linux instructions here.
- Extract the boot image from the Astro:
- Shut down the Astro.
- mtk r boot_a boot.img
- Connect the Linux box to the Astro's bottom/right USB port.
- Wait for that to finish, then disconnect.
That'll save the image to the file boot.img. - Patch the image using Dom's scripts here:
That'll download and use Magisk to patch it, writing the result as root-boot.img. - Write the patched image back to the Astro:
- mtk w boot_a root-boot.img
- Connect the Linux box to the Astro's bottom/right USB port.
- Wait for that to finish, then disconnect.
- Finally, boot the Astro and check it's all done!
(Earlier posts suggest using
adb or
fastboot to write the patched image — but although those are both easily available in
apt, I couldn't immediately see how to use them, and I didn't want to experiment. Since
mtk has a write command corresponding to its read, that seemed the simplest option.)
Thanks all for your help with this! And please let me know any corrections to the above, or anything else I should know.
(Edited to spell out the initial requirements, add the need for an initial backup, bold the important bits, and tweak the wording slightly.)