Join us on Tl   Wh

Hovatek Forum DEVELOPMENT Android [UNLOCK][ROOT][UNBRICK] for Unisoc T310 Chipset

[UNLOCK][ROOT][UNBRICK] for Unisoc T310 Chipset

[UNLOCK][ROOT][UNBRICK] for Unisoc T310 Chipset

23-07-2024, 05:24 PM
#1



###HOW TO ROOT UNISOC T310###

!!!ATTENTION, FOLLOW THE STEPS AT YOUR OWN RISK, TAKING ALL CARE TO ADAPT THIS METHOD TO YOUR DEVICE!!!

A good part of this tutorial applies only to devices with the Unisoc T310 chipset (you can check this in programs like AIDA64, in the Processor tab), different chipsets may vary in some ways, be careful.

!!!THIS METHOD WILL WIPE ALL YOUR DATA, MAKE A BACKUP!!!

----------------------------------------------------------------------

###ACQUIRE BOOT.IMG FROM YOUR STOCK ROM###

First, download the SPD_Upgrade_Tool_R26.21.2801 and your stock ROM, which because it is Unisoc will probably be a .pac file.

Then, download the Spd drivers, in my case it is the SPD_Driver_R4.20.4201 ( https://gsmusbdriver.com/install-spd-driver-r4-20-0201 ) and restart the machine.

With the Spd_Upgrade_Tool open, load your stockrom .pac, and go to the folder where its executable is, enter the folder and go to "ImageFiles", there will be a sub-folder with your files, look for the file "boot.img" and "vbmeta-sign-img", and copy it to your PC.

###PATCHING THE BOOT.IMG FILE###

For Magisk to work, we will need to have the "boot.img" that we copied to the PC on hand. Now, connect your Unisoc in file transfer mode and move the boot.img to your device. Download the Magisk apk from GitHub and install it. Inside the Magisk application, in the first box, click Install, and then select "Select and Patch a File." Look for the boot.img that you moved to Unisoc, select it and click "Let's Go" in the upper right corner. Wait for it to show completed and exit. It will patch your boot.img and place it in your Downloads folder. Copy this file to your PC (magisk_patched-27000_XXXXX.img).

###UNLOCKING YOUR BOOTLOADER###

Follow this tutorial: https://www.hovatek.com/forum/thread-32287.html

Basically you will have to enable USB Debugging and OEM Unlocking in the Developer Options (click 7 times on "Build Number" to unlock these options or something similar).

And download the modified fastboot (I recommend downloading adb and the normal fastboot as well).

###SIGNING THE BOOT.IMG###

After successfully unlocking your Bootloader, create a folder called "unisoc", and in this folder copy the "rsa4096_vbmeta.pem" from the modified fastboot (if it works to unlock the bootloader, there is the option of "rsa2048_vbmeta.pem" in case the first one does not work to unlock your bootloader).

Install Python3 and download avbtool.py( https://www.hovatek.com/redirectcod...1T1ZuZk5iRmFTQlpKTWlOTEtZSHRTS29pSDk1VlNBbw== )

Move your "magisk_patched-27000_xxxxx.img" and "vbmeta-sign.img" to the "unisoc" folder, along with avbtool.py and rsa4096_vbmeta.pem, and finally, rename your modified "magisk_patched-27000_xxxxx.img" to "magisk_patched-27000.img".

Then open a terminal (or shell, if using Windows) in the "Unisoc" folder and type:

python3 avbtool.py add_hash_footer --image magisk_patched-27000.img --partition_name !boot_partition! --partition_size !xxxxxxxx! --key 4096_vbmeta.pem --algorithm SHA256_RSA4096

"boot_partition" refers to the partition that your modified boot.img will be flashed to (this can be seen using avbtool.py on vbmeta-sign.img, with the command: python3 avbtool.py info_image --image ./your_file and looking for something with boot in the name within the command output).

"xxxxxxxx" refers to the size of the magisk boot_img in bytes, you can see it in the file properties.

If it doesn't show any errors when signing the file, we will have the Magisk boot.img signed in our hands.

### FLASHING THE MAGISK IMAGE ###

To flash it is very simple, you will have to enter fastboot, connect your device to the PC via USB, you can enter fastboot either through Adb (adb reboot bootloader), or through Recovery (press Power+Volume- when turning on the device. Tip: only release Power after the screen turns on).

Inside the folder where the boot.img modified by Magisk and signed by avbtool.py is, enter the following command:

!!!BE CAREFUL TO USE THE SAME PARTITION THAT YOU PUT IN AVBTOOL TO SIGN!!!

fastboot flash --slot=all !boot_partition! --disable-verity --disable-verification magisk_patched-27000.img

After completing without errors, it is crucial that you go to recovery (fastboot reboot recovery) and do a "Wipe Data/Factory Reset", and then go to "PowerOff".

Congratulations! Your device is rooted!


----------------------------------------------------------------------


###IF MAGISK DOES NOT START###
|
|-1. Boot frozen without BootLoop
|
|-2. Constant Bootloop
|
|-3. Android Version Number incompatible with StockRom Version Number

1.###BOOT FROZEN WITHOUT BOOTLOOP###

In case of boot freeze without bootloop, try holding the power button until it turns off (if it doesn't work, try Power+Volume-, if it still doesn't work, just wait for the battery to drain), with SPD_Research_Tool_R21.0.0001 open, load the file .pac of your StockRom and in the two gears (Settings), check and uncheck the "Select All Files" box, leave it as it is (do not uncheck what was checked) and check "BOOT", and ok, leave the mouse over the arrow (StarDownloading) and holding the Volume - (minus) button, plug the device into the PC's USB and see in the device manager (devmgmt.msc) if the "SPRD U25 DIAG" port was recognized, if so, quickly press StartDownloading on the PC, all this without releasing the volume button - on Android, hold it until FDL2 loads completely, it will probably flash the boot.img and the original vbmeta.img.

2.###CONSTANT BOOTLOOP###

Download SPD_Upgrade_Tool_R26.21.2801 and load the .pac file into it,
when the screen goes black after the bootloop, hold the volume button - and plug the USB port into the PC, check in the device manager (devmgmt.msc) if the "SPRD U25 DIAG" port was recognized, if so, quickly press StartDownloading on the PC, all this without releasing the volume button - on Android, hold it until FDL2 loads completely, if everything goes well, you can release it and wait for the process, it will finish with the output status being something like "_POWER_OFF_", so, click on the PC to stop downloading, and unplug the device, it will probably turn on normally, with all data cleared, of course.

To prevent it from updating itself again, go to Developer Options (Click on Version Number 7 times) and turn off the automatic system updates option. Then, go back to the initial settings tab and search for "Update", scroll down and look for the "System Update" application, force it to stop and in "Battery", click on "Background Restriction" and set the Restriction, exit and restart the tablet, and you're done.

3.###ANDROID VERSION NUMBER INCOMPATIBLE WITH STOCK ROM VERSION NUMBER###

Before doing anything, pay attention to the Android version number of your device, normally, there will be a reference (either a date or a compilation code) inside the Android Version Number, compare it with the Version Number of the .pac file of the StockRom and see if it is compatible, if not, try to look for a compatible StockRom or simply flash your .pac file of the StockRom that you have for your Device.

To do this, turn it off and connect it to the PC's USB port, wait for the battery screen to appear, it will be your reference, on the Computer, pay attention to the Device Manager (devmgmt.msc), load your StockRom .pac in SPD_Upgrade_Tool and wait for the bar to load, after it shows the word "Ready" in the lower left corner, go to your Android device and press the power button once to appear the battery screen and then press Power + Volume-, when the battery screen goes out, release the Power button and continue holding Volume-, if everything goes well, in the Device Manager the port "SPRD U25 DIAG" will appear, at this time you should instantly click on the SPD arrow on the PC (StartDownloading), if everything goes well it will start Flashing the system.
hovatek
hovatek
hovatek
Administrator
49,778
25-07-2024, 09:07 AM
#2
Thanks for sharing
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
Join us
WhTlYt