Unbrick a Teclast X98 Air II Bios

Teclast X98 Air II Intel Bay use Trail-T Z3736F Quad Core at 2.16 GHz it got 9.7 Inch IPS screen with a resolution of 2048*1536, 2GB of ram and 32GB of internal storage. With no surprise it catch the attention of many with a price around 200 euros.

You can find the tablet in different versions, the main difference it’s about been the tablet dual boot or not but you can find also other variants which seems to have minor hardware differences and different bios.

In this scenario you can understand how easy can be to brick your device just flashing the wrong bios version,  turning this nice toy in a piece of junk. But before you buy a new one you should try to recover your device with this easy guide.

This procedure can be also used to unbrick many other devices such as IPcam and routers, most of them uses in fact the same eeprom series, 25XX or 24XX series to be precised.


It’s easy to understand which eeprom we got, in this case, for instance we got a a 25xx series:


This is important to connect the programmer correctly.


What we need:

1) A Teclast X98 Air II or similar, of course

2) The Bios for you tablet version

3) A CH341A 24/25 series EEPROM Flash USB Programmer

4) A SOIC8 IC Test Clips Socket Adpter

You can find a kit at this address:



I would strongly recommend to buy this kit as has already been tested but any programmer should be just fine.

Please we aware that this procedure has been tested in Windows 7 only, it’s essential that you use the right software / driver combination, most of time when you use the wrong driver the software seems to be unreliable.


1) Install the software that you can download from here:


password is supercowz


you can also try a Linux version available here:



2) Download the Bios from here:



3) Connect the clip on the chip:

Be careful about the clip orientation, it must follow the dot on the chip!

4) Connect the USB cable

5) If the cable has been connected in the right way you should see Device State: Connected on the bottom right side

6) Load the Bios on the software

7) press Erase

8) press program

When you power on the bios the first time, depending if you are flashing a different platform bios (for instance you  had an android tablet and you are flashing a bios for windows) it’s possible your tablet will boot up to UEFI, if does you tablet it’s fine, you just need to install the OS.

Kernel 3.16.1 For Ubuntu 14.04 64 Bit

Following the link where to download the deb packages for the Kernel, please note that I didn’t build those packages.


wget http://everythingisafile.com/Downloads//Kernel_U14_04_64Bit_3.16.1/linux-headers-3.16.1-031601_3.16.1-031601.201408140014_all.deb

wget http://everythingisafile.com/Downloads//Kernel_U14_04_64Bit_3.16.1/linux-headers-3.16.1-031601-generic_3.16.1-031601.201408140014_amd64.deb

wget http://everythingisafile.com/Downloads//Kernel_U14_04_64Bit_3.16.1/linux-image-3.16.1-031601-generic_3.16.1-031601.201408140014_amd64.deb

and to install:

dpkg -i *





Kernel 3.13.3 for Ubuntu 12.10 32 Bit

I’m planning to move to Ubuntu 14.04 very soon, also because my server is still running on a 32 bit distro, I know I’ve been very lazy in the past few months, but in a place like that:


is not easy to think about the Linux kernel 🙂

I had upgraded the Kernel because I had some issue with a dvb card and lirc (I use my server for everything except the coffee)

wget http://everythingisafile.com/Downloads/Kernel_U12.10_32-3.13.3/linux-headers-3.13.3-custom_3.13.3-custom-10.00.Custom_i386.deb

wget http://everythingisafile.com/Downloads/Kernel_U12.10_32-3.13.3/linux-image-3.13.3-custom_3.13.3-custom-10.00.Custom_i386.deb

to install:

dpkg -i *

enjoy -)



Track the execution time for a script or command

If you want to measure how long a script or command take to complete you can use the time command. It can be use for instance as benchmarking or to tweak the command option according to our needs, for example in a backup scenario we could use different compression methods or different locations.
Let’s assume the script name is backup.sh

time ./sbackup.sh

real 0m1.115s
user 0m0.000s
sys 0m0.008s

real shows the execution time of the whole script, user and sys tracks the CPU processing time. From the results, shows us that backup.sh uses 8 milliseconds CPU processing time in kernel mode (sys) and None in user mode.

iMON UltraBay On Ubuntu and XBMC

Imon Ultrabay it’s a a 2 bays LCD display, button control and came with the Pad Remote Control. It’s basically all you need to make a real HTPC system.

There is not official Linux support, but it can be used with few tweak.


The iMON Pad remote control

iMON Pad Remote Control, Feature of Buttons
1. Application Exit: Closing foreground application or iMEDIAN HD [ALT]+[F4]

2. Power: Turn on/off the system (Turn on feature is only available on the internal receiver)

3. Record Button

4. Media Control Button Group 1: Play/Pause/Stop/Open/Prev/Next/Rew/F.Fwd

5. Mouse/Keyboard Button: Switching the usage of Pad control between mouse and keyboard 4 way keys

6. Backspace Button to the previous view of iMEDIAN HD

7. Select/Space Button

8. Pad Control: Mouse cursor control & 4 way arrow keys

9. Windows Start Button

10. Windows Menu Button

11. Mouse Left Click Button

12. Mouse Right Click Button

13. Enter Button: Enter Button to go to the next view of iMEDIAN HD

14. ESC Button

15. Open/Close CD/DVD ROM tray

16. Quick Launch Button: Launch Quick Launch Application, iMEDIAN HD

17. Application Launcher: Running Application Launcher, Easiest way to run application

18. Task Switcher: Running Task Switcher, select the application window among the running applications [ALT]+[TAB]

19. System Volume Mute Button

20. iMON Timer: Running iMON Timer, management of power on/off and alarm schedule

21. VOL/CH Button: Control of Volume and TV channel

22. Custom button group for user customized command

23. Media Control Button Group 2

Find the device name cat /proc/bus/input/devices

I: Bus=0003 Vendor=15c2 Product=0045 Version= 0002N: Name=”iMON Remote(15c2:0045)” P: Phys= usb-0000:00:1a.0-2/input0 S: Sysfs=/devices/pci0000:00/0000:00:1a.0/usb3/3-2/3-2:1.0/rc/rc0/input7 U: Uniq= H: Handlers=kbd event7 B: PROP=0 B: EV=100013 B: KEY=fff 0 0 4400000 108c0320 2d50080 0 0 30000 4 119000 4186 14000801 809e1680 0 2000000 10004002 B: MSC=10



Install e configure lirc

apt-get install lirc


if you get:

* Unable to load LIRC kernel modules. Verify the  selected kernel modules in /etc/lirc/hardware.conf

the kernel module are:

# /etc/lirc/hardware.conf #

#chosen Remote Control REMOTE=”Soundgraph iMON IR/LCD”

REMOTE_MODULES=“lirc_dev lirc_imon”


a good start is to try to load this modules manually:

# modprobe lirc_imon


FATAL: Error inserting lirc_imon (/lib/modules/3.6.3-030603-generic/kernel/drivers/staging/media/lirc/lirc_imon.ko): Invalid argument


# cat /var/log/syslog | grep imon

Seems the module on lirc_imon.ko got some problem, let’s replace it with:

mv /lib/modules/3.6.3-030603-generic/kernel/drivers/staging/media/lirc/lirc_imon.ko ~/.


Install from source

wget http://sourceforge.net/projects/lirc/files/latest/download?source=files


mv “download?source=files” lirc-0.9.0.tar.bz2

tar -jxf lirc-0.9.0.tar.bz2

cd lirc-0.9.0

aclocal && autoheader && autoconf

Check the ssh connection attemps

Checking the ssh connection attemps it’s a good start if you suspect an autorized access to your server, also if you are using a pubblic facing address with a standard port it’s a good pratctice to check the logs time by time.

The settings related to the ssh logs file are on:


OpenSSH logs using the AUTH facility of syslog and by default it’s set on a basic level called INFO. It’s possible of curse to increase the logging level to VERBOSE changing thefollowing line:

LogLevel INFO

to this:



All the connection attempts details of ssh login will be saved in your /var/log/auth.log file.

that can be easyly chacked with a:

grep sshd /var/log/secure | less

An example of a failed attemp to login from an autorized user is:

Jan 27 16:48:17 media-center sshd[9668]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=mail.wannalogintoyourserver.com user=root
Jan 27 16:48:19 media-center sshd[9668]: Failed password for root from port 54052 ssh2
Jan 27 16:48:58 media-center sshd[9678]: Set /proc/self/oom_score_adj to 0
Jan 27 16:48:58 media-center sshd[9678]: Connection from port 45643
Jan 27 16:48:58 media-center sshd[9678]: Connection closed by [preauth]

Ipmitool in debian or derivated

To install:

sudo apt-get install ipmitool openipmi

incase of device issue (like in old versions of debian)

modprobe ipmi_msghandler
modprobe ipmi_devintf
modprobe ipmi_si

To see the current settings:

ipmitool lan print 1

Swich btw dhcp to static

ipmitool lan set 1 ipsrc static

Set the IP configuration:

ipmitool lan set 1 ipaddr
ipmitool lan set 1 netmask
ipmitool lan set 1 defgw ipaddr

User management

See the current user list:

ipmitool -I open user list 1

ipmitool -I open user test 2 20 password

(user 2 is root with password)

RMM4 Roles

Test the Customer Account:

ipmitool -I open user test 4 20 usrname

Example to how Set the user name:
ipmitool -I open user set name 5 administrator
where 5 is the user id number that you can pick up from the list command

Set the password:
ipmitool -I open user set password 5 password

Set the user role:

ipmitool channel setaccess 1 5 ipmi=on link=on privilege=4

Enable the user:
ipmitool -I open user enable 5

To test if the user work:
ipmitool -I open user test 5 20 password

To reset the BMC

ipmitool mc reset cold

ipmitool -I open user set password 2 ADMIN

Utilizzo di Samba in Debian e derivate

Se non si conosce il nome delle condivisioni (sharename) e’ possibile utilizzare l’utility smbclient, ricordo che va installata a parte con apt (apt-get install smbclient). Poniamo che le condivisioni si trovino su un server con indirizzo locale, digitiamo:

smbclient -L //




Per connettersi ad una condivisione:

smbclient //server/share -U user



Se la connessione e’ andata a buon fine verra’ visualizzato un prompt dal quale sara’ possibile utilizzare comandi di shell standard quali ls, rm ecc. Per uscire e interrompere la connessione digitare exit.


In genere per montare qualsiasi dispositivo o condivisione io utilizzo la directory /media, ma si puo’ ovviamente utilizzare una posizione diversa come ad esempio /mnt. Per montare la directory backups i passi da seguire sono essenzialmente questi:


1) Installare le utility cifs con # apt-get install cifs-utils

2) Creare il punto di montaggio # mkdir /media/backups

3) Creare un file che contiene le credeziali d’accesso in un file qualsiasi, fare attenzione sia comunque non accessibile da tutti, io lo creo generalemente nella mia home in un file nascosto:


Per specificare le credenziali utilizzare questo formato:


2) inserire nel file /etc/fstab una linea come questa:

// /media/backups cifs credentials=/home/reno/.smbcredentials,uid=reno,gid=reno 0 0

Provare a montare la condivisione con un mount -a, se non ci sono errori il comando non restituisce nessun output.

Aggiungere una rotta statica in Ubuntu

La tabella di instradamento è un database che contiene le informazioni relative alla rete quali destinazioni e metriche (cioè un valore che indica quando una rete deve essere preferita anziché un’altra ).

Normalmente in un pc domestico o in una rete aziendale semplice le destinazioni  sono una proprio perché la rete è una sola per il cui la tabella contiene il solo gateway predefinito che corrisponde all’indirizzo ip del proprio router.

Il comando per visualizzare la tabella di instradamento è route


Il questo caso ho utilizzato l’opzione -n che restituisce valori numerici, ad esempio la destinazione predefinita (default) , rappresentata da è che corrisponde all’indirizzo del router.

Una rotta statica può essere impostata su una interfaccia con indirizzo statico, per aggiungere una rotta alla tabella di instradamento (routing table) il comando generico è :

route add [-net|-host] <IP/Net> netmask <Mask> gw <Gateway IP> dev <Int>X

ad esempio:

route add -net netmask gw dev eth0
Nel caso in cui dopo il riavvio la nuova rotta fosse perduta dovrebbe essere sufficiente aggiungere al file /etc/network/interfaces una riga come da esempio:

up route add -net gw dev eth1