yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] michael.santos:
Here is more info from KNC902: hxxp://w.w.w.iknc.net/product_show.asp?id=870

And here from Onda Vi40 Elite: hxxp://w.w.w.onda.cn/Tablet/ProductInfo.aspx?ProductId=179

Thanks again! :)

P.S.: Please correct hxxp and w.w.w links.
[Android Q&A, Help & Troubleshooting] DoiX:
Hey there,

I have a similar problem with my tablet as well. A rom flashed the IC controller and the stock one won't fix it back. Anyway, I have a vague idea on how to fix your problem but i need the firmware you accidentally flashed since its able to flash controllers. (not all firmwares do that)
[Android Q&A, Help & Troubleshooting] DoiX:
Please post a link to the rom you used to mess your tablet up in the first place. The solution is not as easy as implied in the freaktablet post.

What android version are you on? You may need to downgrade before you can actually flash the controller firmware.
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

The rom I used was from the KNC902 that I have downloaded from here: http://www.baidupcs.com/file/我的文档/M...&digest=1f7fbec6fdd0a13774938a40dfddbb53&sh=1

This rom is ICS and my tablet came with ICS too.

I don't know what you mean about downgrading, but my tablet never had any rom lower than ICS in the official homepage.

Do you think I can really recover my touch controller? :)

Thank you for your time and help!
[Android Q&A, Help & Troubleshooting] michael.santos:
If above link does not work, use this one:

http://pan.baidu.com/share/link?uk=3459136109&shareid=2349&fr=480365957&fa=480365957

Just hit the white button (below the file date) to start the download.
[Android Q&A, Help & Troubleshooting] DoiX:
I'm downloading it now, may take a while. I'm asking what version of ICS you're on, 4.0, 4.0.4, etc. I need to know what kernel is your current rom using, Settings> About tablet. Also, please execute this command: adb shell lsmod and post the result here.
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi,

I have upload the first available original firmware for my tablet, version 0.6.

This firmware is based on Android ICS 4.0.3 with kernel version 3.0.8+.

This is the dmesg regarding the touch IC flash:

<6>[ 18.290000] ===========================ft5x_ts_init=====================

<6>[ 18.290000] ctp_fetch_sysconfig_para.

<6>[ 18.310000] ctp_fetch_sysconfig_para: after: ctp_twi_addr is 0x38, dirty_addr_buf: 0x38. dirty_addr_buf[1]: 0xfffe

<6>[ 18.330000] ctp_fetch_sysconfig_para: ctp_twi_id is 2.

<6>[ 18.330000] ctp_fetch_sysconfig_para: screen_max_x = 1024.

<6>[ 18.350000] ctp_fetch_sysconfig_para: screen_max_y = 768.

<6>[ 18.360000] ctp_fetch_sysconfig_para: revert_x_flag = 0.

<6>[ 18.370000] ctp_fetch_sysconfig_para: revert_y_flag = 0.

<6>[ 18.370000] ctp_fetch_sysconfig_para: exchange_x_y_flag = 0.

<6>[ 18.380000] ft5x_ts_init: after fetch_sysconfig_para: normal_i2c: 0x38. normal_i2c[1]: 0xfffe

<7>[ 18.390000] script parser fetch err.

<4>[ 18.390000] ctp_init_platform_resource: tp_wakeup request gpio fail!

<6>[ 18.400000] ctp_reset.

<6>[ 18.440000] ctp_detect: Detected chip ft5x_ts at adapter 2, address 0x38

<6>[ 18.450000] ====ft5x_ts_probe begin=====.

<6>[ 18.450000] fts_ctpm_fw_upgrade_with_i_file.

<6>[ 18.570000] =========buf[0] = 0xa6

<6>[ 18.570000] =========buf[1] = 0xa6

<6>[ 18.570000] a == 166, b== 7

<6>[ 18.750000] Step 1: Reset CTPM test

<6>[ 18.790000] Step 2: Enter update mode.

<6>[ 18.810000] ====Step 3:check READ-ID====

<6>[ 18.830000] Step 3: CTPM ID,ID1 = 0x0,ID2 = 0x0

<6>[ 18.830000] ====Step 3:check READ-ID====

<6>[ 18.850000] Step 3: CTPM ID,ID1 = 0x0,ID2 = 0x0

<6>[ 18.850000] ====Step 3:check READ-ID====

<6>[ 18.870000] Step 3: CTPM ID,ID1 = 0x0,ID2 = 0x0

<6>[ 18.870000] ====Step 3:check READ-ID====

<6>[ 18.890000] Step 3: CTPM ID,ID1 = 0x0,ID2 = 0x0

