yashsingh1/xdaforums huggingface dataset:
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Increase ext4 commit interval

This script increases the ext4 commit interval to 20 seconds (Default: 5) - by delaying journal writes longer, it can help performance, but lengthens the window during which a crash will cause unwritten data to be lost.

Credit goes to gokhanmoral of SiyahKernel for this one

Safety category: SHOULD BE OK

#!/sbin/sh
log "Increasing ext4 commit interval to 20 seconds
for k in $(/sbin/busybox mount | /sbin/busybox grep ext4 | /sbin/busybox cut -d " " -f3)
do
sync
/sbin/busybox mount -o remount,commit=20 $k
done
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Filesystem cache settings

This one will be an external link. There are choices - battery-optimized or performance-optimized.

http://www.android-devs.com/?p=31

Safety category: SAFE
[AT&T Samsung Galaxy S II SGH-I777] ktoonsez:
Excellent write up, thanks for sharing. Just a note, I think you typoed post #4 from post #2 (the code part).

Ken
[AT&T Samsung Galaxy S II SGH-I777] jake:
Thank you soo much for this script, Entropy!

ran it and noticed within moments ....

guys in the forum just a heads up ... in case you hadn't thought of it ... for ease of managing these scripts, you can download rom toolbox pro and enter a script (i think they're here for us to copy straight in to Terminal() + save new scripts etc etc. very convenient
[AT&T Samsung Galaxy S II SGH-I777] vladm7:
I'm surprised this is not off by default in Android. noatime is one of the first things recommended to turn off on file-operation-busy unix servers...
[AT&T Samsung Galaxy S II SGH-I777] jake:
*redundancy edit*
[AT&T Samsung Galaxy S II SGH-I777] vladm7:
the code above changes governor... is this a typo?

---------- Post added at 10:56 PM ---------- Previous post was at 10:47 PM ----------

I wonder if anyone has confirmed real-life benefit of this? I mean it's a phone on (essentially) SSD drive with relatively little disk IO (especially on write) right?. It's not like we run Oracle on spindles where postponing commit longer may present kernel a chance to optimize/re-order IO operations with disks for better performance (but unsafer)....
[AT&T Samsung Galaxy S II SGH-I777] jake:
Surprising :confused: :rolleyes:
[AT&T Samsung Galaxy S II SGH-I777] rdannar:
You can use terminal but.pretty sure They are for scripts in system/etc/init.d

You can use script manager if.your kernel does not support init.d
[AT&T Samsung Galaxy S II SGH-I777] jake:
Installed this script verbatim, swapped bfq with the code noop (after a bit of reading up on these commands (within "Scheduler=bfq)) ~ and was unable to sucessfully run the script. Was wondering what else i should try to set scheduler to noop

*edit*

seperate mod, same useful init.d script thread oirigin

Also ~ after getting adb working i started attempting to tackle the sysctl.conf but after all a few hours of reading i have a couple of questions before i proceed to create this file / adb push it to my phone.

these are the only qs i have:

- Possible to create a file using windows? I assume possible, next q is how to create a *.conf file on a windows PC (at this hour i am not thinking outside of the box lol)

- once i create the sysctl.conf file, if i understand the process properly, i will simply add the codei chose into the file and then adb push the file to my phone which leads to couple sub questions (trying to learn - haters make like bee with no stinger): Should I simply cut / paste snipets of this code in whatever order ?

have it on my mind to complete this mod including new file - dev help is greatly appreciated.
[AT&T Samsung Galaxy S II SGH-I777] vladm7:
well, yeah: i777 is my first Android.

Disabling atime is a widely used (safe) tuning in unix-servers world to increase performance of operations with the file system.

So, yes, I find it odd that Sammy didn't have that off by default in their ROMs.

Or am I missing the point of irony?
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
I'll fix it tonight, that one's a copypasta error

I haven't poked at that one much. It depends partly on if the phone will enter deep sleep with uncommitted data. It may only be good for benchmark epeen

As to scripts in /system/etc/init.d not running:

They must be executable (chmod 755 is recommended)

They must not have a .sh extension - for some reason run-parts won't run them if they do (annoying...)

If created in Windows there might be line-ending issues (CR vs CR/LF)
[AT&T Samsung Galaxy S II SGH-I777] vladm7:
a couple of small scripts to remount in RW/RO

I know, this is not directly related to kernel params tuning, but I think not worth a new thread.

Since I often mess in terminal, and need to remount /system in RW mode, I wrote those two small scripts to save some extra typing.

Remounts given file system in RW, /system by default. Save as

/system/xbin/rw

and then chmod +rx /system/xbin/rw:

#!/sbin/sh

disk=/system

if [ -n "$1" ]; then
if [ $(busybox grep -c $1 /proc/mounts) -gt 0 ]; then
disk="$1"
else
echo "Can't find '$1' mount"
exit
fi
fi

echo "Remounting '$disk' in Read-Write access mode"

busybox mount -o rw,remount $disk

Save as

/system/xbin/ro

. Remounts given file system in RO, /system by default:

#!/sbin/sh

disk=/system

if [ -n "$1" ]; then
if [ $(busybox grep -c $1 /proc/mounts) -gt 0 ]; then
disk="$1"
else
echo "Can't find '$1' mount"
exit
fi
fi

echo "Remounting '$disk' in Read-Only access mode"
busybox mount -o ro,remount $disk
[AT&T Samsung Galaxy S II SGH-I777] LamboDroid19:
Entropy,

Can you attach these scripts please.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
I've attached those which I'm using right now. Read the updated first post for some details.

I will NOT be attaching the fsync disable script - due to its potential negative side effects the barriers are intentionally higher as far as installation.
[AT&T Samsung Galaxy S II SGH-I777] garyd9:
I'm not sure this was an oversight as much as not really needed. The one mount this would have the greatest impact with (/data) is already mounted with noatime by default. The /system mount is read-only, so access times are not updated there. /cache is also mounted with noatime by default, as are both vfat filesystems (/mnt/sdcard and /mnt/sdcard/external_sd)

I don't THINK tmpfs or proc virtual filesystems record atimes (and if they do, those systems aren't backed by physical media, so there's no real impact.)

Adding the flag wouldn't likely break anything, but why fix something that isn't broken?

Take care

Gary
[AT&T Samsung Galaxy S II SGH-I777] vladm7:
good points/findings.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Thanks for the useful findings - this means I clearly need to do some poking. I could've sworn noatime was not the default for /data but I could be wrong. It shouldn't matter for the sdcard as that's FAT and it just doesn't have atime... I'll have time to mess with it Thursday.
[AT&T Samsung Galaxy S II SGH-I777] SeanHacker:
@entropy

is there anyway to make you an init.d script??? would probably make it run like an SGS3. lol.
[AT&T Samsung Galaxy S II SGH-I777] Cozmo1:
Good stuff, Entropy. Thank you :)
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
You wouldn't want that... Your phone would take forever to wake up, and it would always be finishing everything late.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Hmm... I wouldn't expect this as menu scrolling shouldn't be file I/O dependent unless it's loading icons as you scroll (pretty stupid IMO and I'm fairly certain it doesn't behave this way.)
[AT&T Samsung Galaxy S II SGH-I777] othermark:
Good call. As we discovered at $WORK on our embedded project scheduler defaults continue to change (sometimes dramatically) even between minor 2.6.X releases.
[AT&T Samsung Galaxy S II SGH-I777] jake:
Actually Vlad, it was a joke friend

sent via ICScrewed sans Entropy's DD
[AT&T Samsung Galaxy S II SGH-I777] eep2378:
Can we use Root explorer to simply copy/paste these scripts in system/etc/init.d, then reboot?
[AT&T Samsung Galaxy S II SGH-I777] beerbaronstatic:
Yea but make sure you set the permissions before rebooting
[AT&T Samsung Galaxy S II SGH-I777] eep2378:
Set permissions same as the other init scripts in that folder?
[AT&T Samsung Galaxy S II SGH-I777] beerbaronstatic:
Yea, that's what i do
[AT&T Samsung Galaxy S II SGH-I777] eep2378:
Thanks. How can i check to see if the script "took"? These are text files and none of the other scripts are, do i need to rename them or leave them as is?
[AT&T Samsung Galaxy S II SGH-I777] beerbaronstatic:
They should be text files with no extension. as for if it's working it depends what you did,i know for noatime you can check in adb(don't recall the command) to see how your partitions are mounted
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
You need to rename them - I state this in the first post. It's because XDA does not allow attachments without extensions.

Perms for each script need to be 755 - rwx/rx/rx
[AT&T Samsung Galaxy S II SGH-I777] eep2378:
Thanks i had gone back to the op and saw that. Regarding permissions, I'm using root explorer(not to familiar with adb) and I'm seeing three rows with corresponding boxes. There is read,write, and execute along the top and owner, group, others along the left column.

There is also special permissions at the bottom. After looking at the other init scripts they don't all have the same permissions checked. Which ones should be checked?
[AT&T Samsung Galaxy S II SGH-I777] beerbaronstatic:
i believe generally people go 644, which would be

x x

X

X

Read is worth 4 points, write is 2, execute is 1. So 644 is read/write for owner, read for group and others
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
644 is for non-executable files - for example everything in /system/app and /system/framework should be 644.

That's readable and writable by user, read-only by group/all.

755 adds "executable" to the above for all categories, and is what scripts should be. That's why I had rwx/rx/rx after 755 in my last post
[AT&T Samsung Galaxy S II SGH-I777] beerbaronstatic:
Whoops sorry, was going off memory since I'm on my phone, couldn't recall what it usually is.on cm is actually 750 by default it seems
[AT&T Samsung Galaxy S II SGH-I777] eep2378:
So should write be checked for group and others? I have executable for all categories.
[AT&T Samsung Galaxy S II SGH-I777] beerbaronstatic:
This is how unix/linux permissions work

R W X

4 2 1

-----------

X X X this is 7

X X this is 5

X X this is 5

So that's what your checks should look like in root explorer
[AT&T Samsung Galaxy S II SGH-I777] eep2378:
So execute on group and others should be unchecked? What about special permissions?
[AT&T Samsung Galaxy S II SGH-I777] beerbaronstatic:
check all 3 on first row

read and execute on second and third, leave everything else alone
[AT&T Samsung Galaxy S II SGH-I777] akira02rex:
For those that have no idea what init.d is used for:

http://www.ghacks.net/2009/04/04/get-to-know-linux-the-etcinitd-directory/

This serves as a nice explanation.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Sorry for the slow response:

The zipalign stuff should be beneficial - although most ROMs are zipaligned to begin with so it may just slow boot time! It may be better to just rerun the zipalign script occasionally if you added your own stuff to /system/app

Apps in /data (that came from the Market) SHOULD be zipaligned to begin with

I'd need to look at the other scripts later.

Edit: The sdcard readahead script can be beneficial - although my kernel already bumps up that value to begin with, just not that high. What the "best" value is - that depends on workload and such.

98tweaks is basically the noatime script, plus some tweaks to journal barrier settings - I need to look at this in more detail, as this (like per-file fsync disable) could trade off data integrity for performance

resolv.conf is a workaround for broken busybox installs (there are a lot of these, including, admittedly, my own at this point) - DNS does not work in any busybox tool if busybox is not linked against the Android bionic library. Many busybox builds are not.

The sysctl.conf could provide significant improvements in some workloads - but could hurt others - for stuff like that there is no right answer!
[AT&T Samsung Galaxy S II SGH-I777] Bethrezen1453:
What happens if i have 2 different scripts for cpu?

Let`s say script 1 has max cpu mhz value of 1200 and script 2 has max cpu mhz value of 1400mhz.

Which one will be effective?
[AT&T Samsung Galaxy S II SGH-I777] beerbaronstatic:
The one that runs last
[AT&T Samsung Galaxy S II SGH-I777] Bethrezen1453:
How you can configure which script will run first or last?
[AT&T Samsung Galaxy S II SGH-I777] Simba501:
Set one to "sleep" for a period of time and leave the other alone.

Like so:

sleep 15

This sets the script to execute after 15 seconds. Put it on a line by itself (separated with empty lines) after the "#!/sbin/sh" and before the contents of the script.
[AT&T Samsung Galaxy S II SGH-I777] rav4kar:
Init.d scripts run in the order they are named, e.g. If you have scripts named S2,S1 and A5, the order in which they are executed is A5,S1 and S2.

Sent from my SAMSUNG-SGH-I777
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Of course the question is WHY one has two different scripts doing the same thing...
[AT&T Samsung Galaxy S II SGH-I777] Bethrezen1453:
I'm noob to all this stuff and there is a high possibility that i will do something like this unintentionally :D
[AT&T Samsung Galaxy S II SGH-I777] desiromeo719:
Entropy have these scripts been incorporated into your kernel? Because i just check my /etc/init.d/ folder and see them there but dont remember putting them there...I was gonna implement them anyway...just wondering...
[AT&T Samsung Galaxy S II SGH-I777] tdamocles:
script won't work

I'm trying to add the following script in in init.d so I can OC at a lower level but it will not work. Is something wrong with it? It works in siyah's.

#!/system/bin/sh

echo "1544 1504 1200 1000 800 500 200 100" > /sys/devices/system/cpu/cpu0/cpufreq/freq_table

echo 200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

echo 1200000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq

echo "1400 1350 1300 1200 1100 1000 975 975" > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table

echo disabled > /sys/devices/system/cpu/cpu0/cpufreq/busfreq_static
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
No, I make a specific point of keeping my kernel "clean" - At this point it should NEVER automatically make any changes to /system

Please keep discussion of SiyahKernel-specific features in the SiyahKernel thread.

On another note unrelated to your post - the same goes for any "multi-feature" scripts - Any given script should only touch one aspect of kernel tunables, allowing users to "pick and choose" what they want to touch.
[AT&T Samsung Galaxy S II SGH-I777] tdamocles:
This is related to your kernel. I would like to use the Entropy but at the same time lower the high 1600mhz oc to more like 1544mhz (where my phone is stable.). I'm asking why the script doesn't work with the entropy kernel. Is the script syntax correct? .... Doesn't your kernel allow oc change by script?

Sent from my i777.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
That script is SiyahKernel-specific.
[AT&T Samsung Galaxy S II SGH-I777] tdamocles:
That explains it than..... Thank you.

Sent from my i777.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
GPU Underclock/Undervolt

This one requires either SiyahKernel or Daily Driver/Fecality later than 3/4/2012-B

(Clock-only will work on much older DD/FK releases.)

This underclocks/undervolts the GPU to save power.

Safety category: POTENTIAL STABILITY ISSUES

#!/sbin/sh
log "Downclocking/undervolting GPU"
echo "100 200" > /sys/devices/virtual/misc/gpu_clock_control/gpu_control
echo "900000 1000000" > /sys/devices/virtual/misc/gpu_voltage_control/gpu_control

You can change the clock and voltage settings to your liking - of course it could make you unstable.

As given, the script sets the clock steps to 100 and 200 MHz (Defaults are 160 and 267), and voltage to 900/1000 mV (defaults are 1000/1100).

SiyahKernel supports additional GPU clock/voltage control capabilities not yet covered here - 3 clock/voltage steps with adjustable thresholds. However I believe its interface is backwards-compatible with the old interface for 2-step mode.
[AT&T Samsung Galaxy S II SGH-I777] stone_ship:
Thanks Entropy, I'm going to try this with your latest kernel. Interested to see if it will save battery.

Question: is there a preferred way to be able to monitor the GPU similar to CPU Spy? A cursory Market search doesn't seem promising.
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
None I am aware of. BTW, next DD release will have Mali 3-step support, allowing stuff like this:

http://xdaforums.com/showpost.php?p=21770371&postcount=17581

It will also have support for Xan's new ExTweaks app, meaning those items can be configured without scripts.
[AT&T Samsung Galaxy S II SGH-I777] stone_ship:
Looking forward to it! Been following along in your kernel thread. I'll be sure to delete this when I try that out.
[AT&T Samsung Galaxy S II SGH-I777] Vipxpert:
Hey bro ! I can't download it ! :(
[LG Revolution] joemagistro:
hello ... i have a thunderbolt and im very familiar with that...... however my younger brother just got a revolution which was rooted from the previous user.... im sure he doesnt get the updates from verizon anymore sooo i was wondering from where hes at now, whats the easiest way to get GB???? i was looking at the gingervolt rom, but can that be installed over froyo?? any help would be appreciated... thanks guys..
[LG Revolution] Beamer9408:
Don't install over froyo it will bootloop
[LG Revolution] indyred99:
Go to the development section and there is alot in there. I would link ya but on the phone. Just don't flash a gingerbread ROM over Froyo.

GINGERVOLTED!
[LG Revolution] joemagistro:
Can anyone directly help me? i would really appreciate it.... i got the .tot file.. but im having trouble with the lgnpst program... looks like i have all the files, but i cant bring my phone up in that program... aghhh
[LG Revolution] jamRwoo:
I'll be on IRC for awhile. Most likely other people online as well...we'll have you gingerbreaded in no time. Info is in my sig.
[LG Revolution] joemagistro:
i think i figured it out.... that program found the found... now i gotta install that .tot file... unfortunately it wont let me do it because i have less then 25% battery... soo im charging it right now...... BTW it doesnt matter that im rooted already??? im just assuming once the update goes through ill have to root it again before getting the gingervolt rom??
[LG Revolution] joemagistro:
found the phone*
[LG Revolution] Haro912:
Exactly

10char
[Samsung Captivate Glide] CarpeNoctem:
Finally, the Captivate Glide is successfully rooted.

Credit:

lambgx02 who provided the Carrier IQ free kernel (by Rogers) and the insecure kernel and the Rogers rooted ROM!!!

ardatdat who provided the rooted ROM and the overclocked kernel

samsfirware.com that provided the firmware without which nothing would have been possible

myself, crazy tester who bricked his device

Very easy steps:

If you are on Rogers, no need to flash the kernel, it is already CarrierIQ free
​

Download Odin 1.85

Download the CarrierIQ FREE kernel (zip file) or the overClocked version of it.

Download the rooted ROM (AT&T based ROM)

or the Rogers rooted based rom (Unzip with WinRAR not 7zip)

Unzip the file and keep the .tar, that the file you are going to push to your device

Put your phone in Download Mode:

Turn off the phone

Press volume UP and keeping the button pressed, press the power button

a screen should ask you if you wanna continue - press volume up to confirm

Launch Odin

in PDA, select the first kernel downloaded (tar file you just unzipped)

DON'T SELECTor UNSELECT ANYTHING ELSE

Press the start button

Wait for your phone to reboot

This kernel will remove any traces of CarrierIQ, and you are now free from AT&T Spyware

IF AND ONLY IF this flashing fails, try the exact same steps with the insecure kernel

Reboot your device into download mode again (steps above)

Flash the rooted rom

Go to the market and make sure you have the latest version of superuser

go to superuser, check you have "su" updated

You're now rooted!

For any other questions, watch this first PLEASE:

[YOUTUBE]JmvCpR45LKA[/YOUTUBE]​
[Samsung Captivate Glide] b-eock:
There is already a thread for this... reporting for locking.
[Samsung Captivate Glide] CarpeNoctem:
The other thread was about trying to find root access, this is hopefully a thread on the procedure to have it in your phone
[Samsung Captivate Glide] boog:
I don't think it needs locked, they need their own subforum. We can put up with them here till they get it, they need a space to develop, too.

And congrats on getting root into the kernel rom!
[Samsung Captivate Glide] clockwork58:
Is this msg normal after I start? I also get a big red box at the top right which reads FAIL.

<ID:0/005> File analysis..

<ID:0/005> SetupConnection..

<ID:0/005> Initialzation..

<ID:0/005> Get PIT for mapping..

<ID:0/005> Firmware update start..

<ID:0/005> SGH-I927RUXKJ5_STOCK_ROOTED.tar

<ID:0/005> NAND Write Start!!

<ID:0/005>

<ID:0/005> Complete(Write) operation failed.

<OSM> All threads completed. (succeed 0 / failed 1)
[Samsung Captivate Glide] IlluminatedOne:
Nope, you should get PASS in green color if successfully flashed. Try to open odin as administrator (right click, run as administrator) and make sure your device was detected properly by windows & Odin while it is in DL mode.
[Samsung Captivate Glide] CarpeNoctem:
Sorry my guide was not complete, the kernel is not rooted, it is a CarrierIQ free kernel but the rom is rooted.

As soon as we have the kernel rooted, I will post it here.
[Samsung Captivate Glide] b-eock:
I know that they need their space, I already told others to leave it alone, I was just trying to keep it from being cluttered. I am sorry guys good luck!!!
[Samsung Captivate Glide] clockwork58:
I still get the same error and now my phone won't even boot.

It says to use Kies to recover but even that won't recognize the device even though windows does pick up the drivers.

I can get to either the Kies screen asking to restore a bad image or the Custom rom screen and that's it.

HELP Pls.
[Samsung Captivate Glide] lambgx02:
Hey, wait a minute.. I provided the rooted rom.. :D

But in all honesty, that's the easy part. Those nagging Samsung, the testers risking their devices, and of course, the OP who finally found the stock firmware images deserve the credit. Not to mention sammobile.com / samfirmware.com.
[Samsung Captivate Glide] CarpeNoctem:
Do you have rogers or ATT ?
[Samsung Captivate Glide] CarpeNoctem:
The rooted rom here is not yours but the one from ardatdat

But does not really matter, you both did a great job!!
[Samsung Captivate Glide] clockwork58:
I'm on Rogers. I'm using the lambgx02's Tar file.

I also just got my phone to recover following the other thread

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

about going into 3e recovery mode and doing a reboot and it started fine.

I think the first time I tried, I didn't have kies installed with all the proper drivers.

Should I give it another go?

Update: Tried again, same Fail error. Maybe I'll try using my computer at work instead of my older home laptop.

Recovered again using 3e.
[Samsung Captivate Glide] CarpeNoctem:
Let us know I tried twice to make sure everything was ok and it is.

if you are on Rogers you dont need to flash the kernel it is already CarrierIQ free!
[Samsung Captivate Glide] lambgx02:
Oh, I'm sorry ardatdat and Carpe! I didn't even notice!

Must have been a close race! :p
[Samsung Captivate Glide] CarpeNoctem:
I promise you no race. Just happy to be rooted and have my device back to life thanks to you ;)
[Samsung Captivate Glide] Kyuta Syuko:
Maybe tonight I'll see what I can do with the kernel linked in the OP.

Note I do not own a Glide so I won't be able to test.