If your /system partition is write protected like on the HTC One (M7) and you try to use an advertisement blocker like AdAway, you will encounter that changes to /system/etc/hosts are lost after reboot and ad blocking doesn't work. You have basically 3 methods to get around this:
A) Link /system/etc/hosts to a partition AdAway can write to
Install symlink_hosts_to_data.zip via your custom recovery (like CWM) to create a symbolic link from /system/etc/hosts to /data/data/hosts. Afterwards you can configure AdAway to use /data/data/hosts (as shown in attached screenshot) and it will work perfectly with updates and everything.
B) Flash the hosts file directly
Install adaway_hosts_2014-04-14.zip via recovery. Now you have the hosts file as AdAway created on April 14th 2014. Disadvantage: you would need to flash again for updates. Advantage: you don't need the AdAway app at all. Note: many custom ROMs include such a hosts file already in their distribution.
C) Make /system partition writable
Use this kernel extension or a custom ROM including it to have the /system partition writable all the time. AdAway will work out-of-the-box then.
If you like to restore original state after having flashed one of the recovery zips above, use the attached restore_original_hosts.zip
Mantelinho said:
The attached recovery flashable update.zip modifies your /system/etc/hosts file just like AdAway or Adblock Plus would. Useful if your /system partition is write protected like on the HTC One (and changes are lost after reboot).
You need
a custom recovery like ClockWorkMod on your device
the understanding that you will use this script at your own risk
You could also
make the /system partition writable via kernel patch and use the app
use a custom ROM which comes with an ad-blocking hosts file already
This uses the hosts list from AdAway as of June 17th 2013. All credits for this to AdAway and its contributors
Click to expand...
Click to collapse
Can you create a script which creates the symbolic link i.e. the approach recommended in AdAway help (S-ON/S-OFF)? That would allow the file to be updated by the app over time...
melando said:
Can you create a script which creates the symbolic link i.e. the approach recommended in AdAway help (S-ON/S-OFF)? That would allow the file to be updated by the app over time...
Click to expand...
Click to collapse
This makes sense if you want to keep using the app, thanks for the hint. I uploaded symlink_hosts_to_data.zip and updated the opening post. This will work also after having the other zip already applied.
Cheers, do I need all 3 zips or just the one dated today?
Sent from my Nexus 7 using xda app-developers app
jonny68 said:
Cheers, do I need all 3 zips or just the one dated today?
Click to expand...
Click to collapse
Either the one dated (and you're fine) OR the symlink one if wanting to use AdAway configured to write to /data/data/hosts. The third file is only for restoring original state.
Cheers, so should this block all ads then, I had the ad block apk. But it didn't block all annoying ads?
Sent from my Nexus 7 using xda app-developers app
jonny68 said:
Cheers, so should this block all ads then, I had the ad block apk. But it didn't block all annoying ads?
Click to expand...
Click to collapse
This should block all ads so far (at least it absolutely does for me). However the list of ad servers is actively maintained by hosts-file.net. If you should find an ad host not blocked you can post it there and it will find its way back to AdAway. To be always up-to-date I recommend using AdAway with the symlink method from OP.
Dunno why but it doesn't block ads on the goal.com app but for some reason no adblock app ever really did, strange!
Sent from my Nexus 7 using xda app-developers app
sinna ketskm
Hey, just inquiring...
I've done the "flash host files directly" step, and playing Subway Surfers.
It would seem that ads are only blocked on that game when I have system set to RW...(I think...?...not 100% sure, but it would seem this way)
I was under the impression that it shouldn't matter because I'm flashing the host file directly?
Can anyone offer their thoughts please.
B BOY DRAW2 said:
Hey, just inquiring...
I've done the "flash host files directly" step, and playing Subway Surfers.
It would seem that ads are only blocked on that game when I have system set to RW...(I think...?...not 100% sure, but it would seem this way)
I was under the impression that it shouldn't matter because I'm flashing the host file directly?
Can anyone offer their thoughts please.
Click to expand...
Click to collapse
Yes, after flashing the hosts files directly no further steps should be necessary and ads be gone. Can you verify that ads also exist in other applications (or websites)? Maybe this is an issue with the app you are using, for example if it loads its apps from its own (unblocked) server.
Yeah, I think you're right about it perhaps being app related. I think maybe I need to monitor it a bit more closely and take random notes...
like sometimes I'm bombarded with advertisments any time I touch to advance or go back through menus...but just in that app...then I'll reboot...and sometimes it'll go a full day without ads...?
I also use a local news app which would normally advertise dating links, but those don't seem to appear...so it's definitely working.
All good though...thanks for answering that for me!
Much appreciated!!!
Mantelinho said:
Install symlink_hosts_to_data.zip via your custom recovery (like CWM) to create a symbolic link from /system/etc/hosts to /data/data/hosts. Afterwards you can configure AdAway to use /data/data/hosts.
Click to expand...
Click to collapse
Thanks so much for this info Mantelinho, I had been looking for a solution. When using this 1st method, do I need to flash symlink_hosts_to_data.zip in recovery after every ROM flash? I.e., I'm dirty-flashing CyanogenMod nightlies every other day or so and I'm not sure if need to re-create the symlink after every flash.
edit: I have discovered I DO need to flash symlink_hosts_to_data.zip after every ROM flash.
Sorry to bump an old thread. Will this work on the new M8 variant of the One, or will it only work on the M7 variant?
TrainAss said:
Sorry to bump an old thread. Will this work on the new M8 variant of the One, or will it only work on the M7 variant?
Click to expand...
Click to collapse
im sure it works
Child's Play said:
im sure it works
Click to expand...
Click to collapse
It does work. I forgot to change data location.
Sent from my HTC One (M8) using Tapatalk Pro
Can i use twrp and will work in moto x?
Hi, is this guide specific for the HTC One? Or would it perhaps work on my HTC One S too?
Sandeman1976 said:
Hi, is this guide specific for the HTC One? Or would it perhaps work on my HTC One S too?
Click to expand...
Click to collapse
Its for htc phones with s-on
---------- Post added at 11:26 AM ---------- Previous post was at 11:11 AM ----------
gskelter said:
Can i use twrp and will work in moto x?
Click to expand...
Click to collapse
If cwm or twrp is available for ur device, u can flash cwm or twrp
Child's Play said:
Its for htc phones with s-on
Click to expand...
Click to collapse
Ok, thanks!
FF.
Related
Because AdFree is not working on Desire:
I've made hosts file which is compilation of two lists and some manual additions (for correct blocking of admob). So I decided to share with my list. Use it if You want to. Please tell me if this forum is wrong for that list.
Sorry for the n00b question but how do you install this?
Nice one mate. You've just reminded me I needed to redo my hosts file after installing Modaco Froyo, and I might as well use yours as it'll be more up to date than mine.
Ghisy said:
Sorry for the n00b question but how do you install this?
Click to expand...
Click to collapse
ditto this, instructions for us noobies?
unzip the host file
than enter recovery
adb-windows shell mount /system
adb-windows shell mv /system/etc/hosts /sdcard/backuphost
adb push c:\hosts /system/etc
that should wrok if you unziped hosts.zip to c:\ and if something goes wrong you have your original hosts file backed up in /sdcard/backuphost
hope this helps
p.s. i didn't try this
did everything, and adfree is still not working in froyo...
Thanks anyway!
Edit: Now, Adfree FCs!
Edit 2: I did it again and it worked!
Could someone please create a zip file, that can be falshed through clockworkmod recovery? This would be fantastic.
Try this, mate. [Click!]
dnlgee said:
Try this, mate. [Click!]
Click to expand...
Click to collapse
Thanks dnlgee I put it in my repo on ROM Manager
This is great, thanks for sharing - it seems to work great. I might go back to a stock hosts though - I like to block ads when browsing, but I feel bad about doing it for ad-supported applications. That's just me though
shawe_ewahs said:
Thanks dnlgee I put it in my repo on ROM Manager
Click to expand...
Click to collapse
No worries, just checked your repo, there's a lot of stuff there haha.
dnlgee said:
No worries, just checked your repo, there's a lot of stuff there haha.
Click to expand...
Click to collapse
Yes, trying to do thinks more easy for all people
Thank you. I have been looking for this for a long time
Great work, it worked a charm until I changed to a new rom, went to use it again and it was gone from the downloads in Rom Manager.
Big thanks.
Panic over, It was saved as a download on my SD card, Rom Manager flashed it again from the saved location no problem.
Love it.
danbst said:
Your stuff is gone from Rom Manager it seems mate.
Would I be right in assuming I can put this on my card renamed as update.zip (if I need to?)
Use rom manager to boot into recovery and flash it manually?
Great work BTW, it worked a charm until I changed to a new rom, went to use it again and as I say it was gone.
Big thanks.
Click to expand...
Click to collapse
You don't need to rename the zip file if you're using ROM Manager, but yes you should be able to install this through the manager.
If you can't download it through the ROM Manager report, my link is always online and will be updated when possible.
Sent from my HTC Desire using Tapatalk
Just a confused question;
If we have a rooted device, what's the reason for having to use the recovery menu? Can you not simply overwrite the file?
Thanks
Yea you can, provided you reboot into recovery and mount the system, then pull or push the device back into the system.
Either way you need to boot into recovery as there's no root method that fully allows read/write access for the Desire at the moment.
Psy-Blade said:
Just a confused question;
If we have a rooted device, what's the reason for having to use the recovery menu? Can you not simply overwrite the file?
Thanks
Click to expand...
Click to collapse
It should work like this. Unfortunatelly you can't mount system partition as read/write. That is because system is blocking this in some way.
Sent from my HTC Desire using XDA App
Another quick one:
I used the zip file which people are using in the rom manager. I rebooted into clockwork and selected apply update from zip and selected the file. Appears I broke the system though lol .
Is this not the right way of doing it?
Also how do you type commands in the recovery? :S
dnlgee said:
Try this, mate. [Click!]
Click to expand...
Click to collapse
Link dead ??!! "File does not exist. Make sure you specified correct file name."
Can we push an adblock host file to /etc/hosts/ if we are running a custom rom? Or is that just an asinine idea that would never work? The HTC browser is my preferred but pop-ups and ads are killing me. This or any other solution to this problem?
mcampos7 said:
Can we push an adblock host file to /etc/hosts/ if we are running a custom rom? Or is that just an asinine idea that would never work? The HTC browser is my preferred but pop-ups and ads are killing me. This or any other solution to this problem?
Click to expand...
Click to collapse
Is this coming from an unlocked phone?.. stock phone..
since we are write protected, I think you could prob push it, and it would work until reboot, to which you'd have to do it again.
Unlocked... Newts Rom
So, in theory I could pull an adblock host file from, say a Rom I ran on my DNA or Rezound and flash it using your empty flashable zip. Or are the host files device dependent?
mcampos7 said:
Unlocked... Newts Rom
So, in theory I could pull an adblock host file from, say a Rom I ran on my DNA or Rezound and flash it using your empty flashable zip. Or are the host files device dependent?
Click to expand...
Click to collapse
flash away my friend.
it's all blocking the same sites
at worst, you make a nand before hand.
Personally though I use the same hosts file for all my ROMS..
andybones said:
flash away my friend.
it's all blocking the same sites
at worst, you make a nand before hand.
Personally though I use the same hosts file for all my ROMS..
Click to expand...
Click to collapse
So flashing would be a more permanent solution to using an app like adblock or adaway?
I'm currently using the latter, but if anyone has a flashable zip which would be more permanent (I'm on unlocked stock ROM), I'd be so appreciative.
Thanks~!
If you have root from an unlocked bootloader and a custom rom with a kernel that does not WP system, yes.
---------- Post added at 05:37 PM ---------- Previous post was at 05:36 PM ----------
cyberstraz said:
So flashing would be a more permanent solution to using an app like adblock or adaway?
I'm currently using the latter, but if anyone has a flashable zip which would be more permanent (I'm on unlocked stock ROM), I'd be so appreciative.
Thanks~!
Click to expand...
Click to collapse
adaway writes a hosts file to /etc.... what do you think it does lol? you would be doing the exact same thing as flashing a zip but you get updated lists. adblock is the piece of crap one that redirects traffic.
cyberstraz said:
So flashing would be a more permanent solution to using an app like adblock or adaway?
I'm currently using the latter, but if anyone has a flashable zip which would be more permanent (I'm on unlocked stock ROM), I'd be so appreciative.
Thanks~!
Click to expand...
Click to collapse
Going to be looking into/working on this today.
123421342 said:
If you have root from an unlocked bootloader and a custom rom with a kernel that does not WP system, yes.
---------- Post added at 05:37 PM ---------- Previous post was at 05:36 PM ----------
adaway writes a hosts file to /etc.... what do you think it does lol? you would be doing the exact same thing as flashing a zip but you get updated lists. adblock is the piece of crap one that redirects traffic.
Click to expand...
Click to collapse
To answer your question, I was trying to determine whether flashing in recovery bypassed the read-only privileges which seem to be in place.
Why do people feel the need to mock those that only seek to learn?
Edit: I forgot to thank you for clarifying regarding the stock vs custom ROM. I'm not above appreciating input, regardless of how snarkily it was disseminated.
Thank you.
cyberstraz said:
To answer your question, I was trying to determine whether flashing in recovery bypassed the read-only privileges which seem to be in place.
Why do people feel the need to mock those that only seek to learn?
Edit: I forgot to thank you for clarifying regarding the stock vs custom ROM. I'm not above appreciating input, regardless of how snarkily it was disseminated.
Thank you.
Click to expand...
Click to collapse
Exactly why I am hesitant to post in this forum. We are in Q&A though, no? If you flash recovery in recovery it bypasses Write Protection. Write protection is only while system is booted (I think, before someone jumps down my throat), but now I'm wondering why it is so stupid to flash a host file? When Devs create a ROM with ad blocking do they not usually include an ad blocking host file, as Andy commented above, rather than an ad blocking app? Correct me if I am wrong.. I know you will.
AND I was totally unaware custom Kernels were available to us... I thought we were waiting for source. The Kernels most be posted under Original Development, cuz they aren't in the Dev section. Nope not there either! Where are these custom Kernels dip**** was talking about?!
cyberstraz said:
To answer your question, I was trying to determine whether flashing in recovery bypassed the read-only privileges which seem to be in place.
Why do people feel the need to mock those that only seek to learn?
Edit: I forgot to thank you for clarifying regarding the stock vs custom ROM. I'm not above appreciating input, regardless of how snarkily it was disseminated.
Thank you.
Click to expand...
Click to collapse
Did not mean it like that hence the lol. I believe recovery mode removes write protect.
Sent from my HTC6500LVW using xda app-developers app
No worries. I appreciate the follow up. Cheers
Sent from my HTC6500LVW using Tapatalk 4
I've been using this one on several of my devices. Works like a charm. I like it because you don't have to deal with an adblock app. Just flash in recovery. Read thru it, nandroid, and give it a shot!
http://forum.xda-developers.com/showthread.php?t=1916098
mcampos7 said:
Exactly why I am hesitant to post in this forum. We are in Q&A though, no? If you flash recovery in recovery it bypasses Write Protection. Write protection is only while system is booted (I think, before someone jumps down my throat), but now I'm wondering why it is so stupid to flash a host file?
Click to expand...
Click to collapse
Well I am running the BoneStock ROM and using root explorer, I simply dropped my 1MB host file in /etc/hosts and it never goes away on reboot. I don't see how that would be any different from using an app or flashing it from the bootloader.
firepacket said:
Well I am running the BoneStock ROM and using root explorer, I simply dropped my 1MB host file in /etc/hosts and it never goes away on reboot. I don't see how that would be any different from using an app or flashing it from the bootloader.
Click to expand...
Click to collapse
BoneStock has built in ad blocking, Did you have to install the host file or was it to kill additional sites?
one4thewings said:
BoneStock has built in ad blocking, Did you have to install the host file or was it to kill additional sites?
Click to expand...
Click to collapse
With the default install of bonestock I was still getting ads on some pages and in YouTube until I added my custom hosts file
hoof hearted said:
I've been using this one on several of my devices. Works like a charm. I like it because you don't have to deal with an adblock app. Just flash in recovery. Read thru it, nandroid, and give it a shot!
http://forum.xda-developers.com/showthread.php?t=1916098
Click to expand...
Click to collapse
If you have the ability to write to system this is a bad idea because you won't get updated definitions ala adaway
Sent from my HTC6500LVW using xda app-developers app
if you guys would be kind enough to hook me up with the missing links I could add them to my hosts file
thank you all
It's so much better without the ads
Sent from my HTC6500LVW using XDA Premium 4 mobile app
123421342 said:
If you have the ability to write to system this is a bad idea because you won't get updated definitions ala adaway
Sent from my HTC6500LVW using xda app-developers app
Click to expand...
Click to collapse
The cool thing about the motherlist is you can add the hosts link listed there in that thread to AdAway and it will be included with the auto-updates.
Combined, I haven't seen a single ad pop up since installing both. Love it.
sawedust said:
The cool thing about the motherlist is you can add the hosts link listed there in that thread to AdAway and it will be included with the auto-updates.
Combined, I haven't seen a single ad pop up since installing both. Love it.
Click to expand...
Click to collapse
I tried adaway and adblock and both had issues with my CM ROM (error messages or permanent icon on notification bar). The only one that worked for me is adfree. It also gets hostfiles on it's own so after first setup you don't have to worry about it.
http://adfree.bigtincan.com/
I root for two reasons: Tethering and ad blocking. I currently can't tether on my AT&T M8. Now I can't get ad blocking working. I have tried adaway and it can't apply the hosts file.
This is the same issue as with the M7. The system is writable, so it can't modify the hosts file. I tried flashing the hosts zip file manually, but that isn't working either. Anyone know of a workaround? If I can't block ads, this thing is going back. I'm starting to wonder why I even bothered unlocking my bootloader.
Update: neither Adaway or Adfree work. They randomly stop blocking ads and cause the phone to restart when you try to apply the hosts file. Adblock Plus does seem to be working well, however. I'd still prefer a hosts file method of blocking, but this seems to be the only solution without s-off.
If your rooted what about xposed framework, there is a really good ad blocking module you can download that works better than ad away etc not sure if you have to be s-off or not I was using it on my One M7, waiting to get the M8
Sent from my Nexus 7 using Tapatalk
you need root and atleast adaway to disable advertisments
mushages said:
you need root and atleast adaway to disable advertisments
Click to expand...
Click to collapse
I am rooted. Adaway does not work. In fact, it reboots the phone.
Sent from my iPad using Tapatalk HD
greyhulk said:
I am rooted. Adaway does not work. In fact, it reboots the phone.
Sent from my iPad using Tapatalk HD
Click to expand...
Click to collapse
I'm having same problem with adaway so I'm using adblock pro seems to be working ok search for it on xda
Neither will work right now because the system is protected. Kernel module is being worked on which will disable write protect, and then adblockers will work.
M.
mattman83 said:
Neither will work right now because the system is protected. Kernel module is being worked on which will disable write protect, and then adblockers will work.
M.
Click to expand...
Click to collapse
http://forum.xda-developers.com/showthread.php?t=2701816
I think this might be the answer
As an update: I was having issues with Adblock Plus as well (it stopped working a few times and had to be force closed after completely blocking my internet connection). I finally went here: http://forum.xda-developers.com/showthread.php?t=2327934
And flashed the Adaway hosts through TWRP. It flashed successfully and now all is well. Tested and working all ads are blocked. Does anyone know where I could find a more updated flashable hosts file? That one was from June of last year.
Thanks.
jaythenut said:
http://forum.xda-developers.com/showthread.php?t=2701816
I think this might be the answer
Click to expand...
Click to collapse
Thanks! That looks a tad risky at this point. I will wait until it's a little more tested. I managed to flash the hosts file manually, so I'm good for now.
greyhulk said:
As an update: I was having issues with Adblock Plus as well (it stopped working a few times and had to be force closed after completely blocking my internet connection). I finally went here: http://forum.xda-developers.com/showthread.php?t=2327934
And flashed the Adaway hosts through TWRP. It flashed successfully and now all is well. Tested and working all ads are blocked. Does anyone know where I could find a more updated flashable hosts file? That one was from June of last year.
Thanks.
Click to expand...
Click to collapse
Get it from here (might have to replace the file in your ZIP with this new one)...
http://forum.xda-developers.com/showthread.php?t=1916098
EddyOS said:
Get it from here (might have to replace the file in your ZIP with this new one)...
http://forum.xda-developers.com/showthread.php?t=1916098
Click to expand...
Click to collapse
That one doesn't work. It was the first one I tried to flash. It fails to flash in TWRP, at least the version installed on my M8.
I am using xposed module xad and it works great. The one in the xposed app wouldnt install for some reason so downloaded the apk and installed it that way. No more ads.
skoobee said:
I am using xposed module xad and it works great. The one in the xposed app wouldnt install for some reason so downloaded the apk and installed it that way. No more ads.
Click to expand...
Click to collapse
Details? First, Xposed is working on the M8? Second, where did you get the manual apk for ad blocking?
greyhulk said:
Details? First, Xposed is working on the M8? Second, where did you get the manual apk for ad blocking?
Click to expand...
Click to collapse
Yes xposed works great. As has been posted on a few threads you have to install xposed as a zip from recovery. I googled xad apk and it was one of the first few results that came up.
greyhulk said:
That one doesn't work. It was the first one I tried to flash. It fails to flash in TWRP, at least the version installed on my M8.
Click to expand...
Click to collapse
Take the hosts file and replace the one in the ZIP file that you already have
EddyOS said:
Take the hosts file and replace the one in the ZIP file that you already have
Click to expand...
Click to collapse
Not a bad suggestion. I may try that.
Sent from my HTC One_M8 using Tapatalk
AdBlock Plus is working for me. At least for now.
Correctly downloaded from the Amazon App-shop.
Thank you!!
I use adfree on my Verizon m8 and it has been working fine.
http://adfree.bigtincan.com
You do have to be rooted to use.
buddahj said:
I use adfree on my Verizon m8 and it has been working fine.
http://adfree.bigtincan.com
You do have to be rooted to use.
Click to expand...
Click to collapse
Adfree seems to work fine at first, but it will cause your phone to reboot when you update it. Unless you have S-off, it will have issues sim linking the host file and writing it.
Sent from my HTC One_M8 using Tapatalk
greyhulk said:
Adfree seems to work fine at first, but it will cause your phone to reboot when you update it. Unless you have S-off, it will have issues sim linking the host file and writing it.
Sent from my HTC One_M8 using Tapatalk
Click to expand...
Click to collapse
I was unaware of that. I've always been s-off while using it.
Hello,
On my h815 adaway don't block ads on xda youtube etc...
Solutions?
Umm, maybe a little more info, a screenshot, something..
Start with, did you enable it?
AdAway is working fine for me. I assume you are rooted? Have to restarted the device since installing AdAway?
I ran into the same issue on adaway 2.3 but with adaway 3.0 its working just fine
Yeah i´am rooted... I use this version, http://forum.xda-developers.com/showthread.php?t=2190753
On my previous phone (Nexus 6) don´t work too
I am using adfree now and it works Good.
adaway 3.0 is working perfectly on my rooted h812.
I recently rooted, downloaded v3 of adaway but can't click the install button?? Only cancel...
Sent from my VS986 using Tapatalk
Make sure you don't have a app like cf lumen running.
Sent from my LG-H815
liquidraven said:
I recently rooted, downloaded v3 of adaway but can't click the install button?? Only cancel...
Sent from my VS986 using Tapatalk
Click to expand...
Click to collapse
if you don't have something like cf. lumen (although with root it shouldn't have this issue.) you can adb it. adb install -r apknamehere.apk
you just need the apk and adb in the same folder.
Did you clear the proxy in the Access point settings (Settings => Wireless networks => More => Mobile networks => Access point names) ?
Use the adblocker in ROM Toolbox. It adds localhost redirects to your hosts file so it's much more low-level.
kyle1867 said:
Use the adblocker in ROM Toolbox. It adds localhost redirects to your hosts file so it's much more low-level.
Click to expand...
Click to collapse
How do you go about this?
Delete this, apologies.
Stankydanky702 said:
How do you go about this?
Click to expand...
Click to collapse
Download the app, go to the adblocker, click block, reboot.
sorry if i'm stating the obvious, but when you installed adaway on the nexus or lg, i assume you went in to the app and clicked 'download files and apply ad blocking' or words to that effect, then reboot?
onfirmed:WORKING me
Guys, this thread is nearly 4 months old
the_scotsman said:
Guys, this thread is nearly 4 months old
Click to expand...
Click to collapse
Just to dig it up again. It is working for me.
I'm digging this up as well. Adaway istalls fine, but when trying to turn it on, it fails to save hosts file. root explorer says that system folder has r/w permissions. Any suggestions?
UPDATE: Thanks to @squid2's insight, there's a better method that should work for everyone. Just download the attached script, remove the .txt extension, and drop into your su.d folder with proper permissions. For more information, see here and here.
------------------------------
This is all thanks to @nkk71, btw. Right now the fix is very hacky but I'm sure ROM devs will find a more appropriate fix soon.
I'm not sure if I want to reveal the fix publicly in case HTC's spies are monitoring the thread, lol....probably better safe than sorry. But go visit nkk71's profile and buy him many beers for figuring this out. And also find some posts by him and click "Thanks."
WARNING: Dragons ahead! Anything you flash to your device is done at your own risk!
EDIT: Alright, I'll publish a flashable zip here based on the 1.53.617.5 US Unlocked Edition. I've been testing the mod/hack for a few days now and have seen no ill effects. It should work fine on ROMs using that base.
I have NO IDEA if it'll work on ROMs using an International/Europe base or on CDMA. If you really want to try it, make sure you make a backup first! You will need to "Format Data" in TWRP and flash the standard SuperSU zip to remove forced encryption (or do it manually, if you know how).
Let the bricking begin!
P.S. Thanks of course also go to @Chainfire for SuperSU and su.d!
Just let the ROM cooks know =)
ChronoReverse said:
Just let the ROM cooks know =)
Click to expand...
Click to collapse
They already do
I don't really find it hacky, just another workaround
Unfortunately, due to personal reasons, I have personally decided not to share this.
(I know you above all others will understand)
It is not a secret, I have a certainly made it public (or so I thought) enough.
Unfortunately the controversy, I'm not willing to deal with... An innocent "share", turned ugly
I fully endorse this method, though I only had 7 mins of testing, before things got very ugly, a very very very very very very very very very very unfortunate incident.
So be it.
The method is still sound, and anybody who wishes to use it, I have neither any objections, just please test it.
Thanks
nkk71
Sent from my HTC 10 using Tapatalk
nkk71 said:
I don't really find it hacky, just another workaround
Unfortunately, due to personal reasons, I have personally decided not to share this.
(I know you above all others will understand)
It is not a secret, I have a certainly made it public (or so I thought) enough.
Unfortunately the controversy, I'm not willing to deal with... An innocent "share", turned ugly
I fully endorse this method, though I only had 7 mins of testing, before things got very ugly, a very very very very very very very very very very unfortunate incident.
So be it.
The method is still sound, and anybody who wishes to use it, I have neither any objections, just please test it.
Thanks
nkk71
Click to expand...
Click to collapse
You think I should post it? Or do you think HTC might find it and try and change their method?
Captain_Throwback said:
You think I should post it? Or do you think HTC might find it and try and change their method?
Click to expand...
Click to collapse
In my humble opinion, go for it
I doubt HTC will change the code, and it is a workaround [emoji2]
Unless something is being changed... Elsewhere (doubt it) , I Personally, have briefly tested and accept it
Sent from my HTC 10 using Tapatalk
nkk71 said:
In my humble opinion, go for it
I doubt HTC will change the code, and it is a workaround [emoji2]
Unless something is being changed... Elsewhere (doubt it) , I Personally, have briefly tested and accept it
Click to expand...
Click to collapse
Done.
This should be fun, lol. Let the brickings begin!
Captain_Throwback said:
Done.
This should be fun, lol. Let the brickings begin!
Click to expand...
Click to collapse
Well I did, trip verity,verified, and a few other things [emoji4]
Oh, wait, I was testing some thing els [emoji23]
Sent from my HTC 10 using Tapatalk
Looking at the logic in the HTC RIL library, in Pythonic pseudocode, it goes something like this:
Code:
if property_get("ro.crypto.state") != "encrypted":
if property_get("persist.radio.current.cnv", default="-1") == "-1":
if htcril_db_property_get("current.cnv") != "-1":
htcril_db_property_set("current.cnv", "-1")
Other libraries then query the htcril DB via the library, and behave differently if the current.cnv property is set in the DB. Based off this, I would guess that doing the following would have a similar effect without needing to hack the library:
Code:
setprop persist.radio.current.cnv 0
I haven't tried this, but I'm curious if restoring the stock libhtcril_db.so and setting this property would work.
squid2 said:
Looking at the logic in the HTC RIL library, in Pythonic pseudocode, it goes something like this:
Other libraries then query the htcril DB via the library, and behave differently if the current.cnv property is set in the DB. Based off this, I would guess that doing the following would have a similar effect without needing to hack the library:
I haven't tried this, but I'm curious if restoring the stock libhtcril_db.so and setting this property would work.
Click to expand...
Click to collapse
Brilliant! That works! Much easier/cleaner solution than hacking the lib
EDIT: Posted script in the OP. Bedtime!
Can anyone remind me/us the pros and cons of decrypting?
Sent from my Nexus 5 using XDA-Developers mobile app
Captain_Throwback said:
You think I should post it? Or do you think HTC might find it and try and change their method?
Click to expand...
Click to collapse
This?
So boot into TWRP, format data and flash regular SuperSu? What are the permissions for the Script ?
squid2 said:
Looking at the logic in the HTC RIL library, in Pythonic pseudocode, it goes something like this:
Code:
if property_get("ro.crypto.state") != "encrypted":
if property_get("persist.radio.current.cnv", default="-1") == "-1":
if htcril_db_property_get("current.cnv") != "-1":
htcril_db_property_set("current.cnv", "-1")
Other libraries then query the htcril DB via the library, and behave differently if the current.cnv property is set in the DB. Based off this, I would guess that doing the following would have a similar effect without needing to hack the library:
Code:
setprop persist.radio.current.cnv 0
I haven't tried this, but I'm curious if restoring the stock libhtcril_db.so and setting this property would work.
Click to expand...
Click to collapse
Captain_Throwback said:
Brilliant! That works! Much easier/cleaner solution than hacking the lib
EDIT: Posted script in the OP. Bedtime!
Click to expand...
Click to collapse
Nice :good:
Strangely enough, I couldn't get the property to stick, but I edited the init.rc directly, didnt use the su.d... maybe I put it in the wrong place
Black_Eyes said:
So boot into TWRP, format data and flash regular SuperSu? What are the permissions for the Script ?
Click to expand...
Click to collapse
Permissions for su.d scripts are 0700. If you want to put the script there while in recovery and you're using systemless root, you can use @osm0sis SUmount zip to mount the su.img and then the TWRP File Manager to copy the script over and change perms. Flash the SUmount zip again to unmount su.img, and then reboot.
Captain_Throwback said:
Permissions for su.d scripts are 0700. If you want to put the script there while in recovery and you're using systemless root, you can use @osm0sis SUmount zip to mount the su.img and then the TWRP File Manager to copy the script over and change perms. Flash the SUmount zip again to unmount su.img, and then reboot.
Click to expand...
Click to collapse
the flashable zip if i want to try on international rom...
i boot into twrp formata data to remove encryption flash super 2.65 stable flash your script and boot will that do?
SacredDeviL666 said:
the flashable zip if i want to try on international rom...
i boot into twrp formata data to remove encryption flash super 2.65 stable flash your script and boot will that do?
Click to expand...
Click to collapse
Don't use the zip. That's the old hack. Use the script. You have to manually place it.
And use the latest SuperSU Beta, not the stable.
Captain_Throwback said:
Don't use the zip. That's the old hack. Use the script. You have to manually place it.
And use the latest SuperSU Beta, not the stable.
Click to expand...
Click to collapse
okay thank you so i would use the latest supersu 2.74beta zip from recovery.
the script isn't downloading for me when i click on it just opens a page with below message
#!/system/bin/sh
# Allow mobile network while decrypted
# thanks @squid2 from XDA for the easy fix!
setprop persist.radio.current.cnv 0
... from pc i am..
SacredDeviL666 said:
okay thank you so i would use the latest supersu 2.75beta zip from recovery.
the script isn't downloading for me when i click on it just opens a page with below message
#!/system/bin/sh
# Allow mobile network while decrypted
# thanks @squid2 from XDA for the easy fix!
setprop persist.radio.current.cnv 0
... from pc i am..
Click to expand...
Click to collapse
Right-click and Save As....
Captain_Throwback said:
Right-click and Save As....
Click to expand...
Click to collapse
thanks got it!!!
place the script in system/su.d folder with the permissions/boot to recovery format data/flash latest supersu beta 2.74 and the let boot finish.....
at htc green logo now...fingers crossed... by the way i was on system mode su prior to trying this mod.
now optimizing the apps...lee's r82 international
---------- Post added at 01:38 PM ---------- Previous post was at 01:16 PM ----------
@Captain_Throwback
came back as encryped only....
the script permission i gave was rwx r-x r-x