Read/Write access on system partition. - Desire HD Q&A, Help & Troubleshooting

Question:
I have used AAHK to downgrade my DHD and root it, but apparently I don't have write access on the system partition. I have succesfully installed AOSPX BR6 and 7 and am now running Nik 's Project X. Tried installing AdAway last night, but when it attempts to change the 'hosts' file (/system/etc/hosts), it fails. I have granted permissions with Superuser when asked for it and I can see it attempt twice before it fails on 'applying hosts file' ('copying of hosts file failed!').
When I try and create a folder or file in the root using ES Explorer, it also fails ('sorry, operartion failed').
HBOOT states 'S-OFF RL'.
What am I doing wrong?
Thx

Largamelion said:
Question:
I have used AAHK to downgrade my DHD and root it, but apparently I don't have write access on the system partition. I have succesfully installed AOSPX BR6 and 7 and am now running Nik 's Project X. Tried installing AdAway last night, but when it attempts to change the 'hosts' file (/system/etc/hosts), it fails. I have granted permissions with Superuser when asked for it and I can see it attempt twice before it fails on 'applying hosts file' ('copying of hosts file failed!').
When I try and create a folder or file in the root using ES Explorer, it also fails ('sorry, operartion failed').
HBOOT states 'S-OFF RL'.
What am I doing wrong?
Thx
Click to expand...
Click to collapse
Adaway seems to act funny with ICS roms sometimes it works other times it wont. Try wiping data on it in menu>manage apps. If that dont help try Adfree from the play store.

That rom has a r/w problem. Have you done the fix to solve it? It's stated in the OP. Use the backup fix. After that, when trying to update it may fail the firsr time, run it again.
Sent from a dream.

Wiping cache did not work. Adfree seems to work fine but doesn't block all ads.
I will look for the fix tomorrow and give it a go.
Thx

Found it, it was in the second OP under patches & mods, must 've missed it. Thx for pointing me in the right direction. Will try tomorrow.
Pfff ... can't even quote another post without 10 post of my own (and I hate image verification ... so hard to decipher).

Flashing busybox zip didn't work, but the backup/restore of the ROM did fix it. SU is updated now and AdAway works perfectly, seems to block all ads.
Thx again.

Related

[Q] Odd Root Access Results

I've lost root access after the 6.3.1. push.
I have superuser installed.
I have File Expert configured as Root Explorer
superuser shows File Expert is allowed
When I go into File Expert I see the brief message that it has been granted superuser permissions
If I change a permission it doesn't "stick".
OTA Rootkeeper shows all boxes checked.
If I un-root in Rootkeeper- I still can't watch prime videos
I also installed root check which says I have root
Items 1-5 happened yesterday and ended up installing a new ROM from here which eventually fixed my problem.
I supposed I could go back and do that again but I'm wondering if there is another way to resolve this odd issue?
dferrey said:
I've lost root access after the 6.3.1. push.
I have superuser installed.
I have File Expert configured as Root Explorer
superuser shows File Expert is allowed
When I go into File Expert I see the brief message that it has been granted superuser permissions
If I change a permission it doesn't "stick".
OTA Rootkeeper shows all boxes checked.
If I un-root in Rootkeeper- I still can't watch prime videos
I also installed root check which says I have root
Items 1-5 happened yesterday and ended up installing a new ROM from here which eventually fixed my problem.
I supposed I could go back and do that again but I'm wondering if there is another way to resolve this odd issue?
Click to expand...
Click to collapse
I have seen this happen before that you can retain some permissions with certain apps but not really remain rooted its a 50/50 shot its odd but not totally uncommon results. Generally it has something to do with apps that had su permissions prior to the update adding new su permissions don't usually occur after
I did some more playing around and noticed the su symbolic link wasn't in system/xbin.
I decided to root again.
I got this error:
mv: can't rename '/system/bin/check_rooted": No such file or directory.
I do get a message that root was installed though.
Sometimes it won't push the files if they already exsist
I think I've narrowed down the issue.
After rooting I have full root access including ability to change permissions.
The problem is when trying access Amazon Prime, I unroot with root keeper. It removes su from xbin as expected but when I restore, it fails. From that point on I can't change permissions or (of course) put su back.
Any ideas on why root keeper isn't restoring su?
Oh, and even when unrooting, Prime still doesn't work.
dferrey said:
I think I've narrowed down the issue.
After rooting I have full root access including ability to change permissions.
The problem is when trying access Amazon Prime, I unroot with root keeper. It removes su from xbin as expected but when I restore, it fails. From that point on I can't change permissions or (of course) put su back.
Any ideas on why root keeper isn't restoring su?
Oh, and even when unrooting, Prime still doesn't work.
Click to expand...
Click to collapse
No its always worked like a charm for me maybe go to the market and install su from there to see if that doesn't change its strange though that prime is still detecting it. This method only works on rooted stock from what I have seen. Each time delete backup when you restore root. You can also give a shot at fixing permissions. I believe that ota rootkeeper ask for permissions to maybe at some point it was denied and it stuck.uninstall ota and reinstall hope you get er fixed
dferrey said:
I did some more playing around and noticed the su symbolic link wasn't in system/xbin.
I decided to root again.
I got this error:
mv: can't rename '/system/bin/check_rooted": No such file or directory.
I do get a message that root was installed though.
Click to expand...
Click to collapse
How did you over come this error? I am trying to re-root kindle with version 6.3.1_user_410xxxx using the Kindle utility 0.9.5 and it (sort of) aborts at this point - though it does say it has 'rooted' as a display but I do not see it; would be kind if you can give some pointers.
How does one check if Kindle is really rooted? I am trying to install Vendor.apk (google market tool) by moving it into /system/apps but can't copy it to the dir as I dont have write permission - hence my assumption is that rooting has not worked.
Note: I have never been a superuser on this kindle before, this is my first attempt at rooting - but the 2nd try at rooting is throwing the above error. I can see the file renamed as check_rooted.bak in the dir but cant rename with ES_FileExplorer utility as I dont have write permissions
TIA
harbinger13 said:
How did you over come this error? I am trying to re-root kindle with version 6.3.1_user_410xxxx using the Kindle utility 0.9.5 and it (sort of) aborts at this point - though it does say it has 'rooted' as a display but I do not see it; would be kind if you can give some pointers.
How does one check if Kindle is really rooted? I am trying to install Vendor.apk (google market tool) by moving it into /system/apps but can't copy it to the dir as I dont have write permission - hence my assumption is that rooting has not worked.
TIA
Click to expand...
Click to collapse
Download root checker from the market its free if you like make sure you gift the developer a buck
---------- Post added at 02:51 AM ---------- Previous post was at 02:48 AM ----------
When I used kfu the last time it took 2 times to stick don't try much until you know its rooted and you have twrp installed and fff boot loader and have made a backup you can restore if something goes gunny.
---------- Post added at 03:02 AM ---------- Previous post was at 02:51 AM ----------
If you have done everything right it should reboot a couple of times the last thing you will see is twrp screen with a big reboot button click reboot and your done you will then see the fff splash screen of the boot loader it should eventually boot into the os
---------- Post added at 03:10 AM ---------- Previous post was at 03:02 AM ----------
The same rules apply for 6.3.1 watch nat3mil do it http://m.youtube.com/#/watch?desktop_uri=/watch?v=mwMHIkX20YI&v=mwMHIkX20YI&gl=US

[Q] Problem with superuser/superSU/rooting

This being my first post a HI EVERYBODY is in order.
On with the show.
So, I managed to unlock my bootloader via htcdev website, i slapped on the cwm recovery and managed to put a custom rom on my cell.
The rom in question is the jellyking, works fine, everything is great.
PROBLEM:
although ive tried several cm10 roms i liked jellyking the most but on all of them i had troubles getting root.
what happens is that i download es file manager, set it to give me root and mount system as RW, popup says that the preinstalled (with rom) superuser app granted those rights and that everything should be superb, but I couldnt copy files from my sd to lets say /system/media (wanted to change my bootanim) it says file copy failed, only once i did manage to copy a file but i dont know how.
The question:
when i put a custom rom, do i need to reapply the famous root.zip or maybe install busybox as my first app or maybe flash over the existing superuser app the superSU app which seems to update the root binaries sucessfully.
BOTTOM LINE:
What is the exact (if any) procedure that I need to follow to get perm root access (copy rights) to my own phone, each and every reboot.
Thanks in advance for all Your insights,
Humbly,
egr2lrn

Es File Explorer issue

I'm having a problem with es file explorer and root explorer. Last night my fire tv kept booting to home screen and rebooting, so I had to re-install 5.0.5.1 prerooted rom thru recovery. I reinstalled all my apps, and when trying to enable root explorer, I get the superuser request as usual, I grant and get the notification that it's been granted. Root explorer access is enabled for about 6 seconds before disabling with the message "Sorry, test failed. This feature cannot run on your device". Adaway works fine when asking for su permission. Only thing I did differently this time around with installation of the rom is I installed Es file explorer and tried to enable root explorer before doing the SU command from adb shell. I've since uninstalled and reinstalled ES file explorer and reacquiring SU permission but it does the same thing. I went and installed a much older version and it does the exact same thing. Anyone else come across this problem?
The only thing I could suggest would be to remove the manager app es file explorer & reinstall the prerooted rom again? Then start fresh, Su, then after you get access then reinstall es? Only other thing I would say if that don't work is do a factory reset (but only do it from within TWRP Recovery!) Then reinstall the prerooted, block updates, grant Su & then see if that works for you? I use ES pro & Root Explorer & haven't had no problems at all.
deanr1977 said:
The only thing I could suggest would be to remove the manager app es file explorer & reinstall the prerooted rom again? Then start fresh, Su, then after you get access then reinstall es? Only other thing I would say if that don't work is do a factory reset (but only do it from within TWRP Recovery!) Then reinstall the prerooted, block updates, grant Su & then see if that works for you? I use ES pro & Root Explorer & haven't had no problems at all.
Click to expand...
Click to collapse
Thanks for your reply. I'll do what another user suggested and use Total Commander instead as I have it installed and granted root access for it, and it does the same functions. I haven't had any issues with es file explorer on my ftv 2 at all, but another user reported the exact same problem in a different thread on this forum so I'm not alone.
Ok mate no worries, just a note I have both manager apps working on 2 sticks (1 rooted & 1 not, both updates blocked but on different firmware) & also on my prerooted AFTV2 so dunno what happened with yours & the other forum member?
Sent from my SM-G900F using Tapatalk
i have this same issue on 2 firebox's after a full conversion from os3, running rbox latest 5.2.x
both give the identical error, yet other apps are getting su control just fine?
any idea's? @rbox
I am having this problem on my first FTV1 I upgraded from PreRooted FireOS 3 to latest PreRooted FireOS 5. It is a fully rooted with fully unlocked bootloader FTV1. ES File Explorer is giving me this error when trying to turn on its Root Explorer option and all though Total Commander & Root Explorer are not giving me this error. They are not letting me copy files from a Root folder into regular storage. I can view them & choose them but it errors out when trying to copy over. I had to copy them thru TWRP.
I plan to do a Factory Reset thru TWRP & reinstall the latest PreRooted Rom again. But this time after doing the TWRP special build number update blocking tweak. I plan to run the SU command before installing any apps. Will see if that helps at all or not. If not I will post more detail info in case someone can help. This is the last bug I've encounter since doing the move from FireOS 3 to FireOS 5.
@d3adpool , @deanr1977 , @LittleBill21
Where you guys ever able to come up with an answer or fix for this issue ??
Unfortunately no, I'm sure reinstalling the rom via twrp would've fixed it but never did. That ftv has since stopped working.
Y314K said:
I am having this problem on my first FTV1
Click to expand...
Click to collapse
ESFE's root explorer has worked fine for me on multiple sticks, running various firmware versions (5.0.5, 5.2.1.0, pre-rooted 5.0.5_r1)
I didn't see mention of which device the OP was using -- but I'm going to go out on a limb and say FTV1 as well.
The same apk on pre-rooted 5.0.5 FTV1 box gives me that error message.
It seems like this just affects 1st-gen firetv boxes.
The question is whether it's linked/limited to pre-rooted bueller ROMs or just AFTV1's in general.
I didn't use ESFE until I was already on bueller-5.0.5_r2, I wonder if it works on stock 5.x.x rooted with kingroot?
d3adpool said:
Unfortunately no, I'm sure reinstalling the rom via twrp would've fixed it but never did. That ftv has since stopped working.
Click to expand...
Click to collapse
Sorry to hear that, thanks for responding. I had already done a few reinstalling of the latest PreRooted Rom via TWRP without that fixing it. Will keep at it, though.
phresch said:
ESFE's root explorer has worked fine for me on multiple sticks, running various firmware versions (5.0.5, 5.2.1.0, pre-rooted 5.0.5_r1)
I didn't see mention of which device the OP was using -- but I'm going to go out on a limb and say FTV1 as well.
The same apk on pre-rooted 5.0.5 FTV1 box gives me that error message.
It seems like this just affects 1st-gen firetv boxes.
The question is whether it's linked/limited to pre-rooted bueller ROMs or just AFTV1's in general.
I didn't use ESFE until I was already on bueller-5.0.5_r2, I wonder if it works on stock 5.x.x rooted with kingroot?
Click to expand...
Click to collapse
This is definitely an FTV1 Bueller on FireOS 5 PreRooted Rom problem. And in my case it is tied to the "unable to access the /sdcard and other directories while in su mode" bug. But the .zip fix provided over @ the PreRooted Rom OP is not fixing the issue. Gonna post a more detail assessment of what I am encountering & what I've tried to fix the issue & failed so far in a bit.
---------- Post added at 01:07 AM ---------- Previous post was at 12:17 AM ----------
@RBox ; @AFTVnews.com
Decided to upgrade my first TowlRoot Rooted Bueller FTV1 on the last FireOS 3 PreRooted Rom (v51.1.6.3) to the latest FireOS 5 PreRooted Rom (v5.2.1.1_r1). I verified that I meet all the requirements. My bootloader was FULLY unlocked & I was on the latest CWM (v6.0.5.1.4a) with BootMenu (v1.0). I decided I wanted from the start the upgrade on as a clean as possible FTV1. So I uninstalled all programs except for SuperSU. Then I went into CWM & did a Factory Reset (Wipe Dalvik, Cache, Factory Reset) from within CWM & Reinstalled the last FireOS 3 PreRooted Rom (v51.1.6.3). All that was left after the Factory Reset was SuperSU.
Then I pushed over the TWRP bueller-twrp_3.0.0-7.img to the /SDCard & verified it's hash to make sure it was not a corrupt upload. Then I ran the command to switch to the TWRP recovery & everything installed perfectly.
I had ready a USB stick (Fat32) so I could install & md5 verify the FireOS 5 PreRooted Rom (v5.2.1.1_r1) on installation. Booted into TWRP & first did a wipe from within TWRP of Dalvik, Cache, Data & Internal Storage. Then installed the FireOS 5 PreRooted Rom (v5.2.1.1_r1) without any errors. Then I rebooted into system & it went thru it's paces. I did hit a road block when it came to check updates. This was because I was blocking the HTTPS update address from both my router & thru OpenDNS. I did a few re-flashes of the FireOS 5 PreRooted Rom (v5.2.1.1_r1) until I figure out that since this was the latest Rom version I should just let it talk to the update servers or do the PropBuild mod. So finally I got past the update nag. I first turned on ADB Debuging & I first did the SU command & chose to GRANT SuperUser rights. Then I did the update block command from SU. I installed my apps & the only bug I found after that was that ES File Explorer, even after it has been granted SuperUSer rights. It will error out "Sorry, test failed. This feature cannot run on your device". I thought this problem was just with ES file Explorer. But it seems to happen to a lesser degree on Total Commander & Root Explorer too. On those I can see the Root directories. But if I ever try to copy something over from /Root to /SDcard or to /USB it won't allow it. They will have some type of error that stops it. Or makes /SDCard disappear.
Then I notice the "Can't cd to /sdcard after using su? Install this TWRP flashable zip to fix it." post in the PreRooted Rom's OP. And decided to do the SU test of "[email protected]:/ # ls -al /sdcard" & sure enough. I always get the non SU response of:
"lrwxrwxrwx root root 1970-01-06 19:40 sdcard -> /storage/emulated/legacy"
I tried flashing the bueller-fixsusdcard.zip thru TWRP on that install but nothing changed on the test response. Then I tried to do a full reinstall of the PreRooted Rom with the bueller-fixsusdcard.zip as a secondary .zip to flash during the installation. And same... Then I re-verified that I do have a unlocked bootloader. And that I am rooted. Passed on both. I was able to verified I am rooted by using an SDCard app while trying to see what size my MBCache.db file was. I was able to find it in /Data/Data/ without any problem.
So this is where I am at. I wonder if the bueller-fixsusdcard.zip file needs an update for FireOS 5 PreRooted Rom (v5.2.1.1_r1). Or should we try to install SuperSU as a secondary .zip file in TWRP or what can possibly be the answer to getting SU & Root working properly.
I would appreciate any ideas to try.
Y314K said:
This is definitely an FTV1 Bueller on FireOS 5 PreRooted Rom problem. And in my case it is tied to the "unable to access the /sdcard and other directories while in su mode" bug. But the .zip fix provided over @ the PreRooted Rom OP is not fixing the issue. Gonna post a more detail assessment of what I am encountering & what I've tried to fix the issue & failed so far in a bit.
Click to expand...
Click to collapse
I had the su & /sdcard/ problem too.
I'm going to guess that things went something like this (they did for me):
1] installed twrp & pre-rooted bueller ROM
2] discovered that the included superSU had no GUI
3] replaced superSU with another version to access a GUI
4] discovered su/sdcard bug
5] found & flashed the zip fix
6] tried to su /sdcard/ & still doesn't work
But if I ever try to copy something over from /Root to /SDcard or to /USB it won't allow it. They will have some type of error that stops it. Or makes /SDCard disappear.
Then I notice the "Can't cd to /sdcard after using su? Install this TWRP flashable zip to fix it." post in the PreRooted Rom's OP. And decided to do the SU test of "[email protected]:/ # ls -al /sdcard" & sure enough. I always get the non SU response of:
"lrwxrwxrwx root root 1970-01-06 19:40 sdcard -> /storage/emulated/legacy"
Click to expand...
Click to collapse
I was able to remedy this part of the problem; at this point, I still can't access Root Explorer within ES File Explorer..
However, I am able to access /sdcard/ and other previously invisible folders, as well as using RootBrowser and RootExplorer apps.
I'm pretty sure the reason that the zip flash didn't work is because (assuming swapped versions of superSU) your installed superSU binaries are different from the ones the zip was intended to fix.
You have a couple of options, both will give pretty close to the same end result:
First option:
1. re-flash your firmware ROM
2. flash the zip to fix the mount namespace problem
3. install a different SuperSU with a GUI
Second option:
Install a version of SuperSU that includes a 'disable mount namespace' toggle button, and toggle it. v2.05 works for me.
Hopefully that helps
phresch said:
...
Second option:
Install a version of SuperSU that includes a 'disable mount namespace' toggle button, and toggle it. v2.05 works for me.
Hopefully that helps
Click to expand...
Click to collapse
I searched for a download of v2.05 and could only fine sources that I did not trust. Do you have a link to that version?
phresch said:
I had the su & /sdcard/ problem too.
I'm going to guess that things went something like this (they did for me):
1] installed twrp & pre-rooted bueller ROM
2] discovered that the included superSU had no GUI
3] replaced superSU with another version to access a GUI
4] discovered su/sdcard bug
5] found & flashed the zip fix
6] tried to su /sdcard/ & still doesn't work
Click to expand...
Click to collapse
I haven't tried to change or flash to a different SuperSU then the one that comes stock with the PreRooted Roms. Which is v2.46. Trying my best not to loose having a Fully unlocked bootloader. Are you flashing/testing the different versions of SuperSU thru TWRP or are you just flashing APK's just to try to see which one's GUI might still work ?
I notice the SU /SDCard bug only after trying out Total Commander & Root Explorer. Others said those where working fine for them. But for me it looked like they where gonna work fine. But as soon as any of those went to Root mode. I started to see bugs in those programs too. Although in those programs I can at least view Root files. And this last time Root Explorer is letting me copy files over from Root to /SDCard. Total Commander is still hanging when trying to copy files from Root to /SDCard. Like I said this last time I installed the /SDCard SU .zip fix right after I flashed the PreRooted Rom. So it did changed something. But from ADB I still get the same response from the SU List command.
phresch said:
I was able to remedy this part of the problem; at this point, I still can't access Root Explorer within ES File Explorer..
However, I am able to access /sdcard/ and other previously invisible folders, as well as using RootBrowser and RootExplorer apps.
I'm pretty sure the reason that the zip flash didn't work is because (assuming swapped versions of superSU) your installed superSU binaries are different from the ones the zip was intended to fix.
Click to expand...
Click to collapse
I have not swapped SuperSU from what comes with the PreRooted Rom. Trying other SuperSU versions might be something I do after getting some feedback from @rbox since I really do not want to accidentally loose my Fully unlocked bootloader.
phresch said:
You have a couple of options, both will give pretty close to the same end result:
First option:
1. re-flash your firmware ROM
2. flash the zip to fix the mount namespace problem
3. install a different SuperSU with a GUI
Click to expand...
Click to collapse
Are you doing the SuperSU changing thru APK flashing or thru TWRP zip flashing ? Do you know a link to where we can find most versions of SuperSU from v2.16 (used when we towelrooted) to v2.78 ? I see v2.79 is the latest version. Have you tried v2.79 on your FTV1 ? Is there a version of SuperSU we shouldn't go beyond ?
phresch said:
Second option:
Install a version of SuperSU that includes a 'disable mount namespace' toggle button, and toggle it. v2.05 works for me.
Hopefully that helps
Click to expand...
Click to collapse
Please post v2.05. I wonder if we can go down to v2.05 for that option. And then when things are working right go back to v2.46.
Either way ES File Explorer / Root Setting will not work for your right. Not matter what?
Hope I can get past this bug before updating my other 3 FTV1's.
Just ran into something else that is very odd. I've been using Amazon FireTV Utility App v0.66 to access ADB non-Root & Root Shell. Decided to switch to the stand-alone "adb-setup-1.4.3" to see if that would help with the SU commands. But I found that as soon as I give it the "adb shell su" command. Even if SuperSU has been granted full access on a fresh install of the PreRooted Rom on the FTV1. The "[email protected]:/ # _" line gives me a blinking _ & it won't let me input anything else. On the FTV1's screen it says "ADB Shell (2000)" was granted root access each time. But I can't get past that. Is like ADB never receives the granted access response. Then I have to CTRL+C to be able to input anything & exit. This happens whether I opened the CMD with & without Admin rights on my Windows 8.1 PC.
Gonna try downgrading to adb-setup-1.4.2 but I doubt it will make a difference. So the bugs are bunching up. Seems SuperSU is not being installed or allowed to work properly. Any help would be appreciated.
Forgot that on FireOS 5 you have to break the command.
First "adb shell" to get "[email protected]:/ $" & then just "su" to get to "[email protected]:/ #" without it freezing.
The /SDCard list still had the same response though.
"lrwxrwxrwx root root 1970-01-07 19:45 sdcard -> /storage/emulated/legacy"
Solution:
First let me start by Thanking @rbox , @AFTVnews.com , @zroice , @phresch for all their work & feedback.
Was finally able to test multiple options & found a reproducible solution to this problem. The key was in @zroice post about Holo Themer.
https://forum.xda-developers.com/fi...w-to-supersu-xposed-app-t3552590#post71703744
Basically you got to make sure you install or have installed the latest version of BusyBox & XPosed & HDXPosed Module. And to have activated Holo Themer from within XPosed so you can run the SuperSU APK that comes with the PreRooted Rom. SuperSU should ask you to update. Once you have done a "Normal" update like we did when we first rooted our FTV1's then that should fix the Root Option fail that ES File Explorer & other apps have had. I am guessing the problem comes when we uninstall or wipe our FTV1's during our FireOS 3 to FireOS 5 update. Some of us thought BusyBox & Xposed would not be as important to functionality on FireOS 5 as it was on FireOS 3.
Make sure you only activate Holo Themer on a per needed basis. Since it will make your FTV reboot randomly if you leave it on all the time.
And like always. As long as you installed TWRP correctly. You can always start anew with a wipe (NEVER WIPE SYSTEM) & install of the latest PreRooted ROM. I would also recommend having all the files you know you will need in a USB drive or SDCard in FTV2's case ready to go & in separate folders before you start flashing away. Makes things much easier.
If you forgot how to install BusyBox or XPosed you can always find how in the many guides over @ AFTVNews.com . For me even the old FireOS 3 guides & FTV2 guides help as a good refresher or visual confirmation.

