ADAway and Desire 820n a51_ul Lollipop 5.0.2 - Desire 820 Q&A, Help & Troubleshooting

Anyone try to install adaway on stock rooted Lollipop ? I think Lollipop ignoring entires in hosts. I've moved hosts file to /data and linked /system/etc/hosts to /data/hosts cuz S-ON and does not block. Why? Entires are corrcet in hosts.

Its about the write protection from the stock kernel. We need a custom kernel, than we can write to the system. With Tomals rom adaway works great. Tomal modified the kernel, so adaway works. And you need to flash busybox from the development section.

Think You write protection in kernel causes ignoring entires in hosts? Every Linux use hosts file. Lollipop does not?
Temporary solution for advanced users only.
CAUTION: I am not responsible if You delete and/or brick Your device!!!
1. Let AdAway create hosts file on /data/ (Preferences->Target hosts file->/data/hosts)
2. Enter recovery, mount /system and /data
3. Plug in your usb cord and open a command line on your pc.
4. Enter adb shell from HTC Sync
5. Type rm /system/etc/hosts
6. Type cp /data/hosts /system/etc/hosts
7. Exit from adb shell, unmount /data and /system
Reboot
To update AdAway hosts file You need to repeat all steps eg. one per week.
Lollipop ignoring symlink to hosts file, I don't know why atm.
Tested on my own 820n.

Related

[Q] I/O Error on /etc/hosts after permroot (VISIONary r14; Adfree)

After permroot with VISIONary r14 I am getting an I/O Error on /etc/hosts and /system/etc/hosts. This is sad as my purpose in permrooting is to have a custom hosts file.
This is the sequence of events as I recall it:
1) Performed a temproot using VISIONary r14
2) ADB pushed my hosts file to /data/data/hosts
3) Set up my hosts file as the one to be consulted (as root)
Code:
mount -o remount,rw /dev/block/mmcblk0p25 /system
rm /etc/hosts
ln -s /data/data/hosts /system/etc/hosts
mount -o remount,ro /dev/block/mmcblk0p25 /system
4) Installed AdFree (granted rights, hosts file downloaded to /data/data/hosts; did not check symlink creation)
5) Removed AdFree and pushed my own hosts file again (as I need some entries for local network)
6) Performed a permroot
At this point I noticed some ads had appeared on a web page I normally have ad-free. So I thought that to be odd. I also did find /etc/hosts again. Not to worry, I will just do step 3 above again now that permroot is done (successfully). At least, that's what I thought. Remounting the filesystem is not a problem. The filesystem is indeed mounted as writable when I check cat /proc/mounts. But then I get the error:
Code:
# rm /etc/hosts
rm /etc/hosts
[B]rm failed for /etc/hosts, I/O error[/B]
This is the same for /system/etc/hosts.
The result is that my custom hosts file is not used
All commands are run through ADB shell, not a terminal emulator on the phone.
Please let me know if you have any suggestions.
e2fsck_recvy is not an option on a device mounted as /system. I suppose I could run it from some recovery mode...no knowledge about that.
HTC Desire HD
Android 2.2
Software version 1.32.405.6
PS: this thread is not to discuss the philosophical position one may have on blocking advertising and the like.
you cant do this with temp root..... without s-off the nand protection will stop you writing to /system even when logged in as su
This error occurs with permroot, not temproot.
But if I understand you correcty my only option is to go for a custom ROM. This may be a little too much hassle just to turn off the ads.
Update: performed S-OFF as described here: [TOOL][VIDEO] One click Radio S-OFF, SimUnlock (Easy Root & S-OFF Guide). Unfortunately still get /system/etc/hosts: I/O error.
Vic_E said:
4) Installed AdFree (granted rights, hosts file downloaded to /data/data/hosts; did not check symlink creation)
Click to expand...
Click to collapse
I've been thinking about making this more explicit, the symlink box isn't just to create a symlink, it's also to use the symlink, regardless if you made a symlink manually or not.
I'd suggest ticking this, at least then adfree should work, although it's weird that you can't even cat the /system/etc/hosts file.

Problem with hosts file

Hi,
I'm s-on and would like to block ads on my Desire.
So I downloaded the MVPS hosts file on my pc, booted my phone into recovery, mounted /system/ and push the hosts file to /system/etc/ via adb.
Now it's in there (i can see and open the file in root explorer) but the ads aren't blocked. I can still navigate to domains that should be redirected to 127.0.0.1
What am I missing?
OK fixed it. Not sure what caused the problem.
But here is what I did to remove all ads on my HTC Desire:
1. Install AdAway from Market
2. Go to app preferences and check Target hosts file -> /data/data/hosts
3. Boot phone in recovery, mount /system and /data (in Clockwork recovery it's in "Mounts and Storage")
4. Use your PCs adb and type:
adb shell
cd /system/etc
mv hosts /data/data
ln -s /data/data/hosts hosts
exit
5. reboot phone and update the hosts file in AdAway. Done.
x01a4 said:
OK fixed it. Not sure what caused the problem.
But here is what I did to remove all ads on my HTC Desire:
1. Install AdAway from Market
2. Go to app preferences and check Target hosts file -> /data/data/hosts
3. Boot phone in recovery, mount /system and /data (in Clockwork recovery it's in "Mounts and Storage")
4. Use your PCs adb and type:
adb shell
cd /system/etc
mv hosts /data/data
ln -s /data/data/hosts hosts
exit
5. reboot phone and update the hosts file in AdAway. Done.
Click to expand...
Click to collapse
I'm fairly sure you don't need adaway if you're pushing the file to the right location from your pc.
erklat said:
I'm fairly sure you don't need adaway if you're pushing the file to the right location from your pc.
Click to expand...
Click to collapse
Yes I know. But with AdAway you always have a new hosts file.
x01a4 said:
Yes I know. But with AdAway you always have a new hosts file.
Click to expand...
Click to collapse
I guess you have a point...
x01a4 said:
OK fixed it. Not sure what caused the problem.
But here is what I did to remove all ads on my HTC Desire:
1. Install AdAway from Market
2. Go to app preferences and check Target hosts file -> /data/data/hosts
3. Boot phone in recovery, mount /system and /data (in Clockwork recovery it's in "Mounts and Storage")
4. Use your PCs adb and type:
adb shell
cd /system/etc
mv hosts /data/data
ln -s /data/data/hosts hosts
exit
5. reboot phone and update the hosts file in AdAway. Done.
Click to expand...
Click to collapse
Super. Good idea. Thank you

[Q] linux deploy fails when mounting any of the linux OS's

At first I thought it was maybe because I didnt'nt have enough free space on my sd card so I made sure I had 3GB's free but I still got this when I clicked install:
[13:04:26] Updating configuration file ... done
[13:04:27] >>> begin: install
[13:04:27] Checking mount points ... done
[13:04:27] Checking installation path ... done
[13:04:27] Making new disk image (512 MB) ... fail
[13:04:27] <<< end: install
And this when I try to reconfigure:
[13:02:49] Updating configuration file ... done
[13:02:50] >>> begin: configure
[13:02:50] Mounting partitions:
[13:02:50] / ... fail
[13:02:50] <<< end: configure
When I check my root stutus I get this message:
Congratulations! You have root access!
Super User Application Status:
SuperSU application by Chainfire - version 2.36 - is installed!
System File Properties for Root Access:
Standard Location
Check Command: ls -l /system/bin/su:
Result: /system/bin/su: No such file or directory
Analysis: File /system/bin/su does not exist.
Standard Location
Check Command: ls -l /system/xbin/su:
Result: -rwxr-xr-x root root 71264 2014-11-30 16:22 su
Analysis: Root access IS correctly configured for this file! Executing this file can grant root access! Root user ownership is present and setuid attribute is not present.
Alternative Location
Check Command: ls -l /sbin/su:
Result: /sbin/su: Permission denied
Analysis: File system permissions restricted and denied access.
Alternative Location
Check Command: ls -l /system/xbin/sudo:
Result: /system/xbin/sudo: No such file or directory
Analysis: File /system/xbin/sudo does not exist.
Root User ID and Group ID Status:
Root user id:
uid=0(root)
Root group id:
gid=0(root)
System Environment PATH: /sbin /vendor/bin /system/sbin /system/bin /system/xbin
ADB Shell Default User:
ADB shell setting for standard access, stored in default.prop, is configured as: shell (non root) user - ro.secure=1
Results provided on your SM-T800 - Android 4.4.2 device by Root Checker Pro version 1.3.9 from joeykrim in the Android Market
Can anybody tell me why I get this fail message after clicking install?i
Please help
Thank You
AO!
Same issue
Im currently having the same issue with trying to install kali on my tab s. Have root and even sd formated to ext4 but still issues .
Check your SE(Linux) status on Settings / About Device. If it says Enforcing then this is the cause of the problem.
You need to change it to permissive, but you can't do it on a stock rom. You need a kernel with permissive mode
enable or a custom rom with a permissive kernel.
Good Luck
eupeso4 is wrong. You don't need a different kernel. There is an app called SELinuxModeChanger... It works charms
I've attached the app below.
soulcrusher101 said:
eupeso4 is wrong. You don't need a different kernel. There is an app called SELinuxModeChanger... It works charms
I've attached the app below.
Click to expand...
Click to collapse
Also, go to terminal emulator after this.
Code:
su
getenforce
If you get "Enforcing" as a response, it's FUBAR. you can try to run the command "setenforce 0" as su as a workaround but if the app didn't work, it won't likely work either.
Molikai1988 said:
Also, go to terminal emulator after this.
Code:
su
getenforce
If you get "Enforcing" as a response, it's FUBAR. you can try to run the command "setenforce 0" as su as a workaround but if the app didn't work, it won't likely work either.
Click to expand...
Click to collapse
Okay i got enforcing. my deviceis SC-04E thats is S4 (docomo). i want to set SE Linux to premissive tell me the solution
soulcrusher101 said:
eupeso4 is wrong. You don't need a different kernel. There is an app called SELinuxModeChanger... It works charms
I've attached the app below.
Click to expand...
Click to collapse
Doesn't work on stock kernels.
I tried everything. But it doesn't work even after changing the SELinux to permissive., But after searching a lot, I found a thread which said me to change the partition to ext2. I changed the partition and then it all worked like charm.., If you still have issues, follow the guide in this link from start to end-https://github.com/meefik/linuxdeploy/issues/183, This solved most of the issues I had..
Linux Deploy Mounting Partitions Fail
Bro problem solved by me..
Check out this video
https://youtu.be/n5opus76c3k

Disable automatic system updates

Does anybody know of a way to disable the automatic system updates in the watch? (with or without root) I would rather have control over them.
I have found a way to do it after getting some inspiration from a reddit thread.
First connect to your device via ADB.
In order to disable OTA updates, you have to create a dummy update.zip file that cannot be removed or updated by the OS. Execute the following commands (I did it in custom recovery):
adb shell
cd /cache/
echo "" > update.zip
chattr +i update.zip
In order to enable OTA updates, you have remove the immutable flag on the dummy update.zip file and then delete it. Execute the following commands (I did it in custom recovery):
adb shell
cd /cache/
chattr -i update.zip
rm update.zip
i managed to downgrade my HW1 to 1.5 from 2.0
BUT HOW i disable and remove update notification from 1.5 to 2.0???
is the above method can e done ?
https://forum.xda-developers.com/hu...aw-1-5-build-m9e42c-to-downgrade-2-0-t3607859
Please please do you have any video tutorial to explain how to do that
It is very complicated to me and i can't do it

[Root] [Script] OTA Killer for LG K7 m1 and other devices

Disclaimer: I nor XDA nor anyone else is responsible for your lack of reading or comprehension skills, ignorance on your part or anyone else's nor just plain stupidity on your part or anyone else's, so if you don't know what you're doing and or don't know how to fix any bad things that could happen then just don't do it.
Root and Busybox required.
This is a more permanent solution to stop OTA updates from downloading on your rooted device that is designed to survive when you wipe /cache. I'm including the script which will work on any device that downloads it's OTA updates as update.zip to /cache without modification and a flashable zip, the flashable zip is for the LG K7 m1 Metro PCS variant rooted with Magisk ONLY (unless modified) and was fully tested, you're free to edit the script and or the updater-script in the flashable zip for your device (be sure you get the /system partition for your device right, the init process right if not rooted with Magisk and the proper location and file name for your OTA updates) and you may release it for others to use if you like but please give appropriate credit. The script can simply be dropped in your appropriate init folder (/data/adb/service.d/ for Magisk) and set chmod 0700 before rebooting your device.
Alternately you can use MacroDroid to run the script at boot.
Trigger > Device Events > Device Boot
Action > Applications > Shell Script (Paste script on line)
The rest should be self-explanatory.
Thanks to QuickNET Tech for coming up with this method. You can and should read about it HERE and follow up with part 3 from their post so you don't get the annoying notifications. Instructions for reversing this modification are also in that thread, in addition to those instructions you'll also need to delete the 22otakiller script from your init directory (default is /data/adb/service.d/).
QuickNET Tech said:
-Part 3. [Optional]
The annoying update notifications are actually Google Play Services fault. All you have to do is go to "Settings > Apps" and find Google play services and disable the apps ability to show you notifications.
Click to expand...
Click to collapse
What this script does:
The script (see bottom of this post) when ran either automatically on boot or manually will check for update.zip in /cache, if it exist but wasn't created by the script or using the same method with the appropriate attribute applied then it will delete it (regardless of size including an authentic update.zip file) and create the appropriate 0 byte update.zip file with the appropriate attribute and permissions, if it doesn't exist it will create the appropriate file with the appropriate attribute and permissions. It creates a 0 byte update.zip that can not be modified or deleted by anyone including the super user without removing the file attribute which can only be removed by the super user. The flashable zip for the LG K7 rooted with Magisk ONLY (unless edited for your device and or root method) will install the script to /data/adb/service.d/ and set it's permissions to 0700.
Please let me know and post your device information if the updater-script in the flashable zip works as-is with your device.
Enjoy!
Script (22otakiller):
Code:
#!/system/bin/sh
uzip="/cache/update.zip"
if [ -f "$uzip" ] && lsattr "$uzip" | cut -c 6 | fgrep -q 'i'
then
exit
elif [ -f "$uzip" ]
then
rm -f $uzip
touch $uzip
chmod 7400 $uzip
chattr +i $uzip
exit
else
touch $uzip
chmod 7400 $uzip
chattr +i $uzip
exit
fi
Been a long time since I've been on this site seeing as most every device after the K7 hasn't had any development. Glad to see people are still messing with this device. Good work man!

Categories

Resources