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
Problem writing /system/etc/hosts
Hi forum,
I have searched around the forum for advice regarding copying my own hosts file to my wildfire, but it wont work. I have used adb to transfer the file from computer, and used the terminal on the phone by directly getting it from the internet.
On the terminal i followed:
http://forum.xda-developers.com/showpost.php?p=3719090&postcount=6
where i get the error "cant open 'hosts' : Out of mermory"
and via the adb where i followed:
http://forum.xda-developers.com/showpost.php?p=6697366&postcount=2
where it gives the same error.
It might be me missing out on something but i cant figure out what i am doing wrong.
I am running CyanogenMod 6.1 stable 12/12-2010.
I hope someone have the time and help me figure this out.
Thanks in advance
Omorashi
Omorashi said:
Hi forum,
I have searched around the forum for advice regarding copying my own hosts file to my wildfire, but it wont work. I have used adb to transfer the file from computer, and used the terminal on the phone by directly getting it from the internet.
On the terminal i followed:
http://forum.xda-developers.com/showpost.php?p=3719090&postcount=6
where i get the error "cant open 'hosts' : Out of mermory"
and via the adb where i followed:
http://forum.xda-developers.com/showpost.php?p=6697366&postcount=2
where it gives the same error.
It might be me missing out on something but i cant figure out what i am doing wrong.
I am running CyanogenMod 6.1 stable 12/12-2010.
I hope someone have the time and help me figure this out.
Thanks in advance
Omorashi
Click to expand...
Click to collapse
Lolz , u were sooo close !!!!!
Reboot into Recovery , goto partitions menu and mount /system partition then use adb from ur computer
adb remount
adb push hosts /system/etc/hosts
adb reboot
should fix it (i recommend that you search for the new hosts file from adfree adblocker , also in the new Wildpuzzle Rom if your comfortable moveing files between roms before flashing)
Hope this helps
PS. Until AlphaRev comes out we dont have Read/write Access to the /system partition while the phone is running :-( (Google S-ON HTC Devices)
Splendid
Ok thanks, it works. I knew it was some sort of permission that was needed, which made me crazy. (I am new in this android world)
I just made it into a batch file, so it is is easy to update the hosts file as new comes along. This is also to make it easier for the next that comes along with my problem. It requires adb ofcourse.
By a local hosts file (can probably be made more user friendly, but it works for me):
Code:
@ echo off
echo Updating hosts file:
echo You need to have added the adb path to Environment variables,
echo Or placed this batch file in the directory with adb.
echo The hosts file should be in the same directory as this file.
echo After unpause are the phone started in recovery:
pause
adb reboot recovery
echo Waiting for device to reboot into recovery
echo After it is done rebooting do the following:
echo Go to partitions menu
echo Mount system (first option)
echo Unpause and the file gets overwritten:
pause
adb remount
adb push hosts /system/etc/hosts
echo Check if it is done correctly (the transfer).
adb reboot
pause
And by the way i used the updated hosts file on "external website" that was recommended in another thread i found about updating hosts file on this forum. (Cant post the direct link)
Hey
I've tried to install xrecovery, and done what this video says: http://www.youtube.com/watch?v=O6eRfqs8TVs but when i reboot, it won't work. Nothing happends when i press the bkac button alot.
If it is some files, causing this, then please send me yours, so i don't have to ask for them, when you have answered
SimonXiDk said:
Hey
I've tried to install xrecovery, and done what this video says: http://www.youtube.com/watch?v=O6eRfqs8TVs but when i reboot, it won't work. Nothing happends when i press the bkac button alot.
If it is some files, causing this, then please send me yours, so i don't have to ask for them, when you have answered
Click to expand...
Click to collapse
It happens to me to at the first time, all you have to do is delete the files and paste them again.. xD if still didn't work, i'll post my files here so you can tried..
I have tried now, but it won't work. I would be glad if you posted your files :b
Have you set the right permissions for the files?
All files needs to be writeable. The easiest way to set the write permissions is to use root explorer.
Or if using terminal emulator: Chmod each file to: 777
After a lot of trying this worked for me:
1. Download xRecovery from here.
2. Copy three files to sdcard - xrecovery.tar, busybox, chargemon
3. Just in case, get Busybox from Market and install it.
4. Copy three files from sdcard to /system/bin - don't forget to mount system as r/w (you can do it with Root Explorer by simply clicking "mount r/w" button)
5. Chmod all three files to 777 - with Root Explorer, open context menu for file and select "Permissions" and make sure all 9 boxes are ticked. Or, use adb shell.
6. Turn off your phone normally.
7. Turn on and keep pressing back button, now you should enter xRecovery.
blagus said:
5. Chmod all three files to 777 - with Root Explorer, open context menu for file and select "Permissions" and make sure all 9 boxes are ticked. Or, use adb shell.
Click to expand...
Click to collapse
Can i give permission, when the files are in the bin? Will it work then?
blagus, i did what you said, but still, with no luck .. :s
SimonXiDk said:
blagus, i did what you said, but still, with no luck .. :s
Click to expand...
Click to collapse
It is important to install xRecovery 0.1!!!
I have tried to install 0.3 first but it is not work on X8.
So use this only: http://forum.xda-developers.com/showthread.php?t=878426
qsmyle said:
It is important to install xRecovery 0.1!!!
I have tried to install 0.3 first but it is not work on X8.
So use this only: http://forum.xda-developers.com/showthread.php?t=878426
Click to expand...
Click to collapse
If you read the whole thread, then you would know, that it is the same that blagus said. And as i said, i did all that he said.
Use this files.. If didn't work, I don't know what to say, can't understand your problem..
Now i got to know that i should download these same three files three times. again - it do not work.
SimonXiDk said:
Now i got to know that i should download these same three files three times. again - it do not work.
Click to expand...
Click to collapse
Here did you pasted those files? Didn't you already having xrecovery running well, before you reflash your phone?
Now you get the story:
First of all, i tried in hours to get xRecovery work on my phone. Then succesfully, in some unknown way, i made it work.
Then i screwed up, and deleted the bin, so my phone wouldn't turn on.
Then i had to use SEUS to get my phone work, and I did that succesfully. But it was only 2.1 now.
Now i want 2.2 again, but can't make xRecovery work.
Weee it works now D I have no idea what I did diffrent this time, but it works now D thank you all for taking time, to help me ;b
And you're using 2.1 android, right? Is it rooted? If yes, all you have too do (and before that, delete the old files that you already pasted, except busybox..):
-put the files on your sdcard root;
-go to root explorer and to the sdcard folder;
- forget it busybox, just copy the other files;
- go to system/bin and then select the W/R option;
- then just paste them e restart your phone..
Then press a few times the back key, right after SE logo apears.. If you did't get anything, go again to the bin folder with root explorer and see if was created a folder with the xrecovery name.. If yes, just try again pressing back key until you get xrecovery menu..
" adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push "D:\Manu\Android\xrecovery/chargemon" "/sdcard/tmp/chargemon"
failed to copy 'D:\Manu\Android\xrecovery/chargemon' to '/sdcard/tmp/chargemon': Permission denied
adb push "D:\Manu\Android\xrecovery/xrecovery.tar" "/sdcard/tmp/xrecovery.tar"
failed to copy 'D:\Manu\Android\xrecovery/xrecovery.tar' to '/sdcard/tmp/xrecovery.tar': Permission denied
adb shell dd if="/sdcard/tmp/chargemon" of="/system/bin/chargemon"
/sdcard/tmp/chargemon: cannot open for read: Permission denied
adb shell dd if="/sdcard/tmp/xrecovery.tar" of="/system/bin/xrecovery.tar"
/sdcard/tmp/xrecovery.tar: cannot open for read: Permission denied "
what should i do?
crazyboy05 said:
" adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
adb push "D:\Manu\Android\xrecovery/chargemon" "/sdcard/tmp/chargemon"
failed to copy 'D:\Manu\Android\xrecovery/chargemon' to '/sdcard/tmp/chargemon': Permission denied
adb push "D:\Manu\Android\xrecovery/xrecovery.tar" "/sdcard/tmp/xrecovery.tar"
failed to copy 'D:\Manu\Android\xrecovery/xrecovery.tar' to '/sdcard/tmp/xrecovery.tar': Permission denied
adb shell dd if="/sdcard/tmp/chargemon" of="/system/bin/chargemon"
/sdcard/tmp/chargemon: cannot open for read: Permission denied
adb shell dd if="/sdcard/tmp/xrecovery.tar" of="/system/bin/xrecovery.tar"
/sdcard/tmp/xrecovery.tar: cannot open for read: Permission denied "
what should i do?
Click to expand...
Click to collapse
you're going to need to mount the system first. I believe it's adb shell -> su -> then something. Can't remember now.
so im stuck and can not figure this out. for some reason the permissions for the download folders on my sd card do not have any user permissions checked. i can not download anything at all but the market is fine as it is on the internal memory i suppose. the only reason i came across the user permissions issue was because i found another post where someone had the same problem with downloading and corrected the issue by using root explorer and manually adding user permissions to any folder he used for downloading. now... here is my problem... i used root explorer and when i try to add user permissions to these folders, the settings that changed do not stick. i check mark the 3 boxes and accept the changes but if i go back into that folders specific permissions, they are unchecked once again. how can i get it to not revert back or better yet how can i just resolve the issue in whole so i dont have to keep fixing folder permissions on the sd card for app that downloads? i dont see why the sd card of all places would start having these permission issues. the guys post i came across tried to tie this issue to the fix permissions option in rom manager saying it may have caused the problem but i didnt use rom manager to fix permissions until this problem started. i was on liberty 1.5 rom then reverted back to rooted stock where i still have the problem with all downloading except the market again. any help would be greatly appreciated!
58 views and not a single response? wow.... so very shocking to see that, i bet if i had post this in the dev forum i would have gotten 15+ responses just to say that im in the wrong section then anther 30 for people to argue back and fourth on how everyone is being rude or that this is the reason devs stay in irc...
Give this a try if you have the sdk and adb set up.
from a command prompt:
1) adb devices (make sure that your phone shows up)
2) adb shell
3) su (assuming you have rooted your phone)
4) cd /mnt/sdcard/download (or whatever the folder on your sdcard for downloads is called)
5) chmod 777 /mnt/sdcard/download (or whatever your download folder is called)
this should change the permissions on your sdcard to have full permissions.
thanks for your reply! im grateful, but wouldnt that only change the permissions for the "download" folder? which is mostly only a default location for apps such as the browser?
The way sysadmin-x is suggesting makes the permissions way different than they are by default, I wouldn't recommend doing it that way.
If you want to change permissions on the entire sd card to what they are by default, try running(as root)
Code:
chown -R system:sdcard_rw /mnt/sdcard && chmod -R 075 /mnt/sdcard
Edit: that code messes up the permissions on one folder, after running that you should also run
Code:
chown -R root:root /mnt/sdcard/.android_secure && chmod -R 000 /mnt/sdcard/.android_secure
Just do this: download a terminal emulator from the market. Open the app. Type su and press enter. Give it root access. Type chmod 777 /sdcard and press enter.
Please note you need root to do this
Everything was good until I started messing with the 4.4 roms. Now no matter what I do. Full Wipe, Factory Image restore, try different Roms/Kernels, etc, my MAC Address will reset after every reboot. This is an issues as I use Mac Filtering on my router. Any Ideas?
The same is happening to me and I can't find a way to fix it!
It sucks because my main connection (my University wifi) doesn't let me connect if I have a different MAC Address.
I'm using this app to change my MAC (temporarily) https://play.google.com/store/apps/details?id=com.jworksbr.macspoofer
You need root to make it works.
Anyway, I'm still trying to find a way to get my original MAC address back.
joaocadide said:
The same is happening to me and I can't find a way to fix it!
It sucks because my main connection (my University wifi) doesn't let me connect if I have a different MAC Address.
I'm using this app to change my MAC (temporarily) https://play.google.com/store/apps/details?id=com.jworksbr.macspoofer
You need root to make it works.
Anyway, I'm still trying to find a way to get my original MAC address back.
Click to expand...
Click to collapse
I ended up using http://forum.xda-developers.com/showthread.php?t=2347060
For mac address:
- In /persist directory create wifi directory. In the new directory create a file named .macaddr (don't miss the dot!)
Edit the file and put 12 random hex numbers in it (0-9, A-F), save.
- Set execute and read permissions for everybody on /persist/wifi directory and change owner of .macaddr to wifi:wifi and permission to 660 (read/write for owner and group and nothing else).
In command line:
Code:
chown root:root /persist/wifi
chmod 755 /persist/wifi
chown wifi:wifi /persist/wifi/.macaddr
chmod 660 /persist/wifi/.macaddr
- run /system/bin/conn_init program. Can be run in root explorer(choose Linux Script Handler when you open it), or in adb shell:
Code:
su
/system/bin/conn_init
Then reboot and check if the changes got applied in settings
I cant get my original one back but at least I have a static MAC.
..
chainup said:
For me it's only the last 6 numbers/letters that keep changing on reboot. For both Wifi and Bluetooth. Is it the same for you guys?
Click to expand...
Click to collapse
Yeah first are always 11:22:33
Thank you, bandit97!
It's working fine now! =D
bandit97 said:
I ended up using http://forum.xda-developers.com/showthread.php?t=2347060
For mac address:
- In /persist directory create wifi directory. In the new directory create a file named .macaddr (don't miss the dot!)
Edit the file and put 12 random hex numbers in it (0-9, A-F), save.
- Set execute and read permissions for everybody on /persist/wifi directory and change owner of .macaddr to wifi:wifi and permission to 660 (read/write for owner and group and nothing else).
In command line:
Code:
chown root:root /persist/wifi
chmod 755 /persist/wifi
chown wifi:wifi /persist/wifi/.macaddr
chmod 660 /persist/wifi/.macaddr
- run /system/bin/conn_init program. Can be run in root explorer(choose Linux Script Handler when you open it), or in adb shell:
Code:
su
/system/bin/conn_init
Then reboot and check if the changes got applied in settings
I cant get my original one back but at least I have a static MAC.
Click to expand...
Click to collapse
i came from your link too but this didn't work for me
anyone know why?
Hi. This has been driving me crazy! My Nexus 4 also gets a new Mac address on each reboot. My local WiFi hotspot thinks i am a new customer every time I visit (as it uses Mac address filtering) which is frustrating. I got onto Google about it but they said i should return the phone to the retailer (didn't get it on the Play store). I tried reverting the phone to Android 4.3, resetting etc but nothing works. I the phone was fine at first so I can only assume it is a hardware fault. Does anyone have any more incite into this or a solution?
Could someone explain how I run the commands in an adb shell? I'm familiar with adb and android toolkit etc. Many thanks! PS. I tried it using root explorer and it did not work
Sent from my Nexus 4 using xda app-developers app
Where is /persist directory?
bandit97 said:
I ended up using http://forum.xda-developers.com/showthread.php?t=2347060
For mac address:
- In /persist directory create wifi directory. In the new directory create a file named .macaddr (don't miss the dot!)
Edit the file and put 12 random hex numbers in it (0-9, A-F), save.
- Set execute and read permissions for everybody on /persist/wifi directory and change owner of .macaddr to wifi:wifi and permission to 660 (read/write for owner and group and nothing else).
In command line:
Code:
chown root:root /persist/wifi
chmod 755 /persist/wifi
chown wifi:wifi /persist/wifi/.macaddr
chmod 660 /persist/wifi/.macaddr
- run /system/bin/conn_init program. Can be run in root explorer(choose Linux Script Handler when you open it), or in adb shell:
Code:
su
/system/bin/conn_init
Then reboot and check if the changes got applied in settings
I cant get my original one back but at least I have a static MAC.
Click to expand...
Click to collapse
Where is the /persist directory found? Does this work on unrooted phones? I have the Chinese S5 phone which changed Mac address every time I reboot or turn off and on the wifi. This has me logging in to my router to add a new mac every time.
You DO need to be rooted
ayonbaxter said:
Where is the /persist directory found? Does this work on unrooted phones? I have the Chinese S5 phone which changed Mac address every time I reboot or turn off and on the wifi. This has me logging in to my router to add a new mac every time.
Click to expand...
Click to collapse
Hello, you need not only root access, but a file manager capable of mounting read-write permissions, like ES File Explorer (free on Google Play).
If you have a Terminal Emulator, this will help. If not, find one on the Play Store. My favorite is from developer Jack Palevich, found here.
Otherwise, you won't see the directory on a stock file manager, especially if you're NOT rooted. Although I am on CM 10.2, this has plagued me as well when I was running CM11.
Good luck!
furboom1240 said:
Hello, you need not only root access, but a file manager capable of mounting read-write permissions, like ES File Explorer (free on ).
If you have a Terminal Emulator, this will help. If not, find one on the Play Store. My favorite is from developer Jack Palevich, found .
Otherwise, you won't see the directory on a stock file manager, especially if you're NOT rooted. Although I am on CM 10.2, this has plagued me as well when I was running CM11.
Good luck!
Click to expand...
Click to collapse
i have the same problem, i cant find the /persist directory. i installed ES file exloprer but on / there is no /persist folder only these folders:
acct, cache, config, custom, d, data , dev, etc, mnt, proc ,protect_f,protect_s, root, sbchk, sbin, sdcard, sys,system, vendor
can i create a persist folder or do i have a bigger problem with my system?
Lack of Details
tommy0014 said:
i have the same problem, i cant find the /persist directory. i installed ES file exloprer but on / there is no /persist folder only these folders:
acct, cache, config, custom, d, data , dev, etc, mnt, proc ,protect_f,protect_s, root, sbchk, sbin, sdcard, sys,system, vendor
can i create a persist folder or do i have a bigger problem with my system?
Click to expand...
Click to collapse
First of all, do you have Superuser-managed root access? In order for me to assist, you need to answer that. The /persist directory should certainly exist, as it was so on all devices I own, rooted or not. When browsing the filesystem, please be careful what you mess with. Even with root access, you must exercise judgment in what you modify.
As always, Root Responsibly.
Stay custom, my friends...