yashsingh1/xdaforums huggingface dataset:
[Android Q&A, Help & Troubleshooting] Dzwsin:
I have the same issue. However, I can't install any framework on my device. (I'm using an unofficial cm 12.1 build that isn't compatible) and I was wondering if there is any other way to do this? I've done a bit of searching and trial and error with Tasker but haven't figured out any solution.
[Xperia Play Android Development] nickholtus:
Hello,

As most threads are full of thanks posts or non development related posts, I am making a new one.

A note to everyone: This is a DEV thread, every post not related to this project will be removed!

What is the current status?

Currently the kernel is booting, but touchscreen isn't working.

What's working:

Booting into Android

Screen (Showing things, not touch)

Sound

What's not working or not tested because of touchscreen:

Everything else

Sources:

https://github.com/nickholtus/msm7x30-3.4.x-nAa

Credits:

NobodyAtAll for the initial source

MikeNG for a lot of fixes

DooMLoRD For giving me the device and a lot of work on the source

Mikeioannina A lot of work on the sources

Again: Please keep this thread development related!

If I helped you, please press thanks or consider donating to me!
[Xperia Play Android Development] nickholtus:
Current status on touchscreen:

Still investigating for the problem, can't really find anything yet.
[Xperia Play Android Development] nickholtus:
Threads with some more info:

http://xdaforums.com/showthread.php?t=2563508
[Xperia Play Android Development] DooMLoRD:
Is the driver crashing? Post dmesg
[Xperia Play Android Development] nickholtus:
Will post this evening, am at work right now.
[Xperia Play Android Development] genetic608:
Bakisha posted a dmesg here http://xdaforums.com/showpost.php?p=48869177&postcount=20

Although it is not from the most recently updated test kernel.
[Xperia Play Android Development] Bakisha:
I've posted even full bugreport from zImage(4), wich i think is latest test version. I'll copy paste dmesg from there and attach it here
[Xperia Play Android Development] DooMLoRD:
ok so here is what i see from the dmesg:

<6>[ 5.784790] synaptics_touchpad: product 1, firmware revision 13, bootloader date 2011-02-16
<6>[ 5.785827] input: synaptics_touchpad as /devices/virtual/input/input4
<6>[ 5.786254] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 1, activated 0, users 0, standby 0
<7>[ 5.786834] CY8CTMA300_TOUCH: V0.9b-mt built Jan 14 2014 22:15:21
<7>[ 5.787200] CY8CTMA300_TOUCH: SPI setup (requesting 1000000Hz) OK
...
<6>[ 5.949859] CY8CTMA300_TOUCH: TP_REG_FW 0x00
<6>[ 6.109924] CY8CTMA300_TOUCH: Bootloader FW Ver 0.0
<6>[ 6.129882] CY8CTMA300_TOUCH: Application FW Ver 0.0
<6>[ 6.149902] CY8CTMA300_TOUCH: Silicon Revision E
<6>[ 6.169891] CY8CTMA300_TOUCH: Customer ID 0
<6>[ 6.189880] CY8CTMA300_TOUCH: old FW version, applying reset workarounds
<6>[ 6.330108] input: cy8ctma300_touch as /devices/platform/spi_qsd.0/spi_master/spi0/spi0.0/input/input5
<6>[ 6.334136] CY8CTMA300_TOUCH: invalid data?

then...

<6>[ 33.252838] CY8CTMA300_TOUCH: invalid data?
<6>[ 33.651550] CY8CTMA300_TOUCH: invalid data?
<6>[ 34.024230] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 0, activated 0, users 1, standby 0
...
<6>[ 34.026611] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 0, activated 0, users 0, standby 0
<6>[ 34.027099] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 0, activated 0, users 1, standby 0
<6>[ 34.027130] synaptics_touchpad 4-0020: synaptics_touchpad_set_power: powered 0, activated 0, users 0, standby 0
<6>[ 34.050384] CY8CTMA300_TOUCH: invalid data?
<6>[ 34.491516] CY8CTMA300_TOUCH: invalid data?
<6>[ 34.890441] CY8CTMA300_TOUCH: invalid data?

