Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touch Input not working on TWRP 3.1.1 for Mediatek MT6753 Device. #1

Closed
iykequame opened this issue Sep 15, 2017 · 50 comments

Comments

Projects
None yet
@iykequame
Copy link

commented Sep 15, 2017

Hello TeamWIn, first of all i will say congratulations for making Android awesome with TWRP Touch Recovery.
Team, anytime i compile TWRP for y device, Touch Input does not work.
I am asking fir there are some things missing or i have to edit in other to the touch to work.
Thank You.

@jcadduono

This comment has been minimized.

Copy link

commented Sep 18, 2017

check to make sure its not just inverted or backwards by playing around on the screen, as that can be fixed in ur boardconfig with twrp flags
if its not getting touch at all, try flashing twrp to the boot partition instead and see if touch works
often times devices have touch disabled if booting recovery partition
in that case you have some options...

  1. with kernel source, stop touch from being disabled by editing wherever in kernel the partition boot check is
  2. without kernel source, use hex edits to make the touch disabler do nothing (good luck, some people have accomplished this)
  3. find another MT6753 device and hope its kernel with working touch works magically on your device too
@iykequame

This comment has been minimized.

Copy link
Author

commented Sep 20, 2017

Thanks for the reply.
I have tried several times the number "option 3" but still same error.
I don't have my kernel source so "option 1" can't be accomplished .
I am yet to try the "option 2" and the report to you back.

But can you assist me with the flags here :
_**

"check to make sure its not just inverted or backwards by playing around on the screen, as that can be fixed in ur boardconfig with twrp flags"
**_

Thank you.

@iykequame

This comment has been minimized.

Copy link
Author

commented Sep 20, 2017

If i may ask, is there any file to modify in TWRP source to make touch work ?

@CaptainThrowback

This comment has been minimized.

Copy link
Contributor

commented Sep 20, 2017

Not if the kernel is the issue.

@mahadi78

This comment has been minimized.

Copy link

commented Sep 29, 2017

Hi,

Thanks team win recovery builder team for their tremendous invention that make Android use better to us.

Lets start to.describe my issue:

I am facing the same issues as described above for my mtk6580 based chipser having kernel version 3.18.19 marshmallow based rom.Touch Input not working on TWRP 3.1.1
I don't have any kernel.source. Can you help me please to make twrp input touchable..

@paradoxnafi

This comment has been minimized.

Copy link

commented Sep 30, 2017

I have the same problem.
My device Mt6580 kernel 3.18.19+. Kernel source is not available.
TWRP touch screen doesn't work. However I can flash rom with flashify. But can't fix in case of brick.
However I have a working filz touch recovery anf touch works here. But as we know, most of the rom are written in TWRP script.
Please help us Team Win....

@ghost

This comment has been minimized.

Copy link

commented Oct 1, 2017

Ok, I have have been absent, but all is about to change, thx for your patients :)

@iykequame

This comment has been minimized.

Copy link
Author

commented Oct 13, 2017

@lj50036 any clue about how to solve the about error/issue ?
thanks

@omer198023

This comment has been minimized.

Copy link

commented Oct 23, 2017

Tank

@parthibx24

This comment has been minimized.

Copy link

commented Oct 25, 2017

@CaptainThrowback i saw some devices with MT6580 chipset that touch working on philz recovery but its not working on twrp..(sorry i dont a device with this bug...so i cant give a log)

@nutzaza55255

This comment has been minimized.

Copy link

commented Oct 27, 2017

Hi

1 similar comment
@nutzaza55255

This comment has been minimized.

Copy link

commented Oct 27, 2017

Hi

@LosTigeros

This comment has been minimized.

Copy link

commented Nov 12, 2017

@iykequame

This comment has been minimized.

Copy link
Author

commented Nov 12, 2017

@LosTigeros want to know the process of how he fixed it, you sharing or he sharing it would be very good and that will help a lot.

