yashsingh1/xdaforums huggingface dataset:
[Galaxy Ace S5830 Android Development] g_BonE:
I switched to a I9001 Galaxy S Plus, thus no more updates.

About

If You are like me - a fan of those monolithic install-and-forget scripts to optimize Your Ace at boot then this is for You.

As a base i took Slaid480's LagFreeV3 script and fixed some errors in it. Seeing that his script constantly overwrites earlier tweaks set up in itself i went on to consolidate it.

After that turned out succesful i combed through all the other scripts, snippets and tweaks floating around XDA (TurboBoostv8.5, BoostBuster, allinone Ram) and came up with my solution of a monolithic All-In-One script.

This here script contains all the useful tweaks for the Ace, was error checked, optimized and thoroughly tested on my personal Ace.

This is a continuation of the thread:

[SCRIPT] Slaid480's LagFree V3 script -fixed- -optimized-

http://xdaforums.com/showthread.php?t=1486930&page=11

Required

* Ace S5830

* Root

* CM7.x

* Busybox (should already be there if rooted)

* Kernel supporting NOOP scheduler and SmartA**V2 governor

Script was tested on:

zImage-Mod v1.1 and v1.2 Kernel

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

CM7.2 RC0 KANG by vo-1 deodexed with PDroid

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

Instructions

- Make a nandroid of Your phone (just in case).

- Flash zip using CWM recovery.

- Reboot.

- Success.

An optional error logging function can be enabled by creating an empty

file named lagfree_debug in Your /data/ folder. Doing so will allow the

script to create a logfile /data/lagfree_debug.log during execution on

boot. This might help for finding issues on other ROMs and Kernels.

The script now contains some logic so when it does not succesfully run

to its end it will disable itself on the next boot. This will fix the "stuck

on android" issue.

To remove the script alltogether just flash the LagFreeV3_Rerolled_

Uninstaller.zip via CWM.

Credits

* SLAID480

* GadgetCheck

* Juwe11

* Salah Abouabdillah

* Einherjar Development Team

* CRANIUM ROM

* zacharias.maladroit

* voku1987

* collin_ph@xda

* redmaner

* pikachu01

* fuss132

* LeonardLuangga

* Team Blockbuster

* tossan

* iandol

* _Roysten

* dragonnn

* XDA (for the help identifying the bugs)

* Everyone (i forgot but who put an effort into parts of this script)

Enjoy,

g_BonE
[Galaxy Ace S5830 Android Development] g_BonE:
Changelog

0.17b - first release in XDA Development subforum, replaces older version --- REMOVED DUE TO setprop ISSUE!!!

0.23b - second release, replaces older version: setprop slot fix and bootloop (stuck on android) fix implemented. Thanks to tossan, iandol, _Roysten and dragonnn for the detective work and help getting this fixed.
[Galaxy Ace S5830 Android Development] shatteringlass:
Now, thank you! And why is it that we need CM7? Isn't this supposed to run on stock roms (rooted of course, and with cf-root kernel)?
[Galaxy Ace S5830 Android Development] Doo:DAce:
WAIT so is this the combination of the given tweaks in OP or just fixed Lagfree? Kinda confusing O.O
[Galaxy Ace S5830 Android Development] itasoulas:
original lagfreev3 runs great on stock with all permissions checked. Is this for stock also?
[Galaxy Ace S5830 Android Development] iandol:
if you consider "runs great" to mean that it fails to run properly because it has more bugs than the Amazon Jungle and thus it can run "great" anywhere because it actually fails to run everywhere!!! :eek: ;)

lagfreev3 original is like homeopathy! :p
[Galaxy Ace S5830 Android Development] iAreBeRtii:
How do I install this over original lagfree?
[Galaxy Ace S5830 Android Development] invention:
Why do you want to install it over the original one? It was stated that it has too many bugs. Just delete the old one and flash this.
[Galaxy Ace S5830 Android Development] g_BonE:
actually no need to uninstall, the installer of my script removes the original lagfreev3, turboboost and other scripts from init.d

