1. Are you ready for the Galaxy S20? Here is everything we know so far!

Android Studio - no Internet connectivity when using "run-as"

Discussion in 'Android Development' started by wxguy, Mar 27, 2020.

  1. wxguy

    wxguy Lurker
    Thread Starter

    Hi -
    I am creating an app using Android Studio on my MacBook and need Internet connectivity. When I start up Studio, then install my app which starts up the emulator, then "adb shell" from my MacBook terminal. At this point I have Internet connectivity in that I can do "ping abcnews.go.com" and get packages back. However, when I do "adb shell", then "run-as com.example.myapplication", I find that "ping abcnews.go.com" no longer works. (note: I need to do "run-as ..." in order to have chmod capability). I will add that a search online showed that if I start my emulator up with "emulator -avd Pixel_3a_XL_API_29 -dns-server 8.8.8.8", it gives me Internet capability, even after starting "run-as ...", however, this makes me go through a "...r.cloudfront.net" server which looks to be an AWS server. So I'm wondering why I lose Internet connectivity after starting "run-as ..." in adb shell? I'd rather not go through that AWS server if I don't have to. TIA for any information anyone can provide on this.
     



    1. Download the Forums for Android™ app!


      Download

       
Loading...
Similar Threads - Android Studio Internet
  1. Dazzycoffee
    Replies:
    0
    Views:
    151
  2. WinchestStoke
    Replies:
    0
    Views:
    146
  3. Fabrizio Ferrari
    Replies:
    0
    Views:
    338
  4. Tony Gabriel
    Replies:
    1
    Views:
    321
  5. AlexEv
    Replies:
    0
    Views:
    307
  6. yesumani
    Replies:
    1
    Views:
    413
  7. testDev
    Replies:
    1
    Views:
    249
  8. testDev
    Replies:
    0
    Views:
    281
  9. Paul Lynch
    Replies:
    0
    Views:
    182
  10. Ivashu
    Replies:
    0
    Views:
    377

Share This Page

Loading...