Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Samsung Pay button in region with no Samsung Pay and clicking sound #4

Open
InToSSH opened this issue Jan 17, 2022 · 41 comments
Open

Comments

@InToSSH
Copy link

InToSSH commented Jan 17, 2022

Hello, is there a way to use the Samsung pay shortcut (bottom key - long press) in a region where Samsung Pay is not available? Since it is not installed now even after long pressing the bottom key, nothing happens.

I have also noticed that when the Accessibility service is turned on the watch makes a "clicking" sound every time the screen goes off, is there a way to disable this?

Thank you

@the-badmannn
Copy link

the-badmannn commented Jun 16, 2022

+1, we need to be able to use the Samsung Pay button even in contries where spay is not supported, maybe if the action would be mapped as "long press back button" it will work for others also.

@BigBoot
Copy link
Owner

BigBoot commented Jun 16, 2022

I've changed the detection method for button presses, please follow these instructions and let me know if it works for you:

  1. Uninstall the current version of GW4Remap if it's installed
    adb uninstall de.bigboot.gw4remap

  2. Disable Bixby & Samsung Pay (Skip the ones which are not available for you)
    adb shell pm disable-user --user 0 com.samsung.android.bixby.agent
    adb shell pm uninstall -k --user 0 com.samsung.android.samsungpay.gear

  3. Go to the Watch Settings and select Bixby as action for long pressing the power button

  4. Download the latest v2.0 alpha and install the GW4Remap.apk
    adb install GW4Remap.apk

  5. Grant READ_LOGS permission (if you started the app before granting the permissions you need to restart the watch afterwards)
    adb shell pm grant de.bigboot.gw4remap android.permission.READ_LOGS

  6. Start GW4Remap, enable the service and configure buttons

@victorkuster
Copy link

Can't grant READ_LOGS permission. ADB gives me this error:
The others instructions went flawlessly.

Exception occurred while executing 'grant':
java.lang.SecurityException: Package de.bigboot.gw4remap has not requested permission android.permission.READ_LOGS
        at com.android.server.pm.permission.BasePermission.enforceDeclaredUsedAndRuntimeOrDevelopment(BasePermission.java:448)
        at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermissionInternal(PermissionManagerService.java:1476)
        at com.android.server.pm.permission.PermissionManagerService.grantRuntimePermission(PermissionManagerService.java:1429)
        at com.android.server.pm.PackageManagerShellCommand.runGrantRevokePermission(PackageManagerShellCommand.java:2287)
        at com.android.server.pm.PackageManagerShellCommand.onCommand(PackageManagerShellCommand.java:249)
        at android.os.BasicShellCommandHandler.exec(BasicShellCommandHandler.java:98)
        at android.os.ShellCommand.exec(ShellCommand.java:44)
        at com.android.server.pm.PackageManagerService.onShellCommand(PackageManagerService.java:22442)
        at android.os.Binder.shellCommand(Binder.java:929)
        at android.os.Binder.onTransact(Binder.java:813)
        at android.content.pm.IPackageManager$Stub.onTransact(IPackageManager.java:4730)
        at com.android.server.pm.PackageManagerService.onTransact(PackageManagerService.java:4471)
        at android.os.Binder.execTransactInternal(Binder.java:1159)
        at android.os.Binder.execTransact(Binder.java:1123)

@BigBoot
Copy link
Owner

BigBoot commented Jun 21, 2022

Are you sure you installed the apk that's attached to the last message?

@victorkuster
Copy link

Well, sorry for that!
It seems I haven't cause when redoing the process, with the attached APK, it worked fine!

Great work, btw!

@lordsinasina
Copy link

Hi, Great APP , is it normal that opening an app via back long press is delayed? it takes more than a second for the app to open

@BigBoot
Copy link
Owner

BigBoot commented Jun 22, 2022

Yes I noticed this too, the logs seem to come in very delayed, so the activation is delayed too.
I'll see if I can find a way to improve the response time.

@lordsinasina
Copy link

Yes I noticed this too, the logs seem to come in very delayed, so the activation is delayed too. I'll see if I can find a way to improve the response time.

Legend !

@the-badmannn
Copy link

I don't know why, but it's not working for me at all.

@the-badmannn
Copy link

My bad, it works now, I had to restart my watch for the pm grant command to register.

@blunden
Copy link

blunden commented Jul 20, 2022

A solution without the delay is the app I made after someone on reddit complained about this same issue for those with watches not having Samsung Pay preinstalled. Needs a watch reboot to work.

https://github.com/blunden/SPayToGPay

