yashsingh1/xdaforums huggingface dataset:
[Xperia Play Android Development] farenheith:
Someone reported Nova 3 working well on JB.

The touchpad activator will not change the way the game see device, so, the buttons problems will not be solved. What ROM are you using?

Also, send us your build.prop, maybe there's something else to edit not informed here.
[Xperia Play Android Development] Dany XP:
CM9.1 FXP151 (but with kernel from 149, becasue from 150 kernel doesn't boot)

Do i have just copy and past here my build prop or send it somewhere?
[Xperia Play Android Development] CosmicDan:
You can do it yourself. Look at the OP.
[Xperia Play Android Development] Dany XP:
Edit canceled (double post)
[Xperia Play Android Development] CosmicDan:
If it's a stock ROM and doesn't work already, it probably won't work. Ask the ROM developer to sort it out, he needs to add some Xperia Play files. Why use a Neo ROM port anyway?
[Xperia Play Android Development] farenheith:
I finished the CM10 fix.

You guys can downlaod here.

BUUT... I have some problems to make it work.

Was an error in what I did in the framework.jar, yes, but I have some problems when I tried to push the file to /system/framework... adb said to me that the system doesn't have enough space... so, I removed the wallpapers apk (Now I think the best is remove another one :P).

After flash it, I tested the Lara croft the guardian of light, and the touchpad works okay. I think that the games was a little laggy, Idk if this have some relation with the fix or with the CM10 itself.

If you guys try some other game, please, tell me so I can update the thread. If anyone have some troubles with it, tell me too :)

About the Neo's ROM, I can't do that... I couldn't deodex the Sony XPlay ROM, so the same will happen with this one. As CosmicDan said, the best is try to mix some files of the Xplay Stock ROM

Edit1: Yes, the lag is about my fix. It's only happening when I put my finger on the touchpad :/. I'll see if can make it better
[Xperia Play Android Development] farenheith:
Alright guys!

Finished the tests I need to do with JB. The framework.jar uploaded on the last post will be the one for now to the CM10.

THE FIX IS A LITTLE LAGGY ON THE JB. I tested it on the lara croft game.

I tried a relevant change on the implementation, and the lag was still there, so, I'm pretty sure the fix doesn't cause the lag. The problem is related with the interaction of the CM10 with the touchpad... I can't say exactly why.

The last fix is more stable, so I'll keep it for now.

Please, if anyone try this fix, give me a feedback about your experience. It's very important we get the best of this mod.:cool:
[Xperia Play Android Development] CosmicDan:
CM10 is generally more laggy in every game, even before your fix. It helps to use tweaked lmk values and overclocking, but the best performance increase is to use Chainfire 3D Pro and set custom options for a certain game like lower texture resolution (but don't do it globally, because JB is HW accelerated everything looks like crap). So I think it's related to graphic drivers, maybe the fact that JB needs triple buffering and/or the fact that JB is fully rendered on the GPU. The Adreno chip in this device isn't very powerful.

For all those interested, I'm uploading a new version of Turbo MIUI now with the touchpad fix, working Camera, and some other tweaks/fixes.
[Xperia Play Android Development] farenheith:
I see....

But I can say one thing, you can look at it to make sure: when you use the touchpad, the lag is worst. I tested with FPSe.

Without use the touchpad, my FPS was 60.

When my fingers touch on it, the FPS fall to 42. So... I think there's some routine to be optimized about the touchpads.

I'll push the original framework.jar to make a test right now

Edit1: Yep... When I use the touchpads, the FPS decrease even without the fix :(. i tested it on FPSe.
[Xperia Play Android Development] MGSBigBoss:
How come on dead space the touch pads won't work but buttons do after flashing the fix?
[Xperia Play Android Development] CosmicDan:
Damn, that's a kick in the nuts. Must be the input manager, perhaps there is some way to modify the driver to poll for input events less often. Or something like that, if you get me.... lower the resolution of the touch input for example. I also use Micro CPU Monitor which shows a little CPU usage bar in the corner (even while in games) and if I am setting at desktop and touch the touchpads, the CPU usage ramps up to max like crazy.

I remember there is a tweak that apparently enables smoother scrolling when touching the screen by raising the events per second (or something), maybe if I reduce that to a tiny amount it might also affect the touchpads, I'm not sure if that's a graphical thing (window manager) or input driver thing. I'll check it out.

Also, I just discovered that Chainfire 3D driver no longer works on latest CM10 :( installing the driver results in being stuck on kernel screen and you have to manually restore your ROM libs.
[Xperia Play Android Development] farenheith:
I don't know xD.

I'll upload the list of compatible games. Maybe I'll need to take a look on this game to try to discover how it access the touchpad. Probably it's another incompatible method with CM0 to use it.

Please, answer me some questions:

1. What ROM are you using?

2. The touchpad or the buttons was working before the fix with this game?

3. What fix did you used? CM9 or CM10 fix?

4. Do you have some other game that now the touchpads is working?
[Xperia Play Android Development] farenheith:
But which input have more resolution? The touchscreen or the touchpad?... I'll check it out and try some touchscreen game to see if I get some lag.

And... one more thing. the processor is not overloading with the touchpads :/ I used the developer options too see... Maybe is some delay on the code... Idk how the CM10 drivers is doing, but I read on some sony article about the touchpads that his driver run on the same thread of the game. So... if the CM10 driver is doing the same, then some sleep in the code can throw down the device performance.

EDIT: The touchpad have more resolution:

I/InputReader( 320): Device reconfigured: id=8, name='synaptics_touchpad', surface size is now 967x361, mode is 2

I/InputReader( 320): Device reconfigured: id=10, name='cy8ctma300_touch', surface size is now 480x854, mode is 1

EDIT: And CosmicDan, I'm having a really bad time with the disk space of the system ¬¬. I'm reflashing the ROM with the fix already inside because I have deleted the galaxy4... the camera app, I suppose. Even I deleting the framework.jar before, it's look like the system need 2 x the size of the file of free space to be able to copy it. Do you know any solution to this?
[Xperia Play Android Development] CosmicDan:
Yeah that's right, but sorry I'll clarify - I mean timing resolution, polls-per-second. Which yeah, would be a driver thing.

Ah well it must be Turbo kernel, because it ramps CPU up on touchevents (to simulate a project-butter like experience) - my mistake.

Maybe we can help it by putting in a sleep/wait line somewhere in the framework, but if it's above the driver level it might actually sleep on sending the events instead of only on the input poll cycle i.e. if we reduce it by a third somehow, it might read touchpad at same timer but only send the touch event every 1/3 of the time, resulting in movement stutter. I've read some articles on doing it specific for game code though to reduce lag on input events, so maybe it can be done above the driver (in smali code).

Where though, is the question.
[Xperia Play Android Development] farenheith:
Where we have to change the code?

Well, the interaction with touchpad on the JB trigger the onGenericMotionEvent.

I'll take a look where the dispatchGenericMotionEvent is been called.

Plus, the lag only occurs when we touch the touchpad, so... when it s on a idle/wait state, there's no lag... so... maybe exist some state control to try to optimize the precision of the touchpad return this code certainly will call the dispatchGenericMotionEvent, directly or indirectly (Hope is directly), and maybe is there we need to change.

Edit:

Eight ocurrences :). Hope this is the way:

android\app\Activity.smali(1388): invoke-virtual {v0, p1}, Landroid/view/Window;->superDispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
android\app\Dialog.smali(620): invoke-virtual {v0, p1}, Landroid/view/Window;->superDispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
android\service\dreams\Dream.smali(292): invoke-virtual {v0, p1}, Landroid/view/Window;->superDispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
android\view\View.smali(11351): invoke-virtual {p0, p1}, Landroid/view/View;->dispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
android\view\ViewGroup.smali(1374): invoke-virtual {p2, v3}, Landroid/view/View;->dispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
android\view\ViewGroup.smali(1393): invoke-virtual {p2, p1}, Landroid/view/View;->dispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
android\view\ViewGroup.smali(6359): invoke-virtual {v0, p1}, Landroid/view/View;->dispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
android\view\ViewRootImpl.smali(1411): invoke-virtual {v5, v0}, Landroid/view/View;->dispatchGenericMotionEvent(Landroid/view/MotionEvent;)Z
[Xperia Play Android Development] CosmicDan:
Interesting. Is the dispatchGenericMotionEvent used also for the touchscreen though? I assume so. Regardless, I think a good place to start would be to compare the methods with those matching lines to the stock GB framework, I'll give that a go if you want to try digging/experimenting elsewhere.

FYI, I read into AOSP Touch Device Configuration and also the kernel file for the synaptics_touchpad driver, nothing interesting there. Though the FXP kernel has some mutex protection that the original GB kernel doesn't have.
[Xperia Play Android Development] farenheith:
The dispatchGenericMotionEvent is called for every event that is not a....

KeyEvent

TrackBallEvent

PointerEvent

PointerEvent, actually looks internally and can dispatch a Touch or a GenericMotion Event.

I did a quick read, but a touchevent will never be a genericmotion, unless I understood something wrong. The only possibility if after the fix :P

And my hopes ends here:

android\view\InputEventReceiver.smali(121): .method private dispatchInputEvent(ILandroid/view/InputEvent;)V

I think the code is very balanced and I just came where all the inputs begins, while was analysing. All the way I did looking the code doesn't seems to me to have any performance problem. I can be wrong, I did a quick look, but I think the problem is in the .SO that detect the interaction.

Maybe the .SO, when we are touching the touchpad, deliver events like crazy, and the event queue just get giant, and the lag begins.

Maybe we can block some touchpad events to do all the way just in the beginning. It'll not be very beauty but maybe works :P. Something like...

In the dispatchInputEvent, we can make this:

If the event is a touchpad event, then {

if static_touchpad_counter == 0 then {

the event will be delivered

}

static_touchpad_counter++

static_touchpad_counter /= 3 //Considering that we'll send 1/3 of the events

}

The dispathInputEvent of the InputEventReceiver looks like where all the processing begins, so, this will prevent of 2/3 of all the touchpad event been processed.

Edit: Well... I done for today xD. The thing is: the first and last event cannot be ignored... this two are the "down" and "up" events... just the "move" events we can do that... so... one more condition on the idea... I'll get some sleep because when I start with it I don't want to stop :P
[Xperia Play Android Development] CosmicDan:
Yeah get some rest.... well I am setup to compile CM9 from source, not sure about CM10; plus id need to find the code to look. Seems to be tricky there, because if FXP didnt fix it already then it must be complicated.

Sent from Xperia Play (R800a) with Tapatalk
[Xperia Play Android Development] gopin:
Im using a ftf that vokal shared a while back. (i guess it really is not a port) This and official beta are the only stock roms ive tried that have working wifi tethering. personally i prefer 4.0.4

Thanks anyway,

Nice work guys
[Xperia Play Android Development] farenheith:
I'm pretty sure you can get wifi tethering on another ROMs, I was using it myself.

The last time I used it, I was with the Sony ICS Beta, but I do believe the Markphyton ROM must have it working too.

Also, I think the CM9 have it's working either, but I really don't remember if I used it on those ROMs too.

Now, I'm on CM10 and I want to stay on it at least until I can solve this touchpad lag, that we are discussing. But I'm pretty sure you can find some information about the wifi tethering on the CM9 thread or on the Markphyton thread, or you can ask there.

If the wifi tethering on CM9 is working, and you choose it, then you can use this fix to get a better touchpad support. The fix to CM9 is quite stable and easier to put than the CM10 one.
[Xperia Play Android Development] farenheith:
DEVS!

As you can read on the last posts, while I was porting the fix to CM10, I found a bug on the CM10 about a lag with the access to the touchpad.

CosmicDan give the idea of do the framework process just 1/3 of the events coming from touchpad, so with this we expect that the lag will disappear.

My implementation of this idea is a workaround, but maybe will work. The class android/view/InputEventReceiver is the first class where the touchpad event will pass inside the framework (If I analyzed it right). So, I'm trying to identify the event there and , with a static counter, make less touchpad events be send foward.

The rules to make this is:

1. if the event source is the touchpad

2. if the event action is 2. Move, if I understood right. Because the down (touch) and up (untouch) is too important to be ignored

3. If the static count = 0

So, the event will be foward just if the three conditions is true. if condition 1 and 2 is true, regardless of the condition 3, the static count receive this operation:

static_count = (static_count +1) mod 3. So, it'll varying between 0 and 2.

I'm trying to make the code work, but I'm getting bootloops right now, probably because something I did wrong. If someone more experienced want to help, this is the code:

.method private dispatchInputEvent(ILandroid/view/InputEvent;)V
.registers 5
.parameter "seq"
.parameter "event"

.prologue
.line 170
sget v0, Landroid/view/InputDevice;->SOURCE_TOUCHPAD:I

invoke-virtual {p2}, Landroid/view/InputEvent;->getSource()I

move-result v1

if-eq v0, v1, :cond_b

:cond_c
iget-object v0, p0, Landroid/view/InputEventReceiver;->mSeqMap:Landroid/util/SparseIntArray;

invoke-virtual {p2}, Landroid/view/InputEvent;->getSequenceNumber()I

move-result v1

invoke-virtual {v0, v1, p1}, Landroid/util/SparseIntArray;->put(II)V

.line 171
invoke-virtual {p0, p2}, Landroid/view/InputEventReceiver;->onInputEvent(Landroid/view/InputEvent;)V

.line 172
:goto_e
return-void

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

move-result v0

const/4 v1, 0x2

if-ne v0, v1, :cond_c

sget v0, Landroid/view/InputEventReceiver;->TOUCHPAD_COUNT:I

const/4 v1, 0x1

add-int/2addr v0,v1

const/4 v1, 0x3

rem-int/2addr v0,v1

sget v1, Landroid/view/InputEventReceiver;->TOUCHPAD_COUNT:I

sput v0, Landroid/view/InputEventReceiver;->TOUCHPAD_COUNT:I

if-eqz v1, :cond_c

goto :goto_e
.end method

My changes is the if-eq v0, v1, :cond_b and all that is after the return-void. This is the declaration of the TOUCHPAD_COUNT:

.field private static TOUCHPAD_COUNT:I = 0x0

Thank if anyone can solve that

Edit:

OMG I WAS ****ING SUFFERING TO EDIT SMALI ON THE TEXTPAD AND I JUST FOUND THIS: here.

Very helpful, indeed e.e

Now I could boot with a modified framework.jar, as described, but I get an error, I will analyze what still wrong. Anyone who want to play with smali, this is a real helpful solution!

Edit2: I did the change... but doesn't help. I'm done with it for now...
[Xperia Play Android Development] gopin:
Thanks for answering :)

WiFi tethering on cm9 and beta works fine. I know for fact.

But non of the stock ics 4.0.4 ports that we have for play have that feature working. I know that for fact too (i tried all of them) ;)

Odd thing, markphyton don't admit it's not working in his rom. :rolleyes: so he won't work on it.

I like stock for now. I'll just jump to cm10 when tethering gets fixed.

Thanks
[Xperia Play Android Development] farenheith:
I have to insist :P.

I really don't know about the tethering thing, but the CM9 is smoother than the stock, and with this fix I'm working on you can get the touchpad work on more games. I really don't know how much games because I need more tests :(.

So, I think is good to try out
[Xperia Play Android Development] MilkyJoePD:
Why were build.prop values changed in the first place?
[Xperia Play Android Development] farenheith:
Oh, you're in cm9, so.... The Nova 3 is reported to work both on ICS and JB. I'm pretty sure this is a build.prop problem, bro. You can do whatever you find better, but the best in my opinion is attach so you don't make a long post.

Yeah, actually he already edited, but still not working... I suspect that some change is missing or some details is wrong, idk.
[Xperia Play Android Development] Dany XP:
There you go. https://www.box.com/s/4f6x2vn8ug131fsh8iks
[Xperia Play Android Development] farenheith:
Looks like you edited almost all properties, not only the red ones. Did you do this trying to make the game works? Do you have other games recognizing the gamepad?

Looks like everything is okay... Maybe if you add the SEMC properties, idk... this ones:

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

