yashsingh1/xdaforums huggingface dataset:
[Motorola Droid and Milestone General] zeppelinrox:
Well alot of the questions have been answered...

pids changes when an app restarts

init.d scripts run once on boot

For everything else... see my latest...

Changelog:

Updated October 3

: - V6 SuperCharger Update 9 Beta 6.2.2

Added -

2 OOM Sticks!

zOOM

(quick) and

vrOOM

(verbose) versions. (yeah yeah... I shoulda made Four Sticks! get it?)

Added -

PowerShift Scripts!

(make quick widgets for different minfrees!)

Added -

Bullet_Proof App One-Shots!

(you can make it a widgetable script whenever you bulletproof an app!)

Added -

(S)97BulletProof_Apps boot script

(you can add to it whenever you bulletproof an app!)

Added -

Fast Engine Flush

- You can make a widget for it or put it on a schedule!

Improved - Re-SuperCharger - When you copy settings from sd card, it will load 99SuperCharger

Added - Support for devices that use S*(not numbered) boot scripts so S99SuperCharger is created instead of 99SuperCharger

Added - Support for com.htc.launcher (knows it's locked status automatically)

Added - Support for devices with /system/etc/hw_config.sh

Remembers - If you're using local.prop or build.prop (you can change setting in Options)

Improved - Test on startup (Test Drive)

Enhanced - The interface all over the place (the menu is a "Driver's Console") :)

Added - Check to see if you selected an inappropriate setting (256 mb can't choose 8 or 9)

Fixed - A bug where it would mess up a milestone's init.mapphone_umts.rc file if V6 ran twice... /me n00b :o

Added - Another 1,050 lines of code :eek:

The file is V6_SuperCharger_for_Android-update9_beta_6.2.2.un.zip

It has 2 OOM Sticks... so... Come Get Some!

Everything you need for bulletproofing apps is there: One Shot scripts (make a script manager widget and/or put on a schedule) and the init.d boot script which gets added to if you select yes after you bulletproof an app.
[Motorola Droid and Milestone General] Mungulz:
HOW DOES THIS WORK??

I swear you have made this software install another RAM module in the phone, or put some creepy voodoo hex on the phone. Unbelievable how well this works. Thanks for your hard work.
[Motorola Droid and Milestone General] zeppelinrox:
heh... I like magic tricks ;)

I find bulletproofing the dialer via the SuperCharger works very good :D
[Motorola Droid and Milestone General] darnok3:
How I can bulletproofing the dialer?... can you give a step by step guide? please
[Motorola Droid and Milestone General] zeppelinrox:
echo "-17" > /proc/`pgrep phone`/oom_adj

renice -20 `pgrep phone`

Replace phone with a unique segment of an app you want to bulletproof.

It's more fun with the V6 SuperCharger script though... you can load a few of them on boot as well as create one-shot scripts...
[Motorola Droid and Milestone General] rlafleur:
Keep Dialer in Memory?

I use third-party dialers like Go Contacts EX, Angel Dialer, etc. since Android dialer doesn't have T9 capabilities. However, the dialers take some time to come up, and I'd like to use this solution to keep them in memory. I noticed that Android lists the process as android.process.acore instead of the application package name. Does this prevent me from using 97oom script? I presume adding android.process.acore to the init script is a bad idea ...
[Motorola Droid and Milestone General] zeppelinrox:
in my previous post, replace the word phone with a segment of the process name that you want to bulletproof.

If it's in android.process.acore it should still be okay, as long as its the right one... but in a boot script it probably wouldnt work.
[Motorola Droid and Milestone General] evilj:
Persistent bulletproof apps/ bulletproof service

I may be wrong, but the bulletproof apps script only runs once at boot, then calls /data/97BulletproofApps.sh, so it seems you get two shots at bulletproofing an app.

The problem, as I see it is that if your app isn't running at boot or in a few minutes after boot, it won't get bulletproofed.

If you want the script to stay persistent so that your chosen apps get bulletproofed whenever you decide to launch them, you can do something like:

---------------

#!/system/bin/sh

while true; do

for i in com.waze com.myrt.andrevocadjuster com.google.android.apps.maps com.android.music com.mixzing.basic mobi.mgeek.TunnyBrowser com.android.browser ;

do

j=`pidof $i`

echo "-17" > /proc/$j/oom_adj

renice -10 $j

done

sleep 60

done

-------------

On the "for i in" line just place a space-separated list of the processes you want to bulletproof.

I've used a nice value of -10, as I've always understood from my Unix days that it's good to let the system processes exist at a lower nice level than user processes (so that swap, I/O and other system processes get priority and keep the system running smoothly). I may be wrong.

The only problem would arise if android decided to kill the 97oom shell process. Having looked into this, you could instead move 97oom into /system/xbin (or another location if you prefer) and add these lines to your /init.rc

----------

# bulletproof as a service by evilj, with thanks to zeppelinrox for bulletproof and SuperCharger

service bulletproof /system/xbin/97oom

user root

critical

# bulletproof end

----------

The "critical" line makes the android system restart the service if it gets killed.

However, I noticed that 97oom is running at an oom level of -17 anyway, so it's unlikely to get killed unless you do it yourself, so maybe it's a case of overkill (pun intended!)

Hope this helps. Please give me a thanks if it does.

J
[Motorola Droid and Milestone General] zeppelinrox:
Cool... a nested For loop inside an infinite While loop.

It just so happens I was reading up a bit on it yesterday when I was rewriting the Cust-OOMizer - it now uses 6 infinite while loops (break on valid input) instead of that crazy if/then/else decision ladder lol

Have you looked at the loopy smoothness script?

I can't say for sure, but this just may be give similar results but with a much simplified "mode of attack."

I'm also looking to use crond for bulletproofing apps and doing the engine flush :)
[Motorola Droid and Milestone General] evilj:
Thanks - I've not written any shell code for years, so I was pleased that it worked :)

Yes, of course! crond is the obvious choice - good thinking. You'd just need a line in /etc/crontab like this:

* * * * * /data/97BulletproofApps.sh

to run the bulletproof script every minute, or:

*/2 * * * * /data/97BulletproofApps.sh

to run the script every 2 minutes.

I don't have an /etc/crontab on my handset, though. I guess the only thing to do is try it and see what happens!

J
[Motorola Droid and Milestone General] zeppelinrox:
Yeah I only just yesterday started looking into it.

I'm kinda surpised at how easy it can be to schedule stuff lol

Just need to be sure the user's busybox has the crond applet :p
[Motorola Droid and Milestone General] Moon Shadow - NM:
Dude, I just checked. BB 1.19.2 has crond. I just did:

# busybox crond -h

and it came back with:

crond: invalid option -- h
BusyBox v1.19.2-Stericson (2011-09-29 00:04:21 CDT) multi-call binary.

Usage: crond -fbS -l N -d N -L LOGFILE -c DIR

-f Foreground
-b Background (default)
-S Log to syslog (default)
-l Set log level. 0 is the most verbose, default 8
-d Set log level, log to stderr
-L Log to file
-c Working dir

I was trying crontab, and that didn't work... Damn, I've gotta now learn crond. Crontab is so much easier, at least with vi...

Ciao!
[Motorola Droid and Milestone General] zeppelinrox:
Cool... stericson's does have it after all.

If this keeps up, I won't have to do anything but copy/paste code from this thread LOL
[Motorola Droid and Milestone General] Moon Shadow - NM:
Hmmm.... As an old school Linux SysAdmin, I think I might be able to dig up some of my old coding tricks... Naw, that would piss off way too many people... :p
[Motorola Droid and Milestone General] evilj:
I also have crontab:

<CODE>

# busybox crontab -h

crontab: invalid option -- 'h'

BusyBox v1.19.0.git.adrynalyne (2010-12-21 22:03:30 MST) multi-call binary.

Usage: crontab [-c DIR] [-u USER] [-ler]|[FILE]

-c	Crontab directory

-u	User

-l	List crontab

-e	Edit crontab

-r	Delete crontab

FILE	Replace crontab by FILE ('-': stdin)

# crontab -e

crontab: unknown uid 0

</CODE>

This is just the busybox that comes with Topogigi's O2X ROM, but I don't think it likes running itself in an adb shell?
[Motorola Droid and Milestone General] zeppelinrox:
Geez I gotta read up and see what the difference is between crond and crontab... I thought one used the other or something....
[Motorola Droid and Milestone General] kirbygonzalo:
Can i ask a favor?

my friend have also same my mobile MT15i, but when I try to use the V6 trough GScript, it say touch the screen to open key. but when i touch its not coming out the keys...

what would be the problem? any help?

thanks
[Motorola Droid and Milestone General] t-pip:
I'm sure that someone has already thought of this, but thought I'd post anyway.

I have the V6 OOM 1 Shot scripts set up to run at an interval of 15 minutes in Script Manager. This seems to keep the apps I want running.
[Motorola Droid and Milestone General] zeppelinrox:
Funny how what was impossible when I created this thread suddenly has many options...

I was looking to find another way to run scripts on boot and found that init.local.rc is found on all devices with froyo and above.

After finding how to make it work I realized that evelj had already spelled most of it out in post 88 :o

http://xdaforums.com/showpost.php?p=18642115&postcount=88

He said init.rc but that gets overwritten on boot which is why I didn't think of that post at first.

Also, the while loop isn't necessary.

Just sleep for a bit and Android will run it again after 5 seconds.

I know because I got it working in init.local.rc ;)

The test script wrote the time to a file on each run.

Without any sleep command, Android ran it every 5 seconds :D

I also had to add another command to make it run.... hehe... stay tuned
[Motorola Droid and Milestone General] t-pip:
Sounds interesting
[Motorola Droid and Milestone General] MACHEK:
Messaging

Sorry if I sound like an idiot here, but from reading all of these posts, it has not made it any easier to keep messaging running, as the link suggests. It to me appears that a lot of people have tried many different things but I cant find a straight answer on what to do just to get messaging to work.

I dont understand how to make a script, it says to use Notepad++ but where do you find that because I cant find it in the market.

On the first page it says " Make a copy of 10overclock", I dont have this. And also if I use Notepad from my pc and try to make a script and put the file into init.d, it just wont let me paste it or copy it over. (using file manager) I'm lost as to what else I can do. And I dont think Im running cm7, I am running prime xl3d rom.

All I need is a step by step if possible on how to make messaging stay open so I get my texts. Sorry if I sound frustrated but its weeks now of pissed off people because I cant answer texts that I never got. :confused:
[Motorola Droid and Milestone General] zeppelinrox:
Did you try with bulletproof app option in the supercharger script?
[Motorola Droid and Milestone General] MACHEK:
I have options 1-17 in the script, 1 is superchager and launcher, 2-10 are different minfree settings, 11 is oom grouping fixes and hard to kill, and 12 is oom and bullitproof (which I do, but i never see an option to change apps too), 13 is unkernelizer, 14 unsupercharge, 15 is use with terminal emulater, and 16 is reboot, 17 exit. So Am i missing something or is there a way to find the option your talking about?
[Motorola Droid and Milestone General] zeppelinrox:
Ah... well get the latest version... link is in the sig...

The update will have revamp the bulletproof apps aspect but you'll get the idea :)
[Motorola Droid and Milestone General] MACHEK:
AHHH, i see. So can I just download it to my SD card and run it from there? I assume I dont need to unsupercharge or anything right?

edit: Nevermind, its the link on the bottom of your sig and i just read all the stuff. Thanks
[Motorola Droid and Milestone General] zeppelinrox:
I hope it works for you.

And yes, It would be better to unsupercharger first as the updated version may not clean up a file here or there and the oom grouping values are a little different too

You dont need to reboot inbetween though... unsupercharge with update 8 and run the new one right away.
[Motorola Droid and Milestone General] MACHEK:
Still isnt working, messaging goes to priority 8 and gets killed. I dont know what else to do. Using a HTC incredible if that helps.
[Motorola Droid and Milestone General] minduka:
Tried changing the oom values using gscript, but it lasts less than a minute
[Motorola Droid and Milestone General] zeppelinrox:
It took me awhile but I think I finally got it perfected.

I'm using it as BOTH a service and an infinite while loop and it will load a list of apps from a separate file and run that list of apps automatically at boot.

If the service works it gets turned off just before the script gets inside the while loop so the overhead is virtually nil :D

A big problem I had was to get it to work without having the user to configure the boot script to run.

BUT having an init.d bootscript run an infinite while loop cause all kinds of problems.

My milestone CM7 would still boot (THE "Chuck Norris of phones" LOL) BUT init.d scripts that are supposed to run after it DON'T run.

But I found a little magic potion so as to have the init.d script keep running while still allowing for the boot process to continue.

No script manager having to load it or run it on a shedule or anything.

And of course, stock roms without init.d support may still have it working flawlessly if they have a viable *rc file that can successfully run the service.
[Motorola Droid and Milestone General] 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]
[Motorola Droid and Milestone General] 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?
[Motorola Droid and Milestone General] zeppelinrox:
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.

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 :D
[Motorola Droid and Milestone General] 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?
[Motorola Droid and Milestone General] zeppelinrox:
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
[Motorola Droid and Milestone General] drunkboi:
I'm using gscript. Do I just need to do the setup once or how do I use properly? Thanks!
[Motorola Droid and Milestone General] neverlost7:
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?
[Motorola Droid and Milestone General] zeppelinrox:
Yeah script manager can load both on startup

sms app.. it depends on which app your using for sms :p
[Motorola Droid and Milestone General] 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?
[Motorola Droid and Milestone General] kizsleg:
Does a script that reloads every minute cost much power?
[Motorola Droid and Milestone General] Jarmezrocks:
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:o I have no idea what I am going on about nm:rolleyes: I'm just rambling **** again
[Motorola Droid and Milestone General] anamul.quader:
Pls someone help me to bulletproof my sms app :(...after i choose option 17.it tells to give a unique name.like opera for opera browser... What do i typ there..pls helppppp
[Motorola Droid and Milestone General] ioo7:
Type in the first couples letters of that app, like com.what ever if that's what it stars with, the script will look for it and ask for your confirmation. Option 17 will list all your background and running apps. Scroll up and look for that process and type the fist 6 letters of it, hope that helps.
[Motorola Droid and Milestone General] anamul.quader:
Umm.the app that i want to bulletproof is "MESSAGE" and..its .. Com.sonyericsson.conversation ...k? So i choose option 17.and it list running apps n all.but message isnt there..what do i do?
[Motorola Droid and Milestone General] zeppelinrox:
the latestest script allows you to add non-running apps to the hitlist so just put conversation

If the bulletproof apps script is running, the message app will automatically get bulletproofed whenever you run it
[Motorola Droid and Milestone General] anamul.quader:
if i choose a aggressive launcher 1000hp...and then use bulletproof..will it work??i mean will the sms thing work??

and ya after typing `conversations` it tells..it couldnt find it..n ask me if it should add it? i answered as yes...now will it work???thnx
[Motorola Droid and Milestone General] zeppelinrox:
Should be good to go as long as long as *97BulletProof_Apps runs on boot...

You check with V6 script after reboot under the menu to see if it's running
[Motorola Droid and Milestone General] anamul.quader:
Hm..m nt getting anything at all..i will tell u what i did

1.run latest script with root.choosed 1000hp aggressive..option 9

2.super clean and reboot

3.again run script.n choose option 17 (bulletproof app hitormiss)

It shows some apps listing..then ask me to enter a unique name eg.opera for opera browser...there i type CONVERSATION and it tells.its not there and ask me if it should add it..n i answer yes bla bla.its added..ok now tell me what do i do?? N pls tell me properly:p m so not good at it.so if you could tell me step by step..it will be a real help..thnx :)
[Motorola Droid and Milestone General] ioo7:
Open the app you want, then hit home and run script, option 17, it should show up now. Try and see, hope that helps
[Motorola Droid and Milestone General] anamul.quader:
Doesn't shw:(...anything else':(
[Motorola Droid and Milestone General] anamul.quader:
Hello?? Any help for bulletproofing sms?;(
[Motorola Droid and Milestone General] zeppelinrox:
It's not that complicated.

Read prior help given and script output.

If you still can't figure it out, you're SOL.
[Motorola Droid and Milestone General] anamul.quader:
Umm..i downloaded an app which solved my problem:s ''watchdog" i added the apps that i need running all the time like "message" "what's app" to the whitelist..and now i get all notification xD
[Motorola Droid and Milestone General] zeppelinrox:
LOL... that doesn't do anything...

"whitelist" apps are simply ignored LOL

Enjoy the placebo hehehehehehe
[Motorola Droid and Milestone General] kkyoiori2001:
Hi zeppelinrox,

How to set this app （Record my call） to be -17 on oom?

I tried this on GScript but didn't work.

Or can I set it in the V6 supercharger?

Thanks :)
[Motorola Droid and Milestone General] BlackMagicNights:
Hey Zep.

Ive been trying to bulletproof swype but there's another application for swype update withthe same name. So when I type in the process name for swype, it tellme there's more than one process and to try again. Im trying to use the options to look for the PPID or something else to lock swype. But I can't seem to type the right thing. I want to use swype over a regular keyboard, every time I open a text I have to wait till the swype keyboard loads up. Any help would be appreciated.
[Motorola Droid and Milestone General] zeppelinrox:
Both of you use be sure to use the latest RC9 - with script manager and not gscript
[Motorola Droid and Milestone General] iamareebjamal:
Well I tried every method you told for securing Opera Mobile

But each and every one failed

Please help me
[Motorola Droid and Milestone General] maluga:
I know that's old and should be solved but related to Record my call:

I think there is some incompatibility with it and "Fix emissions", at least in my phone.

Not 100% sure yet.

SuperCharger is great btw.