I didn't mean to advertise it here, but I was looking mentions of the new activity name used by the updated Google Wallet app since GW4 Remap stopped working after the update, and I don't have my computer with me to easily check myself. 🙂

EDIT: Come to think of it, I need to update my app too since it will obviously not work if you install the Google Wallet rebranding update. I'll need to fix that. Done.

Note that it's only for people who can't use the regular GW4 Remap app. I still use GW4 Remap since my watch came with Samsung Pay preinstalled. Basically, the user bases of the two apps are mutually exclusive. 🙂

@blunden
Copy link

blunden commented Jul 22, 2022

Yes I noticed this too, the logs seem to come in very delayed, so the activation is delayed too.
I'll see if I can find a way to improve the response time.

If reading the log programmatically is anything else like reading it using the logcat command, it will dump out the entire backlog, which can be several megabytes of log output. That will obviously take some extra time to parse or even read.

To be honest, the new detection method should probably be reverted since it's a clear downgrade for the majority of us who have Samsung Pay preinstalled. I'll certainly fork and revert it for my own use if it stays in. 🙂

@BigBoot
Copy link
Owner

BigBoot commented Jul 23, 2022

Yes I noticed this too, the logs seem to come in very delayed, so the activation is delayed too.
I'll see if I can find a way to improve the response time.

If reading the log programmatically is anything else like reading it using the logcat command, it will dump out the entire backlog, which can be several megabytes of log output. That will obviously take some extra time to parse or even read.

To be honest, the new detection method should probably be reverted since it's a clear downgrade for the majority of us who have Samsung Pay preinstalled. I'll certainly fork and revert it for my own use if it stays in. slightly_smiling_face

The logcat data is streamed, it's also already pre-filtered, so the amount of logs is actually really low, the problem is rather wearos (rightfully tbh...) limiting the resources for background processes. I've changed things up a bit to do less buffering which overall seems to have improved the reaction times quite a bit. It's still a bit delayed when the watch is busy, but mostly it'll be faster than watching for apps opening, plus it's a lot cleaner implementation wise.

@bbirchman
Copy link

I've changed the detection method for button presses, please follow these instructions and let me know if it works for you:

  1. Uninstall the current version of GW4Remap if it's installed
    adb uninstall de.bigboot.gw4remap
  2. Disable Bixby & Samsung Pay (Skip the ones which are not available for you)
    adb shell pm disable-user --user 0 com.samsung.android.bixby.agent
    adb shell pm uninstall -k --user 0 com.samsung.android.samsungpay.gear
  3. Go to the Watch Settings and select Bixby as action for long pressing the power button
  4. Download the latest v2.0 alpha and install the GW4Remap.apk
    adb install GW4Remap.apk
  5. Grant READ_LOGS permission (if you started the app before granting the permissions you need to restart the watch afterwards)
    adb shell pm grant de.bigboot.gw4remap android.permission.READ_LOGS
  6. Start GW4Remap, enable the service and configure buttons

Works fantastic, impressive work

@sdPhoeniX
Copy link

How about battery draining using logs detection method?
It's reading logs in background using more power, i get it right am i?

@LaurenceGough
Copy link

