Hardware Android JoyCon Lag

Does this happen to you?

  • Yes

  • No


Results are only viewable after voting.

igloo

Member
Newcomer
Joined
Jan 3, 2018
Messages
5
Trophies
0
XP
65
Country
Switzerland
Forgive me for being a complete noob about this but here is my thought process so far.
1. I was thinking of downgrading my s7 firmware to 4.0 but that is apparently impossible given the s7 came with 6.0 stock.
2. Since samsung is bad about AOSP, I try to modify the stock rom somehow without having to build from source. I think I may have to root my phone for this part to gain access to the .h file as I still have been unable to find it (with a root file browser from ASUS). I have no idea if this will work and I will need to give myself write access to these files.
3. Flash a custom rom like lineage OS and either see if the Bluetooth works natively, or fiddle with the files from there.
4. Flash a modified samsung source rom?
Is there anything else I should try? Which would be the best way to go about this? I'm going to start with number 2 first.
Someone would probably have a way easier time with this on a different device since samsung is notoriously closed off to modding, so please feel free to try what @igloo suggested above and let us know what happens.
It is possible to directly edit the ssr max latency default value in bluetooth.default.so.

Search for the hex-values B1 F5 48 7F 88 BF 4F F4 48 71 and replace with B1 F5 48 7F 88 BF 18 21 00 BF

If that doesn't work, try searching for B2 F5 48 7F 88 BF 4F F4 48 72 and replace with B2 F5 48 7F 88 BF 18 22 00 BF

This probably only works with Samsung (tested with Note 4 and S6).
 

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
It is possible to directly edit the ssr max latency default value in bluetooth.default.so.

Search for the hex-values B1 F5 48 7F 88 BF 4F F4 48 71 and replace with B1 F5 48 7F 88 BF 18 21 00 BF

If that doesn't work, try searching for B2 F5 48 7F 88 BF 4F F4 48 72 and replace with B2 F5 48 7F 88 BF 18 22 00 BF

This probably only works with Samsung (tested with Note 4 and S6).

The first one works for me on my Galaxy S7. Thank you very much man ! :D
 

pikpol

Well-Known Member
Member
Joined
May 13, 2009
Messages
326
Trophies
1
XP
1,858
Country
Netherlands
It is possible to directly edit the ssr max latency default value in bluetooth.default.so.

Search for the hex-values B1 F5 48 7F 88 BF 4F F4 48 71 and replace with B1 F5 48 7F 88 BF 18 21 00 BF

If that doesn't work, try searching for B2 F5 48 7F 88 BF 4F F4 48 72 and replace with B2 F5 48 7F 88 BF 18 22 00 BF

This probably only works with Samsung (tested with Note 4 and S6).
I can confirm it also worked for my HTC HTV31
The first line "B1 F5 48 7F 88 BF 4F F4 48 71" could be found and replaced it like you said.
The second couldn't be found.
Works like a charm now, thanks!
 

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
WAIT IT WORKS?! I tried replacing it in my phone hex editor but still had lag. Which emulator, what am I doing wrong? Oh my god, if it works @igloo is the hero we need but don't deserve

Yes, it really works !
I copied the file on my internal storage, edited it with a hex editor, copied it back, set the right permissions (rw-r--r-- iirc) and rebooted.
After that, it worked flawlessly regardless of the emulator I used (even in the homescreen, the navigation was fluid) :D

Be sure to make the modifications on the internal storage because my hex editor didn't want to save on my SD card. Also, make a backup if anything goes wrong you will still be able to put back the original file through your recovery (if you have a custom one).

Other than that I don't know why it didn't work for you :/
 
  • Like
Reactions: StraightArrow

StraightArrow

Member
Newcomer
Joined
Apr 9, 2018
Messages
7
Trophies
0
Age
26
XP
55
Country
United States
Yes, it really works !
I copied the file on my internal storage, edited it with a hex editor, copied it back, set the right permissions (rw-r--r-- iirc) and rebooted.
After that, it worked flawlessly regardless of the emulator I used (even in the homescreen, the navigation was fluid) :D

Be sure to make the modifications on the internal storage because my hex editor didn't want to save on my SD card. Also, make a backup if anything goes wrong you will still be able to put back the original file through your recovery (if you have a custom one).

Other than that I don't know why it didn't work for you :/
I found out that I actually hadn't edited it lol.

I just want to say oh my god @igloo thank you so much. My gf gave me joycons to use on my phone as a birthday present, so you just made my birthday present come true basically haha. I want to spread this info so others can finally have this working. I have a small youtube channel, but I will make a video tutorial and spread this with others (of course crediting you as the fix creator). And I want to say sorry guys for not being more help. I am literally so new to all of this, but I appreciate it as a learning experience. Thank you @MK73DS for telling me what .h files were haha. Anyway, glad to finally have a fix and I'm excited to see lots of people make mini switches out of their phones now.
Again @igloo you have made a lot of people's dreams a reality here. Fan-freaking-tastic work.
:toot:
 
  • Like
Reactions: MK73DS

StraightArrow

Member
Newcomer
Joined
Apr 9, 2018
Messages
7
Trophies
0
Age
26
XP
55
Country
United States
@igloo can you let me know how you knew where to change the values? In my hex editor, all the values we changed corresponded to weird numbers and symbols. I guess I just want to know how you troubleshooted and edited these elements
 

igloo

Member
Newcomer
Joined
Jan 3, 2018
Messages
5
Trophies
0
XP
65
Country
Switzerland
@igloo can you let me know how you knew where to change the values? In my hex editor, all the values we changed corresponded to weird numbers and symbols. I guess I just want to know how you troubleshooted and edited these elements
I disassembled the file with Hopper Disassembler. Samsung was so nice to include debug symbols with all the function names in bluetooth.default.so on the Note 4 :)
In the bta_hh_read_ssr_param procedure I looked for the MOV instruction that assigns the value 800. The patch modifies the MOV instruction to assign 24 instead of 800 to the register.
 

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
I disassembled the file with Hopper Disassembler. Samsung was so nice to include debug symbols with all the function names in bluetooth.default.so on the Note 4 :)
In the bta_hh_read_ssr_param procedure I looked for the MOV instruction that assigns the value 800. The patch modifies the MOV instruction to assign 24 instead of 800 to the register.

Why 24 specifically ? Why not simply 0 or 1 (if 0 does not work) ^^
 

shadowofdarkness

Well-Known Member
Member
Joined
Apr 17, 2007
Messages
536
Trophies
1
XP
2,263
Country
Canada
Thanks to this info I was successful with modifying the file on my Samsung Galaxy S 5 running a old version of Android 4.4.2
Neither option matched so I used Google to figure out how to disassemble the file with GDB and find the range of offsets that dealt with bta_hh_read_ssr_param. I didn't understand what each of the multiple mov lines did. So I just used a hex editor and did a less specific search for 4F F4 48 (since even the start of the search strings provided never had any hits) and found one result in the same offset range from the disassembly that had a 70 as the last number. I changed those all to 18 21 00 BF and rebooted. Then tested a Joy-Con and everything worked.


Update: I have found one problem, when I eventually got around to trying my Pro Controller I found that it still has the normal lag. Why would it not be affected by this fix.
The fix is working because when I swap back to a Joy-Con it works without lag.
Has anyone else actually tested a Switch Pro Controller?
 
Last edited by shadowofdarkness,

igloo

Member
Newcomer
Joined
Jan 3, 2018
Messages
5
Trophies
0
XP
65
Country
Switzerland
Why 24 specifically ? Why not simply 0 or 1 (if 0 does not work) ^^
24 is the minimum latency of the controller, it can't transmit faster. Setting it to anything below 24 should work too, since it will disable ssr as well. The Samsung EI-GP20 gamepad also sets HIDSSRHostMaxLatency to 24.
 
  • Like
Reactions: MK73DS

Joneidy

Well-Known Member
Newcomer
Joined
Nov 16, 2015
Messages
47
Trophies
0
Location
MA
XP
239
Country
United States
24 is the minimum latency of the controller, it can't transmit faster. Setting it to anything below 24 should work too, since it will disable ssr as well. The Samsung EI-GP20 gamepad also sets HIDSSRHostMaxLatency to 24.

Could you edit my bluetooth.default.so file? it is from a Pixel 2 Running Oreo. Thanks in advance (I`m trying to avid building from source). I was not able to find the hex codes.

Link is here: https://mega.nz/#!K2ggQBoA!lAGVQalFhQkwJsn1RVjUJ2Dt1b3M1kV30pi2bB2SiiA
 

pizzaforfree

New Member
Newbie
Joined
Mar 1, 2017
Messages
2
Trophies
0
Age
29
XP
53
Country
United States
Running a Moto G5 Plus (XT1687) with custom ROM (AOSPExtended 5.4), OS is Oreo. Hex fix didn't work. And a warning to anyone that wants continued support and connection to certain apps (such as Netflix, Pokemon Go, Animal Crossing Pocket Camp, and others), this fix will fail SafetyNet checks, and they will not be available.
 

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
Running a Moto G5 Plus (XT1687) with custom ROM (AOSPExtended 5.4), OS is Oreo. Hex fix didn't work. And a warning to anyone that wants continued support and connection to certain apps (such as Netflix, Pokemon Go, Animal Crossing Pocket Camp, and others), this fix will fail SafetyNet checks, and they will not be available.

Thanks for the warning but personally I don't care because I never use bluetooth on my phone, except now for some emulation thanks to the Joycons :)
 

unvaluablespace

Well-Known Member
Member
Joined
Aug 3, 2014
Messages
134
Trophies
0
Age
40
XP
1,411
Country
United States
Wow! This is an amazing find! Not only did applying this fix the lag on my Note 5 with my joycons, but also my Switch pro controller, and Dualshock 4 controller as well. Thanks so much!

Does anyone know if it would be possible to create an app that could easily apply this sort of fix for anyone, or any device?
 

MK73DS

Non-commutative algebra
Member
Joined
Feb 23, 2015
Messages
575
Trophies
0
Age
25
Location
France
Website
www.youtube.com
XP
1,536
Country
France
Wow! This is an amazing find! Not only did applying this fix the lag on my Note 5 with my joycons, but also my Switch pro controller, and Dualshock 4 controller as well. Thanks so much!

Does anyone know if it would be possible to create an app that could easily apply this sort of fix for anyone, or any device?

The fact that every phone has a different file, it will be difficult to make an universal app. Also, it should request root permissions, and if your phone is rooted you probably have enough knowledge and skills to do this by yourself :D

But if someone decides to make such an app, it would still be very great :D
 

pizzaforfree

New Member
Newbie
Joined
Mar 1, 2017
Messages
2
Trophies
0
Age
29
XP
53
Country
United States
The fact that every phone has a different file, it will be difficult to make an universal app. Also, it should request root permissions, and if your phone is rooted you probably have enough knowledge and skills to do this by yourself :D

But if someone decides to make such an app, it would still be very great :D
This is very different from app development. This has a set of instructions, app development is creating the instructions with nothing but some key words.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan
    I rather enjoy a life of taking it easy. I haven't reached that life yet though.
    BakerMan @ BakerMan: "I'm cheating on you with your hamster's cousin's owner's dog's favorite tree" +1