BigBoot / GW4Remap

Apache License 2.0
202 stars 18 forks source link

v2 Not working on GW6, but v1.0.1 does #22

Open jusxon opened 11 months ago

jusxon commented 11 months ago

Hello,

I was not able to get v2 working on a GW6, went through instructions here. All steps completed successfully, but the long hold action never triggers.

I uninstalled GW4Remap v2 then reinstalled Samsung Pay and installed GW4Remap v1.0.1 and it works fine.

hamid-vasefi commented 10 months ago

Do you have Samsung Pay pre installed? I mean if you long press the back key, does spay open by default?

jusxon commented 10 months ago

Yes, it was pre-installed.

Still using v1 and you can see Samsung pay flash for a second.

hamid-vasefi commented 10 months ago

Samsung pay is pre-installed on my watch too. But it is not accessible, I think due to region restrictions. So if I press and hold the back button, nothing happens. That is why I can not use ver. 1

Unfortunately ver. 2 does not work on my watch either and I can not find any help. 😩😩

stevefan1999-personal commented 8 months ago

It seems like V1 is observing the process list for a certain application to start, kill it, and then start another application to replace it. While this is neat but the V2 method, which monitors the internal Android log (otherwise known as logcat) and find long press event of certain buttons is actually more sensible and versatile. Unfortunately, that seems to be broken and the author of this helper app does not intend to debug and fix it. I will try to fork and fix this in the future.

StuDaBaiker commented 8 months ago

Having the same or similar issue. Disabling bixby removes the option to set the button to anything in settings.

Holding back button will do nothing and holding home will open the power menu

chrisgavin commented 7 months ago

This seems to be likely caused by a change in Android 13 where even apps with permission to read logs trigger a dialog when they try and use this permission. (https://issuetracker.google.com/issues/232206670)

I'm not sure if this dialog is just not implemented on WearOS, or doesn't work properly because GW4Remap triggers log reading from an accessibility background service rather than a foreground app. Either way, a dialog popping up every so often to allow reading logs doesn't seem very practical.

For now I guess you're stuck with the v1 method or someone has to come up with a new technique for detecting the button presses.

koenieee commented 6 months ago

It's actually working after compiling the android application myself. But after a reboot the permission are gone again.

koenieee commented 6 months ago

Hmm, can t get it working again. It didnt ask for permissions anymore

SonOfTheKingdom commented 6 months ago

This seems to be likely caused by a change in Android 13 where even apps with permission to read logs trigger a dialog when they try and use this permission. (https://issuetracker.google.com/issues/232206670)

I'm not sure if this dialog is just not implemented on WearOS, or doesn't work properly because GW4Remap triggers log reading from an accessibility background service rather than a foreground app. Either way, a dialog popping up every so often to allow reading logs doesn't seem very practical.

For now I guess you're stuck with the v1 method or someone has to come up with a new technique for detecting the button presses.

Exactly, I remember perfectly a pop-up inside the app to enable log detection. That pop up happened the first time I installed the v2 app and never again, gw4 has not worked since then

koenieee commented 6 months ago

Yes I made a picture yesterday evening (it's in dutch). It asks to enable log detection. Then it keeps working until you reboot or disable the application.

image

I wanted to write a shell script and start the script via ADB to keep track of logcat and execute an application package when it detects the logline (acutally the G4Remap application). You can use AutoWear to talk via ADB with the watch. Altough I don't have that working at the moment. Was planning on starting the shell script using nohup to keep it alive even after AutoWear stops.

I recompiled GW4Remap and started experimenting with permissions in Android. It looks like it has permission to READ_LOGS, but logcat still isn't working. I changed GW4Remap to check for permission at bootup.

Very weird problem, not sure yet if there are other detection methodes (maybe implement and override the WindowManager inside an Android application, but don't think samsung allows that). Or root your watch and just start a shell script :(