push flash_image permission denied - HTC Desire S

hi
ive been follwing instruction on androidforums.com/incredible-all-things-root/531353-how-unlock-downgrade-achieve-s-off-htcdev.htm (not enough post to set as link) and got to instruction 4 where i have been denied permission to push the flash image.
[email protected]:~$ cd Desktop/miniadb
[email protected]:~/Desktop/miniadb$ md5sum mtd0.img
34307be744275f1db1dd16af04c37839 mtd0.img
[email protected]:~/Desktop/miniadb$ md5sum flash_image
0098a7dd6600b55fac34fc6645be5d7a flash_image
[email protected]:~/Desktop/miniadb$ md5sum PB31IMG.zip
31bb1611a0fa8197d447c0438426717e PB31IMG.zip
[email protected]:~/Desktop/miniadb$ adb push flash_image /data/local
failed to copy 'flash_image' to '/data/local/flash_image': Permission denied
Can anyone give any insight, im running ubuntu if that makes any difference

I don't know much about Ubuntu. could you dual boot to Windows? anyway questions go here http://forum.xda-developers.com/showthread.php?t=2143855
Sent from my supercharged :tank:

Write the file to /data/local/tmp. Only root has write access on /data/local .
Sent from my HTC Desire S

Related

Rooting/SD Card Problem

When I try to get root on my g1 I get to the "flash_image recovery recovery.img" step and I keep getting "error opening recovery.img: No such file or directory." I have tried changing recovery.img to /sdcard/recovery.img and I have made sure that I properly unmounted it from my computer. When I cd to sdcard and ls the only thing inside is dcim, but when I mount it to my pc again the recovery.img and update.zip folders are inside and nothing else.
Not sure what's up with your sdcard issue, but you could always just write the recov directly and bypass the sdcard:
On G1:
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
On PC:
adb push /path/to/recovery.img /system/recovery.img
On G1:
cd system
flash_image recovery recovery.img
When I type "adb push /home/stephen/Desktop/recovery.img /system/recovery.img" I get bash: adb: command not found. Also, I am running Ubuntu 8.10 if that would make a difference.
ShaffersMyHomie said:
When I type "adb push /home/stephen/Desktop/recovery.img /system/recovery.img" I get bash: adb: command not found. Also, I am running Ubuntu 8.10 if that would make a difference.
Click to expand...
Click to collapse
In terminal, you have to cd into the directory where adb is found. It's probably easiest to put the recovery.img in the same directory as the adb file.
Try this:
adb remount
adb push recovery.img /system/recovery.img
that should work.
adb is a part of the Android sdk. If you haven't downloaded the sdk before, you'll need to do that.
Alright now I keep getting error: device not found even though I have mounted my g1.
You have to turn on debuging by going into settings->applications->development->debug
ShaffersMyHomie said:
Alright now I keep getting error: device not found even though I have mounted my g1.
Click to expand...
Click to collapse
You need to follow the directions here:
http://code.google.com/android/intro/develop-and-debug.html#developingondevicehardware
Ok well I switched over to windows because Ubuntu was getting annoying and I installed sdk and everything and now when i enter "adb remount" I get remount failed: Operation not permitted. And if I put in "adb push recovery.img /system/recovery.img" I get failed to copy 'recovery.img' to '/system/recovery.img': Read-only file system.
Do you have rc29?
persiansown said:
Do you have rc29?
Click to expand...
Click to collapse
Yes I have rc29.

error wile rooting

i have a HTC vodaphone magic
i got to set 11 with out any trouble but now im getting this on step 12
i type this adb shell flash_image recovery /sdcard/recovery-new.img
RESULT
C:\Documents and Settings\Will\Desktop\android-sdk-windows-1.5_r2\tools>adb shel
l flash_image recovery /sdcard/recovery-new.img
error opening /sdcard/recovery-new.img: Permission denied
with SPACE
C:\Documents and Settings\Will\Desktop\android-sdk-windows-1.5_r2\tools>adb shel
l flash_image recovery / sdcard/recovery-new.img
usage: flash_image partition file.img
Then it dosnt do anything could any1 help me
thanks Fly
Have you pushed the file to your sdcard? If so try adb shell flash_image recovery recovery-new.img
flyover1 said:
i have a HTC vodaphone magic
i got to set 11 with out any trouble but now im getting this on step 12
i type this adb shell flash_image recovery /sdcard/recovery-new.img
RESULT
C:\Documents and Settings\Will\Desktop\android-sdk-windows-1.5_r2\tools>adb shel
l flash_image recovery /sdcard/recovery-new.img
error opening /sdcard/recovery-new.img: Permission denied
with SPACE
C:\Documents and Settings\Will\Desktop\android-sdk-windows-1.5_r2\tools>adb shel
l flash_image recovery / sdcard/recovery-new.img
usage: flash_image partition file.img
Then it dosnt do anything could any1 help me
thanks Fly
Click to expand...
Click to collapse
hi this method is safer. use the Rav1.1.1G.img instead of the one from the wiki. should be fine
http://forum.xda-developers.com/showthread.php?t=530492
you sorted now mate............enjoy. need anymore help just holla

help rooting CDMA Hero on windows 7 64 bit

I have been following the unlock instructions on these posts on how to unlock the Hero, but I am having some trouble. When to comes to making the adb shell, it just doesn't do it. It shows a dollar sign and says that the request is denied. I just don't get what I'm doing wrong. Are there extra steps for me because there are x86 files? If I have to put the android sdk into the program files x86 folder, how would I enter that into the commander? Any help would be appreciated guys, this is driving me crazy.
OK so you get to the dollar sign. What do you do then?
Kamar234 said:
I have been following the unlock instructions on these posts on how to unlock the Hero, but I am having some trouble. When to comes to making the adb shell, it just doesn't do it. It shows a dollar sign and says that the request is denied. I just don't get what I'm doing wrong. Are there extra steps for me because there are x86 files? If I have to put the android sdk into the program files x86 folder, how would I enter that into the commander? Any help would be appreciated guys, this is driving me crazy.
Click to expand...
Click to collapse
Just extract the sdk so its a folder. Then go to Start->Run-> type cmd.exe in the box that opens. Now navigate to where you extracted the sdk folder. If you extracted it straight onto the c:\ drive at top level, you'd do something like this:
Code:
cd c:\android-sdk\tools
That will get you into the directory that has adb.exe
Now follow the instructions in the "how to root" thread.
I can get down to the point where I execute the adp push and all the lines come up saying that the adp is restarted and there is obviously a command that is executed.
adb shell
chmod 0755 /data/local/asroot2
this part is when it says access is denied. I follow everything perfectly, but I just don't get it.
Oh, easy.
Type "su" and hit enter.
The dollar sign prompt indicates you are running as a regular user. Run su and it will give you a # prompt indicating you are running as root.
Then do the chmod.
It specifically says after entering this line
/data/local/asroot2 /system/bin/sh
system cannot find the path specified. Any ideas?
so when the dollar sign comes up, just type su and hit enter, that's it?
Kamar234 said:
It specifically says after entering this line
/data/local/asroot2 /system/bin/sh
system cannot find the path specified. Any ideas?
Click to expand...
Click to collapse
Are you sure the asroot2 file has been copied over to your phone? What I did is extract asroot2 into the tools folder, so that I could just say adb push asroot2 /data/local/
My suggestion is to make sure the file is in /data/local/
Also, here is the full thing taken from the other thread:
Code:
adb push /directory_you_placed_asroot2/asroot2 /data/local/
adb shell
chmod 0755 /data/local/asroot2
/data/local/asroot2 /system/bin/sh
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /system/bin
cat sh > su
chmod 4755 su
Yup, I put it in the tool folder within the android sdk. I am using the 1.5 sdk as well.
I just really can't understand what I'm doing wrong
Do:
ls -al /data/local
Do you see asroot there?
it says not found. I entered it by the dollar sign
Kamar234 said:
it says not found. I entered it by the dollar sign
Click to expand...
Click to collapse
That means the file isn't copied over. You need to do the adb push line again, and make sure it copies the file over.
how do I do that? Is there a something that it does or says to let you know it has copied over?
Kamar234 said:
how do I do that? Is there a something that it does or says to let you know it has copied over?
Click to expand...
Click to collapse
The first line here:
Code:
adb push /directory_you_placed_asroot2/asroot2 /data/local/
That puts the asroot2 file into your phone's /data/local/ directory.
This line gets you into your phone's shell:
Code:
adb shell
AT THIS POINT, you should see a $ dollar sign. This means you are in your phone.
This line will let you check that asroot2 has been copied over:
Code:
ls -al /data/local
This line gives the file you just copied over, permission to execute/run:
Code:
chmod 0755 /data/local/asroot2
This line runs the file you copied over:
Code:
/data/local/asroot2 /system/bin/sh
This line mounts your file system on your phone as writable:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
I am also running windows 7 through vmware fusion, do you think that would make a difference.
Kamar234 said:
I am also running windows 7 through vmware fusion, do you think that would make a difference.
Click to expand...
Click to collapse
I don't know, I don't think it should. Can you type everything in and then paste us your results?
Type pwd and hit enter.
What do you see?
Thank you so much for all your help everyone. I think I may have finally gotten it. If I am installing an app that needs root access, will it install at all if the phone isn't rooted?

