jilleb / mib2-toolbox

The ultimate MIB2-HIGH toolbox.
MIT License
585 stars 142 forks source link

Ignore Navigation Active breaks voice command button longpress focus #214

Closed WDuck closed 1 year ago

WDuck commented 1 year ago

After aplying the patch when doing a long push on the steering wheel voice command button AndroidAuto does not get in focus any more. The input of the voice comand itself works as usual but the jump to the AA interface was also a nice feature...especialy if google got something wrong. I have MHI2_ER_VWG13_K4525_MU1367. After removal of the patch the longpress focus thing works again. I was able to decompile the JAR with quiltflower but for someone who did some basic C several years ago Java is some unreadable jibbrisch...at least to me. But im willing to volunteer for testing!

Else thanks for the great work and effort!

olli991 commented 1 year ago

You need to die one death... It's like it is when you install the patch

WDuck commented 1 year ago

Okay, this was not clear to me. Please mark it as a "feature" somewhere. Had not found anny info yet.

andrewleech commented 1 year ago

Yeah this issue hadn't been noticed before so thanks for bringing it up. The patch basically works by breaking some of the interlocks between the mib and AA system so it doesn't surprise me this is knocked out too.

Fixing this case might be technically possible but likely very difficult. Would need to use trace logging and added stack traces to identify the code path being run when the button if pressed and try to find where it hits one of the patched points. Then add an extra flag to a class somewhere that can be set when the button is pressed that can be checked at the point the existing patch works. I'm not likely to have time to work on this myself though sorry.

WDuck commented 1 year ago

The manu for chosing trace types (Navigation, Speech or smartphone etc.) I found already. Also a point in the menü where I could select SD card. But it does not seem to store anything on the card. Maybe I have not put in the right words into google yet but what do I have todo to get the traces written on the SD card?

andrewleech commented 1 year ago

Sorry yeah logging and trace isn't quite that simple. While I've managed to get that built in trace system logging to SD in the past, I'm not sure exactly what steps were required. It didn't help because that trace log is in a proprietary binary format that I was never able to decide.

When I mentioned stack traces I meant adding chunks of extra code into the Java to print out a stack trace once that piece of code it hit. This then only helps if you have a way to view the logs printed by java - depending on how they're printed you can sometimes see then on the mmx uart port wired to the back of the unit.

PS. You don't need to decompile my jar for this patch, the source is published already https://gitlab.com/alelec/mib2-lsd-patching

I've got some other hacks to redirect the Java logs to a temp file but haven't properly documented it yet. I've put some notes on it here: https://gitlab.com/alelec/mib2-lsd-patching/-/wikis/home

WDuck commented 1 year ago

Okay, luckylie I did the patching "by foot" for the first time when these neat toolboxes where not availible yet -> I have a wiring setup where I can acces the mmx uart port on my desk. When I have some time I will have a look into the last way you mentioned because out of my perception this is the most convinient - if it works. Could then be addet as a feature to the toolbox that alters the startup.sh to turn logging on and off.