[Android 7]Hosts file ignored

Hi guys,
I'm having trouble with the hosts file on my OPO3 and the latest stock firmware.
On Android 6 I booted into TWRP, mounted system and flashed my own hosts file to /system/etc/hosts. This worked fine.
Before updating I to Android 7 I pulled the hosts file and uploaded the same hosts file to android 7. However its getting completely ignored.
I tried various other hosts file, different encoding, blank line at the end of the file, tabs, no tabs, spaces, no spaces, 127.0.0.1, 0.0.0.0 etc but nothing works. If I go back into TWRP and pull the hosts file it actually is the hosts file that I pushed earlier so its not that Android is somehow overwriting the file.
Does anybody know what the problem could be?
PS I am NOT rooted and I don't want to root either.
Thanks
sjaak1234 said:
Hi guys,
I'm having trouble with the hosts file on my OPO3 and the latest stock firmware.
On Android 6 I booted into TWRP, mounted system and flashed my own hosts file to /system/etc/hosts. This worked fine.
Before updating I to Android 7 I pulled the hosts file and uploaded the same hosts file to android 7. However its getting completely ignored.
I tried various other hosts file, different encoding, blank line at the end of the file, tabs, no tabs, spaces, no spaces, 127.0.0.1, 0.0.0.0 etc but nothing works. If I go back into TWRP and pull the hosts file it actually is the hosts file that I pushed earlier so its not that Android is somehow overwriting the file.
Does anybody know what the problem could be?
PS I am NOT rooted and I don't want to root either.
Thanks
Click to expand...
Click to collapse
have you applied proper permissions to hosts file ?
JumboMan said:
have you applied proper permissions to hosts file ?
Click to expand...
Click to collapse
I think so? Didn't set any permissions myself.
C:\android>adb shell
~ # ←]6ngs -l /system/etc/hosts
-rw-r--r-- 1 root root 393105 Jan 27 01:21 /system/etc/hosts
sjaak1234 said:
I think so? Didn't set any permissions myself.
C:\android>adb shell
~ # ←]6ngs -l /system/etc/hosts
-rw-r--r-- 1 root root 393105 Jan 27 01:21 /system/etc/hosts
Click to expand...
Click to collapse
can you post link to hosts file that you are using so that i can try myself to see what is the problem
JumboMan said:
can you post link to hosts file that you are using so that i can try myself to see what is the problem
Click to expand...
Click to collapse
I'm not at home for the weekend so I can't pull the actual file but I used (among others) the one from http://someonewhocares.org/hosts/
Pasted in notepad++ with encoding utf without BOM and EOL Linux encoding. Tried copying it to Windows notepad as well.
I also tried the host file I pulled from my phone before upgrading. I'll upload that one once I get back to my PC. Should still have it somewhere.
sjaak1234 said:
I'm not at home for the weekend so I can't pull the actual file but I used (among others) the one from http://someonewhocares.org/hosts/
Pasted in notepad++ with encoding utf without BOM and EOL Linux encoding. Tried copying it to Windows notepad as well.
I also tried the host file I pulled from my phone before upgrading. I'll upload that one once I get back to my PC. Should still have it somewhere.
Click to expand...
Click to collapse
i would suggest you to upload the hosts file you currently have problem.
JumboMan said:
i would suggest you to upload the hosts file you currently have problem.
Click to expand...
Click to collapse
I've attached the hosts file that I pulled from my Md pushed to my OP3. Can't find the original untouched one from my OP3 anymore but this works fine on my M7 and its practically the same as the file that worked fine on my OP3 on Marshmellow.
sjaak1234 said:
I've attached the hosts file that I pulled from my Md pushed to my OP3. Can't find the original untouched one from my OP3 anymore but this works fine on my M7 and its practically the same as the file that worked fine on my OP3 on Marshmellow.
Click to expand...
Click to collapse
nothing suspicious except encoding.
can you try UTF-8 encoding.
I tried but it makes no difference. Tried notepad++ as well as windows notepad (files made in notepad++ look messed up in windows notepad and vica versa though).
Tried a clean file with just a couple of normal websites on it just for testing but no luck.
Does adjusting the hosts file on the stock nougat rom work for you?
****ing google
sjaak1234 said:
I tried but it makes no difference. Tried notepad++ as well as windows notepad (files made in notepad++ look messed up in windows notepad and vica versa though).
Tried a clean file with just a couple of normal websites on it just for testing but no luck.
Does adjusting the hosts file on the stock nougat rom work for you?
****ing google
Click to expand...
Click to collapse
can you try MOAB (search xda). I am using this on stock oos 328 without any problems.
*edit - also tried on stock oos 402. its working
Finally had some time to try again.
Moab doesn't work either. I ran a packet capture to make sure the ad urls are in the hosts file. They are. That ****ing piece of **** google is simply ignoring the hosts file.
sjaak1234 said:
Finally had some time to try again.
Moab doesn't work either. I ran a packet capture to make sure the ad urls are in the hosts file. They are. That ****ing piece of **** google is simply ignoring the hosts file.
Click to expand...
Click to collapse
Mine works fine but with AdAway.
Great.
Except on that piece of **** of mine this craptastic os is simply ignoring the hosts file. Even if I put in something like 127.0.0.1 cnn.com it won't block ****.
And no I'm not going to root because it breaks banking apps, pokemon go etc. No I'm not going to bother with endless workarounds for that either and finally no unroot does not work and has never worked.
sjaak1234 said:
Great.
Except on that piece of **** of mine this craptastic os is simply ignoring the hosts file. Even if I put in something like 127.0.0.1 cnn.com it won't block ****.
And no I'm not going to root because it breaks banking apps, pokemon go etc. No I'm not going to bother with endless workarounds for that either and finally no unroot does not work and has never worked.
Click to expand...
Click to collapse
I don't know if this is any help but on nougat with adaway app it only works properly when choosing systemless mode , whether or not you can make your hosts file systemless i don't know but i thought I'd mention it to see if it helps you out with the manual way...
sjaak1234 said:
Finally had some time to try again.
Moab doesn't work either. I ran a packet capture to make sure the ad urls are in the hosts file. They are. That ****ing piece of **** google is simply ignoring the hosts file.
Click to expand...
Click to collapse
you sure that data saver option is not on right? else it wont use your host, since it's proxi-ed to google server
otonieru said:
you sure that data saver option is not on right? else it wont use your host, since it's proxi-ed to google server
Click to expand...
Click to collapse
I'm sure that's not on. I've tried Firefox as well and the results are the same. Something weird though is that if I connect to my own vpn server and block a url on the firewall there, somehow chrome still finds a way around it while on Firefox the url will be blocked.
When I got time I'll root and try adaway. It's not really a solution for me as I can't keep root (and unrooting still permanently triggers some apps thinking the phone is rooted) but at least it it should narrow down the problem.
I cannot be the new dm verity in android 7 right? Somehow ignoring files that have been changed? I obviously do get that error/warning during boot because I changed the system partition.
@sjaak1234
Hi
I can confirm that my hosts file has been working fine on
OOS 3.2.8 to 4.0.3
CB5 to OB12
H2OS 7.0 & 7.1.1
So nothing wrong (as yet) with Android OS or Google or even OnePlus. I can share my hosts file if you want to try.
Two suggestions:
use Aroma File Manager to replace hosts file and set permission (644 or rw-r-r).
Use Magisk for root as well working banking apps (MagiskHide).
Good luck :good:
Have you tried creating a symlink to data/hosts?
In order to make adfree android the symlink is required,
Maybe the symlink is also needed to make the hosts file work without the app
https://forum.xda-developers.com/showpost.php?p=64554262&postcount=978
Maybe this also helps your cause

