Remove ads / change hosts file possible?


c0x10

Members
Feb 11, 2019
15
13
Hi have a quick question.

Is it possible to install Adaway or simply change the hosts file on the system?
I have the rom 9-1-24 installed with magisk. and all is working like a charm.

So i am trying to remove all ads.

But I am not able to mount /system/etc as r/w.
Is there a way to do that?

I may do something wrong :)

Cheers c0x10
 
Well i tried that as well. But Adaway was not able to change the hosts file.
Seems that I have no access to the /system/etc folder, I cannot mount it as r/w.

So it maybe a magisk error? Or should it work with an mi mix3?

Tried to mount the /system partition as r/w but it is not possible at all.
Do I need to patch the boot.img as on other roms with magisk first and flah with with fastboot?

Or is it enough to flash magisk via twrp, as mentioned in the rom installation guide?
 
Well i tried that as well. But Adaway was not able to change the hosts file.
Seems that I have no access to the /system/etc folder, I cannot mount it as r/w.

So it maybe a magisk error? Or should it work with an mi mix3?

Tried to mount the /system partition as r/w but it is not possible at all.
Do I need to patch the boot.img as on other roms with magisk first and flah with with fastboot?

Or is it enough to flash magisk via twrp, as mentioned in the rom installation guide?

From a thread on XDA:

"I just got it to write to the system directory.

I had to remount system twice after re-checking and unchecking the mount as read only box."

(I have no idea if this works, just remembered it.)
 
Thx for all hints.

I sorted it out. I did it now without any tool.
I just copied the hosts file to:

/sbin/.magisk/img/hosts/

And now the ads are gone :)

Strange that it did not work with the unified host app from app store nor the adaway..?

PS: Guess it would work with adaway with manually set path to hosts - no it does not :(
 
Last edited:
Did you reboot after turning systemless hosts on? I've done this twice on both the eu rom and pixel experience and it's worked every time.
 
  • Like
Reactions: timbook2
Yes id did.

I am able now to mount the sys part. Did it on twrp and now I am able to set adaway up.
But it does not remove any ads.

I use the manual way an copy the file to the above mentioned path.
 
... das Problem dürfte wohl darin begründet sein, dass das System nicht "System" sondern "Interner Speicher" heißt ...
wenigstens in der Deutschen Version.

... the problem is probably due to the fact that it is not called "system" but "internal memory" ...
Zumindest in der deutschen Fassung.

So, 2 times in Magisk the systemless hosts clicked and each time the mobile was restarted.
And now I run Adaway rootles.
 
Last edited: