Post Reply

[FIX] Bulletproof Background Apps!

27th February 2012, 09:53 AM   |  #111  
Member
Thanks Meter: 2
 
49 posts
Join Date:Joined: Dec 2005
Hi,

I want to do something a bit different from what has been discussed in most of this thread. I would like to prevent my satnav (Sygic) from being auto-killed. Currently I find that every time I minimize it for a few seconds it has to be fully re-initialized.

Obviously I do not want it running from boot, so I just need it bulletrproofed when I want to use it.

I've tried starting sygic and then switching to script manager, and running the following script:

PPID=$(pidof com.sygic.aura)
echo "-17" > /proc/$PPID/oom_adj

but I always get this output:

exec sh '/mnt/sdcard/sygic.sh'
# exec sh '/mnt/sdcard/sygic.sh'
/oom_adj: directory nonexistenteate /proc/18527

Is this because the app has already been killed?

Any ideas on how to get round this problem would be much appreciated.

Is there a way of running a script that will launch the app and bulletproof it straight away?

Or is there a better way of going about keeping this app alive?
27th February 2012, 02:35 PM   |  #112  
zeppelinrox's Avatar
OP Senior Member
Flag IN THE FREAKIN' OP
Thanks Meter: 21,249
 
9,312 posts
Join Date:Joined: Dec 2010
Donate to Me
More
Quote:
Originally Posted by Moon Shadow - NM

[EDIT]
I have figured out how to use cron to run jobs. If you are interested, I'll have a write up in a couple of days in the DX2 section.

Thanks!

Ciao!
[/EDIT]

