Can't update HOSTS file - OnePlus 6T Questions & Answers

I'm sure I'm missing something but don't know what it is.
I have a T-Mo OP6t, converted to International OOS Beta 8
TRWP installed
Magisk installed
Solid Explorer installed (paid version)
I'm trying to edit/update my HOSTS file for ad blocking but I can't.
I've tried to edit the properties of the HOSTS file in system/etc/ but the changes don't stick.
See attached thumbnails.
Any help/advise is appreciated.

Need to enable systemless hosts file option in Magisk manager, that's it.

I use adaway and do not toggle the system less switch in magisk and things work fine. I thought the system less toggle were for the modules you could download not separate sops

I use Solid Explorer all the time to modify hosts file on all my devices, inlcuding my 6T. The editor built into Solid Explorer has issues with larger files, so many larger hosts files can't be copied / pasted / saved in the editor in my experience. You can however just copy / paste / replace the entire hosts file with another one though. Just make sure the hosts file has Linux line endings, so use a Linux PC or notepad++ in Windows and use the conversion to Unix line endings and save it.

Jager said:
Need to enable systemless hosts file option in Magisk manager, that's it.
Click to expand...
Click to collapse
I have that option already enabled. No luck.

OhioYJ said:
I use Solid Explorer all the time to modify hosts file on all my devices, inlcuding my 6T. The editor built into Solid Explorer has issues with larger files, so many larger hosts files can't be copied / pasted / saved in the editor in my experience. You can however just copy / paste / replace the entire hosts file with another one though. Just make sure the hosts file has Linux line endings, so use a Linux PC or notepad++ in Windows and use the conversion to Unix line endings and save it.
Click to expand...
Click to collapse
I've always copied and pasted with Solid Explorer and that's what I'm trying to do this time but haven't had any luck.
Any other suggestions?

mine420 said:
I use adaway and do not toggle the system less switch in magisk and things work fine. I thought the system less toggle were for the modules you could download not separate sops
Click to expand...
Click to collapse
Personally I don't care for Adaway (no particular reason), I'm just quirky and prefer to use an edited HOSTS file.

brisseau said:
I've always copied and pasted with Solid Explorer and that's what I'm trying to do this time but haven't had any luck.
Any other suggestions?
Click to expand...
Click to collapse
Have you gone in Magisk, and under SuperUser and made sure Solid Explorer is approved for Root use?

OhioYJ said:
Have you gone in Magisk, and under SuperUser and made sure Solid Explorer is approved for Root use?
Click to expand...
Click to collapse
Yep. See attached.
Note: I'm only using adfree until I can get the HOSTS file copied and pasted over

brisseau said:
Yep. See attached.
Note: I'm only using adfree until I can get the HOSTS file copied and pasted over
Click to expand...
Click to collapse
Don't know what changed but AFTER installing the adfree.apk and allowing that to update the HOSTS file, I was able to copy/paste my HOSTS file like normal.
Crisis solved.
Moderator, please close and thanks to everyone who suggested fixes.

Edit the host file here, it's the one that is used when the magisk module is enabled.
/sbin/.core/img/hosts/system/etc

Try debloating the rom. Having same issue getting error message "that there are no enough space on the system". After I removed built in system app i'm not using, all went fine after. I removed google play music, movies and other stuffs I don't use.

Related

[Q] Fix DNS Facebook, we need an developer to help

