[Q] how to set up ad-free - myTouch 3G Slide Q&A, Help & Troubleshooting

I install the app and try to update the hosts file but it gets an error. Is there something I have todo in terminal?

ImHuge07 said:
I install the app and try to update the hosts file but it gets an error. Is there something I have todo in terminal?
Click to expand...
Click to collapse
My best guess would be that the hosts file is in /system, which is write protected since our phone is s-ON. So Unless you get aufs or some sort of r/w overlay, you cannot modify the hosts file. You CAN do it manually through recovery and adb but you can't use an app to do it from within the system.

MusicMan374 said:
My best guess would be that the hosts file is in /system, which is write protected since our phone is s-ON. So Unless you get aufs or some sort of r/w overlay, you cannot modify the hosts file. You CAN do it manually through recovery and adb but you can't use an app to do it from within the system.
Click to expand...
Click to collapse
Ah ok thanks.
Do you know how to do it?

use this guide for the incredible. it's the same thing for the mytouch slide
Code:
http://www.incredibleforum.com/forum/htc-incredible-hacks/2226-how-get-adfree-android-working-htc-incredible.html

Related

Having trouble modifying /sys files

Hey Everyone,
Trying to modify /sys/module/msm_otg/parameters/usbhost_charge_mode from it's default value of 'Y' to '1' in order to enable usb charging + OTG while using ElementalX's kernel. No matter what I do, I get either access is denied, or when trying to commit a change with sysctl I get nothing as the changes aren't being saved. Been working on this for the past 6 hours and can't figure it out!!! I know there's an easy straight forward way to do this, just can't figure it out!
Please help!!
Thanks,
Noob
Youve mounted R/W right? Or should I say write? Ahah software puns.
Sent from my Nexus 7 using XDA Free mobile app
Mounted as r/w and rooted...
THEBANDIT420 said:
Youve mounted R/W right? Or should I say write? Ahah software puns.
Sent from my Nexus 7 using XDA Free mobile app
Click to expand...
Click to collapse
Yeah, meant to add that detail last night but forgot in my frustration. Mounted as R/W, also, did a chmod 777 on the file as well to verify perms were correct.
Tried doing all this work via terminal vi which didn't work, then tried doing an adb pull, update the file adb push, which resulted in a permissions failure. Everything leads me to believe that my root isn't a FULL root; however, I can't find another method of performing said root. Used WugFresh Nexus Root Toolkit v1.8.3 to perform root.
Thanks for your help man,
Noob
Anyone?
Can anyone help? This is driving me absolutely insane!
n00b5auc3 said:
Can anyone help? This is driving me absolutely insane!
Click to expand...
Click to collapse
Try to do that with Root Explorer
Here's what I've done so far
matcho13579 said:
Try to do that with Root Explorer
Click to expand...
Click to collapse
Just tried what you suggested, it appeared to save; however, upon verification, the file reverted from '1' back to 'Y'.
So far I've tried:
Using a chmod 777 on the file via su terminal, edit file with vi, attempt to save - result - failure..
Using ES File Explorer with root permissions and mount /system in RW enabled, nav to file and edit with ES text editor, save - result - failure...
Mount /system as RW using some app I can't remember, then navigate using ES File Explorer to location, edit using ES text editor, save - result - failure...
adb pull on the file, update, adb push back to location - result - failure
su attempt to delete, move, and rename file in an effort to replace it - result - failure....
I'm pretty sure whoever made that file had ninja training, because every time I try to touch it it totally evades me. -_- Anyways, thanks for the help in advance.
n00b
Anyone? Bueller.... Bueller?
Someone has to have ran into this problem before....

[Q] can someone tell me how to avoid bootloop?

can someone tell me? how to avoid bootloop when we modified something in system partition? i mean sometimes i always get a problem with bootloop, just like that install a superuser MOD (services.jar) bootloop when restart. i still locked bootloader. can i push any file or something without must turn on the phone. like use any adb debugging?
Nicklas Van Dam said:
can someone tell me? how to avoid bootloop when we modified something in system partition? i mean sometimes i always get a problem with bootloop, just like that install a superuser MOD (services.jar) bootloop when restart. i still locked bootloader. can i push any file or something without must turn on the phone. like use any adb debugging?
Click to expand...
Click to collapse
When you modify something on the system partition it is advised that you set the permissions to it. When you push SUPERUSERMOD to the system you are pushing it with 0664 (I think) permissions, it needs 0644 permissions to run and execute. You can easily push your files to your device and set the permissions using ADB.
gamer649 said:
When you modify something on the system partition it is advised that you set the permissions to it. When you push SUPERUSERMOD to the system you are pushing it with 0664 (I think) permissions, it needs 0644 permissions to run and execute. You can easily push your files to your device and set the permissions using ADB.
Click to expand...
Click to collapse
ya, i understand with android sdk right? ya ya thanks ya!!!
Nicklas Van Dam said:
ya, i understand with android sdk right? ya ya thanks ya!!!
Click to expand...
Click to collapse
Yes it is, drop me a PM if you need any of the codes to push the file to the system partition.
some code?
gamer649 said:
Yes it is, drop me a PM if you need any of the codes to push the file to the system partition.
Click to expand...
Click to collapse
i think the first code is adb shell and then su, but before that i active the usb debugging and then apply the root permission do this command
mount -o remount rw "/system" to mount system. and
do cp,rm and maybe chmod to copy,delete and change permission right? are still any code that i still don't know it?

[Q] Accidentally modified Framework

Like a dummy I tried to rename framework-res while using my nexus so I could replace it with an edited one (deb rooted, stock 4.4.4 rom, franco -17 kernel)
Now Im trying to ADB in to rename the original file so it will boot again.
I'm connected to the nexus in ADB but when I try to pull or rename the file I always get some sort of error.
I was able to adb push a framwork file I downloaded on my computer but it still wouldnt boot. Im assuming it was bad.
Any help is much appreciated!
thanks!
Rhatfield25 said:
Like a dummy I tried to rename framework-res while using my nexus so I could replace it with an edited one (deb rooted, stock 4.4.4 rom, franco -17 kernel)
Now Im trying to ADB in to rename the original file so it will boot again.
I'm connected to the nexus in ADB but when I try to pull or rename the file I always get some sort of error.
I was able to adb push a framwork file I downloaded on my computer but it still wouldnt boot. Im assuming it was bad.
Any help is much appreciated!
thanks!
Click to expand...
Click to collapse
The reason it would not boot with the one you pushed to the device is probably because you have to set permissions correctly after the push. Framework res should probably be set to rw-r--r--
Run this after the push, or if the file is still on the phone, run it now.
Code:
adb shell
su
chmod 644 /system/framework/framework-res.apk
SwoRNLeaDejZ said:
The reason it would not boot with the one you pushed to the device is probably because you have to set permissions correctly after the push. Framework res should probably be set to rw-r--r--
Run this after the push, or if the file is still on the phone, run it now.
Code:
adb shell
su
chmod 644 /system/framework/framework-res.apk
Click to expand...
Click to collapse
I will give it a shot the second I get home! Thank you so much for the help. So by default files pushed to the system do not have full read and write permissions?
Thanks again!
Rhatfield25 said:
I will give it a shot the second I get home! Thank you so much for the help. So by default files pushed to the system do not have full read and write permissions?
Thanks again!
Click to expand...
Click to collapse
Yes, most of the time, pushed files will copy with bad permissions. Every time I've ever edited a system APK, I've had to subsequently set permissions before it would act correctly. Might not be 100% your issue, but it's definitely worth a shot.
SwoRNLeaDejZ said:
Yes, most of the time, pushed files will copy with bad permissions. Every time I've ever edited a system APK, I've had to subsequently set permissions before it would act correctly. Might not be 100% your issue, but it's definitely worth a shot.
Click to expand...
Click to collapse
Well now Ive run into a new problem. When I SU to get root access it tells me that /sbin/sh isnt found.
I rooted the n7 with cf autoroot.
this would be a whole lot easier if twrp would mount the tablet so I could just upload and flash a zip to update it.
Well I was able to sideload the boot animation herehttp://forum.xda-developers.com/showthread.php?t=2591471 just to confirm that sideload was working. I rebooted and it worked but still will not get past the boot animation.
The framework file simply needs to be put in /system right? so the command would look like
abd sideload framework-res.apk /system
Is that right?
Rhatfield25 said:
Well now Ive run into a new problem. When I SU to get root access it tells me that /sbin/sh isnt found.
I rooted the n7 with cf autoroot.
this would be a whole lot easier if twrp would mount the tablet so I could just upload and flash a zip to update it.
Click to expand...
Click to collapse
What about trying to use the terminal emulator in twrp?
Rhatfield25 said:
Well I was able to sideload the boot animation herehttp://forum.xda-developers.com/showthread.php?t=2591471 just to confirm that sideload was working. I rebooted and it worked but still will not get past the boot animation.
The framework file simply needs to be put in /system right? so the command would look like
abd sideload framework-res.apk /system
Is that right?
Click to expand...
Click to collapse
You need to fix the framework file before you can boot. Try running the permission command without su first.

help! pushing adaway hosts file

Has anyone been able to do this yet? I don't feel like rooting anymore since all I use root for is to use AdAway and getting OTA updates is just a PITA with having to RUU, restore all my stuff, just takes forever.
Apparently you can adb push a modded hosts file in TWRP and I've done so successfully, but everytime I reboot phone it reverts back to the stock hosts file (1 KB) and none of my changes are made.
I'm not pushing to the wrong place. I can do a adb pull immediately after and it retrieves the modified hosts file I want, it just doesn't stay that way after I reboot.
The process I'm doing:
Boot into TWRP
ADB pull stock hosts file
ADB push modded hosts file
CHMOD 0644 using TWRP file manager
Reboot
Test in browser/apps
Doesn't work
Boot back into TWRP
ADB pull hosts file
It's reverted back to stock 1KB unmodified
Anyone with more experience pls chime in, would be greatly appreciated.
cauqazn said:
Has anyone been able to do this yet? I don't feel like rooting anymore since all I use root for is to use AdAway and getting OTA updates is just a PITA with having to RUU, restore all my stuff, just takes forever.
Apparently you can adb push a modded hosts file in TWRP and I've done so successfully, but everytime I reboot phone it reverts back to the stock hosts file (1 KB) and none of my changes are made.
I'm not pushing to the wrong place. I can do a adb pull immediately after and it retrieves the modified hosts file I want, it just doesn't stay that way after I reboot.
The process I'm doing:
Boot into TWRP
ADB pull stock hosts file
ADB push modded hosts file
CHMOD 0644 using TWRP file manager
Reboot
Test in browser/apps
Doesn't work
Boot back into TWRP
ADB pull hosts file
It's reverted back to stock 1KB unmodified
Anyone with more experience pls chime in, would be greatly appreciated.
Click to expand...
Click to collapse
Are you just unlocked?
Sent from my HTC6545LVW using Tapatalk
I am sure its possible via TWRP but you will have to mount system first otherwise you are just flashing into the TWRP system itself.
But the moment you modify /system/ (Even mounting it) your device will no longer accept OTA.
dottat said:
Are you just unlocked?
Sent from my HTC6545LVW using Tapatalk
Click to expand...
Click to collapse
Yes, unlocked only.
Electronic Punk said:
I am sure its possible via TWRP but you will have to mount system first otherwise you are just flashing into the TWRP system itself.
But the moment you modify /system/ (Even mounting it) your device will no longer accept OTA.
Click to expand...
Click to collapse
I see. I mounted system before doing all of that. Meh, I guess I'm just going to have to root.
I went down this same path but ended up rooting so I could run AdAway. Easy enough to restore stock system image and recovery once the OTA comes out. With luck that process won't disturb the encrypted /data partition.

[Guide] AdAway for systemless hosts file