Where/how to find hosts file in Android 8.0 Oreo?

Hi fellow developers,
I need to do modify my HTC 10's hosts file, but with the latest OTA update to Android 8.0, I find it impossible to make any functional changes to the hosts file. Does anyone have a clue?
I am rooted, and S-OFF with TWRP recovery.
In recovery, I have tried modifying all of these:
/system/etc/hosts
(which is only there normally when the phone is booted and running, I can't figure out where it's coming from)
/data/hosts
/data/data/hosts
None of these work.
Please help, if you know! I cannot find any information online, after hours of research and troubleshooting...
cheers,
Jordan
P.S. Despite S-Off and root, I find that many root procedures don't work when android is booted, disappointed, cannot understand why. Miss my One M8!
jorxster said:
Hi fellow developers,
I need to do modify my HTC 10's hosts file, but with the latest OTA update to Android 8.0, I find it impossible to make any functional changes to the hosts file. Does anyone have a clue?
I am rooted, and S-OFF with TWRP recovery.
In recovery, I have tried modifying all of these:
/system/etc/hosts
(which is only there normally when the phone is booted and running, I can't figure out where it's coming from)
/data/hosts
/data/data/hosts
None of these work.
Please help, if you know! I cannot find any information online, after hours of research and troubleshooting...
cheers,
Jordan
P.S. Despite S-Off and root, I find that many root procedures don't work when android is booted, disappointed, cannot understand why. Miss my One M8!
Click to expand...
Click to collapse
Hello mate.
Have u tried edit hosts file using any text editor? try get Root Explorer, navigate to /system/etc/ and mount R/W. select hosts file & edit.
aM- said:
Hello mate.
Have u tried edit hosts file using any text editor? try get, navigate to /system/etc/ and mount R/W. select hosts file & edit.
Click to expand...
Click to collapse
Thank you aM- for replying, someone hears my cry for help!
I tried to mount /system as read-write and instead got an "Error : The operation could not be completed".
This is frustrating, as again, I got S-OFF specifically for this purpose.
And SuperSU seems to function normally, asking me to grant permissions.
I had the same problem with a terminal editor, being unable to SU, permissions denied.
Are you on Android 8.0 Oreo as well?
jorxster said:
Thank you aM- for replying, someone hears my cry for help!
I tried to mount /system as read-write and instead got an "Error : The operation could not be completed".
This is frustrating, as again, I got S-OFF specifically for this purpose.
And SuperSU seems to function normally, asking me to grant permissions.
I had the same problem with a terminal editor, being unable to SU, permissions denied.
Are you on Android 8.0 Oreo as well?
Click to expand...
Click to collapse
Yes, I'm on Android 8.0. Have you check either your device rooted or not? if rooted, supposedly on terminal also should be no problem.
aM- said:
Yes, I'm on Android 8.0. Have you check either your device rooted or not? if rooted, supposedly on terminal also should be no problem.
Click to expand...
Click to collapse
I should be rooted.. I am unlocked and S-OFF.
I flashed SuperSU-v2.82-201705271822.zip from TWRP recovery.
I have the SuperSU app installed and it seems to run normally.
But I cannot "su" in a shell like you did, cannot mount /system partition as write, really, cannot do anything root.
Do you know what version of SuperSU you rooted yours with?
P.S. Android 8.0 as well, not 8.1 (which I presume hasn't rolled out to OTA yet)
jorxster said:
I should be rooted.. I am unlocked and S-OFF.
I flashed SuperSU-v2.82-201705271822.zip from TWRP recovery.
I have the SuperSU app installed and it seems to run normally.
But I cannot "su" in a shell like you did, cannot mount /system partition as write, really, cannot do anything root.
Do you know what version of SuperSU you rooted yours with?
P.S. Android 8.0 as well, not 8.1 (which I presume hasn't rolled out to OTA yet)
Click to expand...
Click to collapse
Currently I'm using SuperSU from here https://forum.xda-developers.com/apps/supersu/2014-09-02-supersu-v2-05-t2868133
Navigate to system/bin
"su" file in there?
Sent from my HTC 10 using Tapatalk
Thanks so much aM- and fmedrano1977.
I've made progress. I reflashed my phone with the later SuperSU SR5 zip that you posted, wiped dalvik/cache, rebooted. Now I can "su", as well as mount /system/etc as read/write. Success!
There was a couple of catches, at least two or three other apps that don't seem to work with root anymore (like the previous file explorer I had, supposed to support root, but only "root explorer" worked after I bought it).
Now modifying my hosts file seems to have no effect, but I suppose that's another issue for another day. As it stands, I can now edit my hosts file thanks to your help.
Cheers!!
jorxster said:
Thanks so much aM- and fmedrano1977.
I've made progress. I reflashed my phone with the later SuperSU SR5 zip that you posted, wiped dalvik/cache, rebooted. Now I can "su", as well as mount /system/etc as read/write. Success!
There was a couple of catches, at least two or three other apps that don't seem to work with root anymore (like the previous file explorer I had, supposed to support root, but only "root explorer" worked after I bought it).
Now modifying my hosts file seems to have no effect, but I suppose that's another issue for another day. As it stands, I can now edit my hosts file thanks to your help.
Cheers!!
Click to expand...
Click to collapse
Glad to hear that. Happy modify system mate.
jorxster said:
Thanks so much aM- and fmedrano1977.
I've made progress. I reflashed my phone with the later SuperSU SR5 zip that you posted, wiped dalvik/cache, rebooted. Now I can "su", as well as mount /system/etc as read/write. Success!
There was a couple of catches, at least two or three other apps that don't seem to work with root anymore (like the previous file explorer I had, supposed to support root, but only "root explorer" worked after I bought it).
Now modifying my hosts file seems to have no effect, but I suppose that's another issue for another day. As it stands, I can now edit my hosts file thanks to your help.
Cheers!!
Click to expand...
Click to collapse
i was lead here from an answer for my question, i;m curious when getting the host file prepared ,the steps others helped you with,did your device data get deleted ?

Categories

Resources