bkerler / mtkclient

MTK reverse engineering and flash tool
GNU General Public License v3.0
2.61k stars 521 forks source link

MTKClient being run on Debian Stable 11 chroot container on an Android 8.1 Custom ROM tablet #684

Closed mlolly closed 1 month ago

mlolly commented 1 year ago

I have an Uncle that gave myself and a cousin of mine a bunch of old Android tablets running a custom ROM 8.1 Oreo version of Android from his business when he got new ones. My cousin and I do not have computers. He got two of the tablets rooted and they have term and file explorer on them. He successfully installed an Ubuntu chroot container (unknown version or distribution) and MTK Client (unknown version) and was successfully able to pull the system.img then extract it and put the necessary info in the build.prop to turn ADB on and then write the image back onto the tablet. At the time I was not interested but sadly my cousin passed away and I have been trying to reproduce his efforts in order to give some of these tablets away to my grandkids and nieces and nephews. I have the second rooted tablet but do not have the original Ubuntu package that my cousin got to work. I tried to do the Ubuntu package myself with several distributions and several versions of MTK Client but was unsucessful. I tried to do the latest version of Termux with MTK Client 1.52 but also was unsucessful. The only thing that seems to come close is the Debian Stable package with the below specs:

I have MTK Client 1.52 installed on an Android tablet running 8.1 Oreo with a MTK chipset of MT 8163. I am using a Debian GNU/Linux 11.7 chroot container from the Debian Stable distribution (2.5 gig container/1.1 gig free) that I installed the MTK Client to. All the requirements from the MTK Client 1.52 have been met: Wheel; pyusb; pycrytodome; coloram; usb; and phython 3.9.

When I use the following command from my master (rooted) custom ROM Android 8.1 (MT 8163) to the slave custom ROM Android 8.1 (MT 8163):

phython3 MTK r system system.img

It creates the system.img but it is 0 bytes. When I do a dubug on this process it goes through everything and when it starts to read the image it reboots the master player after the 4th or 5th timeout message.

I have a copy of the debug file which I have attached. Can anyone help me wit my problem here? Much thanks in advance log.txt

bkerler commented 1 year ago

The problem is the legacy usb reconnect. Just change the line 1301 in Library/mtk_dalegacy.py to "if speed[0] == 3:" and it might work.

mlolly commented 1 year ago

Thank you very much for the information. Sorry it took me so long to reply. I have been gone on a business trip. I ended up deleting that particular version of mtkclient that i requested help with and had i of seen this post beforehand it would of saved me trouble. After a week i never checked back which is my fault. Since then i have the correct version of mtkclient that works android 8.1 to android 8.1. I now have another problem.

These tablets of mine that I inherited (android 8.1 custom ROM). A few of them are stuck in fastboot mode. Since it is custom ROM there are no options to select with in fastboot or recovery mode using volume keys. When I connect to these tablets I use fastboot reboot and the tablet reboots but goes right back into fastboot. I tried fastboot reboot-bootloader and it states success on my end and the tablet goes blank for a few seconds and then goes right back into fastboot.

My question is now that I have mtkclient working and it reads and writes image (bin) files to these android 8.1 custom mt8161 chipset...Is there any way to fix my fastboot issue with a few of these tablets using the mtkclient to flash the bootload or somehow get the fastboot back to normal mode?

Is there a python script I can use to force it out of fastboot?

Apparently there are a few programs on the market that will get a stuck fastboot out of that mode but those are windows based. i need something that is either android player to player base or linux based which i can use in the Ubuntu change root environment I work out of on my Android 8.1.

Thanks for any help

oddsito commented 8 months ago

This is old, I bet you fixed it by now, but once in fastboot you could use a tool like "bugjaeger" to flash a rom, or anything of your preference. If you need more info google is always helpful

Reyhank45 commented 4 months ago

I think you should close this issue tbh Because the main issue is already fixed

github-actions[bot] commented 2 months ago

Stale issue message