[Q] google-maps-not-working-on-android-emulator-behind-proxy - Android Software/Hacking General [Developers Only]

We have a proxy server running in our institute which requires authentication. While I can run my browser in the emulator after providing the proxy settings, I cannot run any other application which requires internet connection. I am developing an app. and I would like to know if there is a way to provide proxy settings ( for my app, or all apps ) so that I can get google maps working. I know that there was a bug, but is that fixed by now or is there some hack which tries to overcome that problem? It would be of great help even if I can get a local solution i.e access google maps from my app, not necessary that all apps which require an internet connection run.

You could try running the adb emulator with the -http-proxy option in case you are not doing this already. Otherwise, you could look for proxy settings within the emulator. Best way, though, is probably to use an actual device as the emulator can sometimes be buggy + it's definitely slow.

i have tried with the command line options but it didn't work, i don't hv an android phone so the second options not there for me. As already mentioned I had set the proxy settings in the emulator but that's not working with maps etc. Only browser works...Any help will greatly be appreciated.

Related

Google Scoreboard

Have any developers used the new Google Scoreboard app? I like the idea but the app isn't great and I'd like to write my own. I would like to be able to work out how it getting the data - is there an obscure hidden webservice it is getting it's data from?
I have tried several different things to try to determine the data source. I have monitored my wifi router traffic whilst the phone is on wifi only - but I can't see any http info from the logs. I have tried using the android emulator with the market and the scoreboard app running and using the Fiddler http debugger - but android apps won't use the proxy settings (only the browser does) so Fiddler cannot monitor the requests.
Has anyone got any ideas?
Any luck
Hi Kevin,
Did you have any luck with Google Scoreboard?
I read somewhere that it used Yahoo sports for the data, but haven't managed to verify this myself.
--Neil

[TUTORIAL] Unlocking Restricted Apps on Play Store

For people who lives in the restricted countries, this is a free and root-less way on how to bypass and download country restricted apps and games in Play Store without modding the Play Store app itself.
First of all,
i. Create a secondary google account on your PC.
ii. Leave 'Mobile phone' blank.
iii. Choose United Kingdom as location.
iv. In the next page, you will then add in you phone number for verification.
Next, on you phone, got to Settings>General>Accounts>Add Account>Existing, sign in with you new google account.
After all are done, go to Settings>Connections>More networks>VPN and tap the + sign.
Key in the following:-
Name : BestUKVPN
Type : PPTP
Server Address : BestUKVPN.com
Tick PPP encryption (MPPE)
and tap Save.
To connect, tap on the VPN you've just created :-
Username : free
Password : *the password changes everyday, go to w w w . bestUKVPN . c o m to get the password*
Then, go to Settings>General>Application manager and locate Google Play Store. Tap on it and tap Force Stop, Clear Cache and Clear Data accordingly.
Next, Go to your Play Store and choose your secondary account.
Viola, restricted country apps are available for download!
Unless you country is supported by Google Wallet, you can only download the free apps and games.
Enjoy!
No need for a second account, u can either kill PStore or just restart the machine. It will (re)authenticate the session to a different server (hence, country).
There are easy ways to block this as well, it is just a matter of time to be honest.
However, this method is very loaded, you are opening a VPN for all the connections, there are way better methods for this, i.e Per APP VPN, why make the whole system use a slow connection when you can only have a list of apps that will use that connection. ProxyDroid is amazing, but requires root, i think it supports VPN-s as well .
PlutoDelic said:
No need for a second account, u can either kill PStore or just restart the machine. It will (re)authenticate the session to a different server (hence, country).
There are easy ways to block this as well, it is just a matter of time to be honest.
However, this method is very loaded, you are opening a VPN for all the connections, there are way better methods for this, i.e Per APP VPN, why make the whole system use a slow connection when you can only have a list of apps that will use that connection. ProxyDroid is amazing, but requires root, i think it supports VPN-s as well .
Click to expand...
Click to collapse
Yes there are apps that provides fast and free VPN as well but most of the apps limits your usage, therefore not very efficient. You can switch off the connection once after the restriction is opened and use a faster connection, i.e wifi. And also this doesn't require root.
dayat710 said:
You can switch off the connection once after the restriction is opened and use a faster connection, i.e wifi. And also this doesn't require root.
Click to expand...
Click to collapse
yup confirmed, play store doesn't seem to care about the source location for as long as it authenticates on a country that has the service enabled.
It would be really nice though to have an app that does not require root and can handle a list of apps, and use the proxy/vpn only for that specific list. i guess iptables play a role here.
I tried using my first account which is registered in Brunei and use VPN, cant get thru the restrictions.
I also found out using MarketAccess/MarketEnabler *requires root* and set it to UK/US, I can browse apps/games in Samsung Apps, without the need of VPN. But also could not buy any apps or games unless I have a bank account outside my country.

Custom WebView build

Hoping someone with development experience can give me help here:
Would it be difficult to make a modified build of AOSP WebView client so that when an app tries to open an internal WebView it forces the link to be opened in an external browser or even not open them at all?
This post on Coderwall reflects it's possible, but it's way above my head.
This is a parental control concern for me. Many apps that aren't web browsers actually give you access to a web browser if you're smart enough. Typical method: go to an apps privacy policy page, click a few links till you get to google.com or twitter.com. From there you can get to anything.
Alternate solution might be to block internet access of the WebView Client system application, but allow the rest individual apps to still access internet. E.g., give an app internet but stop it from accessing internet thru an embedded webview browser.
Any help is much appreciated!

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

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.
(Google removed this ability sadly)
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.
Wear installer can also be used:
Wear Installer makes it easy to sideload Wear OS apps again
A new app called Wear Installer makes it easy to sideload apps on your Wear OS smartwatch using your phone. Read on to know more!
www.xda-developers.com
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)
Go to console.cloud.google.com.
If you want to activate the free trial in the top-right corner, you can!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Fill in your information. You can pick your own country. It doesn't matter for the proxy.
Next you can create a new project by clicking here on the top bar, or you can use the default one.
From the sidebar on the (top)left, go to Compute Engine and VM instances:
And let's create a new VM instance:
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.
Next, we change the boot disk...
...to, let's say, the latest LTS version of Ubuntu:
After selecting, enable both HTTP- and HTTPS traffic
And, press Create!
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.
This opens up a terminal where we can start to set up the proxy!
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.
Next, to add the user, type "sudo usermod -aG sudo squid"
Let's update the packages by typing " sudo apt-get update && sudo apt-get -y upgrade". This might take a bit...
Now let's install squid using "sudo apt-get install squid" and press enter on "Do you want to continue?".
Also install nano, to be able to edit the config, using "sudo apt-get install nano".
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".
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.
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.
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.
Restart squid using "sudo systemctl restart squid" and check if it's running using "sudo systemctl status squid".
Were done here! Type "exit" until the window closes.
Now we need to go to "Setup Firewall Rules. This setting can also be found under VPC network, Firewall rules from the side menu.
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
@mods, sorry for the duplicate posts, the website is just incredibly slow when creating a thread. This is the right one. I tried to delete the others but it didn't work.
Humpie said:
@mods, sorry for the duplicate posts, the website is just incredibly slow when creating a thread. This is the right one. I tried to delete the others but it didn't work.
Click to expand...
Click to collapse
I have removed all your duplicate threads. Next time, use the Report Post system. Your @ mention didn't do anything.
:good:
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!
termen said:
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!
Click to expand...
Click to collapse
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!
termen said:
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!
Click to expand...
Click to collapse
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?
Good idea, but i don't have a ":" on my watch keyboard
termen said:
Good idea, but i don't have a ":" on my watch keyboard
Click to expand...
Click to collapse
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 .
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
It works!
Thanks! 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.
mlenak said:
Thanks! 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.
Click to expand...
Click to collapse
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!
mlenak said:
Thanks! 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.
Click to expand...
Click to collapse
I'm also from CZ, but i was not able to set up with credentials (nordvpn) - how you did it?
Thank you for help
termen said:
I'm also from CZ, but i was not able to set up with credentials (nordvpn) - how you did it?
Thank you for help
Click to expand...
Click to collapse
I used a free proxy from Poland without login ( free-proxy.cz ). I don't know if it's safe, but it works.
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
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
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
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)
I cannot download, too, same problem with incompatible on TicWatch Pro. Connected with USB to computer and sideloaded via ADB file from github.
vlasevich said:
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)
Click to expand...
Click to collapse
tslany said:
I cannot download, too, same problem with incompatible on TicWatch Pro. Connected with USB to computer and sideloaded via ADB file from github.
Click to expand...
Click to collapse
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.
Any proxy suggestions...tried a few but none worked.

Recommended apps/ways to help managing elderly people's Android phone remotely, from being scammed?

Hi,
What's your recommended apps/ways to help managing elderly people's Android phones remotely?
It's getting harder and harder for my parents to follow the fast-changing pace in the smart phone world.
Instead of trying to check and teach them through video links, or ask them to manually activate Teamviewer quicksupport every time (black screen on privacy screens),
is there any good apps with good reputation for this purpose?
Mainly I wish it could start up on power on and can wait for connection without manual activate service.
List installed apps and allow me to uninstall unwanted apps, maybe update apps as well.
Able to prevent apps being installed would be great.
Able to add phone numbers to blacklist/whitelist of phone calls / SMS.
Open source one would be preferred. Paid apps are ok.
Best Regards,
Try this
adbLink2 v5.5
adbLink2 is companion software for Android devices Features: Install Programs without Android SDK ADB/Fastboot enabled command-line Busybox for root and non-root Built-in WIFI/USB remote Manage devices via USB or IP address Root-aware File...
forum.xda-developers.com
Thanks. I might give this a try. Also I found boomerang parental control and Google family link might be useful .

Categories

Resources