Git Product home page Git Product logo

Comments (24)

hvdwolf avatar hvdwolf commented on September 5, 2024

Someone mentioned here that a Russian modder modified the original steering app.

See also this post to contact the guy who paid that Russian modder.

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

Wow, it sucks, we pay for android units a fortune and in the end we get blocked by the system. The default application of the steering wheel buttons is completely messed up.

But I thought of something, your application allows you to change the name of the packet when you press the voice button. In this settings you can only link a new package name. But if we could do as for the option BAND or DVD put a SHELL command with the command "input keyevent 231" supposed to open the voice assistant. I have not yet tested with adb what would be the result of this order on my device. In case carkit listens to this key, do you think it would work?

But is there a reason that you can’t put a shell command option to each parameter button instead of just the BAND or DVD button?

thank you

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

You can put a shell command there and also an intent.
You have 3 options: package name, intent, external command.
First select the first option being the Call method.
Screenshot_20220727-140704

And when you have pressed "Band key: call method", you can select out of the 3 options
Screenshot_20220727-140716

Not only that: it is fully described in the Readme.

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

No, I mean it's only available in the BAND and DVD menu. (I already using the BAND for my radio, and I don't have any DVD button in the steering wheel app)

Capture d’écran 2022-07-27 142624
Capture d’écran 2022-07-27 142956
Capture d’écran 2022-07-27 143107

is there a reason why there is no intent and command line method in the other buttons ?

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

No reason at all.
You are the first to ask. I built it as I also had that in my Xposed modules, but when I released it nobody was interested. it is really simple to copy & paste it. I will have a look

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

I tried to connect to the device with ADB but it never managed to get detected. I know that the ADB connection works on my computer because I was able to try the command on my android TV successfully. So I couldn’t try the command on the CC3.

Yet I enabled USB debugging in the developper options. even windows doesn’t detect anything. Is this something normal on FYT models?

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

Check the XDA FYT forums.
There is so much info there which I won't repeat in this issue as it is off-topic.

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

Okay... After several hours of going around in circles, I finally gave in and I guess there is no button to activate the Siri function.

In the meantime I finally managed to access adb (wirelessly) and I came up with a solution that is completely awful and I'm not proud of it. But it works.

simulate a long press on the carplay screen to trigger Siri, not the best idea. but still safer than looking on the screen where to press while driving.

var=$(dumpsys activity recents | grep 'Recent #0' | cut -d= -f2 | sed 's| .*||' | cut -d '/' -f1) ; if [ $var == 'com.syu.carlink' ]; then input touchscreen swipe 20 600 20 600 900; else echo Not in carlink; fi

I have the command but I still have no way to test it other than adb because I don't have the run in shell option from the other buttons in your app and i don't have the two buttons BAND and DVD.

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

Started working on making the BAND button functionality for all buttons. Probably this weekend.

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

Please try this new 1.60: https://mega.nz/file/RFtnkD6b#VbE533uNFQE7GvNwuOJauzBXCz_ElryTZf8rgE6Fwts
As I don't have buttons on my unit anymore I can hardly test.

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

Hi ! So I tested the version 1.60 that you sent. and for some reason it doesn't seem to work

compressed_ums512_1h10_Natv-2022-07-29-17-52-44.mp4

I can start app from the package name but it doesn't seem to execute the command, something is clearly happening since carlink flickers (probably it turns into a black screen when the app is not in the foreground)

EDIT: it happens no mater the shell command, I tried "input keyevent 3 "and same thing

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

it seems that the call option has no effect and it still tries to launch it by package name

compressed_ums512_1h10_Natv-2022-07-29-18-49-41.mp4

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

I see. I will have a look at it agan this weekend.

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

It is a bug in the BAND functionality, but as I now copy & pasted it, it is now a bug for every key.
As it was not a 100% copy & paste, it is now manually a lot of repair work.

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

And now a complete restructure. Please test.
https://mega.nz/file/QEUFzTyA#Uyg8xU4rhnDVEHRG7e7OLDbvJUH2nyjiO8gHvdGqLDc

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

Unfortunately it seems that it still doesn't work, the commands are executed, "reboot" restarts the device well, but the other commands like "input keyevent" don't work, difficult to explain and to see on the video. but when you press the button it looks like the screen freezes in front of a transparent

the command should open the voice assistant. In ADB shell on my computer it works without any weird screen hanging

compressed_ums512_1h10_Natv-2022-07-30-14-55-47.mp4

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

Hi, I may have found a simpler solution. I created a script on Termux that interacts with adb and does all the commands I want.

I have read about the Termux intent (still quite complicated to understand) and I managed to make it work on another application (key mapper) but on yours I have a little trouble here is the command in shell :

am startservice --user 0 -n com.termux/com.termux.app.RunCommandService
-a com.termux.RUN_COMMAND
--es com.termux.RUN_COMMAND_PATH '/data/data/com.termux/files/home/scripts/adb_swipe'
--ez com.termux.RUN_COMMAND_BACKGROUND 'true'

in termux it does exactly what I want, how should I write it in your app ?

Thanks

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

I don't know. I spent quite some time on it this weekend and I simply can't make it work. I know it worked in older versions, but that was on the PX5 (Android 8.0) and the sc9853i (Android 8.1). Maybe the Android 10 is now behaving differently due to increased securty measures, but I actually don't know and I can't find it either on Google or the Android Dev site.
It is also a complete mystery for me.

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

To be honest, I don't understand much about java or android at the moment. Probably this year we'll see it in more detail at my computer science university. But I found some documentation about the Termux app and its possible calls.
I don't know if you have already looked at it:

RUN_COMMAND-Intent
Termux Tasker

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

I fly totally blind, not understanding anything about java or android studio, but with the documentation I managed to test how to send intents. I don't know if it works on other devices than the android studio emulator because I don't even know how to export the apk without errors when I install it in another machine ahaha

compressed_reallyap-.-MainActivity.java-.reallyap.app.main.-2022-08-06-12-41-17.mp4
                Intent intent = new Intent();
                intent.setClassName("com.termux", "com.termux.app.RunCommandService");
                intent.setAction("com.termux.RUN_COMMAND");
                intent.putExtra("com.termux.RUN_COMMAND_PATH", "/data/data/com.termux/files/home/test");
                intent.putExtra("com.termux.RUN_COMMAND_BACKGROUND", true);
                intent.putExtra("com.termux.RUN_COMMAND_SESSION_ACTION", "0");
                try{
                    startForegroundService(intent);
                    Snackbar.make(  ̶v̶i̶e̶w̶ , "intent sent", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();}
                catch (Exception e) {
                    Snackbar.make(  ̶v̶i̶e̶w̶ , e.getMessage(), Snackbar.LENGTH_LONG)
                            .setAction("Action", null).show();

EDIT : I managed to integrate it to the existing FytHWOneKey application, I installed it on my head unit and miracle it works! For the moment it opens only termux it's not great but it's just a question of interface to be able to put the arguments that we want.
I haven't found any other alternative to execute shell commands directly and it's still not perfect

compressed_FytHWOneKey-master-.-Utils.java-.FytHWOneKey-master.app.main.-2022-08-06-19-15-45.mp4

from fythwonekey.

gzsrdfhxrsd avatar gzsrdfhxrsd commented on September 5, 2024

Hello, it seems to me that the DVD buttons and the EQ button are generally useless in the application, instead of them there should be other buttons such as: aux, src, settings, voice control, 360, video, in order to be able to hang a specific application on them. Sorry for my English.

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

If you have a 7" or 8" unit, you have hardware buttons including an EQ button. Some units also have built-in DVD players with a DVD-button. My PX5 did have that.

I will not further develop this app. My last 2 units don't have buttons so my app is completely useless for myself.
It is open source, so you can continue to develop it.

from fythwonekey.

hvdwolf avatar hvdwolf commented on September 5, 2024

EDIT : I managed to integrate it to the existing FytHWOneKey application, I installed it on my head unit and miracle it works! For the moment it opens only termux it's not great but it's just a question of interface to be able to put the arguments that we want.
I haven't found any other alternative to execute shell commands directly and it's still not perfect

I think you did a great job, but this is really for your specific case. Some other terminal apps support the same, but of course with different call mechanisms.
However, it should not be necessary. So far it worked on Android 8.1 and below. Like said: I have no idea whether this is a new security policy in Android and I can't find it either.

Like also mentioned in above post: I will not further develop this app. My last 2 units don't have buttons so my app is completely useless for myself.
It is open source, so you can continue to develop it.

from fythwonekey.

noenic avatar noenic commented on September 5, 2024

Hello, it seems to me that the DVD buttons and the EQ button are generally useless in the application, instead of them there should be other buttons such as: aux, src, settings, voice control, 360, video, in order to be able to hang a specific application on them. Sorry for my English.

I think the application just uses the same package name as the unit. So you just have to create a new fake package name linked to the application. I don't know how to do it but looking in the source code I think we can find it, for the moment my problem is to integrate it in the GUI

I think you did a great job, but this is really for your specific case. Some other terminal apps support the same, but of course with different call mechanisms.
However, it should not be necessary. So far it worked on Android 8.1 and below. Like said: I have no idea whether this is a new security policy in Android and I can't find it either.

I think that with the last version of android the security concerning the shells commands have been secured.
Some command like "reboot" still works but you can't expect much from "sh", only solution I think would be to root the device.
For the moment, I've worked around the problem by using the run in the background service of termux and it works pretty well, since it works I haven't touched the code too much even if it's far from being optimal

Like also mentioned in above post: I will not further develop this app. My last 2 units don't have buttons so my app is completely useless for myself.
It is open source, so you can continue to develop it.

No problem, thanks a lot for the help and for the application, if one day I have the time and the desire I will make a fork fixing the intent option and adding the work around of termux to launch terminal scripts

from fythwonekey.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.