[Q] Rooting G2 - Failed to copy : Read-only file system - G2 and Desire Z Q&A, Help & Troubleshooting

Hey,
I'm following the tutorial over at G2 Hacks:
g2hacks.co m/g2-hacks/how-to-root-g2-phone
(omit the space between 'co' and 'm/')
I came across a problem at the beginning of the cmd portion.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
EDIT: Go to 3rd post.

kpaekn said:
Hey,
I'm following the tutorial over at G2 Hacks:
g2hacks.co m/g2-hacks/how-to-root-g2-phone
(omit the space between 'co' and 'm/')
I came across a problem at the beginning of the cmd portion.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
Click to expand...
Click to collapse
If you're wanting to root, go straight to the source; the guide in the Wiki here is based on the work the devs who actually found the means to root the device.
http://forum.xda-developers.com/wik...sion#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
Sent from my T-Mobile G2 using XDA App

I was following the tutorial from the Wiki Guide:
ht tp://forum.xda-developers.co m/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
(omit the space between 'ht' and 'tp' , 'co' and 'm/')
I came across a problem under the TEMP ROOT section.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?

kpaekn said:
I was following the tutorial from the Wiki Guide:
ht tp://forum.xda-developers.co m/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
(omit the space between 'ht' and 'tp' , 'co' and 'm/')
I came across a problem under the TEMP ROOT section.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
Click to expand...
Click to collapse
Is USB debugging turned on and is the SDcard not mounted?
Sent from my T-Mobile G2 using XDA App

Sounds like the SD card is mounted on your PC and not the phone ? It needs to be mounted on the phone or this won't work.
Sent from my HTC Desire Z

All that command does is copy that file from your computer to the sdcard. You could accomplish the same thing by dragging and dropping that file to the sdcard.
The 'push' command just means "copy from location A to location B"
Sent from my HTC Vision using XDA App

You could always just mount the SDcard... but anyway, to solve this type in "adb remount" and enter the command before pushing the file
Sent from my HTC Vision using XDA App

USB debugging is on and SD is not mounted to my computer.
I tried directly copying the files onto the sdcard, but when I need to push rage, busybox, etc. I cannot access the data folder graphically from the computer.
So I'll still need to use cmd.
I tried the remount, but this is what I get:
Code:
C:\AndroidSDK\tools>adb remount
remount failed: Operation not permitted

