0

I am trying to edit my host file in nvidia shield pro device. Its not rooted and I get read only error when I try to update the host file using adb push. I am a newbie in this. I need to do some url redirecting.

I am not trying to block anything. I have a local Apache server set up and want to redirect the traffic from the shield to my local server for some custom urls.

yonikawa
  • 101
  • 1
  • 1
    No root no hosts file editing. Asking for app recommendations is off-topic here. Please reformulate your question and describe what you want to achieve, especially what type to servers you want to block. – Robert Oct 13 '20 at 17:19
  • As @Robert has said without root, you won't be able to edit it. Asking for app is against the rules, but you should re-phrase your questions to allow others to assist you. – Reddy Lutonadio Oct 13 '20 at 17:36
  • @ReddyLutonadio - Thanks for the tip. I am new here, wasn't aware of the app issue. Updated my question. Please review. – yonikawa Oct 13 '20 at 17:40
  • 1
    Answers from these questions might help you: https://android.stackexchange.com/questions/174515/how-to-edit-etc-hosts-file-in-non-rooted-phone/174520#174520 and https://android.stackexchange.com/questions/78320/how-to-set-up-a-host-to-ip-mapping-on-unrooted-android – Reddy Lutonadio Oct 13 '20 at 17:44
  • 1
    In your case you only need to install a dns proxy on your server that also runs the Apache server. The DNS-proxy usually allows to specify additional entries or override existing entries so that you can map your server to a DNS name of your choice. On Android side you just need to configure the DNS server in your Wifi network to the IP of your server running the DNS-proxy (change the config to static IP address then you can set the DNS server). – Robert Oct 13 '20 at 17:51
  • @Robert - Thank you so much for the response, I am looking into that option as well, I don't feel comfortable messing around with the host files and especially rooting the device. I don't wana brick it. – yonikawa Oct 13 '20 at 18:01
  • @Robert - ok so I installed Acrylic DNS proxy on my server and added the server IP as DNS server on my laptop. But now I cant access internet on my laptop neither resolve the domain names. I have 127.0.0.1 set as localhost in my Acrylic host file, also my apache server up and running on the same port. I can resolve the names in my server and has internet connection though. What am I missing? – yonikawa Oct 13 '20 at 21:01
  • @yonikawa Looks like you are really an absolute beginner. Localhost aka 127.0.0.1 means "local to this host only". A service that runs on localhost is not accessible by any other host by definition! Hence run your web server on all interfaces and use the IP it gets assigned by your router to access it. – Robert Oct 14 '20 at 06:53
  • @Robert: yes this is my first time working with DNS servers and the Acrylic proxy came with this settings and I didn't modify anything. My understanding was that you assign the server IP (that runs dns proxy) as DNS server on the client and then when the client makes the requests, it gets passed onto the dns proxy to resolve the address since the Server IP interface is configured to use 127.0.0.1 as its dns server. So the clients are not directly invoking the proxy but going through the server instead. Am I missing something? – yonikawa Oct 14 '20 at 20:53
  • I am sorry but we are more and more off-topic. Please post a new question on https://superuser.com for how to set-up a computer with web server and DNS proxy. Don't mention that you want to use it from Android because the people there just read "Android" and close the question without really reading it. – Robert Oct 15 '20 at 09:00
  • @Robert, it worked, I just had to configure the settings. – yonikawa Oct 27 '20 at 16:25

0 Answers0