Monday 19 October 2020

Factory Reset A Citaq H10

 So, I had one of these Citaq H10 EPOS Machines...


Unfortunately it was locked and stuck with the 'Just Eat' POS software.
This machine runs android and on taking the back off there is a button marked 'recover'.  Pressing this and resetting the unit gets the usual android recovery menu, but the unit has no volume up / down buttons to navigate the menu.

The processor inside the unit is a Rockchip RK3368.  On their website is an example circuit of how to use this chip.  It is very similar to the EPOS unit!
This bit...
...shows the recover button is read by an A/D converter and checking the linux device tree file (from the github repository for the RK3368 evaluation board) we find ADC values corresponding to the different buttons which can be on this pin....

Volume Up - 1
Volume Down - 170
Menu Key - 355
Home key - 746
Back key - 560
Camera key - 450

So I tacked wire across the recover switch which led to the outside of the unit...


The voltage across these wires measures 1.8V and is pulled up via a 10K resistor, like the schematic shows.
The ADC inside this chip is 10 bits so to get a value of 170 (Volume down) I need a resistor to pull the ADC pin down to 0.3V ( ((1.8V / 1023) * 170) = 0.299V )

A 2k resistor will do this, so booting into the recovery menu and using the 2k resistor to move the menu down to 'factory reset' and then selecting, does a factory reset :)

After rebooting, the unit boots into android with no Just Eat !


After installing YouTube from the Play Store...


I don't know if there was a software way of doing this, but now I can add volume buttons to the EPOS unit.  I can't get the printer to work yet, since it is a serial printer and doesn't expose its self to the android OS as a printer.