Disabling the Touchscreen of a Motorola Droid
When my old Motorola Droid's touchscreen started failing, I realized that it's not just a phone: it's also a lightweight Linux-based computer.
It's similar to a Raspberry Pi, but it comes with a built-in LCD, Wi-Fi, a GPS, and more! My only problem was that it suffered from "Ghost Touch": it would sense input that wasn't really there, opening apps and scrolling through things at random.
In this tutorial, we'll be modifying the kernel of the Motorola Droid ROM CyanogenMOD to disable the use of the touch screen. The techniques used here can likely be applied to many similar situations.
Assuming a Debian-based operating system, the first thing we need to do is download the the packages using apt-get, an APT-based command-line tool for handling packages:
Next, we'll download Google's prebuilt toolchain using Git (http://git-scm.com/), a free and open source distributed version control system:
Now, we can download the kernel and roll it back to the commit we want:
To configure the kernel the way it should be and get a boot.img that we can update and then flash, we'll need a copy of the CyanogenMOD ROM. We can download this using wget:
The unzip command can now be used to extract the boot.img:
The kernel sources include a script for extracting the kernel configuration from a boot.img file, extract-ikconfig:
The heart of this process is changing the .config file we just extracted to disable the touchscreen:
After saving our modified .config file, we can begin the actual compiling!
Once this finishes up, we can update our boot.img file from earlier with our newly-compiled kernel:
Finally, let's flash this file boot.img file:
And there you have it. We successfully modified the kernel of the Motorola Droid ROM CyanogenMOD to disable the use of the touch screen!
I've attached the new boot.img: http://xdaforums.com/attachment.php?attachmentid=1585421
When my old Motorola Droid's touchscreen started failing, I realized that it's not just a phone: it's also a lightweight Linux-based computer.
It's similar to a Raspberry Pi, but it comes with a built-in LCD, Wi-Fi, a GPS, and more! My only problem was that it suffered from "Ghost Touch": it would sense input that wasn't really there, opening apps and scrolling through things at random.
In this tutorial, we'll be modifying the kernel of the Motorola Droid ROM CyanogenMOD to disable the use of the touch screen. The techniques used here can likely be applied to many similar situations.
Assuming a Debian-based operating system, the first thing we need to do is download the the packages using apt-get, an APT-based command-line tool for handling packages:
Code:
sudo apt-get install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev abootimg
Next, we'll download Google's prebuilt toolchain using Git (http://git-scm.com/), a free and open source distributed version control system:
Code:
git clone https://android.googlesource.com/platform/prebuilt ~/DROID/prebuilt/
Now, we can download the kernel and roll it back to the commit we want:
Code:
git clone git://github.com/cvpcs/android_kernel_omap.git --branch cm-sholes ~/DROID/kernel/cm-sholes/
Code:
cd ~/DROID/kernel/cm-sholes/
Code:
git reset --hard 470cb3613f8da9a2483d5592f750ef4ad7de29bf
To configure the kernel the way it should be and get a boot.img that we can update and then flash, we'll need a copy of the CyanogenMOD ROM. We can download this using wget:
Code:
wget http://download.cyanogenmod.com/get/jenkins/2861/cm-7.2.0-sholes.zip
The unzip command can now be used to extract the boot.img:
Code:
unzip cm-7.2.0-sholes.zip boot.img
The kernel sources include a script for extracting the kernel configuration from a boot.img file, extract-ikconfig:
Code:
scripts/extract-ikconfig boot.img > .config
The heart of this process is changing the .config file we just extracted to disable the touchscreen:
Replace "CONFIG_INPUT_TOUCHSCREEN=y" and "CONFIG_TOUCHSCREEN_QUANTUM_OBP=y" with "# CONFIG_INPUT_TOUCHSCREEN is not set" and "# CONFIG_TOUCHSCREEN_QUANTUM_OBP is not set", respectively.
After saving our modified .config file, we can begin the actual compiling!
Code:
make ARCH=arm CROSS_COMPILE=~/DROID/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi- -j`grep 'processor' /proc/cpuinfo | wc -l`
Once this finishes up, we can update our boot.img file from earlier with our newly-compiled kernel:
Code:
abootimg -u boot.img -k arch/arm/boot/zImage
Finally, let's flash this file boot.img file:
Code:
adb reboot recovery
Code:
adb push boot.img /tmp/boot.img
Code:
adb shell flash_image boot /tmp/boot.img
And there you have it. We successfully modified the kernel of the Motorola Droid ROM CyanogenMOD to disable the use of the touch screen!
I've attached the new boot.img: http://xdaforums.com/attachment.php?attachmentid=1585421
Attachments
Last edited: