Teclast X98 Air 3G: unbricking a Bay Trail tablet

While I was trying to boot a vanilla linux kernel on the Teclast X98 Air 3G I messed up a bit with the UEFI firmware settings: the battery was not recognized anymore, the tablet was rebooting right after showing the UEFI firmware boot screen, and USB-host was not working either; so no keyboard for accessing the firmware menu to restore the default settings, and no ADB for running flashrom or the Intel FPT to reflash the firmware with.

I decided to open the tablet and try to reprogram the flash chip In-System. In order to open the tablet without damaging it I started from the top of the device like shown in the video, and used something like these plastic opening tools.

The SPI flash chip used for the firmware is a Winbond W25Q64FW in a SOIC-8 package, I first tried to reflash it with a TUMPA, and then with a Beaglebone Black, but I failed, and I even managed to brick the device: the boot screen was not even displayed anymore.

Guess why... it was because I was trying to flash at 3.3V while the chip is supposed to work at 1.8V.

These are the FAILS which tech you a lesson the hard way:

Read the datasheet cover to cover (and maybe even understand it).

The indication about 1.8V was on the very first page...

OK, so I had a bricked device, how would I unbrick it?

There were several scenarios ahead:

  1. The flash chip was just erased, not damaged. Try to flash the chip at 1.8V.
  2. The flash chip was damaged. Unsolder it with a cheap Hot Air station (which I got anyway), and replace the chip with a new one found on AliExpress.
    Goto 1.
  3. Operating at 3.3V damaged some other components. Get another tablet and use this one for spare parts.

Luckily 1 was the case.

In order to flash at 1.8V I used this Logic Level Converter board from Sparkfun, and attached it to the BeagleBone Black like shown in the pictures below, I followed the indications from How to Access Chips Over the SPI on BeagleBone Black; the BBB kindly supplies 1.8V at pin 32 on the P9 header, so I used that as a reference for the lower voltage for the level converter.

The software side was pretty easy as I had flashrom already working on the BBB, and I had a backup of the flash contents:

root@arm:~/flashrom# echo BB-SPIDEV0 > /sys/devices/bone_capemgr.*/slots
root@arm:~/flashrom# ./flashrom -V -p linux_spi:dev=/dev/spidev1.0 -w ../Teclast_X98_Air_3G_IFWI_flashrom_dump.rom

And the tablet was working again.

Now back to try running vanilla kernels on it.

UPDATE:
Cosimo Orlando published an article about Unbricking a Teclast X98 BIOS with Bus Pirate 4 and Flashrom.

Teclast X98 Air 3G, internals
Teclast X98 Air 3G, mainboard
ISP with a logic level converter, top
ISP with a logic level converter, angle

CommentsSyndicate content

Thanks for sharing!! I hope

Stefan W.'s picture

Thanks for sharing!!
I hope to get my X98 also fully functional again.

Hello, I bricked my tablet

Youpimalin's picture

Hello,

I bricked my tablet tecast x80h by apply two bios one dual boot, which works, but after it desactived my windows lincense. (with intel fpart utility and a bios of 8192 ko siz) After i tried to go back with another bios , mono boot, which bricked my tablet (i also using fpart as afuwin.exe doesn't work. result: bricked tablet. The chipset is

MX25U6435F, 0xC22537, 0x4000000, 0x1000, 0x20, 64, 0, 0x60, 80000

very similar to your chispset:

W25Q64FW, 0XEF6017, 0x4000000, 0x1000, 0x20, 64, 0, 0xc7, 80000
;Description of fields:
;  1) Display name
;  2) Device ID (2 or 3 bytes)
;  3) Device Size (in bits in hexadecimal (0x) notation, For example 8 Mbit = (8*1024*1024) = (8,388,608) convert to hex 0x800000
;                  16Mbit=0x1000000, 32Mbit=0x2000000, 64Mbit=0x4000000, 128Mbit=0x8000000, 256Mbit=0x10000000, 512Mbit=0x20000000
;  4) Block Erase Size (in bytes - 256, 4K, 64K)
;  5) Block Erase Command
;  6) Write Granularity (1 or 64)
;  7) Enable Write Status Register Command (1- True, 0- False)
;  8) Chip Erase Command
;  9) Chip Erase Timeout (in milliseconds)

Can i use directly the first bios to flash my eeprom ?

Hi, the chips we are talking

ao2's picture

Hi, the chips we are talking about are the flash memories which store the firmware, the word chipset means something else.

Anyway if you can boot into an EFI shell or into an operating system, you can use FPT (Intel Flash Partitioning Tool) or even flashrom from the tablet itself to write a new firmware.

However when you say bricked I think you mean that you cannot even get to the EFI shell, in that case you will need to flash with an external programmer like I did.

And yes, you can write to the chip the same firmware you flashed with FPT the first time.

If flashrom does not support your EEPROM chip out of the box some coding will be required but it's very easy to add new chips to flashrom.

Thanks for your reply, and

Youpimalin's picture

Thanks for your reply, and thank to "well-tag" my previous comment.

Anyway i found in aliexpress an usb spi flasher 1.8v for 26 euros, http://tinyurl.com/l4c2y3r

As I don't have a BeagleBone Black, and don't have also the cable and electric components you have (just a cubietruck), I guess it s the cheapest way for me to flash my eeprom.

I will bookmark your blog, as a software engineer i found it interested.

Grazie mille.

Hi there, I just wanna say

Alex's picture

Hi there,

I just wanna say thank you so much for publishing this article, I have been looking for a help in this case for a long time and couldn't find anything till now.

I have a Teclast X98 Air II and unfortunately I bricked it during a flashing from Win 8.1 to Android 4.4.4. I already bought the USB flash programmer and the clip socket adapter on ebay
http://www.ebay.com.au/itm/381028670542?ssPageName=STRK:MEWNX:IT&_trksid...

http://www.ebay.com.au/itm/271597595384?ssPageName=STRK:MEWNX:IT&_trksid...

I just need your help to understand how and with what programmer I can unbrick the tablet? Could you please let me know??

Thanks again :)

Ciao Antonio, complimenti per

Giuseppe's picture

Ciao Antonio, complimenti per i post molto interessanti di questo blog (pochi blog entrano così profondamente nel merito delle questioni). Desideravo chiederti se hai avuto nuovi successi (o possibilità di effettuare altri tentativi) nell'installare Debian sul suddetto tablet. Sono interessato da tempo all'acquisto di un tablet Intel proprio per la potenziale possibilità di avere una macchina mobile lievemente più "aperta" rispetto ad un normale dispositivo android. Sai che ne vengono venduti con versioni del firmware UEFI con dual boot abilitato? Attendo tue notizie.

Ciao Giuseppe, un kernel

ao2's picture

Ciao Giuseppe,

un kernel recente parte senza troppi problemi, e modificando le tabelle ACPI del firmware si riesce anche a far funzionare il touchscreen ma ci sono ancora delle cose da sistemare, l'audio non va e la gestione della batteria è incompleta.

Pubblicherò i dettagli quando raggiungerò una configurazione abbastanza stabile.

Comunque Il firmware di questi dispositivi non è fatto molto bene, ho anche provato un firmware dual-boot sul mio ma la situazione non migliora di molto.

D'accordo! Continuerò a

Giuseppe's picture

D'accordo! Continuerò a leggerti allora. Dal versante Android invece, ho intenzione di mettere insieme un device tree funzionante per questo dispositivo per compilare una versione di Lollipop per X-86. Non so che tipo di supporto dia la Teclast (probabilmente nullo). Vedrò sul forum.
Saluti

Ma non conviene sistemare le

ao2's picture

Ma non conviene sistemare le tabelle ACPI e far usare quelle al kernel? Oppure device-tree è proprio richiesto per il kernel di Lollipop anche su x86?

In ogni caso, per favore, documenta i passaggi per compilare Android per x86. Prima o poi vorrò farlo anche io. :)

Supporto di Teclast: dovrebbero almeno rilasciare i sorgenti del kernel, ma non hanno risposto a nessuna delle mie richieste, e non credo valga la pena di scomodare avvocati.

Ciao, Antonio

Non ho mai lavorato con ACPI

Giuseppe's picture

Non ho mai lavorato con ACPI (mi piacerebbe imparare!), pertanto la mia esperienza è nulla in questo senso, come posso introdurmi alla questione? Per quanto riguarda Android per X86 ho già compilato con successo (ma con compromessi) una versione di Kitkat 4.4.4 tempo fa. Il problema è che senza avere un device tree (almeno così ho sempre fatto con architettura ARM) sostanzialmente si possono ottenere build funzionanti ma generiche (senza accelerazione hardware e con driver generici, quindi pressoché inutilizzabili). Come suggerisci di procedere? C'è qualche buona fonte da cui studiare il funzionamento delle tabelle ACPI?
Saluti!
Giuseppe

