[Android Software/Hacking General [Developers Only]] Proxin:
I'd like to apologize to those who have replied, I missed a bunch of replies and haven't been on XDA in months. Going to check my email more often and get to these now.

Where did you find info about the MediaDownloadService? Usually what I'll do to find the exact name of each service is, I'll check the running services in Settings->Applications->Running Services. If I see an app running there that shouldn't be, I click on it (it usually will show 1 or 2 services running) and I'll see the services it has running.

For example, I'm looking at Swype right now. It's been updated since the last time I posted on this thread. Now I see under its entry in Running Services, "ConnectClient" and below that, "com.nuance.swype.beta:SwypeConnect".

I'll search this on Google next: "com.nuance.swype.beta connect client" and see if there is anything that comes up.

What I found on Google was this neat logcat: http://pastebin.com/nrxsLWZh

In there, you'll find com.nuance.swype.beta/com.nuance.swype.connect.ConnectClient. Now I'll try "pm disable blablabla" where blablabla was whatever we found from that pastebin.

su
pm disable com.nuance.swype.beta/com.nuance.swype.connect.ConnectClient

Basically, you use people's logcats or other reports from online to tell you the name of the service, try to disable it with pm disable, then check Running services to see if it's still running. If it's not running after you do pm disable, then you've successfully killed it.

Once it's not in there anymore, do some tests to see if the app still fully functions without that service.

I use a combination of Scripting Layer 4 Android (http://code.google.com/p/android-scripting/) and Llama to do this.

In SL4A, once you have it installed, press Menu and click Add to add a new Shell script. You can name it anything you want. In Script Content, put whatever code you want in there. Here's one for disabling Amazon's AppStore service from running in the background:

su -c 'pm disable com.amazon.venezia/com.amazon.mas.client.framework.UpdateService'

I put it in quotes above, so I can expand the script to add multiple commands. Here's what it would look like if Amazon had another service I wanted to disable:

su -c 'pm disable com.amazon.venezia/com.amazon.mas.client.framework.UpdateService; pm disable com.amazon.venezia/com.amazon.EXAMPLE.SERVICE.NAME.blablabla'

You can simply do this on multiple lines too. I had some reason that I liked to do it in quotes in the past, but I don't remember what it is right now. :confused:

Next, I'd create another script to re-enable the service once I launch the AppStore.

su -c 'pm enable com.amazon.venezia/com.amazon.mas.client.framework.UpdateService'

Now that the scripts are saved, assuming they work correctly to kill the services we want to kill, we need to go into Llama to set up Events to trigger enabling or disabling of these services.

In Amazon Appstore's case, I'm going to add an event to kill the service when the current app is not Appstore.

In Llama under Events, I click on Add Condition, then Active Application. I select the Amazon Appstore with the button to select apps, then set status to "App stopped or in background".

Then, I click Add Action. Click on Run App Shortcut, then select Scripts, and click on the Disable.sh (or whatever you named your script).

I'm going to add a delay of 2 minutes for a little safety buffer, so the script does not terminate the app if I have a download going or something. Click on Advanced, then check Delay event, change Delay minutes to 2, then check the box labeled "Cancel delay if false".

With Amazon Appstore, you can't download apps unless the service is running unfortunately. So, we'll create a new event to run the Enable script when Appstore is launched.

Go into Llama and create another new event similar to how we did the previous one: Events->Add Condition->Active Application->Appstore->App started or in foreground

Add Action->Run App Shortcut->Scripts->Enable.sh

What I did next for this case is, I didn't want the script to start up each and every time I launched the app; only times I was going to actually -use- the script, meaning when I needed to download apps. I go to Advanced next, then select "Require confirmation" so I can select whenever I want the service to run once the app is launched.

I click on the Appstore now and I have a Llama confirmation, asking me whether I want to execute the script or not.

What happens now is, once you launch the Appstore, a notification shows in the notification bar for Llama. You can use this to enable the Amazon service (and thus enable you to download apps from the Appstore), or you can simply browse the Appstore without the service running (but if you have the service disabled, you can't download any apps... I've tried).

Wow, those instructions are very poorly written. Sorry about that. If you are confused, please ask again and I'll try to take some screenshots or otherwise attempt to explain better. :eek:

Happy holidays!