About the only reason I root my phone is to install AdAway. I'd prefer to not modify the system partition to help make OTA's easier to get and to allow Android Pay to work. AdAway has a flashable .zip file that preps the hosts file to use the systemless root structure that comes along with SuperSU. Unfortunately, that script depends on being able to access the /data partition inside of TWRP which isn't going to happen any time soon on the HTC 10. Fortunately, it is easy for us to manually replicate what the flashable .zip is trying to do.
This isn't a detailed how-to, but more of a set of guidelines. Don't blame me if your phone explodes.
Root the phone with the latest SuperSU.
Download the AdAway_systemless_hosts_v2.zip file from the Unofficial AdAway thread.
Extract the files from inside the zip. We are only interested in two files in the support folder.
Connect the phone to your PC and turn on file transfer mode.
Copy "hosts" and "0000adaway.script" that you just extracted to the internal storage of your phone.
Use a program file Root Explorer to move "hosts" into /su/etc and move "0000adaway.script" into /su/su.d (this probably could have been done with ADB push, but I got permission errors when I tried it that way and I'm impatient and lazy).
Chmod 0755 /su/su.d/0000adaway.script (I used a root shell on the phone via ADB)
Install AdAway (I used the link in the Unofficial AdAway thread.)
Reboot the phone.
Run AdAway like normal. By default it should use /system/etc/hosts which is what you want.
If something doesn't work, figure out why and fix it. I'm happy to answer questions to the best of my ability.
AdAway works without problems here, with simple press activate button.
starbase64 said:
AdAway works without problems here, with simple press activate button.
Click to expand...
Click to collapse
Yup
Sent from my HTC 10 using Tapatalk
starbase64 said:
AdAway works without problems here, with simple press activate button.
Click to expand...
Click to collapse
Yes, but it modifies the /system partition unless you do the trick in OP. If I'm correct, you will have problems with OTA updates and Google Pay if you let AdAway directly modify the hosts file on /system.
Now that TWRP can access /data, can we just flash the zip?
goodtimes50 said:
Now that TWRP can access /data, can we just flash the zip?
Click to expand...
Click to collapse
Yes, you can. I downloaded that zip and apk from the Unofficial AdAway thread linked above. Booted into TWRP, flashed the newest betaSuperSU2.74-2-forceencrypt (not related to this, just so I'd be on the latest version), then the AdAway_systemless_hosts_v2.zip, rebooted and installed the apk and let it run. Rebooted. Showing hosts location as /system32/etc/hosts as the OP says is a good thing, and both files mentioned are in their correct places per Root Browser. [emoji106]
Sent from my HTC 10 using XDA-Developers mobile app
Sorry that it doesn't completely match the thread here but I think my question could fit in here anyway.
Do I suggest correctly that with systemless root, systemless AdAway and the stock recovery OTAs should be fully usable? Since there's no other modification to /system then.
bmwbasti said:
Sorry that it doesn't completely match the thread here but I think my question could fit in here anyway.
Do I suggest correctly that with systemless root, systemless AdAway and the stock recovery OTAs should be fully usable? Since there's no other modification to /system then.
Click to expand...
Click to collapse
I believe that is correct. There hasn't been a new OTA for my phone yet so I can't verify. However, when I do the check for new software it tells me no new updates (as opposed to the message about the files system being corrupt). I believe Android Pay should also work. I have it installed and added a new card, but I haven't tested making a purchase yet.
Thanks for the guide.
My device is rooted, but I didn't found su folder in anywhere when I use Root Explorer with root access, does anyone tell me how to get su folder and make AdAway work?
Fix for AdAway.
matif525 said:
Thanks for the guide.
My device is rooted, but I didn't found su folder in anywhere when I use Root Explorer with root access, does anyone tell me how to get su folder and make AdAway work?
Click to expand...
Click to collapse
Your device may use su, & still not have an su folder (at all) that is used for hosts file (ie systemless root). Just do this..
Download... Terminal emulator.
https://play.google.com/store/apps/details?id=jackpal.androidterm
Open terminal
Then enter these commands.. "Quote"
su
mount -orw,remount /system
rm /system/etc/hosts
ln -s /data/data/hosts /system/etc/hosts
mount -orw,remount /system
Now open AdAway go to preferences and select option to " Target hosts file"
Select /data/data/hosts
Enjoy..
If you still have ads in apps do this!!!
githyanki said:
Open the 3 dot menu in adaway, chose log DNS request. Enable TCP dump.
Open the app with ads, when ad loads, go back to adaway, and open log.
Long press any entries and chose black list.
Profit
Click to expand...
Click to collapse
All credit where credit is due. I just shared what I read else where.
Read here for more details..
https://github.com/AdAway/AdAway/issues/770
&
http://forum.xda-developers.com/showthread.php?t=2190753&page=143#post68988079
There is a known issue in HTC devices involves S-off. If the above doesn't solve this for you message here I'll follow. Or pm me. I work wierd hours be patient.
Rom Maximus 3.0.0 ( Android 7 ).Any instruction don't works,adaway no blocked ads.
regarding su folder to move files to
FreydNot said:
About the only reason I root my phone is to install AdAway. I'd prefer to not modify the system partition to help make OTA's easier to get and to allow Android Pay to work. AdAway has a flashable .zip file that preps the hosts file to use the systemless root structure that comes along with SuperSU. Unfortunately, that script depends on being able to access the /data partition inside of TWRP which isn't going to happen any time soon on the HTC 10. Fortunately, it is easy for us to manually replicate what the flashable .zip is trying to do.
This isn't a detailed how-to, but more of a set of guidelines. Don't blame me if your phone explodes.
Root the phone with the latest SuperSU.
Download the AdAway_systemless_hosts_v2.zip file from the Unofficial AdAway thread.
Extract the files from inside the zip. We are only interested in two files in the support folder.
Connect the phone to your PC and turn on file transfer mode.
Copy "hosts" and "0000adaway.script" that you just extracted to the internal storage of your phone.
Use a program file Root Explorer to move "hosts" into /su/etc and move "0000adaway.script" into /su/su.d (this probably could have been done with ADB push, but I got permission errors when I tried it that way and I'm impatient and lazy).
Chmod 0755 /su/su.d/0000adaway.script (I used a root shell on the phone via ADB)
Install AdAway (I used the link in the Unofficial AdAway thread.)
Reboot the phone.
Run AdAway like normal. By default it should use /system/etc/hosts which is what you want.
If something doesn't work, figure out why and fix it. I'm happy to answer questions to the best of my ability.
Click to expand...
Click to collapse
Hi there, ive got a mate 8, not sure if this adblocker will work on it but i want to try it out anyway. Ive unzipped the file but which folder in su do i move the files to? screenshot of the folders i have in su

Categories

Resources