Push mp3 folders to phone...? - G1 Q&A, Help & Troubleshooting

I have been messing around with ADB and pushing and I was wondering if there is a way to push an entire folder over to the phone. I think I could figure it out, but if someone knows how to do this that would be awesome, I searched but everything came up as ADB for noobs or ADB for dummies and just showed basic ADB commands... anyone know the command for pushing mp3 to sd card... also, i dont have a Music folder on my sd card anymore... if i push directly to SD without the directory, will it be created?
Thanks in advance guys

There might be another way but I just plug a USB cable into the phone, drag down the USB icon in the notification area, press the mount button and then make a new folder called Music and put my mp3's into it.
But like I said, there's a lot of ways to skin a cat and this is only one.
If your looking for some automated way, through a batch file or script, well... that'd be useful too.

i have done that too. but time and time again when i do this, especially after i rooted my phone, it says unable to read sd card and i have to either wipe or re-format my card. i was hoping that ADB would help this from happening...

The command to copy is cp -a so you would navigate to whatever location that folder is in and type
cp -a xxxxxx /sdcard/xxxxxx
That should do it

borodin1 said:
The command to copy is cp -a so you would navigate to whatever location that folder is in and type
cp -a xxxxxx /sdcard/xxxxxx
That should do it
Click to expand...
Click to collapse
Nah, that command is for copying a folder from one location on the phone to another. With adb you need to place the folder of music (we'll call that folder Music in this demo) in the same folder as your adb.exe. Then press start and run cmd, then:
cd location of adb
adb push Music /sdcard/Music/
exit
That will push everything within your Music folder to another folder on the sdcard called Music. Then you can just listen to your music through the Music application. Good luck.

h.nocturna said:
Nah, that command is for copying a folder from one location on the phone to another. With adb you need to place the folder of music (we'll call that folder Music in this demo) in the same folder as your adb.exe. Then press start and run cmd, then:
cd location of adb
adb push Music /sdcard/Music/
exit
That will push everything within your Music folder to another folder on the sdcard called Music. Then you can just listen to your music through the Music application. Good luck.
Click to expand...
Click to collapse
I'm ok with copying it. I am not sure if pushing something leaves a copy in original location, but then again, I just drag and drop files on my sdcard and if I need to do anything else with them I do it from shell.
Your way work though, may be even easier.

borodin1 said:
I'm ok with copying it. I am not sure if pushing something leaves a copy in original location, but then again, I just drag and drop files on my sdcard and if I need to do anything else with them I do it from shell.
Your way work though, may be even easier.
Click to expand...
Click to collapse
I thought that he wanted to know how to transfer files from the computer to the sdcard without mounting since mounting corrupted his sdcard...

h.nocturna said:
I thought that he wanted to know how to transfer files from the computer to the sdcard without mounting since mounting corrupted his sdcard...
Click to expand...
Click to collapse
You're correct.
adb push it is. Thank you for pointing this out.

Related

Can separate apps be moved between SD and system?

I was wondering something, and couldn't find it through search.
If I run into performance issues with certain apps, can I move just those apps back to the system, or would I have to move all of the apps from the SD back to the system?
johnequickiii said:
I was wondering something, and couldn't find it through search.
If I run into performance issues with certain apps, can I move just those apps back to the system, or would I have to move all of the apps from the SD back to the system?
Click to expand...
Click to collapse
The way a symlink works (apps2sd) you would have to move the whole application folder back.
If you are having performance issues, invest in a class 6 card. Which is supposedly faster than the internal storage.
ok Thanks for the info. ^^
Actually, that depends on what ROM you are running. With DarchDroid 2.6.2, I know for certain (cause I did it this morning) that you can choose where you want an app installed. You go into manage applications, click on the app you want to move, and scroll down a bit. You will come to a box that has info about how much memeory the app is taking up and were it is stored. There is also a button that says "move". Clicking takes the app from were it is (either internal storage, or sd storage) and moves it to the other. I don't know if any other roms have this option.
Is it possible to put an app into the main system app folder? Those apps aren't moved to the SD card.
centran said:
Is it possible to put an app into the main system app folder? Those apps aren't moved to the SD card.
Click to expand...
Click to collapse
Not sure if this answers your question exactly, but you can install apps into your /system/app folder by using adb.
Open a Windows command prompt, navigate to your android-sdk-windows/tools folder, then use the 'adb push' command:
Code:
adb push Filename.apk /system/app
chromiumleaf said:
Not sure if this answers your question exactly, but you can install apps into your /system/app folder by using adb.
Open a Windows command prompt, navigate to your android-sdk-windows/tools folder, then use the 'adb push' command:
Code:
adb push Filename.apk /system/app
Click to expand...
Click to collapse
Keep in mind when you do this, you will have to also uninstall it the same way.
/system/app/ is internal storage
/data/app/ is external storage
you can do a ls in the directory to see where it actually is
the move command would be
Code:
mv /system/app/<name of apk> /system/sd/app/<name of apk>
or
Code:
mv /system/app/<name of apk> /data/app/<name of apk>
as the symlinks should put it to /system/sd/app
nfinitefx45 said:
/system/app/ is internal storage
/data/app/ is external storage
you can do a ls in the directory to see where it actually is
the move command would be
Code:
mv /system/app/<name of apk> /system/sd/app/<name of apk>
or
Code:
mv /system/app/<name of apk> /data/app/<name of apk>
as the symlinks should put it to /system/sd/app
Click to expand...
Click to collapse
If I do that second move command, does that put it on my hard drive in the android-sdk-windows\tools\ folder? Or, does it put it on the sd card? Sorry, I'm a newb.
I want to copy my htclockscreen.apk file to the android-sdk-windows\tools\ folder on my C:\ drive so I can open it up and make changes to the png files that create the slide bar on the lock screen... see my post on creating a custom lock screen under Q & A. Newb restrictions won't let me post the link yet.
Thanks!
mbuchholz said:
If I do that second move command, does that put it on my hard drive in the android-sdk-windows\tools\ folder? Or, does it put it on the sd card? Sorry, I'm a newb.
I want to copy my htclockscreen.apk file to the android-sdk-windows\tools\ folder on my C:\ drive so I can open it up and make changes to the png files that create the slide bar on the lock screen... see my post on creating a custom lock screen under Q & A. Newb restrictions won't let me post the link yet.
Thanks!
Click to expand...
Click to collapse
the command you want is
Code:
adb pull /system/app/HtcLockScreen.apk
that will copy it out of /system/app and put it in your tools folder.
linux is case-sensitive and i don't know the exact capitalization.
thedudejdog said:
the command you want is
Code:
adb pull /system/app/HtcLockScreen.apk
that will copy it out of /system/app and put it in your tools folder.
linux is case-sensitive and i don't know the exact capitalization.
Click to expand...
Click to collapse
Awesome! Thank you for that.
Perhaps you could take a look at my other post and tell me how to replace the .pdf images with new ones and then load it back onto the phone?
mbuchholz said:
Awesome! Thank you for that.
Perhaps you could take a look at my other post and tell me how to replace the .pdf images with new ones and then load it back onto the phone?
Click to expand...
Click to collapse
haha...no sorry i don't know anything about signing apps. but i can pull and push stuff to and from my phone like nobody's business
lol - thanks anyway. Perhaps someone will see and be able to help me out. You at least got me started!
-mb

Remove unwanted ringtones?

Dear all experts...
how can i remove all the ringtones/alert/alarms files from
/system/media/audio/ringtones
/system/media/audio/alarms
/system/media/audio/notifications
and put in a list of my own choice selected from different ROMS...
chris
-------
cm5071
chris4chelsea said:
Dear all experts...
how can i remove all the ringtones/alert/alarms files from
/system/media/audio/ringtones
/system/media/audio/alarms
/system/media/audio/notifications
and put in a list of my own choice selected from different ROMS...
chris
-------
cm5071
Click to expand...
Click to collapse
you can put your own alerts, ringtones, etc by creating separate folders of the same names on the sd card (i.e. /sdcard/ringtones, /sdcard/alarms, /sdcard/notifications) and put whatever files you want in there.
to remove the others, you'd need root access, and depending on the read/write properties, you could shell in, may have to chmod the file properties, then do a rm command.
why bother? just put the sound files you want in folders on the sdcard and use them. much less fuss. just a longer list of files to look through for you to choose, but that's it.
timothydonohue said:
you can put your own alerts, ringtones, etc by creating separate folders of the same names on the sd card (i.e. /sdcard/ringtones, /sdcard/alarms, /sdcard/notifications) and put whatever files you want in there.
to remove the others, you'd need root access, and depending on the read/write properties, you could shell in, may have to chmod the file properties, then do a rm command.
why bother? just put the sound files you want in folders on the sdcard and use them. much less fuss. just a longer list of files to look through for you to choose, but that's it.
Click to expand...
Click to collapse
cool.. tks alot. u r rite, a very long list, thats y i m hoping to just have a list that i wanted. seems quite troublesome to rm those files... =)
Oppps, i need help. i have tried to put my alarms files on the SD card. i went into alarms and noticed newly added tones. i also noticed i have duplicated some tones. i deleted them but after that the tones are still visible under the alarm list. i tried to reboot my phone, but the duplicates are still there, how can i get rid of them... pls help
tks in advance...
problem solved... i see duplicate coz i also have another set of tones under another folder on the SD card...
android seems to be able to find all alarms/notifications/ringtones folder located anywhere on the SD
if you have and know how to use adb, you could try and do (from your sdk/tools folder)
adb remount
adb shell
then, at the # prompts
rm /system/media/alarms/*.*
do the same with the ringtones and notifications folders
that should shorten your list
although, if you ever want to use them again, you may want to start your experience with (before the adb remount command)
adb pull /system/media
that should lift the ringtones, notifications, and alarms folders and put backups in your tools folder

Can't backup my SD card! Is there an ADB command I can use?

Seems that something is wrong with my wife's N1/SDcard. I don't have an adapter just yet so can't go that route.
I'm just trying to copy all the pictures that she took to the PC. Seems that when I try to copy the folder to the PC, I get a speed of 0 bytes/second transfer speed. Basically it's not doing anything.
I adb commands work...because I rooted her phone the other day. Is there a command I can use to pull those pictures off the card?
SiNJiN76 said:
Seems that something is wrong with my wife's N1/SDcard. I don't have an adapter just yet so can't go that route.
I'm just trying to copy all the pictures that she took to the PC. Seems that when I try to copy the folder to the PC, I get a speed of 0 bytes/second transfer speed. Basically it's not doing anything.
I adb commands work...because I rooted her phone the other day. Is there a command I can use to pull those pictures off the card?
Click to expand...
Click to collapse
Adb pull /sdcard/DCIM "directory where you want to put it in)[ simpy way is to drag a folder in the cmd prompt window/terminal]
ilostchild said:
Adb pull /sdcard/DCIM "directory where you want to put it in)[ simpy way is to drag a folder in the cmd prompt window/terminal]
Click to expand...
Click to collapse
Thanks...I'll try that tonight when I get home.
C:\Users\Android>adb pull /sdcard/DCIM C:\Users\Android\Pictures
perfect example.. i did it on mine right now..
if you dont have the adb command in enviroment vaiable, then you will have to be in the sdk directory
so should be in
C:\android-sdk-windows\tools>adb pull /sdcard/DCIM C:\Users\Android\Pictures
and there ya go and should pull all the folders and files in the DCIM folder
Sweet! thanks it worked! Also thanks for the tip on draggin the 'to' folder into the cmd window. That made it a lot easier!
welcome and no problem lol
Sweet! thanks it worked! Also thanks for the tip on draggin the 'to' folder into the cmd window. That made it a lot easier!
Click to expand...
Click to collapse
Hey,
this seems to work but it says
pull: building file list...
and has been like that for over 5mins.
Is there a rate at which the data transfers? Is it a slow transfer?
How long did it take to transfer all your photos from DCIM?
Edit: It seems to be working now. I'm trying to copy the entire sdcard (only around 3 gig worth of stuff). Hopefully this copies all of the folders/files.
Will this pull take away all of my files, or will it just back it all up on my PC?
Will I need to push all of the files back afterwards? (If what I'm really trying to get at )
Edit 2: Never mind. ADB says that it copies only. Not removes.
Thanks for this! SO helpful! My sdcard got stuffed up or something and I needed to get everything off it so I could wipe and format it again

ADB help...

OK, I know how to use ADB to reboot and get into download mode on my phone, but I have a kind of emergency. I was attempting to replace a framework-res.apk file on my phone to change the battery icon, and now I am stuck FCing all over the place. So much that I can't put my backed up framework-res.apk file back in /system/framework via Root Explorer like I normally do.
I am connected to my phone, can list directories, but cannot seem to push the framework-res.apk file.
Can someone give me a step by step on how to do this and soon please...
EDIT: I think I got it. I needed to be in Recovery Mode, and then it seemed to copy fine.
While I do have someone's attention (hopefully), how do you change directories if the directory you want to change to is two names, IE 'Battery Mod'?
Demented71 said:
OK, I know how to use ADB to reboot and get into download mode on my phone, but I have a kind of emergency. I was attempting to replace a framework-res.apk file on my phone to change the battery icon, and now I am stuck FCing all over the place. So much that I can't put my backed up framework-res.apk file back in /system/framework via Root Explorer like I normally do.
I am connected to my phone, can list directories, but cannot seem to push the framework-res.apk file.
Can someone give me a step by step on how to do this and soon please...
Click to expand...
Click to collapse
Is your backed up framework on your sdcard? You could try adb shell.
from pc,
adb shell
su
cp XXXX/framework-res.apk system/framework <<<may need to use busybox cp
exit
exit
adb reboot
bobbylx said:
Is your backed up framework on your sdcard? You could try adb shell.
from pc,
adb shell
su
cp XXXX/framework-res.apk system/framework <<<may need to use busybox cp
exit
exit
adb reboot
Click to expand...
Click to collapse
My backed up framework file was on my PC. The first one I was trying to get to was on my phone, in a folder called Battery Mod, which I could not get into because ADB kept saying wrong substitution or something?
Either way, I was able to get it done, so I learned something new again.
EDIT: I think I got it. I needed to be in Recovery Mode, and then it seemed to copy fine.
While I do have someone's attention (hopefully), how do you change directories if the directory you want to change to is two names, IE 'Battery Mod'?
Click to expand...
Click to collapse
That makes sense, it may not let you Push to the file system while it's in use.
As for 2 names, do you mean from a windows command box or in the android command line. Windows you just type it as is. Linux is a little more picky, I usually try to remove spaces from directory names so I don't run into any problems with that. In linux a backslash works, ie, cd /sdcard/Battery\ Mod
Not sure if it will work on our phones.

Transfer system files to external SD card?

My motherboard is toast, I bought a broken phone on ebay and switched out the motherboards but it isnt working. Phone works fine but wont recognize sim card or connect to network. Its just a camera/wifi device atm. So anyway..... I can still get the old motherboard to kinda work enough to play with it, the home buttons dont work or the power button and sometimes freezes up. Is there a way I can put the old motherboard in the phone and copy the system files to the external sd card or computer, then wipe the new motherboard and copy the files from the old mb to the new mb? I believe I have tried everything else but if anyone has any suggestions Im all ears
Thanks!
The easiest way would probably be to take the motherboard you're wanting to pull stuff from, hook it up (in the phone), and via USB in ADB do something like this:
adb pull / \backup
That would create a folder at the top level of your C: drive with all the contents of the phone on it. You could then move all of that to the new motherboard.
(That would probably be something like:
adb push \backup /
but I'm not 100% sure on that. You may have to do a more one-by-one procedure.)
when I try to push the backup I get this message....
failed to copy '\backup/acct/uid/0/task' to 'acct/uid/0/task' : Operation not permitted
Sooooo what did I do wrong??
Also I couldnt find where it saved the backup on my computer.
Ok, found the backup folder on my c: drive but what do I do with it now?
Bump cause I still havent figured this out Seems like I dont have the correct permissions in adb.
poprocksncoke said:
when I try to push the backup I get this message....
failed to copy '\backup/acct/uid/0/task' to 'acct/uid/0/task' : Operation not permitted
Sooooo what did I do wrong??
Also I couldnt find where it saved the backup on my computer.
Ok, found the backup folder on my c: drive but what do I do with it now?
Click to expand...
Click to collapse
If you typed in your backup like what you wrote above (\backup/acct/uid/0/task), it's likely that you're running into an error because you flipped your slashes midway through.
The backup folder needs to be in the platform-tools folder of the ADB installation, as that's where ADB pushes from.
Once you have that, reboot into recovery mode. This may not be 100% necessary, but I usually find that pushes work better from there as the file system is (usually) read-write.
Then, try this:
adb push \backup /
(You may have to switch the slash before the word backup so it reads /backup, I'm not 100% sure.)
If that doesn't work, drag an individual folder out of the backup folder to the main platform-tools folder and type:
adb push /acct \
You'll have to repeat that for each folder, but it should work.
If all that fails, you can try to make a CWM flashable zip file. I don't know exactly what the procedure is for doing this, but I would guess that the answer exists somewhere on this site.
jmtheiss said:
If you typed in your backup like what you wrote above (\backup/acct/uid/0/task), it's likely that you're running into an error because you flipped your slashes midway through.
The backup folder needs to be in the platform-tools folder of the ADB installation, as that's where ADB pushes from.
Once you have that, reboot into recovery mode. This may not be 100% necessary, but I usually find that pushes work better from there as the file system is (usually) read-write.
Then, try this:
adb push \backup /
(You may have to switch the slash before the word backup so it reads /backup, I'm not 100% sure.)
If that doesn't work, drag an individual folder out of the backup folder to the main platform-tools folder and type:
adb push /acct \
You'll have to repeat that for each folder, but it should work.
If all that fails, you can try to make a CWM flashable zip file. I don't know exactly what the procedure is for doing this, but I would guess that the answer exists somewhere on this site.
Click to expand...
Click to collapse
Actually what I typed was adb push \backup / then it gave me that error. It stored the backup folder on my c: drive, I will move it to the tools folder and see if that works. Going to go search on how to make a CWM flashable zip file now. Maybe i'll give that a shot too. Thanks for your help.
So If I am getting this correctly, I take the custom ROM I have flashed to my phone and then I can add my system files to to the system folder in the ROM I can then flash the ROM again and it will install all my files?
In theory, yes, that should work. All the CWM update file does is write the files inside of it to the folders that the updater-script file tells it to.
Again, this should work IN THEORY.
poprocksncoke said:
So If I am getting this correctly, I take the custom ROM I have flashed to my phone and then I can add my system files to to the system folder in the ROM I can then flash the ROM again and it will install all my files?
Click to expand...
Click to collapse
Ok, I tried this and put the .zip on my sdcard and ran it from recovery. Got an error that I didnt have enough space. Any suggestions?

Categories

Resources