Tuesday, June 18, 2019

How to edit 'etc/hosts' file in non-rooted phone?


I'm using LineageOS 14.1 and don't want nor need to root it. How can I remount /system rw and edit /system/etc/hosts?


All answers in "How to edit 'etc/hosts' file?" expect a rooted phone.



Answer



Unless I missed something, that is not possible. Without root access only the mechanism of flashing an update (via recovery or OTA) can modify /system. To be accepted, such an update archive must be signed with the same key as the ROM – which is something only the developer of the ROM (here: the LOS team) can do.



There might be a way via a custom recovery which lets you edit all file systems directly (see e.g. ). But without knowing what device it is, it cannot be said if a matching recovery exists (you can check that in the Devices section of their website for official images, and search XDA for unofficial ones). Apart from that, it's either the device or not editing any file within /system.


No comments:

Post a Comment

samsung galaxy s 2 - Cannot restore Kies backup after firmware upgrade

I backed up my Samsung Galaxy S2 on Kies before updating to Ice Cream Sandwich. After the upgrade I tried to restore, but the restore fails ...