yashsingh1/xdaforums huggingface dataset:
[Xperia Play Android Development] cyrusalmighty:
Im stuck

First of all, Thank you so much for all your work on this. But Im having some problems maybe you can help. Im stuck at this part in view.smali when adding this dispatchGenericMotionEvent.

You say,"Finnally, insert this lines on the dispatchGenericMotionEvent (in red):

.method public dispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
.locals 5
.parameter "event"

.prologue
const/4 v3, 0x0

const/4 v2, 0x1

invoke-virtual {p0, p1}, Landroid/view/View;->sendTreatAsTouchEvent(Landroid/view/MotionEvent;)I

move-result v1

.line 7184
if-eqz v1, :cond_g

sub-int v2, v1, v2

goto :goto_3b

<<<<< ATTENTION, THIS goto MUST BE EXACTLY THE SAME COMMAND OF THE LAST LINE OF THE METHOD

:cond_g
.line 5597
iget-object v4, p0, Landroid/view/View;->mInputEventConsistencyVerifier:Landroid/view/InputEventConsistencyVerifier;

... ... ... (THE CODE OF THE METHOD) ... ... ...
.end method

Do these red lines have to be put at ".method public dispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z"??

Can it be added at the end?

This is what mine says:

.method public dispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
.locals 6

const/4 v3, 0x0

const/4 v2, 0x1

[COLOR="Red"]iget-boolean v4, p0, Landroid/view/View;->mProcessGenericMotionAsPointer:Z

if-eqz v4, :cond_1[/COLOR]

invoke-virtual {p1}, Landroid/view/MotionEvent;->getSource()I

move-result v4

const v5, 0x100008

and-int/2addr v4, v5

if-eqz v4, :cond_1

invoke-virtual {p0, p1}, Landroid/view/View;->dispatchTouchEvent(Landroid/view/MotionEvent;)Z

move-result v2

:cond_0
:goto_0
return v2

:cond_1
iget-object v4, p0, Landroid/view/View;->mInputEventConsistencyVerifier:Landroid/view/InputEventConsistencyVerifier;

if-eqz v4, :cond_2

iget-object v4, p0, Landroid/view/View;->mInputEventConsistencyVerifier:Landroid/view/InputEventConsistencyVerifier;

invoke-virtual {v4, p1, v3}, Landroid/view/InputEventConsistencyVerifier;->onGenericMotionEvent(Landroid/view/MotionEvent;I)V

:cond_2
invoke-virtual {p1}, Landroid/view/MotionEvent;->getSource()I

move-result v1

and-int/lit8 v4, v1, 0x2

if-eqz v4, :cond_7

invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

move-result v0

const/16 v4, 0x9

if-eq v0, v4, :cond_3

Should I input this line where I highlighted red?(where it says iget boolean v4,p0)? It is line 7770 in Notepad++.
[Xperia Play Android Development] farenheith:
The place is right, but you don't have to replace, just put it above, between the const/4 v2, 0x1 and the red code. You have to insert all these lines:

invoke-virtual {p0, p1}, Landroid/view/View;->sendTreatAsTouchEvent(Landroid/view/MotionEvent;)I

move-result v1

.line 7184
if-eqz v1, :cond_g

sub-int v2, v1, v2

goto :goto_3b <<<<< ATTENTION, THIS goto MUST BE EXACTLY THE SAME COMMAND OF THE LAST LINE OF THE METHOD

:cond_g

Just the "<<<<< ATTENTION, THIS goto MUST BE EXACTLY THE SAME COMMAND OF THE LAST LINE OF THE METHOD" you have to ignore. This is only telling you that you have to look into the end of the method to se what label is used in the last goto. For example, if the last goto is "goto :goto_9f", you have to change the inserted line "goto :goto_3b" to "goto :goto_9f".
[Xperia Play Android Development] drinkypoo:
safe with fxp212?

I want to do this for fxp212, is it safe?
[Xperia Play Android Development] saqibkhan:
Can I use the Touchpad Support v1.1 for SlimBean JB Rom ???? what fix do I download from that page.. CM10 or AOKP JB Version ?? or something else..

IF I multiboot and Install Stock GB on SLot 2 with Turbo Kernel v3.1.. can I boot their and play all my games as normal as I used to when I bought Xperia play.. like the Touchpad would work PErfect rite. ???
[Xperia Play Android Development] ch3mn3y:
first (slimbean) question - i dont know

second - yes. on sdcard rom everything will work like on internal. So on gb touchpads will work like they should

Sent using tf300t - stock 4.2.1
[Xperia Play Android Development] olokos:
Except that roms in internal are always faster than these on Sd card. I have class 10 uhs1 and checked it with benchmark. Try it yourself if you don't believe me
[Xperia Play Android Development] ch3mn3y:
YEa. its right, but he asked if it works not how ;D

Sent using tf300t - stock 4.2.1
[Xperia Play Android Development] saqibkhan:
what about my 1st question... can the SLimbean ROm build.prop be modified to make my touchpads work.

Other idea I have is.. Using GB as Internal.. for Gaming.. and Using Slimbean on 2nd Slot .. as my daily driver.. (No Gaming) .. ANy suggestions ..
[Xperia Play Android Development] clivejefferies:
Yes, just edit build.prop.
[Xperia Play Android Development] saqibkhan:
ok.. I did this.. now my phone does not boot.. after the Turbo Kernel Logo.. I edited build.prop from es explorer.. and saved the file and rebooted.. :( :crying: :crying:

EDIT 1 : Even recovery does not boot now.. I mean only stuck at Turbo Kernel Logo.

EDIT 2 : I reflashed Kernel from fastboot.. even then recovery not showing.. (Heart Sinking started)
[Xperia Play Android Development] olokos:
It's not caused by editing build.prop as it's not possible on our device to access kernel flashing/editing without using fastboot or flash mode. Flash .79 ftf and then flash kernel. When flashing ftf make sure that /system is excluded if you do not want to delete it.
[Xperia Play Android Development] saqibkhan:
is it ok.. if I try to clear system by fastboot.. like wipe system etc.. using the commands.. flash kernel again.. and install SlimBean like I was again..

can you please let me know the Commands for that.. I have removed my memory card to avoid any damage to my data. pictures etc.
[Xperia Play Android Development] olokos:
If you want to get fully clean phone then just flash ftf via flash tool and then flash kernel and rom.
[Xperia Play Android Development] saqibkhan:
no I don't want fully clean phone.. plus I have not used flash tool .. I always used to use fastboot method.. please let me know the commands to wipe the kernel and the system.. so that only these 2 I can wipe. then I will insert my sd card and install Slimbean again from the recovery.
[Xperia Play Android Development] clivejefferies:
What did you change in the build.prop? You only need to change the lines in red. That should not cause any issues.
[Xperia Play Android Development] saqibkhan:
I did change the lines in the red only.. and the last 3 lines.. in which their is something ro.semc.xxxxx.. I didn't have those lines at all.. so I didn't add them .. that's it.. and now phone not booting.. not even recovery booting.. only kernel logo showing.

EDIT : I don't wanna loose my Root. so please let me know a way.. by which I can clean only my system and kernel by fastboot.. and Reinstall again.. without deleting data.
[Xperia Play Android Development] olokos:
Do you even read what I am writing?

Download Flash tool

Download firmware .79

On flashtool use flashmode, select .79 which you downloaded earlier

Tick exclude data before flashing

Flash kernel the way you like

Flash system via recovery

You'll need to use search button or simply go to sticked threads. If you still do not get something then ask but explain what you have done and where you are stuck.

If you are stuck at download flashtool then well, I had to delete what I wanted to write as it may be offensive..
[Xperia Play Android Development] clivejefferies:
I don't know why your phone I'd boot looping, but when I change mine I edit the ones in red, I also add the missing one and that works for me.
[Xperia Play Android Development] saqibkhan:
THanks .. I did the same.. all my data is gone.. I didn't want to flash data (factory settings wipe in recovery) as I wanted to somehow boot in any ROM to just once have access to my messages.call logs, contacts, whatsapp so I can backup.. but I did as you advised.. and all is gone.. ofcourse the DATA on my sd card has NOT ! :( ... I could have done factory settings wipe and install easily.. but that's not what I wanted to do.

EDIT : YES.. I Excluded data.
[Xperia Play Android Development] olokos:
So have you made factory reset in recovery? If yes then that's why you don't have any of your apps anymore cos I'm 99% sure it has wiped data because it always does. It was meant to do it... I've excluded data and it has always worked for me without a problem so I have no idea what have you done.

//not important

Also when you write thanks don't forget to press thanks button, if you were sarcastic then I don't know.
[Xperia Play Android Development] saqibkhan:
i did as u said.. I Excluded Data.. but after Installing .79 ftf.. as u advised.. I Installed Kernel and ROm as mentioned in ur post.. but when the Rom loaded .. their was nothing.. all messages gone.. Call log gone.. Thankfully I had a backup.. but that was of 15 march..

what I was saying is.. I could have done Factory Reset in recovery long time ago without asking all these questions.. I know for sure if I did factory reset.. everything would be fine.. but I wanted to save Data.. that's the reason all this effort.. anyways.. thanks for all the tips n tricks..

Now that my Rom is New.. am gonna try the Build.prop again.. so that anything that goes wrong.. has to go now
[Xperia Play Android Development] olokos:
You didn't get what I meant what I meant by saying data. data = partition /data/ where you have all your apps BUT sms/calls log are in /system/ partition so obviously it has wiped /system/ where the sms and calls were stored as sms.apk and telephony.apk/phone.apk is in /system/ partition so you had no choice in my opinion... Well... You could somehow pull phone/telephony and sms.apk from /system/ but I'm not that good in adb so I'd do it by trying in bootmenu and while trying to boot rom. Factory reset WILL wipe /data/ and MAYBE (I'm not 100% sure) it would also wipe sms/call logs. Always remember - If you are not sure what you are doing - backup. Back in the days when I was a newbie totally I always did that and it has saved my skin.

If you can't understand something I wrote then ask because I'm tired as hell and I could misspell some words or I could have not explained something.
[Xperia Play Android Development] olokos:
Fahrenheit - are you still there?
[Xperia Play Android Development] farenheith:
Yeah, dude. I'm here... but I'm not on a easy time right now... I'm on a new job and sick... my whole time I'm using to work, show my value and try to not collapse with my illness... It's like two or three months so I can get fully cured... So... Sorry if I'm inactive for a while
[Xperia Play Android Development] olokos:
That's fine. I don't even know what's happening with you as all I've heard was what Dan has written long time ago... I hope you will get better. Would you mind posting what's happening to you or at least sending me a PM? Thanks for answering :highfive:
[Xperia Play Android Development] igor_anta:
That's sort of private I guess. Let the man sort out his issues and when he's able I'm sure he'll be back here to help out on whatever he can.

Hope you recover soon farenheith, best wishes. Cheers!
[Xperia Play Android Development] olokos:
I've said "would you mind" which clearly says that he doesn't have to tell me what has happened to him.

Also I don't need any help from him, I'm just curious and interested...
[Xperia Play Android Development] farenheith:
I got Hepatitis A, a tough one
[Xperia Play Android Development] olokos:
I'm sorry to hear this. I thought that your illness isn't that painful but well, I can imagine how painful it is after googling. I hope that you will get well soon!
[Xperia Play Android Development] cyrusalmighty:
Although I do not know much about that, I hope everything turns all right for you. Wish you the best.:)

Darklord Development Team
[Xperia Play Android Development] farenheith:
Why we have to edit the build.prop

Some games look to the build.prop to know if the device is a xperia play. Some important properties, in this case, was not in the CM9 build.prop like it is in the stock, so, those game that does this validation, just think that the device was not a Xperia play... it can cause two colateral effects:

1. The touchpad don't be activated

Some games implement the touchpad on a compatible way with the CM9. Edit the build.prop in this case is enough