Root fail

Okay, so I tried doing the One-Click Exploit and nothing happened (yes, I had the USB Debugging checked, allow for external developers, and USB Charge Only). So then I tried the manual root. My phone rebooted, but it wasn't rooted. Now when I try to do the Manual Root it says (after the ./zerg) :
[-] Cannot copy boomsh.: Permission denied
[1] + Stopped <signal> ./zerg
And when I tried doing the One-Click again, it rebooted my A2 a couple times and still didn't get it rooted. Help???
Ok first remove the tmp directory in the same place you copied zerg to.
Here are the commands:
From windows:
Launch a command line - go to start run and type cmd or command
Then from the prompt cd to the directory you installed the SDK in and do the following commands:
adb shell
cd /data/local (This will need to be the directory you copied the zerg file to the first time.)
rm ./tmp/*
rm ./tmp/*.*
rm ./tmp
Then follow this post from the root thead:
http://forum.xda-developers.com/showpost.php?p=19916762&postcount=194
Right now there is not a one click for the latest root methods.
The other thing I would do is read through the how to root thread, because there are people that have been able to root by using both the one click and the manual method at the same time to get it to root.
Link to the root thread:
http://forum.xda-developers.com/showthread.php?t=1327741&page=20
Alright, thank you...but I'm a bit rusty with my MS-DOS and I didn't get very far to begin with. So what do you mean by "cd to the directory" and how would I do that? Unfortunately I'm not very sure which directory I installed the SDK in. I think it's data/local/. Here's some of the lines:
c:\Users\User\Deskstop\Exploit\adb shell
shell(character I don't recognize)edison:/$ cd /data/local
cd /data/local
shell(" "):/data/local$ chmod 777 zerg
Sorry for being a little on the illiterate side...I'm like the shadetree mechanic of computers.
According to the xda news,superoneclick has added the zerg rush exploit to it's program.might could try it.
Sent from my MB865
Sent from my MB865
JDtech1701 said:
I'm like the shadetree mechanic of computers.
Click to expand...
Click to collapse
Hey shadetree mechanics keep cars running
Sent from my MB865 using xda premium
JDtech1701 said:
Alright, thank you...but I'm a bit rusty with my MS-DOS and I didn't get very far to begin with. So what do you mean by "cd to the directory" and how would I do that? Unfortunately I'm not very sure which directory I installed the SDK in. I think it's data/local/. Here's some of the lines:
c:\Users\User\Deskstop\Exploit\adb shell
shell(character I don't recognize)edison:/$ cd /data/local
cd /data/local
shell(" "):/data/local$ chmod 777 zerg
Sorry for being a little on the illiterate side...I'm like the shadetree mechanic of computers.
Click to expand...
Click to collapse
You will just highlight each line of commands ONE AT A TIME, then past it to your DOS terminal window then hit return, but just one line at a time.
Ok after you connect to your phone with ADB shell you should see:
see a $ for your prompt.
then copy these lines and paste them one at a time and hit return in your DOS terminal window:
su
cd /data/local
rm ./tmp/*
rm ./tmp/*.*
rm ./tmp
Then follow this:
http://forum.xda-developers.com/showpost.php?p=19916762&postcount=194
http://forum.xda-developers.com/showthread.php?t=1327741
Alright, I put in:
c:\Users\User\Deskstop\Exploit\adb push zerg /data/local
c:\Users\User\Deskstop\Exploit\adb push su /data/local
c:\Users\User\Deskstop\Exploit\adb push superuser.apk data/local
c:\Users\User\Deskstop\Exploit\adb shell
And then I put in all the commands you gave and..."rm failed"
lilhaiti said:
Hey shadetree mechanics keep cars running
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
I know, I was a shadetree auto mechanic myself for a couple years (now I'm a heavy equipment diesel technician...intern). I'm just trying to say that I'm not literate enough to be a developer or anything, but at the same time I know more than your average user.
JDtech1701 said:
Alright, I put in:
c:\Users\User\Deskstop\Exploit\adb push zerg /data/local
c:\Users\User\Deskstop\Exploit\adb push su /data/local
c:\Users\User\Deskstop\Exploit\adb push superuser.apk data/local
c:\Users\User\Deskstop\Exploit\adb shell
And then I put in all the commands you gave and..."rm failed"
Click to expand...
Click to collapse
can you paste the output for me, so I can point you to the next step, or give me the exact error that rm showed? If I can get than I can help you move forward.
It looks like you were having an issue with a previous attemp at root, and there are some temp files we will need to find and remove first before you can try to root again.
Sure!
C:\Users\User\Desktop\Exploit>adb shell
shell(character I don't recognize)edison:/$ su
su
su: not found
shell(" ")edison:/$ cd /data/local
cd /data/local
shell(" ")edison:/data/local$ rm ./tmp/*
rm ./tmp/*
shell(" ")edison:/data/local$ rm ./tmp/*.*
rm ./tmp/*.*
rm failed for ./tmp/*.* No such file or directory
shell(" ")edison:/data/local$ rm ./tmp
rm ./tmp
rm failed for ./tmp, Is a director
shell(" ")edison:/data/local$
JDtech1701 said:
Sure!
C:\Users\User\Desktop\Exploit>adb shell
shell(character I don't recognize)edison:/$ su
su
su: not found
shell(" ")edison:/$ cd /data/local
cd /data/local
shell(" ")edison:/data/local$ rm ./tmp/*
rm ./tmp/*
shell(" ")edison:/data/local$ rm ./tmp/*.*
rm ./tmp/*.*
rm failed for ./tmp/*.* No such file or directory
shell(" ")edison:/data/local$ rm ./tmp
rm ./tmp
rm failed for ./tmp, Is a director
shell(" ")edison:/data/local$
Click to expand...
Click to collapse
Ok, good lets try this to remove the tmp directory.
adb shell
cd /data/local
rm -r ./tmp/
If that does not work install the root explorer app from the adroid market
https://market.android.com/details?id=com.speedsoftware.rootexplorer&hl=en
and locate the /data/local directory and then delete the tmp directory there. This will be the easiest way to remove that stubborn old tmp directory and those files that are holding you up from getting root. Once you have that done try the oneclick again, from here:
http://forum.xda-developers.com/showthread.php?t=1327741
In my experience, deleting the sh and boomsh files is sufficient to enable zergrush to run again. I didn't have to delete the tmp directory itself.
This would've been done in the step you already ran
Code:
shell(" ")edison:/data/local$ rm ./tmp/*
jimbridgman said:
and locate the /data/local directory and then delete the tmp directory there. This will be the easiest way to remove that stubborn old tmp directory and those files that are holding you up from getting root. Once you have that done try the oneclick again, from here:
http://forum.xda-developers.com/showthread.php?t=1327741
Click to expand...
Click to collapse
OK download the moto drivers. 32x or 64x.
Then get the zip file from the root link I'm this forum it should be a batch file your run. It opens a cmd window and follow the steps.
Profit.
It was super easy phone reboots and your rooted on the stock firmware. Pm me of you need the files for some reason I have them.saved in my mass android folder.
Best of luck.
Sent from my Rooted MB865 using XDA App
jimbridgman said:
Ok, good lets try this to remove the tmp directory.
adb shell
cd /data/local
rm -r ./tmp/
If that does not work install the root explorer app from the adroid market
https://market.android.com/details?id=com.speedsoftware.rootexplorer&hl=en
and locate the /data/local directory and then delete the tmp directory there. This will be the easiest way to remove that stubborn old tmp directory and those files that are holding you up from getting root. Once you have that done try the oneclick again, from here:
http://forum.xda-developers.com/showthread.php?t=1327741
Click to expand...
Click to collapse
Uh...are you sure I should remove the tmp directory? It looks like it's got some important stuff in there. Wait...is "tmp" short for temporary?
JDtech1701 said:
Uh...are you sure I should remove the tmp directory? It looks like it's got some important stuff in there. Wait...is "tmp" short for temporary?
Click to expand...
Click to collapse
Yes, but this is not the OS temporary directory, just the one that is, I am guessing in /data/local, or where you copied those files to... I am guessing since you don't have root yet that, that is not /, because then ./tmp would be /tmp (the OS temporary directory, we don't want to remove that one)..... but I am guessing that is not the case since you don't have root.
Yeah I am pretty sure it is safe... I work with UNIX and Linux for a living, and Android happens to be a form of Linux.
Like others have posted, you might be able to try the root process again, since the files that zerg was complaining about are now gone, from the rm ./tmp/* command you ran before... I was just trying to be very thorough.
Okay, I got that Root Explorer and went into tmp and did select all and delete. Now there's .. Parent folder, .X11-unix, appicon, and commdrv left. I tried doing the adb push zerg all the way down to ./zerg as listed in the How To you linked...and it gave me the exact same result. And when I opened Root Explorer, I went straight to tmp. I tried going to the data folder but it said my phone needed to be rooted first. Okay, figuring this app out...yeah, I went to /tmp. I'm not going to be able to access /data/local without rooting it first.
both the 1-click and the manual process fails for me too. I have tried deleting all the files and directory as well and it still doesn't work. When I run either ./zerg or ./zergRush it both fails with the message "Hellion with Blue Flame". Any help would be appreciated.
bbygfy said:
both the 1-click and the manual process fails for me too. I have tried deleting all the files and directory as well and it still doesn't work. When I run either ./zerg or ./zergRush it both fails with the message "Hellion with Blue Flame". Any help would be appreciated.
Click to expand...
Click to collapse
Which system version are you running.... You can find this out by going into settings --> About phone; then give me the text under System version. It should be something like 55.11.16.MB865.ATT.en.US.
Jim
55.11.16.MB865.ATT.en.US
Thanks!

[Q] Cant access Android shell

I attempted to set the Android ash shell as default based on a thread here by:
mv /system/bin/sh /system/bin/sh0
ln -s /system/xbin/bb/ash /system/bin/sh
This did not work? Now when i attempt to open shell I see an error:
-exec '/system/bin/sh failed : No such file or directory'
I'm afraid I have screwed up. I thought about writing a small app to execute a shell command to rename the file back to "sh". Would this work? Do I have simpler options?
Any help appreciated
Thanks,
Bill F
Update
Ok, I was able to get the renamed sh file off the phone with adb pull. I renamed it to "sh" and tried to push it back using:
adb push c:\temp\sh /system/bin
but I get an error that says
failed to copy c:\temp\sh to /system/bin/sh : No such file or directory
What should I do?
Thanks,
Bill F
I, too, had a similar problem.
And were you able to fix it?
Bill F
Any answer?
I'm having the same problem. Does anyone have a solution?
bfarley59 said:
Ok, I was able to get the renamed sh file off the phone with adb pull. I renamed it to "sh" and tried to push it back using:
adb push c:\temp\sh /system/bin
but I get an error that says
failed to copy c:\temp\sh to /system/bin/sh : No such file or directory
What should I do?
Thanks,
Bill F
Click to expand...
Click to collapse

Categories

Resources