Originally Posted by Moon Shadow - NM
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.
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.
Originally Posted by JPo_23
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:
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