[Wear OS App] Enable Google Pay in unsupported countries using Permanent Proxy!

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Simple app to set the built-in proxy setting on a Wear OS device and enable geo-restricted apps like Google Pay in unsupported regions!

Sometimes big companies decide that Geoblocking is a good idea. I don't agree. So that's why I created this Wear OS app to allow users to use their watch as if they were in another country. This means you can use certain payment apps or otherwise geospecific apps wherever you are in the world!

The app uses Android's built-in http_proxy command that turns on a proxy for the whole system and which normally can only be accessed using a computer and ADB Shell. This app however, uses the "ADB over Bluetooth" functionality of the watch to enable the proxy by itself. This can even be turned on at boot!

Installation
Method 1: Download the latest mobile-release.apk from https://github.com/Jolanrensen/PermanentProxy-for-WearOS/releases or from https://labs.xda-developers.com/store/app/nl.jolanrensen.permanentproxy and install it on your Android phone. Next, go to the "Apps on your phone" section in the Play Store on your Wear OS watch. Install Permanent Proxy.

Method 2: Download the latest wear-release.apk from https://github.com/Jolanrensen/PermanentProxy-for-WearOS/releases. Install it on your Wear OS watch directly using ADB.

Get started
To get started, first enable the Developer Options of your watch, which can be achieved by going to Settings -> System -> About and tap the Build number until you are a "developer". Next, go to Settings -> Developer options and enable "ADB debugging" and "Debug over Bluetooth". Finally start up Permanent Proxy, request permission and press "Allow" or "Always allow this Computer" if prompted. After requesting permission, ADB can be turned off again to save battery, unless you want to turn off the proxy completely.

Now you can get started! Simply enter a proxy address and port, enable it (and on boot if you like) and you're done!

Proxy services can be found online and can be from any country. However, do make sure you completely trust the proxy you chose before you enter it! All the data of your watch might be sent through that proxy, even sensitive data, so act at your own risk. I personally recommend strongly to create your own proxy. This can be done easily using the (trial of) Google Cloud. A tutorial can be found below:

Having trouble getting permission?
Some older watches are not powerful enough to get Secure Settings permission by itself using my method. If this is the case for your watch, you will need a PC to grant Permanent Proxy permission. The instructions are also available in the app description.

First make sure to connect your watch to your PC via ADB. You can Google how to do this, there are lots of tutorials. When your watch is connected, use the command

Code:
adb shell pm grant nl.jolanrensen.permanentproxy android.permission.WRITE_SECURE_SETTINGS
to give Permanent Proxy the permissions needed to turn on/edit the proxy.

To turn off the proxy, connect to your PC in the same manner as before, but now you will need the following command:

Code:
adb shell settings delete global http_proxy; adb shell settings delete global global_http_proxy_host; adb shell settings delete global global_http_proxy_port; adb shell settings delete global global_http_proxy_exclusion_list; adb shell settings delete global global_proxy_pac_url; adb shell reboot

