Jump to content

ADB No such file or directory

Zuccers
Go to solution Solved by Nikado7,

I think I figured out the problem after going through this myself.  Don't name the file "filename.zip"...just name it "filename".  Seems like putting .zip on it makes it think the filename of the file is filename.zip and being a zip folder it ends up seeing it as filename.zip.zip so try doing it without the .zip when you name the folder so name the folder OTA, then in adb put OTA.zip and it should work.  :D

Hello. So i have an android phone and i want to rewrite/change it's ROM. So i tried using "ADB" but everytime i would type "adb sideload <filename>" It would give me an error saying "No such file or directory" when the file clrearly exists in the "platform-tools" folder. Any ideas?

Thanks in advance :)

Link to comment
Share on other sites

Link to post
Share on other sites

You can also include the path to platform-tools in your Windows path variable (I'm guessing you are on windows).

This way you don't have to search for that folder every time and "adb" will work from anywhere on the computer.

Link to comment
Share on other sites

Link to post
Share on other sites

I have the path and everything, but when i tipe the name of the rom i want to inport i get an error saying "no such file or directory"


C:\Users\LENOVO\Desktop\tools\platform-tools>cmd
Microsoft Windows
(c) „Microsoft Corporation“

C:\Users\LENOVO\Desktop\tools\platform-tools>adb devices
List of devices attached
CQLN7LSCSSMRLJO7        sideload


C:\Users\LENOVO\Desktop\tools\platform-tools>adb sideload 2018062921-s21v57c2k-jk-tee-ota.zip
adb: failed to stat file 2018062921-s21v57c2k-jk-tee-ota.zip: No such file or directory

C:\Users\LENOVO\Desktop\tools\platform-tools>

Link to comment
Share on other sites

Link to post
Share on other sites

rename the file to something simpler to type in for one thing... then try again.

Please quote my post, or put @paddy-stone if you want me to respond to you.

Spoiler
  • PCs:- 
  • Main PC build  https://uk.pcpartpicker.com/list/2K6Q7X
  • ASUS x53e  - i7 2670QM / Sony BD writer x8 / Win 10, Elemetary OS, Ubuntu/ Samsung 830 SSD
  • Lenovo G50 - 8Gb RAM - Samsung 860 Evo 250GB SSD - DVD writer
  •  
  • Displays:-
  • Philips 55 OLED 754 model
  • Panasonic 55" 4k TV
  • LG 29" Ultrawide
  • Philips 24" 1080p monitor as backup
  •  
  • Storage/NAS/Servers:-
  • ESXI/test build  https://uk.pcpartpicker.com/list/4wyR9G
  • Main Server https://uk.pcpartpicker.com/list/3Qftyk
  • Backup server - HP Proliant Gen 8 4 bay NAS running FreeNAS ZFS striped 3x3TiB WD reds
  • HP ProLiant G6 Server SE316M1 Twin Hex Core Intel Xeon E5645 2.40GHz 48GB RAM
  •  
  • Gaming/Tablets etc:-
  • Xbox One S 500GB + 2TB HDD
  • PS4
  • Nvidia Shield TV
  • Xiaomi/Pocafone F2 pro 8GB/256GB
  • Xiaomi Redmi Note 4

 

  • Unused Hardware currently :-
  • 4670K MSI mobo 16GB ram
  • i7 6700K  b250 mobo
  • Zotac GTX 1060 6GB Amp! edition
  • Zotac GTX 1050 mini

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

@paddy-stone I changed it to "update" gueass what... It didn't work

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Zuccers said:

@paddy-stone I changed it to "update" gueass what... It didn't work

Is the update file in the current directory?  If not, you need the FULL PATH to it.

Link to comment
Share on other sites

Link to post
Share on other sites

yes it is

C:\Users\LENOVO\Desktop\tools\platform-tools>adb sideload update.zip
adb: failed to stat file update.zip: No such file or directory

C:\Users\LENOVO\Desktop\tools\platform-tools>adb sideload update
adb: failed to open file update: No such file or directory
 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Zuccers said:

@paddy-stone I changed it to "update" gueass what... It didn't work

i had this problem with my Essential PH1 aswell. try putting the update.zip into a different folder and flash it from there. that worked for me. 

to this day i still have no idea why it didn't detect it in the ADB folder..

Link to comment
Share on other sites

Link to post
Share on other sites

Well i dont know how to flash it so i'm kinda lost here. but thanks 

Link to comment
Share on other sites

Link to post
Share on other sites

  • 4 months later...

I think I figured out the problem after going through this myself.  Don't name the file "filename.zip"...just name it "filename".  Seems like putting .zip on it makes it think the filename of the file is filename.zip and being a zip folder it ends up seeing it as filename.zip.zip so try doing it without the .zip when you name the folder so name the folder OTA, then in adb put OTA.zip and it should work.  :D

Link to comment
Share on other sites

Link to post
Share on other sites

  • 7 months later...

I have the same problem

Just wanted to clarify in what mode is this supposed to work

Is this during the TWRP recovery mode or is this supposed to work independently ?

 

Does the phone have to be rooted for this to work ?

 

The phone is booted into the system and when I type adb devices I get the serial number and unauthorized next to it

Should it say sideload next to it instead or does that make no difference ?

Link to comment
Share on other sites

Link to post
Share on other sites

  • 1 year later...
  • 1 year later...

Hey guys I had this exact problem for the past 20 min.

The "solution" din't work for me, not at first.

Before I came on this forum I've already tried everything but when moving the file, I moved it from Downloads to Documents and Desktop 
yeah so all of those are in One Drive

What solved it was moving the file to an other partition where OneDrive had no power and then lo and behold THE ANTIVIRUS ASKED FOR PERMISSION

I guess when in OneDrive folders the antivirus didn't want to bother or something

I made this account only for this ))

Link to comment
Share on other sites

Link to post
Share on other sites

Hey, I have another solution. In my case the error was caused by hidden extensions and Opera browser's shenanigans.

 

I used Opera browser to download a ROM and it was saved as ROM.zip.opdownload because for some reason it wasn't downloaded in 100%.

When trying to sideload ROM.zip or ROM, Windows couldn't see the file and the file name wasn't showing the second extension. I thought I solved it by disabling "Hide extensions for known file types" in Folder Options and removing the .opdownload extension but the file was corrupted. By the way, I realized why cmd wouldn't see the file by using this command in CMD, which showed me the actual file name.

dir "C:\the actual path to the folder with the ROM file"

In the end, I just had to redownload the file. Then it saved as .zip without .opdownload.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 2 weeks later...
On 1/12/2023 at 3:41 PM, Krzeszny said:

Hey, I have another solution. In my case the error was caused by hidden extensions and Opera browser's shenanigans.

 

I used Opera browser to download a ROM and it was saved as ROM.zip.opdownload because for some reason it wasn't downloaded in 100%.

When trying to sideload ROM.zip or ROM, Windows couldn't see the file and the file name wasn't showing the second extension. I thought I solved it by disabling "Hide extensions for known file types" in Folder Options and removing the .opdownload extension but the file was corrupted. By the way, I realized why cmd wouldn't see the file by using this command in CMD, which showed me the actual file name.

dir "C:\the actual path to the folder with the ROM file"

In the end, I just had to redownload the file. Then it saved as .zip without .opdownload.

Was same problem. Opera not guily. Its happend cose u didnt coplate download. Just test ur ROM (open .zip and try to extract).

PS sry for my eng

Link to comment
Share on other sites

Link to post
Share on other sites

  • 8 months later...

In my case Windows Defender just quarantined the apk file. So, need to disable Windows Defender

How to disable Windows Defender:

image.thumb.png.4ce0b0a08deb09d74728ea783c3b349f.png

image.thumb.png.dd7b2ce8a01b7ffcac1ba6b5d3b2c53b.png

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×