see that the "set_power" is powered 0... something is powering down the touchpad, may be due to "invalid data?"

can u give me exact time stamp from bootup when the touchscreen stops working? post the corresponding dmesg...
[Xperia Play Android Development] Bakisha:
I;ll attach dmesg that i just made, but i don't think that lines have something to do with touchscreen because line with that "powered 0" is even in dmesg logs of GB and ICS kernels for Play (i've checked on Lupus kernels for GB and ICS and on those touchpads and touchscreen works normally)

But i noticed difference in next lines:

<7>[ 5.525909] CY8CTMA300_TOUCH: V0.9b-mt built Jan 14 2014 22:15:21
<7>[ 5.526306] CY8CTMA300_TOUCH: SPI setup (requesting 1000000Hz) OK
<6>[ 5.584747] Charging with 0mA current
<6>[ 5.584960] entering into lpm
<6>[ 5.585144] msm_otg_suspend: Turn on phy comparators
<6>[ 5.585449] msm_otg_suspend: usb in low power mode
<6>[ 5.685119] CY8CTMA300_TOUCH: TP_REG_FW 0x00
<6>[ 5.845153] CY8CTMA300_TOUCH: Bootloader FW Ver 0.0
<6>[ 5.865142] CY8CTMA300_TOUCH: Application FW Ver 0.0
<6>[ 5.885192] CY8CTMA300_TOUCH: Silicon Revision E
<6>[ 5.905181] CY8CTMA300_TOUCH: Customer ID 0
<6>[ 5.925170] CY8CTMA300_TOUCH: old FW version, applying reset workarounds
<6>[ 6.065368] input: cy8ctma300_touch as /devices/platform/spi_qsd.0/spi_master/spi0/spi0.0/input/input5
<6>[ 6.071472] CY8CTMA300_TOUCH: invalid data?
<6>[ 6.084808] CY8CTMA300_TOUCH: Device registered OK

And in other kernels (even in Wedgess's 2.6 kernel for his test release JB4.2) it is like:

<7>CY8CTMA300_TOUCH: V0.9b-mt built Feb 5 2014 22:14:40
<7>CY8CTMA300_TOUCH: SPI setup (requesting 1000000Hz) OK
<6>CY8CTMA300_TOUCH: TP_REG_FW 0x00
<6>CY8CTMA300_TOUCH: Bootloader FW Ver 0.1
<6>CY8CTMA300_TOUCH: Application FW Ver 0.114
<6>CY8CTMA300_TOUCH: Silicon Revision E
<6>CY8CTMA300_TOUCH: Customer ID 5
<6>CY8CTMA300_TOUCH: SSD firmware [Project ID 7]
<3>CY8CTMA300_TOUCH: firmware versions match.
<6>input: cy8ctma300_touch as /devices/platform/spi_qsd.0/spi0.0/input/input3
<6>CY8CTMA300_TOUCH: Device registered OK
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>GPIO Input Driver: Start gpio inputs for keypad-zeus in interrupt mode
<6>input: keypad-zeus as /devices/virtual/input/input4
[Xperia Play Android Development] smokerman:
i think probably is touchpad related also..seems like kernel is powering down the touchpads and touchscreen. [MENTION=4233768]nickholtus[/MENTION] and if you try kernel like NEOL as the board is the same, but kernel wont look for touchpads..and maybe we can flash on play without touchpads support..just a test,we can flash neol kernel and vice versa..only touchpads and camera inverted..but maybe its possible to make it work.
[Xperia Play Android Development] nickholtus:
Personally I think the problem is here:

Because it can't get the right fw versions, it says old FW version, applying reset workarrounds.

In other kernel this isn't the case.
[Xperia Play Android Development] Spizzy01:
To add to this - it also applies a different file after realizing the FW version doesn't match up.

In Wedgess 2.6 Kernel is uses 'input3':

cy8ctma300_touch as /devices/platform/spi_qsd.0/spi_master/spi0/spi0.0/input/input3

Whereas in this Kernel is uses 'input5'

cy8ctma300_touch as /devices/platform/spi_qsd.0/spi_master/spi0/spi0.0/input/input5

I doubt it's as simple as this, but if this is referencing different files why not try copying/renaming 'input3' to 'input5' and trying again?

Edit: Yeah, it doesn't look like it's as simple as this. xD

Either that or try changing the FW versions? Since for some reason they are currently '0.00', we'd just need to somehow change them to:

<6>CY8CTMA300_TOUCH: Bootloader FW Ver 0.1
<6>CY8CTMA300_TOUCH: Application FW Ver 0.114

Another thing to note is that 'input3' is identified as 'pm8xxx-keypad'

<6>[ 5.400421] input: pm8xxx-keypad as /devices/platform/msm_ssbi.0/pm8058-core/pm8xxx-keypad/input/input3

Is this the same in the 2.6 Kernel?

[MENTION=4053663]Bakisha[/MENTION] - Would you be able to post the dmesg for the 2.6 Kernel please? I don't have the means to get it myself unfortunately - I was going to see if there were any other discrepancies between the two.
[Xperia Play Android Development] Bakisha:
It's little bit old and it don't have timestamp, but untill i can make new one, it will do. Attaching (it is copy-pasted from previous bugreport i posted in other thread)

As for myself, i'll look in differences in source code between Nick's and Wedgess's kernel, to see if there is any differences
[Xperia Play Android Development] nickholtus:
Hi all,

I hav some news, but it's not directly related to the kernel.

The play I have is going to Achotjan for some time, he is going to develop for it.

We are going to develop together on this kernel. After a while i will get the play back.

So hopefully progress will go a bit faster now we have a new developer.

Regards,

Nick
[Xperia Play Android Development] Spizzy01:
I'm trying to rebuild my Linux development/kernel environment and compile the Kernel in preparation for helping nick/nAa if required.

Has anyone ever ran into this before

CHK include/generated/utsrelease.h
/home/spizzy/android/msm7x30/scripts/gcc-version.sh: line 25: arm-eabigcc: command not found
/home/spizzy/android/msm7x30/scripts/gcc-version.sh: line 26: arm-eabigcc: command not found
HOSTCC scripts/conmakehash
CC scripts/mod/empty.o
Generating include/generated/mach-types.h
arm-eabigcc: No such file or directory
Is your PATH set correctly?
make[2]: *** [scripts/mod/empty.o] Error 2
make[1]: *** [scripts/mod] Error 2
make[1]: *** Waiting for unfinished jobs....
CC kernel/bounds.s
arm-eabigcc: No such file or directory
Is your PATH set correctly?
make[1]: *** [kernel/bounds.s] Error 2
make: *** [prepare0] Error 2
make: *** Waiting for unfinished jobs....
make: *** [scripts] Error 2

I'm using nAa's sources and the paths are set correctly... I can't understand why it's saying it's not. Unless I'm missing something else? oO

I'll look into it more tonight if I can't work it out soon, but if anyone can help or if anyone is able to talk me through it that'd be great.. (Y)

Edit: Nvm. Fixed. xD
[Xperia Play Android Development] Bakisha:
Wich toolchain are you using to build zImage?

Or post link to source that you are trying to compile and i'll look into it too...
[Xperia Play Android Development] Spizzy01:
I fixed that issue now... Had issues with the filesystem/Linux itself lol.

Now I'm getting this though:

drivers/gpu/msm/adreno.c: In function 'adreno_iommu_setstate':
drivers/gpu/msm/adreno.c:425: warning: the frame size of 1040 bytes is larger than 1024 bytes; see http://go/big_stack_frame
error, forbidden warning: adreno.c:425
make[3]: *** [drivers/gpu/msm/adreno.o] Error 1
make[2]: *** [drivers/gpu/msm] Error 2
make[1]: *** [drivers/gpu] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

Hopefully an easy fix.. Working on it now lol.

Oh Linux... Y U DO DIS! O_O

FYI: I'm using this toolchain:

github.com/AndroidUnited/Android_Toolchains
[Xperia Play Android Development] Bakisha:
Maybe to try with 4.7?

I'm using the one from

https://github.com/DooMLoRD/android_prebuilt_toolchains/tree/master/arm-linux-androideabi-4.7
[Xperia Play Android Development] Spizzy01:
I changed the toolchain as you suggested... It's building currently, I'll let you know if it gets further :)

Thanks for the replies Bakisha. Much appreciated!

Edit: Sadly it died... And funnily enough, on the touchscreen.

By the way, I haven't modified anything in the source yet. At least, not for this installation. I do however hopefully have a fix which I want to try once I get this working correctly.

drivers/input/touchscreen/cy8ctma300_touch.c: In function 'cy8ctma300_touch_probe':
drivers/input/touchscreen/cy8ctma300_touch.c:1354:35: error: expected ')' before ';' token
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: error: expected ')' before '}' token
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: error: expected ')' before '}' token
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: error: expected expression before '}' token
drivers/input/touchscreen/cy8ctma300_touch.c:1329:3: error: label 'err_gpio_setup' used but not defined
drivers/input/touchscreen/cy8ctma300_touch.c:1382:1: warning: control reaches end of non-void function [-Wreturn-type]
error, forbidden warning: cy8ctma300_touch.c:1382
make[3]: *** [drivers/input/touchscreen/cy8ctma300_touch.o] Error 1
make[2]: *** [drivers/input/touchscreen] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

Could you by any chance upload your 'cy8ctma300_touch.c' file please? I have a feeling the file I have has been modified somehow... Which makes no sense as it was cloned straight from github... oO

I've found an older file myself, I'll try this one too...

Edit: OK... I'm pretty sure this is the problem...? Can someone try to compile the Kernel again, and select only '2' workers (aka -j2). If I put a large amount of workers then it'll most likely compile as it waits for the rest of the tasks to finish... But in actual fact, the kernel isn't compiling correctly because of the error above...? Unless of course I'm the only one getting this error... But as I said, I've not made any changes yet.

I'm gonna go through the file and see if I can work out what the issue is, most likely it's just a missing expression or something. I'll also try sourcing the file from somewhere else, see if it helps..
[Xperia Play Android Development] Bakisha:
I found a workaround for that.

To me it looks like number of opened "(" doesn't match with closed ")", so I copied code from Lupus kernel:

Change:

while (((err = reset_device(this);

to

while (((err = reset_device(this)) < 0) && reset_retries--) {
DEBUG_PRINTK(KERN_DEBUG
"CY8CTMA300_TOUCH: retrying reset_device()\n");
msleep(100);
}

Don't ask why, i don't understand what it does, but for me it fixed problem with compiling (in case few more errors, compare this file with file from lupus jb 2.6 kernel )
[Xperia Play Android Development] Bakisha:
Try with this one
[Xperia Play Android Development] Bakisha:
Damn..

I think i had that error, but i'm not sure at the moment how i fix it.

Maybe toolchain related.

Give me some time to start ubuntu in virtualbox, redownload source again and start over compiling
[Xperia Play Android Development] Spizzy01:
O_o That's a lot of time lol... Don't worry about it too much, unless doing parts of that benefits you too.

The last thing I want is to be hassling people who are already competent in compiling already.
[Xperia Play Android Development] Bakisha:
It's no problem, i do that from time to time anyway because (for testing purpose) i change so much stuff in code that i don't know what i change and it fail to compile :)

I'll post my results later
[Xperia Play Android Development] Spizzy01:
Sorted it. Was missing the lzop package.

sudo apt-get install lzop

That was all it needed lol.

Edit: Which ramdisk do you usually use? The one from the CM10.1 boot.img?
[Xperia Play Android Development] Bakisha:
And i was about to wonder why i compiled zImage without errors :)

Yes, i use ramdisk from cm10.1 . You can find boot.img inside cm_zeus-LX-20131024-NIGHTLY.zip
[Xperia Play Android Development] Spizzy01:
Yeah, that's the one I used lol.

Failed unfortunately though. At least, flashing the img VIA FastBoot...

F:\Android\R800i\Flashtool\x10flasher_lib>fastboot flash boot zeus3.4.img
< waiting for device >
sending 'boot' (8740 KB)...
(bootloader) USB download speed was 9371kB/s
OKAY [ 0.966s]
writing 'boot'...
FAILED (remote: Wrong range:0x12c08000-0x130aac27. Ok:0x00200000 - 0x03dfff)
finished. total time: 0.971s

Back to the start I guess! lol

Is the base in my terminal command wrong perhaps?

mkbootimg --kernel zImage --ramdisk boot.img-ramdisk.gz --cmdline no_console_suspend=1-console=null --base 00200000 --output boot-new.img

I've tried several so far though... no joy..
[Xperia Play Android Development] Bakisha:
what tool you are using to put zImage inside boot.img?

Upload zImage and i'll make boot.img with tool i am using, to see where is the problem..
[Xperia Play Android Development] Spizzy01:
It's OK. I recompiled the Kernel after making some changes, and it's worked and flashed OK now.

F:\Android\R800i\Flashtool\x10flasher_lib>fastboot flash boot boot-new.img
< waiting for device >
sending 'boot' (8740 KB)...
(bootloader) USB download speed was 9361kB/s
OKAY [ 0.967s]
writing 'boot'...
(bootloader) Download buffer format: boot IMG
(bootloader) Flash of partition 'boot' requested
(bootloader) S1 partID 0x00000003, block 0x00000280-0x000002e3
(bootloader) Erase operation complete, 0 bad blocks encountered
(bootloader) Flashing...
(bootloader) Flash operation complete
OKAY [ 1.705s]
finished. total time: 2.676s

I'll let you know if I have any luck with the touchscreen!

Which ROM have you been using to test by the way? CM10.1?

I take it there's also no recovery? So I'll need to flash ROMs the long way round? AKA, remount /system and /data as RW and write the files manually? ...I recall there being a method in FastBoot... I'll take a look into it before I start the long-winded method.

Scratch that... I can just flash a recovery... Haha, i derped good and proper there. ><

[MENTION=4053663]Bakisha[/MENTION] - do you have any good recommendations for a recovery.img? Which do you use?

Thanks for all of the above by the way!
[Xperia Play Android Development] Bakisha:
Yes, use cm10.1 (if you get some errors when flashing rom, either edit updater-script and delete first 3 lines, or flash any other rom and flash cm10.1 again - wiping system partition is causing that error)

Recovery is with R (right shoulder) button

Or you can use Wedgess rom. Also, you can flash Lupus 4.2 kernel from that thread if you are stuck (you locked screen and touchscreen doesn't work)

.

---------- Post added at 06:24 PM ---------- Previous post was at 06:18 PM ----------

I have no idea :D

i use Android Image Kitchen for windows to repack boot.img
[Xperia Play Android Development] Spizzy01:
Rofl... I got the touchscreen working for about 5 seconds, to the point where i can click about 10 prompt windows saying 'Unfortunately, CyanogenMod Account has stopped'. xD

I've got to disappear for around an hour, but I'll check the logs when I get back and see what's happening.

Are we sure it's not the ROM killing the touchscreen? And that it's all Kernel related?

To save me a few mins of looking it up, what's the ADB command to pull the dmesg file? Where is it stored? (Sorry for being lazy lol) If there's no reply when I get back I'll take a look myself ><
[Xperia Play Android Development] Bakisha:
adb shell

#dmesg >/mnt/sdcard/dmesg.txt

exit

adb pull /mnt/sdcard/dmesg.txt

That is the hard way, i use easy way (Total commander with adb plugin, and i just drag and drop dmesg file)

On cm10.1 rom, lupus 4.2 kernel have working touchscreen. Ofcorse i am not 100% sure is it kernel related, but i am 95% sure. Also, charging, wifi and bluetuth does not work, after some time front buttons stop to work (home-menu-back-search), and dpad is acting wierd...
[Xperia Play Android Development] Bakisha:
You have to enable development options in settings by tapping rom name in "about phone". Then enable android debuging and set root permissions for app and adb in those settings and allow access to pc (toast notification will pop up)

But i didn't try adb access from command prompt. I noticed that in one program (Android Commander) it report that device is offline, but in Total Commander with adb plugin i don't have that problem.

And when first boot rom, also make sure to disable lockscreen, because if you reset phone, on next boot you'll have screen locked and without working touchscreen no way to unlock it (flashing lupus 4.2 is workaround, then flash back 3.4 kernel)

If you have any luck, feel free to post files you have changed or boot.img

I can't help you any further because i have no knowledge in kernel coding, all previous help is just from experience and little bit of luck...

I might recognize some part of code as general terms (like irq,gp,mV) because i know terms in electronics, but command codes in kernel is just way above my knowledge (and always will be)..

Good luck :good:
[Xperia Play Android Development] Spizzy01:
I know how to enable USB Debugging, it's just I can't lol. There's no touchscreen so there's no going into settings and no enabling developer options and no USB debugging lol.

Edit: Ahh, you mean to flash CM10.1 with the original kernel, load it up and enable USB debugging.. THEN flash the new kernel and use the settings that remained from last boot in order to access ADB... Hmm.. I'll give that a shot lol.

I've tried several things so far though, aside from that... Without much success.

I've disabled the process the driver goes through after it discovers the Bootloader and Application versions don't match up. Disabling this process does nothing as originally the driver is still active and functioning as normal, leading me to believe that it isn't the driver that's stopping the touchscreen working after a second of activity.

I've also discovered that the driver incorrectly sources the touchscreen firmware within the driver file (see below) - I amended this part and sourced the firmware correctly however this still had no effect and didn't get the touchscreen working normally. To be honest though, the firmware hasn't been updated since before ICS was made by the looks of it so there wouldn't be any major changes (if any) anyway.

#include "cypress-firmware-0x0072.h"

To

#include <misc/cypress-firmware-0x0072.h>

The formatting was wrong and so was the location. In the new one however the location was set manually, you'll not actually find the file specified in that location in the sources.

The driver also includes other files from other locations such as

#include <linux/spi/cypress_touch.h>

Which appeared to be missing some specific member names that were referenced in the original file.

I attempted to merge parts of /linux/spi/cypress_touch.h with /linux/spi/cy8ctma300_touch.h (which also existed but wasn't used), unfortunately this didn't help though. Still a no-go on the touchscreen.

Edit2: I created a new defconfig between configurations set for the zeus board and the phoenix board. At the very least, android runs a lot better and there are no crashes. Unfortunately there is still no touchscreen (at all now), but I'll look into it! ><

Some success... The device actually charges now. ><

Edit3: After getting Developer Options working and enabling pointer location etc it turns out that after putting the device in standby and coming out of it again the screen will immediately activate and constantly report touch input from the last place the touchscreen was used. oO

Also, just an FYI for anyone else hoping to use ADB on this kernel - no point wasting your time yet, it doesn't work. :) lol
[Xperia Play Android Development] pedyvirus:
for enabling adb simply flash lupus jb kernel and go to setting and enable adb then reflash 3.4 kernel (touchscreen will work with lupus jb 2.6 kernel so touchscreen issue is not caused by rom as i know)

this will work
[Xperia Play Android Development] Bakisha:
Can you upload kernel? I want to test it :silly:

Or post files you changed, i'll compile it myself
[Xperia Play Android Development] Spizzy01:
I sent you a PM with the links.

I'll upload/post a link on the thread as soon as I make some genuine progress, but for now you're free to test the ones I've created. lol
[Xperia Play Android Development] pedyvirus:
wow great sucses

i found something i didnt test it my self but it should work

run this in recovery

adb shell

su

mount -o remount,rw /system

cd /

echo "persist.service.adb.enable=1" >> default.prop

echo "persist.service.debuggable=1" >> default.prop

echo "persist.sys.usb.config=mtp,adb" >> default.prop

echo "persist.service.adb.enable=1" >> /system/build.prop

echo "persist.service.debuggable=1" >> /system/build.prop

echo "persist.sys.usb.config=mtp,adb" >> /system/build.prop