yashsingh1/xdaforums huggingface dataset:
[Android Software/Hacking General [Developers Only]] pikachu01:
Why is your Perceptible more important than your Visible. That makes no sense whatsoever. That means, you're prioritizing killing your Browser first then only your Music Player?

Also, putting a constant of 8 for HIDDEN_APP_MIN_ADJ means that if apps would change that value, it would mismatch with the constant you're putting out there?

This looks so wrong I don't even know where to begin.

Re-read my quote again. I didn't mention it as weaker or stronger. I'm saying that every app will have the same LRU as the launcher.

That code itself determines the importance value of the app that is evaluated. It's the one that makes the app "Supercharged" as you may say. If you leave it un-edited, you would not make it "Supercharged". Please re-read this sentence in order to not counter yourself in the future. I.e. your two choices:

- Put HOME_APP_ADJ to 1 in the importance:

-- You practically screw up the LRU

- Don't put HOME_APP_ADJ to 1 in the importance:

-- You practically don't have a Supercharged launcher

This is correct.

The AMS service is acting on the memory of the ADJ rather than the ADJ. Remember again that the ADJ is not passed to the app? The two things evaluating the ADJs are the oomAdjToImportance and the memory Trimmings.

The app evaluates the thresholds and lowMemory.
[Android Software/Hacking General [Developers Only]] zeppelinrox:
The 8 is

Service B

apps.

Have you ever looked to see what gets put into the visible app grouping? Sure as hell ain't the browser.

Ya, thanks for confirming :p

The launcher stays SuperCharged - no matter what.

I just know from experience.

And the launcher stays supercharged while not mixing up the if/else conditions.
[Android Software/Hacking General [Developers Only]] kaluoshi:
hey zep a question. on CM (10) i have to supercharge Trebuchet as launcher? i mean it is recognized as com.android.launcher? thanks :thumbup:
[Android Software/Hacking General [Developers Only]] orbital_71:
Merry xmas zepp and all those here.:beer:
[Android Software/Hacking General [Developers Only]] kbraiza:
If you don't have any other launcher then yes, com.android.launcher would be Trebuchet and is the one that would be supercharged.

Xperia Pro mk16 @ Tapatalk
[Android Software/Hacking General [Developers Only]] duckied:
Does this scrip change my read ahead speed for my SD card?
[Android Software/Hacking General [Developers Only]] zeppelinrox:
That works just fine.

An app gets the proper ADJ that I want, and when not used it evenually gets a less important ADJ.

I can change whatever ADJ that I want.

That's already a fact.

Yeah, turns out there's some edits that aren't needed due to the fact that AMS.smali isn't calling ADJs fro PL.smali.[/quote]

I never admitted that it's broken.

I've only admitted that it could use refining and that's it.[/quote]

It still don't matter what you're talking about then because all the apps get the ADJs that I want them to.

But you'd know this if you had any experience.

I said "But the more you're talking, the less sense you're making."

And that's a fact.

Solely due to the fact that you're now grasping at straws half the time and filling in the blanks of your knowledge with hypothesis and guesses.

You said that supercharing breaks a launchers "keep home in memory" feature.

And that's false.

Do you now deny that you said that?

Reality is, that you haven't actually proven that anything breaks

And this is how the class looks in jd-gui

if ((localProcessRecord4.nonStoppingAdj < 6) || (localProcessRecord4.nonStoppingAdj == 8) || (localProcessRecord4.killedBackground))
break label197;
i2++;

I don't see HOME_APP_ADJ or SERVICE_B_ADJ.

It's using ADJs 6 and 8 respectively.

Whatever app is associated with those ADJs if of no consequence.

It behaves as it should.

I can leave that alone

Because the reality is this:

if (app.nonStoppingAdj >= [COLOR=Red][B]6[/B][/COLOR]
&& app.nonStoppingAdj != [COLOR=Red][B]8[/B][/COLOR]
&& !app.killedBackground) {
numTrimming++;

Because ADJs don't get passed to AMS.smali, remember?

The smali works with 0x1, 0x2, 0x3, 0x4 etc etc.

One by one.

It doesn't call ADJs from PL.smali.

So...

REMEMBER THAT.

Anything you say about how things are broken are hypothesis.

SHOW ME THE LOGCATS.

Prove it.

You can make into a tattoo.

Won't matter.

If something don't work, I fix it.

It's not complicated.

What's complicated is how can proclaim to be an expert on how things are broken without even actually experiencing it.

THAT IS HYPOTHESIS.

Yeah, "on paper" it should be like this blah blah...

Try the real world.

Don't mean you know what SuperCharging feels like.

Until then, you're totally unqualified to even speak about it.

That's reality.

Glad you agree.

When supercharged, swiftkey, sms push (ADJ 3 visiblie apps) get killed before the music player (ADJ 2 - perceptible app)

Too bad you contradicted you're previous statement about that.

You thought the browser got lumped in as a visible app? really? lol

That's wrong.

Remember how ADJs don't get passed to AMS.smali?

That means that simply by leaving it alone, it works exactly how it should.

You're wrong again. You couldn't be more wrong.

So the FACT is, your opinion on everything is based on a misconception.

The launcher never gets killed before the foreground app.

lulz... thanks for the laugh.

I really don't know how anybody can talk with confidence on a topic when they have no clue about it.
[Android Software/Hacking General [Developers Only]] nednednerb:
I want everyone to get along this christmas and change the world for the better by open source collaboration.

So

-On ICS, 4.0.4. Sense.

-100% supercharged according to latest script. Ran first 768+ HP setting. (Less aggressive option.)

-ran Ultimatic Tools RC5 on Mac to supercharge launcher by smali patcher, including MMM..

No errors anywhere. Usual smooth experience on phone for most part.

Also using KAKernelizer.

One question: Is it normal in others' multi-tasking experience to lose browser pages for a reload when returning to browser sometimes (after less than 3-4 minutes even)?

Specifically, I find sometimes the page or app has to reload/re-draw after returning to it pretty promptly, and I am losing keyboard input or entered form information.

As a wordy social media user, this is awkward, after editing for a while sometimes and needing another snippet or a link to copy and paste from another app.

Is my best bet bullet-proofing the keyboard and browsers or perhaps running script differently?

If anyone has a thought to offer, thank you.
[Android Software/Hacking General [Developers Only]] zeppelinrox:
Browser refreshing is quite a common complaint about android in general.

Did you try lowering minfrees?

I assume you applied the sense mod, yes?
[Android Software/Hacking General [Developers Only]] Metallimaniac:
Got one question. Need to run this script every time i reboot my phone?

I mean, once i turn off my phone or reboot, do i need to re-run the script to be functioning well?
[Android Software/Hacking General [Developers Only]] clay101eve:
No. Do NOT set the script at boot.

Clay

Team Pirate

Sent from my Galaxy SHOswagger2
[Android Software/Hacking General [Developers Only]] jarjar124:
hmm..im getting the questionable integrity error when i try to supercharge...i am supposed to uninstall that cr-rap? what am i supposed to uninstall?
[Android Software/Hacking General [Developers Only]] Metallimaniac:
So, once ive done this one time, no need to run the script again?
[Android Software/Hacking General [Developers Only]] Kitschki:
Technically Yes.

But if theres a new version or you want to change smth, you will run it again.
[Android Software/Hacking General [Developers Only]] Appumon123:
Works great! Browser didn't reload even after keeping it in background while I played a game.

BTW, as someone here pointed out, if you are facing force closes of rooted apps, just delete their .odex files in data/app and reinstall them! :)
[Android Software/Hacking General [Developers Only]] zeppelinrox:
Read the help file a couple of times.

Thanks. Glad it works good for you :)

========================================

FYI Tonight or tomorrow expect a big ass Ultimatic update :D

It's pretty much done but gonna test some more

And I'm pretty sure that notification bar thing that a few users reported awhile ago will be resolved ;)

edit... ah screw it... you guys can test too :p

So here's a sneak peak which may remain unchanged... Merry Christmas lol

Just remove the .zip extension :cool:

Important

: Patch an original services.jar - one that's never been patched before.
[Android Software/Hacking General [Developers Only]] warhead1978:
Is there any change to get the services.jar working without any PC or Laptop ? Because after every Update from the ROM we had to do this step ... ??

Or will this .exe do it forever ? And how to get the original one back if any problem appears?

I like this scripts there is a big performance boost in handling the phone (only after many steps after and after it take 3-4 seconds to react )

MfG
[Android Software/Hacking General [Developers Only]] zeppelinrox:
It has 100% offline mode and can use the services.jar from your roms update zip.

Doing it all on the phone isnt possible anyway.
[Android Software/Hacking General [Developers Only]] orbital_71:
Yeah...boxing day gift. :thumbup::p
[Android Software/Hacking General [Developers Only]] zeppelinrox:
Yeah :)

Have you tested it yet?
[Android Software/Hacking General [Developers Only]] orbital_71:
I just saw this morning. Will try it out. When i back from work. :thumbup:
[Android Software/Hacking General [Developers Only]] ernestnwanu:
Testing the latest Ultimate Jar Power Tools. So far it's been great.
[Android Software/Hacking General [Developers Only]] Metallimaniac:
Ok, i've read a couple of times. Im using a custom rom, but how do I know if the script is running?
[Android Software/Hacking General [Developers Only]] UpInTheAir:
Check the logs in data/
[Android Software/Hacking General [Developers Only]] Computoncio:
Patched my services.jar six hours ago and till now all good.

I notice that ProcessList.smali didn't change, i choose Die-Hard launcher, it's normal?

Oom grouping and multitasking working like a charm.

Phone: Samsung Galaxy SII - GT-I9100

Kernel: Dorimanx kernel v7.29 JB MALI

1st ROM : RR JB v3.1.2 (Online)

2nd ROM : Empty

MODEM: Modem+RIL - XXLPS

ROOT APP: SuperSu v0.99

MODS: My mods, ASUL v4.2 and JusTunBeam v6.1.3
[Android Software/Hacking General [Developers Only]] Metallimaniac:
Checked two files, one of them "ran_supercharger.log" says 99SuperCharger Detected A Bootlooped... Aborting ... :Applied Settings from / hw_config.sh.

The time showed the times that ive rebooted the phone.

It is normal?
[Android Software/Hacking General [Developers Only]] zeppelinrox:
If it's 100% SuperCharged, don't worry about it.

And don't ask "how do I know if it's 100% SuperCharged?" - because that's a stupid question to ask.

At the top of PL.smali, what's the value of back up apps?

You should start with unmodified files with backup app being a 0x4 originally
[Android Software/Hacking General [Developers Only]] zeppelinrox:
http://xdaforums.com/showthread.php?p=35890905#post35890905

If you ever had that notification bar issue where it wasn't updating after a reboot until you pulled it down once, see if it's fixed.

Remember to patch previously unmodded files for best results!

Click THANKS if you like HOLIDAYS!
[Android Software/Hacking General [Developers Only]] zeppelinrox:
Guess what.

Most of the changes are removal of edits.

Fixed the logic in the buildOomTag if else stuff and added a couple of edits.

That's about it.

edit: Of course, that lowMem condition too - reverted to use ADJ 6 again.

Because I'm letting AMS.smali treat ADJ 6 or ADJ 1 or ADJ 3 or ADJ 4 or ADJ 5 or ADJ 7 the way it did before.

Because AMS.smali doesn't actually look at server adj or home adj or visible app adj etc...

So, were you looking for this?

Notice how I had directed snake oil to the launcher claims?

And I don't fancy being accused of misleading anybody unjustly just because the accuser has lapses in memory.

Fact is, nobody here, EVER, has accused me of being a liar or of misleading - because everybody knows that I don't do that.

Until now, of course.
[Android Software/Hacking General [Developers Only]] zeppelinrox:
But don't get me wrong - I do appreciate constructive criticism.

It's not right that I get slagged for accepting it :p

Yeah you're right.

Before reading your post I actually had just added this to the changelog:
[Android Software/Hacking General [Developers Only]] pikachu01:
What about the memoryTrimmings and LRU? You're missing the most important thing about the Android LMK.

I had the notion that everything about it is snake oil, including the fact that it isn't tweaking the Android LMK. I was talking about the script more than the app though here:

http://xdaforums.com/showpost.php?p=15663847&postcount=546
[Android Software/Hacking General [Developers Only]] zeppelinrox:
Well I really don't think it's needed since ActivityManagerServices.smali deals with the actual numbers that it wants to use and doesn't specify that it's home's adj or server's adj.

Because in the smali, if it want's to trim ADJ 6, it will still trim ADJ 6.

It just won't be trimming the launcher after patching and will instead trim server apps - because I gave server apps ADJ 6.

It's working better too as there was an intermittent issue for some users with the notification bar in that after a reboot, they would sometimes have to pull the bar down to have the bar updated. After that it was fine.

I wasn't sure what was the cause because some users reported that it would happen even when not supercharged so it could have been a bug with JB.

Anyway, feedback is that the issue has disappeared for at least one user :p
[Android Software/Hacking General [Developers Only]] Topogigi:
Just for balancing the load between the two poles, I had that issue immediately after applying the last v6 release. So, the path to perfection is still not complete.

(notice that I am a supercharger fan, and I think that this sort of discussion, even if it could appear harsh to someone, could lead to a better overall functionality of the script, not mentioning the fact that reading it is very instructive for everyone)

---------- Post added at 10:24 AM ---------- Previous post was at 09:32 AM ----------

Sorry for late reply, but I had to investigate a bit before claiming for sure that something was broken at android level or into your script (hint, hint for pikachu :) ) and I discovered that the kernel I was using had memory management broken somewhere. Switching the kernel (now I have flashed the original CM 10.1 one) led to a more realistic and correct behaviour but this kernel has not still implemented the oom_score_adj translation, so I cannot answer to you question properly.

I can though try to answer to some of your questions with my own knowledge of the problem:

1) You will not find any oom_score_adj parameter in /sys/module/lowmemorykiller/parameters. You will find only the usual adj parameter containing the new (different) values.

2) Translation from the old oom_adj values and the new oom_score_adj is made on the fly by the kernel (remember? I linked the relevant code in my previous posts) so there is no need to store the new values elsewhere

3) How the translation is performed? There's no need of more examples/tests. The algorhythm is in the code I linked. You will find the key there.

I hope this would be enough for you to begin working on it, if it's not, I will re-flash the old (misbehaving) kernel, but it could be misleading since memory management is severely broken there, as I mentioned before....
[Android Software/Hacking General [Developers Only]] pikachu01:
You forgot the LRU calculation. :/

And you should be determining memoryTrimming levels above the HOME_APP_ADJ (being the original 6) rather than calculating anything above services.
[Android Software/Hacking General [Developers Only]] poyensa:
It took me some time to clean a bit the last pages of this thread. Whilst a minor amount of off-topic posting may be overlooked, the limit here was over-passed.

TO ALL: Please do not include personal attacks in your posts. I am going to monitor this thread closely. Please note a few basic rules in XDA (see my sign) that we all have to read, understand, follow and adhere.

1. Please use search function before posting, most of the answers are already posted.

2. Please post in the correct section. We have general section and Q&A section, so please post your questions / request / off topic /etc there.

3. Please do not spam the board, help developers keeping the thread clean and dev focused instead. As a large forum we don't need unnecessary clutter, we all can help to get the information easy accessible to every member (as example we have a thanks button to press instead of post thanks in the thread).

4. Please respect other members. Development is done in free time without obligations to provide fixes, new release, etc. You can post feedback which always should include an extensive description of the procedures, apps installed, personal configuration and most important LOGCAT file -no, my phone is not working is not considered feedback. Other way please stay away at least help keeping the thread clean.

5. Please follow the rules, all members are expected to read and adhere to the XDA rules. Posts against the XDA forum rules will be deleted without previous notice and offender will be sanctioned accordingly.

Thanks for reading this, have good day
[Android Software/Hacking General [Developers Only]] zeppelinrox:
Ah but howabout the latest Ultimatic RC6 that I released yesterday?

http://xdaforums.com/showthread.php?t=1914159

That makes the newest changes to services.jar

Yeah I did some research on it.

The old -17 is now -1000

0 is still 0

Going with your cat example:

This is with the following adj parameters:

#> echo 0,3,6,10,12,15 >/sys/module/lowmemorykiller/parameters/adj

gives:

#> cat adj

0,176,352,588,705,1000

these are the corresponding oom_score_adjs

The conversion makes sense and adds up properly for the most part.

1 now equals 58.8235 (1000/17)

3 becomes 176.47

6 becomes 352.94

10 become 588.23

12 becomes 705.88

The 15 doesn't work tho... the math spits out 882.35 but it's the highest value so that's probably why it automatically gets the 1000 (the new highest value)

And some kernels do away with the adj file altogether.

So if the file exists and there is a number greater than 15, I can do a calculation

ie. x * 1000/17

In bash, when calculations are done, the decimals get truncated so 176.47 automatically gets the right value = 176 ;)

$ echo $((3*1000/17))
176

And for the highest value I can just do a straight up 15 = 1000 swap :)

services was a 5 so it was already below 6 before.

The only items effected:

previous app is now below 6 (I made it a 5)

backup app is now above 6 (was 4, I made it 7)

Which is fine, previous app is better protected which is what I want by changing it to a lower ADJ.
[Android Software/Hacking General [Developers Only]] erto90:
i read what this mod can do and is fantastic! but i have to understand better

i got an SIII running ARHD ( 4.1.2) with perseus kernel

My goal is only to lock the launcher ( the touchcrap) in memory and i think to be in the right thread

