hellos, in trying to get some ad block host files installed but there's no conventional way to write the files... can i use cwm or adb to push the host files?
i understand this isn't practical in terms of keeping the host files up to date but once the files are there 90-99% should be blocked for at least a few months which is good enough for me.
i had the same problem on my a510. after you mount it as rw, use chmod to give yourself write permissions the correct dir (/etc i think?), put the host file in place, then change the permissions back.
i did this with adb.
i cant remember what the permissions are suppose to be for /system and /etc after i messed with them, so i set them both to 755, and now AdFree works as advertised. where before i tinkered with permissions, it couldn't write the host file. i tired a couple adblock apps, and they all had the same write permission issue.
Rusty_Gunn said:
i had the same problem on my a510. after you mount it as rw, use chmod to give yourself write permissions the correct dir (/etc i think?), put the host file in place, then change the permissions back.
i did this with adb.
i cant remember what the permissions are suppose to be for /system and /etc after i messed with them, so i set them both to 755, and now AdFree works as advertised. where before i tinkered with permissions, it couldn't write the host file. i tired a couple adblock apps, and they all had the same write permission issue.
Click to expand...
Click to collapse
I'm using A700 and I've already tried editing permissions, didn't work.
Related
I am a new user, and just ROM'd my Motorola Milestone XT720 using the cinci Bell's 2.2 froyo update. The major problem that I am encountering is that market aps are not downloading files correctly. For example I try to add a podcast into my que using "google listen" and I get the following error:
"Error (/sdcard/com.google.andriod.apps.listen/downloads/f09cfbe (Permission Denied)"
Now I go into supermanger's filesystem, and I notice that /sdcard/ has no permissions at all. I try to add them, but nothing happens when I do. Itself, /sdcard/ is empty.
When I plug the phone into my PC, it can access the SDcard fine. In super manager however, it appears that the directory it is accessing is /mnt/sdcard.
It seems that programs assume that the SDcard is going to be located at /sdcard/ but it is really located at /mnt/sdcard. Is there any way to redirect them?
The normal mount location is /mnt/sdcard, /sdcard is just a symlink for convenience.
Apps should use the android api to determine the sdcard location
Environment.getExternalStorageDirectory();
See http://developer.android.com/reference/android/os/Environment.html
You could readding a symlink from /sdcard to /mnt/sdcard.
Regarding you changing the permissions, do you have root? If not you won't be able to change the permissions or create a symlink.
Do I have root?
Thanks for replying Dark3n.
I think I have root access, but in supermanager explorer, the root directory reads "/(r/o)" - does that "(r/o)" mean read only?
That would make sense of my problem - since I cannot delete, rename, or change the permissions on /sdcard/.
However, I'm pretty sure I have root access. I never rooted my phone after applying the ROM. I just ran superoneclick again, and it said the phone was rooted. Supermanager explorer has superuser permissions. Am I missing something?
I have root
I just installed Root Checker by Joeykrim - it verified root access and a busybox installation.
yes r/o means read only
So what do I do about it? Is this a limitation of the file explorer I'm using or my permissions? I'm not sure how to gain more permissions than superuser.
It would be a huge help if you let me know what steps I need to take. Sorry for being a noob!
ive the same problem but it's with gscript folder.
So I downloaded ES File Explorer, then went into the settings. I turned on the root function, and then used the option below it that said something like "mount root to enable write." I clicked that. ES File Explorer didn't have a change permission feature, so I held down the home button and switched over to supermanager explorer. Now the root directory read "/(r/w)." I was then able to change the permissions for /sdcard/.
The podcasts from google listen at the NPR app I was using were still not downloading properly. I rebooted the phone. Strangely, the permissions that I had just set in the root directory, and the test directory I created in root, were both gone. I don't know how that happens.
I tried using BeyondPod, which works for downloading to /mnt/sdcard/. I wonder if that means Google Listen and the NPR app (DroidShogun) were coded to save to /Sdcard/ rather than prompting the API for a path.
sorry for this post but i dont have the required 10 posts to post in the devolpment thread already on this subject.
I tried the 30fps fix by copying the 4 .so files over but i am still getting 15fps. I am running the latest S7 rom. I dont know what i am doing wrong. I paste them into system/lib and it says that the action was complete. i try to take a vid before and after a reboot and they are still just 15fps. any suggestions.
I've noticed that the multi select function on root explorer and maybe other file managers doesn't work if you are over writing files, might not work for any copy/paste function. I would rename the old files *.so.bak then copy the new ones one by one. after that reboot and see if the changes stuck. if not make sure you are actually rooted. could have a bad su binary causing havoc or something. if you have root ant it is working then to make 100% sure you are mounted rw go into a terminal emulator or adb shell and type
su
(phone should ask for super user permissions or give a toast or notification that su was granted)
mount -o remount,rw /dev/block/stl9 /system
if you don't get any error about illegal operations or permission denied then you should be able to copy the files with 99% certainty. of you have any trouble be sure to include details.
Thanks for the response. I do have full root access. I double checked. I also keep getting a su binarry update warning from Superuser. I update it but everytime i restart the phone it tells me i have to update again. My next mission is to figure out why it keeps reverting back.
I did what you said and replaced the files one at a time. and renamed the originals instead of putting copyies in another location and trying to overwrite the orginals. thank you for your help. I am now recording at 30fps after a reboot.
update to the newwest entropy DD kernel. the older kernels rooted the phone but the trouble with that is if you update the binary the kernel overwrites it on next boot. this is on way the binary can get corrupted.
Renaming the original to .bak also allows you to compare the permissions of the posted file to the original permissions. In some cases, I noticed made a different.
when i try to copy files to /system/ nothing happens
i mounted as r/w so what could be the problem?
ripsta99 said:
when i try to copy files to /system/ nothing happens
i mounted as r/w so what could be the problem?
Click to expand...
Click to collapse
when paste or modifying a file in the root system, you need to tap the r/w to r/o in order to write or change permissions.
If you are doing a 3e mod, don't forget to change the permissions too.
....not working. if i change it to read only it Def not working.
ripsta99 said:
....not working. if i change it to read only it Def not working.
Click to expand...
Click to collapse
Check again to see what you are doing wrong. Its a toggle to read/write or read only.
If you're using root explorer, you have root.
Infuse n root explorer is not smart enough to pick out just you.
Edit.. Are you trying the 3e mod?
Three are easier way
ripsta99 said:
when i try to copy files to /system/ nothing happens
i mounted as r/w so what could be the problem?
Click to expand...
Click to collapse
bad su binary?
does super user show root explorer having super user permission? do you have super user installed? does it give a notification or toast that permissions were granted either when the app starts or on boot?
if that is all ok then open terminal emulator and type
su
(you should see $ change to # and a notification for superuser permissions granted.. if not you likely need to re root the phone)
if that goes OK then type
mount -o rw,remount /dev/block/stl9 /system
if it has any error like permission denied or invalid argument or can't remount folder exists or anything at all then there is something odd going on, could be something I'm overlooking, could be a bad su binary. try reflashing and don't update the binary if you are on a custom kernel.
edit: overlooking busy box. try installing it from a busybox installer from the market! that should fix it if su is OK.
Also, you may new to delete the app and reinstall, that happened to me and it thought I was trying to pirate the app. It would open but Wouldn't let me move/replace anything.
Then I went and verified I paid for it and everything worked after that.
Alright I want to move my location spoofer app to /system/app so I can watch my hometown team on MLB.tv. This worked fine on my LG Nitro running CM10, but when I tried on my stock infinity (rooted, not updated), it won't let me. It just says "paste failed" when I try to move it. Anyone have any advice as to how to fix this?
Have y o u tried mounting the directory as rw so you can paste in there?
Sent from my ASUS Transformer Pad TF700T using xda premium
Sinker1345 said:
Have y o u tried mounting the directory as rw so you can paste in there?
Sent from my ASUS Transformer Pad TF700T using xda premium
Click to expand...
Click to collapse
No I haven't, but just to clarify the app is currently installed on the internal memory, not sd card. I am just trying to move it from one folder to a different folder. Is this still necessary?
It may be, if the directory is mounted as read only you won't be able to copy into it
Sent from my SCH-I535 using xda premium
mgoblueno1 said:
No I haven't, but just to clarify the app is currently installed on the internal memory, not sd card. I am just trying to move it from one folder to a different folder. Is this still necessary?
Click to expand...
Click to collapse
In normal operation, /system is mounted read-only, so you need to remount it as writable first. Root-enabled file managers usually have an option for that.
Thanks guys, will try this out tonight
Alright I tried editing permissions on the system folder, the app, and the root manager app, but they were already all checked (read, write, execute). I also tried just cut/pasting a picture i took to /system/app and I didn't work either...
EDIT: I just tried the remount app, and rewrote the /system folder as rw and it still didn't work
If anyone else has any suggestions on how to fix this let me know!
mgoblueno1 said:
If anyone else has any suggestions on how to fix this let me know!
Click to expand...
Click to collapse
mgoblueno1 said:
Alright I tried editing permissions on the system folder, the app, and the root manager app, but they were already all checked (read, write, execute). I also tried just cut/pasting a picture i took to /system/app and I didn't work either...
Click to expand...
Click to collapse
That's not how you do it. Those are chmod permissions for files and directories. That controls which user groups have rwx permissions for access; nothing to do with mounts. To allow for rw access to /system you need to either do it from within a root browser (ES file explorer, tools), the remount app, or type this into the terminal:
Code:
su
mount -o remount,rw /system
Copy your file or directory, then remount the system back as ro (so you don't accidentally delete something - that's why its mounted ro by default)
Code:
su
mount -o remount,ro /system
mgoblueno1 said:
EDIT: I just tried the remount app, and rewrote the /system folder as rw and it still didn't work
Click to expand...
Click to collapse
I just tried this and it works fine. After you made your selections for /system and rw, did you click the top "Remount" button and get a small pop-up "Success!..." notification that it completed its operation? I also verified that I could copy a test file into /system/app after toggling these settings. You are doing something wrong. Read this all again.
[Edit] The only reason I can think of that it might be failing is you are really not rooted or have a corrupt root. If all else fails, run the Root Checker app to see if you really have valid root. Open up your su app and see if it prompts you to update its binaries and let it if it does (superSU).
elfaure said:
That's not how you do it. Those are chmod permissions for files and directories. That controls which user groups have rwx permissions for access; nothing to do with mounts. To allow for rw access to /system you need to either do it from within a root browser (ES file explorer, tools), the remount app, or type this into the terminal:
Code:
su
mount -o remount,rw /system
Copy your file or directory, then remount the system back as ro (so you don't accidentally delete something - that's why its mounted ro by default)
Code:
su
mount -o remount,ro /system
I just tried this and it works fine. After you made your selections for /system and rw, did you click the top "Remount" button and get a small pop-up "Success!..." notification that it completed its operation? I also verified that I could copy a test file into /system/app after toggling these settings. You are doing something wrong. Read this all again.
[Edit] The only reason I can think of that it might be failing is you are really not rooted or have a corrupt root. If all else fails, run the Root Checker app to see if you really have valid root. Open up your su app and see if it prompts you to update its binaries and let it if it does (superSU).
Click to expand...
Click to collapse
Thanks this worked!
mgoblueno1 said:
Thanks this worked!
Click to expand...
Click to collapse
Glad you got it worked out. Which way worked for you?
I was wondering if Android has a file similar to a windows hosts - a file that manually maps IP addresses to domain names.
Thanks.
Yes. It's in /system/etc/hosts. -- You'll need to be rooted, and remount /system as read/write to be able to modifiy it.
Magamo said:
Yes. It's in /system/etc/hosts. -- You'll need to be rooted, and remount /system as read/write to be able to modifiy it.
Click to expand...
Click to collapse
I'm actually following the instructions here:
http://www.howtogeek.com/140576/how-to-edit-the-hosts-file-on-android-and-block-web-sites/
And it says "failed to copy to /system/etc/hosts: Read-only file system".
Any thoughts?
That howto foolishly leaves out two crucial steps.
adb root
adb remount
Before you try pushing the file back to the phone. As I said, this requires your phone to be rooted, and /system to be remounted as read/write.
Sent from my SGH-T699 using Tapatalk
It worked, but do I need to undo the changes? (ie, unmount, unroot before I disconnect the phone).
You shouldn't need to, however, remounting /system as readonly is not a bad idea, it would prevent malicious apps, unless designed in just such a way from writing there. Worse comes to worse, if you can't figure out how to remount it as ro, you can reboot the phone, and that will do so.