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
Helo
I found a way to return to the recovery 2e
recovery 2e
Copying a file using the Root Explorer
# unzip and put archive contents in a folder called recovery2e on /sdcard/
# first mount -o remount,rw /system (important options in Root Explorer for do this)
# file recovery copy to /system/bin (and replace)
# xbi folder contents copy to /system/xbin/ (and replace)
Click to expand...
Click to collapse
Method by captive thanks buddy
# put archive contents in a folder called recovery2e on /sdcard/
# open a shell and get root (ADB or Terminal on Phone, type su and pres enter / accept )
# remount /system rw (busybox mount -o remount,rw /system)
# rename recovery in /system/bin to recovery3e (for backup purposes)
# copy "recovery" from /sdcard/recovery2e/ to /system/bin/ (cp /sdcard/recovery2e/recovery /system/bin/)
# copy the folder /sdcard/recovery2e/xbin/recovery to /system/xbin/ (cp -rr /sdcard/recovery2e/xbin/recovery /system/xbin/)
# enjoy!
Click to expand...
Click to collapse
Restart your phone
Isn't anyone going to comment on this?
Gurus: does it really work? That simple?
Thanks
Didn't work for me - used root explorer method. Now just hangs when I try to get recovery mode. Can get download mode ok still, and phone boots ok of course. Running JPM with root and voodoo5 3. Anything else to try?
Does not work on JPM....
it no works.
Phone: Doc's JP6 + voodoo pre3 + rooted
Method: Root explorer.
1, during copy the xbin folder to system, it shows "replace files" but after i check inside the system/xbin, the files are disappared??!! I did manually copy everything one after one from xbin to system/xbin, but i can't see where they are after copy.
2, anyway, i reboot the phone with 3b combo, the recovery mode still showing 3e.
so i say it no works. anyone tried the cable methed?
this thing work but it needs a little workaround as discussed by danzel. follow here: http://forum.xda-developers.com/showthread.php?t=774500&page=188
Could you please update the instruction for jp6 + voodoo pre4?
abd remount (don't know why) isn't working and /system is always ro so adb push and shell (adb shell works) cmd aren't working.
It is correct to remove su and busybox int the extracted folder since i have both already installed?
I was on JPM, followed the instructions.
Phone couldn't boot, lost ability to enter recovery. Luckily I could still enter Download mode, flashed to JPM, but being on voodoo kernel before that, didn't managed to disable lagfix before getting into this trouble - Couldn't revert back to RFS, and without ability to enter recovery to format.
Finally reverted back to Eclair firmware, could see my beloved recovery again. No way I'm going through the above again.
The above is just my own experience, for reference just in case someone is as unlucky as me.
This is the clear step on recovering the recovery2e
Recover recovery2 e
1. uncompress the downloaded file recovery 2e and copy the direcotry to sdcard and rename it to recovery2e
2. Using root explorer copy File recovery from recovery2e on sdcard to /system/bin
3. Using root explorer copy Folder recovery in xbin to /system/xbin
4. If did not work try copy xbin folder over /system/xbin folder
Ok, confirmed working for me on JPM+Voodoo.
I installed Rom Manager too, and CWM Recovery is fully working too!! TNX
xtrememorph said:
This is the clear step on recovering the recovery2e
Recover recovery2 e
1. uncompress the downloaded file recovery 2e and copy the direcotry to sdcard and rename it to recovery2e
2. Using root explorer copy File recovery from recovery2e on sdcard to /system/bin
3. Using root explorer Folder recovery in xbin to /system/xbin
Click to expand...
Click to collapse
Your method DO NOT work at all. I cannot enter recovery mode.
Fortunately download mode is still available.
JPM+Voodoo5 pre6
lagigia, what didn't work for you?
Here's what I did:
put archive contents in a folder called recovery2e on /sdcard/
open a shell and get root
remount /system rw (busybox mount -o remount,rw /system)
rename recovery in /system/bin to recovery3e (for backup purposes)
copy "recovery" from /sdcard/recovery2e/ to /system/bin/ (cp /sdcard/recovery2e/recovery /system/bin/)
copy the folder /sdcard/recovery2e/xbin/recovery to /system/xbin/ (cp -rr /sdcard/recovery2e/xbin/recovery /system/xbin/)
enjoy!
if using the root explorer method, copy xbin folder content, do not try to overwrite the entire dir on top.
mike.sw said:
if using the root explorer method, copy xbin folder content, do not try to overwrite the entire dir on top.
Click to expand...
Click to collapse
too late is there a way to solve it or get a step back?
thx!
i think u can just flash only the old kernel back and it will be fixed (only zimage).
captive said:
lagigia, what didn't work for you?
Here's what I did:
put archive contents in a folder called recovery2e on /sdcard/
open a shell and get root
remount /system rw (busybox mount -o remount,rw /system)
rename recovery in /system/bin to recovery3e (for backup purposes)
copy "recovery" from /sdcard/recovery2e/ to /system/bin/ (cp /sdcard/recovery2e/recovery /system/bin/)
copy the folder /sdcard/recovery2e/xbin/recovery to /system/xbin/ (cp -rr /sdcard/recovery2e/xbin/recovery /system/xbin/)
enjoy!
Click to expand...
Click to collapse
Thanks, works fine on JPM/JP6
Could we get a newbie friendly guide please. Get root. What does that mean and should i just type what you quoted. Thanks
Sent from my GT-I9000 using XDA App
Edited the first post and put the new, easy tutorial
Could i get some background on this, please?
Is it correct that:
1) recovery2e is the default samsung recovery?
2) new versions of recovery2e can't apply all the update.zip we were able to apply with the older versions? (unsigned, signed??)
3) This is why we need the old recovery2e to replace the new one?
4) Where did the issue started? Since Froyo releases?
5) Is this why we can't root Froyo FWs with an update.zip anymore like it was the case with Eclair?
I'm really sorry if this is kinda obvious but i never really saw any clear explanation about this. Hope someone could clear it up for me
1) Yes
2) Correct on recovery 2e you can't apply all the update.zip
4) Yes, New tutorial on fist post
4) The JPM ROM brings new recovery 3e
5) You can root phone by flash kernel with root by odni
im using FloyoBread v002 direct update
In xRecovery show below error.
E:Can't symlink /system/xbin/chmod
E:Failure at line 6:
symlink busybox SYSTEM:xbin/chmod
Installation aborted.
anyone can help??
and reboot will stop at SE logo
Bump.
Same problem here.
I am select "install custom zip" via xrecovery
Solved: corrupted zip archive.
Just download it again.
Hello, i have a problem with my TF101 (B70 if i'm right), ADB only work when i'm in recovery mode.
I lost root i don't know how and tried to regain it, but every rooting tools failled, i then discovered that commands wasn't working (even ls), but they do work in recovery mode (from /sbin).
When i try to flash a .zip from CWM , it seems that changes suposed to be applied to /system/bin aren't applied (SuperUser/SuperSU never find /system/bin/SU) but /system/bin/app correctly get updated.
I'd prefer to not wipe the device's data and repair it from it's current state if possible.
TF101's current state : Stock .27 guevor kernel 717, CWM non touch recovery
From recovery
ls -l /sbin
http://pastebin.com/tmyZagUk
ls -l /system/bin
http://pastebin.com/6tsPaPF0
ls -l /system/xbin
http://pastebin.com/D3jW5Sy3
If you need more info please tell
Bounty : I'll send Russian chocolat and candies to the one that will find how to fix this !
Magissia said:
Hello, i have a problem with my TF101 (B70 if i'm right), ADB only work when i'm in recovery mode.
I lost root i don't know how and tried to regain it, but every rooting tools failled, i then discovered that commands wasn't working (even ls), but they do work in recovery mode (from /sbin).
When i try to flash a .zip from CWM , it seems that changes suposed to be applied to /system/bin aren't applied (SuperUser/SuperSU never find /system/bin/SU) but /system/bin/app correctly get updated.
I'd prefer to not wipe the device's data and repair it from it's current state if possible.
TF101's current state : Stock .27 guevor kernel 717, CWM non touch recovery
From recovery
ls -l /sbin
http://pastebin.com/tmyZagUk
ls -l /system/bin
http://pastebin.com/6tsPaPF0
ls -l /system/xbin
http://pastebin.com/D3jW5Sy3
If you need more info please tell
Click to expand...
Click to collapse
Go to the play store, download & install Goomanager, install TWRP. CWM seems to have a few issues with teh TF101's.
Hello, i have a CWM flashable TWRP recovery, i even tested it, but wasn't able to work with it, it was very slow and didn't found files i was looking for, i will regive it a try.
Edit : I have the exact same problem when flashing SuperSU from TeamWin recovery, everything act as i don't have SU, i can grant rights to anything i want it will still act as i don't have root, and SuperSU is unable to update it own binary at startup
Magissia said:
Hello, i have a problem with my TF101 (B70 if i'm right), ADB only work when i'm in recovery mode.
I lost root i don't know how and tried to regain it, but every rooting tools failled, i then discovered that commands wasn't working (even ls), but they do work in recovery mode (from /sbin).
When i try to flash a .zip from CWM , it seems that changes suposed to be applied to /system/bin aren't applied (SuperUser/SuperSU never find /system/bin/SU) but /system/bin/app correctly get updated.
I'd prefer to not wipe the device's data and repair it from it's current state if possible.
TF101's current state : Stock .27 guevor kernel 717, CWM non touch recovery
From recovery
ls -l /sbin
http://pastebin.com/tmyZagUk
ls -l /system/bin
http://pastebin.com/6tsPaPF0
ls -l /system/xbin
http://pastebin.com/D3jW5Sy3
If you need more info please tell
Bounty : I'll send Russian chocolat and candies to the one that will find how to fix this !
Click to expand...
Click to collapse
Hi, your busybox installation seems corrupt (ie busybox binary is missing). You can reinstall busybox to /system/bin (do make sure that /system is mounted) from inside CWM and everything shall be fine. Your root su also seems to exist and should be fine.
If you can't do it in CWM then you can try and connect to the tablet in normal use mode and then run /system/bin/su and you should be root. Then you can install busybox manually ( you'll need to upload the busybox binary to /data/local/tmp or something) and run:
/system/bin/toolbox chmod 755 /data/local/tmp/busybox ( or if you're in CWM make sure /data is also mounted and then run: /sbin/chmod 755 /data/local/tmp/busybox )
/data/local/tmp/busybox --install /system/bin ( Please verify syntax ).
Good luck!
Sent from my Transformer TF101G using xda app-developers app
idcrisis said:
Hi, your busybox installation seems corrupt (ie busybox binary is missing). You can reinstall busybox to /system/bin (do make sure that /system is mounted) from inside CWM and everything shall be fine. Your root su also seems to exist and should be fine.
If you can't do it in CWM then you can try and connect to the tablet in normal use mode and then run /system/bin/su and you should be root. Then you can install busybox manually ( you'll need to upload the busybox binary to /data/local/tmp or something) and run:
/system/bin/toolbox chmod 755 /data/local/tmp/busybox ( or if you're in CWM make sure /data is also mounted and then run: /sbin/chmod 755 /data/local/tmp/busybox )
/data/local/tmp/busybox --install /system/bin ( Please verify syntax ).
Good luck!
Sent from my Transformer TF101G using xda app-developers app
Click to expand...
Click to collapse
Hello, i cannot do anything if not under CWM (even ls gives a "not found" if not in CWM)
I tried /system/xbin/su and got a
"sh: /system/etc/mkshrc[8]: id: not found"
Rebooted in CWM and tried to install Busybox
i mounted /system /data and /sdcard
i created the folder /data/local/temp
cp /sdcard/busybox /data/local/temp
applied /sbin/chmod 755 to /data/local/temp/busybox
ran /data/local/temp/busybox --install /system/bin and got a "Invalid cross-device link" error on every commands busybox tried to install
http://pastebin.com/g3DMHbJz
Tried to install it on /system/xbin too, but same error
Note : When i use /system/xbin/su in CWM, it change name to [email protected] from ~# while it doesn't in normal mode
Edit : Titanium backup rework :
In CWM, i copied busybox to /system/bin, and i installed it to /system/bin from /system/bin
cp /data/local/temp/busybox /system/bin
/system/bin/busybox --install /system/bin
I'm now checking if only Titanium backup works or if everything else too
Thanks for your help, i don't know if it's done yet, but i made a progress using your information !
Edit 2 : Seems everything works, please send me a private message to talk about candies and chocolat
Magissia said:
Edit 2 : Seems everything works, please send me a private message to talk about candies and chocolat
Click to expand...
Click to collapse
Good to see everything works. Give the candy to some children in the neighborhood mate, I'm watching the calories
Cheers!
Sent from my Transformer TF101G using xda app-developers app
hi!
I flashed this update on my rooted XZ: [ROM] Stock 10.1.1.A.1.253 CWM/TWRP ZIP. (v5 root+dual recovery) LB/UB http://forum.xda-developers.com/showthread.php?t=2279661
since then, whenever I set /system to RW, the phone crashes a few seconds after.
I tried it via root explorer, ES File Manager, Terminal. Also tried repairing permissions in recovery. still doesn't work.
maybe someone has an idea?
thanks!
Reboot in recovery (TWRP is best).
Under /Advanced mount your /system, then go to the File Manager.
Head to this file: /system/etc/install-recovery.sh
Set new permissions with CHMOD 775.
Reboot, you're done!
Now you can mount r/w.