OESF Portables Forum

Model Specific Forums => Astro Slide => Astro Slide - Android => Topic started by: Noppe on August 03, 2022, 04:03:06 am

Title: Rooting the Astro Slide
Post by: Noppe 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.
Title: Re: Rooting the Astro Slide
Post by: Noppe 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.
Title: Re: Rooting the Astro Slide
Post by: jakfish 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
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) 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).
Title: Re: Rooting the Astro Slide
Post by: Noppe 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.
Title: Re: Rooting the Astro Slide
Post by: abliss 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.
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) 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`.
Title: Re: Rooting the Astro Slide
Post by: abliss 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".
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) 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.
Title: Re: Rooting the Astro Slide
Post by: Noppe 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.
Title: Re: Rooting the Astro Slide
Post by: Noppe 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.
Title: Re: Rooting the Astro Slide
Post by: Cedd on October 03, 2022, 08:00:20 am
That's great, just for information, what OS/Rom are you considering?

Thanks
Title: Re: Rooting the Astro Slide
Post by: Noppe 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.
Title: Re: Rooting the Astro Slide
Post by: ZimbiX 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 😁
Title: Re: Rooting the Astro Slide
Post by: Noppe 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 (https://github.com/bkerler/mtkclient):

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.
Title: Re: Rooting the Astro Slide
Post by: ZimbiX on October 03, 2022, 08:27:49 am
Almost exactly what's on the mtkclient github page (https://github.com/bkerler/mtkclient):

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.

Sweet; thanks! It should be super easy to do that for any OTAs then. It'll be nice not to have to use SP Flash Tool - that thing is kinda dodgy, haha.

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

For sure!

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.

Ah, fair enough. I thought you might have found out how the partitions are delimited in whatever partition table is used 😛
Title: Re: Rooting the Astro Slide
Post by: cam1965 on October 17, 2022, 03:44:45 pm
I am in doubt about flash or not  the device with a root image. Problem is bank apps . Some bank apps need to be renamed the app to work. Maybe only because I have a gemini keyboard app with accents ( That I have modified ) to use here in Brazil.  I think it only install if rooted . And if I unlock the bootloader, I will lose everything.... ( too work to do later ).
Title: Re: Rooting the Astro Slide
Post by: gidds on December 28, 2022, 09:41:12 am
Greetings, all! (I was a regular user of this forum a few years ago after getting my Gemini, but I dropped out once that was all set up. My Astro Slide arrived an hour ago — hurrah! — and so I'm back…)

What's the latest on installing rooted Android on the Astro?

I haven't found anything on any of the Planet sites (in fact, the obvious one (https://support.planetcom.co.uk/) doesn't even mention the Astro), and this thread is all I can find elsewhere.

I'd like to set up my Astro the same way as my Gemini: running rooted Android only. (I run Termux and sshd, edit /etc/hosts, and a few other things needing root. The down-side is that my bank's app won't work, but for me that's a price worth paying. On the Gemini it was a huge hassle, needing to reboot my Mac into Debian 9 to run Planet's Flash Tool — but I gather it's all different now…)

Is this possible? Is there an officially-approved way (or is there likely to be one soon)? Or is there a single, foolproof set of instructions?
Title: Re: Rooting the Astro Slide
Post by: Noppe on December 28, 2022, 11:03:24 am
There is no officially approved way (or, really, any sign of any support whatsoever from PC, but I digress...), but the images and procedures in this thread should work fine, as long as you are comfortable with what you're doing.  I've been running mine rooted for several months now, with no problems.

Regarding your bank app, have you tested it with the newest Magisk, using the new DenyList feature?  That should be generally much better about allowing picky apps to run, since they are put into a context where the phone actually is not rooted.  While I haven't tried a broad range of apps, and almost certainly not your bank, I've yet to find an app that complains about root with DenyList.
Title: Re: Rooting the Astro Slide
Post by: cam1965 on December 28, 2022, 11:06:21 am
Greetings, all! (I was a regular user of this forum a few years ago after getting my Gemini, but I dropped out once that was all set up. My Astro Slide arrived an hour ago — hurrah! — and so I'm back…)

What's the latest on installing rooted Android on the Astro?

I haven't found anything on any of the Planet sites (in fact, the obvious one (https://support.planetcom.co.uk/) doesn't even mention the Astro), and this thread is all I can find elsewhere.

I'd like to set up my Astro the same way as my Gemini: running rooted Android only. (I run Termux and sshd, edit /etc/hosts, and a few other things needing root. The down-side is that my bank's app won't work, but for me that's a price worth paying. On the Gemini it was a huge hassle, needing to reboot my Mac into Debian 9 to run Planet's Flash Tool — but I gather it's all different now…)

Is this possible? Is there an officially-approved way (or is there likely to be one soon)? Or is there a single, foolproof set of instructions?
No Planet Computer support. From here is the only way. You can root it using the images and the procedures mentioned here. Banks will not work ( I am from Brazil ). And with the bootloader unlocked you will  be in the orange state . The Astro will boot with this message and you will have to wait 5 seconds to boot. Please see the messages here.
Title: Re: Rooting the Astro Slide
Post by: cam1965 on December 28, 2022, 11:16:01 am
There is no officially approved way (or, really, any sign of any support whatsoever from PC, but I digress...), but the images and procedures in this thread should work fine, as long as you are comfortable with what you're doing.  I've been running mine rooted for several months now, with no problems.

Regarding your bank app, have you tested it with the newest Magisk, using the new DenyList feature?  That should be generally much better about allowing picky apps to run, since they are put into a context where the phone actually is not rooted.  While I haven't tried a broad range of apps, and almost certainly not your bank, I've yet to find an app that complains about root with DenyList.

some apps here in Brazil don' t work if you install Magisk, even if the phone is not rooted. For example : Bank apps, flying companies apps, insurance companies ( auto, life, etc )
Title: Re: Rooting the Astro Slide
Post by: Noppe on December 28, 2022, 11:17:30 am
some apps here in Brazil don' t work if you install Magisk, even if the phone is not rooted. For example : Bank apps, flying companies apps, insurance companies ( auto, life, etc )

Have you used the "Hide the Magisk app" feature in Magisk settings?  I've seen some apps that look for the app by name, and if you just let Magisk rename itself, problem solved.  :) 
Title: Re: Rooting the Astro Slide
Post by: gidds on December 28, 2022, 11:29:12 am
Thanks for the replies — I'm relieved to see that this board is so active!

You can root it using the images and the procedures mentioned here.

If I'm understanding this thread, the relevant info is split across several posts (with some outdated info). Does anyone fancy putting together a definitive summary of what to do? (I'm sure I won't be the only one to benefit!)

And with the bootloader unlocked you will  be in the orange state . The Astro will boot with this message and you will have to wait 5 seconds to boot.

That doesn't bother me — I reboot very rarely. As long as everything's fine _after_ it's finished booting, I'll be happy!
Title: Re: Rooting the Astro Slide
Post by: Neophy on December 28, 2022, 12:11:19 pm
See
  https://www.droidwin.com/how-to-pass-safetynet-on-rooted-android-12/
for hiding rooting from banking apps. Works for me on the Astro Slide.
Title: Re: Rooting the Astro Slide
Post by: mrpeenut24 on December 28, 2022, 06:11:46 pm
Not sure if all phones using the same chipset have the same scatter file, but the Ulefone GQ5000 Armor 10 has the MT6873 and its scatter file is available online.  This loads in SP Flash Tool v5.2020, but I haven't done a backup with it yet.

https://romprovider.com/ulefone-armor-10-5g-firmware-support/

See attached, hope this helps someone else.
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on December 29, 2022, 06:21:37 pm
Do NOT use any other scatter file other than what Planet will provide, or that you can generate based on the Astro.

@mrpeenut24- this is advice that could brick an Astro, please don't suggest using scatterfiles for other phones. It's dangerous.
Title: Re: Rooting the Astro Slide
Post by: Neophy on December 30, 2022, 04:50:41 am
Use mtkclient instead of SP Flash Tool. No scatter file needed.

https://github.com/bkerler/mtkclient
Title: Re: Rooting the Astro Slide
Post by: gidds on January 06, 2023, 09:40:43 am
How should mtkclient find the Astro?

I think I've installed it on my Mac, based on the instructions on the its web site (https://github.com/bkerler/mtkclient). (I already had python installed, and used HomeBrew to install libusb. I had to use the --user flag for mtk — as my user doesn't have write permission to the python install dirs etc. — and then add the relevant folder to my path. I ignored the ‘Install rules’ section, as that doesn't seem to have Mac equivalents.)

It runs — but doesn't seem to connect to my Astro:

Quote
> mtk r boot_a boot.img
MTK Flash/Exploit Client V1.6.0 (c) B.Kerler 2018-2022

Preloader - Status: Waiting for PreLoader VCOM, please connect mobile

Port - Hint:

Power off the phone before connecting.
For brom mode, press and hold vol up, vol dwn, or all hw buttons and connect usb.
For preloader mode, don't press any hw button and connect usb.
If it is already connected and on, hold power for 10 seconds to reset.

Then it prints dots for ten seconds, before repeating indefinitely from Port - Hint:.

(I've tried it directly connected to each of the Astro's USB-C ports — in each case with the Astro powered off and then on. I know the cable works for data, because I can see the Astro with it in adb after enabling USB debugging.)

Should mtk find the Astro automatically, or do I need to tell it somehow? (I can't see any relevant options to the command, nor anything relevant on the mtk site. I'm assuming it needs to be connected by USB, and that this isn't possible over wifi…?) Have I missed some vital bit of installation/setup?

As you can probably tell, I'm very far from an expert on all this…  (Which is of course why I wanted some clear, simple instructions  :) )
Title: Re: Rooting the Astro Slide
Post by: Noppe on January 06, 2023, 10:06:10 am
I was unable to get mtkclient to work on Mac.  I don't know if it was a problem with my mtkclient install or with the Astro, but I gave up and installed it on a Linux machine and it worked perfectly there.
Title: Re: Rooting the Astro Slide
Post by: cam1965 on January 06, 2023, 11:19:49 am
some apps here in Brazil don' t work if you install Magisk, even if the phone is not rooted. For example : Bank apps, flying companies apps, insurance companies ( auto, life, etc )

Have you used the "Hide the Magisk app" feature in Magisk settings?  I've seen some apps that look for the app by name, and if you just let Magisk rename itself, problem solved.  :)
Thanks.
This not worked  for me.
Title: Re: Rooting the Astro Slide
Post by: cam1965 on January 06, 2023, 11:21:53 am
I was unable to get mtkclient to work on Mac.  I don't know if it was a problem with my mtkclient install or with the Astro, but I gave up and installed it on a Linux machine and it worked perfectly there.
Same with me. My Mac has dual boot ( Big Sur and linux ).
Title: Re: Rooting the Astro Slide
Post by: gidds on January 06, 2023, 12:14:30 pm
Quote
I was unable to get mtkclient to work on Mac.

That's… frustrating.

As it happens, I do have one little headless box running Linux Mint — but that fails part-way through the ‘pip3 install -r requirements.txt’ step:

Quote
Collecting shiboken6>=6.4.0.1 (from -r requirements.txt (line 7))
  Could not find a version that satisfies the requirement shiboken6>=6.4.0.1 (from -r requirements.txt (line 7)) (from versions: 6.0.0a1.dev1606911628, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.2.0, 6.2.1, 6.2.2, 6.2.2.1, 6.2.3, 6.2.4)
No matching distribution found for shiboken6>=6.4.0.1 (from -r requirements.txt (line 7))

pip3 install shiboken6’ installs version 6.2.4, which is clearly too low.

I'm guessing that may be because that needs python 3.7+ while I have python 3.6.9 — but ‘apt upgrade python3’ reports that as ‘already the newest version’. Is my installation too old? (/proc/version says ‘Linux version 5.4.0-135-generic (buildd@lcy02-amd64-053) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #152~18.04.2-Ubuntu SMP Tue Nov 29 08:23:49 UTC 2022’, but I don't know what most of that means.) I keep it up-to-date in Update Manager and/or apt — is there anything that those will miss?

Sorry if this is dumb stuff, but I know almost as little about Linux admin as I do about python or Android…
Title: Re: Rooting the Astro Slide
Post by: cam1965 on January 07, 2023, 04:59:01 am
Quote
I was unable to get mtkclient to work on Mac.

That's… frustrating.

As it happens, I do have one little headless box running Linux Mint — but that fails part-way through the ‘pip3 install -r requirements.txt’ step:

Quote
Collecting shiboken6>=6.4.0.1 (from -r requirements.txt (line 7))
  Could not find a version that satisfies the requirement shiboken6>=6.4.0.1 (from -r requirements.txt (line 7)) (from versions: 6.0.0a1.dev1606911628, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.0.4, 6.1.0, 6.1.1, 6.1.2, 6.1.3, 6.2.0, 6.2.1, 6.2.2, 6.2.2.1, 6.2.3, 6.2.4)
No matching distribution found for shiboken6>=6.4.0.1 (from -r requirements.txt (line 7))

pip3 install shiboken6’ installs version 6.2.4, which is clearly too low.

I'm guessing that may be because that needs python 3.7+ while I have python 3.6.9 — but ‘apt upgrade python3’ reports that as ‘already the newest version’. Is my installation too old? (/proc/version says ‘Linux version 5.4.0-135-generic (buildd@lcy02-amd64-053) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #152~18.04.2-Ubuntu SMP Tue Nov 29 08:23:49 UTC 2022’, but I don't know what most of that means.) I keep it up-to-date in Update Manager and/or apt — is there anything that those will miss?

Sorry if this is dumb stuff, but I know almost as little about Linux admin as I do about python or Android…
Please edit requirements.txt and fill it with the versions less than your system. Even with these versions, it worked for me.
I am running debian 10.
After the install you can run in with the graphical interface ( ./mtk_gui ). Much better than command line.
Good luck.
Title: Re: Rooting the Astro Slide
Post by: gidds on January 07, 2023, 05:54:30 pm
Some progress: I spent a few hours upgrading to the latest Linux Mint (since that was a good idea anyway). Then mtkclient installed OK (as per the instructions (https://github.com/bkerler/mtkclient#install)). And I've successfully used it to extract the images, with the command:
Code: [Select]
mtk r boot_a,vbmeta_a boot.img,vbmeta.img
(I had to start that command before connecting to the lower/right-hand port on the powered-off phone.)

From the first post in this topic, I'm guessing that the next step is:
Quote
…patch[ed] it via Magisk…

Can you give any more detail on that part please? Magisk (https://github.com/topjohnwu/Magisk) seems to be an Android app; I can't see anything about installing or running it on Linux (or Mac), and it's not in apt… Do I need another Android phone for this?
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on January 07, 2023, 06:46:00 pm
You could use my tool I derived from Magisk's scripts: https://github.com/shymega/magisk-boot-patch-ci-tool

We use this on my community Planet CI server for rooted kernels for Planet devices.
Title: Re: Rooting the Astro Slide
Post by: gidds on January 08, 2023, 06:09:37 pm
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 Astro

You will need:
Procedure:

(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.)
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on January 08, 2023, 06:49:28 pm
Glad it worked for you. It writes to `/out` by default as it was originally created for usage in CI, and further to that, Astro rooted kernel images are produced by my CI server, and that's how the container build image is configured.
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on January 08, 2023, 07:00:26 pm
Andy,

Can I copy your instructions for the Planet community Wiki? I can provide attribution, but I've made a GitHub PR repo for wiki updates, which are then pushed to the wiki site when ready. I thought it'd be good to have a central knowledgebase.
Title: Re: Rooting the Astro Slide
Post by: gidds on January 08, 2023, 07:27:35 pm
Dom, if other people might benefit from those instructions, then I'd be very happy for you to post them elsewhere! (I don't mind about attribution, either way. I'm happy to take credit, though of course much of that was based on earlier work by Noppe, you, and others in this topic.)

And if you do, please post a link back here, in case we can learn from them too! A central knowledgebase is a great idea, and much needed.

(BTW, what does ‘CI’ mean in this context? A Continuous Integration server of some kind? I'm assuming it's not the Channel Islands, nor a Confidential Informant…)
Title: Re: Rooting the Astro Slide
Post by: LinuxGuy on January 09, 2023, 12:36:01 am
Dear Andy thanks a lot for putting all this together. If I got it right, as allways, this wipes all your data?
Title: Re: Rooting the Astro Slide
Post by: gidds on January 09, 2023, 07:24:19 am
If I got it right, as allways, this wipes all your data?

I think so. Others here can probably say for sure, but I'd certainly assume that such a big change can erase all your apps/data/settings and anything else you have stored on the phone, so before doing anything else, make sure you have backups of anything you want to keep! (I'll add that as a first step.)
Title: Re: Rooting the Astro Slide
Post by: cam1965 on January 09, 2023, 08:02:43 am
If I got it right, as allways, this wipes all your data?

I think so. Others here can probably say for sure, but I'd certainly assume that such a big change can erase all your apps/data/settings and anything else you have stored on the phone, so before doing anything else, make sure you have backups of anything you want to keep! (I'll add that as a first step.)
Yes , unlocking and rooting the phone will wipe your data.
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on January 09, 2023, 12:42:54 pm
Dom, if other people might benefit from those instructions, then I'd be very happy for you to post them elsewhere! (I don't mind about attribution, either way. I'm happy to take credit, though of course much of that was based on earlier work by Noppe, you, and others in this topic.)

And if you do, please post a link back here, in case we can learn from them too! A central knowledgebase is a great idea, and much needed.

(BTW, what does ‘CI’ mean in this context? A Continuous Integration server of some kind? I'm assuming it's not the Channel Islands, nor a Confidential Informant…)

OK, I'll just keep it without attribution for now. It should be licensed under CC when I get round to that.

I'll post a link once I merge the PR.

CI is the first term, it's a server I setup, using Planet community members' build VMs for building ROMs and kernels. I can't do that for much longer though, as Planet is giving me access to their BSP and CoDi sources, and I have to use servers approved for that.
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on January 09, 2023, 12:54:15 pm
Andy,

I've made a PR to the wiki PR repo, which has now been merged and pushed to the wiki.

I modified your tutorial, as you neglected to mention that the bootloader MUST be unlocked, otherwise the Astro will be soft-bricked until repaired.

PR repo: https://github.com/shymega/planet-devices-wiki.prs

Meta repo: https://github.com/shymega/planet-devices

Meta repo wiki: https://github.com/shymega/planet-devices/wiki
Title: Re: Rooting the Astro Slide
Post by: gidds on January 09, 2023, 01:29:19 pm
you neglected to mention that the bootloader MUST be unlocked, otherwise the Astro will be soft-bricked until repaired.

s/neglected to mention/didn't know/  :)

In fact, I still don't fully understand… Do all Astros arrive unlocked, or was I just very lucky that mine wasn't?

And while it's great to include that on the wiki too, could you expand it into idiot-proof instructions like the rest — possibly including a line on what locking is, and how to tell whether an Astro is locked? (“You can do this by using Fastboot” is only helpful if you already know what Fastboot is, how to install it, and how to use it to unlock something — and if you already knew what, you probably wouldn't need to be reading the instructions in the first place!)

The wiki looks great otherwise — except that it doesn't seem to have any of the hyperlinks, which are pretty vital. I'd also suggest copying the bold highlighting too, though that's more subjective.
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on January 09, 2023, 03:19:27 pm
you neglected to mention that the bootloader MUST be unlocked, otherwise the Astro will be soft-bricked until repaired.

s/neglected to mention/didn't know/  :)

In fact, I still don't fully understand… Do all Astros arrive unlocked, or was I just very lucky that mine wasn't?

And while it's great to include that on the wiki too, could you expand it into idiot-proof instructions like the rest — possibly including a line on what locking is, and how to tell whether an Astro is locked? (“You can do this by using Fastboot” is only helpful if you already know what Fastboot is, how to install it, and how to use it to unlock something — and if you already knew what, you probably wouldn't need to be reading the instructions in the first place!)

The wiki looks great otherwise — except that it doesn't seem to have any of the hyperlinks, which are pretty vital. I'd also suggest copying the bold highlighting too, though that's more subjective.

Hey,

Sorry, poor choice of words on my part. I assumed you had unlocked your bootloader.

Do you get a message on the boot about 'Orange State'? I'm wondering if `mtkclient` unlocks the bootloader when it flashes. I'm not sure.

I'm not very good at writing idiot-proof instructions but would welcome PRs to that file.

Hyperlinks I'll add now. I changed the download link to use the tag release because using my script from mainline can break easily. And boldness, I'll add that too.
Title: Re: Rooting the Astro Slide
Post by: gidds on January 09, 2023, 05:03:14 pm
Do you get a message on the boot about 'Orange State'?
No, nothing like that. As far as I can tell, the boot sequence looks the same as it did before rooting. (I can confirm it is rooted: I can su in Termux.)

And I can't submit a PR coz I don't have the necessary knowledge to write it! (Also, I've only looked at the page on GitHub, not bothered to clone it and everything.)

But let's try to work it out. You said “You can do this by using Fastboot and the OEM Unlocking in Settings -> Developer Options”:
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on January 09, 2023, 06:19:03 pm
Weird. I don't know much about `mtkclient`, but the boot image isn't signed with Planet's crypto keys, so in _theory_ it shouldn't boot unless the bootloader is unlocked - we get around this in Gemini/Cosmo by using 'untrusted boot slots', which don't require verification.

I don't particularly think including detailed Fastboot and OEM unlocking instructions in the wiki is necessary, and it'll also add to the length of the tutorial, which might put people off. There are plenty of tutorials online on how to do OEM unlocking, which is practically the same for most Android phones. A link to one of those pages would do nicely, I think.
Title: Re: Rooting the Astro Slide
Post by: cam1965 on January 09, 2023, 07:25:36 pm
Do you get a message on the boot about 'Orange State'?
No, nothing like that. As far as I can tell, the boot sequence looks the same as it did before rooting. (I can confirm it is rooted: I can su in Termux.)

And I can't submit a PR coz I don't have the necessary knowledge to write it! (Also, I've only looked at the page on GitHub, not bothered to clone it and everything.)

But let's try to work it out. You said “You can do this by using Fastboot and the OEM Unlocking in Settings -> Developer Options”:
  • Is that the program you can install with e.g. apt install fastboot?
  • What would you type into it, and what would that do?
  • On my phone, the latter is Settings → System → Advanced → Developer options → OEM unlocking. Is that the right one?
  • I'm guessing that option needs to be enabled to unlock the phone? Is that also the right way to check whether the phone is unlocked?
  • Do you need to do both the Fastboot and the OEM setting, or will either work?
I am surprised you did a root without unlocking the bootloader. Can someone explain this ? Thanks.
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on January 10, 2023, 03:33:36 pm
Looking at `mtkclient`'s README, it _is_ necessary to unlock the bootloader before flashing an unsigned image.

I can't tell how it's possible to get past the unverified boot warning. I've edited the tutorial, but it's still important to unlock the bootloader before rooting or flashing non-OEM boot images.

The only conclusion I've come to is that Andy's Astro has had some sort of prior modification we're/Andy's not aware of. Possibly factory. Did it come pre-installed in Chinese or have Deejay-dota installed?
Title: Re: Rooting the Astro Slide
Post by: gidds on January 10, 2023, 04:13:48 pm
Did it come pre-installed in Chinese or have Deejay-dota installed?

Plain (British/UK) English. I don't know what ‘Deejay-dota’ is, but if it's an app, then it's not there!

I did turn on the Astro a few times before trying to flash it, so it's not impossible I might have changed that setting — but I don't recall doing so.

But Planet have always encouraged, or at least allowed, other OSs &c, so maybe it arrived unlocked?
Title: Re: Rooting the Astro Slide
Post by: cam1965 on January 10, 2023, 05:44:00 pm
Did it come pre-installed in Chinese or have Deejay-dota installed?

Plain (British/UK) English. I don't know what ‘Deejay-dota’ is, but if it's an app, then it's not there!

I did turn on the Astro a few times before trying to flash it, so it's not impossible I might have changed that setting — but I don't recall doing so.

But Planet have always encouraged, or at least allowed, other OSs &c, so maybe it arrived unlocked?
If you go to settings, about device you will see deejoy-dota. Please see my attachments, but it is in portuguese ( I am Brazilian )
Title: Re: Rooting the Astro Slide
Post by: cam1965 on January 10, 2023, 06:12:00 pm
Looking at `mtkclient`'s README, it _is_ necessary to unlock the bootloader before flashing an unsigned image.

I can't tell how it's possible to get past the unverified boot warning. I've edited the tutorial, but it's still important to unlock the bootloader before rooting or flashing non-OEM boot images.

The only conclusion I've come to is that Andy's Astro has had some sort of prior modification we're/Andy's not aware of. Possibly factory. Did it come pre-installed in Chinese or have Deejay-dota installed?

I think you are correct. :) The bootloader can't prevent images from being flashed, it just prevents unsigned images from loading. My answer to this question has some details on the way locked/unlocked bootloaders work.

MTK Client communicates with the bootloader of MediaTek devices to flash images, the lock status of the bootloader does not affect ability to flash. (It is still possible to block flashing by only allowing signed binaries to communicate with the bootloader) But , if an unsigned image is flashed, the bootloader will refuse to load the image. This case is really a big surprise. I don' t know how the multi boot of Cosmo works, but I think cosmo can boot unsigned images. ( PC probably made changes ). In astro slide who knows ?
Most   of the times images are flashed using Fastboot (even when there are more options to flash like "SP Flash Tool and MTK Client ") And Fastboot checks most of the times if the bootloader is unlocked, and only lets flashing images if it is unlocked. Mine is unlocked with orange state. So I cannot verify if using only MTK client tool will boot astro without this warning or will refuse to load the unsigned boot image.
As I know Just to clarify I think MTK Client tool connects directly to your CPU Firmware prior to booting up the device.
Please see what happened to me :
I have unlocked my phone and did a root on it. After this some apps like bank apps and others were not working. I decided to do a reset on my phone and after this I did a lock to oem again. After this the phone was bricked booting only in fastboot mode. ( like a bricked phone ). So, I have unlocked the oem again and for my surprise android returned.  So, do not lock oem after you unlock it.
And do not edit lk file to prevent the warning orange state. Please don't do this. After I did his, the smartphone did not turn on anymore. It didn't even go into fastboot mode. I thought : Now it's gone. Luckily the mtkclient that was installed on my linux recognized the smartphone and I restored the old file. This is why I think MTK Client tool connects directly to your CPU Firmware prior to booting up the device.
Title: Re: Rooting the Astro Slide
Post by: gidds on January 10, 2023, 07:05:28 pm
If you go to settings, about device you will see deejoy-dota. Please see my attachments, but it is in portuguese ( I am Brazilian )

I can see what look like the corresponding fields on my Astro in Settings → About phone — but there's nothing corresponding to ‘Deejoy-Dota’:

Quote
(Yours)(Mine)
 
Tempo em atividadeUptime
12:59:5210:55
 
Versão Embutida PadrãoCustom built version
alps-mp-r0.mp1-V8.132_haocheng.r0mp1.k61v1.64.bsp_P20   alps-mp-r0.mp1-V8.132_haocheng.r0mp1.k61v1.64.bsp_P20
 
Deejoy-Dota
 
Aktualizações de softwareSystem Update
Verificar nova versão do software
 
────────────────────────
 
Número da versãoBuild number
Astro-11.0-Planet-05182022-V01Astro-11.0-Planet-05182022-V01
 

(And what is ‘Deejoy-Dota’, anyway? Google finds only 5 results, of which this page is one, and the other 4 look like Japanese or Russian…)
Title: Re: Rooting the Astro Slide
Post by: cam1965 on January 10, 2023, 07:26:59 pm
If you go to settings, about device you will see deejoy-dota. Please see my attachments, but it is in portuguese ( I am Brazilian )

I can see what look like the corresponding fields on my Astro in Settings → About phone — but there's nothing corresponding to ‘Deejoy-Dota’:

Quote
(Yours)(Mine)
Tempo em atividadeUptime
12:59:5210:55
Versão Embutida PadrãoCustom built version
alps-mp-r0.mp1-V8.132_haocheng.r0mp1.k61v1.64.bsp_P20   alps-mp-r0.mp1-V8.132_haocheng.r0mp1.k61v1.64.bsp_P20
Deejoy-Dota
Aktualizações de softwareSystem Update
Verificar nova versão do software
────────────────────────
Número da versãoBuild number
Astro-11.0-Planet-05182022-V01Astro-11.0-Planet-05182022-V01

(And what is ‘Deejoy-Dota’, anyway? Google finds only 5 results, of which this page is one, and the other 4 look like Japanese or Russian…)
I think it  is a service to update android ( provided by PC )  but really don' t know.
Please see: https://www.oesf.org/forum/index.php?topic=36854.0
Title: Re: Rooting the Astro Slide
Post by: Cedd on February 26, 2023, 01:43:01 pm
Hello, I would like to know, at the moment:

   - Is it possible to install linux on the astro ?
   - Does the Root wiki work well ? Is there a problem with the IMEI ?

I want to use rooted android. or linux in the absence of sailfishos
Title: Re: Rooting the Astro Slide
Post by: gidds on February 26, 2023, 05:34:43 pm
I want to use rooted android.

See my instructions earlier in this thread for details of how to root Android on the Astro; it works fine for me, including mobile voice and data.

(I know nothing about installing Linux on it.)
Title: Re: Rooting the Astro Slide
Post by: spa on August 19, 2024, 06:40:40 am
I fastboot flashed the img posted here.
-----
Code: [Select]
D:\>adb reboot bootloader

D:\>fastboot flashing unlock
                                                   (bootloader) Start unlock flow

OKAY [ 21.063s]
Finished. Total time: 21.071s

D:\>fastboot flash boot_a boot-magisk.img
Sending 'boot_a' (40960 KB)                        OKAY [  1.133s]
Writing 'boot_a'                                   OKAY [  0.195s]
Finished. Total time: 1.404s

D:\>fastboot reboot
Rebooting                                          OKAY [  0.003s]
Finished. Total time: 0.009s
-----
When I rebooted, I got a warning message and ASTRO started up.
Next, I installed Magisk.
In Csomo, after installing Magisk, additional setup and rebooting was done automatically to complete rooted.
However, with Astro, after installing Magisk, the same does not occur. My Astro is not rooted.
Is there a mistake in my procedure?
Title: Re: Rooting the Astro Slide
Post by: Noppe on August 19, 2024, 06:49:20 am
A couple of thoughts...

First of all, the images at the beginning of this thread are at this point very old. I would caution you against flashing a very old boot image unless you're confident it matches the version of Android currently installed on your device. If it does not match, you may end up with an unbootable device. I haven't used my Astro Slide in quite a while, so I do not know if the OS was ever updated in a way that would render the images in this thread unusable. Caveat emptor. Perhaps someone more up to date can comment.

Second, you are flashing to boot_a. Do you know for a fact that your device is trying to boot off the A partition and not the B partition? From the factory, boot_a is the boot partition, but if there's been an OS update in the meantime, it may have flipped over to boot_b for boot partition. If you use "fastboot flash boot ...", rather than boot_a or boot_b, it will always end up flashing the current boot partition, whichever one it is.

However, please revisit the first point. If you have indeed had an OS update that moved your boot partition to boot_b, and you flashed an out-of-date image to boot_a, you may have accidentally saved yourself by not overwriting the bootable image with an unbootable one.
Title: Re: Rooting the Astro Slide
Post by: ZimbiX on August 19, 2024, 07:05:18 am
@spa Please see the instructions in the wiki: https://github.com/planet-community/planet-devices/wiki/Astro-rooting
Title: Re: Rooting the Astro Slide
Post by: spa on August 19, 2024, 07:56:34 pm
Thanks Noppe, ZimbiX. I will retry!
Title: Re: Rooting the Astro Slide
Post by: spa on August 20, 2024, 01:54:11 am
Thanks Noppe, ZimbiX!
Everything went well. It was so easy that my previous hesitation was futile.
Code: [Select]
D:\>fastboot getvar current-slot
current-slot: b
Finished. Total time: 0.003s

D:\>fastboot flashing unlock
                                                   (bootloader) Start unlock flow

OKAY [ 26.931s]
Finished. Total time: 26.939s

D:\>fastboot flash boot_b boot-v07-magisk-from-app-26300.img
Sending 'boot_b' (40960 KB)                        OKAY [  1.318s]
Writing 'boot_b'                                   OKAY [  0.172s]
Finished. Total time: 2.121s

D:\>fastboot reboot
Rebooting                                          OKAY [  0.003s]
Finished. Total time: 0.009s

D:\>adb shell
Astro:/ $ su
Astro:/ # exit
Astro:/ $ exit
Title: Re: Rooting the Astro Slide
Post by: Noppe on August 20, 2024, 01:56:19 am
Great, glad that worked out for you. Yeah, this stuff isn't really that tough once you get some familiarity and confidence.  ;D
Title: Re: Rooting the Astro Slide
Post by: spa on September 24, 2024, 07:49:56 pm
As written above, I was able to be rooted Astro Slide on v07 without any problems, but when I carried out exactly the same procedure on the v07b, it fell into a boot loop. I cannot even power off.
I left it until the battery ran out and investigated with MTK client, the following rooted image for v07b seems to be incorrect. (Stock image is no problem.)
https://github.com/planet-community/planet-devices/wiki/Astro-rooting#rooting-methods

Writing with either FASTBOOT or MTK client,  it fell into a boot loop in the same way. MD5 matches have also confirmed.

When I used a boot image patched with Magisk v26.4 from the v07b Stock image, I was able to be rooted successfully.
For reference, I put it here.
https://drive.google.com/file/d/1dCSZicKI14S2sYMS-gz5rceJ301xL9SQ/view?usp=sharing
MD5 3ea412192887d4b320d6a1f9770c903d

Supplementary information.
After the battery ran out, I connected the power supply while holding down the volume reduction button, and it booted in FASTBOOT mode.
This procedure was new knew to me.
Even without MTK client, the boot image can be replaced again.
Title: Re: Rooting the Astro Slide
Post by: Dom (shymega) on January 30, 2025, 04:10:32 pm
As written above, I was able to be rooted Astro Slide on v07 without any problems, but when I carried out exactly the same procedure on the v07b, it fell into a boot loop. I cannot even power off.
I left it until the battery ran out and investigated with MTK client, the following rooted image for v07b seems to be incorrect. (Stock image is no problem.)
https://github.com/planet-community/planet-devices/wiki/Astro-rooting#rooting-methods

Writing with either FASTBOOT or MTK client,  it fell into a boot loop in the same way. MD5 matches have also confirmed.

When I used a boot image patched with Magisk v26.4 from the v07b Stock image, I was able to be rooted successfully.
For reference, I put it here.
https://drive.google.com/file/d/1dCSZicKI14S2sYMS-gz5rceJ301xL9SQ/view?usp=sharing
MD5 3ea412192887d4b320d6a1f9770c903d

Supplementary information.
After the battery ran out, I connected the power supply while holding down the volume reduction button, and it booted in FASTBOOT mode.
This procedure was new knew to me.
Even without MTK client, the boot image can be replaced again.

Please report a bug on the repo. You haven't said which rooted image you used, but if it's from my script, there is a issue with boot oops, which can be fixed with adb.

As for the rooted images based off the Magisk app, we have had no reports of failure on those, which is the same procedure as you replicated on your Astro.