Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,810,846 Members 37,790 Now Online
XDA Developers Android and Mobile Development Forum

[Q] ADB cannot push/mkdir/cp a file to extSdCard

Tip us?
 
The Jinxer
Old
#1  
Member - OP
Thanks Meter 4
Posts: 75
Join Date: Aug 2012
Location: Cape Town
Question [Q] ADB cannot push/mkdir/cp a file to extSdCard

Hi people, I have looked around and haven't found anything to do with adb not letting any editing to the extSdCard whatsoever (without root)
I want to be able to use
Code:
adb push "C:\whatever.txt" /storage/extSdCard/
and actually work. everytime I do this it gives me:
Code:
failed to copy 'C:\whatever.txt /storage/extSdCard/whatever.txt': Permission denied
I have not got superuser privileges and made this thread for those who do not have it. PLEASE do NOT post anything to do with busybox or su, your efforts will be in vain.
Thanks in advance
My Devices:
 
  • Samsung Galaxy S4 Mini (GT-I9190)
    Specs: (current)
  • Samsung Galaxy Ace (GT-S5830) (Retired)
    Specs: (at the time I was using it)
    • AOKP ROM
    • AOKP Kernel (or whatever came with AOKP)
    • CWM recovery
 
The Jinxer
Old
#2  
Member - OP
Thanks Meter 4
Posts: 75
Join Date: Aug 2012
Location: Cape Town
for those coming here as reference, this is probably due to the changes to file permissions in KitKat
My Devices:
 
  • Samsung Galaxy S4 Mini (GT-I9190)
    Specs: (current)
  • Samsung Galaxy Ace (GT-S5830) (Retired)
    Specs: (at the time I was using it)
    • AOKP ROM
    • AOKP Kernel (or whatever came with AOKP)
    • CWM recovery
 
es0tericcha0s
Old
#3  
Senior Member
Thanks Meter 517
Posts: 2,698
Join Date: May 2010

 
DONATE TO ME
Quote:
Originally Posted by The Jinxer View Post
for those coming here as reference, this is probably due to the changes to file permissions in KitKat
No, it's not. The Kit Kat SD card deal is only for 3rd party apps on the phone for writing to the SD card. http://www.androidcentral.com/kitkat-sdcard-changes . Has nothing to do with adb.

There are tons of people through the past few years that have this "trouble" for various phones and many versions of android. Often times it does just not work. Are you certain that the external is at /storage/extSDcard? Sometimes you have to do this as well:

adb push somefile.zip /storage/extSDcard/somefile.zip


What phone do you have? Why to the external and not internal and then just use a file manager to swap it over? Or use an external card reader. Or wifi file transfer.
Need some help, advice, something fixed? Hit me up on Hangouts @ es0tericcha0s
Now offering unlocking services - including many Sprint phone unlocks! PM for details!

HTC Droid Eris / Motorola Droid / Samsung Galaxy S Fascinate / Motorola Droid X / LG G2x / HTC Evo 3D (x2) / Samsung Epic 4G Touch (Sprint S2) / HTC Amaze / Samsung Galaxy S3 (International) / Samsung Galaxy Note 2 / Nexus 4 / HTC One / Samsung Galaxy S4 / Sony Xperia ZL / Nexus 5 / OnePlus One (64 GB)
 
The Jinxer
Old
#4  
Member - OP
Thanks Meter 4
Posts: 75
Join Date: Aug 2012
Location: Cape Town
Quote:
Originally Posted by es0tericcha0s View Post
No, it's not. The Kit Kat SD card deal is only for 3rd party apps on the phone for writing to the SD card. http://www.androidcentral.com/kitkat-sdcard-changes . Has nothing to do with adb.

There are tons of people through the past few years that have this "trouble" for various phones and many versions of android. Often times it does just not work. Are you certain that the external is at /storage/extSDcard? Sometimes you have to do this as well:

adb push somefile.zip /storage/extSDcard/somefile.zip


What phone do you have? Why to the external and not internal and then just use a file manager to swap it over? Or use an external card reader. Or wifi file transfer.
my phone's details are in my signature.
I do push to the internal since i cant push to external. my external is called sdcard1 by the system. The reason for pushing to external is that it is 16GB compared to 8GB internal (5GB usuable)
My Devices:
 
  • Samsung Galaxy S4 Mini (GT-I9190)
    Specs: (current)
  • Samsung Galaxy Ace (GT-S5830) (Retired)
    Specs: (at the time I was using it)
    • AOKP ROM
    • AOKP Kernel (or whatever came with AOKP)
    • CWM recovery
 
es0tericcha0s
Old
#5  
Senior Member
Thanks Meter 517
Posts: 2,698
Join Date: May 2010

 
DONATE TO ME
Why can't you just transfer via MTP or wifi file transfer?
Need some help, advice, something fixed? Hit me up on Hangouts @ es0tericcha0s
Now offering unlocking services - including many Sprint phone unlocks! PM for details!

HTC Droid Eris / Motorola Droid / Samsung Galaxy S Fascinate / Motorola Droid X / LG G2x / HTC Evo 3D (x2) / Samsung Epic 4G Touch (Sprint S2) / HTC Amaze / Samsung Galaxy S3 (International) / Samsung Galaxy Note 2 / Nexus 4 / HTC One / Samsung Galaxy S4 / Sony Xperia ZL / Nexus 5 / OnePlus One (64 GB)
 
The Jinxer
Old
#6  
Member - OP
Thanks Meter 4
Posts: 75
Join Date: Aug 2012
Location: Cape Town
Quote:
Originally Posted by es0tericcha0s View Post
Why can't you just transfer via MTP or wifi file transfer?
I have an automatic script which moves files to the phone/installs them if apk file etc. MTP sucks big time and wifi can be slow/not available
My Devices:
 
  • Samsung Galaxy S4 Mini (GT-I9190)
    Specs: (current)
  • Samsung Galaxy Ace (GT-S5830) (Retired)
    Specs: (at the time I was using it)
    • AOKP ROM
    • AOKP Kernel (or whatever came with AOKP)
    • CWM recovery
 
es0tericcha0s
Old
#7  
Senior Member
Thanks Meter 517
Posts: 2,698
Join Date: May 2010

 
DONATE TO ME
Quote:
Originally Posted by The Jinxer View Post
I have an automatic script which moves files to the phone/installs them if apk file etc. MTP sucks big time and wifi can be slow/not available
Never really had issues with MTP. I work on phones for a living and have owned many (see list in sig) and use 3 different PCs - Win XP, Win 7, and Win 8.1 and MTP works right 99% of time for me on - you name it - HTC, Samsung, Sony, LG, etc etc. Have rooted/modded/upgraded/fixed 100s of devices and pretty much all of them I have to use MTP these days. *shrug*

If you have the ability to wifi tether, you can tether to your device and send files that way too. It's as fast/reliable as your data connection at that point though. I'm lucky enough to live in an area where I have a good signal almost always and have unlimited data so this option works great for me too. Your results may vary.
Need some help, advice, something fixed? Hit me up on Hangouts @ es0tericcha0s
Now offering unlocking services - including many Sprint phone unlocks! PM for details!

HTC Droid Eris / Motorola Droid / Samsung Galaxy S Fascinate / Motorola Droid X / LG G2x / HTC Evo 3D (x2) / Samsung Epic 4G Touch (Sprint S2) / HTC Amaze / Samsung Galaxy S3 (International) / Samsung Galaxy Note 2 / Nexus 4 / HTC One / Samsung Galaxy S4 / Sony Xperia ZL / Nexus 5 / OnePlus One (64 GB)
 
The Jinxer
Old
#8  
Member - OP
Thanks Meter 4
Posts: 75
Join Date: Aug 2012
Location: Cape Town
i forgot to mention i am in a no signal zone. so wifi is not an option. i dont mean mtp does not work, but i feel it is sluggish and has flaws, while my script has none. do you want my script?
basically it is a drag and drop batch file, and if the dropped file is an apk, it installs it. if the file is a mp3, video etc it moves it to a corresponding folder, and if the extension is not recognised, it offers to move the file to downloads. only flaw it has is that it needs editing to work on a phone that names the internal sd something else, which can be changed with an easy find/replace
My Devices:
 
  • Samsung Galaxy S4 Mini (GT-I9190)
    Specs: (current)
  • Samsung Galaxy Ace (GT-S5830) (Retired)
    Specs: (at the time I was using it)
    • AOKP ROM
    • AOKP Kernel (or whatever came with AOKP)
    • CWM recovery

Tags
adb, extsdcard, push
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Old but Gold Internet Browser is a Blast from the Past

A Web browser is one of these applications that we can’t live without. We useit … more

Real-World Battery Saving Tips for Android – XDA Developer TV

You need Real-World Battery Saving Tips for your Android device. Our … more

Android L Will Have Data Encryption Turned On by Default

Android L, once it is eventually released, will featuredata encryption turned on by … more

Lock Apps and Functions Easily with Droid Protector

Access and security are some of the key issues facingmobile technology. Whether … more