Hi everybody.
I'm come from Vietnam, where the Facebook is now banned.
We need someone to write a program to update the host file in /system/etc/ by just a touch.
Please copy the IP from http://armabloggin.com/2009/07/facebook-dns-block-fix/
to the host file (like AdFree program).
We cannot edit this file by Astro because it read-only. We don't know how to S-OFF our Android.
Thank you so much.
I thought that AdFree is for rooted phones only.
Here's the host file
I've modified the host file for you but I don't think you can get much further until you root your phone, giving yourself access to system/etc/ where the "hosts" file is for replacement.
Remove the .txt extension and replace it with your hosts file in /system/etc/ after rooting.
If your phone cannot be rooted at http://unrevoked.com/ have a look on the sub forum here for your phone.
As previously stated, changing any system file is impossible without root.
Why can't you use a one-click-rooting program? There are plenty around that work for quite a lot of phones. If that doesn't work there will be device specific guides available, unless it's a phone that can't be rooted (is there any?).
Sorry, I've already root the HTC Desire by Unrevoked.com and have RA-recovery.
I mean that I don't have S-OFF in my device.
I also used Astro to copy the host file to SD Card and edited it. But I cannot replace the host file to system/etc/.
So I need you help write a mini-soft like AdFree.
Have you tried using adb to push the hosts file (in recovery) or root explorer? No need to S-OFF.
I think a soft will easy to use for everyone, don't need experiment in adb, root or s-off.
Anyone developer can make it easy?
Sent from my HTC Desire using Tapatalk
I think the problem is that you didn't mounted the system partition. Try ES FileExplorer, it can work as root and can mount partitions
Sent from my GT-I5700 using XDA Premium App
Hi,I am vietnamese too,if you can't root your phone you can follow the full instruction on tinhte.vn forum.
I whipped this up for you.
It doesn't look great but it does the job. Put the 'hosts' file on your sdcard (not in any folder) that you want to move and rename it 'hosts.txt'. Then run the app and press the button. You'll probably need to reboot afterwards.
Enjoy.
This doesn't back up the hosts file on your phone so you may want to do that manually.
[YOU NEED ROOT ACCESS]
Thank you so much.
Meltus said:
I whipped this up for you.
It doesn't look great but it does the job. Put the 'hosts' file on your sdcard (not in any folder) that you want to move and rename it 'hosts.txt'. Then run the app and press the button. You'll probably need to reboot afterwards.
Enjoy.
This doesn't back up the hosts file on your phone so you may want to do that manually.
[YOU NEED ROOT ACCESS]
Click to expand...
Click to collapse
Dear Meltus,
Firstly, I thank you very much to write this apk for me. You're so kind.
But it's maybe something wrong!
I install your apk, put the hosts.txt in SDCard (in the root, not in any folder).
Then run the app and press the button, reboot afterwards.
I used Astro to view the hosts file. But this file is error. It has 0 byte and can be read.
Please fix it. Thank you so much, again.
P/S: Maybe you make an options to chose folder of hosts file.
Further, you can develop this apk to change any file of system by chose the source and destiny paths.

A500 w/ minimalist 3.2 cannot copy files to read only folders

I'm fairly new to android, and rooting and custom roms and all that i have an a500 with the minimalistic 3.2 rom, and but this has happened with any other custom roms or stock firmwares aswell (all rooted)..
Anyway, ill use this as an example, one time, and I was trying to install the samsung Ebook.apk and it required a separate sytem app, and everyone said move this other app (my files. Apk.) to system / apps and change permissions, I've tried with several file managers and it always says that it is read only,
This happens when trying to move files to other system folders... Isn't rooting supposed to give me access to these and let me edit files or put files there ect
I'm probably just stupid, but but any help would be appreciated
ddpruel said:
I'm fairly new to android, and rooting and custom roms and all that i have an a500 with the minimalistic 3.2 rom, and but this has happened with any other custom roms or stock firmwares aswell (all rooted)..
Anyway, ill use this as an example, one time, and I was trying to install the samsung Ebook.apk and it required a separate sytem app, and everyone said move this other app (my files. Apk.) to system / apps and change permissions, I've tried with several file managers and it always says that it is read only,
This happens when trying to move files to other system folders... Isn't rooting supposed to give me access to these and let me edit files or put files there ect
I'm probably just stupid, but but any help would be appreciated
Click to expand...
Click to collapse
Can you just push the files with ADB and edit the permissions?
I could not get ES File Explorer to gain root permissions with the Minimalist Rom, but the ADB method worked for me (installing Polaris Office).
I've heard a lot about adb but have never used it.. Ill look it up and see if I can set it up... thanks
use root explorer. Great file manager and gives youba button to mount the filesystem r/w
ddpruel said:
I'm fairly new to android, and rooting and custom roms and all that i have an a500 with the minimalistic 3.2 rom, and but this has happened with any other custom roms or stock firmwares aswell (all rooted)..
Anyway, ill use this as an example, one time, and I was trying to install the samsung Ebook.apk and it required a separate sytem app, and everyone said move this other app (my files. Apk.) to system / apps and change permissions, I've tried with several file managers and it always says that it is read only,
This happens when trying to move files to other system folders... Isn't rooting supposed to give me access to these and let me edit files or put files there ect
I'm probably just stupid, but but any help would be appreciated
Click to expand...
Click to collapse
You need to remount the relevant folders as read/write. Most file explorers can do it. Most people swear by Root Explorer, but that's pay software. I use ES File Manager, which is free.
Thanks a lot but but how do i change permissions with root explorer? I (i am supposed i change them to 644)
ddpruel said:
Thanks a lot but but how do i change permissions with root explorer? I (i am supposed i change them to 644)
Click to expand...
Click to collapse
I could not get ES File Explorer to gain permissions with this rom.

[Q] Cm7.1 root access?

I recently installed Cm7.1 on my Nook Color, does this give me root access? The reason i ask this is because i was attempting to access my build.prop to try to get some games to work but i can not seem to be able to access it via Astro File Manager. Also on a side note, every time i install an app and do not have my sd card in my Nook i am prompted to do so instead of using my internal memory?
Lsjreadingpa said:
I recently installed Cm7.1 on my Nook Color, does this give me root access? The reason i ask this is because i was attempting to access my build.prop to try to get some games to work but i can not seem to be able to access it via Astro File Manager. Also on a side note, every time i install an app and do not have my sd card in my Nook i am prompted to do so instead of using my internal memory?
Click to expand...
Click to collapse
CM7 is a rooted ROM. The file access model is setup to make sure you know what you're doing to prevent you from modifying or deleting a file that is essential to the system even though the ROM itself is rooted. I don't use Astro so I don't know how to get root access for that app. File managers like File Expert (free) or Root Explorer (cheap) will allow you to access the root and system files, but you may have to enable the capability in a setup option. In addition, you will have to set the directory to read/write from read-only to actually modify a file.
Thanks for the info, thought i did something wrong when i was installing cm7
shumash said:
CM7 is a rooted ROM. The file access model is setup to make sure you know what you're doing to prevent you from modifying or deleting a file that is essential to the system even though the ROM itself is rooted. I don't use Astro so I don't know how to get root access for that app. File managers like File Expert (free) or Root Explorer (cheap) will allow you to access the root and system files, but you may have to enable the capability in a setup option. In addition, you will have to set the directory to read/write from read-only to actually modify a file.
Click to expand...
Click to collapse
How do i do set a directory to read/write? Also, i have tried several file explorers and none work, i just cant get root access. I am trying to edit my build.prop to try to play some gameloft games.
Lsjreadingpa said:
How do i do set a directory to read/write? Also, i have tried several file explorers and none work, i just cant get root access. I am trying to edit my build.prop to try to play some gameloft games.
Click to expand...
Click to collapse
If you use ES File Explorer (recommended) then it has a setting to make the system directory read / write. You can then just long touch the file, open it using the built in text editor and save it.
Yup i did that, checked both boxes under root settings but i am unable to navigate out of the sd card
es file explorer
To get out of SD card, go into settings and change home to / instead of /mnt/sdcard next time you open it will start in base directory

Question to ROM devs - file type sharing restriction

Hello, I'm currently running a stock 4.4.4 with some smali mods. I recently noticed that file types you can receive via Bluetooth are limited (and some googling revealed it's a whitelist in Bluetooth.apk). However, there's also some kind of restriction in sending, which (as I can understand) only makes a couple apps show up in the Send/Share intent window (I saw apks, isos, debs are some of the restricted files). I couldn't locate this black list though. Any hint as to where it is (even in the android source)?
I have never had any problem sending or receiving an apk file.
Gallardo994 said:
I have never had any problem sending or receiving an apk file.
Click to expand...
Click to collapse
Yeah, I think most custom ROMs remove these limits. Also, some file managers like ES work around the sending blacklist somehow. Root explorer doesn't sadly
So i solved this... Basically each app can accept some kinds of files via sharing, and Bluetooth.apk is no exception, you can find the white list in its manifest. Too bad that to edit it, you also need to disable the signature checking with tools like lucky patcher, or resign all system apps and framework-res...
Once i experienced the same problem..
all i did was using ES file manager..
compress the file in zip and send via Bluetooth
i recommend u to try it... it worked for me all the time..(even .apk files)
Sidnexus4 said:
Once i experienced the same problem..
all i did was using ES file manager..
compress the file in zip and send via Bluetooth
i recommend u to try it... it worked for me all the time..(even .apk files)
Click to expand...
Click to collapse
Yeah, the problem is it whitelists (only allows) specific file types (zips, pdfs, office documents, audio, video, image files, html, txt, maybe I forgot some others). But it was a chance to learn something about the OS.:laugh:
If anyone is interested, I unlocked all file types both in sending and receiving in Bluetooth.apk and kept Google's signature (so you need to disable the signature verification in core.jar with Lucky Patcher, it's the first patch of the three and then you can uninstall it). Otherwise the apk will just not load. Only for stock 4.4.4 for Nexus 4!

Android 11: Can't see folders with external file explorer

Hi,
if i try to see a sub-folder of Android, my external file explorer (Solid explorer, Root explorer) only show an empty folder. The folder i try to see is this: Android/data. Are there certain restrictions of Android 11, which external explorer can't deal with? I don't have this problem with the intermal explorer and - surprise, surprise - with Total Commander (which i don't like so much...).
Anybody knows a solution or workaround to let other explorers look into these Folders?
Cheers
Clark
Seems like Google decided to restrict access to the Android/Data folder to "approved" applications.
Some other users said that Google Files (what a surprise) and Samsung Files work properly.
I usually use a root explorer, wich works fine, but otherwise most file managers probably won't be able to access the folder for a while.
Add MiXplorer and SD Maid to the list of working file managers. Hoping Solid Explorer gets updated soon!
I'm using root explorer just fine
I am rooted so if you're not then just root is easy
Clark789 said:
Hi,
if i try to see a sub-folder of Android, my external file explorer (Solid explorer, Root explorer) only show an empty folder. The folder i try to see is this: Android/data. Are there certain restrictions of Android 11, which external explorer can't deal with? I don't have this problem with the intermal explorer and - surprise, surprise - with Total Commander (which i don't like so much...).
Anybody knows a solution or workaround to let other explorers look into these Folders?
Cheers
Clark
Click to expand...
Click to collapse
Cx File Explorer is working great!
I'm using it on my Xiaomi Mi 10 xiaomi.eu rom!
dladz said:
I'm using root explorer just fine
I am rooted so if you're not then just root is easy
Click to expand...
Click to collapse
Try Solid Explorer and check if you see /sdcard/Android/Data/. Some file managers work and others don't even if you are rooted.
sjamie said:
Try Solid Explorer and check if you see /sdcard/Android/Data/. Some file managers work and others don't even if you are rooted.
Click to expand...
Click to collapse
I'll be honest mate I've never needed anything else since root explorer was released.
Absolutely hate solid lol. Only other one I used to use was called Linda I think, G1 days
Xplore works, Solid Explorer 2.88 works as well
Using some of the recommended file explorers above didn't work for /sdcard/Android/Data/. Most of them were able to see /internal/Android/Data/ though. My Note 10+ wasn't rooted, and I wasn't planning on rooting due to the downfalls. I was able to see the files by mounting the SD card in Windows.
Mixplorer works great for me right now.
FreshlyBaked 420 said:
Mixplorer works great for me right now.
Click to expand...
Click to collapse
Yeah that's the last one I tried before mounting it to the PC. Now the question is which of these file explorers I should keep and finally replace ES File Explorer.
jpflaw00 said:
Yeah that's the last one I tried before mounting it to the PC. Now the question is which of these file explorers I should keep and finally replace ES File Explorer.
Click to expand...
Click to collapse
My vote would be Mixplorer. They have a few different themes, as well as add ons.
qane said:
Seems like Google decided to restrict access to the Android/Data folder to "approved" applications.
Some other users said that Google Files (what a surprise) and Samsung Files work properly.
I usually use a root explorer, wich works fine, but otherwise most file managers probably won't be able to access the folder for a while.
Click to expand...
Click to collapse
This was extremely helpful in restoring a SMS backup of the database, thank you for recommending it!

Categories

Resources