"No such file or directory" - Nexus 5 Q&A, Help & Troubleshooting

Returned N5 to stock after flashing flashing stock image to undo what I think was a dodgy CWM.
Now when in fastboot and issuing command fastboot boot c:\android\...TWRP.img, fastboot informs me no such file or directory exists, but it does.
The flashing of the latest factory image was simply done with the auto .bat found the hammerhead unzip so it was not an issue, but now when trying to flash a new custom recovery this is what happens.
From what Skynet tells me these are 32 bit binary commands, however I am using 64bit Windows. In linux this does not seem to be a problem as
sudo apt-get install ia32-libs
will fix it.
Is there a solution for this problem in Windows?

Whats the full command you're running? Just to rule out mistakes
-----------------------
Sent via tapatalk.
I do NOT reply to support queries over PM. Please keep support queries to the Q&A section, so that others may benefit

I run 64bit windows 7 and have no issues with that. Are you certain your file is in the same folder as the directory in the cmd line? and that the file is not named twrp.img.img?

oooh .img .img
good shout will test
HAHA
Yeah was being tard, flashed now.
Always the little things lol, that would have been me stumped most of the night creating linux boot drives lol.
Thanks very much!

Related

Nandroid restore python script for linux

Having seen this thread http://forum.xda-developers.com/showthread.php?t=512319
I thought that also linux users could need a script like that, so I wrote this simple script in python that automates the fastboot restore process.
Requirements:
File attached that contains fastboot for linux and the script
Fastboot working (you must have drivers for fastboot working)
Python installed
Procedure:
Create a folder
put script, fastboot and img files you want to restore in the folder
open a terminal
run: "cd /folderYouCreated
run "python nandrest_linux.py"
Follow on-screen instructions
For any problem use this thread
Good idea.
Could your script be tweaked so that it could be put into the 'restore' image by JF or the Dude? It would be great to be able to do a restore from the restore mode, just as one can now do the Nandroid backup.
I don't know, because it is written in python.. Maybe if someone translate it in bash script language..
well the bigger problem is, blackgin's script is doing exactly what the windows batch file is doing - calling fastboot. I just wonder why we can't use flash_image in recovery?
billc.cn said:
well the bigger problem is, blackgin's script is doing exactly what the windows batch file is doing - calling fastboot. I just wonder why we can't use flash_image in recovery?
Click to expand...
Click to collapse
Not sure why you keep saying you can't use flash_image in recovery as I stated on the other thread you CAN use flash_image. I have done it several times
korndub said:
Not sure why you keep saying you can't use flash_image in recovery as I stated on the other thread you CAN use flash_image. I have done it several times
Click to expand...
Click to collapse
I have been able to get it to work also in Recovery Mode
Well ok, but then im wondering, why JF didn't add that function, if it is so simple..
Markazeh said:
Well ok, but then im wondering, why JF didn't add that function, if it is so simple..
Click to expand...
Click to collapse
he added the console to his recovery image thus providing that ability to do this....
Blackgin, your script is so easy for noobs like me to use!
Now that I've corrected my foolish folly, its now on to installing Cyanogen's 4.1.999 ROM!

NS4G Recovery Question

So I just rooted via Pete's instructions, I'm on CWM 3.1.0.1 or something but I see some people are on 4.x.x.x what should I be on? Rom manager only lists the 3.1.0.1 thanks in advance.
DigitalDementia said:
So I just rooted via Pete's instructions, I'm on CWM 3.1.0.1 or something but I see some people are on 4.x.x.x what should I be on? Rom manager only lists the 3.1.0.1 thanks in advance.
Click to expand...
Click to collapse
you should upgrade to the latest, 4.x.x.x.
Im not really finding a link to that CWM version, if I flash one of the kernels will it give me the newest recovery? I know that's how people did it on the fascinate.
Going into the nexus s developement thread and look for cwm 4.x.x.x section posted by j_r0dd. The latest should be 4.0.1.4. Grab that .img file and put it into your C:\AndroidSDK\tools folder or wherever you have it located.
1. Open cmd,
cd C:\whateveryounamedit\tools
2. Boot into bootloader
3. Plug in usb and type: fastboot devices, your devices # should pop up, sometimes if its blank its still connected.
4. Type: fastboot flash recovery nameofrecovery.img
I would give a link, but im on the app.
Sorry.
EDIT: oh and be sure you grab the one for ns4g devices.
Wow thanks for being so helpful! I'll do that ASAP.
Your welcome.
kijp15 said:
Going into the nexus s developement thread and look for cwm 4.x.x.x section posted by j_r0dd. The latest should be 4.0.1.4. Grab that .img file and put it into your C:\AndroidSDK\tools folder or wherever you have it located.
1. Open cmd,
cd C:\whateveryounamedit\tools
2. Boot into bootloader
3. Plug in usb and type: fastboot devices, your devices # should pop up, sometimes if its blank its still connected.
4. Type: fastboot flash recovery nameofrecovery.img
I would give a link, but im on the app.
Sorry.
EDIT: oh and be sure you grab the one for ns4g devices.
Click to expand...
Click to collapse
adb doesn't seem to recognize fastboot as a command? I'm in the bootloader though.
Anyone have a zip of the cwm 4.x.x.x recovery?
Did you install android sdk on your computer? If not, you should do that before you proceed.
EDIT: or did you put adb to your path on your computer
I'm on W7 so I just went to platform-tools and typed cmd in the address bar. However fastboot isn't in platform-tools?
So I went to tools but got another error trying to flash.
Sorry for all the questions I've never had to use fastboot.
Or just put the .img file on the root of your sdcard.
Open terminal
type flash_image recovery /sdcard/nameofrecovery.img
Download android terminal
su
flash_image recovery /sdcard/nameofrecovery.img
Hit enter, it should now read the .img file
After that type reboot recovery to check it. Hope this helps.
kijp15 said:
Download android terminal
su
flash_image recovery /sdcard/nameofrecovery.img
Click to expand...
Click to collapse
If it says no image found?
DigitalDementia said:
If it says no image found?
Click to expand...
Click to collapse
Are you doing correctly?
I've done it a tons of time and it never gave me that msg.
When downloaded it, did it say .txt at the end, if it did change it from
.txt to .img.
And try again.
Positive. I renamed it cwm4.img for ease of use and I type:
su
flash_image recovery /sdcard/cwm4.img
Then it says flash_image: not found
kijp15 said:
When downloaded it, did it say .txt at the end, if it did change it from
.txt to .img.
And try again.
Click to expand...
Click to collapse
Still an image file.
Is your img file in any folders?
If it is your doing something wrong that I don't know about. Ha. If it is take out and out it on the root of your sdcard.
I've just flashed a img wit this same exact process and it went threw.
kijp15 said:
Is your img file in any folders?
If it is your doing something wrong that I don't know about. Ha. If it is take out and out it on the root of your sdcard.
I've just flashed a img wit this same exact process and it went threw.
Click to expand...
Click to collapse
Ugh... frustrating! It's not in a folder, it's right on the root mocking me. Okay just so I know I'm doing it right I do it like this:
su
flash_image recovery /sdcard/cwm4.img
Right? With the spaces between recovery and /sdcard/ ?
Hmmm... that is right.. is your terminal a black or blue background?
If its black your have the wrong terminal.

[Linux/Mac] ADB & Fastboot (Un)Install Script [Team BlueRidge]

[Linux/Mac] ADB & Fastboot Install Script
I have created a script to be used to install ADB and Fastboot on a Mac or a Linux computer. Simply run the script in Terminal or a similar application and it will copy ADB and Fastboot to /usr/local/bin/
Also, as of Version 3.1 this also installs the JDK for Linux-based systems.
While advanced users probably won't need this, it would be good for new users who need help using the ADB and Fastboot commands.
You can see the source at GitHub.
Download
If you have any problems or errors, let me know.
Changelog:
20171202
Moved entirely to GitHub
On Debian-based Linux, installs the adb and fastboot packages
Other systems, the binaries are pulled from Google's website
Executables are given +x permissions
Version 5.0
Hosted on GitHub and Google Code
Uses latest adb and fastboot (as of April 3, 2014)
Install to /usr/local/bin/
Version 4.1
Uses cp rather than mv
Hosted on GitHub again
Team BlueRidge project
Version 4.0
Now installs adb and fastboot to /usr/bin/ which is a more appropriate directory for the files.
Includes Readme now!
Version 3.1
Added JDK Install for Linux
Version 3
Created separate scripts for Linux & Mac
Updated uninstall script
Version 2.1.1
Fixed errors in installer
Version 2.1
More code efficient.
Better comments in script.
Version 2
Combined installer scripts into one Universal
Updated Uninstall.sh to remove udev rules
Version 1.1
Added udev rules for Linux
Version 1
Initial release
Linux
Didn't work on linux, I suggest making a seperate script for linux, I believe the problem is where it detects linux. It gets sudo but nothing more. I ran each command by itself under linux and it worked. Thanks.
shootind5nukes said:
Didn't work on linux, I suggest making a seperate script for linux, I believe the problem is where it detects linux. It gets sudo but nothing more. I ran each command by itself under linux and it worked. Thanks.
Click to expand...
Click to collapse
Thanks! I'll fix that and post an update soon!
JDK is now installed on Linux systems!
Now hosted on Google Code rather than GitHub.
Now installs to /usr/bin/, which is a more appropriate directory as these files are not required for normal system booting or are required for the general functions of your operating system.
i know this thread is old but i need some help.
my devices are not showing up after running the script.
i used adb devices and ./adb devices
boneskid1 said:
i know this thread is old but i need some help.
my devices are not showing up after running the script.
i used adb devices and ./adb devices
Click to expand...
Click to collapse
Does it say that ADB is not found or your devices?
Try enabling ADB (USB Debugging) on your device if it says no devices were found.
Gingerbread: Settings>Applications>Development>USB Debugging
Ice Cream Sandwich: Settings>Developer options>Android debugging
Thanks!!!! This worked perfectly. Using Ubuntu 11.10.
romuloxiii said:
Thanks!!!! This worked perfectly. Using Ubuntu 11.10.
Click to expand...
Click to collapse
I'm happy I could help! Don't forget to click "Thanks" if you liked it!
If you have any issues in the future with it, please feel free to let me know!
Good news!!! This is now a Team BlueRidge project and is on Team BlueRidge's GitHub
since tar.gz files are linux that means I download the zip file on my mac right? sorry if the question is obvious
prflash3 said:
since tar.gz files are linux that means I download the zip file on my mac right? sorry if the question is obvious
Click to expand...
Click to collapse
Download whichever for whichever platform. It's the script inside that you use that matters.
Trying to run the script on OSX, but when I am prompted to enter my password I can't type anything. Please help.
Ditto ul49, being prompted for a password, please advise
Simply type your account password. It won't look like anything is being typed but it is. This is how the "sudo" command works. It is for security.
really glad i found this.
i run "sh "sh script name" and i get this error
ADB-Install-Linux.sh: 5: ADB-Install-Linux.sh: Syntax error: newline unexpected
not sure if it's installed or what
thanks for making this set of scripts and if u could advise me on that error id be grateful.
---------- Post added at 05:46 PM ---------- Previous post was at 05:44 PM ----------
crazy
apt-get install android-tools-fastboot
and
apt-get install android-tools-adb
worked
Just released the first update in two years. Sorry to leave this project unmaintained. The files are now hosted by Team BlueRidge as Google Code no longer supports downloads.
First, thank you very much for putting this together for fellow users. While I'm not the most savy of guys I thought I might just share my experience while installing this ADB + Fastboot package on my MacBook Pro (mid 2012) running OS X Mavericks 10.9.3 in the hopes that somebody might benefit from it as well.
So here it goes:
I tried running the installation script found in "Androidv5.zip" which up until now is the latest version (I think). The script failed to install:
"This will install ADB and Fastboot on your computer.
Root Permissions required. Please type your password.
Password:
Changed directory to /Users/User/Downloads/Androidv5
Moving ADB
cp: /usr/local/bin/adb: No such file or directory
ADB Moved to /usr/local/bin/adb
moving Fastboot
cp: /usr/local/bin/fastboot: No such file or directory
Fastboot moved to /usr/local/bin/fastboot
You may now run Android Debug Bridge and Fastboot commands
Have a nice day."
So I figured I'd open the script file and run each command manually but they would still not work. I then decided to open the target directory
from terminal and it couldn't find it either, so I openned the /usr/ directory to find where the /bin/ directory was... and I found it at | /usr/bin | instead of | /usr/local/bin |.
I ran the commands in the script again manually one by one with the target directory set to | /usr/bin | and then closed terminal and reopened. After that I tried running "adb devices" and the output was "permission denied".
I then applied a "chmod 775 /usr/bin/adb" "chmod 775 /usr/bin/fastboot", closed & reopened terminal and voilĂ  it worked!
Again I'm not a savy guy... there might probably be a better way to do this or perhaps I didn't run the install script as it was supposed to but anyway I decided to let you guys know how it went just in case it proves useful to somebody else....
Then again thanks a lot for sharing this! I finally have ADB + Fastboot on my Mac without having to nag about downloading the Android SDK. :laugh: :good:

[Q]How can I extra the system.img file

Can dev teach me ..
How can I extra the system.img file under windows 7 OS.
dickluo said:
Can dev teach me ..
How can I extra the system.img file under windows 7 OS.
Click to expand...
Click to collapse
You will need the android SDK and adb.
You can either do this through the terminal app on the phone or by using adb...
With adb:
From windows command line, and the phone connected via usb.
adb shell
su
cat /dev/block/system > /sdcard/system.img
If you use the terminal, you run the same commands as above, except the adb command.
To get the file on your hard drive, run this from the windows command prompt:
adb pull /sdcard/system.img .
Jim
Sent from my MB865 using xda premium
EDIT- lol, Jim and I had two different perspectives on your question . Are you asking how to create a system.img based off of your current /system, or are you asking how to extract an .img you already have and set up a working directory for ROM building?
Under Win7? Good luck with that. The system.img contains a filesystem that Windows doesn't natively support. You can use an app like Ext2Read to open and extract .img's, but if you do that all the symlinking will get messed up because Windows filesystems don't support symlinks. Also, Ext2Read might freeze or not fully extract the image just because of compatibility issues.
I highly recommend you use VirtualBox or set up a dual-boot with a Linux OS like Ubuntu. From there, you can install the ROM Kitchen which makes building ROMs a lot easier. It will let you set up a working directory based off of a system .img, and it detects all symlinks and adds them to the updater-script.
cogeary said:
EDIT- lol, Jim and I had two different perspectives on your question . Are you asking how to create a system.img based off of your current /system, or are you asking how to extract an .img you already have and set up a working directory for ROM building?
Under Win7? Good luck with that. The system.img contains a filesystem that Windows doesn't natively support. You can use an app like Ext2Read to open and extract .img's, but if you do that all the symlinking will get messed up because Windows filesystems don't support symlinks. Also, Ext2Read might freeze or not fully extract the image just because of compatibility issues.
I highly recommend you use VirtualBox or set up a dual-boot with a Linux OS like Ubuntu. From there, you can install the ROM Kitchen which makes building ROMs a lot easier. It will let you set up a working directory based off of a system .img, and it detects all symlinks and adds them to the updater-script.
Click to expand...
Click to collapse
Thanks cogeary .
I need the ext2read to explorer the *.img file and it can extra anyone file from *.img to my disk.
And can I use the *.apk from other *.img to create/use on my phone/system.
dickluo said:
Thanks cogeary .
I need the ext2read to explorer the *.img file and it can extra anyone file from *.img to my disk.
And can I use the *.apk from other *.img to create/use on my phone/system.
Click to expand...
Click to collapse
Sometimes. You can probably use apps like the alarm clock or browser that come from a different firmware, but don't try using framework files (like framework-res, systemui, etc) and important apps (like the dialer or phone) from different firmwares.

[Q] [SOLVED] Trying to install Stock Asus ROM

On my TF700T I'm currently running CyanogenMod version 11-20140805-SNAPSHOT-M9-tf700t. I currently have CWM Recovery 6.0.4.4
I want to return to a stock Asus ROM from their website.
I've tried flashing WW_epad-user-10.6.1.14.10.zip with CWM but get an error...
assert failed: write_raw_image("/tmp/blob", "staging")
E:Error in /storage/sdcard1/WW_epad-user-10.6.1.14.10.zip
(Status 7)
Installation aborted.
What is it I'm doing wrong?
No thoughts?
I just tried commands from this thread, and I get error: cannot open 'blob' - yes the blob files was in the same folder as fastboot.
What cant I get this to work???
Bad download maybe?
sbdags said:
Bad download maybe?
Click to expand...
Click to collapse
I've downloaded the update 4-5 times... How big a deal is the different models? WW, TW, US??? I think it's WW, it was purchased in Australia.
Thanks for replying
When you tried to flash the zip from cwm did you unzip it first? I.e., flash the zip in the zip?
Other than that check the output of fastboot devices first.
sbdags said:
When you tried to flash the zip from cwm did you unzip it first? I.e., flash the zip in the zip?
Other than that check the output of fastboot devices first.
Click to expand...
Click to collapse
Yup I unzipped the download.
I'm running a Mac book pro, but running boot camp or OSX I still get 015d262e98340004 fastboot
typing fastboot reboot did reboot the tablet so fastboot and adb are working correctly.
FL00DY said:
I currently have CWM Recovery 6.0.4.4
assert failed: write_raw_image("/tmp/blob", "staging")
E:Error in /storage/sdcard1/WW_epad-user-10.6.1.14.10.zip
Click to expand...
Click to collapse
IIRC the "staging" target doesn't work in CWM - don't remember about TWRP. But you can edit the updater-script and replace "staging" with "/dev/block/mmcblk0p4", that should work.
FL00DY said:
I get error: cannot open 'blob' - yes the blob files was in the same folder as fastboot.
Click to expand...
Click to collapse
That's a common mistake in many of the guides - the file must be in your *current* directory.
FL00DY said:
Yup I unzipped the download.
I'm running a Mac book pro, but running boot camp or OSX I still get 015d262e98340004 fastboot
typing fastboot reboot did reboot the tablet so fastboot and adb are working correctly.
Click to expand...
Click to collapse
Hmm I've never used a mac in my life so I can't help you any further. On a windows machine or linux the last thing to check is that the blob file is in the same folder but you already said that.
Can you run an md5sum on the zip file (I know you dl'ed it 5 times) just to confirm it is not getting corrupted....
Other than that I'm out of ideas - sorry.
_that said:
IIRC the "staging" target doesn't work in CWM - don't remember about TWRP. But you can edit the updater-script and replace "staging" with "/dev/block/mmcblk0p4", that should work.
That's a common mistake in many of the guides - the file must be in your *current* directory.
Click to expand...
Click to collapse
The stock updater-script looks like this
Code:
assert(package_extract_file("blob", "/tmp/blob"), write_raw_image("/tmp/blob",
"staging"),delete("/tmp/blob"));
When you say replace "staging" - what should the bottom line look like?
This post says the blob must be in the same folder as the fastboot.exe - what do you mean when you say the file must be in your "current" directory?
sbdags said:
Hmm I've never used a mac in my life so I can't help you any further. On a windows machine or linux the last thing to check is that the blob file is in the same folder but you already said that.
Can you run an md5sum on the zip file (I know you dl'ed it 5 times) just to confirm it is not getting corrupted....
Other than that I'm out of ideas - sorry.
Click to expand...
Click to collapse
I've setup adb and fastboot to work the same way in Windows & OS X. I used to be a PC guy til I moved to graphic design... Thanks everyone for the help :good:
FL00DY said:
When you say replace "staging" - what should the bottom line look like?
Click to expand...
Click to collapse
If you don't know how to do a simple text substitution, I'd recommend you use the fastboot method.
FL00DY said:
This post says the blob must be in the same folder as the fastboot.exe - what do you mean when you say the file must be in your "current" directory?
Click to expand...
Click to collapse
That post is wrong as I already said. Files whose name you specify on a command line must be in your current working directory (of your shell), unless you specify them with a path. So you either have to use "cd" to the directory containing the blob file, or you have to specify the (relative or absolute) path to the blob file on the fastboot command line.
_that said:
If you don't know how to do a simple text substitution, I'd recommend you use the fastboot method.
Click to expand...
Click to collapse
Well I just wasn't sure if I was only replacing Staging ...
Meaning should the line look like this ...
Code:
"/dev/block/mmcblk0p4"),delete("/tmp/blob"));
That post is wrong as I already said. Files whose name you specify on a command line must be in your current working directory (of your shell), unless you specify them with a path. So you either have to use "cd" to the directory containing the blob file, or you have to specify the (relative or absolute) path to the blob file on the fastboot command line.
Click to expand...
Click to collapse
OK sure that makes sense, I just didnt want you meant by current. Thanks very much :good:
It all worked on Friday, thanks so much @_that life saver ... oh and I wasn't trying to steal your thunder in the other thread :good:

Categories

Resources