**Disclaimer**
**I Take NO Responsibility in bricking your device**
For those of you who have a rooted device, ads suck, don't they?
Well here is the most up-to-date HOSTS file to help remove most ads (including ads in games/apps)
Needed:
Rooted Device
Root Explorer (Or another file manager that has /system/ directory access)
Attached hosts File
Step 1: Download and unpack hosts.zip
Step 2: Transfer hosts file to internal memory
Step 3: BACKUP Original hosts file (hosts.backup)
Step 4: Replace new hosts file from internal memory into directory /system/etc/
-Delete original (MAKE SURE THERE IS A BACKUP)
-Copy in new hosts
Step 5: Give full permissions to new hosts file
Step 6: Reboot
If there is any connectivity problems, replace the old hosts file
What this does:
Just like any other hosts file (on your PC), this tells the OS to route any website/ip that fall into a giant list of "ad" domains, to route back to 127.0.0.1 (you)... meaning, when an app/website asks for www.i_am_an_ad.com, instead of getting the ad, it gets a null response from yourself!
If you didn't understand the directions or what this is:
I DO NOT recommend customizing your Prime. I come from a Galaxy S, which you don't need balls to mess with, its nearly unbrickable.. this device..however is.. Do no attempt any messing with the /system/ folder without knowledge!
How does this differ than using an ad block app like Adfree?
Not trying to be a prick ... just curious.
Superguy said:
How does this differ than using an ad block app like Adfree?
Not trying to be a prick ... just curious.
Click to expand...
Click to collapse
no bloat. and can actually be incorporated into a ROM
also, this blocks ads at the source, i dont know how adfree blocks it, but i dont ever use ad-blocking programs, that means they the app can see your traffic..
ide rather some internal script doing the job it does with every bit of data in my phone than some external app.. we all should know about DOLPHIN logging user traffic...
Ad-away is the best app. It dies same thing, just installs a hosts file. Makes it in easy ui, and more noob proof. Also easier to update hosts file.
I like this way too, especially like you mentioned to be included in roms.
Sent from my Galaxy S2
There are multiple apps in the market that do exactly this...but easier.
RussianMenace said:
There are multiple apps in the market that do exactly this...but easier.
Click to expand...
Click to collapse
yes, but said aps, again, cannot be included in roms. this is mainly for custom roms.
personally, i would rather incorporate this into my roms before i flash, then download some app that does it
biggem001 said:
yes, but said aps, again, cannot be included in roms. this is mainly for custom roms.
personally, i would rather incorporate this into my roms before i flash, then download some app that does it
Click to expand...
Click to collapse
I'd rather use an app that updates the host file with the latest ad addresses as they become known rather replacing it manually. But that's just me
Charsher47 said:
I'd rather use an app that updates the host file with the latest ad addresses as they become known rather replacing it manually. But that's just me
Click to expand...
Click to collapse
again.. its for people making roms, mainly.
Ok, even if you bake it into a ROM, which is "what this is for" you would still have to manually update the host file to adapt to new Ad domains....yes?
I'm not trying to crap on your work here, just trying to understand the advantages this has over using a market app, which in itself can be baked into a ROM with developers permission.
yeah, but every release culd have it updated. I know most developers just don't put out one version of the rom and call it a day. Most update there roms at least 2-3 times a month if there is still a need for it.
doeboy1984 said:
yeah, but every release culd have it updated. I know most developers just don't put out one version of the rom and call it a day. Most update there roms at least 2-3 times a month if there is still a need for it.
Click to expand...
Click to collapse
agreed. this just reduces bullcrap 3rd party apps you don't need. roms are updated weekly at the latest, normally (at least in my galaxy s forum). throw in the host file every time and you are set. not some
biggem001 said:
**Disclaimer**
**I Take NO Responsibility in bricking your device**
For those of you who have a rooted device, ads suck, don't they?
Well here is the most up-to-date HOSTS file to help remove most ads (including ads in games/apps)
Needed:
Rooted Device
Root Explorer (Or another file manager that has /system/ directory access)
Attached hosts File
Step 1: Download and unpack hosts.zip
Step 2: Transfer hosts file to internal memory
Step 3: BACKUP Original hosts file (hosts.backup)
Step 4: Replace new hosts file from internal memory into directory /system/etc/
-Delete original (MAKE SURE THERE IS A BACKUP)
-Copy in new hosts
Step 5: Give full permissions to new hosts file
Step 6: Reboot
If there is any connectivity problems, replace the old hosts file
What this does:
Just like any other hosts file (on your PC), this tells the OS to route any website/ip that fall into a giant list of "ad" domains, to route back to 127.0.0.1 (you)... meaning, when an app/website asks for www.i_am_an_ad.com, instead of getting the ad, it gets a null response from yourself!
If you didn't understand the directions or what this is:
I DO NOT recommend customizing your Prime. I come from a Galaxy S, which you don't need balls to mess with, its nearly unbrickable.. this device..however is.. Do no attempt any messing with the /system/ folder without knowledge!
Click to expand...
Click to collapse
Well I thank you for your time and effort... I followed your directions and BAM my prime is adfree...
AdFree is one of the first root apps I downloaded. Just easier as a user and I love blocking ads!
Lock-N-Load said:
AdFree is one of the first root apps I downloaded. Just easier as a user and I love blocking ads!
Click to expand...
Click to collapse
Was just coming in here to say that. Way to beat me to it
Atleast upload a more recent one...
http://www.multiupload.com/SAQUI2FOBH
Lock-N-Load said:
AdFree is one of the first root apps I downloaded. Just easier as a user and I love blocking ads!
Click to expand...
Click to collapse
I use AdAway. There's an updated host almost every day.
Lock-N-Load said:
AdFree is one of the first root apps I downloaded. Just easier as a user and I love blocking ads!
Click to expand...
Click to collapse
Itaintrite said:
I use AdAway. There's an updated host almost every day.
Click to expand...
Click to collapse
yeah, they are great and everything, but that's just one more app you have to run in the background, taking up that much more system resources.
Swiftks said:
yeah, they are great and everything, but that's just one more app you have to run in the background, taking up that much more system resources.
Click to expand...
Click to collapse
i agree, when we start pushing roms out, it'll be much easier to just update the hosts files with the ROMS then installing that app every time you update the rom
biggem001 said:
i agree, when we start pushing roms out, it'll be much easier to just update the hosts files with the ROMS then installing that app every time you update the rom
Click to expand...
Click to collapse
I use adfree and I don't let it run in background and it still works, you only install app again if you update to different ROM, or you must swipe everything every time, but you have to install all of your apps again as well, install one more app won't make a dent to your finger, or you can use Titanium Backup
I'm surprised this hasn't been baked in CM7/8 or the upcoming CM9 yet.
Would be pretty easy to add it in the customize for most any ROM.
Sent from my DROID3 using Tapatalk
Related
If we have a base rom even from a backup.
Couldn't we edit simple things in the rom. Like host files for blocking adds. Add the changes that the super charger script makes. Disable/remove alot of blur like we do now with titanium backup. Longer wifi scan times. ect.
How would you get the base rom and how do you edit the files contained in the rom. I'm used to linux I run it at the house. If its like editing cfg files and what not. I might be able to make my own rom for myself.
Figured out you can open apk files easily with winrar.
And if all else fails sbf here i come
infinity8x3 said:
If we have a base rom even from a backup.
Couldn't we edit simple things in the rom. Like host files for blocking adds. Add the changes that the super charger script makes. Disable/remove alot of blur like we do now with titanium backup. Longer wifi scan times. ect.
How would you get the base rom and how do you edit the files contained in the rom. I'm used to linux I run it at the house. If its like editing cfg files and what not. I might be able to make my own rom for myself.
And if all else fails sbf here i come
Click to expand...
Click to collapse
Can't wait to see what you come up with... I'll test it.
You don't need a custom rom in order to block ads. There its a hosts file floating around that does that in one of the X2's subforum.
Sent from my DROID X2 using XDA App
or get ad free from the market...and guess what? it's free! >.>
It's true that those small changes don't require a custom rom but I think tinkering with the idea and trying to put something together would be a great learning experience and could lead to the first "custom rom".
Questions should be posted in the general forum. I will recommend you visit the chef central forums where they have all the tools and possible many answers for rom building.
Cheers and thread moved.
Well as many of you know we're over most of the hurdles we needed to jump with the CM7 build for Nook tablet.
Updates for the internal version are simple via CWM, the SD version is not so simple of course.
I'm assuming that it should be possible to built an APK that gains superuser permissions then copies the new files to the system. Can anybody confirm this is possible please?
We need to know that we can tell our SD user that they can update their version just as easy as the internal user
Thanks in advance for your help again everyone!
Well presumably this is how ROM Manager and Metamorph both do their thing, just in a slightly more round about way (as they don't come with the files they need to copy). I'm almost 100% sure this is possible, but I've never tried it personally.
EDIT: Looks like this is how you'd do it: http://developer.android.com/reference/java/io/File.html. Specifically the renameTo() method.
CelticWebSolutions said:
Well as many of you know we're over most of the hurdles we needed to jump with the CM7 build for Nook tablet.
Updates for the internal version are simple via CWM, the SD version is not so simple of course.
I'm assuming that it should be possible to built an APK that gains superuser permissions then copies the new files to the system. Can anybody confirm this is possible please?
We need to know that we can tell our SD user that they can update their version just as easy as the internal user
Thanks in advance for your help again everyone!
Click to expand...
Click to collapse
Well there are about a dozen ways to do this. First of one of the hardest things is comming up with the commands/script. I can defiantly do this. If you want an apk, there are a few guys whom could port my script to an apk. I'm going to make a script here that will format, and create partitions and extract directly from the nook, no need to go through the fancy formatting and such, just go into terminal and run the script. Ill post a prototype for you to have the testers test!
Do you think something like BacksideUpdater inside custom ROM for LG Optimus V?
made by JerryScript
JerryScript i very nice guy, I bet if you ask him, he will let you play with his code
if is it what you looking for
Yes, this is possible. I wrote an app that flashes the recovery partition for my older Froyo phone in the very rudimentary Basic4Android. Copying files under root privileges was part of this process. Fairly easy if you find the right coding examples in whatever your development platform of choice.
xdajunkman said:
Yes, this is possible. I wrote an app that flashes the recovery partition for my older Froyo phone in the very rudimentary Basic4Android. Copying files under root privileges was part of this process. Fairly easy if you find the right coding examples in whatever your development platform of choice.
Click to expand...
Click to collapse
So one of the problems is its not really copying. Its more of an extraction from one place to another. We are required to use dd, and fdisk(for formatting).
GREAT! I was worried updates would be to complicated for people
Sent from my Nook Tablet using xda premium
... and I was worried that I might have to wipe my NT clean again to get the updates. After a week with this wonderful upgrade, I've got a LOT of customization I don't want to lose...
Whoops, wrong button with the thanks. Anyway, it occurs to me you could just have people run a script from a terminal emulator. That would probably be the simplest way to do it. Make an Update folder on the SD card, add it to the PATH by default, and users could just copy over the update files and run the script. Just a thought.
Sycobob said:
Whoops, wrong button with the thanks. Anyway, it occurs to me you could just have people run a script from a terminal emulator. That would probably be the simplest way to do it. Make an Update folder on the SD card, add it to the PATH by default, and users could just copy over the update files and run the script. Just a thought.
Click to expand...
Click to collapse
Has to be simple, something like copy an update.zip onto the SD card then run the apk which will automatically run the update in the zip But my knowledge of such things is limited so I need help there
Same process. With the above method, the user would only have to copy over the file, open a terminal, and type 'update'. With the apk idea you just have to add a little more time for someone to actually write the app (not that it would take too long).
Sycobob said:
Same process. With the above method, the user would only have to copy over the file, open a terminal, and type 'update'. With the apk idea you just have to add a little more time for someone to actually write the app (not that it would take too long).
Click to expand...
Click to collapse
Hmm.... that sounds good.
Anybody know how to actually implement it ?
Dammit, idk why I keep hitting the thanks button thinking it's reply >.>
Anyway, it's just a matter of setting the PATH variable to include /sdcard/Update/ or something similar. To make an actual update, make a folder called Update, fill it with all the files that need to be copied over (probably in a directory structure), and write a script that actually copies everything over. You'll need to make sure sh is in /system/bin (I think it is by default).
You could zip the the files as well, using gunzip (busybox?) to extract them before copying them, then deleting them when you're done, just to keep it cleaner for the user.
The only downside to all this is that I don't know how you would flash a kernel.
Sycobob said:
Dammit, idk why I keep hitting the thanks button thinking it's reply >.>
Click to expand...
Click to collapse
That makes two of us!
Sycobob said:
Anyway, it's just a matter of setting the PATH variable to include /sdcard/Update/ or something similar. To make an actual update, make a folder called Update, fill it with all the files that need to be copied over (probably in a directory structure), and write a script that actually copies everything over. You'll need to make sure sh is in /system/bin (I think it is by default).
You could zip the the files as well, using gunzip (busybox?) to extract them before copying them, then deleting them when you're done, just to keep it cleaner for the user.The only downside to all this is that I don't know how you would flash a kernel.
Click to expand...
Click to collapse
I'm guessing you'd just flash it as usual, surely that one is the easiest? Copying stuff to boot partition would hopefully be just as simple, I was mainly worried about updating system files. I could do with building one for the current update to test the theory!
This gets asked quite often so I decided to make a guide on how to do this. It's a very simple process and you will need something to either freeze the .apk or something to rename it. You will also need to be rooted.
Freezing:
Titanium Backup
Rom Toolbox
Renaming:
Root Explorer
ES File Explorer
The file you will be freezing/renaming is titled SDM.apk, it is located in the system/app directory. Navigate there and freeze/rename with your app of choice. If you're going the renaming route, rename it to sdm.apk.bak, or anything else you would like as long as you change the file extension. If anyone wants a different application added to list post here or PM me and I will add it. I just listed those because they're some of the popular ones and I have used all of them myself at one time or another.
Hi, is this process make stop any apps updates and update notitfications, because except title you didn't say anything about it?
blackfire74 said:
Hi, is this process make stop any apps updates and update notitfications, because except title you didn't say anything about it?
Click to expand...
Click to collapse
No this is for the ota updates
Hit thanks if I helped you out. Doing a little bit of reading goes a long way. Sent via tapatalk. now Free
Ok, this may be answered elsewhere, I don't know. "Search is temporarily unavailable" I am trying to understand how I am supposed to work with the backup from CWM. I understand that I should have a System image that I can work in, but what I have is 3 files in its place. System.ext4.tar, System.ext4.tar.a, and System.ext4.tar.b. All three files are broken to some degree.
System.ext4.tar is a zero byte file.
System.ext4.tar.a appears to be a spanned tar file that 7ZIP/WinRAR simply think was cut-off (never asks for the second file, and complains of unexpected End of Archive)
System.ext.4.tar.b appears to be the second part of the archive, but nothing will open it.
So, how do I get to a point I have a complete archive that I can edit? Or do I need to use different software than CWM to back up the phone?
Thanks for the help guys.
waldojim said:
Ok, this may be answered elsewhere, I don't know. "Search is temporarily unavailable" I am trying to understand how I am supposed to work with the backup from CWM. I understand that I should have a System image that I can work in, but what I have is 3 files in its place. System.ext4.tar, System.ext4.tar.a, and System.ext4.tar.b. All three files are broken to some degree.
System.ext4.tar is a zero byte file.
System.ext4.tar.a appears to be a spanned tar file that 7ZIP/WinRAR simply think was cut-off (never asks for the second file, and complains of unexpected End of Archive)
System.ext.4.tar.b appears to be the second part of the archive, but nothing will open it.
So, how do I get to a point I have a complete archive that I can edit? Or do I need to use different software than CWM to back up the phone?
Thanks for the help guys.
Click to expand...
Click to collapse
Well, I found a solution for now. Fire up Linux, use cat to combine all three files, then use tar to extract the contents. Not sure why this needed split in the first place, but at least the files can be extracted.
I have managed to remove the APKs I do not want, and made a new system.ext4.tar file (all in Linux), but need to know what else I have to do to make the system image usable.
I found several guides on making a ZIP file, but I didn't want to necessarily go through all that. I backed up everything, so what I would like to know, is what all needs to change so that I can use the separate files as they are, and simply do a CWM "restore" function?
I know I sound like a complete noob at this point, and will deal with the related comments. However, please understand, I don't want the heavily modified rom packs. I simply wanted a rom VOID of all the Verizon bloatware, and have the Verizon tethering restraints removed. I have them all disabled now, and 3rd party tethering is working quite well. So I would rather not have that garbage wasting space. Right now, it looks like I may save 250MB or so.
Any help would be appreciated. Thanks.
waldojim said:
I have managed to remove the APKs I do not want, and made a new system.ext4.tar file (all in Linux), but need to know what else I have to do to make the system image usable.
I found several guides on making a ZIP file, but I didn't want to necessarily go through all that. I backed up everything, so what I would like to know, is what all needs to change so that I can use the separate files as they are, and simply do a CWM "restore" function?
I know I sound like a complete noob at this point, and will deal with the related comments. However, please understand, I don't want the heavily modified rom packs. I simply wanted a rom VOID of all the Verizon bloatware, and have the Verizon tethering restraints removed. I have them all disabled now, and 3rd party tethering is working quite well. So I would rather not have that garbage wasting space. Right now, it looks like I may save 250MB or so.
Any help would be appreciated. Thanks.
Click to expand...
Click to collapse
Backups really aren't meant to be unzipped and played with. Usually bloat removal is done while booted into the system or you can unpackage a Rom and remove the bloat there and then repackage it and flash it then make your backup that doesn't contain any bloat. Using the xda kitchen tools from dsxda I believe is the name
Sent from my HTC6435LVW using XDA Premium HD app
.torrented said:
Backups really aren't meant to be unzipped and played with. Usually bloat removal is done while booted into the system or you can unpackage a Rom and remove the bloat there and then repackage it and flash it then make your backup that doesn't contain any bloat. Using the xda kitchen tools from dsxda I believe is the name
Sent from my HTC6435LVW using XDA Premium HD app
Click to expand...
Click to collapse
I think this is where some of my confusion comes from - it was never zipped. There was a group of tarred files, an MD5sum and a few other items. But nothing there was zipped.
waldojim said:
I think this is where some of my confusion comes from - it was never zipped. There was a group of tarred files, an MD5sum and a few other items. But nothing there was zipped.
Click to expand...
Click to collapse
I guess what I meant to say by "zipped" was just in general they are compressed by the recovery in a way that it knows how to go and use them to restore data to the device.
You can fix the extsd write lock by using root explorer navigating to etc\platform\permissions.xml
You need to mount as RW and edit the file to match what I'm pasting below.
You can ignore the middle part about syscope info but change your permissions for "write_external_storage" the "access_all_external_storage" and the "write_external_storage"
Don't delete anything from the file or do this without paying attention. Do not alert the syscope permission in between the 2nd and 3rd permissions that relate to storage.
I found this method through Google but it's worked for me so fast with no problems. If you use root explorer and open the file in text editor when you save the modified file, the original file will have .bak appended to it. The guide I used only changed 2 of the 3 permissions I'm saying to edit but the sd lock fix went away after restarting but since I changed the permissions to what I changed below is been working gray even after restarting.
Remember be careful with how you edit the file, only change it in the places I showed to make sure there aren't any complications. If you type it manually make sure to match the formatting and symbols exactly. If you ate going to cut/paste make sure only to change the permissions to exactly how I show it.
I'm not responsible for any damage or issues caused by following this method incorrectly. Remember to save the file with the original name of permissions.xml and then restart the phone to check your now writable ext sd card.
Much easier to use "SDFix: KitKat Writable MicroSD":
https://play.google.com/store/apps/details?id=nextapp.sdfix
Rodger
I haven't tried that one but I've used the xposed framework app that is supposed to enable extsd write but it didn't seem to work properly for me or was at best unreliable when I tried it. I like knowing what patches or fixes are doing behind the scenes in case I need to change them or if there's a problem or an update and it stops working you can do it yourself especially when its add easy as copy and paste
rbird2 said:
Much easier to use "SDFix: KitKat Writable MicroSD":
https://play.google.com/store/apps/details?id=nextapp.sdfix
Rodger
Click to expand...
Click to collapse
This one hasn't worked for me very much on a few ROMs but I did have a little better luck using the Xposed module mentioned above.
Many thanks for the post, OP. I'll add that to my notes and try it on the next ROM that gives me write issues.
Awesome glad to be able to help. .. when I first upgrades yo NG6 I couldn't believe Google could screw up one of the best features in android phones compared to the iphone. At least we're able to workaround it in the current versions at least fornow
nj12nets said:
Awesome glad to be able to help. .. when I first upgrades yo NG6 I couldn't believe Google could screw up one of the best features in android phones compared to the iphone. At least we're able to workaround it in the current versions at least fornow
Click to expand...
Click to collapse
People wonder why Google apps which work fine are still considered "beta." It's because Google isn't done with something until they screw it up completely, preferably also changing the UI a zillion times so it's unusable on more than one level.
rbird2 said:
Much easier to use "SDFix: KitKat Writable MicroSD":
https://play.google.com/store/apps/details?id=nextapp.sdfix
Rodger
Click to expand...
Click to collapse
This one as well...
https://play.google.com/store/apps/details?id=jrummy.sdfix
Thanks for adding the app add an option but can you give an idea of how well or functions and its reliability
I just rooted my phone a few days ago. My phone decided to upgrade to NG6 by itself and it crippled the SD card almost completely. I had some work arounds, but this just made it so much harder. I downgraded to NC5, had a problem, did a full reset and redid my phone. Did Towelroot V3, SuperSU, turned SDM.apk and FWUpgrade.apk into backups. Then I did the SDFix app, rebooted and now the SD card works like it did with MK2. I'm very pleased.