But you're not suppose to need this, but I'm out of ideas :/

Edit: Maybe the downloaded version vary according to the device, so... *maybe*, if you uninstall the app and download it again from market will work like it must be in XPlay
[Xperia Play Android Development] Dany XP:
I know man, it's weird...and i think (not sure) that even in fxp147-148 i had no problems, with your fix...other games works fine, they recognize my phone as Xperia Play. At this point i think the problem is the game. I will try to add those lines and re-install the game. Where do i have to add them? At the end of beggining ( in build.prop?)
[Xperia Play Android Development] farenheith:
Yeah, actually I just edited my post suggesting it xD. If you download from market again, maybe will work.
[Xperia Play Android Development] farenheith:
You can put it whatever you want, but I think it's more organized if you paste it after this line: # end build properties
[Xperia Play Android Development] Dany XP:
Nothing. Still the same. This time the phone doesn't reboot itself though....

MAybe it's the game? That seems strange because last update on Play Store is 9 November...i think last time i played was AFTER that time, and it was ok...but i dont remember in what rom i was...
[Xperia Play Android Development] farenheith:
Actually, as far as I know some apps can offer different versions to download depend on the device you're using, that's why I thought download the app after edit the build.prop and reboot could work.

I didn't understand what you mean "This time the phone doesn't reboot itself though". Do you mean you got bootloops after editing the build.prop? If yes, well, those SEMC properties can't give bootloops. If you edited the file in Windows, maybe is some problem with line-terminator. You can try to use textpad to edit the file
[Xperia Play Android Development] CosmicDan:
Change permissions of build.prop to 644 (rw-r--r--). If it's *anything* else it will fail to boot. You need to reboot for build.prop changes to work. Also, delete all files in /data/property/ to make sure phone re-sets properties from build.prop file (just in case - that's like "clear property cache").
[Xperia Play Android Development] Dany XP:
I wrote it in first reply. I mean the first time i had bootloop in installing game, very strange. But i don't think it's related, never happened again.

No clue...
[Xperia Play Android Development] Dany XP:
Well, guess what. I just flashed NXT Rom 1.3 , wich is astock 2.3.4 based rom and still same problem.

So i guess the problem is really the game. Very weird that nobody notice this, even in the official nova 3 thread...??? someone can confirm?
[Xperia Play Android Development] farenheith:
mmmm....

That's really weird... maybe they took off the XPlay support. But you said the last update was in november, no? Maybe the last update was later, but you was flashing some ROM, reinstalling the app so you didn't notice?
[Xperia Play Android Development] Dany XP:
I didn't play tha game for some time now...

and btw, i just read the most recent comment on play store from a xperia play user:

I'm going to search ver 1.0.3 and see if it works...
[Xperia Play Android Development] igor_anta:
Actually someone mentioned that they completely removed touchpad support from Nova 3, but for the life of me I can't remember in which thread that was. It's a bit of an idiotic move though, why would they do that :(
[Xperia Play Android Development] Dany XP:
Ironically, with farenheit fix, touchpads are the only thing working, lol. D-pad and other buttons are not recognized.

And more ironcally if u see the changelog of 1.0.4 says: "Various bug fixes and more devices supported" lol

But i gotta say, the game seems more smooth that last time i played...
[Xperia Play Android Development] farenheith:
That's really bad news... if the game never had xperia play support was one thing, but they just took it off? What a shame! I think you guys that bought the game must send some mails to the Game loft support. You paid for a game with xperia play support and now that take it from you. It's a total disrespect against the customers rights!
[Xperia Play Android Development] Dany XP:
Gues what? Just installed ver. 1.0.2:

Everything works as it should be...damn u EA Mobile...
[Xperia Play Android Development] farenheith:
It's the same with Dead Space. You need a lower version to get touchpad working. I think EA did a update, but I don't know if this new version got XPlay support again... it's a shame... dude, there's no reason to took off this support!

They just put a damn condition there to validate the device manufacturer and model and done! If the device is not the XPlay the app just don't pass through this code! Damn... there's no mistery, there's no conflicts, and there's no damn code update to this!

Please, guys! Complain with Gameloft. This problem there's nothing to do with custom ROMs and will happen with stock ROM too. I think every XPLay owner that bought this game must mail them or worse for each one that is so revolted as me, but I didn't buy the game so I don't have the right to complain with them... sigh

It's so frustrating while we trying to keep our device alive those companies just took off functionalities without reason just abandoning us...
[Xperia Play Android Development] igor_anta:
No need to blame EA in this case Dany XP, Nova is not theirs, it's a Gameloft release :)

Dead Space from the Play Store was never Xperia Play optimized, we had a special version from the EA online store. So the update actually doesn't matter that much, you have to get the correct version of the game.
[Xperia Play Android Development] olokos:
I will repeat 3rd time. Vice City doesn't use touch pads to switch radio...