Hosts file can't be written Android 13 beta 1 - Magisk

Hello there!
I'm running Android 13 an my pixel 5, i can't get adaway to write to the Hosts file.
The systemless Hosts module is there, I've take a look at the Hosts file permission but still.... Can't get adaway to overwrite his Hosts fil.
Any ideas of what's going on?

ShadowJP88 said:
Hello there!
I'm running Android 13 an my pixel 5, i can't get adaway to write to the Hosts file.
The systemless Hosts module is there, I've take a look at the Hosts file permission but still.... Can't get adaway to overwrite his Hosts fil.
Any ideas of what's going on?
Click to expand...
Click to collapse
This happens on my Pixel sometimes if I reinstall Magisk after an update. Adaway always manages to snap out of it after repeating a couple steps. I usually clear its storage too for a clean slate but that may not be necessary.
First I disable the systemless hosts module and reboot. Then in Magisk settings tap it again as if enabling for the first time. I'll reboot again for extra measure and Adaway usually starts writing to the hosts file.

well... nope.
I still have the problem.
Guess there's a change in Android 13 that Magisk haven't take a look at yet

Yeah there's an issue open on the github for this. Has a bit more information
Unable to copy hosts file on Android 13 Beta 1 · Issue #3183 · AdAway/AdAway
Attempting to use the root based ad blocker with Magisk (24.3)'s Systemless Hosts results in the following error on Android 13 beta 1 on Pixel 6: Logcat: 04-27 22:59:55.809 I/RootModel(10323): Remo...
github.com

Same here , I suppose we'll have to wait

Related

Help - Systemless Root

Hello,
First off, I am using a Oneplus 5 device running 7.1.1 Nougat.
I followed this guide to root my phone with Magisk 13.2 https://forum.xda-developers.com/oneplus-5/how-to/oneplus-5-unlock-bootloader-flash-twrp-t3624877
I am able to download apps that require root, and grant them said root access.
However when trying to give AdAway Systemless root access (In preferences) the checkbox is greyed out and unusable.
So far so bad.
When trying to install BusyBox, and try to select a different install path (/su/xbin or /su/bin) I get the error message : "Systemless root is not configured, please choose another install location"
If I go into Magisk Manager both BusyBox and AdAway are Granted Root access, and when checking settings, Hosts Systemless is activated.
Am I simply blind and have I missed a step? On the Magisk Manager Homescreen, it says I have the latest version installed, and MAGIKSU is also validated.
Help please? I'm confused. D:
For AdAway you shouldn't have to bother with the systemless option. Just enable Systemless hosts in the Magisk Manager.
You could also use a Magisk module. There's a great one called Unified Hosts Adblocker. Unfortunately there's a bug in the Manager at the moment that makes it crash when downloading modules. They can be installed manually though (there's a download in the thread).
For busybox you've got a great installer here: https://forum.xda-developers.com/showthread.php?t=2239421
It'll install as a Magisk module when flashed in recovery.
Hello,
I've followed your suggestion and manually installed Unified Hosts Adblocker. I'm assuming it will update on it's own when required? As it has no interface. (Also, I am still getting ads, is this normal? xD)
So installing AdAway won't trigger SafetyNet as long as I have "Hosts Systemless" checked right?
I have also flashed the BusyBox installer from the link you gave me. It shows up on Magisk Modules, however it hasn't created a busybox icon in my applist. (Again, no interface? Is this installed correctly?)
Furthermore, I've looked around a bit, and is it true I currently can not expect to run Xposed Framework on Nougat?
Thank you for your current answers, in the hopes of further ones.
With the hosts module you'll have to run it manually. Use a terminal emulator and type su followed by hosts and then follow the instructions. The m option is included in all the others... Don't forget to enable systemless hosts or it won't work. More about how you use the module in the thread.
There's no interface for the busybox installation, no. There's no need really...
---------- Post added at 17:27 ---------- Previous post was at 17:26 ----------
Oh yeah. No Xposed for Nougat.
Thanks for your help, it's been of great assistance and sets my mind to rest that nothing really went wrong with my installation of Magisk. I'll keep an eye out for the Manager updates that'll fix the downloads.
I was once again just wondering about the updating of busybox, but I'll just assume that if I get a "Update busybox" from any app, I'll come back to the post you directed me to and update it that way.
You didn't answer my pondering about Xposed, but once again I'll just assume what I found is true and the developer currently hasn't had time to update it yet, and it may take a while.
Thank you for your time and the peace of mind you've procured me.
Didgeridoohan said:
Oh yeah. No Xposed for Nougat.
Click to expand...
Click to collapse
:laugh:

Q: /RQ:

Whats the best adblocking host file you've ever used for Mi5 (or any device)
You can share a magisk module if that worked for you, tried a bunch but none worked thanks.
pi4a7a said:
Whats the best adblocking host file you've ever used for Mi5 (or any device)
You can share a magisk module if that worked for you, tried a bunch but none worked thanks.
Click to expand...
Click to collapse
I used adaway... It work with magisk systemless hosts.
Just enable systemless host in magisk setting.
In adaway, don't applying adblock first....
But you need to set target hosts file to "custom target"
and
Set custom target path like attached image.
Some important to used it as systemless is :
- After applying, when it ask to create symlink # select "NO".
- It will show red disabled after applying (because you select to not create symlink) # just relauch adaway or restart your phone better.
- Next time you open adaway it will show green enabled.
- Make sure you do the same (select NO) when update adsblock available and you want to apply update.
UCHIHA said:
I used adaway... It work with magisk systemless hosts.
Just enable systemless host in magisk setting.
In adaway, don't applying adblock first....
But you need to set target hosts file to "custom target"
and
Set custom target path like attached image.
Some important to used it as systemless is :
- After applying, when it ask to create symlink # select "NO".
- It will show red disabled after applying (because you select to not create symlink) # just relauch adaway or restart your phone better.
- Next time you open adaway it will show green enabled.
- Make sure you do the same (select NO) when update adsblock available and you want to apply update.
Click to expand...
Click to collapse
Can you share a link for Adaway or module ?

Magisk Issue On OmniROM 8.1

I'm using official Omni 8.1. The issue I'm facing is that the Magisk Manager can't seem to remember the apps it has granted Superuser permission. Even in the Superuser tab it shows "No apps found". Result being I have to grant Superuser permission every time when I open an app like Root Explorer.
Please look into this issue.
Magisk Manager: v5.5.2
Magisk Root: v15.1 Stable
I don't have this issue on version 5.5.0 and 15.1 on the latest Omni 8.1 weekly on my Oneplus 3T.
Edit: You didn't mention what device, so I doubt anyone would be able to help you. But I guess you're running a Oneplus 3T or a Oneplus 5 since there are no 8.1 Omni weeklies for any other devices, yet. Maybe you could try to attach some logs.
For me Magisk v15.1 doesn't boot anymore, it just fails and goes back to recovery.
v14.6 works fine.
Omni 8.1 on Oneplus 5T
Same problem here. Any solution?
Look into this issue, doesn't boot, solutions?
Where are the logs?
How do you expect someone to help you without that?
For all the praise Magisk seems to get, it sure does have some issues. Lately, it's been kind of a lottery figuring out which version will work with which ROM... These things never happend to me on SuperSu
Jazavchar said:
For all the praise Magisk seems to get, it sure does have some issues. Lately, it's been kind of a lottery figuring out which version will work with which ROM... These things never happend to me on SuperSu
Click to expand...
Click to collapse
I'd say it has to do with the incredible speed that the Magisk development has been going at. Looking back over the past year, a lot has happened. This kind of speed can cause instabilities...
Now, it's most likely at a point where the focus will be on stability and compatibility development.
Having said that, though, all users experiencing issues can help with that by providing as much details as possible and relevant logs.
I can confirm this. It seems Magisk has a problem opening the sqlite3 database, on OmniROM 8.1 at least.
The Superuser request can be granted, and it goes through (as in the app gets its root access), however nothing is permitted "forever".
Superuser log in Magisk Manager is empty, so is the list of apps granted Superuser access.
From my log:
Code:
sqlite3 open failure: unable to open database file
Either the sqlite3 database is located somewhere else, or Magisk didn't get the correct writing rights during the install. Did something change regarding this in 8.1?
There is also a somewhat unrelated issue with Magisk Hide, where the hidelist-file doesn't exist/wasn't initially created upon installation:
Code:
fopen: /sbin/.core/img/.core/hidelist failed with 2: No such file or directory
Full log attached.
debichu said:
I can confirm this. It seems Magisk has a problem opening the sqlite3 database, on OmniROM 8.1 at least.
The Superuser request can be granted, and it goes through (as in the app gets its root access), however nothing is permitted "forever".
Superuser log in Magisk Manager is empty, so is the list of apps granted Superuser access.
From my log:
Code:
sqlite3 open failure: unable to open database file
Either the sqlite3 database is located somewhere else, or Magisk didn't get the correct writing rights during the install. Did something change regarding this in 8.1?
There is also a somewhat unrelated issue with Magisk Hide, where the hidelist-file doesn't exist/wasn't initially created upon installation:
Code:
fopen: /sbin/.core/img/.core/hidelist failed with 2: No such file or directory
Full log attached.
Click to expand...
Click to collapse
Two things I'm curious about (at the moment):
What are the permissions for /data/adb/magisk.db?
Do you now have a hidelist file in /sbin/.core/img/.core?
Didgeridoohan said:
Two things I'm curious about (at the moment):
What are the permissions for /data/adb/magisk.db?
Do you now have a hidelist file in /sbin/.core/img/.core?
Click to expand...
Click to collapse
There is no such file in that location. There is a magisk.img in that folder with -rw-r--r--, and a magisk/ folder but not containing any magisk.db file either.
Yes, there is now a hidelist file in /sbin/.core/img/.core with -rw-rw-rw-
Bonus info:
I did a complete wipe (I initially did that but I wanted to be certain), and I got this error while installing Magisk right after OmniROM (also see attached):
Code:
! System installed root detected, mount rw :(
Now, OmniROM doesn't ship with root built in - at least not to my knowledge. So I don't know what this "system installed root" Magisk is detecting.
debichu said:
There is no such file in that location. There is a magisk.img in that folder with -rw-r--r--, and a magisk/ folder but not containing any magisk.db file either.
Yes, there is now a hidelist file in /sbin/.core/img/.core with -rw-rw-rw-
Bonus info:
I did a complete wipe (I initially did that but I wanted to be certain), and I got this error while installing Magisk right after OmniROM (also see attached):
Code:
! System installed root detected, mount rw :(
Now, OmniROM doesn't ship with root built in - at least not to my knowledge. So I don't know what this "system installed root" Magisk is detecting.
Click to expand...
Click to collapse
Number 1 is an issue, because that's the su database... If there is none, it's no wonder why granted superuser requests aren't saved.
Hi, do you have a solution?
@Didgeridoohan i am facing same issue like this . it keeps asking for superuser req .
cpt.macp said:
@Didgeridoohan i am facing same issue like this . it keeps asking for superuser req .
Click to expand...
Click to collapse
As far as I know, so far the only known working solution is to reformat /data as ext4. Or stay on an old version of Magisk.
Didgeridoohan said:
As far as I know, so far the only known working solution is to reformat /data as ext4. Or stay on an old version of Magisk.
Click to expand...
Click to collapse
which version you suggest also my /data is ext4 only .
also i would like to tell you one more thing after tinkering little bit and observed following things
as soon as i dont open the magsik app and using root by simple toast and granting the permission it works but as soon as i open the app , it starts misbehaving . i wonder why .
cpt.macp said:
which version you suggest also my /data is ext4 only .
also i would like to tell you one more thing after tinkering little bit and observed following things
as soon as i dont open the magsik app and using root by simple toast and granting the permission it works but as soon as i open the app , it starts misbehaving . i wonder why .
Click to expand...
Click to collapse
Let me guess: you're not using OmniROM...
Since you're posting in this thread, I kind of assumed you did, so my answer was given accordingly.
If you need help, post all possible details and lots of relevant logs.
I've had the same error. Magisk seems unstable on OmniROM 8.1 on OnePlus 5. Probably an issue with the ROM, but the developer seems like the kind of guy who will tell you to go f*ck yourself if you have a problem like this.
Sometimes it works sometimes it doesn't.
A temporary workaround with the permission issue on /data/adb/magisk.db, even after not working trying 0666 permissions, was to change ownership. None of many other solutions worked for me until I found the user for Magisk. You can use a shell as root or with apps like FX File Explorer with root capability to see which user owns files in "/data/adb/magisk/" . Then I applied that user as the owner of magisk.db. Verified that apps which ask for root permission get saved now. The user of Magisk will be different for you since it is marked as "app_##' which I suppose is up to the amount of apps you have installed.
I have a problem and think it caused by the same reason other users here.. My issue is after installing omni rom and gapps ONLY i can't use my banking apps because ( i guess) it thinks my device is rooted.
Device : oneplus 5
I wasn't planning to root my device to keep those kind of issues away
saidmsb said:
I have a problem and think it caused by the same reason other users here.. My issue is after installing omni rom and gapps ONLY i can't use my banking apps because ( i guess) it thinks my device is rooted.
Device : oneplus 5
I wasn't planning to root my device to keep those kind of issues away
Click to expand...
Click to collapse
No... I don't think so. This thread is about an issue with Magisk and f2fs on Android 8.1 ROMs. Your issue could be that OmniROM sets some sensitive props to triggering values.
That can be taken care of by using Magisk and MagiskHide. Take a look here for more info:
https://www.didgeridoohan.com/magisk/MagiskHide#hn_Sensitive_props
If you decide to install Magisk, this part of the guide might also be useful (all of it is useful, really):
https://www.didgeridoohan.com/magisk/MagiskHide#hn_Hiding_root_from_apps

Madisk and Kali NetHunter

Hello, i have Oneplus5 with the latest updates and Android 10, also installed latest version of Magisk and Magisk Manager, so i decide to install nethunter, download modules directly from Magisk Manager - "KaliNethunter 8.2" and Wireless Firmware For Nethunter but nothing installed there was no KaliNethunter app after rebooting phone, why not can someone help?
I have also installed MagiskHide props and Busybox modules installed nothing else
no one can help?
The module install log and the Magisk log is a good piece of information to provide for anyone to be able to help.
https://www.didgeridoohan.com/magisk/MagiskHelp
here is magisk log but i could not find nethunter module log where is it?
The module install log needs to be saved from the Manager module flash screen, right after you've installed the module.
The Magisk log looks normal (apart from the many unnecessary apps added to the Hide list), so the install log is our only likely source of info for what happened. From what I remember, that module installs the apk as a normal user app during install, so you could probably just grab the apk from the zip and install it manually.
here the log yes have done this like you said intall apk files and now will test it and update you
Yeah... There are a whole bunch of errors regarding selinux, the apk installation and trying to edit system files with /system read-only. Contacting the module creator might be your best bet, but looking at the Github repo it seems to be abandoned.
thank you will do

Magisk 24.3 "su" Permission denied

Greetings, I've been attempting for several days to execute "su" from adb shell. Essentially, Magisk 24.3 is properly installed within Android 12 on a Google Pixel 6. My primary purpose for rooting is to add my LAN entries to /system/etc/hosts.
An androidforums.com thread details the steps taken several times.
I would very much appreciate your help in getting "su" to work in Android 12 on a Pixel 6. No such problem occurred in Android 8.2 on a Nexus 6P.
Magisk is now uninstalled from the phone, and doesn't appear in the list of apps on the Pixel 6.
On the laptop:
$ adb install Magisk-v24.3.apk
Performing Streamed Install
Success
Invoking Magisk on the phone indicates that the App 24.3 (24300)(27) is installed, Magisk "Installed: NA"
From the factory image, unzipping image-oriole-sp2a.220305.013.a3.zip into a tmp directory:
$ adb push boot.img /storage/emulated/0/Download/boot.img
boot.img: 1 file pushed, 0 skipped. 51.4 MB/s (67108864 bytes in 1.246s)
In Magisk Install "Select and Patch a file", the boot.img is selected. "LET'S GO" results in a sequence ending with the name of the patched file and "All done!"
On the laptop:
adb pull /storage/emulated/0/Download/magisk_patched-24300_jdnPc.img magisk_patched.img
/storage/emulated/0/Download/magisk_patched-24300_jdnP...ulled, 0 skipped. 35.6 MB/s (67108864 bytes in 1.796s)
$ adb reboot bootloader
$ fastboot flash boot magisk_patched.img
Sending 'boot_a' (65536 KB) OKAY [ 1.683s]
Writing 'boot_a' OKAY [ 0.100s]
Finished. Total time: 1.785s
Android reboots normally. The Magisk app reports "Installed: 24.3 (24300)
On the laptop:
$ adb shell
oriole:/ $ su
Permission denied
13|oriole:/ $ exit
$
Please tell me where was my rooting error.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I assure you that the correct factory boot.img was transferred to Magisk, and the correct patched *.img file was uploaded and flashed to the phone.
hstroph said:
Greetings, I've been attempting for several days to execute "su" from adb shell. Essentially, Magisk 24.3 is properly installed within Android 12 on a Google Pixel 6. My primary purpose for rooting is to add my LAN entries to /system/etc/hosts.
I would very much appreciate your help in getting "su" to work in Android 12 on a Pixel 6. No such problem occurred in Android 8.2 on a Nexus 6P.
Click to expand...
Click to collapse
I think what you are facing is less about su rights and privileges and more about modern versus legacy partitioning and file systems. See this StackExchange Q&A, in particular the second answer about a hosts file solution.
But instead of mounting /system in Android 12, which is more hardened than 10 and 11, a safer method would involve systemless hosts courtesy of Magisk. One issue with that, though, is that most people use systemless hosts for block lists that redirect in bulk to 127.0.0.0 or 0.0.0.0. Adding friendly host names and IPs gets tricky because ad blocking apps like Adaway tend to overwrite when updating, although Adaway's whitelisting option may do the trick. I've never tried it.
I'm in a similar boat since jumping from Android 9 to 12 when I bought a Pixel 6. Eventually I'd like to use my Pixel for accessing a localhost web server. Until a better idea comes along I'll either use my old Pie phone for local browsing or simply publish to the www server (for testing layouts and responsiveness, etc.). I haven't gotten serious about it yet but I'm interested in any method that doesn't involve /system modifications or reconfiguring my router.
manjaroid said:
I think what you are facing is less about su rights and privileges and more about modern versus legacy partitioning and file systems. See this StackExhange Q&A, in particular the second answer about a hosts file solution. ...
Click to expand...
Click to collapse
Thank you, that got me excited as termux allowed a root prompt. "mount -o rw,remount /" executed, the vi alias was created, but "vi /system/etc/hosts" informed me that the file was read-only.
Not sure what to do next, but again, thank you.
hstroph said:
Thank you, that got me excited as termux allowed a root prompt. "mount -o rw,remount /" executed, the vi alias was created, but "vi /system/etc/hosts" informed me that the file was read-only.
Not sure what to do next, but again, thank you.
Click to expand...
Click to collapse
We need to approach our hosts files differently than was possible with Oreo or Pie. The path with least resistance will be Magisk's built-in systemless hosts module. Mounting /system as rw may have worked for Android 10 or 11, but 12 is stricter and messing with anything on /system could cause a cascade of problems.
Also, the /system partition dynamically stays full despite usage reported in Settings/Storage, so there's no elbow room for even the smallest change and you might even see out of space errors if not read-only errors.
What to try? I don't have a good answer yet, only ideas. I will be looking into it and am happy to report back. Hopefully somebody smarter than me will chime in.
Thank you for your interest and efforts.
This XDA thread was revisited today and it reminded me to take a stab at my Pixel's hosts file. With little effort I'm now browsing web server hosts on a Windows laptop from Android 12. All I did was edit its hosts file same way I've always done. Obviously I didn't have have a good grasp of the Magisk overlay and how it symlinks Android's native hosts file.
/system in Android 10+ may be off limits to many legacy operations but not the hosts file as long as Magisk's systemless hosts module is enabled. For su access it's just a matter of granting it to a root capable file manager with a text editor, such as MiXplorer or Solid Explorer.
Here's an example of what's needed for Android 12 browsers to connect to Apache virtualhosts on Windows:
Windows 10 laptop (192.168.1.234) - c:\Windows\System32\drivers\etc\hosts
127.0.0.1 site1.local
127.0.0.1 site2.local
Android 12 Pixel - /system/etc/hosts
192.168.1.234 site1.local
192.168.1.234 site2.local
Hope this is pertinent to what you're trying. Sorry for making it sound impossible earlier.
manjaroid said:
This XDA thread was revisited today and it reminded me to take a stab at my Pixel's hosts file. With little effort I'm now browsing web server hosts on a Windows laptop from Android 12. All I did was edit its hosts file same way I've always done. Obviously I didn't have have a good grasp of the Magisk overlay and how it symlinks Android's native hosts file.
/system in Android 10+ may be off limits to many legacy operations but not the hosts file as long as Magisk's systemless hosts module is enabled. For su access it's just a matter of granting it to a root capable file manager with a text editor, such as MiXplorer or Solid Explorer.
...
Click to expand...
Click to collapse
I'd very much like to know what "little effort" it took, please.
Magisk has the systemless module enabled, both MIXplorer and Solid Explorer have root privileges, but neither can copy my downloaded hosts file to /system/etc/hosts ... no success using the MIXplorer text editor either as per your suggestion
hstroph said:
I'd very much like to know what "little effort" it took, please.
Click to expand...
Click to collapse
I edited the hosts file directly by tapping it in MiXplorer and picking an editor. Then I just added a few lines, saved, and that was it. If you have lots of tedious entries try copy/pasting your text instead of trying to replace the file.
I know it doesn't quite make sense since your file managers have root. But overwriting a file on read-only /system is something completely different than opening and editing the hosts file like an ad blocker would do, which is only possible because of the systemless hosts module.
manjaroid said:
... But overwriting a file on read-only /system is something completely different than opening and editing the hosts file like an ad blocker would do, which is only possible because of the systemless hosts module.
Click to expand...
Click to collapse
Which hosts file are you successfully editing, please? Android 12 absolute pathname, if you would be so kind.
hstroph said:
Which hosts file are you successfully editing, please? Android 12 absolute pathname, if you would be so kind.
Click to expand...
Click to collapse
Edit /system/etc/hosts just as you would have done before Android 10, which didn't require the systemless hosts module.
I don't understand most of how systemless root works. But as far as I know, Magisk's systemless hosts module 'hijacks' (for lack of better discription) the hosts file from the system and makes it systemless, similar to a system app converting to a user app.
manjaroid said:
Edit /system/etc/hosts just as you would have done before Android 10, which didn't require the systemless hosts module.
Click to expand...
Click to collapse
I have attempted that many times:
$ adb shell
oriole:/ $ su
Permission denied
13|oriole:/ $
This was in anticipation of a "mount -o rw,remount /system" command in Android 8.2 on a Nexus 6P phone. It no longer works on Android 12 on a Pixel 6. Even a successful su in Termux fails to edit the /system/etc/hosts, or to make either / or /system rw.
Are you actually using Android 12, or are you reciting from memory? Your screen shots are appreciated.
hstroph said:
Are you actually using Android 12, or are you reciting from memory? Your screen shots are appreciated.
Click to expand...
Click to collapse
My Pixel runs Android 12 build SPA2A.220405.004 and Magisk 24.3. Screen shots won't show anything useful.
The su command in adb shell or Termux aren't needed even if mounting /system with write permission was possible. You're chasing your tail going about it this way.
A root file manager used as described is all that's needed to edit the hosts file. If you're being denied write access there must be something wrong with Magisk, systemless hosts, interference from other Magisk modules or something else.
To trouble shoot Magisk,
- try disabling systemless hosts in Magisk, reboot, re-enable it again & reboot again
- if using Magisk Canary try the more stable 24.3
A simple way to test systemless hosts is to install Adaway, choose the root option and grant su access. If the module is working Adaway will build a large hosts file from preset lists.
- a storage full error on the first run isn't unusual, but it should write to the hosts file next run
- if there's constant errors something isn't right, probably with Magisk or systemless hosts
- if it does write to the hosts file you should be able to edit it manually
- disable all block lists before uninstalling Adaway to empty the hosts file
manjaroid said:
My Pixel runs Android 12 build SPA2A.220405.004 and Magisk 24.3. ...
Click to expand...
Click to collapse
My Pixel 6 runs Android 12 build SPA2A.220305.013.A3 with Magisk 24.3
manjaroid said:
A root file manager used as described is all that's needed to edit the hosts file. If you're being denied write access there must be something wrong with Magisk, systemless hosts, interference from other Magisk modules or something else.
...
A simple way to test systemless hosts is to install Adaway, choose the root option and grant su access. If the module is working Adaway will build a large hosts file from preset lists.
Click to expand...
Click to collapse
Before Adaway (from adb shell):
oriole:/ $ wc -l /system/etc/hosts
2 /system/etc/hosts
After Adaway:
oriole:/ $ wc -l /system/etc/hosts
110315 /system/etc/hosts
manjaroid said:
- if it does write to the hosts file you should be able to edit it manually
Click to expand...
Click to collapse
I can add a LAN line before all the 127.0.0.1 entries using the rooted MIXplorer text editor, but the file still won't save.
manjaroid said:
- disable all block lists before uninstalling Adaway to empty the hosts file
Click to expand...
Click to collapse
There were no previous block lists of any kind. I have simply been trying to add a couple dozen LAN entries on this new phone.
I think I've followed instructions as carefully as possible, but still no luck.
hstroph said:
My Pixel 6 runs Android 12 build SPA2A.220305.013.A3 with Magisk 24.3
Before Adaway (from adb shell):
oriole:/ $ wc -l /system/etc/hosts
2 /system/etc/hosts
After Adaway:
oriole:/ $ wc -l /system/etc/hosts
110315 /system/etc/hosts
I can add a LAN line before all the 127.0.0.1 entries using the rooted MIXplorer text editor, but the file still won't save.
There were no previous block lists of any kind. I have simply been trying to add a couple dozen LAN entries on this new phone.
I think I've followed instructions as carefully as possible, but still no luck.
Click to expand...
Click to collapse
Systemless hosts appears to be working if there were no errors and 110315 entries were written to hosts.
In MiXplorer's Settings/More Settings, is the first item for Allow Root checked? I don't remember if the default is checked or not but it needs to be checked. The equivalent setting in Solid Explorer is off by default.
My two screenshots show before and after enabling/disabling Adaway's block lists. The second image shows Adaway's leftovers along with my own lines added manually and the file is saved (save button being greyed out). If you're unable to get the same results I'm stumped and need to think about what's going wrong.
manjaroid said:
..
In MiXplorer's Settings/More Settings, is the first item for Allow Root checked? I don't remember if the default is checked or not but it needs to be checked.
Click to expand...
Click to collapse
It is checked in MIXplorer.
manjaroid said:
The equivalent setting in Solid Explorer is off by default.
Click to expand...
Click to collapse
I'm unable to locate an equivalent setting in Solid Explorer (SE), but root usage was granted through Magisk 24.3 when I used SE for the first time.
manjaroid said:
My two screenshots show before and after enabling/disabling Adaway's block lists. The second image shows Adaway's leftovers along with my own lines added manually and the file is saved (save button being greyed out). If you're unable to get the same results I'm stumped and need to think about what's going wrong.
Click to expand...
Click to collapse
My attached image shows a failure to save in MIXplorer after adding a single "192.168.1.13 tncpi" line.
I've been stumped on the matter ever since Android 12 on this new Pixel 6.
Is Zygisk enabled in Magisk? I assume you followed this guide for rooting.
[GUIDE] Pixel 6 "oriole": Unlock Bootloader, Update, Root, Pass SafetyNet
⚠️⚠️⚠️WARNING! IF YOU ARE UPDATING TO ANDROID 13 FOR THE FIRST TIME, READ THIS FIRST! ⚠️⚠️⚠️ If you are looking for my guide on a different Pixel, find it here: Pixel 3 Pixel 3XL Pixel 3a Pixel 3aXL Pixel 4 Pixel 4XL Pixel 4a Pixel 4a (5G)...
forum.xda-developers.com
Appending a line using Termux works for me also. Are you denied when you try?
Code:
$ su
# echo 192.186.1.234 site3.local >> /system/etc/hosts
If that works there's no reason a root file manager shouldn't work. (To enable root in Solid Explorer tap the hamburger icon upper left then the sprocket icon and scroll down.)
If nothing works I'm thinking either 1) root isn't complete or 2) attempts at /system mounting had a negative effect. Options to consider:
- remove Magisk and repeat the root process
- remove Magisk, install the April OTA update, then root
- factory reset or flash the April factory zip, then root
My suggestion: Might as well go the full route and factory reset or clean flash. Particularly if there's any chance something went wrong in the root file system.
manjaroid said:
Is Zygisk enabled in Magisk?
Click to expand...
Click to collapse
It is now, so I have more to learn what Zygisk enables.
manjaroid said:
I assume you followed this guide for rooting.
[GUIDE] Pixel 6 "oriole": Unlock Bootloader, Update, Root, Pass SafetyNet
⚠️⚠️⚠️WARNING! IF YOU ARE UPDATING TO ANDROID 13 FOR THE FIRST TIME, READ THIS FIRST! ⚠️⚠️⚠️ If you are looking for my guide on a different Pixel, find it here: Pixel 3 Pixel 3XL Pixel 3a Pixel 3aXL Pixel 4 Pixel 4XL Pixel 4a Pixel 4a (5G)...
forum.xda-developers.com
Click to expand...
Click to collapse
Correct ... re-flashed factory image, then rooted with Magisk. Process repeated several times carefully, all with same results.
manjaroid said:
Appending a line using Termux works for me also. Are you denied when you try?
Click to expand...
Click to collapse
Appending a line works with Termux. Saving /system/etc/hosts after editing within Termux or Solid Explorer fails.
manjaroid said:
Code:
$ su
# echo 192.186.1.234 site3.local >> /system/etc/hosts
Click to expand...
Click to collapse
Success.
manjaroid said:
If that works there's no reason a root file manager shouldn't work. (To enable root in Solid Explorer tap the hamburger icon upper left then the sprocket icon and scroll down.)
Click to expand...
Click to collapse
Well, neither root file explorer works to save the file, but appending other text to /system/etc/hosts works, so I'll just write a simple shell script that I can run as needed.
I want to thank you so much for your patient help. I never thought Google would make things so difficult for those of us who need the use of a pocket Linux computer.
Please consider this thread closed.

Categories

Resources