<6>[ 18.890000] [FTS] upgrade failed i_ret = 2.

<6>[ 18.890000] input: ft5x_ts as /devices/virtual/input/input2

<6>[ 18.900000] ==register_early_suspend =

<6>[ 18.900000] CONFIG_FT5X0X_MULTITOUCH is defined.

<6>[ 18.910000] ctp_set_irq_mode: config gpio to int mode.

<6>[ 18.910000] INTERRUPT CONFIG

<6>[ 18.920000] ==ft5x_ts_probe over =

This is lsmod:

8192cu 519648 0 - Live 0xbf0ab000

rtl8150 8910 0 - Live 0xbf0a4000

mcs7830 6557 0 - Live 0xbf09e000

qf9700 8513 0 - Live 0xbf097000

asix 22500 0 - Live 0xbf08c000

usbnet 23745 3 mcs7830,qf9700,asix, Live 0xbf080000

sun4i_lockrotation 2236 2 - Live 0xbf07c000

sun4i_csi0 25693 0 - Live 0xbf071000

mt9m112 11425 1 - Live 0xbf06a000

ov5640 16121 1 - Live 0xbf062000

videobuf_dma_contig 5659 1 sun4i_csi0, Live 0xbf05d000

videobuf_core 18067 2 sun4i_csi0,videobuf_dma_contig, Live 0xbf053000

mma7660 5671 0 - Live 0xbf04d000

mali 129534 4 - Live 0xbf020000

ump 42202 9 mali, Live 0xbf00f000

ft5x_ts 42329 0 - Live 0xbf000000

Hope this is what you want to know.

Thanks again for any help! :)
[Android Q&A, Help & Troubleshooting] DoiX:
Yep, thats what i wanted :).

I've flashed the rom, TS dead, time to do some serious debugging.

P.S Could you upload the modded ft5x_ts.ko file?

Edit: i'm looking through the original firmware right now to find how it flashed over/removed the eeprom in the first place then reverse the process with a proper IC firmware.
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

I'm attaching the modded ft5x_ts.ko I think. I've tested so many ft5x_ts.ko that I don't remember if it was this one. :rolleyes:

This modded ft5x_ts.ko file should ignore the ID Read error at step 3 and the ECC check at step 6.

Hope this will help you fix the touch IC controller.

Thanks!
[Android Q&A, Help & Troubleshooting] michael.santos:
Just a question, do you think the IC flash happend when the tablet boot up on the first time or is it done while flashing with LiveSuit?

I've read here http://xdaforums.com/showthread.php?t=1629478 that in the Nook Tablet they where unable to flash the IC touch controller because the ft5x_ts.ko driver is not able to detect the ID on ICS and to do that, they downgraded to Gingerbread.

I can't test this, because I don't have any Gingerbread rom that could work on my tablet. :(

Maybe this info could help you further. ;)
[Android Q&A, Help & Troubleshooting] DoiX:
I got a gingerbread rom around, i'll test it. I can't tell if it was during live suite or during first boot. If it was during livesuite it probably used a direct to chip flash method that doesn't involve android. If this is the case it's possible that the ownership got messed up (which shouldn't even happen). For now, i didn't find anything related to i2c in the rom.
[Android Q&A, Help & Troubleshooting] michael.santos:
Here is the post where someone had the same problem while flashing the IC controller, the driver can not read the ID from the IC:

http://xdaforums.com/showpost.php?p=33566499&postcount=70

Here is someone writting an app that will flash the firmware to the IC controller:

http://xdaforums.com/showpost.php?p=34081048&postcount=91

Maybe he can help you. I have tried to post on their thread, but my post was deleted because my tablet was not a Nook one... :(
[Android Q&A, Help & Troubleshooting] DoiX:
The Nook uses a particular android version, i'm not sure it even works on A10 tablets. Anyway, the situation looks grim, for both of us now :D. I'll have to compile the kernel myself and find a way to bypass the errors. The .ko file you posted doesn't really flash from what i could tell, it just rolls the output of what a successful flash would look like :)

You could just replace the chip/touchscreen on the device and the situation will be fixed.
[Android Q&A, Help & Troubleshooting] michael.santos:
So you think we can not recover our IC touch controller? :(

How do you think the Nook guys have done it?

What do you mean about changing the chip/touch?
[Android Q&A, Help & Troubleshooting] DoiX:
I'm sure it can be recovered by a direct eeprom rewrite, like the guys on the Nook forums did or via eeprom programmer.

Earlier today i tried manually resetting the chip based on the datasheet i found http://www.displayfuture.com/Display/datasheet/controller/FT5x06.pdf Unfortunately i wasn't successful, this data sheet doesn't say exactly how to reset it.

By changing the chip/touch i mean this: 1. replace the touchscreen completely (as the problem lies with the corrupted IC controller (which is a microprocessor). 2. order the chip online (it can be found) and solder it on the touchscreen instead of the "bad" one.
[Android Q&A, Help & Troubleshooting] michael.santos:
I've asked the guy from Nook tablet thread who is making the flash software and he told me that he recompiled the driver without the ID read check.

I think he made the same as the patched driver I post earlier and it worked. What I think is that this procedure only works for upgrading an older firmware and not flash an empty eeprom. Can it be?
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

I think we can recover our touch! But I need your help if you know how to compile the driver.

This is what I found from the guy at Nook tablet thread after I showed him the results of the patched driver we have tested:

So, the problem is our driver! They already fixed the update on the driver, but I don't know how to compile it to a valid ft5x_ts.ko.

Do you know how to do it?

Hope this is our salvation! :)
[Android Q&A, Help & Troubleshooting] DoiX:
Hey, i'm already on it. Been trying for the past hours to find the proper kernel sources for my tablet so i can try modifying the kernel.

I'm having problems locating an upgrade enabled ft5x_ts.c kernel file that is compatible with our devices, feel free to help me find one.
[Android Q&A, Help & Troubleshooting] michael.santos:
So you think it could be possible to recover the touch by using the info that the other guy have shared?

Hope this is true! :)
[Android Q&A, Help & Troubleshooting] DoiX:
I hope so too, else i bricked my tablet for being a nice guy :D.

Please post your firmware, i've managed to cook a module but i need the firmware from your TS to integrate in it for you to test.

Edit: scratch that, I just realized your screen resolution has only one firmware. Try this, firmware is embeded in it.https://dl.dropbox.com/u/16173714/ft5x_ts.ko
[Android Q&A, Help & Troubleshooting] michael.santos:
Thanks!

I'm at work right now, but I will let you know how it goes later this night (GMT).

Hope it works! And thank you again for your great help! :)
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

I have tried your new driver, but it fails to load:

<7>[ 3.820000] ft5x_ts: disagrees about version of symbol module_layout

What rom did you use to compile the driver? From a hex editor, I can see that the vermagic of your file is:

3.0.8 preempt mod_unload modversions ARMv7

And from the original driver:

3.0.8+ preempt mod_unload modversions ARMv7

Is it simple to fix?

Thanks for your help! :)
[Android Q&A, Help & Troubleshooting] michael.santos:
I think here you can see the same problem (it missed the "+"): http://www.cnx-software.com/2012/09/11/building-kernel-modules-for-allwinner-a10-devices-android/

From what I have seen you need to change some files on the kernel and compile it again. :(
[Android Q&A, Help & Troubleshooting] DoiX:
Oops, i didn't notice the + in your kernel. I'll recompile it now.

https://dl.dropbox.com/u/16173714/ft5x_ts.ko redownload.

Edit: After more hours of code dissecting i came to a conclusion. The KNC firmware completely erased the chip, which wouldn't be much of a problem if we would have the source code of the IC firmware.

The vendor and product ID are 0 now, thus the fimware is unable to be loaded/activate itself. We can flash it over and over and over again, but it won't bring us closer to a working TS. I need to take a different approach, maybe binary patching the firmware to ignore the CTPM id (which is a pain in the ass due to the architecture the .bin file is compiled in)

Right now i'm modifying the firmware update, cleaning it up a bit based on the work of the Nook Guys (thank you!).
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi,

Thank's for the new file, but I still can't load the driver. I'm getting the same error and I don't know what is wrong now! :(

I have attached the dmesg log if you want to look at it.

Hope it help... ;)
[Android Q&A, Help & Troubleshooting] DoiX:
I checked the file from my dropbox and the one from my linux partition, the hash is the same. I also checked the file with modinfo <filename> it reports 3.0.8+. I don't know what the problem may be. I'll recompile it again later.

I got my hands on a second touchscreen with the same FT5x06 series controller, weirdly enough it doesn't work... Damn it!? Maybe the problem isn't the touchscreen after all?

If anyone has any idea about this, please, by all means reply.
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

What you mean about a second touch screen? Is it the touch IC controller flashing that does not work, or the tablet does not work with a new touch screen?

In my tablet the touch screen does not have the IC controller in the ribbon that is connected to the motherboard, but it is directly on the motherboard.

I have tried to contact the guy from Focal Tech that wrote the driver, asking how we could flash and empty IC controller. This was the reply:

I don't know what he means about the "agent"... :S

Did you managed to add the fix that the guys from the Nook thread have done?

Can you post your findings, the source code and compiled firmware so anyone that reads this thread can have a look at it?

Thank's again for your great help! Hope we can discover the fix for this, because it seems to affect some people with Allwinner A10 CPU's! :)
[Android Q&A, Help & Troubleshooting] DoiX:
My tablet had a cracked touchscreen which, ironically, i recently changed. This cracked touchscreen is fully functional, so i went ahead and replaced the new one with it. It still doesn't work! So maybe the problem is not the touchscreen, but something else. ( yes the controller is on the TS not the motherboard)

