Timeline for How to edit 'etc/hosts' file in non-rooted phone?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 12, 2023 at 8:50 | comment | added | gdesilva | I am running LOS 18.1 and I was able to edit the /etc/hosts file by using the above method - ie. enabling root access for developer mode and running adb remount command. Cannot understand why the post has been voted down. I agree it may not work on all ROMs but worked OK for me. | |
May 9, 2017 at 14:00 | history | edited | berbt | CC BY-SA 3.0 |
Add information about method not working for most ROMs
|
May 9, 2017 at 13:55 | comment | added | berbt |
@iBug same as my previous comment: most likely a LOS thing. nano is in /system/xbin/nano . vim--version (in /system/xbin/ too, no vi alias) says it was "Compiled by tpruvot@CyanogenMod".
|
|
May 9, 2017 at 13:43 | comment | added | berbt | @Izzy just borrowed a phone with stock Android to confirm and yes, it seems to be a LOS thing. I didn't flash the root package. I'll modify my answer and the question title to reflect this fact. | |
May 9, 2017 at 13:19 | comment | added | iBug |
Also, how can you get nano ? cat is all that you've got. Android does not even ship with a basic vi .
|
|
May 9, 2017 at 13:18 | comment | added | iBug | adbd cannot run as root in production build. | |
May 9, 2017 at 12:46 | comment | added | Izzy | Huh? On LOS root is only available if you flash the additional root package, which OP doesn't want to (i.e. "Root access = ADB only" cannot be achieved). So how should your steps work without root if they require root? Could you please clarify? | |
May 9, 2017 at 11:52 | history | answered | berbt | CC BY-SA 3.0 |