Author Topic: Rooting the Astro Slide  (Read 21090 times)

Noppe

  • Newbie
  • *
  • Posts: 36
    • View Profile
Rooting the Astro Slide
« on: August 03, 2022, 04:03:06 am »
Long story short:  I'm not there yet.  Don't get too excited.  This now works.    ;)

I finally got my Astro Slide (US keyboard, EU plug), and I've started poking around with what it's going to take to root it.  Unfortunately Planet Computers have not yet released a firmware, rooted or otherwise, so this work involves a little brute force.

The bootloader can be unlocked via the standard approach of enabling developer mode, enabling OEM unlock, enabling USB debugging, "adb reboot bootloader", then "fastboot flashing unlock" (note as always that the last of these commands will delete all your data).

We don't have a scatter file for this device, and the existing approaches for generating a scatter file don't seem to work, as this SoC isn't recognised by the normal tools, so instead I took the brute force approach of dumping the entire ROM via SP Flash Tool and then using a hex editor to find the boot image.

Once I pulled the boot image out of the ROM, I fed it to Magisk v25.2, which does recognise it as a boot image and appears to successfully patch it.  However, this is where I have decided to stop working, as I am willing to admit I'm in over my head, and I'd rather not render my brand new device unbootable.

I have attempted to boot this image via fastboot, but that fails with the following error:
Code: [Select]
% fastboot boot astro_magisk_patched.img
Sending 'boot.img' (19128 KB)                      OKAY [  0.500s]
Booting                                            ERROR: usb_read failed with status e00002ed
FAILED (Status read failed (No such file or directory))
fastboot: error: Command failed

After this error, the Astro Slide reboots normally, not rooted.

I suspect that flashing this image to the boot partition would work, but I do not currently have the cojones to attempt it.   ::)

I have attached the stock and patched images to this post, in case someone who is more comfortable than I am with Android booting wishes to give it a shot.  But I make no promises whatsoever that either of these images is actually good, so caveat emptor.

Looking forward to seeing some action in this thread from people who know more than I do!   ;D

Edit:  My original images didn't work.  Don't know why.  I was able to use mtktool referenced later in this thread to extract boot.img and patched it via Magisk and it works fine, producing a rooted Astro Slide.  The attached boot.img can be flashed to boot_a via fastboot.  Use at your own risk of course.
« Last Edit: October 02, 2022, 03:44:27 pm by Noppe »

Noppe

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Rooting the Astro Slide
« Reply #1 on: August 11, 2022, 12:05:32 am »
Okay, I decided to go ahead and give it a go, and unfortunately flashing the above patched image to boot_a does not work.  (Maybe some signature verification needs to be disabled?)  Flashing the unpatched image back onto boot_a results in a properly booting Astro Slide once again, so I do believe the images are probably fine, and the Astro is just refusing to boot the patched one.

jakfish

  • Sr. Member
  • ****
  • Posts: 392
    • View Profile
Re: Rooting the Astro Slide
« Reply #2 on: August 11, 2022, 04:31:03 pm »
I commend your efforts and your bravery for taking risks with a long-awaited machine.

So: no root and no linux.

Hmm,
Jake

Dom (shymega)

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Rooting the Astro Slide
« Reply #3 on: August 11, 2022, 04:42:48 pm »
I rooted my Astro the same day I received it (10th June, UK keyboard). Not successful the first time, as I was using an old dev boot image, but once I had the stock firmware sent to me (can't provide it yet), I rooted that with my custom script, and my Astro was rooted. Sadly, it's in for repairs with PC now as the IMEI number was erased.

Once it comes back on Tuesday, I'll be backing up NVRAM with the scatter file Janko sent me (also can't provide that yet), and rooting again. I'm currently using my Cosmo (non-rooted, as multi-boot is finicky).

Noppe

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Rooting the Astro Slide
« Reply #4 on: August 12, 2022, 01:30:08 am »
Interesting, Dom.  As you had no trouble booting a patched image, I am wondering what's causing my own Magisk-patched image fail to boot.  It's obviously the correct unpatched image, since writing it back out to boot_a returns the device to bootability.

This stuff would certainly be easier if PC would post the factory firmware and scatterfile to their support site.

abliss

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Rooting the Astro Slide
« Reply #5 on: August 24, 2022, 09:00:20 pm »
I finally got my hands on a device. I was able to root it using the mtkclient tool here: https://github.com/bkerler/mtkclient with no scatterfile needed.

The only difference from those instructions are the partition names boot_a and vbmeta_a instead of boot and vbmeta. Possibly your patched boot image would work if you only flashed an empty vbmeta image to the vbmeta_a partition.
« Last Edit: August 24, 2022, 11:32:38 pm by abliss »

Dom (shymega)

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Rooting the Astro Slide
« Reply #6 on: August 25, 2022, 12:23:34 pm »
There is absolutely no need to mess with vbmeta. I have the advantage of having direct contact with Planet, and I wish they release the firmware, but you can just flash to `boot`, no need for `boot_a`.

abliss

  • Newbie
  • *
  • Posts: 32
    • View Profile
Re: Rooting the Astro Slide
« Reply #7 on: August 29, 2022, 08:21:59 pm »
To be perfectly clear: I only had to use the name "boot_a" when flashing with the mtkclient.

When using fastboot, I can use the name "boot".

Dom (shymega)

  • Full Member
  • ***
  • Posts: 103
    • View Profile
Re: Rooting the Astro Slide
« Reply #8 on: September 15, 2022, 03:07:03 pm »
That's what I did - I flashed boot. I can probably share a root boot image if anyone wants it. I see no harm in that. It's the scatter file I can't share yet.

vbmeta wasn't necessary to flash.

Noppe

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Rooting the Astro Slide
« Reply #9 on: September 15, 2022, 03:11:37 pm »
That's what I did - I flashed boot. I can probably share a root boot image if anyone wants it. I see no harm in that. It's the scatter file I can't share yet.

Yes, I'd like that.  I just now got around to installing mtkclient, but I've been very pressed for time recently and haven't had a chance to actually *use* it yet.  Would be nice to have a rooted image and save the time.

Noppe

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Rooting the Astro Slide
« Reply #10 on: October 02, 2022, 03:45:54 pm »
Okay, I finally got around to using mtktool, and can verify it does work.  I don't know what failed about my original brute force approach, but mtktool extracts the boot.img fine, and once it's patched via Magisk and flashed back via fastboot, the Astro Slide is rooted.  No modification was required to the vbmeta partition.  I simply flashed the patched boot.img onto boot_a via fastboot.

First post updated with good images.

Cedd

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Rooting the Astro Slide
« Reply #11 on: October 03, 2022, 08:00:20 am »
That's great, just for information, what OS/Rom are you considering?

Thanks

Noppe

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Rooting the Astro Slide
« Reply #12 on: October 03, 2022, 08:12:19 am »
At the moment I've got no reason to run anything other than stock Android.  Although once there's a good, working Linux distro, I'd probably consider the switch.

ZimbiX

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
    • https://twitter.com/ZimbiX
Re: Rooting the Astro Slide
« Reply #13 on: October 03, 2022, 08:13:31 am »
Nicely done! 👏

mtkclient looks handy. What were the commands you used?

instead I took the brute force approach of dumping the entire ROM via SP Flash Tool and then using a hex editor to find the boot image.

Also, I'm curious  - how did you locate it?

I don't have my Astro yet, but I'm following along with great interest as I want to be able to root straight away to be able to migrate from my Cosmo 😁

Noppe

  • Newbie
  • *
  • Posts: 36
    • View Profile
Re: Rooting the Astro Slide
« Reply #14 on: October 03, 2022, 08:19:45 am »
mtkclient looks handy. What were the commands you used?

Almost exactly what's on the mtkclient github page:

Code: [Select]
mtk r boot_a,vbmeta_a boot.img,vbmeta.img
The only difference there is using boot_a and vbmeta_a in place of boot and vbmeta.  Although as it turns out, the vbmeta partition didn't need to be touched, so saving a backup was less important (although it never hurts).

Once the boot.img was extracted, I put it back onto the device with adb and then patched it with Magisk.  Ignore the stuff on github about the mtk-specific Magisk.  The official Magisk works fine.

Quote
Also, I'm curious  - how did you locate it?

It's pretty easy to find the header of the boot.img by searching for the right magic string indicating an Android boot image.  Then the length of the partition I determined based on some output from SP Flash Tool, which I've long since forgotten.  But I'm guessing that I got the length wrong, hence the initial failure.

I didn't know at the time that mtktool existed.  It's definitely the better approach here.