How to create a proxy on Google Cloud? (May 2020)

  1. Go to console.cloud.google.com.
  2. If you want to activate the free trial in the top-right corner, you can!

  3. Fill in your information. You can pick your own country. It doesn't matter for the proxy.

  4. Next you can create a new project by clicking here on the top bar, or you can use the default one.

  5. From the sidebar on the (top)left, go to Compute Engine and VM instances:

  6. And let's create a new VM instance:

  7. Fill in the settings. Make sure the region and zone are set to a supported region for Google Pay on Wear OS. A safe bet is always to pick the US for this. For the machine type, just pick the cheapest one. This is fast enough for the proxy.

  8. Next, we change the boot disk...

    ...to, let's say, the latest LTS version of Ubuntu:

  9. After selecting, enable both HTTP- and HTTPS traffic

  10. And, press Create!

  11. Wait for it to load and then we can press "SSH" to connect to the VM. We can also already see the External IP. This is the IP our proxy will have eventually.

  12. This opens up a terminal where we can start to set up the proxy!

  13. Type "sudo adduser squid", enter and then it will create a new user. It will ask for a new password and to retype it. You can pick whatever you like. After this it will ask you for details. Just press enter until you're done.

  14. Next, to add the user, type "sudo usermod -aG sudo squid"

  15. Let's update the packages by typing " sudo apt-get update && sudo apt-get -y upgrade". This might take a bit...

  16. Now let's install squid using "sudo apt-get install squid" and press enter on "Do you want to continue?".

  17. Also install nano, to be able to edit the config, using "sudo apt-get install nano".

  18. Now that squid is installed, let's set it up. Type "sudo cp /etc/squid/squid.conf /etc/squid/squid.conf.bak" to make a backup of the config (If you mess up, you can restore it using "sudo cp /etc/squid/squid.conf.bak /etc/squid/squid.conf"), and to start editing the config, type "sudo nano /etc/squid/squid.conf".

  19. Go to line 1411 by pressing Ctrl, Shift and -, and typing 1411, or use Ctrl+W to search for "http_access deny all". Replace "http_access deny all" with "http_access allow all" to make sure we can connect to the proxy.

  20. Go to line 1907 by pressing Ctrl, Shift and -, and typing 1907, or use Ctrl+W to search for "http_port 3128". Replace 3128 by a random 5-digit number under 65536 (and make sure it's not a commonly used port, for security. Check wikipedia to find out which ports are common.) and note this down. This will be your port for the proxy.

  21. Save the file using Ctrl+O and then press Enter. Next, leave nano using Ctrl+X. You'll end up back on the command line.

  22. Restart squid using "sudo systemctl restart squid" and check if it's running using "sudo systemctl status squid".

  23. Were done here! Type "exit" until the window closes.

  24. Now we need to go to "Setup Firewall Rules. This setting can also be found under VPC network, Firewall rules from the side menu.

  25. For both "default-allow-http" and "default-allow-https" we need to add our port. So for each, click on the name...

    ...hit Edit...

    ...and add the random port you chose before, with a comma in front, after the one already present in the tcp field.

    Save, and then you're done (After you did both).

    You should now be able to connect to the proxy using the Permanent Proxy app. Use the external IP mentioned above and the random port you came up with to connect.
    If there's ever abnormally large usage of the vm or you're getting billed more than expected, quickly change the port to something else, as it might have been indexed by a free proxy website.


Some tips:
  • Create your own proxy. Free proxies might work, but usually they stop working within a couple of days if they work at all. A tutorial can be found above.
  • Proxies with a password don't work.
  • Don't sideload Google Pay on your watch. It should enable by itself.
  • Clearing the data of Google Pay using the settings on the watch also helps sometimes. You can also find remove updates / disable the app there.
  • After enabling the proxy, exit the app, give your watch some time and then check back in the Permanent Proxy app to see whether your External IP has changed to the one you entered as proxy. If so, good job, you're connected!
  • You can make your watch refresh its Google Pay availability check in two ways. Either by setting the IP/port again in the Permanent Proxy app, or by tapping "Home App" in Settings, System, About, Versions.
  • Does Google Pay still not appear? Sometimes you have to enable it by searching Google Pay in the Play Store. You can also use the Pay Enabler app, which takes you to the Google Pay page in the Play Store.
  • Google Pay works if you see the icon in your quick settings.
  • Google Pay gets stuck when adding a new card? Check the Google Play stores for updates for Google Pay.
  • Only cards you can use to pay with your phone in stores can be added to Google Pay on your watch. This means you'll need a card from a supported Google Pay country.
  • Permanent Proxy only works for IPv4 networks. If you're on a network that uses IPv6, in theory, Google can still check your country. Turn off WiFi if you have to.
  • Using a VPN on your phone that routs the internet traffic of the Wear OS app through it is an alternative to Permanent Proxy, but you'll have to turn off WiFi on your watch, only use Bluetooth and keep the VPN on your phone always on.
  • Uninstalling Permanent Proxy will not stop the proxy. Stop the proxy using the app before uninstalling it, or stop the proxy using the ADB command above.
  • Google Pay might not work if your Google account was created in a non-supported country. Try creating a new Google account (or migrating your own) using a VPN to a supported country, like the US (Failing to do so can result in "this app is no longer compatible with your device" on the Play Store at the Google Pay page). Your account is successfully migrated to the US, for example, if you see $ dollars in the Play Store. This must be your main account on the watch.
  • Permanent Proxy might not work if your watch connects to cellular directly.

Thanks to reddit user /u/shadowban!

XDA:DevDB Information
[Wear OS App] Permanent Proxy, App for all devices (see above for details)

Contributors
Humpie

Version Information
Status: Stable
Current Stable Version: 3.8
Stable Release Date: 2020-01-06

Created 2019-10-09
Last Updated 2020-01-06
 
Last edited:

termen

Member
Mar 22, 2009
30
4
38
Prague
www.psmejkal.cz
Hi @Humpie,

wow, good job with that! I would like to try it, but is there any option to also fill login and password? I prefer to pay for some private proxy, but i think all of these services offer just with login/password.

Thank you for your answer!
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Hi @Humpie,

wow, good job with that! I would like to try it, but is there any option to also fill login and password? I prefer to pay for some private proxy, but i think all of these services offer just with login/password.

Thank you for your answer!
I'm looking to see if it's possible but this is entirely dependent on Android itself. To start the Proxy I use the adb shell command "adb shell settings put global http_proxy <address>:<port>", which doesn't allow for credentials. So, if you find how to enable a proxy using adb with password, please let me know!
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Hi @Humpie,

wow, good job with that! I would like to try it, but is there any option to also fill login and password? I prefer to pay for some private proxy, but i think all of these services offer just with login/password.

Thank you for your answer!
Actually, can you try something for me as you might have a proxy with login.
I came across this "<username>:<password>@<yourproxy.com>" being used as address. Maybe this would work as the address?
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Good idea, but i don't have a ":" on my watch keyboard :D
LOL XD. Forgot about that.
Well, I do have a semi solution. If you long press the space bar, you can switch to handwritten mode where you cán type a ":". Good luck XD
But if it works I'll of course add a "username" and "password" option in the app itself.
Edit: if you can't do it on your watch, maybe you could try to type a proxy like this on a Wifi network on your phone! I don't have a proxy with username and password myself so I cannot check, unless you know a free one :p.
 
Last edited:

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
v2.0:
ADB over Bluetooth only needs to be enabled the first time using the app (more battery life yay!)
Way faster proxy switching using WRITE_SECURE_SETTINGS
New amoled black theme with better layout
 

mlenak

Member
Jan 15, 2011
8
5
0
It works!

Thanks! :D Now I can pay with a watch in the Czech Republic. Only port settings cannot be deleted if I enter the port incorrectly. The application data must be cleared and then re-entered.
 
  • Like
Reactions: Joky70

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Thanks! :D Now I can pay with a watch in the Czech Republic. Only port settings cannot be deleted if I enter the port incorrectly. The application data must be cleared and then re-entered.
Great to hear!
And thanks for the feedback, I do notice as well that the app crashes when you submit an empty port, I'll have a look at that. However, you can also just drag the cursor to the end and use the backspace key if you want to change it!
 

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
v2.1:
Possibly fixed proxy not turning off properly. A reboot always turns it off if enable on boot is disabled.
Added clearer loading screen and easier setup

before:
ADB over Bluetooth only needs to be enabled the first time using the app
Way faster proxy switching using WRITE_SECURE_SETTINGS
New amoled black theme with better layout
 
Last edited:
  • Like
Reactions: slonco

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Big update! Better in every way XD

v3.0
Proxy can now properly be turned off
Removed on boot setting as that happens automatically
Easier setup and better layout
Live external IP view
Remember: turning off wifi will make it work better!

before:
Added clearer loading screen and easier setup
ADB over Bluetooth only needs to be enabled the first time using the app
Way faster proxy switching using WRITE_SECURE_SETTINGS
New amoled black theme with better layout
 
  • Like
Reactions: slonco

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
v3.1:
Fixed no-internet crash bug
Added cancel button to requesting permission to please Google

before:
Proxy can now properly be turned off
Removed on boot setting as that happens automatically
Easier setup and better layout
Live external IP view
Remember: turning off wifi will make it work better!
Added clearer loading screen and easier setup
ADB over Bluetooth only needs to be enabled the first time using the app
Way faster proxy switching using WRITE_SECURE_SETTINGS
 
  • Like
Reactions: slonco

vlasevich

New member
Apr 14, 2012
4
0
0
CAn't download app

Hi, can't download app from Play Market, because "This app is incompatible with all of your devices."
My Device Fossil gen 5 (fossil Carlyle HR)
 

tslany

Senior Member
Feb 5, 2007
73
39
48
I cannot download, too, same problem with incompatible on TicWatch Pro. Connected with USB to computer and sideloaded via ADB file from github.
 
Last edited:

Humpie

Recognized Developer
Dec 23, 2010
1,390
347
103
jolanrensen.nl
Hi, can't download app from Play Market, because "This app is incompatible with all of your devices."
My Device Fossil gen 5 (fossil Carlyle HR)
I cannot download, too, same problem with incompatible on TicWatch Pro. Connected with USB to computer and sideloaded via ADB file from github.
Yup I'm aware. I've been trying to explain and change the app in a lot of ways to make Google's software recognize that the app does NOT get stuck at the "requesting permissions" screen. It's completely bonkers that they cannot just wait for 5 seconds. This is the reason it gets blocked from the play store.
Maybe v3.2 will be accepted, who knows. I'll keep you up to date.
Until then you can indeed sideload the Wear version from github on your watch or install the mobile version from github (or XDA Labs) on your phone and the app will appear in "Apps on your phone" in the Play Store on your watch.
 
  • Like
Reactions: kushsingh