Remove ads / change hosts file possible?


Feb 11, 2019
8
0
3
#1
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
 
Feb 11, 2019
8
0
3
#3
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?
 
Dec 2, 2017
691
182
82
#4
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.)
 
Feb 11, 2019
8
0
3
#5
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:
Feb 11, 2019
8
0
3
#7
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.