[Module] X8Gesture Pinch zoom | X8 | X10mini | v007 | 11-05-11
May 18th. I'm not in a good mood today.
I'm tired of repeating the same thing every time. Many people pretend that they know lots of things while knowing nothing about it. I'm really tired and bored.
To me, pinch zoom is enough. That's my initial goal of this project. I don't care about such Game Mode. I made that for those noisy kids, and you can see what I got in return.
As I said, this project will be discontinued. I pushed everything on github, anybody can improve it.
Good luck to you guys. Anyone who continues to improve this can send me a PM for editing this thread content.
dx.
_____________________________________
Rom cookers: if you include this module in your ROM, please make a link to this post in your release post, so your users can know how to work with it and update the module themselves
Intro
I'm working with a kernel module to replace SE touchscreen driver to support dualtouch. However, as I
found out, it will mostly not be supported by our hardware, because X8 has only 1 sensor and that sensor supports only 1 finger. I don't know whether we can have dual touch if we flash the screen firmware. I will have a look on that.
A temporary solution now is to make some gestures based on user fingers' relative position. The idea is that we make Android to think that the second finger is also pressed, by generating second finger events from the driver. Anybody who wants to get more details about the previous development, please have a look at
this thread
Release history- May 11 v007. Game mode added. Look at HOWTO section for more details.
- May 06 v006. No more pinch zoom after 1 finger is lifted. Less pinch zoom activation time. Fixed incorrect positions for generated events.
- April 30 v005. Much better "native" pinch zoom now! More stable movements, less unpredictable positions. Zoom in position is specified by your two fingers, not at the screen center.
- April 23 andrej456's x8gesture. Well this is not my work, it's andrej456's work, but it's better for all of you to find the module in the first post. You guys can grab it in his post. Thanks to andrej456!
- April 13 v004. Rewrite from scratch. Pinch zoom with one or two fingers.
- April 03. Source released.
- March 26 v003. Specify zoom-in position.
- March 25 v002. Zoom-out, rotate. Module size optimization.
- March 24 v001. Better finger detection. Reduced zoom-in speed.
- March 23 v000. 1 finger pinch zoom-in only
Source is provided at github :
https://github.com/doixanh/X8Features
Very Important : HOWTO
Modes
Starting from v007, X8Gesture supports two gestures: Pinch Zoom and Game Mode. Default mode is Pinch Zoom initially after each reboot.
1. Game mode
To activate game mode, keep your phone at "vertical" state, keep one finger at the
bottom right and then another at the
top left of your screen, one-by-one (don't release first finger).
Generally you should have more pressure with your second finger so that the digitizer recognizes it as the moving finger.
I tested with Tank Hero and it seems to work.
This is not dual touch. It only makes you feel more comfortable with MT games. Sometimes it's incorrect though. That's the limitation of our hardware.
Thanks firdausmbois for the idea and your very well designed illusion!
2. Pinch Zoom
To activate Pinch Zoom mode, keep your phone at "vertical" state, keep one finger at the
bottom left and then another at the
top right of your screen, one-by-one (don't release first finger).
For v005 and above
It's much like natural pinch zoom now. There is no need to "activate gesture" like v004 or below anymore. However you will probably need some practice with Multitouch Visualizer 2.
For v004
To activate gesture, put your two fingers one-by-one (one finger first, then another after - don't put both at the same time) on the screen, away from each other for at least 1cm. The 2nd finger should have more pressure onto the screen. After putting your 2nd finger on the screen, wait for 0.5s, the gesture will be activated.
After the gesture is activated, you can
- Use your two pressed fingers, or
- Lift up one finger and use the remaining finger
to zoom-in/out/rotate.
I prefer keeping two fingers on the screen, because it's natural for pinch zoom. You can look at the tutorial for v004 here, and practice with MultiTouch Visualizer 2.
For v003 and below
Right now it supports only zoom-in, zoom-out, and rotate. I will improve it over time. For who says it's not working, please read this how-to very carefully:
- To activate gesture : Put two fingers near each other, lift one finger up.
- To zoom-in (make things bigger): Activate gesture near the center of the screen. Move your remaining finger away from the gesture position to zoom-in.
- [new in v003] To zoom-in with specified zoom-in position: Do a normal touch to the zoom-in position (your face in an image, for example), then activate the gesture a little bit away from the zoom-in position shortly after the previous normal touch, then drag to zoom. I know, it's a little bit hard to understand ~.~ I will make a short clip for the tutorial
- To zoom-out (make things smaller): Activate gesture at the corner or the side of the screen. Move your remaining finger toward the screen center to zoom-out.
- To rotate : Activate gesture at the corner or the side of the screen. Move your remaining finger around the screen center to rotate.
Practice your 1 finger pinch zoom with MultiTouch Visualizer 2. Tutorial for zoom in, zoom out, and rotate can be watched here
Requirements
- Rooted
- xRecovery (for update.zip installation)
- Some basic adb knowledge
Instruction for manual installation:
- Remount /system as rw
- Copy the attached x8gesture.ko below to /system/lib/modules
- Change hw_config.sh in your /system/etc, add this code at the beginning
Code:
insmod /system/lib/modules/x8gesture.ko #dx: add gestures
- Push modified hw_config.sh back to your phone, reboot
If you are using a ROM that has x8gesture already, it's simple to upgrade
- Download latest x8gesture, unzip
- Mount USB, copy from PC to sdcard
- Unmount USB
- Use Root Explorer, mount /system as RW
- Copy the extracted x8gesture.ko to /system/lib/modules, overwite existing file
- Reboot.
Instruction for installation with update.zip:
-
Important : These update.zip will disable X8Overclock if it's enabled on your system. It's much better if you do the manual installation above.
- Download update.zip according to your current ROM
- Reboot and flash with xRecovery
- Report bugs
List of update.zip
v005 releases and above will not be provided in update.zip.
v004 releases
- For Stock SE 2.0.1.A.0.47 : update-2.0.1.A.0.47-2011-04-13-signed.zip (9.69 KB) http://www.multiupload.com/JQIPMR4FS5
- For Stock SE 2.1.1.A.0.6 : update-2.1.1.A.0.6-2011-04-13-signed.zip (9.45 KB) http://www.multiupload.com/EJPLJL0NEY
- For racht's CM7-J005 HACKDROID : pdate-cm7j005hackdroid-2011-04-13-signed.zip (9.98 KB) http://www.multiupload.com/EMU5K5ZYNF
- For jerpelea's CM7-006a : update-cm7j006a-2011-04-13-signed.zip (9.61 KB) http://www.multiupload.com/4KER24ZCXX
- For racht's HACKDROID 0.15 : update-floyo15-2011-04-13-signed.zip (9.69 KB) http://www.multiupload.com/PS9UPCX46B
- For nobodyAtall's MiniCM beta 2 : update-minicm2-2011-04-13-signed.zip (9.44 KB) http://www.multiupload.com/LHT0RC4F4M
v003 releases
- For Stock SE 2.0.1.A.0.47 : update-2.0.1.A.0.47-2011-03-26-rel-signed.zip (9.71 KB) http://www.multiupload.com/USKMD30N67
- For Stock SE 2.1.1.A.0.6 : update-2.1.1.A.0.6-2011-03-26-rel-signed.zip (9.47 KB) http://www.multiupload.com/CL2SH8FJGK
- For racht's CM7-J005 HACKDROID : update-cm7j005hackdroid-2011-03-26-rel-signed.zip (10 KB) http://www.multiupload.com/1X0IWZKRN6
- For jerpelea's CM7-006a : update-cm7j006a-2011-03-26-rel-signed.zip (9.63 KB) http://www.multiupload.com/6N2HAGE9OC
- For racht's CM7-1.0 RC1 : update-cm7r1.0rc1-2011-03-26-rel-signed.zip (9.62 KB) http://www.multiupload.com/PMN0H2LB52
- For racht's HACKDROID 0.15 : update-floyo15-2011-03-26-rel-signed.zip (9.71 KB) http://www.multiupload.com/UJK029BLIX
- For nobodyAtall's MiniCM beta 2 : update-minicm2-2011-03-26-rel-signed.zip (9.47 KB) http://www.multiupload.com/Z7XKFKP3A5
For other ROMs, please upload your /system/etc/hw_config.sh so I can customize your ROM's hw_config to load the kernel module
Troubleshoot
Q. Help! It doesn't work!
A. Try this command from your PC shell
Code:
adb shell
dmesg | grep X8Gesture
If there is some output, that means the module is loaded. You need to practice first.
Q. Help! I did as above, but nothing was output
A. Check your hw_config.sh or your ramdisk to be sure that it's loaded during boot
Q. Help! dmesg above output something, but it doesn't work!
A. Maybe you're trying to load it in X10 Mini Pro or other devices? It supports
only X8 and X10 mini. Also, perhaps your digitizer is not Synaptics, it may be a Cypress. Look at the Attention section.
Notice:
1.
This is NOT Dual Touch, as big X10 or X10 Mini Pro.
2. This is a
Work In Progress. It may not behavior correctly.
3. Read the above "How to zoom" carefully before reporting that it is not working!
4. Who installed gesture module on 23-03-2011 manually : please remove the old synaptics_i2c_rmi4_dx.ko and replace with x8gesture.ko below. Update your hw_config.sh also. Sorry for the inconvenience.
ATTENTION
I've just received a
full dmesg from
kueh9. I see that in his X8 there is a Cypress digitizer while most of us (including me) are using Synaptics digitizer! That's why x8gesture is not working in some devices.
Thank you kueh9 for your dmesg!
For devices that are unable to use x8gesture, try this command in your phone (either with terminal or with adb shell):
Code:
dmesg | grep "cyttsp-i2c"
If you have something like this, that means your X8/X10mini is using Cypress and therefore it will not be supported by x8gesture:
Code:
<6>[ 4.185259] cyttsp_i2c_probe: Successful registration cyttsp-i2c
In this case, because I don't have X8 with Cypress digitizer, I cannot do anything for you guys. I'm sorry.
ATTENTION #2 : About multi/dual touch capabilities
For X10Mini:- Nobody sees this, at step 14? It's Synaptics T1021A !
- And nobody sees this? T1021A is ClearPad 1000 !
- And nobody also sees this? ClearPad 1000 is Single-Touch !
I highly believe X8 also this digitizer (Synaptics T1021A).
And guys, stop dreaming about DT/MT with custom kernels! You are the one who develops kernel modules? Or me? You think that Synaptic kernel driver can do what my kernel module cannot??
Big thanks to
andrej456 for the idea and code to remove SE touchscreen driver.
Disclaimer
I'm not responsible if this module bricks your lovely phone. Use it at your own risk!