[Q] How to use adb to replace music dir - Samsung Galaxy Nexus

The music files on my phone are all in subdirectories of /sdcard/Music . If I wanted to replace the existing songs with new files from my pc, would I use the following commands:
adb shell rm -rf /sdcard/Music
adb shell mkdir /sdcard/Music
adb push c:\music /sdcard/Music
If not, what should I use? (To answer the obvious 'why don't you try it' question, because I'm nervous about rm and want to see if there's something better.)
Is there an adb command that would cause the google music player to rescan for songs? If not, I'd use one of the rescan apps in the playstore or reboot.

foosion said:
The music files on my phone are all in subdirectories of /sdcard/Music . If I wanted to replace the existing songs with new files from my pc, would I use the following commands:
adb shell rm -rf /sdcard/Music
adb shell mkdir /sdcard/Music
adb push c:\music /sdcard/Music
If not, what should I use? (To answer the obvious 'why don't you try it' question, because I'm nervous about rm and want to see if there's something better.)
Is there an adb command that would cause the google music player to rescan for songs? If not, I'd use one of the rescan apps in the playstore or reboot.
Click to expand...
Click to collapse
yes, those commands are correct.
to rescan your library, a app would be the easiest way and you don't require a pc to trigger the media scan.

beekay201 said:
to rescan your library, a app would be the easiest way and you don't require a pc to trigger the media scan.
Click to expand...
Click to collapse
Is there any way to trigger a rescan using adb?
FWIW, I'm using python on a pc to script the adb commands, so I'd like to do everything in one step if possible.

i heard somewhere for this: adb shell "am broadcast -a -d "
so try this:
adb -d shell "am broadcast -a android.intent.action.MEDIA_MOUNTED -d file:///mnt/sdcard/Music/"

Related

How can I tell if I'm rooted?

I followed this thread:
http://forum.androidcentral.com/htc-evo-4g-roms-hacks/17766-how-full-root-evo-4g-mac-3.html
I went through all the steps and I'm exhausted since I spent like 2 hours doing this rooting process.
Now someone PLEASE tell me before I gouge my eyes out and skull **** myself if I achieved root.
Am I supposed to see a new icon indicating that I rooted? I don't see anything that says Super Agent but I followed those instructions to a T.
Right now I'm restoring my apps back on and I'm going to be very pissed if I'm thinking what I'm thinking. By the way I searched Google and someone on a forum said that if you cab download wireless tether from market then you're rooted. I was able to download it but does that really mean I am or did that just apply to that particular android phone?
open up a terminal or command line window.
run your adb program, with the following command line
mac
./adb shell
windows
adb shell
(or however you invoked it during the rooting process)
if your prompt looks like
Code:
#
you win.
else, you lose.
edit:
you'll only see superuser permissions if you install the app, not sure where to get it from as when i flash new roms they're preinstalled.
i suggest going on to flash a recovery image, so you can flash other ROMS with ease.
Thankfully I saw the # sign so that means I'm good. How do I go about starting to remove the apps I don't need anymore?
I have to research recovery roms because I don't have the patience to do it today.
just go flash a new ROM that has all the junk removed and save yourself the trouble.
i here there are programs that will do this for you as well, btu i dont know em off hand
gqstatus0685 said:
Thankfully I saw the # sign so that means I'm good. How do I go about starting to remove the apps I don't need anymore?
I have to research recovery roms because I don't have the patience to do it today.
Click to expand...
Click to collapse
1. Reboot in to recovery, so that /system will be writeable.
2. Launch an adb shell and navigate to /system/app:
Code:
./adb shell
# cd /system/app
3. Delete the programs you don't want by using the rm (remove) command:
Code:
# rm Flickr.apk
4. Reboot the device.
If you want to err on the side of caution, you can move the programs to your SD card, or your computer, so that you can restore them if needed:
Move to SD card:
Code:
./adb shell
# mkdir /sdcard/apkbackup
# mv /system/app/Flickr.apk /sdcard/apkbackup
Restore from SD card:
Code:
./adb shell
# mv /sdcrd/apkbackup/Flickr.apk /System/app
Backup to your computer:
Code:
./adb pull /system/app/Flickr.apk ~/Desktop/Flickr.apk
./adb shell
# rm /system/app/Flickr.apk
Restore from your computer:
Code:
./adb push ~/Desktop/Flickr.apk /system/app/Flickr.apk
Have fun!
cent

Moving Power Manager Pro to /system/app

Long post but, hopefully an easy answer that someone can walk me through. I have fully rooted my EVO along with the NAND. I'm trying to move/install (?) Power Manager Pro into the /system/app folder to get full rights so it can turn GPS on/off. The website for the app says that I need to do the following:
After root is obtained you need to install the application into the /system/app directory so that it has enough permission to change the location settings. Open a Terminal Emulator app and execute the following command to copy the application to the sdcard (for the full version the name of the application is /data/app/com.acme.android.powermanagerpro.apk):
su
cp /data/app/com.acme.android.powermanager.apk /sdcard/PowerManager.apk
If you can't find the application in /data/app try /data/apps-private/
Then, un-install Power Manager from the device
Execute the following commands in the terminal emulator to remount the /system directory as read/write and to install the application into the /system/app directory:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cp /sdcard/PowerManager.apk /system/app
If you prefer to use adb from your computer, execute these commands:
adb remount
adb shell cp /sdcard/PowerManager.apk /system/app
Several users have utilized root explorer from the Google marketplace to simplify this process.
I have Root Explorer so I would like to do it through there is possible, but I can't seem to get it to work without it getting a FC when it opens after trying to move it.
hmmm, it might be force closing because the system is not mounted as read/write. Never used the app before so I dont know. But you can search the market for terminal emulator and then follow the steps the showed above. It looks like it should work.
...or you could do it through adb shell if you are connected to your 'puter
Trying it in Terminal Emulator with no luck... Wondering if the path is right or if i need to change that? It says:
xport PATH=/data/local/bin:$PATH
$su
cp /data/app.acme.android.powermanagerpro.apk /sdcard/PowerManager.apk
cp: not found
the path seems right (I assume you mean export and not xport). I dont think you need anything special on the rom to access cp through terminal emulator...
Have you tried hooking it up to a computer and entering it through adb shell to see if that works?

Search key doesn't work.

I don't know if it has anything to do with it, but after I installed the new google voice search, my search key didn't work any more. When I touch the search key now, it doesn't do anything. Any idea?
Thanx in advance.
Sent from my PC36100 using XDA App
Same boat.
Cm6.
Any ideas people?
Add me to this list same here
The voice search isn't to blame it's the new Google search widget that you need to blame.
Sent from my PC36100 using Tapatalk
you got to hold it, hold it for like 3-4 seconds, it will work, at least on fresh does!!
What ive been looking for..
Sounds like a great fix to that annoying thing. I hate that it comes on all the time. Think ill install it just for the break rofl....................
jonathaflores said:
you got to hold it, hold it for like 3-4 seconds, it will work, at least on fresh does!!
Click to expand...
Click to collapse
That asks for the long press one
I'm talking about the single press search
Here's how to fix (from your Terminal/Command Prompt, where ADB is):
Code:
adb shell mount -o remount,rw /dev/block/mtdblock4 /system
adb shell rm /system/app/GoogleQuickSearchBox.apk
adb shell rm /system/app/VoiceSearch.apk
adb shell rm -r /data/data/com.google.android.voicesearch
adb shell pm uninstall com.google.android.voicesearch
adb reboot
Now go install the Google Search and Voice Search from the Android Market. Problem solved.
NOTE: You have to have full root. That means # in your shell, and NAND unlock. If you don't, you are SOL.
drmacinyasha said:
Here's how to fix (from your Terminal/Command Prompt, where ADB is):
Code:
adb shell mount -o remount,rw /dev/block/mtdblock4 /system
adb shell rm /system/app/GoogleQuickSearchBox.apk
adb shell rm /system/app/VoiceSearch.apk
adb shell rm -r /data/data/com.google.android.voicesearch
adb shell pm uninstall com.google.android.voicesearch
adb reboot
Now go install the Google Search and Voice Search from the Android Market. Problem solved.
NOTE: You have to have full root. That means # in your shell, and NAND unlock. If you don't, you are SOL.
Click to expand...
Click to collapse
I am fully rooted anyway to do this via titanium backul? Is the main goal here to uninstall the old apps?
Jsimon9633 said:
I am fully rooted anyway to do this via titanium backul? Is the main goal here to uninstall the old apps?
Click to expand...
Click to collapse
No way that I found. His way is flawless and just requires typing what you see.
the adb commands worked awesome...I still have a slight lag with the "hard" key search button...still requires a long press.
Thanks!!
Quick note: If you do all of that, and when short-pressing the Search key, you don't get the Google Search (and assuming you've installed Google Search from the Market), use these commands:
Code:
adb shell mount -o remount,rw /dev/block/mtdblock4 /system
adb shell cp /data/app/com.google.android.googlequicksearchbox-1.apk /system/app/GoogleQuickSearchBox.apk
adb reboot
This thread oughtta be stickied. I've already quoted my post in here three times.
drmacinyasha said:
Here's how to fix (from your Terminal/Command Prompt, where ADB is):
Code:
adb shell mount -o remount,rw /dev/block/mtdblock4 /system
adb shell rm /system/app/GoogleQuickSearchBox.apk
adb shell rm /system/app/VoiceSearch.apk
adb shell rm -r /data/data/com.google.android.voicesearch
adb shell pm uninstall com.google.android.voicesearch
adb reboot
Now go install the Google Search and Voice Search from the Android Market. Problem solved.
NOTE: You have to have full root. That means # in your shell, and NAND unlock. If you don't, you are SOL.
Click to expand...
Click to collapse
I've already uinstalled/rebooted/installed both the voice search and the google search. Do i still proceed with the above steps? And if so, can I type these commands as I see them into the Terminal Emulator on the phone itself?
The commands are meant to be done via ADB (a command prompt/shell on your computer).
If you already have everything working (including the search key) then there's no need for you to do this.
drmacinyasha said:
Quick note: If you do all of that, and when short-pressing the Search key, you don't get the Google Search (and assuming you've installed Google Search from the Market), use these commands:
Code:
adb shell mount -o remount,rw /dev/block/mtdblock4 /system
adb shell cp /data/app/com.google.android.googlequicksearchbox-1.apk /system/app/GoogleQuickSearchBox.apk
adb reboot
This thread oughtta be stickied. I've already quoted my post in here three times.
Click to expand...
Click to collapse
You are a lifesaver. Was freaking out when my search button broke. This fixed it. Thank you!
Sent from my PC36100 using XDA App
drmacinyasha said:
The commands are meant to be done via ADB (a command prompt/shell on your computer).
If you already have everything working (including the search key) then there's no need for you to do this.
Click to expand...
Click to collapse
I've just uinstalled/rebooted/installed both the voice search and google search. Voice search works fine, but as I said previously, the google search button is broken.
I want to use your instructions but I've never used adb on my computer before. Can you help me out? I've always avoided using it, but maybe it's time I learn.
tranquilchaos said:
I've just uinstalled/rebooted/installed both the voice search and google search. Voice search works fine, but as I said previously, the google search button is broken.
I want to use your instructions but I've never used adb on my computer before. Can you help me out? I've always avoided using it, but maybe it's time I learn.
Click to expand...
Click to collapse
there's a thread in development on how to use adb.
seriously, once you get the least bit familiar with it, you won't want to use anything else...
i do everything from adb. it's just easier. trust me. i've tried all the other methods, and they're a pain in comparison
timothydonohue said:
there's a thread in development on how to use adb.
seriously, once you get the least bit familiar with it, you won't want to use anything else...
i do everything from adb. it's just easier. trust me. i've tried all the other methods, and they're a pain in comparison
Click to expand...
Click to collapse
Wowsers, so I found the following post: http://forum.xda-developers.com/showthread.php?t=502010 (adb for dummies) but I'm lost.
It seems to be designed for Windows users....So far I have:
downloaded the newest SDK package, Eclipse and installed the ADT Plugin. Now what? I'm so confused...any help would be great!
tranquilchaos said:
Wowsers, so I found the following post: http://forum.xda-developers.com/showthread.php?t=502010 (adb for dummies) but I'm lost.
It seems to be designed for Windows users....So far I have:
downloaded the newest SDK package, Eclipse and installed the ADT Plugin. Now what? I'm so confused...any help would be great!
Click to expand...
Click to collapse
You don't need Eclipse or anything like that.
Just go to Start>Run, type in "cmd" (no quotes) and then type the command:
cd *location of where you saved the Android SDK*
cd tools
So if you copied the Android SDK to "C:\Program Files (x86)\Android SDK", you would type:
cd "C:\Program files (x86)\Android SDK\"
cd tools
Now just type in the commands, starting with "adb " such as "adb reboot" or "adb shell" and so on.
EDIT: Since there was an update for the Nexus One version of CM6, there's now a new GApps ZIP which contains the new search, Voice Search, etc. Just copy it to your SD card, reboot into recovery, and flash it:
http://mirror.kanged.net/gapps/gapps-hdpi-20100814-signed.zip

[Q] Weather APK and TI uninstall

Hey guys, I'm using Fresh 3.1.0.2 and I was wondering what I need to uninstall to remove weather from "accounts and sync." Also, would removing it affect Fancy widget's built in weather?
Also, if I uninstall the apps using TI backup, is there anything else I need to do, such as deleting the APKs w/ root explorer?
Thanks!
If you just want to keep it from syncing, you can just uncheck the box next to it. If you don't want to have it show up at all, you can just delete the apk from /system/app. I don't remember the exact name but it should have weather in the name. I don't think it breaks anything major, but then again, removing parts of Sense like that is kinda like playing roulette. Its all integrated, so you never know for sure until after you've done it. I recommend making a copy of it before you remove it as a backup. Then you just have to push the file exactly as its named back to the folder and reboot.
Here's the exact steps you can take:
From your computer:
Code:
adb remount
adb shell
su
cd /system/app
ls
Note: You only need to run su if you have a $ instead of a # when you run adb shell. Otherwise, you can skip su.
This is where you can look for the necessary app. like I said, I don't remember the name, but a list will show up in your console.
Code:
exit
exit
Note: if you didn't have to use su before, exit only once, or you'll exit your command prompt/terminal
Now in your console:
Code:
adb pull /system/app/<name of weather apk> \backup\
adb shell rm /system/app/<name of weather apk>
If you are using linux, replace \backup\ to /backup/. You can also make this any directory you want to use to keep the backup file in.
To put the apk back later:
Code:
adb remount
adb push \backup\<name of weather apk> /system/app
If you have any questions about the steps, let me know.
superlinkx said:
If you just want to keep it from syncing, you can just uncheck the box next to it. If you don't want to have it show up at all, you can just delete the apk from /system/app. I don't remember the exact name but it should have weather in the name. I don't think it breaks anything major, but then again, removing parts of Sense like that is kinda like playing roulette. Its all integrated, so you never know for sure until after you've done it. I recommend making a copy of it before you remove it as a backup. Then you just have to push the file exactly as its named back to the folder and reboot.
Here's the exact steps you can take:
From your computer:
Code:
adb remount
adb shell
su
cd /system/app
ls
Note: You only need to run su if you have a $ instead of a # when you run adb shell. Otherwise, you can skip su.
This is where you can look for the necessary app. like I said, I don't remember the name, but a list will show up in your console.
Code:
exit
exit
Note: if you didn't have to use su before, exit only once, or you'll exit your command prompt/terminal
Now in your console:
Code:
adb pull /system/app/<name of weather apk> \backup\
adb shell rm /system/app/<name of weather apk>
If you are using linux, replace \backup\ to /backup/. You can also make this any directory you want to use to keep the backup file in.
To put the apk back later:
Code:
adb remount
adb push \backup\<name of weather apk> /system/app
If you have any questions about the steps, let me know.
Click to expand...
Click to collapse
Thank you very much! I'm in class right now, but after I will try this out! I've noticed a couple of weather apks though. Little weird. Haha.
p.s. you da man.
I found a couple of weather apks:
1) com.htc.Weatherwidget.apk
2) weathersyncprovider.apk
3) htcweatherwallpaper.apk
4) weatherprovider.apk
5) weatheragentservice.apk
Not really sure which one to remove. Lol.
mylasthope said:
I found a couple of weather apks:
1) com.htc.Weatherwidget.apk
2) weathersyncprovider.apk
3) htcweatherwallpaper.apk
4) weatherprovider.apk
5) weatheragentservice.apk
Not really sure which one to remove. Lol.
Click to expand...
Click to collapse
Every time i try removing any of the weather apks i get a force close error. it been a while but its something like com.android.htcbgp or something like that. I would just uncheck the sync option.
EDIT- com.htc.bg is the process that FCs

[Q] youtube app porting help!!! please!!!

can someone please post DETAILED isntructions to put froyo or gingerbread youtube app thing on samsung epic 4g. ive tried so many time and cant do it. and i delted the stock youtube app with titanium but cant install the other app and i dont wanna pay for root explorer cuz idk if its gonna help at all. i tried using the cmd promt but it says permission denied everytime and it also says adb is not recognized as an internal storage.. PLEASE SOMEONE HELP MEEE I DONT HAVE A YOUTUBE AP AT ALL NOW!!!!!
betterment66 said:
can someone please post DETAILED isntructions to put froyo or gingerbread youtube app thing on samsung epic 4g. ive tried so many time and cant do it. and i delted the stock youtube app with titanium but cant install the other app and i dont wanna pay for root explorer cuz idk if its gonna help at all. i tried using the cmd promt but it says permission denied everytime and it also says adb is not recognized as an internal storage.. PLEASE SOMEONE HELP MEEE I DONT HAVE A YOUTUBE AP AT ALL NOW!!!!!
Click to expand...
Click to collapse
The new YouTube.apk just needs to be placed in '/system/app'. What I did was remove the original YouTube.apk and put the new one in its place and voila. Here is the method adapted for Windows (I think it's all right for Windows). This is also assuming you rooted with a one click root that included the remount script and that you have adb on your computer (the one click rooter should have adb included with it).
1. in the cmd prompt, go to the folder where you have adb and type:
Code:
adb.exe shell
2. inside shell:
Code:
$ su
# remount rw
# mkdir /sdcard/backup
# cp /system/app/YouTube.apk /sdcard/backup
# rm /system/app/YouTube.apk
# exit
$ exit
3. now in the cmd prompt again:
Code:
adb.exe push \path\to\YouTube.apk /system/app
4. Reboot the phone.
gremlyn1 said:
The new YouTube.apk just needs to be placed in '/system/app'. What I did was remove the original YouTube.apk and put the new one in its place and voila. Here is the method adapted for Windows (I think it's all right for Windows). This is also assuming you rooted with a one click root that included the remount script and that you have adb on your computer (the one click rooter should have adb included with it).
1. in the cmd prompt, go to the folder where you have adb and type:
Code:
adb.exe shell
2. inside shell:
Code:
$ su
# remount rw
# mkdir /sdcard/backup
# cp /system/app/YouTube.apk /sdcard/backup
# rm /system/app/YouTube.apk
# exit
$ exit
3. now in the cmd prompt again:
Code:
adb.exe push \path\to\YouTube.apk /system/app
4. Reboot the phone.
Click to expand...
Click to collapse
ok i get to remount rw but the when i type in the nect code it says
mkdir falied for /sdcard/backup read-only filesystem
I install it using terminal emulator.
All I do is type
Su
#rm /system/app/YouTube.apk
#cp /sdcard/DirectoryWithTheYoutubeApp/YouTube.apk /
system/app
Or after you rm, just use the "My Files" app and go on your sdcard and click YouTube.apk and it'll install and work fine. But remember to sign out of youtube before you close it by going to your page and clicking sign out or else it'll keep force closing after you start it up.
I hope I helped...
Sent from my SPH-D700 using XDA App
you guys are gonna freaking kill me. ALL THE TROUBLE I WAS HAVING WAS BECAUSE I HAD MY SDCARD MOUNTED THE WHOLE TIME I WAS TRYING TO DO THIS THE MINUTE I TRIED IT WITHOUT IT BEING MOUNTED IT WORKED...IM SO DUMB!!!!! LOL BUT THANKS FOR THE HELP ALL OF U!!!!!! U GUYS ROCK!!!! N SO DOES THE NEW UTUBE APP .....BTW I UNDERSTAND UR NOT SUPPOSED TO SIGN IN TO IT RIGHT???
I just uninstalled the original, put the modded youtube.apk in the SDX backup folder and installed (restored) it with SDX stock app remover. Simple, fast and no typing required.
Glad you got it worked out though.
me 2!!! this app rocks
Glad it's working! Having the SD card mounted while trying to adb is a common mistake and always a good first troubleshooting check.

Categories

Resources