someone can help me doing only this?

ps: can't use superchrger etc because of osme script in rom/kernel will interfere too much i think
[Android Software/Hacking General [Developers Only]] SgtSausage21:
Bad news :(

I installed KAK this morning, gave me a boot loop, messed up the v6 minfrees and of all things the status bar bug was back had to crash and reload :confused:

It seemed to just be a one time thing though, after re running v6 no more loops, and the status bar is fine. Weird eh?

However I seem to now only be able to get 75 percent super charge as the minfrees values don't stick.

It is worth mentioning I'm using the KAK you posted awhile back with the adj fix for roms that don't have them. Not sure if you ever posted that version officially on the download page or not.
[Android Software/Hacking General [Developers Only]] zeppelinrox:
nah I have a backlog of updates to post :p

Where do you lose 25% exactly?

Sounds like you had a one time anomality tho since it only happened once and is back to being ok

Use Ultimatic Jar Patcher RC6

But use the V6 SuperCharger to set minfrees and OOM groupings or else the lowmemorykiller will be super aggressive and kill apps too much
[Android Software/Hacking General [Developers Only]] Topogigi:
I guess that the correct answer is in the code I linked in one of my previous posts:

{
if (oom_adj == OOM_ADJUST_MAX)
return OOM_SCORE_ADJ_MAX;
else
return (oom_adj * OOM_SCORE_ADJ_MAX) / -OOM_DISABLE;
}

where -OOM_DISABLE has conventionally the value of -17 you mentioned and OOM_SCORE_ADJ_MAX has conventionally the value of +1000.

That way, if the oom_adj considered is equal to the highest of the array, it is automagically raised to +1000 and in all the other cases the calculation is performed.
[Android Software/Hacking General [Developers Only]] zeppelinrox:
heh... yeah previous googling had only given me that the new max is -1000 and the new min is -1000 so I just figured out the math based on that and your cat output LOL

But yeah, the formulas correspond pefectly :)

I had only found this page today which fills in all the blanks nicely

1 #ifndef _UAPI__INCLUDE_LINUX_OOM_H
2 #define _UAPI__INCLUDE_LINUX_OOM_H
3
4 /*
5 * /proc/<pid>/oom_score_adj set to OOM_SCORE_ADJ_MIN disables oom killing for
6 * pid.
7 */
8 #define OOM_SCORE_ADJ_MIN (-1000)
9 #define OOM_SCORE_ADJ_MAX 1000
10
11 /*
12 * /proc/<pid>/oom_adj set to -17 protects from the oom killer for legacy
13 * purposes.
14 */
15 #define OOM_DISABLE (-17)
16 /* inclusive */
17 #define OOM_ADJUST_MIN (-16)
18 #define OOM_ADJUST_MAX 15
19
20 #endif /* _UAPI__INCLUDE_LINUX_OOM_H */
21

So... to plug that info into the previous code:

{
if (oom_adj == [COLOR=Red][B]15[/B][/COLOR])
return [COLOR=Red][B]1000[/B][/COLOR];
else
return (oom_adj * [COLOR=Red][B]1000[/B][/COLOR]) / -[COLOR=Red][B]-17[/B][/COLOR];
}

Of course, that --17 means +17.

I hadn't realized before that my idea to just make the 15 = 1000 swap and calculating the others is exactly what that code does :p

Because when I first looked at it in passing, I assumed it was deciding on whether to do any conversion at all.
[Android Software/Hacking General [Developers Only]] SgtSausage21:
That's the thing though, every time i boot i lose the 25%. The boot loop and the status bar were a one time thing, but now minfrees are no sticking of boot, so i lose the 25% and the help file opens every time i check with V6.

I'm trying to run 99supercharger on boot with Script manager will see if that fixes. Will report back the results.

Edit: That seemed to do it, maybe the problem was there before and i never noticed? Doesn't sound like something KAK could mess with but i wouldn't know. For whatever reason i need to run 99supercharger on boot manually, possibly a CM10 issue though.
[Android Software/Hacking General [Developers Only]] zeppelinrox:
Sounds like something else is applying minfrees. Another script or app?

In the init.d folder, is there anything else listed after *99SuperCharger when sorted alphabetically?

It does run because you still get the 25% for OOM grouping fixes (the adj file)

You can also check the /data/Ran* files to confirm
[Android Software/Hacking General [Developers Only]] SgtSausage21:
Well here is a screen shot if my init.d folder.

Either way it works for me whatever i guess.