2. The circle button be treated like back button

THE CIRCLE BUTTON IS A BACK BUTTON TOO. But, the difference between both is, when the back button is pressed, the ALT key is off. when the circle button is pressed, the ALT key is ON. What the game developers do to know what to do in this case?

IF a back button is pressed AND the device is a Xperia Play AND the ALT key is on,

then the user just pressed the circle button.

Because of this, it's very important that some properties on the build.prop must be like the stock build.prop
[Xperia Play Android Development] MilkyJoePD:
I don't know if you were replying to my question, but if you were I meant why were build.prop values changed from stock to what they've become to need changing back again.
[Xperia Play Android Development] farenheith:
Oh... I misunderstood you.

I think was just a mistake. Happens. There's a lot o things we just know when it's blow up :P
[Xperia Play Android Development] CosmicDan:
Damn, wishful thinking on the events per second thing. I guess its a driver/library issue.

Sent from Xperia Play (R800a) with Tapatalk
[Xperia Play Android Development] farenheith:
I suspect that it wont work, because I tested FPSe playing with the touchscreen and there's no lag...

So... the two input devices is basically the same input type, and the framework.jar treat those inputs generically... so, the only explanation is the driver :/

I tried to change the libinput.so for the one of the CM9... bootloops :(

Edit:

Noo.. now I realize something... I can't change the libinput.so... I'm having serously problem for the disk space, and the fixes I do don't work because of that :(. I flash the ROM and the gapps, I don't know what to do to avoid that... it's only happening on CM10
[Xperia Play Android Development] CosmicDan:
Are you flashing the full gapps? When JBX first came out, I made a mini gapps pack to prevent that. But yeah, we only have ~311MB on /system so I would delete some junk. I suggest doing a fresh install and getting gapps mini I made, it removes Gmail and also Faceunlock data which is a whopping 20MB. Or you can manually delete the faceunlock files yourself, I just can't remember where they are stored (somewhere in usr I think).

EDIT: I guess we could compare the input code between CM9 and CM10 on a source level, it's just crazy amounts of code and I'm only an average developer so it might take a while for me to get my grips on it. So the touchpad lag only occurs on CM10 you are saying?

EDIT2: Maybe we could also check kmesg and logcat when we use touch controls, might find something.... I'll try that now in Lara Croft.

EDIT3: Nope, nothing interesting in logs. But I found this in kernel code, dunno how I missed it before:

#define SYNAPTICS_MAX_N_FINGERS 10
#define SYNAPTICS_FINGER_OFF(n,x) ((((n) / 4) + !!(n % 4)) + 5 * (x))
#define SYNAPTICS_REG_MAX SYNAPTICS_FINGER_OFF(SYNAPTICS_MAX_N_FINGERS, SYNAPTICS_MAX_N_FINGERS)

Looks like the precision (or "resolution") for the input. The 10 possibly means that the touchpad supports multitouch of ten points simultaneously. Wtf? I'll reduce that to 3 and see if that helps. I'll also compile the kernel with debugging enabled.

EDIT4: If you want to take a look, here it is. The function "synaptics_touchpad_worker" seems to be where we want (which uses the values from above) - https://github.com/freexperia/semc-...r/drivers/input/joystick/synaptics_touchpad.c
[Xperia Play Android Development] NeWCuLTKiNG:
Tried the cm10 v2 on first page. Booted this time.

Tried

GTA 3 lost all buttons on gamepad and no touchpads to change radio

dead space no touchpads

COD zombies no touchpads

Dead trigger no touch pads

Will keep trying games
[Xperia Play Android Development] farenheith:
Dead trigger I tried and get touchpads (on CM9)

Did you fixed the build.prop?
[Xperia Play Android Development] CosmicDan:
Yeah dead trigger works in Turbo MIUI too (a user reported), which is based on CM10.

He also reported:

Maybe add a list to the OT of games that are still not working, for future reference we can work on ;)

As for 9mm, ignore that - apparently the game causes a hard-reboot on CM9 too.
[Xperia Play Android Development] farenheith:
Thanks for the gapps tip! I'll reflash the system and use yours mini gapps!

Abour the synaptics touchpad, I think the max number of thingers on stock is 2, so, all the games that uses the touchapd will only need this. But it's a good one you found! I think this can make the touchpad laggy
[Xperia Play Android Development] CosmicDan:
I have the source of 3.0.A.2.181_182 (which I think is stock GB kernel?) and it's still set at 10 o_O
[Xperia Play Android Development] farenheith:
Wow, I need to organize it better xD

Also, I get the touchpad on deadtrigger, but not on GTA too. I think I'll try to figure out how the GTA access the touchpad so...
[Xperia Play Android Development] farenheith:
O.O.

But this apk, a official sony Example can only recognize 2!

Well.. if you want a try on this, it's look like the touchpad is quite quickly in the response, maybe it's because the apk just do this xD. OR, maybe because the .so it's using to do the work
[Xperia Play Android Development] CosmicDan:
Well it might break the touchpad, still compiling (nearly finished) it might be needed at a high number to detect a fine-grain of analog movement/response. Dunno really, we'll see. Regardless, the kernel has debugging enabled so I will share the boot image when it's done if you want to use it to try more games (CM10 kernel).

EDIT: Lowering it to three made it *worse* lol. Touching the pad makes the entire game freeze until you raise finger, then the screen updates at your new random location. Ha! Let's try raising it to 20 then....
[Xperia Play Android Development] farenheith:
ahahah... It's very unexpected. Did you said the last kernel use some GB like routine to the touchpads?

The last FXP, or the last Turbo?
[Xperia Play Android Development] CosmicDan:
Both. Turbo is based on FXP kernel. But the FXP touchpad code is 99% similar to GB code, it has some mutex protection and some other code I don't recognize. I will try using original GB .c file if it works.

Raising that value to 100 had no effect, I'm trying some other random kernel things for a while.
[Xperia Play Android Development] farenheith:
I have an idea... I'll try some game that the touchpads works without the need of any fix, like minecraft, to see if the touchpad lags...

Because... idk... the sony's example, I think the .so of the project make a direct access to the touchpads... if some game use something like this I wonder if it have lag too...

Edit: No lags on minecraft for the touchpads... sometimes I feel a quickly lag, but I think it's not related with the touchpads. It's not like at all what I experienced with FPSe
[Xperia Play Android Development] farenheith:
hitman, you'rE right. The dead trigger not work for me either. But the thing is the game, at least here, didn't recognize the device as a Xperia Play. Maybe we need some more changes on the build.prop... I have to say, I didn't use just the fix of the santiis... I used a edition, on CM9, I did by myself. This is a copy of what I did on CM9... I know somethings is equals to what is already in, but this properties I get from the GB Stock ROM, when I was trying to buy the Lara Croft game and I couldn't until I get this ones

ro.board.platform=msm7x30
ro.build.characteristics=default
ro.build.version.release=4.0.4
ro.build.version.codename=REL
ro.build.version.incremental=UL5_3w
ro.build.display.id=4.0.2.A.0.42
ro.build.id=4.0.2.A.0.42
ro.build.fingerprint=SEMC/R800i_0000-0000/R800i:2.3.4/4.0.2.A.0.42/1f_v3w:user/release-keys
ro.build.date=Tue Apr 24 11:57:09 2012
ro.build.tags=release-keys
ro.build.description=R800i-user 2.3.4 4.0.2.A.0.42 1f_v3w test-keys
[COLOR="Red"]ro.build.product=R800i[/COLOR]
ro.build.host=BuildHost
ro.build.user=BuildUser
ro.build.date.utc=1335261429
ro.build.tags=test-keys
ro.build.type=user
ro.product.cpu.abi2=armeabi
[COLOR="red"]ro.product.model=R800i
ro.product.board=
ro.product.manufacturer=Sony Ericsson
ro.product.brand=SEMC
ro.product.device=R800i[/COLOR]
ro.product.cpu.abi=armeabi-v7a
[COLOR="red"]ro.product.name=R800i_0000-0000[/COLOR]
ro.product-res-path=framework/SemcGenericUxpRes.apk
ro.wifi.channels=

ro.semc.version.cust=1253-3429
ro.semc.version.fs_revision=4.1.B.0.431
ro.semc.product.model=R800i
ro.semc.ms_type_id=AAD-3880119-BV
ro.semc.version.cust_revision=R1I
ro.semc.content.number=PA5
ro.semc.product.name=Xperia Play
ro.semc.product.device=R800
ro.semc.batt.test.min_level=70
ro.semc.version.fs=WORLD-i
ro.semc.rem-roam-icon=1
ro.semc.xloud.supported=true
ro.semc.batt.test.z_threshold=50
ro.semc.batt.capacity=1500
ro.semc.sols.company-code=5
ro.semc.sols.product-code=87
ro.semc.timescape_keys=Sony_Ericsson_Xperia_PLAY
ro.semc.dashboard.xperiaplay=true
ro.semc.wifi.hostapd=1
ro.semc.dashboard.searchuri=http://pss.dl.playstation.net/pss/content/list.html

I'll try edit some properties too see if fix the touchpad recognition on the game

Edit: I get it to work. I'll remake the FAQ, with this new information.. I thought the changes described on the Op of the Santiis thread was enough, but it's not. Also, the brand was wrong there.

What is in red I did change
[Xperia Play Android Development] CosmicDan:
I didn't get anywhere with fixing the lag, no idea what to do from here. Hopefully it will be randomly fixed as CM10 develops, I guess we should focus on fixing other games.

Strange, the user reported deadtrigger touchpads working on my ROM. Unless he's wrong, something here should fix it - Here are my relevant build.prop entries:

ro.product.model=R800i
ro.product.brand=SEMC
ro.product.name=R800i_1253-4437
ro.product.device=R800i
ro.product.board=R800i
ro.product.manufacturer=Sony Ericsson
ro.board.platform=msm7x30
ro.build.product=R800i
ro.build.description=R800i-user 4.0.3 4.1.H.0.4 -z9-3w test-keys
ro.build.fingerprint=SEMC/R800i_0000-0000/R800i:4.0.3/4.1.H.0.4/-z9-3w:user/release-keys
ro.semc.timescape_keys=Sony_Ericsson_Xperia
ro.semc.product.model=R800i
ro.semc.product.name=Xperia PLAY
ro.semc.product.device=R800

I notice you don't have ro.semc.product entries.
[Xperia Play Android Development] farenheith:
Yeah, I think it's the same I just tested out xD. I'll take off the reference to the Santiis thread and put a new info there, more complete

Edit: About the SEMC entries, at least with dead trigger was not necessary
[Xperia Play Android Development] saqibkhan:
FOR AOKP JB Milestone 1-R3 .. I fixed the build.prop.. but not working..

I didn't do the Framework replacement btw.. Should I do dat.. because for Slim bean I didn't..

will the TOuchpad activator help / ??

EDIT 1.. Forgot to Say.. Fahrenheit.. May God give u health and fitness again.. And may you be back to Normal asap... :)

Edit 2 : I replaced the framework.. I updated the build.prop.. and then I Flashed the Rom.. and I installed the Touchpad activator.. but not working still :( .. any idea ??

Edit 3 : when I activate the touchpad using touchpad activator.. I can use the touchpad to move my menu up and down.. and use X and O to Enter or Exit .. But still not working in Fifa 12

Edit 4 : [MENTION=4300205]olokos[/MENTION] [MENTION=4582141]CriGiu[/MENTION] ok.. tested the D pad on Virtua Tennis 4. and the buttons and the Dpad both work.. Also on Cadillacs and DInosaurs.. an old Arcade Game.. Dpad and BUttons both work on that too.. Maybe some probs in setting it up for Fifa. TOuchpad still not working.. but loving this ROM all the more.. all the games NO lag at allllllllllll....
[Xperia Play Android Development] olokos:
You have replaced the framework etc in rom zip which you have flashed afterwards, right? In which game do you have a problem and what problem?