Someone on the A10 SoC IRC suggested that some firmwares actually set "priority" to the resistive controller in the A10 chip instead of the external capacitive controller...

That guy could have at least replied with the agent email address...

I didn't port the changes they did in the OMAP file because my tablet is not based on OMAP. I'll post the source later.
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi,

That is a new info. Did you tested the cracked touch screen with your tablet original rom or with the KNC902 rom? If you have done the test with the KNC902, it could have deleted the touch screen IC controller again!

Strange the info about resistive controller, because the KNC902 rom was the rom that caused the fault, and this model uses a capacitive screen...

I still don't know how could the KNC902 rom erased the touch screen IC controller and now it does not allow to flash a new firmware to the empty rom...

Regarding the Nook source code, I thought that you only need to copy the corrected driver source code that is not linked with the OMAP...

Here is another example and fix for another A10 based tablet: http://linux-sunxi.org/LY-F1#FT5X_touchscreen_issues

The difference is that my tablet (and I think yours too) fail on step 3 where the driver reads the ID.

Do you think there would be no go for us? :'(
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

You have any news? :)
[Android Q&A, Help & Troubleshooting] DoiX:
Sorry Michael, i'm a bit low on free time this week. I'll post more info in the weekend. In the meantime, if you have time, could you locate the original product the KNC is based on? I assume it's a clone like many others, i'm thinking it's based on the OMAP board like the nooktablet, which would explain what went so wrong with your FT5x06 controller
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

I have found on this link http://www.aliexpress.com/item/9-7-...let-PC-Ameda-A90-Sanei-N90-KNC/678414824.html that the KNC MD902 shares the same touch screen with Ameda A90 and Sanei N90, both based on the Allwinner A10 CPU and Mali 400 GPU, the same as my tablet.

I really don't understand how could the KNC firmware erase my touch firmware. :(
[Android Q&A, Help & Troubleshooting] junaydmirza:
Hello,

Same story here but with two no name chinese clone (of don't know what) A13 tablets. Perfectly working tablet was not something to my liking so started flashing every firmware I could lay my hands on and BAMM!!!.... touchscreen all messed up.... on two tablets. Spent some time trying to find a ko which could flash the ts firmware and finally found one.

From dmesg output I can see that the firmware is being flashed. Now I am stuck on finding the right firmware for my ts. I have tried all firmwares that are floating around in ft5_firmware.zip but no joy so far.

So my search is on for more ft5x firmwares but I am afraid that this package is all that is available.

Any ideas where to go from here?
[Android Q&A, Help & Troubleshooting] DoiX:
@Michael, sorry, i hope to have some time on my hands this weekend so i can get to the bottom of this forsaken problem.

@junaydmirza, disassemble your tablet, see if you can locate the exact chip model used on your touchscreen and the flash the closest version you can find. To my knowledge, you will find the exact firmware for your chip but not for the resolution at worst. If that is so, you must experiment with the other resolution firmwares that are for your touchscreen and see which works closest to the edges of your screen, then you must compile a new config.bin to fix the possible inverted touch or height/width problems.
[Android Q&A, Help & Troubleshooting] michael.santos:
@junaydmirza Can you post the ko file you used for flashing the firmware and dmesg of flashing procedure? It may help in our research...

@DoiX Thank you for your time... I'm start loosing hope that we could fix this, but maybe I'm wrong! It must be possible to flash an empty IC controller EEPROM, that's how they are at the factory before assembly... :)
[Android Q&A, Help & Troubleshooting] DoiX:
Alright, so i'm trying to figure out how exactly did the firmware get erased. On boot or by the format process of LiveSuit.

If it's on boot, then it must be done via some obscure android process i know nothing about or directly through the ft5x_ts.ko module. If it's via the module, it needs to obtain the firmware from someplace, i couldn't find one in the knc firmware, so it must be embedded in the .ko file.

I looked through the knc's .ko module with a hex editor and found that auto firmware update is active, but nothing related to the firmware itself (if it's embedded or not). However, according to my logic, if it's not embedded or present in the rom, then the .ko would just be erasing the EEPROM, but this is not the case since it would break the KNC tablet as well, unless the chip is write protected somehow(?) but if it's not write protected and the firmware is embedded, it would be a stock ft5406 which wouldn't totally disable the touchscreen - at least on your device.

It's a bit contradicting, any theories?

It would help a lot to be able to contact some dev from KNC, obtain the kernel source, in particular the ft5x_ts.c - if it's using a modified one - or to at least find out what slave address is this tablet using for the touchscreen...
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

My theory is that the KNC rom does not have any touch firmware build-in and like we know, there is a check for 2 ID's before starting the firmware flash. One of the ID's could be a firmware version, so my tablet reported a lower version and the KNC rom just erased my EEPROM to start flashing a new firmware... but there was none! So I ended up with an empty touch EEPROM. :( On the real KNC's maybe the firmware version is the same and the flashing procedure is skipped.

The english contact site of KNC (it is a Korean brand) is this one: http://www.huaruian.com/Company.Asp

Maybe they can give you more informations about what you asked.

I have found another company that uses the same Focaltech FT5406 IC, maybe they can help you with some technical resources (sorry, but I don't understand nothing about electronics/android programming): http://www.edtc.com/EDT/Products/polytouch.asp?search=polytouch&page=2

A friend told me to try to contact this guy http://www.facebook.com/franco.Kernel because he develops android kernels and maybe he can help. The problem is that I don't know what to ask him, maybe you can try to contact him, what do you think? :)

I think we need to find a way of flashing the firmware with an empty EEPROM, because all forum's I have seen with similar problems still shows on dmesg that the .ko detects some firmware on the IC, just a wrong version, so they are able to flash another firmware.

And what about the Nook Tablet FT5604 firmware flashing procedure fix that I posted some days ago? Is is possible to try it out on our kernel?

Thanks again for all your time and help! :)
[Android Q&A, Help & Troubleshooting] DoiX:
The Nook Tablet procedure is basically the one A10 tablets use, just in a different matter. I contacted KNC, i hope they answer.

When you flashed the KCN rom on your tablet did it boot to the launcher/desktop or did it get stuck at the loading screen? If it fully booted, do you remember if USB Debugging was enabled as default?

I'm asking because i need the dmesg output from it, so if you got time, could you reflash KNC firmware and do a dmesg command then paste the ft5x_ related part?

Edit: Do you remember if the .ko file you posted here http://xdaforums.com/showpost.php?p=34304035&postcount=11 has the firmware embedded or if it requires it to be present somewhere in the ROM, and if so, what name should it have?
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi,

After flashing the KNC rom for the first time it booted all fine, but no touchscreen. I tought it used another touchscreen controller so I flashed back stock rom and touch keeped not working.

I already have checked dmesg from KNC rom, it outputs the same error as my stock rom: fails the update at step 3.

Regarding the .ko file, I think it has the firmware embedded, but you can use an external firmware I think, just look at this tutorial: http://www.freaktab.com/showthread.php?1545-How-to-fix-a-A10-AllWinner-ft5X-touch-screen!

Thanks!
[Android Q&A, Help & Troubleshooting] DoiX:
"I already have checked dmesg from KNC rom, it outputs the same error as my stock rom: fails the update at step 3."

Are you sure about this? If so, then the KNC .ko file has UPG mode defined, which means auto update on every boot. It may also mean i've been barking at the wrong tree.

Thanks for the info, i'll debug some more this week if i have time. In the mean time, i'll check if there's a way to flash the IC firmware from inside a desktop version linux installed on the tablet.
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

I have found a programming kit for the FT5406 touch screen IC controller on another forum. Maybe it will help you understand how it works.

With this kit there was a reply to an email:

The accessories are our sample code for Android systems.
FYI: The FT5406 has been DI&DW on Rockchip,Samsung,Marvell,..platforms, It can support real 5 points on capacitance panel.

Pls concern follow:
I2C address in android system should move right one bit. for example ,0x70->0x38.
The report rate can be configed from 40->80 Hz by host to write register 0x88,with value 4->8.
If the Android version is 2.3 or above, you can add the ABS_MT_TRACKING_ID, pls refer the customer sample code.

Please check the attached file.

Thanks!
[Android Q&A, Help & Troubleshooting] michael.santos:
I forgot to tell you, they have contacted Infinitrue for getting the info, maybe you can contact them too:

http://www.infinitrue.com/en/index.asp

Hope it helps! ;)
[Android Q&A, Help & Troubleshooting] michael.santos:
Hi DoiX,

Sorry to bother you, but do you have any news or progress about this problem?

Thanks and a happy new year! ;)