The delay is so long with the new version sadly I guess this is the best we can do with this watch :( but the good news is it works with Samsung Pay disabled. Sadly Samsung Pay has started to eat battery life without even being used thanks to recent Samsung updates.

Would battery life be impacted by the log reading?

Thanks

@lesleyxyz
Copy link

lesleyxyz commented Jan 6, 2023

For those region locked, may I suggest https://github.com/blunden/SPayToGPay
It works really well.

It pretends to be the Samsung Pay app and opens Google Pay instead of doing monitoring.
Maybe BigBoot can somehow integrate this in his app as well?

@blunden
Copy link

blunden commented Jan 7, 2023

The same app can't do both. It's not possible to install my app on a watch that shipped with Samsung Pay preinstalled.

@Sonofapo
Copy link

Sonofapo commented Feb 16, 2023

The new method works fine (just a bit of delay). The issue I encountered is when using long press to pause my workout in Samsung Health as it will open Google Pay right after. Maybe limiting the detection to the main watchface could be a solution.

I'm not an Android developer but I thought it could be possible to use the same mechanism Samsung Health uses to detect long press (or is this hard coded too?).

Thanks for your work!

@businessvitan
Copy link

Hello!
I don't find any information about how to install apk to watch.
Thank you

@TheBoroer
Copy link

@businessvitan try using this app on your phone:
https://play.google.com/store/apps/details?id=com.geminiman.wearosmanager

Or Google a tutorial on how to install adb on your computer. Then all you need to do is enable developer options on your watch and enable adb and wireless debugging & connect the watch to your wifi

@businessvitan
Copy link

@businessvitan try using this app on your phone: https://play.google.com/store/apps/details?id=com.geminiman.wearosmanager

Or Google a tutorial on how to install adb on your computer. Then all you need to do is enable developer options on your watch and enable adb and wireless debugging & connect the watch to your wifi

I do this.
It's not working for my watch 5 pro :(
Do you have any suggestions?
Thanks

@lesleyxyz
Copy link

@businessvitan try using this app on your phone: https://play.google.com/store/apps/details?id=com.geminiman.wearosmanager

Or Google a tutorial on how to install adb on your computer. Then all you need to do is enable developer options on your watch and enable adb and wireless debugging & connect the watch to your wifi

I do this.
It's not working for my watch 5 pro :(
Do you have any suggestions?
Thanks

If you have watch 5 this repo works good.
If you are region locked AND watch 5 I found this to work good:
https://github.com/blunden/SPayToGPay

@kinsey6
Copy link

kinsey6 commented Mar 5, 2023

Install Easy Firetools from the Google Play store to install the GW4REMAP apk. After installing on watch just launch the app and reassign SPay key. It's just 2 drop down boxes, very easy to setup.

https://play.google.com/store/apps/details?id=de.agondev.easyfiretools

@RichardRadford
Copy link

Brilliant . I used Wear Installer 2 and ADB app and did this from phone to watch.

@PaulMndn
Copy link

Does this still work on Galaxy Watch5?

#4 (comment)

  1. Disable Bixby & Samsung Pay (Skip the ones which are not available for you)
    adb shell pm disable-user --user 0 com.samsung.android.bixby.agent
    adb shell pm uninstall -k --user 0 com.samsung.android.samsungpay.gear

@BigBoot
Is it required to uninstall Samsung Pay? could you also just disable it for the user?
If I decide I want to use Samsung Pay at a later point, can I just reinstall it from the apk path on the watch (on mine it's /system/app/SamsungPayForGear/SamsungPayForGear.apk).
If I reinstall it, does it automatically reuse the kept data and cache (from uninstalling with -k)?

(sorry if that's obvious, I've barely used adb before, but I really want my customized button)

@DreadLord369
Copy link

Does this still work on Galaxy Watch5?

#4 (comment)

  1. Disable Bixby & Samsung Pay (Skip the ones which are not available for you)
    adb shell pm disable-user --user 0 com.samsung.android.bixby.agent
    adb shell pm uninstall -k --user 0 com.samsung.android.samsungpay.gear

@BigBoot Is it required to uninstall Samsung Pay? could you also just disable it for the user? If I decide I want to use Samsung Pay at a later point, can I just reinstall it from the apk path on the watch (on mine it's /system/app/SamsungPayForGear/SamsungPayForGear.apk). If I reinstall it, does it automatically reuse the kept data and cache (from uninstalling with -k)?

(sorry if that's obvious, I've barely used adb before, but I really want my customized button)

I was looking into the same thing and found the answer here:
https://android.stackexchange.com/questions/215313/how-to-reinstall-an-accidentally-uninstalled-app-through-adb

Essentially, the adb shell pm uninstall -k --user 0 command doesn't actually uninstall the app, but simply removes it for the user, so you can "reinstall" it with the following command:
adb shell cmd package install-existing com.samsung.android.samsungpay.gear

I just used this to get mine back after testing.

@nthuc
Copy link

nthuc commented Aug 22, 2023

it work for me

I've changed the detection method for button presses, please follow these instructions and let me know if it works for you:

  1. Uninstall the current version of GW4Remap if it's installed
    adb uninstall de.bigboot.gw4remap
  2. Disable Bixby & Samsung Pay (Skip the ones which are not available for you)
    adb shell pm disable-user --user 0 com.samsung.android.bixby.agent
    adb shell pm uninstall -k --user 0 com.samsung.android.samsungpay.gear
  3. Go to the Watch Settings and select Bixby as action for long pressing the power button
  4. Download the latest v2.0 alpha and install the GW4Remap.apk
    adb install GW4Remap.apk
  5. Grant READ_LOGS permission (if you started the app before granting the permissions you need to restart the watch afterwards)
    adb shell pm grant de.bigboot.gw4remap android.permission.READ_LOGS
  6. Start GW4Remap, enable the service and configure buttons

it work for me

@kinsey6
Copy link

kinsey6 commented Aug 22, 2023

it work for me

I've changed the detection method for button presses, please follow these instructions and let me know if it works for you:

  1. Uninstall the current version of GW4Remap if it's installed
    adb uninstall de.bigboot.gw4remap
  2. Disable Bixby & Samsung Pay (Skip the ones which are not available for you)
    adb shell pm disable-user --user 0 com.samsung.android.bixby.agent
    adb shell pm uninstall -k --user 0 com.samsung.android.samsungpay.gear
  3. Go to the Watch Settings and select Bixby as action for long pressing the power button
  4. Download the latest v2.0 alpha and install the GW4Remap.apk
    adb install GW4Remap.apk
  5. Grant READ_LOGS permission (if you started the app before granting the permissions you need to restart the watch afterwards)
    adb shell pm grant de.bigboot.gw4remap android.permission.READ_LOGS
  6. Start GW4Remap, enable the service and configure buttons

it work for me

What is the delay time from button press to app launch?

@hamid-vasefi
Copy link

Hi, I have a Galaxy Watch 6 and I need your help

In my region, Samsung Pay is pre-installed but it is not accessible. (can not be found in the app drawer, or app list, and will not launch by pressing and holding the back button)

I tried using your app but unfortunately, it did not work. If I install your previous version, since Samsung Pay won't run, the app will not work.

I tried installing your newer version (v2 alpha) but again, it did not work.
The thing is that after disabling Bixby (adb shell pm disable-user --user 0 com.samsung.android.bixby.agent) I can not select Bixby as the action for long pressing the power button!
I'm really looking forward to your kind help.
Thanks

@sebastian-piemob
Copy link

sebastian-piemob commented Sep 13, 2023

wasnt able to use this version with the GW6 classic, the button never triggers gpay, but the 1.0.1 works (shows samsung pay button for 1 second and then changes to Gpay)

@valepe
Copy link

valepe commented Sep 20, 2023

@BigBoot at point 3 of installation you wrote to set Bixby to long press of power button.
Is it necessary? I actually set it to launch google assistant.

Is fixed the long press of back button (#4 (comment))?

@ahmadnassri
Copy link

ahmadnassri commented Sep 23, 2023

I couldn't get this to work (GW4 Classic / WearOS 5) and I also noticed a considerable slow down of the watch UI with the app installed (refresh rate noticeably drops)

@mrg9999
Copy link

mrg9999 commented Sep 26, 2023

GW4 updated to WearOS5 today
Screenshot_20230926_144549_settings

Tried installed both versions and can't get long push button to work anymore?

@NtinosChan
Copy link

GW4 updated to WearOS5 today Screenshot_20230926_144549_settings

Tried installed both versions and can't get long push button to work anymore?

I have the same issue with my gw4 classic. After I updated to OneUI Watch 5 the app just doesn't do what it's supposed to. Any resolutions?

@kinsey6
Copy link

kinsey6 commented Oct 11, 2023 via email

@NtinosChan
Copy link

I'm using v1.0.1and it works like before

On Wed, Oct 11, 2023, 10:44 NtinosChan @.> wrote: GW4 updated to WearOS5 today [image: Screenshot_20230926_144549_settings] https://user-images.githubusercontent.com/7822877/270759069-66b2ff4f-aa52-47cd-9a6e-a15154513a6c.png Tried installed both versions and can't get long push button to work anymore? I have the same issue with my gw4 classic. After I updated to OneUI Watch 5 the app just doesn't do what it's supposed to. Any resolutions? — Reply to this email directly, view it on GitHub <#4 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALWGJQOCUACSYIHZUGT7OVLX62WDXANCNFSM5MEOMN2A . You are receiving this because you commented.Message ID: @.>

I use the app for the back button long press action. v1.0.1 does not have this

@ikkerens
Copy link

I tried the new 2-beta version on my GW6 and having Samsung Pay disabled or using the uninstall command seems to make the app not work for Google Wallet. Have to keep it enabled. This seems to be present on the v1.0.1 version as well.

@Stephan-4711
Copy link

I'm using a watch 5 with one ui 5 wear os 4
The app isn't working at all 😢

@koenieee
Copy link

koenieee commented Jan 6, 2024

I can't get GW4remap version 2 or version 1 working. I can't use the samsung pay trick because it's locked. But still is installed (and totally removing it requires root).
So this isn't also working: blunden/SPayToGPay#4
I'm on wear os 4 with galaxy watch 6, newest updates.

@theLastOfCats
Copy link

3. select Bixby as action for long pressing the power button

I don't have Bixby in my region, can I use it somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests