ChuWi Forum»Forum Chuwi Tablet Discussion Chuwi Hi12 Android touch sensitivity - possible fix [Tutorial]

Follow Us

Android touch sensitivity - possible fix [Tutorial]

[Copy link]

Slada2|Post time:3-6-2017 10:22:13 View:1565|Reply:36

linuxslate.com| Post time 2-28-2017 13:47:09 | Show all posts
Doing a little more research on this...

It is unlikely that editing

/system/usr/idc/atmel_mxt_ts.idc

-or-

/system/usr/idc/ATML1000_00_4a_03EB_8C0E.idc

is going to do anything.

These files are for Atmel touch screens.

The Chuwi Hi12 (at least my newer z8350 version) seems to have a Goodix touch screen:

./adb shell dmesg|grep -i goodix
<6>[    1.984048] input: goodix-ts as /devices/virtual/input/input4
<6>[    1.984855] input: goodix-pen as /devices/virtual/input/input5

Interestingly, there are no goodix files in /system/usr/idc/

by doing a Google search, I've found reference to a:
Goodix-TS-board-3.idc
file, but I have no idea what the correct file would be for this device.

I'll continue research when I can.
-- linuxslate.com
Reply Support Not support

Use magic Report

jtrosky| Post time 2-28-2017 15:09:55 | Show all posts
Edited by jtrosky at 3-1-2017 03:40

I can't remember where I got it (probably somewhere on this site!), but here is a .cfg file and a script to "fix" touch-screen responsiveness issues on the Hi12...  Personally, I've not noticeded any issues and haven't really needed to try this, but it *is* for goodix...

Can use script manager to run the script at boot-up...  Script expect the .cfg file to be in /mnt/sdcard ....
EDIT:  Actually, I just tested this and it DOES really seem to make the touch screen responsiveness better.





fixgoodix.zip

231 Bytes, Downloads: 18

goodix_9111_cfg.zip

341 Bytes, Downloads: 20

Reply Support Not support

Use magic Report

linuxslate.com| Post time 3-1-2017 15:40:19 | Show all posts
Edited by linuxslate.com at 3-2-2017 13:03

jtrosky;  Thank You for this information -- it is in the right direction.

However, I still do not think this is the full answer.  The fixgoodix script contains this:

  1. #!/system/bin/sh
  2. su -c "cat /mnt/sdcard/goodix_9111_cfg.bin > /proc/gt9xx_config"
Copy the Code


So it attempts to copy the contents of goodix_9111_cfg.bin (which is the other file when unzipped) into the /proc directory;

There is a gt9xx_config in /proc,  However, /proc is not writeable, and anything in /proc is re-written on boot.

There is a gt9xx_config in /proc,

Also, a script like that (even with Script Manager) should not be able to make alterations to a non-rooted tablet.

Perhaps there is another master or default gt9xx_config somplace else in the filesystem that I have not found yet.

Still looking...

Also, in my research, I cannot find the TouchScreen Calibration that should run every boot.  I am beginning to think Chuwi left something (either the config file, or a calibration script) out of this ROM.  If I learn anything, I will post.

-- linuxslate.com
Reply Support Not support

Use magic Report

jtrosky| Post time 3-1-2017 19:39:39 | Show all posts
Sorry if I wasn't clear - this solution only works on a rooted tablet.  But on a rooted tablet, it *does* work (you can write to /proc on a rooted device).  Using script manager, it runs automatically at boot-up every time the system is booted (script manager allows this).  You can also run it from a terminal session (sh /sdcard/fixgoodix).


Reply Support Not support

Use magic Report

linuxslate.com| Post time 3-2-2017 07:04:44 | Show all posts
Edited by linuxslate.com at 3-2-2017 13:06

More research, and some kinda funny results:

OK... so we know we have the following devices:

goodix-ts as /devices/virtual/input/input4
goodix-pen as /devices/virtual/input/input5

... So if we look in /sys/devices/virtual/input/input4/id,  We can see the product, vendor, and version ID's.

Rather comically, we find:

  1. shell@CW-Hi12:/sys/devices/virtual/input/input4/id $ cat vendor
  2. dead
  3. shell@CW-Hi12:/sys/devices/virtual/input/input4/id $ cat product
  4. beef
Copy the Code


This is an old programmers joke, as "dead" and "beef" are valid hex numbers.  It also shows they are not using true vendor and product ID's.
The Vendor and Product for goodix-pen is 0000 and 0000 -- again, obviously invalid values.

never the less, android should look in
/system/usr/idc/Vendor_XXXX_Product_XXXX.idc  for a configuration file.

It's easy to test if the touch screen is actually reading this file:

If we set: touch.orientationAware = 0, then the touch screen will not rotate when the visible display rotates.  Sure enough, if I create:

/system/usr/idc/Vendor_dead_Product_beef.idc,  and put touch.orientationAware = 0, then the touch is completely off position when I rotate the screen.

This proved that it is definitely reading this file.

If the "dead" "beef" thing bothers you, it should also read /system/usr/idc/goodix-ts.idc, but I was not able to confirm this last night.
EDIT: /system/usr/idc/goodix-ts.idc confirmed to work.

I also learned that you can use
$dumpsys input
...to list all the input device parameters.

This shows lots of interesting stuff about "Device 11: goodix-ts"

One thing is:          Raw Touch Axes:
     Pressure: unknown range

Since
touch.pressure.scale
is a multiplier of raw pressure max, and there is no max or min for raw pressure, the setting for touch.pressure.scale is not going to change finger touch sensitivity.

Any value sent to        touch.pressure.calibration  will be ignored for the TS.  It will always be set to "none".  The Pen (official Chuwi pen) seems to have pressure, but not a finger touch.

My current /system/usr/idc/Vendor_dead_Product_beef.idc   contains:

# Basic Parameters
touch.deviceType = touchScreen
touch.orientationAware = 1

# Touch Size

# Tool Size
touch.size.calibration = area
touch.size.scale = 28
touch.size.bias = 0
touch.size.isSummed = 0

Which again /seems/ to make a difference.  It is still not how it should be.  It still will not respond to a normal rubber tip phone stylus. Sorry, but I am going to remain skeptical of any "fix" until someone (me?) posts a video of a normal capacitive pen stylus working.

More info when I have time to do more research.  I'm sick of rebooting over and over.

Not also that there should also be a /system/usr/idc/goodix-pen.idc  I have not tried creating that file yet.
EDIT:  Confirmed that parameters placed in /system/usr/idc/goodix-pen.idc are read, and affect only the pen, not a finger.

I am posting this in the hopes that someone else can help.

I am also hoping that by divulging things like the dead/beef and 0000/0000 vendor/product, Chuwi will make the effort to fix this properly in a new firmware.
-- linuxslate.com
Reply Support Not support

Use magic Report

linuxslate.com| Post time 3-2-2017 13:13:01 | Show all posts
Edited by linuxslate.com at 3-3-2017 06:39

More info:

I can confirm that the configuration file that jtrosky attached above does /clearly/ improve the touchscreen, but it does not survive a re-boot.

And, yes, it needs to be done as root, so you would need both a rooted tablet, and some way to run the script on every boot.

I was doing it manually with ADB running as root -- in other words, it is not permanent.

I have been trying various settings in /system/usr/idc/goodix-ts.idc and /system/usr/idc/goodix-pen.idc, but I cannot come up with settings that make a significant difference.

It looks like the problem is in the driver itself, and probably cannot be fixed by changing the higher level .idc files.  (although they really should be present).



-- linuxslate.com
Reply Support Not support

Use magic Report

jtrosky| Post time 3-3-2017 05:48:35 | Show all posts
Just to be clear, I did NOT create the goodix config file.  I don't want to take credit for someone elses work.  :-)

Also, for those that aren't comfortable editing startup scripts, etc - the Script Manager application allows you to setup a script to run automatically at boot-up (and as root if you''d like).  It's actually a pretty cool app (I never used it before trying it for this goodix fix).  This way, you can set it up once and forget about it since it will automatically be run every time the device is booted.  You do, of course, have to be rooted though.

I now have fixes for the touch-screen sensitivity and a proper, permanent fix for the android brightness issue (that one really bothered me!).  I would consider this the perfect device if only the metal keyboard was better!!  Unfortunately, the keyboard quality is a show-stopper for me.  Typing on that damn thing is super annoying and cumbersome becuase half of the time the keys don't register.  I ordered a replacement hoping that it was just a defective keyboard, but the order got screwed up (they sent the wrong item and don't actually have the right item).  But the more and more I read, it seems that my keyboard may not actually be defective - it almost sounds like that's just the way they are?  I think I'm still going to try ordering a new one just to be 100% sure, becuase I really like everything else about the device!  But I need a quality keyboard dock (it's *so* much easier to type on my Onda Obook 11 Plus keyboard dock even though it's smaller).  But the battery life, screen shape and general build quality of the Hi12 tablet itself is so much nicer (except for light bleed!).  Sorry, got a little off topic there!!  I'm just trying to decide which device to make my primary device and so far, the Onda is winning simply becuase of the keyboard...
Reply Support Not support

Use magic Report

linuxslate.com| Post time 3-3-2017 10:49:23 | Show all posts
Edited by linuxslate.com at 3-3-2017 10:51

I edited my previous post so that it does not look like I am crediting jtrosky with creation of the file (however, I still appreciate jtrosky bringing it to my attention.

I also need to reverse my previous position about this requiring a rooted tablet.  I now believe that you can simply download the second file above (goodix_9111_cfg.zip), uzip it on your PC, copy it to the root of your SD card, and then execute:  cat /storage/sdcard1/goodix_9111_cfg.bin > /proc/gt9xx_config

This can be done via adb or from a terminal program on the tablet itself (I use Connectbot https://play.google.com/store/apps/details?id=org.connectbot).

It is still not permenant, and I am still working on a way to fix this with out requiring a permanate root.


-- linuxslate.com
Reply Support Not support

Use magic Report

linuxslate.com| Post time 3-3-2017 13:38:48 | Show all posts
Sorry about all the posts, and the "Thinking out loud".  I am not really as good at Android Hacking as I was in the early days (and I was never that good in the first place) so I was really asking for help as I was trying to figure this out.

I have come up with a way to fix the touchscreen sensitivity (lack of) on the stock Chuwi Hi12 Android ROM without permanent root (temporary root). This method survives a reboot.

I am telling how to do this, I an not telling you you should do this.

Note also that dm-verity is implemented on the factory Android. You may have to disable dm-verity to do alter system files. After you do this, you will no longer have dm-verity.

So what is dm-verity?  Well, there is tons of stuff about it, but to make it really short, dm-verity is a way to make sure nothing has messed with system files. It essentially signs the /system partition.

It is possible that you could get infected with some future root-kit.  Consider this a temporary fix only.  Chuwi needs to fix this in an official build.

This is based on a post by jtrosky, and you will need (only) the second file <goodix_9111_cfg.zip> from his post a few posts up.

Steps:

1.  Install adb on you desktop computer. (Skip if you have adb installed, or are OK with getting it from a non-official source.

a.  Go to https://developer.android.com/studio/index.html
b.  Scroll to the bottom, "Get just the command line tools"
c.  Install the appropriate tools for your platform

2.  Use the SDK Manager (in the tools you just downloaded) to install only the Android SDK Platform-tools. un-check everything else. (It may want to update the SDK Manager itself also. You can leave that checked.)

3.  On Windows, you need USB drivers. These are the same as doing anything with this tablet using a Windows host PC, and is not covered here. Other OS's do not need the drivers.

4.  Download goodix_9111_cfg.zip from jtrosky's post a few posts previous. You do not need the fixgoodix.zip file.

5.  Unzip goodix_9111_cfg.zip to get goodix_9111_cfg.bin

6.  Connect your Tablet to the PC with the USB cable. ADB must be active.
It seems to me that adb is activated on the Chuwi stock ROM. If adb does not connect, you must enable USB Debugging  in Settings >> Developer options).
If you do not see Developer options, Google how to enable it.

7.  Push goodix_9111_cfg.bin to /data/  (Assumes goodix_9111_cfg.bin is in your current path.)

./adb root
./adb push goodix_9111_cfg.bin /data/

8. Pull install-recovery.sh

./adb pull /system/bin/install-recovery.sh

You should have the file install-recovery.sh in your current directory.

9.  Using a text editor on your host PC, add the following line to the end of install-recovery.sh. (on a separate line after the "fi".)

/system/bin/cat /data/goodix_9111_cfg.bin > /proc/gt9xx_config

Windows Warning: This file must be saved using UNIX line termination. Do not save using Windows/DOS line feeds. If install-recovery.sh is unreadable or corrupted, the tablet may not boot. It is strongly suggested that you keep a copy of the the un-modified build.prop. This should also allow you to replace it, and turn verity back on. If any file in /system is changed by a single byte, verity will fail.
General Warning: This is a hack. install-recovery.sh is run from the android init system at boot. The actual init files are over-written every boot, but /system is not, so sticking commands in install-recovery.sh is a very crude way to get them run on boot, and have it work every re-boot.

10.  Remount the filesystem read/write. The tablet will need to be re-booted when you disable verity. See warning above. (adb still running as root)

./adb remount
./adb push install-recovery.sh /system/bin/

If the remount or the push still fails, you have to disable dm-verity:

./adb disable-verity
./adb reboot

--- Wait for reboot, then try the remount and push the file again.

11.  Reboot to enjoy a better Touch Screen.  Your Tablet is not rooted, but it is /slightly/ less secure. (You are no less secure than any other non-verity rom)

./adb reboot (or reboot using the power button)


If someone could try this on a stock ROM, and provide feedback, I would appreciate it.

-- linuxslate.com
Reply Support Not support

Use magic Report

linuxslate.com| Post time 3-6-2017 10:22:13 | Show all posts
By the way, once you have disabled verity, it is very easy to remove com.adups.fota, if you are worried about this.

While I had ADB connected as root, and the filesystem remounted read/write, I did:

./adb shell rm -rf /system/app/FotaUpdate

- and -

./adb shell rm -rf /system/app/FotaUpdateReboot

- then -

./adb reboot

I can verify a few other things:

1.  Using the new Android Monitor (Part of the tools you installed in step 1), I saw that com.adups.fota was running and quite active prior to removal, but I made no attempts to see what it was doing.
2.  My tablet still seems to work fine.  In fact, it *may* seem more responsive, but I fully admit this could just be perception.
3.  The FOTA update stuff is no longer showing in Settings >> Apps or in Settings >> About tablet.
4.  If Chuwi Actually uses com.adups.fota as an actual OTA update service, you will no longer get those updates, however, since they seem to post them in the Downloads section, updates should still be available.
-- linuxslate.com
Reply Support Not support

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Quick Reply To Top Return to the list