and no, no need to install anything else besides this one its ALL INCLUDED :)
[Galaxy Ace S5830 Android Development] Doo:DAce:
does this work on stock?
[Galaxy Ace S5830 Android Development] tomy2590:
so, just install this script, and we're done?
[Galaxy Ace S5830 Android Development] chevymeister:
Cool! Thanks gbone, you's a boss!
[Galaxy Ace S5830 Android Development] tomy2590:
flashing your script makes my phone stuck on boot. i have LeWa rom installed. :( also, lagfreev3 and turboboostv8 is installed..
[Galaxy Ace S5830 Android Development] tossan:
Wait awhile and see if the desktop loads. I guess it takes time to rebuild the caches.

@g_BonE

You sholdn't clean up the caches (especially the *.apk files) on every reboot (->Dalvik Optimization).

The user can do it manually in CWM. This is only necessary before installing a custom rom or after modding some system files.

Otherwise: Great clean up work done! Hope all the script lovers appreciate it. Here are the line counts as a rough comparision:

tossan@tux:~/Downloads/$ wc -l S9*
1130 S95Lagfree
305 S99_LFv3gB
1435 total

^^
[Galaxy Ace S5830 Android Development] g_BonE:
@Doo:DAce: I cant positively answer on the "working on stock" question as idont have a stock rom on my ace. i'd say it *should* if the rom has init.d support and the other requirements posted in the first post. anyone willing to give it a shot might do so using the debug feature and posting the logfile here so i can have a look.

@tossan: yes, i'll make the zipaligning a optional step, maybe using the same approach i took with the debug option (-soon-)

@tomy2590: and yes, first boot will take a while as zipaligning and database optimization takes a while. please be patient for a bit.
[Galaxy Ace S5830 Android Development] villemann:
Doesn't work on Ace-of-Spades V1 - stuck on Android for over 20 minutes.
[Galaxy Ace S5830 Android Development] dragonnn:
I have debug this script - don't know why but it's stuck on the setprop lines, removing it will repair this script. You can add on the begin of this script the command:

adbd &

And on the end:

killall adbd

Using this you can debug this script (via logcat) in real time and show on what he stops.
[Galaxy Ace S5830 Android Development] tossan:
I'm referring to this line at the end of the file, which will be executed on every phone reboot, making the dalvik cache unusable.

rm -f /data/dalvik-cache/*.apk

The zipaligning should be ok, because the code fragment only zipaligns new installed apks, if they're not already aligned.

~~
[Galaxy Ace S5830 Android Development] Doo:DAce:
Phone rebooted succesfully afyer flash :D themyhrom advanced
[Galaxy Ace S5830 Android Development] iAreBeRtii:
Awesome! Thanks! :D
[Galaxy Ace S5830 Android Development] Kasnar:
You may need to remove a script called geno from your phone before installing lagfree, I read that somewhere, I don't remember where, I haven't tried it because I feel lewa doesn't need this.

I get superb performance as it is, but you may wanna revert back to your nandroid and try that out :cool:

EDIT: after checking over geno, it only includes app2sd stuff, so I am not sure what could it affect but I guess it's worth a try.

EDIT2: I tried installing this script with and without geno, it made no difference, it gets stuck on the bootanimation, just revert system back and stick to setcpu and minfree settings. I may try setting noop and the rest of the mods lagfree introduce through some other way, but I really don't feel the need.
[Galaxy Ace S5830 Android Development] iAreBeRtii:
Just tried it and didn't work on iPhone cm7 Rom stuck at android logo..bummer u.u
[Galaxy Ace S5830 Android Development] tomy2590:
yeah, g_bone what rom are you using? my phone was stucked at boot after flashing your script, i waited for 10mins more but nothing is happening.
[Galaxy Ace S5830 Android Development] pyronia:
Hehehe...finally, good work g_bone! :D bye2 mr.placebo on original lagfree v3 :p

regards,

•ƒγяύs ργяσ™• eBuddy XMS pin: A24D43B9

[menulis dari xda app yg cilabi pakop]
[Galaxy Ace S5830 Android Development] mor_1228:
Is it working on ?

Ace of spades ?

http://xdaforums.com/showthread.php?t=1519820
[Galaxy Ace S5830 Android Development] Doo:DAce:
... read page 2 >.<
[Galaxy Ace S5830 Android Development] g_BonE:
@tomy2590: im using "CM7.2 RC0 KANG by vo-1 deodexed with PDroid" as stated in my first post.

@tossan: i was under the impression taht the dalvik-cache only contains *.dex files and thus any erroneous *.apk's get deleted. i can remove this easily tho.

@dragonn: i used the dalvik debug managing service tool from google to debug the the script during boot as it shows a live syslog. i've never seen it get stuck during setprop so far. strange indeed.
[Galaxy Ace S5830 Android Development] Ex Deus Xien:
stuck on android boot logo

using carbon sunday

reformat again =(
[Galaxy Ace S5830 Android Development] nabildanial:
doesn't working on cm7.2 vo-1 if placed on init.d folder.. works well if used with script manager.. doesn't feel any noticeable improvement, and sd card speed are much slower than before.. i think you should change the name, this should be your's, not slaid's..
[Galaxy Ace S5830 Android Development] consegregate:
Lewa rom here, it gets stuck at boot. Anyone else experienced this and actually waited and it boots?
[Galaxy Ace S5830 Android Development] adwaitk007:
stuck on "ANDROID"

Not even going to recovery!!

Any fix to uninstall??
[Galaxy Ace S5830 Android Development] M@zik:
stuck on Android logo :(

what the heck ??? :X

i wish i could give u -ve points for such.....

guys plz don't try this unless u wanna get ur phone dead at bootlogo ..
[Galaxy Ace S5830 Android Development] Jar3112:
What Rom were you using?
[Galaxy Ace S5830 Android Development] meetmadzky:
You should have known that from the moment you rooted your phone, the risk is already there.
[Galaxy Ace S5830 Android Development] _Roysten:
Patience is a virtue!
[Galaxy Ace S5830 Android Development] acceleratus:
Might be a good idea to remove the link for now and fix the script? Too many people having issues. Great work though!
[Galaxy Ace S5830 Android Development] iAreBeRtii:
Exactly what I was thinking.
[Galaxy Ace S5830 Android Development] Taracair:
I also stucked on 'ANDRIOD' screen, but I made a backup before flashing so it's not a problem for me.

I prefer to remove the link and repair the tweak.
[Galaxy Ace S5830 Android Development] g_BonE:
@all having problems stuck on android logo: no idea here why this should happen as the script is basically Slaid480's with necessary fixes so it doesnt error out during database optimization.

it runs on my phone with the kernel and rom i posted in the first post. i also have the a2sd script on my phone but i dont know if that changes anything. i'd really like to get feedback on where the "stuck on android logo" occurs so if anyone feels like it get me a log taken at boot using DDMS (dalvik debug manager service)

i suspect that there might be problems with the settings performed after the script errored out in it's original incarnation.

so far i can only say: try it and make a backup beforehand. i'm about reflashing with a newer release of vo-1 and pdroid soon and will install the script right after a fresh install so i can makeout any issues. bear with me on that.
[Galaxy Ace S5830 Android Development] itasoulas:
friend I did flash your script and got stuck on a bootloop too. Maybe the script works with certain kernel schedulers and governors? So far the best combinasion of scripts I had on my phone where turboboost+slaidV3+loopy smoothness tweak. There's probably something you miss on your mod.

I just feel sad for one thing... half of people here feel satisfied with certain scripts. The other half say those same scripts it's just a placebo effect. I'll delete all of my scripts cause I am tired of this ****! Again, gadgetcheck and slaid haven't spoke an official word about that debate on their scripts. The outcome is that the end user is confused.

To end my talk, I am not blaming anyone for anything, I am just expressing my thoughts on this matter! :)
[Galaxy Ace S5830 Android Development] tossan:
My bad. You're right.

/data/dalvik-cache # ls -l *|busybox wc -l
133
/data/dalvik-cache # ls -l *.dex|busybox wc -l
133
/data/dalvik-cache # ls -l *.apk|busybox wc -l
*.apk: No such file or directory
0

So basically on my ACE those lines don't have any use anyway. :D

@those_who_should_feel_spoken_to

Here is someone, who is trying hard to fix the scripts you're so loving with that many errors pre-implanted. A service none of the original editors/copycats has ever given to any of you. Instead to thank him, your best idea is to go on rampage?

How about doing something about the boot on stuck error to troubleshoot the problem yourself and give something back to the community? He even gave hints how to do it in the OP!

Since you've already applied the script and get stuck on boot, android filemanagers can't be at any help now. Here are the steps how you can enable the debug mode of the script afterwards.

A. Create /data/lagfree_debug.log

boot into CWM recovery

mount /data (->advanced menu)

adb shell (within cmd.exe or any linux terminal)

echo "This is a dummy file with the only purpose to trigger S99_LFv3gB into debug mode and can be also empty. Yup ... you can delete all the words between this two double quotes! ^^" >/data/lagfree_debug

reboot normally

post your resulting /data/lagfree_debug.log here (boot into CWM recovery and do: adb shell; cp /data/lagfree_debug.log /sdcard/lagfree_debug.log)

B. Watch the error log of the android system while being trapped in boot loop.

adb logcat (within cmd.exe or any linux terminal)

If you want to share this log, than just do something like adb logcat -d >acebootloop.logcat

C. Undo S99_LFv3gB

boot into CWM recovery

mount /system (->advanced menu)

adb shell (within cmd.exe or any linux terminal)

rm /system/etc/init.d/S99_LFv3gB

D. Curious about what the original S95Lagfree or any countless scripts out there is really doing to your beloved ACE? Your call:

boot into CWM recovery

mount /system AND /data (->advanced menu)

adb shell (within cmd.exe or any linux terminal)

sh -x /system/etc/init.d/S95Lagfree

watch closely at the happy dancing errors jumping around and laughing about your eyes about to pop off your head :p

Too hard for you to follow you're saying?

Than go figure it out yourself how hard it will be for you to apply fixes to an error prone script ... let alone the wish to try to build your own custom rom without any bugs.

Again: Please at least share something useful before ever begin to whine about something like kids do, whom the lollipop was taken away from. At an age of 14 and up you aren't a kid anymore, even if you don't happen to have a paypal account ... :D

~~
[Galaxy Ace S5830 Android Development] iandol:
tossan: brilliant! :D
[Galaxy Ace S5830 Android Development] markmu:
Hi guys,

my SGA stucked as well on Android, so I put it manually into the \init.d-folder and set the same permissions as the old script from slaid. The only thing I can say is, it is working on Infinity ROM.

KR markmu
[Galaxy Ace S5830 Android Development] M@zik:
excuse me dumbhead!

what r u talking about___________ rooting........ seriously??

what is being said in the previous thread is about this script not f--k--g rooting concept.

dumb-ss
[Galaxy Ace S5830 Android Development] CallMeVentus:
I see a rager

Herpderp Defy.
[Galaxy Ace S5830 Android Development] adriansantos:
Le wild troller appears.:p
[Galaxy Ace S5830 Android Development] CallMeVentus:
Couldn't withstand where this was going , I had to stop someone .

Herpderp Defy.
[Galaxy Ace S5830 Android Development] nicgoh:
Works on my stock rom.. 2.3.6 DXKT4.. good job! thx!
[Galaxy Ace S5830 Android Development] pablomoreno:
I installed this tweak on Roma Ace Of Spades (CM7.2-based) with kernel Blackhawk by Ketut Kumajaya but to restart the boot remained steadfast on Android written and I had to reinstall everything again. :(
[Galaxy Ace S5830 Android Development] _Roysten:
OK, so logcat works now. It gets stuck at:

I/LF_v3_gB( 996): Applying prop tweaks...

No errors

# build.prop tweaks
$L "Applying prop tweaks..."
setprop ring.delay 1000
setprop debug.sf.hw 1
setprop debug.performance.tuning 1
setprop video.accelerate.hw 1
setprop ro.telephony.call_ring.delay 1000
setprop ro.ril.disable.power.collapse 0
setprop ro.HOME_APP_ADJ 1
setprop ro.HOME_APP_MEM 2048
setprop pm.sleep_mode 1
#setprop video.accelerate.hw 1
#setprop dalvik.vm.startheapsize 72m
#setprop dalvik.vm.heapsize 72m
#setprop wifi.supplicant_scan_interval 60
#setprop windowsmgr.max_events_per_sec 55
#setprop windowsmgr.support_rotation_270 true

Commenting all of these lines makes it boot, so one is the culprit. Cheers!
[Galaxy Ace S5830 Android Development] iSxy:
To install this we have to first uninstall turboboost..or the lag freev2.5..if yes how?
[Galaxy Ace S5830 Android Development] tossan:
Nice detective work! And admit it: You did even have some fun to tinker with it. :D

I guess the culprit is the last setprop command which the script was trying to execute. It doesn't necessary have to be

+ setprop video.accelerate.hw 1

because it was the last command in the log, but the indication for it is high. ;)

Ketut mentioned it somewhere, that the built in properties system is limited to a amount of slots (->android property system). Because of the fact, that we have several different ROMs and I assume they do all set some properties on boot, this would explain why some ROM is able to fully boot or get stucked. I assume further the ones getting stucked do set some more properties before and this script is running right into this system overall limitation.

Note:

If you're just wondering why the original script does not pose any problem, then the high indication is, that not all setprop tweaks are applied, because they're scatttered throughout the monolithic script and the script does not succesfully ends at the last command, but rather error out some where in the middle. Want to make an experiment? Gather all the setprop command lines in the original script and put them at the beginning of that script and witness with your own eyes, if you get stuck at boot or not. ... :p

@g_BonE

You may now want to reconsider to remove the setprop tweaks from this script and burden the anger of the ignorant user on other script editors. ... :D

[x]
[Galaxy Ace S5830 Android Development] _Roysten:
You sir are absolutely right about the "android property system", in the CM7.2 rom by FAT you'll have to comment out at LEAST 6 setprop lines. Since you cannot know how many setprops lines are set by the rom, it would be best to leave the setprop tweaks out.
[Galaxy Ace S5830 Android Development] chevymeister:
Maybe this creates opportunity for g_bone to create a badass rom :)
[Galaxy Ace S5830 Android Development] iandol:
Well there are several smart things to do. If 247 really is the limit, then:

getprop | wc -l

Will allow a script to know if it has enough slots left so it can conditionally use setprop only if there are enough slots for it to do so

if [ $(getprop | wc -l) -lt 235 ]; then
#we got 12 slots to play with, use them wisely Luke!
setprop ...
fi

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

Another related cool tweak -- a recovery system. On first run, write an empty file. Then, check the file is empty (which means this is the first ever run, write a 0 to the file) or has a 1 written to it (we previously loaded successfully). If loading succeeds, at the end of the script, write 1 to the file, that means no errors. If the script fails, on reboot the script will encounter a 0, and will skip loading so no bootloop.
[Galaxy Ace S5830 Android Development] _Roysten:
I wouldn't flash it right now, it's better to wait for g_BonE to release a patched version.
[Galaxy Ace S5830 Android Development] Jar3112:
Well, you may try flashing this and then eventually switching to the new version, right? I tried it on cm 7 by v0 and was flashed correctly.

Sent from my Galaxy Ace on Ice Cream Sunday Final
[Galaxy Ace S5830 Android Development] tossan:
It is not safe, because we don't know which rom he is using or any other scripts, which will maybe interfere with the system properties limitation.

Nice idea indeed.

But I'm afraid, that there are more work needed to be done, to protect the system on boot against this kind of failure.

You have to edit all the initd scripts (current existing ones and the ones in the future which will populate the initd folder) containing setprop commands and safe guard them.

You can't to be sure that the rom cooker or the system itself may also does some more fancy stuff by setting NEW properties after all initd scripts has been executed. Under such a scenario, control would be for sure out of the hand of a script developer.

Btw, the recovery trick is a nice one to maybe safe guard all scripts against there missbehaviour of all kind (check there exit code or watch their wasteful usage of a limited resource like system properties) by wrapping all initd scripts into a master script (stored somewhere else), which will explicitly called one by one in alphabetical order (mimicking the busybox run-parts initd procedure).

Can I use it or do I have to ask your permission to do so?

Sorry for my rudeness: What license was it under again? ... ;) :D

[x]
[Galaxy Ace S5830 Android Development] Jar3112:
Anyway i successfully flashed this to IcSunday with Zlimage 1.4 kernel! So far works well, waiting for updates! ;)

Sent from my Galaxy Ace on Ice Cream Sunday Final
[Galaxy Ace S5830 Android Development] iandol:
tossan: one ring to rule them all! licence: all-ideas-should-be-free licence ;)

I think the advantage for g_BonE's script to have a recovery mechanism irrespective of what other crap is found in the ROM, is at least this script by itself will not cause an irrecoverable bootloop; until *you* write the one script to manage them all, that is the best we can hope for :p
[Galaxy Ace S5830 Android Development] tossan:
Nah ... me think it would be more enjoyable to either messing around directly with CM/AOSP 4.0.3 or 2.3.7 source. ... :D

Since there are so many ROMs currently raining down, I'll put my stock custom rom project on hold. It was a pain though to tinker around on the byte code level of implementing a modified quickpanel.

[x]
​
[Galaxy Ace S5830 Android Development] g_BonE:
@tossan and iandol: thanks for the detective work and finding the setprop issue.

i was beginning to blame the users installing this script on a rom that does not have the necessary Noop and BadA**v2 support. As i'm setting these two things in the script i thought the error lies in there because during boot the governor and schedulers cant be set correctly. Well...

I'll take down this version and repost a version that fixes the setprop issue either by completely removing those lines or implementing the ideas posted a few posts up ;)

Thanks again.
[Galaxy Ace S5830 Android Development] musf:
can I use this script on blackhawk kernel..?

I notice that the script set the max cpu freq to 800 MHz, but blackhawk only have 787 or 806 MHz option..
[Galaxy Ace S5830 Android Development] NiiSyth:
How to Download?

I'm Sorry if I look like a complete n00b but how to get this script?

I only see the link to the two roms the script was tried upon......
[Galaxy Ace S5830 Android Development] iandol:
g_BonE: tossan and _Roystan deserve all the credit on finding the setprop issue -- to them a :beer:

recovery mechanism is wholly my idea and I expect one shot of :whiskey: per install in royalties ;)

NiiSyth: link removed till the setprop fix is implemented
[Galaxy Ace S5830 Android Development] g_BonE:
v0.23b posted!

Thank You guys so much for helping me with this and investing time and enormous detective skills into bugfixing it. Also thanks for the good idea of selfdisabling the script if it didnt work.

Sweet :D
[Galaxy Ace S5830 Android Development] slaid480:
Man,Salah Abouabdillah Is Me

Salah Abouabdillah=Slaid480's Real Name