Il discorso più in generale è

ao2's picture

Il discorso più in generale è che per avere una installazione di Android funzionante al 100% bisogna avere i driver giusti nel kernel e anche una parte "platform" in userspace che si interfaccia ai driver.

ACPI e device tree poi sono meccanismi per descrivere l'hardware, e grazie a questi il kernel decide quali driver caricare e con che parametri. Su ARM solitamente si usa device tree, su x86 si tende ad usare ACPI.

Nel nostro caso un kernel Android utile potrebbe essere compilato partendo da qui: https://github.com/ZenfoneArea/android_kernel_asus_zenfone5

In questo repository sembrano esserci i driver per il nostro dispositivo, dovranno poi essere abilitati opportunamente in un file .config

Nei prossimi giorni pubblico la DSDT modificata (la tabella ACPI che ci interessa) e potrai vedere che tipo di modifiche sto apportando per cercare di migliorare l'aderenza con l'hardware.

Ho pubblicato alcune delle

ao2's picture

Ho pubblicato alcune delle modifiche alla DSDT: http://git.ao2.it/Teclast-X98-Air-3G_C6J6_custom_DSDT.git/

Ottima notizia Antonio! Non

Giuseppe's picture

Ottima notizia Antonio! Non vedo l'ora di leggere. Ho messo su un ambiente di sviluppo funzionante per compilare android per x86 e mi è riuscito con lollipop ma sempre per un "generic" device e per un processore a 32 bit (che non è il nostro caso) perché non ho idea di come fare per il kernel. Attendo news!

Anche io vorrei installare

eaman's picture

Anche io vorrei installare Debian su questo tablet in dual boot con android, al momento ho un tablet x80h con dualboot android linux.

Per il momento pero' mi basterebbe installare un linux in chroot tramite l'app Linux Deploy o ancora maglio con Debian Kit, purtroppo pero' sul mio tablet incui ho i privilegi di root entrambe le applicazioni non riescono a fare il debootstrap, forse non riescono a fare neanche un mount in bind...
Magari potrebbe essere che il kernel android non ha le delle feature tipo SE? Capita anche a voi su i x98 o simili?

Hello mate, thanks so much

Reno's picture

Hello mate,

thanks so much for this article, really appreciated.

I have a Teclast bricked as well and I would like to flash the eprom from my pc. That would be the fist time for me so some help would be more then welcome. My question would be also relevant for a lot of people as seems there is no so much information to how to do that. I got:

24/25 series EEPROM Flash USB Programmer CH341A Software&driver Power indicator

SOIC8 SOP8 Flash Chip IC Test Clips Socket Adpter BIOS/24/25/93 Programmer

Can I use those to flash the eprom?

Thanks,

Renato

Hi Renato, it looks like the

ao2's picture

Hi Renato,

it looks like the CH341A programmer is OK, some people used it with success.

However I do not know any more details, I only used the BeagleBone Black.

Ciao :) Ho un Teclast X80H al

Alberto's picture

Ciao :)
Ho un Teclast X80H al quale evidentemente non è andato bene il flash del bios dual boot. Perchè non mi è mai comparsa la schermata di selezione dell'os.
Aveva windows preinstallato, Io ho semplicemente seguito le guide per flashare il bios dual boot (che sembrava essere andato benissimo senza errori) e dopo flashare Android. Ma credo che android abbia mangiato una qualche partizione perchè nel bios nuovo c'è solo la voce UEFI OS nei boot order e non anche la "Windows Boot Manager".
Ora sono bloccato in android e non riesco a uscirne. QUalsiasi pennetta WinPE non si avvia dall'override, nemmeno DOS, Windows 7, Rufus, niente. Solo Acronis Disk Director (giusto per provare, credo sia basato su Linux) boota da pennetta ma non trova dischi.
Non so più cosa fare. Non voglio rimanere bloccato in Android, mi puoi aiutare in qualche modo?
Ti ringrazio infintamente

Per tutti coloro i quali

Alberto's picture