kpaekn said:
USB debugging is on and SD is not mounted to my computer.
I tried directly copying the files onto the sdcard, but when I need to push rage, busybox, etc. I cannot access the data folder graphically from the computer.
So I'll still need to use cmd.
I tried the remount, but this is what I get:
Code:
C:\AndroidSDK\tools>adb remount
remount failed: Operation not permitted
Click to expand...
Click to collapse
The adb remount error is expected (the command requires your ro.secure prop to be set to 0, which you can't do until you have rooted).
So you were able to copy files to the SD card? Just to verify again, you should try mounting the SD card to you computer (so it shows up as a device on your computer's file explorer), copy over a file, unmount the card from your computer (and remember to also hit the button on phone to do so), and then try the ADB push commands again.

Ok, with the phone on plug it into your computer and mount USB storage. Drag and drop 'su' and superuser.apk into the sdcard then unmount USB storage. Make sure USB debugging is on at this point (you'll see it in the notification task bar). Do these commands:
Code:
adb push rage /data/local/tmp/rage
adb push busybox /data/local/tmp/busybox
adb push root /data/local/tmp/root
adb shell chmod 0755 /data/local/tmp/*
Then in the terminal app type:
Code:
/data/local/tmp/rage
You'll see some message pop up saying something about 'forked #### childs' and that's temp root. Then follow the instructions on running gfree to gain full root. Btw, you can just copy and paste all those commands if you think you'll make a mistake.
You may also be able to run the '/data/local/tmp/rage' command with the 'adb shell' command, never tried it myself though.

kpaekn said:
I was following the tutorial from the Wiki Guide:
ht tp://forum.xda-developers.co m/wiki/index.php?title=HTC_Vision#Rooting_the_Vision_.28G2.2FDZ.29_and_DHD
(omit the space between 'ht' and 'tp' , 'co' and 'm/')
I came across a problem under the TEMP ROOT section.
This is what I type and the error I get.
Code:
C:\AndroidSDK\tools>adb push su \sdcard\su
failed to copy 'su' to '\sdcard\su': Read-only file system
How do you solve this problem?
Click to expand...
Click to collapse
Oh come on !!!
the path separator in linux (and the phone is a linux computer) is / and not \ !!!
So the command is:
Code:
C:\AndroidSDK\tools>adb push su /sdcard/su
Just to tell you something about the unix shell:
The \ char is a so called escape character that you use to tell the shell that it should not ignore the next character even if it is a white space (i.e. space)
You would use it if you have to specify a path that contains spaces:
i.e.:
Code:
mkdir dir\ with\ 3\ spaces
will create a directory with the name "dir with 3 spaces". This would not work without the \ characters.
have fun - Guhl

Haha... it's funny how simple the answer was.
Thanks for your guys' help.

Related

[Q] how do i put files in a read only directory on a rooted evo

how would one add an mp3 file to the read only directory
( system/media/audio/alarms )
the stock ones really don't wake me up
from what i do know the directory is a read only directory and really would like to
put this alarm.mp3 in the that read only folder...
appreciate your help and thanks in advance...
I highly suggest you buy the app "root explorer"
would astro do the same thing?...
Sent from my PC36100 using XDA App
are you fully rooted? if not, i know the answer.
I think I am...how would one confirm?... appreciate your help
Sent from my PC36100 using XDA App
if you have the android sdk set up use "adb remount". It should say something like partition remounted successfully. If you see that then all of your read only directories will be reset to read/write. Afterwards just reboot your phone and it will set everything back to normal.
thank you.....i tried that command and received this error:
remount failed: Operation not permitted
does this mean that I'm not fully rooted? what next?
appreciate your help xHausx ...
1candydick said:
thank you.....i tried that command and received this error:
remount failed: Operation not permitted
does this mean that I'm not fully rooted? what next?
appreciate your help xHausx ...
Click to expand...
Click to collapse
could be, do you have the superuser app in your app drawer? a few more things you can try is typing:
adb shell {enter}
mount system {enter}
at this point you will see either a $ or # sign, the # sign means you have root. If you see the $ type:
su {enter}
if that doesn't change it to a # then try typing
sh0 {enter}
su {enter}
if that still doesn't work then you need to use an exploit to get root. However, if it does work and you see # then type:
mount -t yaffs2 -o remount,rw /dev/block/mtdblock4 /system {enter}
You can put these on your SD card too, you just have to put it in /media/audio/alarms (you can also use "notifications" or "ringtones" instead for those).
mv and chmod should work

[Q] ADB: permission denied

I have used ADB in the past on my G1 and am now running into a problem on my G2. When I try to push a file to the SD card I get "permission denied". Any ideas?
example:
C:\android-sdk-windows\tools>adb shell
$ adb push su /sdcard/su
adb push su /sdcard/su
adb: permission denied
You need to go to the VISIONary when it show "permission deniedArrow", it will pop up something, choose "allow"
Are you sure I need root to push a file? In this guide to perm root (http://forum.xda-developers.com/showthread.php?t=834228) the first step is to disable or uninstall visionary.
I figured it out. You don't need to "adb shell" first
When I try to adb remount , I get a return of "remount failed: operation not permitted" does anyone no how to get adb to remount, I firtst run adb devices , and my phone serial number comes up but cant remount, can someone please help me get past this.
Lol u need to Su first after adb shell I see that u don't have a #
Sent from my HTC Vision using XDA App
The solution is to start ADB in root mode in command prompt...
Steps I did with my Galaxy S to add an App:
1. Connect phone to computer via USB in Debug Mode
2. Load command prompt and type: adb root
3. set read/write for system folder:
adb shell
su
Then type mount and find the location of system folder, in this case for me it's /dev/block/stl9
mount -o remount,rw /dev/block/stl9 /system
exit
exit
4. set your cmd prompt to folder where you have files to push/move onto phone i.e. f:\app or etc using f: and cd app for example
5. then to copy files to system/app folder by typing type: adb push <appfilename>.apk /system/app
Voila!
To remove an app do the following: adb shell rm /system/app/YourApplicationHere.apk
Simples
As a noob it took some time to figure this out with some help here and reading the help info after typing adb in prompt and the Eureka! moment came...
Hope this helps
Peter
ADB or term emu on device
HTC Vision 1.8 OC, CM7 RC1==HAPPY!!

[Q] WTF does "/ #" mean in adb? HELP!

I was in the middle of a nandroid backup, and accidentally entered "adb shell", then exited.
But now, even after power off and reboot, when I "adb shell" I get a prompt that looks like this:
Code:
/ #
instead of the usual
Code:
#
ls gives:
Code:
/ # ls
cache etc proc sd-ext tmp
data init res sdcard
default.prop init.rc root sys
dev mtdcache sbin system
"adb logcat" returns
Code:
/sbin/sh: exec: line 1: logcat: not found
"adb remount" gives
Code:
remount failed: Invalid argument
What is that slash?! It's scary! Is something wrong?
HELP!
When are you running adb shell? What ROM? Details!
The / # means 1) You're in the root folder ("/") and 2) You're the root user ("#").
drmacinyasha said:
When are you running adb shell? What ROM? Details!
The / # means 1) You're in the root folder ("/") and 2) You're the root user ("#").
Click to expand...
Click to collapse
There is no ROM -- I just wiped!
I've never seen the "/" before ... what would make it suddenly appear?
you mean in recovery? that means you're in recovery.
It's fine. Mine does that too when I'm in recovery. Flash something and move on.
drmacinyasha said:
When are you running adb shell? What ROM? Details!
The / # means 1) You're in the root folder ("/") and 2) You're the root user ("#").
Click to expand...
Click to collapse
This. Yes it is an indicator of your current location within the filesystem. Think of it as a reminder when you perform file operations (say you want to delete all the files in the /crap folder but you forget to to a 'cd crap' before the rm command... yes it would be bad)
I know that in most *nix systems, the "/" means root folder ... but I've been using adb for 2 years now and I've never seen my prompt change to anything other than "#".
Even if I cd to another directory, the prompt doesn't change ... it's still "/ #". And if "/" were the current dir, I would think it would be "# /" and then change when I changed dir...
Now the "/" is gone, but when I "ls", the listing is all in a single column, rather than tabbed across the screen.
I'm just baffled why my shell would change randomly like this when I haven't done anything besides wiping ...
d0g said:
I know that in most *nix systems, the "/" means root folder ... but I've been using adb for 2 years now and I've never seen my prompt change to anything other than "#".
Even if I cd to another directory, the prompt doesn't change ... it's still "/ #". And if "/" were the current dir, I would think it would be "# /" and then change when I changed dir...
Now the "/" is gone, but when I "ls", the listing is all in a single column, rather than tabbed across the screen.
I'm just baffled why my shell would change randomly like this when I haven't done anything besides wiping ...
Click to expand...
Click to collapse
yea it's recovery. it always does that when i'm in recovery.

HELP!!!! Cannot update FTV manually

Tried these steps
Connect to your Fire TV using ADB
(If you don’t know how, follow up to Step 4 Part 2 in our Windows or Mac guide)
Run the command: adb shell
Run the command: su
(If this is the first time you’ve ever run su, a pop-up will appear on the Fire TV, select Grant)
Run the command: chmod 777 /cache
Run the command: chmod 777 /cache/recovery
Run the command: cd /cache/recovery
Run the command: echo “--update_package=/cache/update.zip” > command
Run the command: exit
Run the command (yes, again): exit
Run the command: adb push update.zip /cache
(This assumes the update.zip file you renamed in step 2 is in the same directory as adb, otherwise enter the full path to the file like adb push C:\full\path\to\update.zip /cache)
Once the update.zip file has finished transferring to the Fire TV, run the command: adb reboot recovery
The update.zip file is on the same folder where the adb platform-tools is located, but when I enter the full path it says no such file or directory.
Mine looks like this C:\Users\XXX\platform-tools>adb push update.zip /cache
What am I doing wrong, please help
CD to the directory first . then enter adb push update.zip /cache
mastafunk said:
CD to the directory first . then enter adb push update.zip /cache
Click to expand...
Click to collapse
I did everything in the same folder.
Do you suggests I go back to root of c folder then go back to the folder again
Copy and paste what you entered and the error..
[url]https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png[/URL]
https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png
Stevie G said:
[url]https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png[/URL]
https://www.dropbox.com/s/rdr3buikslvw1qm/adb.png
Click to expand...
Click to collapse
when you push a file with adb, the file must be in the same folder/path you're running the adb command from. From your example, you need update.zip on your PC at C:\users\Stevie G\platform-tools\
The error is saying the file isn't at that path.
Luxferro said:
when you push a file with adb, the file must be in the same folder/path you're running the adb command from. From your example, you need update.zip on your PC at C:\users\Stevie G\platform-tools\
The error is saying the file isn't at that path.
Click to expand...
Click to collapse
might have issues with the space in Stevie G, try a folder without spaces.

Scripting help

Hi, I wrote a little script to change couple of files. This is for replacing "ClassicTV" icons to Kodi icons on the FTV home (using llama).
My file is named "k.sh" and I have attached that (remove .txt from the end). The script works fine when I invoke it using "Script Manager", but when I try to invoke it from shell, it gives me execute permission error.
I have a folder in /sdcard called "kscripts' and this folder has the "k.sh" file.
I did try this: "chmod 777 kscripts" (after cd into /sdcard) and "chmod 777 k.sh" (after cd into /sdcard/kscripts).
When I run from shell (su) "./k.sh", I get the message "can't execute: Permission denied".
Any help is appreciated. Thanks.
dbdoshi said:
Hi, I wrote a little script to change couple of files. This is for replacing "ClassicTV" icons to Kodi icons on the FTV home (using llama).
My file is named "k.sh" and I have attached that (remove .txt from the end). The script works fine when I invoke it using "Script Manager", but when I try to invoke it from shell, it gives me execute permission error.
I have a folder in /sdcard called "kscripts' and this folder has the "k.sh" file.
I did try this: "chmod 777 kscripts" (after cd into /sdcard) and "chmod 777 k.sh" (after cd into /sdcard/kscripts).
When I run from shell (su) "./k.sh", I get the message "can't execute: Permission denied".
Any help is appreciated. Thanks.
Click to expand...
Click to collapse
/sdcard doesn't support execution of programs or the linux permission system. If you're rooted, test from somewhere like /data/local which is ext4. If you're not rooted you'll need to work from the PC-side through adb shell,push and the like.

Categories

Resources