@LosTigeros

This comment has been minimized.

Copy link

commented Nov 12, 2017

If I knew it then I would write it here.
But I don't know how'd he fixed the issue.

Maybe someone should write to him?

@iykequame

This comment has been minimized.

Copy link
Author

commented Nov 13, 2017

  • Maybe this post can be useful.

See here →↓

@LosTigeros

This comment has been minimized.

Copy link

commented Nov 14, 2017

Yes it is very useful. I'll check that soon.

@LosTigeros

This comment has been minimized.

Copy link

commented Nov 15, 2017

IT WORKS!
So I writed a tutorial for You what I have done.

I've rooted my phone, connected to the terminal via adb, got root access and typed:

echo 0 > /proc/sys/kernel/kptr_restrict
cat /proc/kallsyms | grep tpd_i2c_probe

It returned me the address of where touch screen driver? starts in the kernel.
For me it was: ffffffc000356a4c t tpd_i2c_probe

Next i dumped kallsyms from the phone with:

cat /proc/kallsyms >/sdcard/symbols.txt

and them pulled that file to my PC.

Next I've downloaded Carliv Image Kitchen and got mine TWRP recovery image.
First I unpacked recovery.img image with Carliv Image Kitchen. Then i looked for recovery.img-kernel file and analysed it using HEX Editor.

My kernel file contains some data at the end so I copied them because as i expected I needed them later.
data

I removed these random data from the file and i could normally decompress the file using 7-Zip.
kernel_file

Now I could normally open that file in IDA Pro so I did that.
I've opened IDA Pro and dragged decompressed kernel into IDA window.
I choosed ARM Little-endian [ARM] processor type and clicked OK and Yes
processor_type

In next window I had to set proper ROM start address and Loading address so I did that.
My kernel is 64 bit so value which i had to type in was 0xFFFFFFC000080000 (for 32 bit the value is 0xC0008000) and clicked OK and Yes.
open_kernel

Next I've got a message about that IDA can not identify the entry point automatically as there is no standard of binaries so I clicked OK.

Next I downloaded kallsyms_loader.idc (I had to change extension from .idc.c to .idc).

I've opened this file and commented out (added // to the beggining of the lines) these lines because they were throwing error for me:

static trim(str) {
    return rtrim( ltrim(str) );
}

Next I've pressed File -> Script file... and selected that kallsyms_loader.idc file.
Next I had to select that symbols.txt file which I've pulled from the phone.

Now I had to wait as the script finish its job and then wait for the IDA to parse all these functions so kernel was more readable now.

Now I went to Options -> General and changed Number of opcode bytes (non-graph) to 6 and clicked OK.

Next I've went to the address which phone returned for me (ffffffc000356a4c) and I finded out what I needed to change. So I clicked Edit -> Patch program -> Change bytes... and I replaced statement and return with NOP (NOP for 64bit ARM its 1F 20 03 D5 and for 32bit ARM its 00 F0 20 E3).

patch

Next I've saved my changes to the kernel by Edit -> Patch program -> Apply patches to input file.

I have to repack the recovery now so...

I've compressed the kernel image using 7-Zip.
compressed_kernel

Next I removed other kernel files and renamed my kernel file to recovery.img-kernel (yes I removed the extension).
renamed

Next I had to paste these values which I copied at the beginning from the original kernel to the end of our modified kernel because my phone doesn't wanted to boot up.
appended

Then I just repacked and flashed my recovery.img image.

Touch screen now works perfectly for me in recovery!

Now if it works for me, then it should work for You!
But remember that this instruction was writed for gt91xx touch driver.
Enjoy!

@iykequame

This comment has been minimized.

Copy link
Author

commented Nov 15, 2017

@LosTigeros the is awesome, ain't it ? ! cool.
thanks for testing and reporting that it works.

@LosTigeros

This comment has been minimized.

Copy link

commented Nov 15, 2017

Yes, that's awesome that we resolved the problem but sad too that someone have added that to the driver:

if (RECOVERY_MODE == get_boot_mode())
    return 0;
@iykequame

This comment has been minimized.

Copy link
Author

commented Nov 15, 2017

Yea, but in all, its all good that the issue/problem which has been worrying most MTK users can be resolved with the above experiment.
**

MTK will be better someday

**

@kengraWin

This comment has been minimized.

Copy link

commented Nov 15, 2017

goos

@jeronelailo

This comment has been minimized.

Copy link

commented Nov 26, 2017

@LosTigeros my recovery does not boot after doing your tutorial T_T
My Device is MT6580

@LosTigeros

This comment has been minimized.

Copy link

commented Nov 26, 2017

@jeronelailo at first you should read that we're talking here about MT6753 based devices with gt91xx touch driver.

@jashanerm

This comment has been minimized.

Copy link

commented Dec 2, 2017

Sir what Do you mean by that

and I replaced statement and return with NOP (NOP for 64bit ARM its 1F 20 03 D5 and for 32bit ARM its 00 F0 20 E3).

Im new at this, im a noob And i really dont know what you mean by replaced the statement..

@axxaax113

This comment has been minimized.

Copy link

commented Dec 3, 2017

@LosTigeros Thank you for guidance.
I have read through and feel somewhat confusing a few positions. Hope you can help yourself complete with, sincerely thank you
Here is my twrp file: https://drive.google.com/open?id=14PqOnYkdPDpuCWeUDw-x0YxOPhoQGFXv
Or you can share yourself please file again: kallsyms_loader.idc
I do not understand "removed these random data from the file and i could normally decompress the file using 7-Zip" Can you guide yourself in more detail?

I'm not a foreigner so I have to "google translate" you understand

@LosTigeros

This comment has been minimized.

Copy link

commented Dec 3, 2017

@jashanerm just look at the screenshot

@axxaax113 to get the kallsyms_loader.idc file you have to click on the filename in instruction post. It'll open pastebin with code for you.

I do not understand "removed these random data from the file and i could normally decompress the file using 7-Zip" Can you guide yourself in more detail?

When I've opened recovery.img-kernel in the HEX Editor then I saw that on the end of this file there is some important data which you cannot extract because they are not a gzip file, they are appended to the file after the compression. So I've removed them using HEX Editor (I've copied them to the Notepad++ because at the end, after compression you have to append them again to the kernel) and then I could decompress the kernel.

@axxaax113

This comment has been minimized.

Copy link

commented Dec 4, 2017

@LosTigeros Thanks for answering. May you help me fix this always? These are the things I think are enough for you to fix yourself. If you need anything more then I will upload. thank you very much.
https://drive.google.com/file/d/1iCZUBKzMvweU1SBylBPT4WznoYs8_0F5/view?usp=drivesdk
https://drive.google.com/file/d/1wQJi6NTcs-Md45g-J758iKlF5E3omM6v/view?usp=drivesdk

@LosTigeros

This comment has been minimized.

Copy link

commented Dec 4, 2017

@axxaax113
At first -> I dont have access to these files.
At second -> I need to know what phone, cpu, is system 32/64 bit and touch screen driver you have.
At third -> I would need the result of cat /proc/kallsyms | grep tpd_i2c_probe, entire kallsyms in text file and your recovery.

I may look into your kernel but i dont promise i'll make it working for you.

@axxaax113

This comment has been minimized.

Copy link

commented Dec 4, 2017

@axxaax113

This comment has been minimized.

Copy link

commented Dec 5, 2017

into IDA like this, what file editor do you have? guided with
https://photos.app.goo.gl/hNY3GUcNRtp462gf1

@axxaax113

This comment has been minimized.

@LosTigeros

This comment has been minimized.

Copy link

commented Dec 5, 2017

I need to know what touch screen driver you have.

I writed instruction for gt91xx touch driver. You have other touch driver so these instructions wouldn't work for you.

I need to analyze source code of touch driver to check where it rejects loading driver.

@Naimur9800

This comment has been minimized.

Copy link

commented Dec 7, 2017

@LosTigeros bro i have extract mtk6753 recovery with carliv image kitchen and got kernel/zimage but i couldn"t extract zimage into 3 parts like you did with 7zip T_T

@LosTigeros

This comment has been minimized.

Copy link

commented Dec 7, 2017

@Naimur9800 it should be 1 file.
I just show there 3 files to show you difference in size of original, removed data at the end and decompressed kernel.

@axxaax113

This comment has been minimized.

Copy link

commented Dec 7, 2017

I do not understand the problem you. I do not use touch driver at all. I follow your steps but are having difficulty at IDA, I do not know which one to choose to set to NOP. I take a screenshot, please look at and guide me, thanks a lot

@axxaax113

This comment has been minimized.

Copy link

commented Dec 7, 2017

@LosTigeros my touch driver ffffffc000909da0

@Naimur9800

This comment has been minimized.

Copy link

commented Dec 8, 2017

@LosTigeros bro I want you to grant/accept my request that please make a video tutorial,so that we can fix that without any Hasitaion and It will be also very much helpful to us (for noob actually 😂 ) pls pls pls

@LosTigeros

This comment has been minimized.

Copy link

commented Dec 8, 2017

I don't have enough time to make one. You should be happy that i made this tutorial for everyone.

@Naimur9800

This comment has been minimized.

Copy link

commented Dec 8, 2017

@LosTigeros ,ofcourse bro we are very curious and happy that you have successfully tested and give us tutorial of how you fix it but some like me never can understood those worked like u did 🤔☢ so pls do if you can

@axxaax113

This comment has been minimized.

Copy link

commented Dec 8, 2017

Plese help me @LosTigeros. NOP line ??? You can see picture

@Waterboy1602

This comment has been minimized.

Copy link

commented Dec 15, 2017

I'm having the same problem you've described and fixed, but I don't find the hex statements I need to remove. Could you maybe help me with that. I have a Elephone S3 (MT6753) with a gt9xx touch driver.
I added a screenshot of my IDA screen. I just need to find the right statements.

ida

@LosTigeros

This comment has been minimized.

Copy link

commented Dec 16, 2017

@Waterboy1602 just try and you'll find
I suggest you to try to NOP these:
image

@Clrkz

This comment has been minimized.

Copy link

commented Dec 17, 2017

Finally! It Works!
Thankyou @LosTigeros ! My Touch Driver is gt1xxx
I Tried to NOPs the BL and CMP with #2 which is the RECOVERY_BOOT(2)
idafck

@iykequame

This comment has been minimized.

Copy link
Author

commented Dec 17, 2017

finally it worked for u

@kengraWin

This comment has been minimized.

Copy link

commented Dec 18, 2017

good

@jeronelailo

This comment has been minimized.

Copy link

commented Dec 19, 2017

@LosTigeros can you try that on mine?

http://upfile.mobi/C0YpuG6BUmy

MT6580 - GT9XX Driver

@lalitjoshi06

This comment has been minimized.

Copy link

commented Dec 19, 2017

I port twrp for infinix zero 5 mtk6757cd. But i don,t know the touchscreen driver.
It is working if i boot it in boot partition with fastboot boot recovery.img.
But after flashing touch not works.
Pls guide me to fix the issue.

@ghost

This comment has been minimized.

Copy link

commented Dec 20, 2017

What has this become ?
Last time I check this is a minimal manifest project ?
I am fully unware why all this offtopic shit is being posted here ?
I can just shut it down, maybe that is the best idea.

@ghost ghost closed this Dec 20, 2017

@minimal-manifest-twrp minimal-manifest-twrp locked as off topic and limited conversation to collaborators Dec 20, 2017

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.