Per tutti coloro i quali hanno avuto lo stesso problema e sono bloccati in "Android only" senza dual boot menu, basta riflashare il bios appropriato da android usando comandi fastboot che si possono trovare sul thread di xda riservato a X98 air 3G o X98 air II :) un saluto a tutti

Hi I recently flashed the

Praveen's picture

Hi I recently flashed the teclast X98 Air II and is bricked . I just read the instructions on how to hard flash. I have a beaglebone black . Purchased the SOIC -8 test clip and logic level convertor. But I am not sure from where and how to run the commands.Please share the details

Hi Praveen, you can connect

ao2's picture

Hi Praveen, you can connect to the Baglebone Black with SSH or using a serial cable and give the commands from there.

Hello, i'm currently trying

Anonymous's picture

Hello, i'm currently trying to unbrick my bay trail tablet and unfortunately i have only access to a CH341A programmer.
The chip is a W25Q64DWTIM which operates at 1.8V.

For now i ordered a Adafruit 4-channel Logic Level Converter, a dc-dc converter and a soic clip.
The dc-dc converter is used (usb port 5V -> 1.8V) to get the required voltage.

Quick and dirty layout:
http://fs2.directupload.net/images/150517/eqkfw8e9.png

Could this be working?

Hi, I don't know the CH341A

ao2's picture

Hi,

I don't know the CH341A but from a quick look at the layout the flash side looks OK.

Maybe check the voltages with a multimeter before connecting the flash chip.

Ciao Antonio, Mi scuso per la

Giuseppe's picture

Ciao Antonio,
Mi scuso per la domanda "off-topic" ma mi è sorto un dubbio: il dispositivo monta una eMMC come memoria di archiviazione, dico bene? è saldata o sostituibile? (ho trovato su internet qualche modello di tablet intel in cui era possibile sostituire la memoria).

Ciao Giuseppe, credo sia

ao2's picture

Ciao Giuseppe,

credo sia saldata, dovrebbe essere la memoria e-NAND SK hynix H26M64003DQR che vedi in basso sulla destra in alcune delle foto, che è interfacciata come eMMC.

Ciao Antonio, ho brickato il

Paolo's picture

Ciao Antonio,
ho brickato il mio ax98 air 3g neltentativo di installare il bios buoal boot 2.02.
Seguendo altre guido ho cercato di riprogrammare l'eeprom ma sempre senza successo.

Tu hai la possibilità di provare a riprogrammarla?

Grazie

Ottima

Max's picture

Ottima guida!
Complimenti!
Abbiamo creato il gruppo Facebook "Teclast x98 Utenti Italiani" unisciti se ti va!

Salve Antonio, piacere di

Cosimo Orlando's picture

Salve Antonio, piacere di conoscerti.

Passo subito al mio problema. Volevo riprodurre quanto da te fatto su flashrom, ma utilizzando il mio BusPirate 4.0 a disposizione.

In un primo momento anch'io ho pensato di usare uno shift level e come voltage reference ad 1.8V un circuitino basato su LM317. Se l'ingresso del voltage reference (i 3.3/5v) lo prendo da BP4 (che può fornire al massimo 250mA) non ottengo risultati soddisfacenti col segnale, così ho collegato LM317 direttamente ad una seconda USB del PC ottenento una maggiore stabilità, ma la frequenza massima supportata da BP4 era difficile da raggiugere e sono stato costretto a scendere fino a 30kHz, ma anche così qualcosa nella lettura e verifica è andato storto, per cui mi sono detto di cambiare.

Dalla versione 0.9.7 (io ho compilato sotto Ubuntu la 0.9.8) è possibile configurare sotto flashrom le pullups da linea di comando, quindi in teoria, di usare il protocollo SPI senza uno shift level, ma fissando il voltage ref. per l'uscita da VPU, almeno in teoria.

Ho notato che se lo faccio da linea di comando flashrom, il segnale in uscita rimane il solito 3.3v, mentre andando a configurare in SPI open drain manualmente, la cosa funziona.

Il problema sta qui. Credo che in flashrom abbiano attivato le pullups senza configurare l'open drain della porta (cosa che si può fare anche manualmente ed in questo caso da errore). Se così fosse sono costretto a tornare allo shift level, ma i problemi sono gli stessi.

Un solido punto di riferimento per la tensione 1.8v e la frequenza massima usare per terminare la lettura/scrittura del bios.

A quale frequenza hai viaggiato tu in scrittura?
Mi sapresti dire all'incirca quante mA sono necessari per terminare la scrittura con successo?

Se avessi anche delle informazioni su BP sarebbe ottimo.

Grazie in anticipo per l'aiuto.

Ciao Antonio, sono riuscito a

Cosimo Orlando's picture

Ciao Antonio,

sono riuscito a leggere e scrivere tramite BP4, ma sto avendo comunque dei problemi. Potresti passarmi il tuo log? Ho notato che sei andato in verbose durante la scrittura.

Vorrei poterlo confrontare col mio.

Grazie.

Ciao Antonio, vorrei

Cryon's picture

Ciao Antonio,
vorrei chiederti cortesemente se nel mio caso è possibile evitare la riprogrammazione oppure sono "fregato"..
Ho eseguito il flash del bios (dual os 2.02) sul mio x98 Air III 32GB (che era con solo android) e la procedura non ha dato nessun errore.. ho fatto questo perchè volevo mettere il bios dual boot e mettere windows ma da quando ho fatto il flash mi va in loop l'avvio fermandosi al primo logo rosso.

Ho provato ad installare la Mirek's ROM sia partizionando che rimettendo "solo android" ma il problema persiste.. non mi fa vedere mai la schermata della scelta dell' OS

spero tu possa aiutarmi e ti ringrazio
Fra

Ciao Fra, non conosco i

ao2's picture

Ciao Fra,

non conosco i dettagli di come funzionano questi firmware dual-boot.

Comunque, una cosa che puoi fare è collegare una tastiera USB e vedere se riesci ad accedere al menu del firmware UEFI (premendo ESC, CANC o F-qualcosa all'avvio), nelle opzioni di avvio dovresti poter vedere quali sistemi vengono rilevati.

I ogni caso, anche se dovesse essere necessario riprogrammare il firmware, se puoi accedere al menu del firmware puoi lanciare una shell UEFI e riprogrammare da lì con Intel FPT (flash programming tool), senza programmatori esterni. Un eseguibile UEFI di FPT lo trovi da qualche parte in rete, se non lo trovi contattami via email e cerco se ne ho una copia qui.

Ciao, Antonio

Ciao Antonio, ti ringrazio

Cryon's picture

Ciao Antonio,
ti ringrazio per la celere risposta.

Non ho purtroppo al momento una tastiera usb ma andrò a comprarla a breve per fare questo test.

Ora comunque non mi fa più nemmeno fare il flash delle rom correttamente mi ritorna sempre degli errori.. se cerco di mettere la mirek rom mi da "Failed to execute fastboot -s Baytrail oem start_partitioning" se invece cerco di rimettere la rom stock mi da "no valid installer medium found" ed ho provato scaricando direttamente dal sito del produttore tutti i file del mio modello esatto.

Ho provato anche a lanciare dei comandi tramite fastboot ma mi ritorna sempre un messaggio tipo "FAILED (remote: unknown command)"

Grazie ancora
Fra

aggiornamento.. sono riuscito

Cryon's picture

aggiornamento.. sono riuscito a fare il flash sia della stock che della mirek rom ma il problema del boot loop persiste.. provo con la tastiera perchè è l'ultima soluzione possibile.. tu hai altre idee se non dovesse funzionare?

Grazie
Fra

L'unica idea che mi viene al

ao2's picture

L'unica idea che mi viene al momento, se il menu di questo firmware non aiuta, è provare diverse versioni di firmware.

Ma c'è sempre un margine di rischio quando fai il flash del firmware.

Ciao, Antonio

Rieccomi.. sono andato a

Cryon's picture

Rieccomi.. sono andato a comprare una tastiera ed un hub usb ed effettivamente riesco ad entrare nel bios ma non vedo opzioni di boot e se seleziono l'opzione della shell la cerca sul filesystem e credo non trovandola fa nuovamente il boot loop

il bios ho verificato è effettivamente il 2.02 ma non so che fare.. provare con una chiavetta bootable?

aggiornamento.. oltre a non

Cryon's picture

aggiornamento.. oltre a non farmi vedere opzioni di boot se cambio alcuni valori come "setup prompt timeout" o "quiet boot" e premendo "save and reset" oppure "save and exit" non salva nessuna modifica

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account associated with the e-mail address you provide, it will be used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
R
B
s
D
n
c
Enter the code without spaces.