Replace 'hosts' file on Desire - Desire Themes and Apps

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

Related

I have Unknown Sources Enabled now

This is the latest release of my fix (June 14, 2011). This version addresses the Market ID and Moto Blur issue.
I have not had a chance to test the latest version, aside from verifying the awk command works as exptected. The rest is a strong educated guess, mixed with a re-tooling of it to just use Android Debug Bridge to do what I was having scripts do in the past. Should be much more reliable.
IF YOU DECIDE TO USE THESE INSTRUCTIONS: PLEASE, read through this page entirely from top to bottom at least once prior to doing anything. This way, if you are unsure on anything, you can ask the questions you need answers to. I am not liable for anybody messing up their phone because they didn't think to read the F'n manual prior to following these steps.
If you don't read this through completely before starting, and you brick your system, Don't come crying to me. I warned you.
This version makes it close to impossible to brick the system, but I left that bit in to cover my arse.
Earlier today, I wrote instructions on how to root the flipside. Now, I have Unknown Sources enabled. Here's how you can do it.
First, if you don't have root, follow these directions:
http://forum.xda-developers.com/showpost.php?p=9702394&postcount=4
Next, you will need to run a script, but for the script to work you will need to install busybox to your rooted flipside. You can either get it from the market, or download it somewhere on the web. I tried installing it from the market, but it just timed out on download for some reason.
Once you have busybox, you have an environment ready for enabling Unknown Sources. Lets do it:
Latest version installs busybox for you]
I have not tested it, so you may still need to tell it to install, but it installs the apk.
1. Download the attachment located in this post.
Unzip to a folder on your desktop.
PLUG IN YOUR PHONE NOW!!!
Double click on the batch file ("enable_unknown_sources.bat"). You may have to run as administrator, but I don't think so. Built on Windows XP (I'm a linux guy who wrote this at work in a couple minutes)
When it prompts for you to OK the super user for "unknown", look at your phone. It should have a prompt. If not, it may be ok. We will see....
once your phone has rebooted, you phone will have "unknown sources" enabled already. Don't worry about rebooting. The batch file did that for you.
Quite a bit less work than before. Good news: it's done! never to worry about it again...unless you upgrade....
DISCLAIMER:
DO NOT FOLLOW ANY OF MY STEPS IF YOU ARE UNSURE OF WHAT YOU ARE DOING! I have done my best to ensure that the instructions are accurate, but I made mistakes in the first revision, so who's to say that I didn't miss something this go 'round as well? If you decide to follow this walk-through, your actions are an agreement to not hold me liable if your phone becomes a pretty brick. I am not responsible for what you do with this information. If you have no idea how to do any portion of these instructions, you can either walk away (best idea), or ask for help here.
I am also not the 2nd shooter on the grassy knoll, nor am I the cause of all your woes throughout life. I always wanted to say that in a disclaimer.
run_second.sh
i get errors when i attempt to run your run_second
though for the life of me... i can't figure out what's wrong with it?
What error do you get?
on all 4 of the cp commands... i get a return of
cp: (destination directory): Invalid argument
EDIT: tried the run.sh script... got an invalid file/folder error on the mount... on one of the cp's... and on the chmod of the same
EDIT: i manually edited the 2 files in the system directory using notepad++ and droid explorer...
couldn't find the 2 databases anywhere on the phone? hidden?
Odd. I did this:
Code:
ls /data/data/com.motorola.android.providers.settings/databases
and I get this back:
Code:
settings.db
The only time I cannot do that is if I don't have super user.
DOH! just realized the issue. once you type "SU", go to your phone, and tell it to allow application "unknown" super user.
Forgot about that part.
well... here's one for you then... i have nothing in my /data/ directory...
never did...
EDIT: wait... droid explorer lied to me... now if i could just get into that file... i could hard change them without having to deal with all the scripting
script typo
Thanks for the script. I have managed to enable it by following your script.
However there are a few typo in your script that caused errors. I have corrected them. You may check attached script.
jonsjava said:
What error do you get?
Click to expand...
Click to collapse
I get an error when I exicute run.sh
: No such file or directory
monho said:
I get an error when I exicute run.sh
: No such file or directory
Click to expand...
Click to collapse
Did you install busybox? Please, run through what you have done so far. My goal is to get a comprehensive how-to together, and any and all input I can get will assist me to that end.
i'm getting read only file errors on the script now... i assume some file attributes need adjusting... not sure how to do that...
Did you remount /system/ in rw mode, as mentioned in the walkthrough? /system is read only by default, but part of my how-to explains how to re-mount it in read/write
all 5 chmod statements return no file found....
EDIT: even reboot is no found
that sounds like you don't have super user, or busybox isn't installed.
i have super user access... i used z4root... this also installs busybox... or so i'm told...
rignfool said:
i have super user access... i used z4root... this also installs busybox... or so i'm told...
Click to expand...
Click to collapse
That does not install busybox. As stated in my how-to, you will need to either download busybox from the market, or get it from the web.
I know it says it does, but I didn't have busybox features until I installed it manually myself.
root explorer FTW
so... after using root explorer to manually edit the mkitso files... and copy the databases from the /ab/ directory....
i made it work...
Hallo there. Please I would appreciate if you can help me. When you say:
1.Look for the one that says "/system". Mine says "/dev/block/mtdblock7"
- Mine says the same too, is that right? Could it be different? Why sould we care where it says 'system'?
2.'type this in (changing the /dev/ as needed)':
-When you say 'as needed' that means changing the /dev/ is not neccesary? What does ir depends? If it's neccesary, what should I type instead of /dev/?
3. 'Code:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock7 /system'
-Must that line be typed exactly as it's shown? I've done so and after running the commands:
cd /sdcard/
sh run.sh
-This error message appears:
No such file or directory
I've rooted with z4. I've already installed BusyBox from the market, altought I can see it's not an app that appears like the others: I've just got an Icon named 'busyBox Installer' and after all it says 'busybox is successfully installed'.
Please excuse my bad english and thank you very much in advance for your help
1. I wrote it that way just in case it was different anywhere else. It shouldn't be.
2. when I said "change /dev/..." It was in reference to 1. above
If /system is /dev/block/mtdblock7 as listed, you don't need to change it.
If /system is /dev/block/mtdblock21 (example), you would need to change my command to read:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock21 /system
That's what I mean when I said change /dev as needed. Seeing how yours is the same as mine, that is not necessary.
3. the command to mount /system will not affect the sdcard. Make sure the /sdcard isn't mounted on your computer. In windows, look in "My Computer", or your languages equivelant, and if you see the phone there, right click and tell it to unmount. Wait a few seconds for the phone to access the SD card, and try again.
so, I too have problems running run.sh
I tried both the one in the original post and the typo fix in the other post. Both didn't work. I get file not found errors.
Yeah, I have z4root done and busybox installed no problem.
For some reason it's not seeing the files when I run run.sh.
Here's a copy paste just to prove what I am seeing:
Unable to chmod /system/etc/motorola/com.android.providers.settings/secure.mkitso
: No such file or directory
Unable to chmod /system/etc/motorola/com.android.providers.settings/system.mkitso
: No such file or directory
I verified that my sdcard has /ab/ folder copied over, and all the subfolders and files from the original archive are moved over.
What gives?

Replacing the existing hosts with addfree

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)

Can't open xRecovery

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.

[Q] Editing Build.prop results in failure to boot [bricked]

As you may know, some Android games especially most Gameloft games are not compatible with the Kindle Fire. So in efforts to find a way to make certain Gameloft games to work such as Modern Combat 2 and Shrek Kart and others, I resorted to editing my build.prop in the systems folder to make my device compatible with the apps. So I copied the original build.prop file, renamed it, and saved it to my SD Card folder. I took the copy I made and I then replaced it with the build.prop from HTC Glacier. (I never knew what could possibly happen) So then to apply those settings you have to reboot the device. I rebooted the Kindle and now it won't boot up. It get's to the Kindle Fire screen when booting up but after several seconds it just shows a black screen. No physical damage has been incurred to it but I feel like my stupid mistake of modding the build.prop resulted in the Kindle Fire unable to boot up correctly. It also isn't recognized by the PC when I hook it up to a USB cable. So far I've found nothing that could help to solve this. I've seen a Factory Default Settings Cable which is a special cable to reverts the device to its factory default settings but I'm not too sure if that would work. I'm in desperate need of help as in I use my Kindle Fire for everyday work and play. Thanks.
EDIT: I've tried adb push and renaming and moving the build.prop into the /system/ but returns that it is a Read-File System Only. Also adb shell and su doesn't work as in it ends up with segmentation fault. I've tried to zergRush root it and permanently root it using KFU but it ends up with 'Cannot Access Package Manager. Is System running?' Also the mount -o rw,remount.....command doesn't work either as it says Permission Denied. All of this would be easy to accomplish if only it ADB allowed me to write onto the /system file.
EDIT**: The biggest issue I'm faced with is the permission settings that prevent my from editing anything. You cannot simply change it from RO to RW because apparently the ADB is not rooted. And I also can't root it because problems exist when accessing either Package Manager or Activity Manager. What I need is a way to access the /system files without a root (non-rooted). Either that or enable fastboot because I cannot access that either. On a reply on the second page is the resulting lines when changing bootmodes on the KFU.
Don't know how to fix your problem, but just wondering, did you just completely replace the kindle fire build.prop with the HTC glacier? Because you can't do that, it will, as you have learned, mess up your device.. Your supposed to edit the build.prop and just change a few things. Next time read up on the subject before deciding to mod the device you use everyday...
the cable you'r talking about is a "factory cable" it forces the kf to fastboot mode - it don't restore any settings !
you need fastboot mode to install fff (firefirefire - custom bootloader) and twrp (recovery)
do you allready have installed fff & twrp (or cwm) ?
if you have twrp installed and booted into then you have adb command available and can copy back the original build.prop
Did you remember to restore the read/write permissions to build.prop? It should be set to 644.
As already stated, your not supposed to replace the whole file, build.prop tells android which device you have, so now Android thought and configured itself to different hardware config. which is not available to it. Adb seems like the only option.
I should have really looked more into it before modifying the build.prop. I replaced the ENTIRE build prop with the build.prop of HTC Glacer. (I know, i know I was stupid) And referring to the factory cable, I don't think I'll resort to that: too time consuming. In regards to the last person that posted before me who said that my only option was ADB could you elaborate? Thanks for all your feedback.
gococogo321 said:
I should have really looked more into it before modifying the build.prop. I replaced the ENTIRE build prop with the build.prop of HTC Glacer. (I know, i know I was stupid) And referring to the factory cable, I don't think I'll resort to that: too time consuming. In regards to the last person that posted before me who said that my only option was ADB could you elaborate? Thanks for all your feedback.
Click to expand...
Click to collapse
Your going to have to use adb to basically remove the HTC Glacier build.prop and replace it with the original build.prop.
For example:
Adb remount <- allows you to mount system as rw
Adb pull /path-to-original/build.prop
Adb push build.prop /system
Adb shell chmod 644 /system/build.prop <- sets permissions to rwrr
Adb reboot
Sent from my Kindle Fire using xda premium
You dont have access to recovery? Either TWRP or CWM?
daggy1985 said:
Your going to have to use adb to basically remove the HTC Glacier build.prop and replace it with the original build.prop.
For example:
Adb remount <- allows you to mount system as rw
Adb pull /path-to-original/build.prop
Adb push build.prop /system
Adb shell chmod 644 /system/build.prop <- sets permissions to rwrr
Adb reboot
Sent from my Kindle Fire using xda premium
Click to expand...
Click to collapse
I tried doing that but it says something like Access Denied or Read-Only File System when i try to push the build.prop into it.
gococogo321 said:
I tried doing that but it says something like Access Denied or Read-Only File System when i try to push the build.prop into it.
Click to expand...
Click to collapse
Did you use the 'adb remount' command? Sometimes, when attempting to push a file to the system, I get the 'read-only file system' and I have to issue adb reboot followed by adb remount and then push the file again. It seems after a time the mount system as read write automatically goes back to read-only.
Sent from my ADR6400L using xda premium
Have you got TWRP or ClockworkMod?
Because you could flash a new rom then.
abd - root mode
Perhaps, running adb in root mode will
allow you to push the original build.prop
back. Then execute "adb remount / rw" to mount the
root directory as read/write. Hopefully you will be able to push
it then follow daggy1985's instructions.
* In Win 7, type "cmd " at the 'SEARCH/RUN' and hold
shift + ctrl while hitting 'Enter' to put yourself
in Admin mode which apparently makes adb work in root mode when you launch it.
* Xda-dev is the coolest site for Android that I have seen. Kudo's to everyone participating.
sum1nil said:
Perhaps, running adb in root mode will
allow you to push the original build.prop
back. Then execute "adb remount / rw" to mount the
root directory as read/write. Hopefully you will be able to push
it then follow daggy1985's instructions.
* In Win 7, type "cmd " at the 'SEARCH/RUN' and hold
shift + ctrl while hitting 'Enter' to put yourself
in Admin mode which apparently makes adb work in root mode when you launch it.
* Xda-dev is the coolest site for Android that I have seen. Kudo's to everyone participating.
Click to expand...
Click to collapse
Thanks but I have actually been running it from Administrator from the very beginning. I've used Kindle Fire Utility KFU and it says that ADB Server is Online and my Bootmode is 4000 but it says ADB root: No. And whenever I choose any bootmode whether it be Normal, Fastboot, or Recovery, it always shows this:
***********************************************
* Activating Normal (4000) *
***********************************************
Installing BurritoRoot, Courtesy of Jcase of TeamAndIRC!
1393 KB/s (1164225 bytes in 0.816s)
Error: Could not access the Package Manager. Is the system running?
Activating BurritoRoot...
Error type 2
android.util.AndroidException: Can't connect to activity manager; is the system
running?
Elevating the Shell...
* daemon not running. starting it now *
* daemon started successfully *
/data/local/tmp/BurritoRoot3.bin: permission denied
mount: Operation not permitted
mount: Operation not permitted
failed to copy 'files\rbfb' to '/system//rbfb': Read-only file system
Unable to chmod /system/rbfb: No such file or directory
Unable to chmod /system/rbfb: No such file or directory
mount: Operation not permitted
mount: Operation not permitted
***********************************************
* Root Activated *
***********************************************
The kindle is successfully running in root mode.
<idme> Invalid permission
reboot: Operation not permitted
Same goes for the Temp Burrito Root and installing FFF and TWRP. It always shows something about cannot access Package manager. I have no clue what the Package Manager even does but apparently I cannot find a solution to that.
I think you need to get a factory programming cable like we talked about on gtalk. I'm confident that will fix this.
Sent from my DROIDX using Tapatalk
I used android commander for windows, mounted system in TWRP and used android commander to copy a new working build.prop to the right place.
With a cable from my htc desire.
would make a little test:
issue "adb shell"
if you get a error message your up to a factory cable because the system shell is messed up and you have no possibility to get to fastboot mode to install fff & twrp
if you get a $ or # prompt you can resume and try "mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system" to mount system in read/write mode
daggy1985 said:
Your going to have to use adb to basically remove the HTC Glacier build.prop and replace it with the original build.prop.
For example:
Adb remount <- allows you to mount system as rw
Adb pull /path-to-original/build.prop
Adb push build.prop /system
Adb shell chmod 644 /system/build.prop <- sets permissions to rwrr
Adb reboot
Sent from my Kindle Fire using xda premium
Click to expand...
Click to collapse
hey, I've tried to remount my rooted galaxy y, fall in for same problem.but there show this message; "remount failed: Operation not permitted"
my device's usb debugging mode was off in last entire.
what I have to do now?
how did u edit build.prop in the first place if u don't have root and this might help
http://yaseminavcular.blogspot.com/2012/01/how-to-get-bricked-kindle-fire-back-to.html?m=1
Sent from my R800i using Tapatalk

MAKING SYSTEM WRITABLE - [Z5] [Nougat] AFTER ROOT

after ROOTING Nougat 32.3.A.0.376 (E6833 E6853 E6883) (E6633 E6653 E6683 ), we will still face ERROR while removing system apps, because GOOGLE has changed file system properties in Android N to READ ONLY
in order to make system directory WRITABLE, install busybox, and terminal,
type these lines and enter one by one in #terminal
Code:
su
mount -o rw,remount /system
ORRR
Code:
su
busybox mount -o rw,remount,rw /system
-----------
What???
Why ??? I still can not write anything on the SYSTEM partition
I have full ROOT access and everything , no reboot or error issue !!
Please share if you find any solution to that
chinmoy32 said:
Why ??? I still can not write anything on the SYSTEM partition
I have full ROOT access and everything , no reboot or error issue !!
Please share if you find any solution to that
Click to expand...
Click to collapse
Mee too unable to write on system
download terminal on google play
open terminal
write "su" command and give root permission
then you will see "#"
after that, write this command:
Code:
echo 0 > /sys/kernel/security/sony_ric/enable
then you write this command:
Code:
mount -o rw,remount /system
if you see "#" again, it worked
but if you see "mount: Operation not permitted" it has not, sorry
Credits: https://forum.xda-developers.com/showpost.php?p=70677335&postcount=92
I did what @serajr described here:
https://forum.xda-developers.com/xp...-kernel-dm-t3301605/post70595975#post70595975
works like a charm, system always writable!
Can any of you share here your perfectly rooted working kernel for Z5 E6683 DSDS ????
chinmoy32 said:
Why ??? I still can not write anything on the SYSTEM partition
I have full ROOT access and everything , no reboot or error issue !!
Please share if you find any solution to that
Click to expand...
Click to collapse
i found a workaround and it goes
installing busybox
installing terminal
and writing following codes
Code:
su
'to give terminal root access
busybox mount -o rw,remount /system
later using ROOT APP REMOVER i manage to remove all bloatware!
toncheee said:
I did what @serajr described here:
https://forum.xda-developers.com/xp...-kernel-dm-t3301605/post70595975#post70595975
works like a charm, system always writable!
Click to expand...
Click to collapse
@serajr workaround was fo when rootkernel4.51 wasn't able to support Nougat kernel
however if you follow carefully, the lines mentioned
Code:
on post-fs
export LD_PRELOAD libNimsWrap.so:libdrmfix.so
and
Code:
write /sys/kernel/security/sony_ric/enable 0
will switchoff SONYRIC and will fix DRM
the issue is NOT sony RIC,
Google in general with or without any security/rootaccess changed the system folder properties from default Writable in <+ 6.01 Android version to READABLE ONLY from android 7.xx
so when i followed the both method of altering file via notepad++ in the ramdisk folder using N kernel and rootkernel version4.5, I ended up having fully root system with READLY ONLY ACCESS to /system partition and i could only switchoff the apps but can't remove!
YasuHamed said:
@serajr workaround was fo when rootkernel4.51 wasn't able to support Nougat kernel
however if you follow carefully, the lines mentioned
Code:
on post-fs
export LD_PRELOAD libNimsWrap.so:libdrmfix.so
and
Code:
write /sys/kernel/security/sony_ric/enable 0
will switchoff SONYRIC and will fix DRM
the issue is NOT sony RIC,
Google in general with or without any security/rootaccess changed the system folder properties from default Writable in <+ 6.01 Android version to READABLE ONLY from android 7.xx
so when i followed the both method of altering file via notepad++ in the ramdisk folder using N kernel and rootkernel version4.5, I ended up having fully root system with READLY ONLY ACCESS to /system partition and i could only switchoff the apps but can't remove!
Click to expand...
Click to collapse
I also think the issue is not the RIC but something to do with the Nougat filesystem itself.
I can delete all the files and folders with any file managers I like but like after 1 sec they all reappear as nothing ever happened to them !!!
How strange is that ??
It shows file sizes when I delete them and take times to delete the folders with , say for 500MB
but they still reappear after just 1 refresh or 1 sec.
I cant figure it out at all for the sake of my sanity --- why the hell this is happening ????
https://www.dropbox.com/sh/2kf8wg3g13pv869/AACB3l8iPJHJnBlpnGorRqrha?dl=0
@bungadudu @chinmoy32
I followed bungadudu-s steps and it worked i can change permissions and prove it with link i provided.
And chenges, yes they stick after reboot and i can rename files allso, but:
after reboot i have to repeat this steps if i want to change something elsewhere, old changes do stick aroind though
I deletet phone to 0 mb in twrp, flashed AU nougat .372 with flashtool, rebooted into twrp, flashed zip file provided in link, then flashed supersu in link and rebooted, no custom kernel used
Next i will try to copy modified thermal files now and see if they stick after reboot and if kernel aduitor uses them, see you later
Observations:
-i changed permissions from file /system/build.prop and changed lcd density to 320 and i have bootloop
working on how to boot it up...
YasuHamed said:
after ROOTING Nougat 32.3.A.0.372 (e6833 e6853 e6883) (E6633 E6653 E6683 ), we will still face ERROR because GOOGLE has changed file system properties in Android N to READ ONLY
in order to make system directory WRITABLE, install busybox, and terminal,
type these lines and enter one by one in terminal
Code:
su
busybox mount -o rw,remount /system
-----------
Click to expand...
Click to collapse
Please share the exact name / way to install busybox and terminal
i.e. which version of busybox I need to install from where ?? Which terminal app you used ?? if possible please share the links
https://www.dropbox.com/s/d9ie598b618feiz/recovery.log?dl=0
i managed to get somesort of log from twrp in link from previous post will this sufice?
i am reflashing my phone so i can not look at versions, for now i used:
when i reboot it i can look into busybox version
SR3-SuperSU-v2.79-SR3-20170114223742, on top of that i installed pro:
https://play.google.com/store/apps/details?id=eu.chainfire.supersu.pro
busyboxpro
https://play.google.com/store/apps/details?id=stericson.busybox.donate
terminal from romtoolbox pro:
https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro
those are some apps i support so i dot know if it makes a diference from non paid
chinmoy32 said:
Please share the exact name / way to install busybox and terminal
i.e. which version of busybox I need to install from where ?? Which terminal app you used ?? if possible please share the links
Click to expand...
Click to collapse
chinmoy32 said:
Please share the exact name / way to install busybox and terminal
i.e. which version of busybox I need to install from where ?? Which terminal app you used ?? if possible please share the links
Click to expand...
Click to collapse
I install both of them via play.google.com
https://play.google.com/store/apps/details?id=stericson.busybox&hl=en
&
https://play.google.com/store/apps/details?id=jackpal.androidterm&hl=en
later i opened terminal and ran those commands
later i installed System App remover
https://play.google.com/store/apps/details?id=com.jumobile.manager.systemapp&hl=en
granted it SU rights and removed HANGOUTS and GOOGLE MOVIES etc
It seems to work to some extend but if you want to go tweak it up, kablaaam
i did not managed to boot it up after bootloop sadly, i need my phone so this is it for me this week
stipi69 said:
https://www.dropbox.com/s/d9ie598b618feiz/recovery.log?dl=0
i managed to get somesort of log from twrp in link from previous post will this sufice?
i am reflashing my phone so i can not look at versions, for now i used:
when i reboot it i can look into busybox version
SR3-SuperSU-v2.79-SR3-20170114223742, on top of that i installed pro:
https://play.google.com/store/apps/details?id=eu.chainfire.supersu.pro
busyboxpro
https://play.google.com/store/apps/details?id=stericson.busybox.donate
terminal from romtoolbox pro:
https://play.google.com/store/apps/details?id=com.jrummy.liberty.toolboxpro
those are some apps i support so i dot know if it makes a diference from non paid
Click to expand...
Click to collapse
I just clean install 372 and patched the kernel once again .................
tried the terminal commands ---- both commands were successful (without any errors )
but still the deleted apps and the edited files came back to normal as before
I did not manage to delete anny apps as my phone crashed before, i am glad you get commands to work.
oh, by the waj roomtoolbox is great as you can make shortcuts of the commands and then you klik it one after another and you get rid of the typing
example (first shortcut command depends of busybox install folder i think)
1.st shortcut "cd /su"
2.nd shortcut "su"
3.rd shortcut "echo 0 > /sys/kernel/security/sony_ric/enable"
4.th shortcut "mount -o rw,remount /system"
that way some people can do this quick and you dont need to remember commands, and you can experiment quicker.
sorry i dont know howto annything else for now
chinmoy32 said:
I just clean install 372 and patched the kernel once again .................
tried the terminal commands ---- both commands were successful (without any errors )
but still the deleted apps and the edited files came back to normal as before
Click to expand...
Click to collapse
stipi69 said:
I did not manage to delete anny apps as my phone crashed before, i am glad you get commands to work.
oh, by the waj roomtoolbox is great as you can make shortcuts of the commands and then you klik it one after another and you get rid of the typing
example (first shortcut command depends of busybox install folder i think)
1.st shortcut "md /su"
2.nd shortcut "su"
3.rd shortcut "echo 0 > /sys/kernel/security/sony_ric/enable"
4.th shortcut "mount -o rw,remount /system"
that way some people can do this quick and you dont need to remember commands, and you can experiment quicker.
sorry i dont know howto annything else for now
Click to expand...
Click to collapse
I just managed to restart my phone successfully after changing the LCD density to 320 [I also use this value since always ]
But then I carefully just deleted 1 single app and booom--- boot loop
PS. i used root explorer to just click mount as R/W and then do anything to system partition --
Great you magaged it, and yes 320 seems so right.
And i asume there is no way to break bootloop?...other than reflashing?
I had trouble afterwards on downgrading to.253, 3x times error on start, even after reseting " power & + " and couple of full wipes in twrp.
I had to flash lineage from twrp and boot it up and only then flashtool succeeded pushing. 253.
This nougat will be fun i see
If there is something to try tell me i will flash it once more tonight, otherways i can do it on weekends
Oh i did not tell, i managed to copy modified thermal files with no error and then changed lcd density so i can not 100% tell which caused bootlop, since i did not reboot in between...
chinmoy32 said:
I just clean install 372 and patched the kernel once again .................
tried the terminal commands ---- both commands were successful (without any errors )
but still the deleted apps and the edited files came back to normal as before
Click to expand...
Click to collapse
there is another way which i did not try because the busybox commands worked for me
its about flashsing updater script
delete_recursive(
"/system/app/GoogleAnalyticsProxy",
"/system/priv-app/GoogleBackupTransport",
"/system/priv-app/textinput-chn-xxhdpi",
);
https://forum.xda-developers.com/showpost.php?p=70920831&postcount=2015

Categories

Resources