Hovatek Forum DEVELOPMENT Android [Development] How to root Unisoc | Spreadtrum Android 9+; Case study: Teclast P80X
Try our Online TWRP Builder..its free!
Can't login? Please, reset your password.


[Development] How to root Unisoc | Spreadtrum Android 9+; Case study: Teclast P80X

[Development] How to root Unisoc | Spreadtrum Android 9+; Case study: Teclast P80X

Pages (11): 1 2 3 4 511 Next
hovatek
hovatek
hovatek
Administrator
49,612
13-03-2020, 09:41 PM
#1



In this tutorial, we are going to show how to root a Unisoc / Spreadtrum android 9 (pie) device by patching the stock recovery.img using magisk manager and signing using avbtool. The variant used in this guide is the Teclast P80X G5K1

Note: Most of the work happens in the requirements section below so pay close attention to them

Requirements

  • A Linux and Windows PC. I'm using Ubuntu via Live USB on my Windows PC for this guide
  • An Unlocked Bootloader
  • A custom signed vbmeta image (with recovery partition signed using your custom public key) which you must have already flashed to the device
  • Stock recovery.img ; you can get this by extracting PAC firmware for your device model
  • Patch your stock recovery.img using Magisk manager and copy the magisk_patched.img to your PC. Don't attempt to flash the magisk patched image yet
  • Sign the magisk_patched_recovery.img using this guide . This will give you a signed magisk patched recovery image

Steps on how to root a Unisoc / Spreadtrum android 9 (Pie) device using Magisk Manager and patched recovery.img


Follow the steps below to root a Unisoc android 9 (Pie) device

  1. I'm using the file name magisk_patched_recovery_signed.img in this example. Ensure to input your own file name
  2. Copy the magisk_patched_recovery_signed.img into the same folder as your fastboot file then launch command prompt / terminal from this folder
    • For Linux users, right click on any empty space within the folder then select "Open in terminal"
    • For Windows users, hold shift key and right click on any empty space within the folder then select "Open CMD or Powershell window here"
  3. Get the device into fastboot and flash the signed magisk patched recovery image as explained below.
  4. For Linux users
    Code:

    ./fastboot flash recovery magisk_patched_recovery_signed.img

  5. For Windows users
    Code:

    fastboot flash recovery magisk_patched_recovery_signed.img

  6. Now to get root access, you must always boot the device to recovery but because some devices have an effective recovery-from-boot.p (a security mechanism that attempts to revert back to stock recovery once you boot to home screen), we suggest that you power off your device directly from fastboot using this guide

  7. Once powered off, attempt to boot the device into recovery mode. Instead of entering recovery mode, it'll just boot up normally to homescreen. Don't be alarmed

  8. Once in homescreen, confirm root using root checker app from playstore @ https://play.google.com/store/apps/detai...heck&hl=en

  9. If your device is rooted successfully then download a root file manager from play store e.g File Explorer Root Browser by JRummy Apps @ https://play.google.com/store/apps/detai...free&hl=en

  10. Navigate to \root\system and look for recovery-from-boot.p .If found, rename the file recovery-from-boot.p to recovery-from-boot.p.bak . This will prevent the phone from trying to revert back to stock recovery

[Image: How-to-root-Unisoc-SPD-Android-9-Case-st...t-P80X.jpg]

Important Notice
  • Some models require you to do a factory reset immediately after flashing the magisk patched boot or recovery to avoid getting stuck in a bootloop
  • Patching boot.img using the Magisk Canary version as explained at https://www.youtube.com/watch?v=ZGLWoJ-POlA gave me root. If that fails for you then just stick to recovery.img as in the guide above
  • Unisoc devices running android 9 (pie) use system_as_root so you're to patch recovery.img and no longer boot.img
  • For every time you reboot the phone normally, you'll loose root. You can easily regain root by attempting to reboot to recovery ; see step 7 or use the adb command "adb reboot recovery"
  • Avoid attempting to flash images that you haven't signed using tools like Research Download tool or fastboot else you'll get stuck at waiting
  • Some devices which have recovery-from-boot.p might get stuck at logo if they reboot straight to home screen (after flashing the signed magisk recovery image) then attempt rebooting to recovery mode. This is because recovery-from-boot.p has overwritten your signed magisk recovery with stock recovery which doesn't match the hash contained in your custom signed vbmeta. This is why we advise powering off after fastboot flash then attempt booting into recovery mode using button combo
  • If you encounter fastboot: error: Couldn't parse partition size '0x' then flash using fastboot flash:raw partition image-name.img
  • Credits goes to topjohnwu for Magisk
  • Use Magisk-v23.0 or Magisk-v24.3 instead of the latest version if you fail to get root access
This post was last modified: 14-06-2024, 11:04 AM by hovatek.
djelloul
djelloul
djelloul
Enthusiastic Member
8
16-03-2020, 09:10 PM
#2
Hello!

I just wanted to give a big thank you for this clear tutorial and proof of concept regarding the procedure to follow to be able to root this specific Teclast tablet.

I own the USB-C version of this P80X (model G5K4) and I've made a mistake by updating my European variant to the only firmware available but I didn't know it was a Chinese one.
Doing this made the tablet less interesting because it has no access to the play store and it's services, and I had no possibility to revert back the update...

Thanks to your advices and demonstration I was able to root my device and I've been able to import manually the set of Gapps I wanted to finally have the tablet more useful again.

I now better understand the concept of signed bootloader and how it influences software package cyber security.

It will be interesting if we can also port TWRP to this tablet following your signing tutorial, but I'll add my remark to the appropriate post on this forum.

Thank you again!
hovatek
hovatek
hovatek
Administrator
49,612
16-03-2020, 10:09 PM
#3
(16-03-2020, 09:10 PM)djelloul ...
It will be interesting if we can also port TWRP to this tablet following your signing tutorial, but I'll add my remark to the appropriate post on this forum.

Thank you again!

We're working on a TWRP porter for Unisoc Android 9. Hopefully, you'll be on ground to test

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
Axolotl
Axolotl
Axolotl
Newbie
2
29-03-2020, 01:02 AM
#4
(16-03-2020, 09:10 PM)djelloul Hello!

I just wanted to give a big thank you for this clear tutorial and proof of concept regarding the procedure to follow to be able to root this specific Teclast tablet.

I own the USB-C version of this P80X (model G5K4) and I've made a mistake by updating my European variant to the only firmware available but I didn't know it was a Chinese one.
Doing this made the tablet less interesting because it has no access to the play store and it's services, and I had no possibility to revert back the update...

Thanks to your advices and demonstration I was able to root my device and I've been able to import manually the set of Gapps I wanted to finally have the tablet more useful again.

I now better understand the concept of signed bootloader and how it influences software package cyber security.

It will be interesting if we can also port TWRP to this tablet following your signing tutorial, but I'll add my remark to the appropriate post on this forum.

Thank you again!
Hello there! Sorry to barge in but I wanted to ask you, how was it that you unlocked the bootloader of the P80X to begin with?! I have been trying and always get the message "Not implement."
IF you could take a bit of time to enlighten me there, I'll be super thankful, best regards!
xerxes
xerxes
xerxes
Senior Member
8,357
29-03-2020, 02:28 PM
#5



(29-03-2020, 01:02 AM)Axolotl
(16-03-2020, 09:10 PM)djelloul Hello!

I just wanted to give a big thank you for this clear tutorial and proof of concept regarding the procedure to follow to be able to root this specific Teclast tablet.

I own the USB-C version of this P80X (model G5K4) and I've made a mistake by updating my European variant to the only firmware available but I didn't know it was a Chinese one.
Doing this made the tablet less interesting because it has no access to the play store and it's services, and I had no possibility to revert back the update...

Thanks to your advices and demonstration I was able to root my device and I've been able to import manually the set of Gapps I wanted to finally have the tablet more useful again.

I now better understand the concept of signed bootloader and how it influences software package cyber security.

It will be interesting if we can also port TWRP to this tablet following your signing tutorial, but I'll add my remark to the appropriate post on this forum.

Thank you again!
Hello there! Sorry to barge in but I wanted to ask you, how was it that you unlocked the bootloader of the P80X to begin with?! I have been trying and always get the message "Not implement."
IF you could take a bit of time to enlighten me there, I'll be super thankful, best regards!


See the requirement section for how to unlock bootloader.
Axolotl
Axolotl
Axolotl
Newbie
2
29-03-2020, 04:09 PM
#6
Aaah thanks! Don't know how I missed that, I also own the version G5K4, so which version of the firmware did you use for the PAC file? I see teclast has two firmwares on their page, for GSK1 and GSK2 but no GSK4 Sad
hovatek
hovatek
hovatek
Administrator
49,612
30-03-2020, 01:27 AM
#7
(29-03-2020, 04:09 PM)Axolotl Aaah thanks! Don't know how I missed that, I also own the version G5K4, so which version of the firmware did you use for the PAC file? I see teclast has two firmwares on their page, for GSK1 and GSK2 but no GSK4 Sad

Mine is G5K1.
I believe all P80X variants should use the same fdl 1&2 so it should be possible to backup your firmware using a pac for other variants & the guide @ https://www.hovatek.com/forum/thread-31800.html
Try this at your own risk though

Note!
We have a reply schedule for Free Support. Please upgrade to Private Support if you can't wait.
djelloul
djelloul
djelloul
Enthusiastic Member
8
17-04-2020, 02:37 PM
#8
(29-03-2020, 04:09 PM)Axolotl Aaah thanks! Don't know how I missed that, I also own the version G5K4, so which version of the firmware did you use for the PAC file? I see teclast has two firmwares on their page, for GSK1 and GSK2 but no GSK4 Sad
There's a G5K4 firmware available but it only shows in the chinese version of Teclast site.
However, I do not suggest you to use as it is a Chinese only variant and it doesn't contain Google services at all.
I've made an error by flashing it, and because I have no save of the firmware that was originally present in the device, I'm now stuck with a Chinese ROM and I did everything to make Google services working with it.
Thanks to this site support I was able to root the device and I manually added some Google services support, but I'm still looking for a working TWRP that will let me use an OpenGapps package and install the Google Service framework properly.

By the way, If you make a save of your G54K firmware, I'll be interested to have a copy of it if it's something you'll be glad to share.

If you still have difficulties to unlock and root the tablet, please let us know.
hovatek
hovatek
hovatek
Administrator
49,612
17-04-2020, 11:27 PM
#9
(17-04-2020, 02:37 PM)djelloul ...Thanks to this site support I was able to root the device and I manually added some Google services support, but I'm still looking for a working TWRP that will let me use an OpenGapps package and install the Google Service framework properly.
...

have you tried the tool @ https://www.hovatek.com/forum/thread-21669.html ?
djelloul
djelloul
djelloul
Enthusiastic Member
8
20-04-2020, 02:02 PM
#10
(17-04-2020, 11:27 PM)X3non
(17-04-2020, 02:37 PM)djelloul ...Thanks to this site support I was able to root the device and I manually added some Google services support, but I'm still looking for a working TWRP that will let me use an OpenGapps package and install the Google Service framework properly.
...

have you tried the tool @ https://www.hovatek.com/forum/thread-21669.html ?
Yes, I've tried the tool you have pointed me and I already given some status about it in the following thread @ https://www.hovatek.com/forum/thread-32735-post-188913.html

In fact TWRP is executing and is working with external data storage, but access to the internal memory and system partitions seems to be encrypted because file and folder names are showing with random characters very long names without file extensions.
After checking the encryption status of the tablet, the system says it's in encrypted state, so everything seems in accordance, but there's no option to unencrypt the device under Android 9 in this Teclast P80X device.

I don't know if my analysis is good or if there's another reason behind this strange behavior.
I've shared multiple screenshot in the other post, so if someone can help.
I'll bump it up to give it visibility again and see if someone has some ideas.

However, thank you for your kind help.
Pages (11): 1 2 3 4 511 Next
Users browsing this thread:
 2 Guest(s)
Users browsing this thread:
 2 Guest(s)
YtWhTl
live chat
whatsapp telegram