I haven't seen a guide on this, so I will make one for you guys. I'm sure many of you have noticed that if you copy a file from your PC to the SD card while in Android, then use the file browser, the file doesn't show up unless you reboot. This is an annoyance when installing apps, so I present to you this guide.
1. Download and extract the Android SDK.
2. In the "android-sdk-windows" open up SDK Setup, and install the USB driver package. [thanks memin1857]
3. Open up the "android-sdk-windows/tools" folder, this is the folder you will be putting your files into, in order to copy them to the SD card.
4. Open a command prompt, and cd into the directory containing the folder in Step 3 (IE: If you extracted the folder to C:\ in step 1, you would do
Code:
cd C:\android-sdk-windows\tools
5. Type ADB Shell
6. Type su to get root access
7. Type mount -o remount rw /sdcard to mount the sdcard
8. Type exit to exit the shell
9. Type adb push nameoffile.apk /sdcard replace nameoffile.apk with the filename of whatever you want to copy
10. Success!
You can also copy folders this way, simply type the folder name instead of the file name, in place of nameoffile.apk. Just tested this with several files, and it works perfectly
YAY!!! Waited for a while allready! Thanks!
good job brother!
wow...this is so complicated...can i suggest another way?which is use an app from market called websharing file/media....this is fastest way for me to transfer files...just connect bot your pc and device to the same connection(wifi).Then you can just transfer files from your pc internet browser...there is no need to install any desktop server client...just direct transfer...speedy too...1 mp3 song just about 5or 6 seconds...if you want download this app in full version and free...i think you can find it on www.4shared.com
Easy version
Droid Explorer works from adb too.
http://de.codeplex.com/
It uses the same mechanism (adb) with Android SDK but has a visual interface.
BTW if you will use android sdk only, you don't need to install all sdk packages (takes huge amount of time), you only need usb drivers.
(Droid Explorer has drivers included)
Or u can jus add the files thru USB connection n use Dev Tools's media scanner.
Sent from my HTC HD2 running DarkStone HD2Froyo v1
Good
Nice, iiNFAMOUS CHRiS
What is the difference between this and Auto Mount which is on the Android Market?
nzxtneo said:
What is the difference between this and Auto Mount which is on the Android Market?
Click to expand...
Click to collapse
When you use Auto Mount, it mounts the USB drive so you can drag/drop files onto the SD card, but if you do that method, when you try to find the file on your phone, Android won't see it unless you restart your phone.
iiNFAMOUS CHRiS said:
When you use Auto Mount, it mounts the USB drive so you can drag/drop files onto the SD card, but if you do that method, when you try to find the file on your phone, Android won't see it unless you restart your phone.
Click to expand...
Click to collapse
Weird, maybe it depends on the build but I have never had to restart the device after I move files over with Auto Mount.
I just remove the usb cable from the HD2 and I got a notification on the top left that says "preparing SD card" and after that I am good to go.
Related
Simply put is there a way to get an app onto my phone without the market or file manager?
I ask because I want to use Haykuro's G build but I cant download any apps. I do however have all the ones I use regularly backed up onto my SD card but I cant access them without a File Manager (which I cant download to use). Is there a way?
|Spike|
There's always the option of using AppsInstaller/APKInstaller and putting APK's onto your SD Card. Though, to install AppsInstaller, you have to install it through ADB.
Unicornasaurus said:
There's always the option of using AppsInstaller/APKInstaller and putting APK's onto your SD Card. Though, to install AppsInstaller, you have to install it through ADB.
Click to expand...
Click to collapse
How do I install thru ADB?
|Spike|
Get the android usb drivers, adb.exe and adbwinapi.dll from an Android SDK. Plug the Dream in via USB and point to the location of the drivers when it is installed. Then open your command line, navigate to whatever folder adb.exe is in and type adb install <full path to the apk>. If you run Linux hopefully you can figure it out on your own based on the steps above.
Alternately, upload all the apks you want to the internet somewhere. Check the box to enable installation from Non-market sources in the system settings, then type the full URL of the apk into the browser. The package installer will take over from there.
Here's how you do it. Assuming your G1 is rooted
1. Download the attched files, and copy them into your \system32 folder (Start > Run > %systemroot%\system32)
2. Sure your G1 is enabled for USB Debugging (Settings > Applications > Development > USB debugging) and that your G1 has the appropriate drivers installed. If not, download the USB drivers from HERE
3. Plug your G1 into your computer (Make sure you have USB 2.0 - Click here to find out how to check). When your G1 says "USB Connected" DO NOT click "Mount"..don't do anything
4a. Vista users - Follow these steps. For XP Users, skip to step 5
4b. On your computer, browse to the directory where the APK for your file is located
4c. Once located, hold SHIFT and right click on a blank area of the folder
4d. Click on "Open Command Window Here"
4e. Type "adb install nameofyourapkhere.apk" - without the quotes.
4f. It might say something like "daemon service not started" or something, but it will start it and continue. It'll then say something like 626k/1293k bla bla bla
4g. If it was successful, it will just say "Success". You can close the command window and SHAZAM! Your program will now be installed on your G1, and you can access it like any other program on your phone
5. XP Users - Follow these directions:
a) You can either go Start > Run > type CMD and press enter
OR
Windows Key + R > type CMD and press enter
Navigate to your APK file via the command prompt. For easy usage, put your APK file on your desktop. That way all you have to do is type "CD Desktop" into the command prompt
b)Type "adb install nameofyourapkhere.apk"
c)You may get a couple of messages like in the steps for Vista users
d)If all goes well, you too will get the success message
e)Enjoy your application!
Any confusions, let me know. Hope it helps, and Good Luck!
I've been using a local web server and the android browser.
untermensch:
Thats a possibility, but oddly enough, that requires a http-server
AGx-07_162:
With unicornasaurus's method above, you can install all the apk's you want... you can install apkinstaller and use that through that method, but you can just aswell install your apk's directly through it
I ran into the same problem. Here is the easiest ways to get the appinstaller on your G1. Download this file from your g1 browser or Gmail yourself this file, and download.
http://www.mediafire.com/?egy0mop2qqx
I am rooted but just on the Stock ROM. How can I copy a file in the data\app-private dir to my PC. I have paid for apps but cannot get them from the market. I want to have a backup of this is case I have to reset the phone again.
I tried the cp command but it did not work. I am also not using APP2SD.
I have had good luck using app "Root Explorer"... seems to do the job of moving and copying that folder.
(I am on Modco using App2sd)
You can run a command on your PC while your phone is connected
Code:
C:\>adb pull {location on the phone} {location on your pc}
dailypush said:
I have had good luck using app "Root Explorer"... seems to do the job of moving and copying that folder.
(I am on Modco using App2sd)
Click to expand...
Click to collapse
This worked great to copy them to my sd card, can you also use this to add apps back like Sprint and HTC apps and widgets.
dagnasty said:
You can run a command on your PC while your phone is connected
Code:
C:\>adb pull {location on the phone} {location on your pc}
Click to expand...
Click to collapse
I tried this from the C:\> and got adb was not recognized
I tried from the android/tools and got the same error and tried from insdie the phone. No luck moving files from the CMD prompts. I am not sure where to go from here.
My bad, I added the path to the SDK to my 'path' system variables. It should work if you are in the tools directory of the sdk.
It says pull is not recognized as an internal or external command is what it says when I do pull in the Android/tools dir
Here is what I typed
pull /system/app/Stock.apk C:\
or
pull /system/app/Stock.apk/ C:\
neither work
Dear all members,
I have managed to root my X10 using the universal androot but I was unable to copy file from SD card to the phone system folder.
I know I need the ADB but I have problem installing or using it on my Windows 7 computer, can anyone provide me a simple and easy method on how to modify the permission on the android phone?
Thanks for your help.
Dear all,
I have followed through the procedures below to get the phone rooted but I was unable to copy the youtube.apk file from SD Card to the /system/app/ folder?
http://www.xperiax10.net/2010/08/09/exploid-root-method-for-xperia-x10-tutorial/
Can anyone advise me how to go about it? Thanks.
I guess you have to make sure the sdcard is NOT MOUNTED in windows before trying to access with ADB
5) Plug the Xperia X10 into the PC. You should see two icons appear in the notification bar (the USB key and hazard key denoting you are in debugging mode). Scroll the notification bar down and connect the USB (DO NOT mount the card).
mattiL said:
I guess you have to make sure the sdcard is NOT MOUNTED in windows before trying to access with ADB
5) Plug the Xperia X10 into the PC. You should see two icons appear in the notification bar (the USB key and hazard key denoting you are in debugging mode). Scroll the notification bar down and connect the USB (DO NOT mount the card).
Click to expand...
Click to collapse
Hi, thanks for your reply.
I did not mount the SD Card and the above icon still states that it is in USB Debugging mode before I access the ADB.
I have also tried using the Android Commander to copy the file from my computer to the phone directory but the file did not copy.
Use root explorer to copy and paste it over best way be careful using modded system apk's ive had problems and its a pain to reflash if u make mistakes as my x10 is my main internet lol
Sent from my X10i using XDA App
chances are you might not have shell root, have a look at my theme and in the installer there is a shell mod.
So, CWM saves its backups and blob directory in /mnt/shell/emulated which is not accessible via MTP. I've started using TWRP for all my new backups but I would like to copy the existing CWM backups to my PC before wiping the directory on my phone. It's currently using 8-9 GB. However, when I try to move the directory from /mnt/shell/emulated to a directory in a directory in /sdcard, the move operation ends instantly and nothing is copied. I'm wondering if the problem is that I don't have enough free space. I've got about 2.5 GB free.
EDIT: It appears that you need to have enough space to copy the entire directory before deleting it. The phone ran out of space halfway through a file copy using ES File Explorer. I guess that's why Root Explorer won't allow the move to begin.
Use adb to pull the directory to your computer, adb pull /mnt/shell/emulated
I would like to do this as well like I used to do with older versions of CWM on my Gnex. Then it was as easy as moving the large backup file found in /sdcard/clockworkmod/ folder.
I just tried that adb pull command mentioned in the post above and this starts to copy the entire contents of my phone to some unknown source on my PC (I can't find where?).
How would one go about simply backing up a CWM nandroid restore file onto a PC?
dralways said:
I just tried that adb pull command mentioned in the post above and this starts to copy the entire contents of my phone to some unknown source on my PC (I can't find where?).
Click to expand...
Click to collapse
It copies to the directory that you ran the adb command from, so if you run abd from c:\windows\apps\adb it'll copy the files there
peachpuff said:
Use adb to pull the directory to your computer, adb pull /mnt/shell/emulated
Click to expand...
Click to collapse
Thanks for the help. I don't know why I didn't think to do that myself.
Create a folder on your computer and open the command prompt from that directory. And then run adb pull /mnt/shell/emulated/clockworkmod/backup
This way only the backups will be copied to your pc, not the whole storage.
cmd prompt not working
dushan90 said:
Create a folder on your computer and open the command prompt from that directory. And then run adb pull /mnt/shell/emulated/clockworkmod/backup
This way only the backups will be copied to your pc, not the whole storage.
Click to expand...
Click to collapse
Hi, I just ran into this issue also. I tried the cmd prompt but it doesn't pull anything. It says 'adb' is not recognized as an internal or external command, operable program or batch file.
Any help would be greatly appreciated, I know it's been a while since the last post but thank you.
SlickJamesBtch said:
Hi, I just ran into this issue also. I tried the cmd prompt but it doesn't pull anything. It says 'adb' is not recognized as an internal or external command, operable program or batch file.
Any help would be greatly appreciated, I know it's been a while since the last post but thank you.
Click to expand...
Click to collapse
>Go to your android sdk folder/platform-tools.
>r.click an empty space while holding down the shift.
>Select Open Command Window here
>then run the adb command
This should work
dushan90 said:
Create a folder on your computer and open the command prompt from that directory. And then run adb pull /mnt/shell/emulated/clockworkmod/backup
This way only the backups will be copied to your pc, not the whole storage.
Click to expand...
Click to collapse
how if I want to put it back into CWM? is there any specific way to do that? or I just have to copy and paste the data to the "/mnt/shell/emulated/clockworkmod/backup" directory.
Haven't you tried this?
Hi All,
I am in the process of trying to root and install a custom rom on my Nexus 4 4.4.2. I am a new linux user (Linux Mint 16) and my rooting experience is limited. When I try to do an "abd pull /sdcard/ /sdcard/" this is what it says
adb pull /sdcard/ /sdcard/
pull: building file list...
pull: /sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1 -> /sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1
cannot create '/sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1': No such file or directory
I was able to successfully do an abd backup...
USB debugging is enabled.
I get the same error whether the phone is connected as a Media device (MTP) or Camera (PTP).
any reason why the pull command wont work?
Any help is appreciated!
smokewagon said:
Hi All,
I am in the process of trying to root and install a custom rom on my Nexus 4 4.4.2. I am a new linux user (Linux Mint 16) and my rooting experience is limited. When I try to do an "abd pull /sdcard/ /sdcard/" this is what it says
adb pull /sdcard/ /sdcard/
pull: building file list...
pull: /sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1 -> /sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1
cannot create '/sdcard/Android/data/com.google.android.gallery3d/cache/imgcache.1': No such file or directory
I was able to successfully do an abd backup...
USB debugging is enabled.
I get the same error whether the phone is connected as a Media device (MTP) or Camera (PTP).
any reason why the pull command wont work?
Any help is appreciated!
Click to expand...
Click to collapse
Maybe this will help?
http://www.herongyang.com/Android/adb-push-and-pull-Command.html
Not a big fan of the CLI.
Sent from my Nexus 7 (2013)
Your problem (almost certainly) is that you don't have a /sdcard directory (folder) on your computer unless you created one (there certainly is no default /sdcard in a linux desktop system).
I also don't know how you installed ADB on your computer.
(This should work, otherwise I'll have to change what I wrote below).
Try this:
$ cd ~/Desktop
(This changes you to your desktop directory, if you are not already there)
$ mkdir sdcard
(this will make a new directory called "sdcard" on your desktop, you should see it pop up on your desktop)
$ adb pull /sdcard/ ~/Desktop/sdcard
(should pull the contents of /sdcard from your phone and put them in your newly created directory on your desktop: ~/Desktop/sdcard)
BAM
A little extra basic info for you, and welcome to linux. Soon you have the power to take over the world (ha ha ha... no, actually I'm not kidding at all).
As a basic rule, you should pretty much always be working inside of your home directory, for dealing with your personal files. Your home directory is /home/yourname. On my computers, my home is /home/kirk. My wife's home directory is /home/amy.
"~" is a shortcut for the home directory, for whomever is logged in at that moment.
If you wanted something that is on your desktop, it would be in the directory: /home/yourname/Desktop (~/Desktop). If you wanted to use your documents directory, it is : /home/yourname/Documents(~/Documents).
/home/yourname is where you usually where want to do your stuff.
"/" is the very root directory of the whole system, so you would be better off not creating and doing things like making directories like "/sdcard". That's a bad move. Leave root for system files. Not that you are necessarily going to destroy something by creating a /sdcard directory. But it'll cause you a few hassles.
So, use /home/yourname/sdcard (~/sdcard). Or if you want it on your desktop, (like I did above) use /home/yourname/Desktop/sdcard (~/Desktop/sdcard). Doing things inside of /home/yourname(~) means that you are the owner of that folder and everything in it, not root.
Otherwise you will just be causing headaches for yourself and having to grant yourself root permissions to work with those files (hassle). There's no good reason to do that to yourself. And if you did give yourself root permissions, and screwed up other stuff in the root directory like in: /etc or /dev or /bin, then you will REALLY be irritated.
Stick to your home for your personal files. /home/yourname (~)
Leave "/" or the "root" directory for system files.
You could check my little bash program for adb for Linux too. It's a program to be used in the terminal and it'll pull data off the sdcard etc. You can find it here
Sent from my Nexus 4 running Android 4.4
Thank you all for the help, I'll let you know how it goes.
Do I need drivers for my nexus 4 to work with Linux?
Sent from my Nexus 4 using Tapatalk
smokewagon said:
Thank you all for the help, I'll let you know how it goes.
Do I need drivers for my nexus 4 to work with Linux?
Sent from my Nexus 4 using Tapatalk
Click to expand...
Click to collapse
Try it without any installation of drivers just install adb tools and try the command line or my little tool. If it's not working, check the guides how to set up the usb-rules for adb
Sent from my Nexus 4 running Android 4.4
Thanks, will do.
Sent from my Nexus 4 using Tapatalk
iowabeakster said:
Try this:
$ cd ~/Desktop
(This changes you to your desktop directory, if you are not already there)
$ mkdir sdcard
(this will make a new directory called "sdcard" on your desktop, you should see it pop up on your desktop)
$ adb pull /sdcard/ ~/Desktop/sdcard
(should pull the contents of /sdcard from your phone and put them in your newly created directory on your desktop: ~/Desktop/sdcard)
BAM
Click to expand...
Click to collapse
BAM INDEED! It worked! I am pulling the contents now. Thanks a ton, and thanks for the other basic linux info, I will put it to good use.
Any other tips on using Linux to root android?
Shooooot....
So after the pull command finished, i opened the sdcard directory I created on my desktop, and it was empty....the pull command said this when it was done...
1733 files pulled. 0 files skipped.
2129 KB/s (995292697 bytes in 456.480s)
Any ideas?
Ok, I played with some settings and got it to work, though I don't know why it worked.
USB Debugged is enabled.
The first time I tried to 'pull' i had my USB computer connection set to "Camera (PTP)" - it didn't work.
I tried again changing the USB computer connection to "Media device (MTP)" - it didn't work.
I changed it back to "Camera (PTP)" and my computer recognized it in a different way than the first time (a dialog box popped up asking me what I wanted to do with the pictures that were on the device I had connected, this didn't happen the first time).
I am glad the pull command finally worked, I just wish I knew why.
I guess it's a tough road being a linux NOOB and a (near) Android NOOB. It's good to learn something new and keep my brain young.