yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] wariat:
I love this ROM.. very fast, very stable.. and in Italian!!!!!! :D

bluetooth work on MT3G (htc magic 32b)..

one suggestion, in froyo parts is possible to add possibility to disable right rotation??
[G1 Android Development] BlackTigerX:
I already fixed BT for the G1 which will be included in RC3.

For the feature requests like Menu Unlock, Reboot Menu, Rotation - I am not a real coder, I know how to baksmali the needed files and where the needed code parts are but I don't know what lines to change.

If there is someone who has already worked on a decompiled android.policy.jar and likes to hint me into the right direction - please send me a private message! :)

Edit: Ahh stupid me, already did the correct code changes but always pushed the non changed files lol ....

Edit2: Managed to fix the menu key unlock bug and included reboot and recovery option in power menu - going to bed now.

Edit3: V1.3 Final in the first post :)
[G1 Android Development] mercenaryhmster:
hate to be the bearer of bad news, but bluetooth still doesn't work on my dream, on a fresh install of 1.3 final.
[G1 Android Development] BlackTigerX:
Hmm weird, a test release I sent to some people seems to work but not the final!? ... Okay so Bluetooth on G1 still not working sorry! :o
[G1 Android Development] sisterchick:
Nice!

Good job, sir! I too am a fan of HTCClay's SuperFly ROM. Thank you. I did have a question re: notification text colors. I left you a PM.
[G1 Android Development] MattDrumz:
Nice, I'll flash this as soon as I can.

I'm guessing that you don't need to wipe if you are coming from RC2?
[G1 Android Development] jbkg1:
Did it take a long time (30mins) for anyone's phone to boot after install?
[G1 Android Development] MattDrumz:
Mine only took 5-10mins.
[G1 Android Development] BlackTigerX:
Yes the first bootup will take some time, android checks all apk's since some checksums changed because of altered files.
[G1 Android Development] xjjjay:
No wipe upgrade made the phone slower. Sticking to 1.2... Pretty much no reasons to upgrade, bt still broken.
[G1 Android Development] BlackTigerX:
1.2 was based on CM which isn't compatible with 1.3 because of the change to the AOSP base. So a wipe is a must do anyway if upgrading!

And yes BT is still broken on the G1, working fine on the MT3G though.

Anyone with a G1 willing to test some builds? I don't have a G1 myself. Just pm me.
[G1 Android Development] Xeliom:
Hi !

it's a really stable and fast ROM, impressive.

But Gtalk is realllly slow for me. Does anyone else have this problem ?

Thank you :)
[G1 Android Development] R3N0V4D0:
this is the best rom i have ever used :)

please please please put this theme on it!!!

http://xdaforums.com/showthread.php?t=863915
[G1 Android Development] decoderone:
I had the bluetooth issue on another rom and i think i have the solution (thx for the tip @ezterry). G1 need another bluetooth firmware found in /system/etc/firmware/brf6300.bin if you replace this file out of this rom http://xdaforums.com/showthread.php?t=811620 it should be working fine. You'll also find an easy Installscript for this case in there, so it choose the right driver if it is a G1 or not.
[Motorola Milestone Android Development] kholk:
Hi all,

since I've said goodbye to my Milestone, in these days, prior to selling it, my good behavior said to me "okay, no customkernel, you can't help with RSA...so Milestone owners are ****ed...ouh, no, wait!"

...and then prior to selling it I've tested some things and I've found that sysctl is working!

Since sysctl is working and I'm on Linux from about 10 years, I've been played with our kernel in Milestone and tested some parameters.. and I've had a speedup in my daily operations: browse the net with Dolphin Browser HD, play some games, sync email, make calls, sms etc... and I've found that my Milestone is way more responsive and feels smoother!

Sysctls tested on the great CyanogenMod port by nadlabak.

So, well, here's the script. Feel free to execute it at boot (if you execute it at boot, your phone will boot slightly faster) and/or to integrate in your custom nandroid ROMs :)

#!/system/bin/sh
sysctl -p
#
#Disable normalized sleeper
#
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
#
# Memory management
#
echo 2048 > /proc/sys/kernel/msgmni
echo 64000 > /proc/sys/kernel/msgmax
echo 268435456 > /proc/sys/kernel/shmmax
echo "500 512000 64 2048" > /proc/sys/kernel/sem
sysctl -w net.core.wmem_max=524288
sysctl -w net.core.rmem_max=524288
sysctl -w net.ipv4.tcp_tw_recycle=1
sysctl -w net.ipv4.tcp_rmem='6144 87380 524288'
sysctl -w net.ipv4.tcp_wmem='6144 87380 524288'
sysctl -w kernel.sched_latency_ns=600000
sysctl -w kernel.sched_min_granularity_ns=400000
sysctl -w kernel.sched_wakeup_granularity_ns=400000

EDIT: UPDATE N.3

This script makes the Linux kernel to take a little more RAM, so I don't recommend to use it in HTC Sense builds, since Sense is already crashing because of heavy RAM usage, but with CM and LauncherPro, with a lot of progs open in background I've never went out of RAM!

NOTE: Make sure that you've got echo and sysctl in /system/xbin/ otherwise this won't have any effect!

Even if I'm returning to HTC I'm sad for my old Milestone, I like its shell so much...it's a really beautiful device!

Hoping for the best for u, Milestone users :)

-kholk
[Motorola Milestone Android Development] Al936:
Very interesting. Could you please advice what I need to do to execute the script at boot?
[Motorola Milestone Android Development] 89luca89:
ciao kholk :D

Want to know if you put a sysctl binary in xbin?

Cause your script suppose to have sysctl in xbin right?

Can you make a download of it? Or is a symlink from busybox?

Grazie per questa drittona per il pietrone :D

EDIT: okok resolved, had to --install busybox -s xD

NO PROBLEM now testing!! :D
[Motorola Milestone Android Development] kholk:
This script is supposing that you've got echo and sysctl in /system/xbin/

If you haven't got echo and sysctl in /system/xbin/ this script won't have any effect.
[Motorola Milestone Android Development] Braidonh:
And how would i go about obtaining those?
[Motorola Milestone Android Development] kholk:
Install busybox and with it you should have installed those.
[Motorola Milestone Android Development] xslntx:
I didn't think sysctl would work on this kernel. Since it does, here's some more optimizations that I know work for Eclair and earlier:

/system/xbin/sysctl -w kernel.sched_latency_ns=600000
/system/xbin/sysctl -w kernel.sched_min_granularity_ns=400000
/system/xbin/sysctl -w kernel.sched_features=24188

The default latencies were a little ridiculous. And the CFS features disabled here are pointless, even on desktops.

That said, thanks for pointing out that it works! Much appreciated. Best of luck with your HTC device.
[Motorola Milestone Android Development] kabaldan:
Very nice, thanks kholk!

Thanks xslntx!
[Motorola Milestone Android Development] kholk:
Script updated.

-- Absolute path not needed.

-- Added scheduler tuning for granularity latencies

-- Normalized sleeper disabled.
[Motorola Milestone Android Development] 89luca89:
Testing it with great results (in combination with xlsntx parameters)

graphic performance are improved, usage is clearly improved,

in opposition to that bench are lower, I mean, I donot understan:

In Quadrant, I have nearly 3\4 fps MORE than normal in EACH test (except for the planet one) -wich is nealrly the performance a droid2 has...- and have a result like 20\25 point lower...dunno...another dimostration that benchs aren't much reliable...
[Motorola Milestone Android Development] Try4Ce:
Sounds great!

So, I have Busybox installed. How do I actually activate the script file?

Just placing a file, for example "optimize" in system/xbin with the script content and thats it? Or do I have to do anything else to actually load the optimization from boot?
[Motorola Milestone Android Development] kalagas:
@89luca89

Can you add this modification in next update to your OpenRecovery with andrea???

As you have more knowledge, plsease make your test and put the best combination in next update to your OpenRecovery...
[Motorola Milestone Android Development] TheSSJ:
Just a question - can I use these commands also with the stock(rooted) ROM? I don't have CM6 and actually I'm pretty satisfied with the my stone. But I would like to have the performance a little bit more improved:)

Is this only for CM6 or what?
[Motorola Milestone Android Development] kalagas:
here is the answer from the previous page of thios thread:
[Motorola Milestone Android Development] -FuFu-:
thanks for the nice script ;)
[Motorola Milestone Android Development] he_stheone64:
fantastic job - works great on my CM6 MS.
[Motorola Milestone Android Development] kalagas:
Can somebody upload the neccesary files for make it work...

And some instractions please....

I suppose all have the "echo" file in system/xbin. So as i understand we need the "sysctl" file to put it in system/xbin and the propiate script...

So if everyone could upload these 2 it would be nice...

Thanks

Edit: Sorry "sysctl" file already excists in my /system/xbin....

So i have to create a script file without the .sh extention and put in in system/etc/init.d right?
[Motorola Milestone Android Development] Try4Ce:
Yeah, I'd like to know as well where to put the file... and with extension or without. I got the files needed in the mentioned folders.
[Motorola Milestone Android Development] xslntx:
I'd like to point out that the tweaks that have to deal with the network connection seem rather pointless for mobile devices. We simply don't have the bandwidth to necessitate giving such functions any more of our (limited) memory. It also appears to cause a sluggish startup.

Removing

sysctl -w net.core.wmem_max=524288
sysctl -w net.core.rmem_max=524288
sysctl -w net.ipv4.tcp_tw_recycle=1
sysctl -w net.ipv4.tcp_rmem='6144 87380 524288'
sysctl -w net.ipv4.tcp_wmem='6144 87380 524288'

actually yields noticeably snappier performance.
[Motorola Milestone Android Development] Karooluss:
Tutorial please :)
[Motorola Milestone Android Development] kholk:
@xslntx

Your granularity parameters aren't so much useful. What calculation have you done for saying that they're working better? :P

Anyway, maybe YOU don't need the network tweaks, but personally, in Italy with H3G (HSDPA) I can reach 7.2Mbps (Full Speed).

@89luca89

Try my new script, my granularity latencies are surely better :)
[Motorola Milestone Android Development] xslntx:
There aren't many "calculations" as to determine how such settings affect performance of the device. Raw data processing stays the same, as we're not changing the speed at which the CPU can process. It's all a matter of the user's experience. If you can calculate that, I'd surely be impressed.

The network tweaks have no real-world purpose. HSDPA networks here are roughly the same speed, and the loss of available memory negates any possible benefit that the increase in buffer size may provide. If you've got more than a 30 Mbps connection going to your phone, then maybe, just maybe, the increase in buffer size and slightly more sluggish startup would be worth it.

Lastly, this isn't a competition. I was making a valid point, there's no reason to get snobby.

The 'sched_min_granularity' option is the only one of the two "granularity" settings that will have any effect on the user experience of the operating system. The lower the latency defined here, the more the kernel will favor task preemption. In simple terms, the kernel will suspend any task that isn't immediately important when there's something going on in the foreground (say, the user is sliding open the app drawer). This diverts the processing power more-so towards the task at hand, rather than less important background tasks, such as syncing and instant messaging apps.
[Motorola Milestone Android Development] 89luca89:
yeah network tweaks works amazing here in italy :D

The tweaks works better with

kernel.sched_latency_ns=600000

kernel.sched_min_granularity_ns=400000

with your values, we have a loss of performance in managing 3d, and it feels much smoother with those values to be fair..

