Android TV SDK : Setting Proxy for the Emulator? - android

I have installed the Android TV SDK Developer preview for Windows. I am in a corporate intranet environment. I can start the Emulator, but the main screen endlessly loops with the "Preparing Recommendations" animation. I can navigate to the Settings and see that there is no network (no wired and no ethernet).
I suspect this might be a proxy issue. I have tried launching the Emulator with the following command:
C:\Eclipse_w_Android\adt-bundle-windows-x86-20140624\sdk\tools>emulator -avd AVD_for_Android_TV_1080p_by_Google_X86 -http-proxy http://MY_PROXY_IP:8080
(MY_PROXY_IP is replaced with my company's IP address)
It launches the Emulator but doesn't seem to have any effect on the network.
Has anyone else been able to get the Android TV Emulator to fully load in a heavily firewalled / proxied environment?

I thought I was experiencing this issue as well (and had originally commented as such), but I later realized that there was no actually connectivity problem. Two things to note:
"Preparing Recommendations" will appear indefinitely, and I presume this is simply because there are no apps by default feeding recommendations to populate this screen.
Both the Ethernet and Wireless items will show that they are not connected. However, if you run an app that uses the network (a simple WebView is sufficient as long as the app has INTERNET permissions), you'll see that it connects just fine.
I would suggest trying a test app to check connectivity, as there is no other indicator I can find suggesting that it is working properly. I suspect you'll find that all is well.

you probably forgot the first part username password # server port
your company probably has the ip setup with username password

Related

Android Devices Unable to Consume REST Service on Wifi

Hello there long time reader of Stack Overflow but first time poster,
I am a bit new to android development but we decided to build a Xamarin.Forms app which consumes our ASP.NET REST service. When running the app on an emulator on my computer, connected via ethernet, I am able to connect to the service. However, when running on a tablet or phone that is connected on our work wifi, the connection just hangs and times out.
Interesting enough, when the device is switched to mobile data it can connect to the endpoints again, and iPhones can connect to the endpoints on mobile data or wifi.
I'm curious what I'm missing here. Please let me know what you think or additional information I should include.
While this thread has been opened for some time, we have found our problem resolved: it was a mixture of our network support changing some settings on our routers (though I can unfortunately not remember what settings) and also our tablets do a system update.
I am not sure which of these factors was the cause of our success now but the issue is done. I just wanted to post this in case anyone else ran into something similar.

Unable to intercept traffic of an android app

Recently, I was trying to test and intercept traffic from an app developed on Rhomobile, I setup a proxy with burp, and of course I have installed burp certificate on my device hence I can intercept other apps on my device but I am unable to see the traffic of the app in question on burp suite instead the app works fine and connects to the remote server without even appearing an error alert of the burp suite. in reversing the app I concluded that it is using https protocol to connect to the server. even typically apps targeting android api level 24 and above, a network_security_config.xml should be specified and in my reversing I created that file and set it its location on manifest file but nothing avail. As other researchers would recommend, tried to sniff network traffic of the app with wireshark by creating windows hotspot and connnecting my device to the hotspot, and activated the capture traffic of the wireshark, I was expecting to sniff or even decide whether app is using other protocols, but did not appear any traffic from the app!.
then these questions pop into my mind I would be very pleased if you can clear it.
1. in general, what am I missing? or where else should I look at?
2. specifically Is an app developed on rhomobile is proxy unaware app?
3. if the issue is associated with certificate pinning, typically the alert tab of the burp suite would have shown it, why the app is working fine and connecting to the server while other apps leave an error in the alert tab of burp suite? if I conclude that it is a proxy unaware app, how can I finally intercept its traffic?
any help would be appreciated.
Thanks,

.NET Web service (asmx) which is back end for Android devices does not serve devices from the same IP

Here is the deal... I have created a web service (asmx) which is running a long time consuming procedure in a class and returns the result. The web service is served in my local windows 10 IIS connected to the router with port forwarding. The android device connected to the same router (as the iis) accesses the web service in IIS with the outside IP (my router's IP on the internet - for checking purposes). I noticed that the first device accessing the service is served ok but the second delays big time to be served. Checking the net I found that there is a restriction in serving devices from the same IP. I disconnected one of the devices from the WLAN and everything worked as a charm. Both devices were served in the same time. How can I overcome this problem?
Thanks in advance
Searching the Internet I discovered (there are huge chances that I may be wrong) that this might have to do with the default behavior of DotNet framework which locks the session to the first in first served device:
ASP.NET application to serve multiple requests from a single process
and
Android http connection - multiple devices cannot connect the same server
I suppose that my IIS assumes that the attempt to hit the web service from the second device is another attempt by the same device. I also suppose that it assumes the device to be the same device since it is the same application with the same internal environment hitting the web service and it can't tell that they are two different devices. I tried to reproduce this error and check if I am right by hitting the IP reporting page in IIS from two different tabs of the Mozzila Developer edition browser but it works ok (so I am not sure if it is a session issue). I also found a report that the issue is present only in android devices but it was not clear enough if the server was IIS... The solution mentioned was "incorrect flag on the tcp kernel settings - Reuse connection". Does it tell anything to anyone of you?
If the session lock is indeed the problem is there a solution to make IIS distinguish that there are two devices indeed? Is there a setting in IIS that would change this default behavior of DotNet?
I am sure there is a solution (if indeed the issue is session lock) because I uploaded my code to an on-line server and it works perfect when hitting it from two Android devices. So either it is not a session lock issue or there is a setting that it changes this behavior of DotNet in IIS... Is anyone aware of such a setting?

Android Http proxy using ProxyDroid not working on some applications. Rooted device

I can proxy almost every application but there are some that won't even make a connection when either the system proxy is set via Wlan -> Modify network config or using the Global Proxy setting from ProxyDroid.
I guess these applications are somehow monitoring that a proxy is used even with ProxyDriod on a rooted phone. The applications work as normal when the proxy is turned off. When turned on the applications are not making a single request, they just return an error code. The error code is identical as if Wifi and Celluar data is turned off.
Sample of applications affected:
BankId
Handelsbanken Privat
Facebook - does not throw an error but no requests are shown. If functions like search are used an error is thrown
Mobile used for proxying:
Samsung Galaxy Note 4 SM-N910F
Android 6.0.1
Rooted using CF-Auto-Root
Burp is used as a proxy listener and has been set up using these guides and normal HTTPS sites works without a warning.
https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp
https://support.portswigger.net/customer/portal/articles/1841102-Mobile%20Set-up_Android%20Device%20-%20Installing%20CA%20Certificate.html
What is the most probable way that these applications check if a proxy is used? Has anyone else experienced this and managed to bypass proxy evasion from an Android App?
It seems the applications does not check for a proxy but rather they check the certificate using SSL pinning, which is really great except for my purpose.
More about certificate pinning.
Here is what I did to get it working:
Install CWM custom recovery. I used this guide for this:
http://www.droidopinions.com/install-cwm-custom-recovery-galaxy-note-4-models/
I then followed this guide to install the Xposed framework:
https://devs-lab.com/download-install-xposed-for-samsung-devices.html
Then I installed JustTrustMe from Github:
https://github.com/Fuzion24/JustTrustMe
After enabeling the module and restarting the phone I could proxy every application without trouble.
Here is a great guide for proxying Android applications:
https://secvibe.com/android-appsec-27855dca8531#.ta66ox3di
Note:
I also tried installing Cydia Substrate from Android Play Store and then install the apk for Android TrustKiller. However this did not work for me. From Cydia Substrate I got the error
"Something about your device made it impossible for substrate to
perform its internal safety check; can you please contact saurik via
e-mail?"
Also Android TrustKiller has not been updated for three years.

Android emulator After Wiping Data on Virtual devices unable to connect to 10.0.2.2 net::ERR_CONNECTION_TIMED_OUT

I am using Android emulator for testing. One test contains cookie related mechanism, and to reset (retest) I need to remove existing cookie. I figured I will 'Wipe device' and that should eliminate any cookies and other stuff.
After wipe when trying to navigate to my local machine (http://10.0.2.2:50766/) I started getting net::ERR_CONNECTION_TIMED_OUT. I am running IISExpress running on Visual Studio. I haven't changed anything between wipe didn't even stop debugging session, which is very odd.
Has anyone experienced something similar and knows how to solve it.
UPDATE
I just realized it only works once -> when device first boots and browser is opened -> It goes to google and works ok, can do search and get results. Then when I try to go to 10.0.2.2 it fails, but after it had failed if I try to go back to google on same url it fails.
Figured it out.
I would loose internet only when I hit 10.0.2.2 not just any other site (like yahoo)
Turns out I messed up port while typing manually (50667) instead of (50766). My guess is antivirus would block it for trying to call on something that does not exist because it looks like something is trying to scan ports.

Categories

Resources