Go Back   Android Forums > Android Discussion > Android Applications
Android Applications All the information you could ever want about Android Applications. Learn about apps and get help with them... all here! New apps can be found and announced in the Applications Announcements forum linked below.
Gamers - Check out our new sister sites!
Nintendo Wii U!    |    OUYA - $99 Android System!

test: Reply
 
LinkBack Thread Tools
Old September 4th, 2012, 07:11 PM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Aug 2012
Posts: 6
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Android App Services - How Does it Work?

Hi Folks;

I have Android 2.3.4 on my phone and have one app that is set to start as a service. I'd love to remove the app (system app) but don't want to risk it.

Here's my thinking - if I remove the app the phone will start up, try and run the non-existant service and then cause problems.

This causes me to wonder how the Android O/S itself works with respect to startup services. For instance, is there a file with a line in it that calls that particular service?

If so, then perhaps I could modify that file and then remove the offending system app.

Either way, without knowing more about how Android fires up system services I'll be stuck :-(

So, if anyone knows how system services work and, ideally, how to disable some of them I'd love to hear from you!

marvinmiller is offline  
Reply With Quote
Sponsors
Old September 6th, 2012, 12:25 PM   #2 (permalink)
Member
 
T.M.M.L's Avatar
 
Join Date: Sep 2010
Location: Ohio
Posts: 461
 
Device(s): S3,HTC Incredible 2,Samsung Fascinate, Former L.G. Dare,
Carrier: Verizon

Thanks: 22
Thanked 91 Times in 78 Posts
Default

Greetings marvinmiller,

It is wise not to start removing any apps, especially services without knowing what they are tied to. A situation worse that just having some issues, would be the possibility of your device not starting at all.

Why do you need to deactivate this service?

Android doesn't work like Windows does. The android system loads a lot of things into memory for faster access. If the OS decides it needs more memory, it will kill a app that isn't being used.

If you have a rooted device, you could download Titanium backup, and instead of removing something, you could freeze it to prevent it from running.

The upside to this approach is if something screws up from the freezing, as long as you can get back into titanium, you can un-thaw that app/service and reboot.

Downside...If all else fails, the solution of a factory reset can get you back to a functioning device..

Bottom line, don't delete anything until your sure it won't screw something up, Even then try renaming or freezing before deleting.

Just my 2 cents.
__________________
Ima Champion!!!
____________________
T.M.M.L is offline  
Reply With Quote
Old September 7th, 2012, 03:17 AM   #3 (permalink)
New Member
Thread Author (OP)
 
Join Date: Aug 2012
Posts: 6
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by marvinmiller View Post

So, if anyone knows how system services work and, ideally, how to disable some of them I'd love to hear from you!
After some searching I found out that there is a manifest.xml (?) file that seems to get packed in with the .apk file. It seemed to me (not sure) but that somehow, this is how android determines if there is a service to be started during boot (perhaps it parses all these .apk files, checks the manifest.xml file and then goes from there?)

Either way, I wasn't able to glean the specifics on how Android determines/starts these services so I decided to take a chance, remove the app and then re-start. Good news, removing the app worked well and there are no service/startup issues.

The only conclusion I can come down to is that setting a service to start, at boot time, must be done in the manifest.xml file that is compiled into the larger .apk file. Deleting that .apk file sees to have solved all the issues and the O/S is no longer trying to startup that service at boot time.

My guess is that there is no other place where Android looks to fire up services. Without the feedback of an actual developer familiar with these things we'll never know for certain but, at least, my task is done
marvinmiller is offline  
Reply With Quote
Old September 7th, 2012, 07:52 AM   #4 (permalink)
New Member
 
Join Date: Sep 2012
Posts: 1
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Android applications are written in the Java programming language. The Android SDK tools compile the code—along with any data and resource files—into an Android package, an archive file with an .apksuffix. All the code in a single .apk file is considered to be one application and is the file that Android-powered devices use to install the application.
Once installed on a device, each Android application lives in its own security sandbox:
  • The Android operating system is a multi-user Linux system in which each application is a different user.
  • By default, the system assigns each application a unique Linux user ID (the ID is used only by the system and is unknown to the application). The system sets permissions for all the files in an application so that only the user ID assigned to that application can access them.
  • Each process has its own virtual machine (VM), so an application's code runs in isolation from other applications.
  • By default, every application runs in its own Linux process. Android starts the process when any of the application's components need to be executed, then shuts down the process when it's no longer needed or when the system must recover memory for other applications.
roars2222 is offline  
Reply With Quote
Old September 9th, 2012, 05:37 PM   #5 (permalink)
New Member
Thread Author (OP)
 
Join Date: Aug 2012
Posts: 6
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by marvinmiller View Post
So, if anyone knows how system services work and, ideally, how to disable some of them I'd love to hear from you!
Well, given that I was not able to determine, specifically, how android determines how to fire up a service on startup I took the risk and just removed the offending system app.

That worked with no detrimental effects. However, I wouldn't recommend that approach to anyone without knowing, specifically, how Android determines whether to fire up a service at startup.

At this point my guess is that when an app is installed Android parses the manifest.xml file from the .apk file to determine if it is designed to run as a service during startup and that that is the only location that Android references. But that's nothing more than a guess so I wouldn't recommend making decisions based on that.

As mentioned, without information from an Android developer, specifically relating to how Android determines which services to run as startup services we'll never really know
marvinmiller is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Discussion > Android Applications
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:40 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.