trying it from yesterday, and no problems, a very fast response (at the point I'm now testing without any overclock and is butterly smooth!! :D)

If you let me, I want to include it in my next release of Androidiani OpenRecovery :D

Just a little more testing, want to have the best possibilities :D
[Motorola Milestone Android Development] foreman31:
Aww c`mon you boys, come down off your high horses and hand out a few shekels to the plebians.

At least four posters have asked where to place the script (file?)

and how to name it. Let everyone test it not just the experts
[Motorola Milestone Android Development] Try4Ce:
Aye, impressive how they ignore our questions about a simple tutorial...

True skill ;-)
[Motorola Milestone Android Development] xslntx:
Lol. With a modded mot_boot_mode capable of executing scripts at boot, simply paste this script (as whatever.sh) into the init folder your phone is set up to use. Most commonly, it's /system/bin/boot_script, or something along those lines. It's easy to incorporate into openrecovery, so the foolproof method would be to wait until it's added to azhad's/89luca89's openrecovery mod.

You could also execute it manually via "sh whatever.sh" in shell, or execute the commands one by one in a shell.

Sorry if i'm not all that helpful, i'm ridiculously tired. Lol.
[Motorola Milestone Android Development] Try4Ce:
Allright, thats something!

So I just call it like "optimize.sh" and put it into boot_script of system/bin ...

Done... and done...

But to be honest, I dont really feel that much of a difference... maybe because im not running cyanogen at the moment?
[Motorola Milestone Android Development] kholk:
I've not intended it as a competition and sorry if I'm feeling to get snobby!

Anyway, your tweaks are working better, so.. good :D

And thanks ;)
[Motorola Milestone Android Development] Ph0z3:
now a total noob-tard question:

I'm not totally new to everything, but how do i go about making this file and activating it? (only new to scripts and modules)

I have:

-Root + Busybox 1.18.git

-TelusLite v4.1

-Overclocked 250/1100

Also how i remove it if i decide that i don't like it?

-Any help is appreciated!
[Motorola Milestone Android Development] Braidonh:
Copy and paste the code into notepad. Under save as file type, save as all files. Then call it like optimize.sh. put it in system/bin/boot_script. Use root explorer to execte the script. Done!
[Motorola Milestone Android Development] Ph0z3:
Do these go in the same file and location?

or is this added elsewhere?
[Motorola Milestone Android Development] Braidonh:
These can be put in the same location.
[Motorola Milestone Android Development] Ph0z3:
im confused.... do i make a new file in the same folder? or add it into the one i just made?

if i need a new one... what do i title it?
[Motorola Milestone Android Development] xslntx:
The updated script on the original post has those values already, you can disregard the ones I posted.
[Motorola Milestone Android Development] Ph0z3:
So my final end result should be:

do the last 3 need the /system/xbin/ extension as well?

or is this wrong? (because this is EXACTLY what i have installed)

also... what about /system/xbin/sysctl -w kernel.sched_features=24188
[Motorola Milestone Android Development] xslntx:
/system/xbin isn't necessary, but I kept it for uniformity. lol.

/system/xbin/sysctl -w kernel.sched_features=24188

should be kept. I completely forgot about that. You can simply add it to the bottom of what you've got in your script now.
[Motorola Milestone Android Development] Ph0z3:
right on.

thank you so much for all your help!
[Motorola Milestone Android Development] kholk:
The

sysctl -w kernel.sched_features=24189

sets some scheduler features, it's the same of

mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features

The only difference is that the second one is more compatible with other devices that don't allow to set kernel.sched_features, but on Milestone it's the same.

So that for clarification my script disables only NORMALIZED_SLEEPER.

However, xslntx has written kernel.sched_features=24188. But what does that mean?

24188 disables NEW_FAIR_SLEEPERS and NORMALIZED_SLEEPER. It's barely good, but disabling NEW_FAIR_SLEEPERS can cause loss of performance on some process management and IMHO it's better to leave it ENABLED because disabling it doesn't show so much performance (tests done).
[Motorola Milestone Android Development] haksam:
looks awesome, hopefully kabaldan implements this in the next cm 6 update ^^
[Motorola Milestone Android Development] kalagas:
androidiani and 89luca89 have added on their last Openrecovery 2.1
[Motorola Milestone Android Development] kabaldan:
It's in the repo already :)

http://github.com/nadlabak/android_.../froyo/proprietary/etc/init.d/11kernel_tuning

(and yes, I have to separate the proprietary, pre-built and custom stuff as soon as possible - it's on the first place of the repo to-do list at the bottom of this page: http://android.doshaska.net/cm6build )
[Motorola Milestone Android Development] kalagas:
In latest androidiani OpenRecovery v. 2.1 it has those lines:

mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
#
# Memory management
#
echo 2048 > /proc/sys/kernel/msgmni
echo 64000 > /proc/sys/kernel/msgmax
echo 268435456 > /proc/sys/kernel/shmmax
echo 500 512000 64 2048 > /proc/sys/kernel/sem
sysctl -w kernel.sched_latency_ns=600000
sysctl -w kernel.sched_min_granularity_ns=400000
sysctl -w kernel.sched_wakeup_granularity_ns=1000000
sysctl -w kernel.sched_features=24188

As i saw on the link you sent above, your code has these lines:

mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
#
# Memory management
#
echo 2048 > /proc/sys/kernel/msgmni
echo 64000 > /proc/sys/kernel/msgmax
echo 268435456 > /proc/sys/kernel/shmmax
echo 500 512000 64 2048 > /proc/sys/kernel/sem
sysctl -w net.core.wmem_max=524288
sysctl -w net.core.rmem_max=524288
sysctl -w net.ipv4.tcp_tw_recycle=1
sysctl -w net.ipv4.tcp_rmem='6144 87380 524288'
sysctl -w net.ipv4.tcp_wmem='6144 87380 524288'
sysctl -w kernel.sched_latency_ns=600000
sysctl -w kernel.sched_min_granularity_ns=400000
sysctl -w kernel.sched_wakeup_granularity_ns=400000

So which script is better?? And what has to do this kernel modification with battery??

Thanks in advanced...
[Motorola Milestone Android Development] pay.c:
Hey kholk!

First of all: Great work! I am anxious about trying it out. As I am no real Linux-er, I really do ask myself what actually is changed with that script. Most of the entries are somewhat "mysterical" to me.

Maybe you could explain this or that entry? (I DO know how -NOT- interesting this is for you) Or have a link so one can read into that topic?

Up to now I really didn't find to much information on sysctl via google. And most of the entries are somewhat cryptical to me.

Anyhow, this here sounded somewhat interesting to me: www .android-devs.com/?p=31 (had to include blank because of anti-spam rules)

But as I said: I am -so- not into that topic (yet) so I have no idea whether they got some points or not.

BR!
[Motorola Milestone Android Development] foreman31:
These tweaks would be great run at boot
[Motorola Milestone Android Development] xslntx:
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features

The normalized sleeper attempted to balance sleeping tasks and wait times to guarantee fairness when used in conjunction with FAIR_SLEEPERS/GENTLE_FAIR_SLEEPERS.

echo 2048 > /proc/sys/kernel/msgmni

..defines the system-wide limit on the number of message queue identifiers.

echo 64000 > /proc/sys/kernel/msgmax

..defines a system-wide limit specifying the maximum number of bytes in a single message written on a SysV message queue.

echo 268435456 > /proc/sys/kernel/shmmax

..This file can be used to query and set the run time limit on the maximum shared memory segment size that can be created.

echo 500 512000 64 2048 > /proc/sys/kernel/sem

The numbers defined here set the values of the following parameters, in order:

SEMMSL

Maximum semaphores per semaphore set.

SEMMNS

Limit on the number of semaphores in all semaphore sets.

SEMOPM

Maximum number of operations that may be specified in a semop(2) call.

SEMMNI

Limit on the maximum number of semaphore identifiers.

sysctl -w net.core.wmem_max=524288

sysctl -w net.core.rmem_max=524288

sysctl -w net.ipv4.tcp_tw_recycle=1

sysctl -w net.ipv4.tcp_rmem='6144 87380 524288'

sysctl -w net.ipv4.tcp_wmem='6144 87380 524288'

All of the above simply gives your network connection a greater buffer size. Arguably unnecessary, it works for some, not so much for others.

sysctl -w kernel.sched_latency_ns=600000

The above defines the maximum allowed latency in any given task. Tightening this latency to sub-1millisecond levels causes the scheduler to value stricter fairness without giving CPU heavy tasks anything.

sysctl -w kernel.sched_min_granularity_ns=400000

sysctl -w kernel.sched_wakeup_granularity_ns=400000

Explained in a previous post by me:

Sorry for being a little technical, but it's difficult to explain what all of these values do in layman's terms. Additionally, let me be the first to point out that there are several values here that are not at all optimized to the Milestone's hardware.
[Motorola Milestone Android Development] pay.c:
Thanks a lot! And I absolutely do understand that explanation without tech-terms is near to being impossible. But at least one now *knows* these terms and can google them. So: THNX a lot!! :D
[Motorola Milestone Android Development] 89luca89:
Hey guys

this is my script, it's included in my new EclairMOD v3b, check it out!

#!/system/bin/sh
sysctl -p
#
#Disable normalized sleeper
#
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
#
# Memory management
#
/system/xbin/echo 2048 > /proc/sys/kernel/msgmni
/system/xbin/echo 64000 > /proc/sys/kernel/msgmax
/system/xbin/echo 268435456 > /proc/sys/kernel/shmmax
/system/xbin/echo 500 512000 64 2048 > /proc/sys/kernel/sem
/system/xbin/sysctl -w kernel.sched_latency_ns=600000
/system/xbin/sysctl -w kernel.sched_min_granularity_ns=400000
/system/xbin/sysctl -w kernel.sched_wakeup_granularity_ns=400000
/system/xbin/sysctl -w kernel.sched_compat_yield=1
/system/xbin/sysctl -w kernel.sched_shares_ratelimit=256000
/system/xbin/sysctl -w kernel.sched_child_runs_first=0
/system/xbin/sysctl -w kernel.hung_task_timeout_secs=0
/system/xbin/sysctl -w kernel.threads-max=5000

The benefits are immediate, since the common usage!

With this tweak we can also see the improvements in BENCHMARK:

QUADRANT-820 / 835 @ 1.1 ghz

The graphics performance will improve of about 6/7 fps in graphics tests in general, if you will notice now the fps are the same DroidX / 2! So now we have recovered in graphics performance of a generation gap (the score is now penalized from the better processor power in froyo)

NENAMARK-15.5 /16.5 fps

may not seem much (as DroidX/2 here does 21 fps), but the original is 13/13,5 so I had to point out the jump in performance!

I DO NOT BELIEVE in the bench ... they do not reflect real life, but in this case, help you understand how the tweak to kernel leads to a significant improvement of the graphical management, increasing performance