Related
Apologies if this has been discussed before, I have been researching this for a few days now and have tried every single method that has been advised but was unable to replace the hosts file from my Desire with a custom one. Seems the methods used for the Hero and other Android phones do not work on the Desire. Has anyone managed to replace the default 'hosts' file with a custom one?
My Desire IS rooted. I have tried the adb push method after deleting original file and remounting, I always get an error, something 'cannot allocate space' or similar. I have also tried using Root Explorer, again it says the file is too big. If I make the hosts file smaller by removing some data from it, it copies it, then the phone restarts itself and then when i check, the old hosts file is back (the original hosts file only has one entry for local host 127.0.0.1). I also tried editing the hosts file on the device using Root Explorer, I save, then the phone restarts and all the changes are lost. I seem to have tried all the possibilities and had no joy.
And before you ask, yes, I tried installing the AdFree app from the market, it doesn't seem to do anything, and sometimes it does restart my phone as well.
Any advice how to sort this out would be much appreciated.
are you doing all this in recovery mode?
Hello,
i have created a patched Adfree app for Desire
Adree now loads the hosts-file to
/sdcard/etc/hosts
i have removed /system/etc/hosts
and symlinked to /sdcard/etc/hosts
after the first start klick on "revert" and then on "Update & Install Hosts"
after that you can edit the Hosts file in /sdcard/etc/hosts and it will be used by android system
all files attached
(start in recovery using recovery script,
after that run the install script - STEP1 inside,
reboot into System
run install Script - STEP2)
please tell me if it wont work for you
kingchris said:
Hello,
i have created a patched Adfree app for Desire
Adree now loads the hosts-file to
/sdcard/etc/hosts
i have removed /system/etc/hosts
and symlinked to /sdcard/etc/hosts
after the first start klick on "revert" and then on "Update & Install Hosts"
after that you can edit the Hosts file in /sdcard/etc/hosts and it will be used by android system
all files attached
(start in recovery using recovery script, after that run the install script inside)
please tell me if it wont work for you
Click to expand...
Click to collapse
NICE
But i have some bug: get java.io.EOFExecepion error when i try to update.
ect/hosts folder on sd, installed apk by rootexplorer
where is the problem? I have just pushed my custom hosts file to /system/etc in recovery and it works without any problems.
Just mount /system in the root recovery and push it...
my hosts is from here: http://forum.xda-developers.com/showthread.php?t=664532
Sent from my HTC Desire using Tapatalk
DocRambone said:
NICE
But i have some bug: get java.io.EOFExecepion error when i try to update.
ect/hosts folder on sd, installed apk by rootexplorer
Click to expand...
Click to collapse
i had this error 2 times,
after pressing "revert" the error is gone
--edit--
seems to be a random error.
but after "revert" it works
@ aslocum
the problem is, that you cant update the file if the system is running. but if u symlink it, it is possible
How many times do you update the hosts file? The hosts from the thread I linked is really good and optimized. better the the adfree one.i do not need to update it till we get full write access...
Sent from my HTC Desire using Tapatalk
you are right, it is not necessary to update the hosts-file all the time,
but i like it to add / replace the file even when im not near to a PC.
i thought it is a solution, and i want to share it with all the others.
No offense to you sometimes im also in the mood just to make something work and others wont understand why
Most times its also fun to make things work
Sent from my HTC Desire using Tapatalk
kingchris said:
Hello,
i have created a patched Adfree app for Desire
Adree now loads the hosts-file to
/sdcard/etc/hosts
i have removed /system/etc/hosts
and symlinked to /sdcard/etc/hosts
after the first start klick on "revert" and then on "Update & Install Hosts"
after that you can edit the Hosts file in /sdcard/etc/hosts and it will be used by android system
all files attached
(start in recovery using recovery script,
after that run the install script - STEP1 inside,
reboot into System
run install Script - STEP2)
please tell me if it wont work for you
Click to expand...
Click to collapse
Hey kingchris,
Thanks for your efforts in creating the patched version. I have installed your apk, put the hosts file on the sdcard in /etc folder. Ran the app, clicked revert, it said Success, then Download and install Hosts, it went ok, now it says 'No need to update, your system already has the latest version. I click ok, but it doesn't seem to block any ads. Not sure what to do. Does the app have to be running in the background to work?
Trying to run the install script I got the following:
C:\adfreepatched>install-adfree-windows-step1.bat
C:\adfreepatched>adb-windows.exe shell mount /system
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\adfreepatched>adb-windows.exe shell mount /sdcard
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\adfreepatched>adb-windows.exe shell mkdir /sdcard/etc
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\adfreepatched>adb-windows.exe shell cp /system/etc/hosts /sdcard/etc/hosts
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\adfreepatched>adb-windows.exe shell rm -r /system/etc/hosts
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\adfreepatched>adb-windows.exe shell ln -s /sdcard/etc/hosts /system/etc/hosts
- exec '/system/bin/sh' failed: No such file or directory (2) -
C:\adfreepatched>install-adfree-windows-step2.bat
Sorry for being such an ignorant
i have created a new version of the fiel with a step1 and step2 batch
boot into recovery.
run recovery-windows.bat
run install-adfree-windows-step1.bat
reboot into your normal system
install-adfree-windows-step2.bat
then start adfree
if you get the Error Message try it again.
i think this is not an error created by the modification,
this is a problem on checking and downloading the hosts file
i made an error in the first script
in the script i wrote adb mount but it has to be adb shell mount
Uninstalled the program, deleted the /etc/hosts from my sdcard and started all over. If i boot into recovery mode and I get to the green recovery screen, I can no longer type any commands from the terminal window. If I reboot into Android, I run the two install commands and here are the results:
C:\adfreepatched2>install-adfree-windows-step1.bat
C:\adfreepatched2>adb-windows.exe shell mount /system
mount: can't read /etc/fstab: No such file or directory
C:\adfreepatched2>adb-windows.exe shell mount /sdcard
mount: can't read /etc/fstab: No such file or directory
C:\adfreepatched2>adb-windows.exe shell mkdir /sdcard/etc
C:\adfreepatched2>adb-windows.exe shell cp /system/etc/hosts /sdcard/etc/hosts
C:\adfreepatched2>adb-windows.exe shell rm -r /system/etc/hosts
rm: can't remove '/system/etc/hosts': Directory not empty
C:\adfreepatched2>adb-windows.exe shell ln -s /sdcard/etc/hosts /system/etc/host
s
ln: /system/etc/hosts: File exists
C:\adfreepatched2>install-adfree-windows-step2.bat
C:\adfreepatched2>adb-windows.exe install signed-Adfree_patched.apk
812 KB/s (39004 bytes in 0.046s)
pkg: /data/local/tmp/signed-Adfree_patched.apk
Success
The program is installed on my phone, it says Update found, i press ok, then click on Revert, all it does is it restarts my phone. Here, I went and replaced the 1KB hosts file from /sdcard/etc/ with the one in your folder, then when I clicked Revert, it said Success! Your hosts file has been restored. I then clicked Download & install hosts, and it said Success! your Android device should now be AdFree, however you might need to reboot to clear your cache. I rebooted the device. Ran AdFree again and it says your good to go! No need to update, your system already has the latest version.
So I guess it should now be working?
I installed a few 'free' apps from the market to see if I get the adds, and sure they are there.
For some reason, I still think it is using the /system/etc/hosts version instead of the version on the sdcard.
zoltar99 said:
If i boot into recovery mode and I get to the green recovery screen, I can no longer type any commands from the terminal window.
Click to expand...
Click to collapse
you have to open a second Command,if you are in the green recovery console
and run the step1.bat there
if you type after you have done all the steps
cd system
cd etc
ls -al *host*
you should see something like
lrwxrwxrwx 1 0 0 17 May 13 04:43 hosts -> /sdcard/etc/hosts
then its rights
I got that, thanks, but please read the second part of my last message and tell me do you think that is ok? I have installed Adfree, it says it is up to date, but it is still not blocking ads, apparently.
sould be right now
That's what I thought, but is there another way to tes apart from running apps that use adds? I tried by putting a few sites taken from the hosts file into the browser, and it opens all of them I have a customised hosts file on my pc as well, and it works like a charm.
then use your customized one. idk if the files from adfree uptodate. but i can say it will work
Finally Adfree working
kingchris said:
i have created a new version of the fiel with a step1 and step2 batch
boot into recovery.
run recovery-windows.bat
run install-adfree-windows-step1.bat
reboot into your normal system
install-adfree-windows-step2.bat
then start adfree
if you get the Error Message try it again.
i think this is not an error created by the modification,
this is a problem on checking and downloading the hosts file
i made an error in the first script
in the script i wrote adb mount but it has to be adb shell mount
Click to expand...
Click to collapse
Thanks a lot man, seems to be working ok now, I have had so much trouble getting this to work, finally working.
I have successfully updated adfree with your file. Thanks so much.
Sorry to ask a silly question...
because when I boot into the recovery mode, I can see several options available but I cannot choose them.
I hold volume down & power on, then I select "recovery" & press "power" again that means I choose this option then it goes into recovery mode, right? In the recovery mode, I cannot choose anything because if I press any button it simply turns off the monitor! What should I do??
(I take out the battery to complete the reboot........... There must be some other ways?)
veronl said:
I have successfully updated adfree with your file. Thanks so much.
Sorry to ask a silly question...
because when I boot into the recovery mode, I can see several options available but I cannot choose them.
I hold volume down & power on, then I select "recovery" & press "power" again that means I choose this option then it goes into recovery mode, right? In the recovery mode, I cannot choose anything because if I press any button it simply turns off the monitor! What should I do??
(I take out the battery to complete the reboot........... There must be some other ways?)
Click to expand...
Click to collapse
Not sure if you've resolved this or not. If not, what recovery are you using? Iv use Amon_Ra's on my HTC Magic, and Clockwork's on HTC Desire, both of which allow you to use the scrollball/pad to select the menu's
I rooted my phone with Unrevoked 3.21 and successful, but when I try to adjust a file in my phone (eg hosts and bootanimation) I don't seem to have any success.
In adb I can push it to the phone, but when I reboot my phone I get nothing. I tried to push the bootanimation to various maps that I found that have the bootanimation, but when I reboot I don't get the new animation to load.
When I try to replace the files in root explorer I always get a "not enough space" error and my phone reboots.
I don't know what I did wrong because I got the SU working but I can't get any file from the sd card or my pc on my phone successful.
This was the reason I rooted my phone because I want to edit my hosts file for no ads and a new bootanimation.
I added my bootanimation and the hosts file if anybody can check if maybe that’s the problem. (just remove the zip from the hosts file and open with notepad, I couldn't get it uploaded else)
Reboot recovery, then go partitions/mount system and ./adb push.
Edit : Just noticed.. you need a path.
There you go :
Code:
./adb push hosts /system/etc/hosts
./adb push bootanimation.zip /system/customize/resource/bootanimation.zip
./adb push bootanimation.zip /system/media/bootanimation.zip
Assuming you have those 2 files in your adb path of course..
I uploaded a screen from my cmd window, because I went in recovery and did the adb thing and I can see that my pc did something. But when I rebooted my phone I still get the same old white HTC bootanimation.
Edit: I got it to work with this, thanks for the help madwifi
power off
plug in usb cable
hold volume down+power
volume down once to select recovery and then hit power
now you should be at the clockworkmod recovery menu
select "partitions menu"
select "mount /system"
on my computer, click start, run, and then type "cmd" and hit enter to get a dos prompt
(For noobs like me I found this site: http://www.jonamerica.com/technology/howto-root-the-htc-droid-incredible/#bloat) where I found some extra information
Is there a way to change the Splash screen like with this flasher? http://forum.xda-developers.com/showthread.php?t=794638 on the Wildfire? because it has a lower resolution.
Not until we get the s-off patch from alpha rev
thanks for the information, I didn't know that
Hey guys,
a mistake happend to me and i installed a wrong GAPPS,
now the ROM alerts "Android Keyboard (AOSP) crashed" every second.
I can't put a newer GAPPS on the phone using USB, because sending a file to the device doesn't run.
I don't know why, the drivers are installed and i can see the root of my phone, but can't copy files bigger than a few byte.
So i tried sideload.
I booted to recovery mode and selected adb sideload, and installed all windows drivers successfully.
But: When i try to copy the file like "adb sideload rom.zip", it stucks at 1%..
Anybody here who can help me? :/
Thanks!
matzen97 said:
Hey guys,
a mistake happend to me and i installed a wrong GAPPS,
now the ROM alerts "Android Keyboard (AOSP) crashed" every second.
I can't put a newer GAPPS on the phone using USB, because sending a file to the device doesn't run.
I don't know why, the drivers are installed and i can see the root of my phone, but can't copy files bigger than a few byte.
So i tried sideload.
I booted to recovery mode and selected adb sideload, and installed all windows drivers successfully.
But: When i try to copy the file like "adb sideload rom.zip", it stucks at 1%..
Anybody here who can help me? :/
Thanks!
Click to expand...
Click to collapse
Try using adb push.
adb push "Gapps path" data/media/0
abaaaabbbb63 said:
Try using adb push.
adb push "Gapps path" data/media/0
Click to expand...
Click to collapse
I get a "error:closed" error..
matzen97 said:
I get a "error:closed" error..
Click to expand...
Click to collapse
Don't know if you still need it or not...
Type in the following into the pc terminal when connected to the device via usb
adb kill-server
adb devices
Enter recovery and sideload CN ROM
http://dlcdnet.asus.com/pub/ASUS/EeePAD/ME176C/ME176C-CN-3_2_23_182.zip
To return to WW rom its a litle complicated becouse when you try to sideloade ww version it gives error for not having inough space. So you need to give command to recovery to instal zip from location you want.
1. root with rootzenfone.apk
http://23pin.logdown.com/posts/230216-root-rootzenfone-14r
2. turn on usb debuging
3. download ww rom and rename it update.zip
http://dlcdnet.asus.com/pub/ASUS/EeePAD/ME176C/ME176C-WW-3_2_23_182.zip
4. download es or some other file menager that has root access.
5. go to / (root) and manualy copy update.zip to /data folder
6. Download https://drive.google.com/file/d/0B6...drivesdk&resourcekey=0-W0btfSuQS9kq5iNNsCuWgQ and copy command file to cache/recovery folder
6. open ADB and type line by line:
adb remount
adb shell
su
echo 'boot-recovery ' > /cache/recovery/command
echo '--update_package=/data/update.zip' >> /cache/recovery/command
echo '--wipe_cache' >> /cache/recovery/command
echo 'reboot' >> /cache/recovery/command
reboot recovery
after this reboot to recovery and automaticly instal ww rom
This is fantastic, and smart move making a new thread...
Thanks,
sutekh137
And if you're not bricked, but can't update from the old software version. Copy and paste the commands in terminal emulator to force the update. Worked out great. Thanks for the tip.
slayeralive said:
Enter recovery and sideload CN ROM
http://dlcdnet.asus.com/pub/ASUS/EeePAD/ME176C/ME176C-CN-3_2_23_182.zip
To return to WW rom its a litle complicated becouse when you try to sideloade ww version it gives error for not having inough space. So you need to give command to recovery to instal zip from location you want.
1. root with rootzenfone.apk
http://23pin.logdown.com/posts/230216-root-rootzenfone-14r
2. turn on usb debuging
3. download ww rom and rename it update.zip
http://dlcdnet.asus.com/pub/ASUS/EeePAD/ME176C/ME176C-WW-3_2_23_182.zip
4. download es or some other file menager that has root access.
5. go to / (root) and manualy copy update.zip to /data folder
6. open ADB and type line by line:
adb remount
adb shell
su
echo 'boot-recovery ' > /cache/recovery/command
echo '--update_package=/data/update.zip' >> /cache/recovery/command
echo '--wipe_cache' >> /cache/recovery/command
echo 'reboot' >> /cache/recovery/command
reboot recovery
after this your device will reboot to recovery and automaticly instal ww rom
Click to expand...
Click to collapse
I'm having a lil problem here. Could you elaborate a little more, like in /root. <-- What does this mean? Do i write root or am I to go to root of the tablet's memory? And should I use adb on my PC connecting by usb cable to the tablet? I'm having a little problem understanding some of the steps.
(Remember, it's my sex life that it's in danger here)!
bravesoul said:
I'm having a lil problem here. Could you elaborate a little more, like in /root. <-- What does this mean? Do i write root or am I to go to root of the tablet's memory? And should I use adb on my PC connecting by usb cable to the tablet? I'm having a little problem understanding some of the steps.
(Remember, it's my sex life that it's in danger here)!
Click to expand...
Click to collapse
I would assume root of the device itself as the next step is to put update.zip in /data
(Get me in on the fun. I helped. )
I tried terminal emulator to write adb remount, but just after I wrote it, it gives me an error.
I've put the the update.zip in data folder. but there's like two data folders in my tablet's memory root. Do I put it after mnt or before (I,m using root browser v2.3)? Like in the real root of everything? Another question. Must I use the zip inside another zip of the asus ww rom, or just the unzipped zip file. (LOL, confusing, i know).
(I dunno JerBear, they're very peculiar about what/who they blow)!!
bravesoul said:
I tried terminal emulator to write adb remount, but just after I wrote it, it gives me an error.
I've put the the update.zip in data folder. but there's like two data folders in my tab memory's root. Do I put it after mnt or before?
Click to expand...
Click to collapse
They should be symlinked to the same thing. Let me check...
Well. I only have the data folder that's in the root. Peculiar.
As for the zip file question, go for trial and error. Worst case scenario recovery rejects it.
(We'll work around it )
This is what I get in terminal emulator:
Me176c
bravesoul said:
This is what I get in terminal emulator:
Click to expand...
Click to collapse
You need that command only when you are using ADB over PC
Thanks, but I have other issues.
What zip file should I use? The original we download from ASUS or the zip file inside the original.
JerBear told me to try one or another, but he doesn't know I'm in a place where Internet speed is like 50 Kbps... Which means it takes about two hours to download the original file.
However,(and this will sound strange), if anyone can give me the original names of both the original .182 zip file and the one inside the original, I think I can use a previously (and renamed) downloaded .182 ROM.
Me176c
bravesoul said:
Thanks, but I have other issues.
What zip file should I use? The original we download from ASUS or the zip file inside the original.
JerBear told me to try one or another, but he doesn't know I'm in a place where Internet speed is like 50 Kbps... Which means it takes about two hours to download the original file.
However,(and this will sound strange), if anyone can give me the original names of both the original .182 zip file and the one inside the original, I think I can use a previously (and renamed) downloaded .182 ROM.
Click to expand...
Click to collapse
Use zip inside original.
slayeralive said:
Use zip inside original.
Click to expand...
Click to collapse
So to be clear. I'll use ES File Manager to rename the file (update.zip) and copyit into Root->Data->Turn off the tablet and on again->enter into recovery->in PC I'll use adb->type adb remount and other commands->The tablet will reboot and update into the WW.182 ROM.
Right?
Me176c
bravesoul said:
So to be clear. I'll use ES File Manager to rename the file (update.zip) and copyit into Root->Data->Turn off the tablet and on again->enter into recovery->in PC I'll use adb->type adb remount and other commands->The tablet will reboot and update into the WW.182 ROM.
Right?
Click to expand...
Click to collapse
No man can you read? Do not turn of. Connect to pc and use adb or use terminal. If you are using terminal skip adb commands and start at "su" command. After typing last command it will automaticly reboot to recovery and start instalation than just wait...
slayeralive said:
No man can you read? Do not turn of. Connect to pc and use adb or use terminal. If you are using terminal skip adb commands and start at "su" command. After typing last command it will automaticly reboot to recovery and start instalation than just wait...
Click to expand...
Click to collapse
Ok, ok. Don't get your intelligence in a twist.
Thanks for helping me with my absurd noobiness. :good:
bravesoul said:
Ok, ok. Don't get your intelligence in a twist.
Thanks for helping me with my absurd noobiness. :good:
Click to expand...
Click to collapse
Have fun with your "reward"
Not yet I'm afraid. I've tried via terminal emulator and indeed it goes to recovery, but afterwards, it just reboots into the CN version untouched.
(And JerBear, i'm kidding about the chicks...They aren't 3. It's only one).
Try again you did somethin wrong
Folow the steps download->extract->rename to update.zip->copy to /data folder->type in terminal
bravesoul said:
Not yet I'm afraid. I've tried via terminal emulator and indeed it goes to recovery, but afterwards, it just reboots into the CN version untouched.
(And JerBear, i'm kidding about the chicks...They aren't 3. It's only one).
Click to expand...
Click to collapse
If you missd or typed wrong one character in terminal it wont work. Try again.
bravesoul said:
Not yet I'm afraid. I've tried via terminal emulator and indeed it goes to recovery, but afterwards, it just reboots into the CN version untouched.
(And JerBear, i'm kidding about the chicks...They aren't 3. It's only one).
Click to expand...
Click to collapse
From the top, you must be rooted and you must know what that is.
I used the file from inside the download. I believe it has user in the name.
Rename this file to be update.zip.
Place update.zip into the data folder in the root directory, ie. root/data/update.zip.
Back out of that when it's finished and find the original post with the instructions, touch it and touch the message symbol like you are going to reply.
Copy all of the commands from after su, to the end.
Open terminal emulator, Type su and give root permission at the prompt, touch and paste, you should see what you copied, if you don't, do it again. If you do, touch enter and the process will begin.
Do not do anything until the device reboots COMPLETELY. It will go through several reboots, just wait.
Viola, you will be updated.
So i am having a issue with my oneplus 5 and hope someone could help me out
So i have ended up wiping the entry phone in recovery, getting rid of all the internal data, including sdcard & operating system. At the moment the only thing i can get access to is fastboot & TWRP. I am trying to sideload or push a rom zip to the phone, but all i keep getting is the below:
adb sideload "Zip folder name and extension".
loading "zip"
cannot read "zip"
or i get an error that just says "Closed.
Now i have update to the latest drivers and adb and when i type "adb devices" my phone is showing...
I have also flashed the oneplus 5 recovery via fastboot, however when i go on to adb sideload, the phone doesnt show in CMD.
any help here will be appricated, as i am out of ideas.
Thanks in advance.
Make the file names shorter.
Alternatively, you should be able to use a flash drive through OTG and install the stuff from it.
Rhoban said:
Make the file names shorter.
Alternatively, you should be able to use a flash drive through OTG and install the stuff from it.
Click to expand...
Click to collapse
Unfortunately, OTG isnt a selectable option and i have also tried shorting the file a names but still no look.
Thank you for the input
Use another recovery. OTG should be there, I know somebody that flashed ROMs this way.
KrypticGT said:
...
adb sideload "Zip folder name and extension".
loading "zip"
....
Click to expand...
Click to collapse
Two things I'd try:
1. Change your directory to the one containing the zip file so the command ONLY has the filename.zip in it
2. Download the zip file again and make sure you do a md5sum check on it just in case its corrupted.
Try this:
- Boot your phone in TWRP
- Open cmd.exe on your PC
- Type adb devices (if everything is ok, it should show some numbers followed by the write "recovery")
- Move your ROM inside a folder on your PC and rename it "Rom.zip" (ie inside the folder "download")
- Using CMD.exe, move inside that folder typing "cd C:/...."
- Type "adb push Rom.zip /sdcard"
- Wait til a confirmation message will appear on CMD.exe
- Flash the ROM using TWRP
So for future reference to anyone that might have the same issue.
I fixed this issue, by flashing a older version of TWRP. This allowed me to use ADB sideload without issue & also allow OTG_USB. It also allowed me to flash files with long names.... I have tried to go back to the latest version of TWRP for OP5 but i get the errors i was getting before.
Strange, but did the fix.
Thanks all for the help & input.