That's cool.
I did find a way to have bulletproof apps script run from init.d automatically and have it NOT interfere with the boot process (sleep command just delays everything on some devices so that's useless) AND have it running in a loop once android loads in which it sleeps for 60 seconds and re-bulletproofs the hitlist.
I'm not sure which method has less overhead.
cron or sleep

However I think sleep is sufficient for this purpose because it runs at intervals.
If I needed it to be run at certain times or on certain days, cron is the way to go for sure.

Quote:
Originally Posted by JPo_23

Hi,

I want to do something a bit different from what has been discussed in most of this thread. I would like to prevent my satnav (Sygic) from being auto-killed. Currently I find that every time I minimize it for a few seconds it has to be fully re-initialized.

Obviously I do not want it running from boot, so I just need it bulletrproofed when I want to use it.

I've tried starting sygic and then switching to script manager, and running the following script:

PPID=$(pidof com.sygic.aura)
echo "-17" > /proc/$PPID/oom_adj

but I always get this output:

exec sh '/mnt/sdcard/sygic.sh'
# exec sh '/mnt/sdcard/sygic.sh'
/oom_adj: directory nonexistenteate /proc/18527

Is this because the app has already been killed?

Any ideas on how to get round this problem would be much appreciated.

Is there a way of running a script that will launch the app and bulletproof it straight away?

Or is there a better way of going about keeping this app alive?

Yeah I thought about having a way to run an app and bulletproof it right away.
I even had a name ready - Lock 'n Load... LOL
BUT with the method I found to launch an app from a script, the am start command, it is just too difficult to do because there is no universal command to launch any app.
However, you can add the am start to run sygic in your own script.
Here is an example of the am start to run battery history:
am start -n com.android.settings/.battery_history.BatteryHistory

However, if you just install V6 supercharger and enable the bulletproof apps and add sygic to the hitlist, it will automatically get bulletproofed after running it since the script runs at 60 second intervals.

The script will also apply the renice command
27th February 2012, 03:52 PM   |  #113  
Member
Thanks Meter: 2
 
49 posts
Join Date:Joined: Dec 2005
Quote:

However, if you just install V6 supercharger and enable the bulletproof apps and add sygic to the hitlist, it will automatically get bulletproofed after running it since the script runs at 60 second intervals.

The script will also apply the renice command

Thanks. I had no idea that the script ran every 60 seconds, so that seems like a good approach, except that I can't add the program.

I run the supercharger script, select option 17, and it will only allow me to add running processes. I've tried switching straight from Sygic to the script, but it's always been killed before I get an opportunity to bulletproof it.

Is there some other way to add it? Do I need to manually edit something?
27th February 2012, 11:00 PM   |  #114  
zeppelinrox's Avatar
OP Senior Member
Flag IN THE FREAKIN' OP
Thanks Meter: 21,249
 
9,312 posts
Join Date:Joined: Dec 2010
Donate to Me
More
Yeah bulletproof something so the Bulletproof Apps Hitlist file gets created (the script tells you where the file is) and just add sygic to the list
It doesn't even have to be the full process name since I used the pgrep command instead of pidof

You can also edit bulletproof app fine tuner so you can tweak app priorities up or down
1st March 2012, 06:09 AM   |  #115  
drunkboi's Avatar
Senior Member
Flag Houston
Thanks Meter: 77
 
270 posts
Join Date:Joined: Apr 2008
More
I'm using gscript. Do I just need to do the setup once or how do I use properly? Thanks!
5th March 2012, 05:07 PM   |  #116  
Junior Member
Thanks Meter: 2
 
20 posts
Join Date:Joined: Nov 2011
I'm using the Supercharger script (the newest version) with a stock rom, and it has been loading at startup quite nicely. Today, I tried to bulletproof some apps and made the 97Bulletproof script run at the startup as well, but now the Supercharger script says that the 99Supercharger script wasn't run at startup, so the minfrees were not in effect. So can't I run two scripts at startup?

And another question: how to bulletproof the messaging app? I mean what is the name of the service I should bulletproof?
Last edited by neverlost7; 5th March 2012 at 06:35 PM.
6th March 2012, 01:01 AM   |  #117  
zeppelinrox's Avatar
OP Senior Member
Flag IN THE FREAKIN' OP
Thanks Meter: 21,249
 
9,312 posts
Join Date:Joined: Dec 2010
Donate to Me
More
Yeah script manager can load both on startup
sms app.. it depends on which app your using for sms
6th March 2012, 02:44 PM   |  #118  
Junior Member
Thanks Meter: 2
 
20 posts
Join Date:Joined: Nov 2011
I'm using the stock sms app. What is the process I should bulletproof, then? And do you have any idea as to why ScriptManager won't run the 99 script if I configure it to run the 97 script on boot as well?
7th March 2012, 07:56 AM   |  #119  
kizsleg's Avatar
Senior Member
Thanks Meter: 90
 
358 posts
Join Date:Joined: Nov 2011
Quote:
Originally Posted by neverlost7

I'm using the stock sms app. What is the process I should bulletproof, then? And do you have any idea as to why ScriptManager won't run the 99 script if I configure it to run the 97 script on boot as well?

Does a script that reloads every minute cost much power?
24th March 2012, 02:15 PM   |  #120  
Jarmezrocks's Avatar
Senior Member
Flag Gold Coast
Thanks Meter: 456
 
929 posts
Join Date:Joined: Mar 2011
Donate to Me
More
Quote:
Originally Posted by JPo_23

Thanks. I had no idea that the script ran every 60 seconds, so that seems like a good approach, except that I can't add the program.

I run the supercharger script, select option 17, and it will only allow me to add running processes. I've tried switching straight from Sygic to the script, but it's always been killed before I get an opportunity to bulletproof it.

Is there some other way to add it? Do I need to manually edit something?

Hey I know this is probably just a bizare thing and I am possibly totally stupid for thinking it, but app icons in the launcher are just like desktop shortcuts right? Could you not elect for an "installation protocol" for an elected group of apps that when installed that the shortcut is not linked direct to the app, but it is linked to a script. i.e. when you click the shortcut it executes the script and within that script it bullet proofs and then launches the app.

Like Links2SD allows a full take over of the installation proceedure when installing apps if you want it to. Say you boot your phone and for what ever reason disable the script to launch Links2SD (in init.d) then the app icons remain on the desktop/launcher, however when you click them it says "App not installed"....but I know for certain that the app IS installed. Essentially it is in a partition that is not mounted and visible.

I'll shut up now I have no idea what I am going on about nm I'm just rambling **** again

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes