im running the latest Drizzys hero and i need to set up my swap can anybody put the commands please and what do i use to set it up?....i'm running it o a G1 thanks in advance!!
Do you already have the third partition? If you do, then you can do this in terminal:
Code:
echo 80 > /proc/sys/vm/swappiness
Where "80" is my value for swappiness
I am M3 said:
Do you already have the third partition? If you do, then you can do this in terminal:
Code:
echo 80 > /proc/sys/vm/swappiness
Where "80" is my value for swappiness
Click to expand...
Click to collapse
how do u do this permanently from terminal?
ok so let's see if i got it....i did open Terminal Emulator and after i put that code i just get a # should i get any confirmation option? what is the code to check my swappiness at the moment?...and one more thing i should this everytime i reboot right?
DKM119 said:
ok so let's see if i got it....i did open Terminal Emulator and after i put that code i just get a # should i get any confirmation option? what is the code to check my swappiness at the moment?...and one more thing i should this everytime i reboot right?
Click to expand...
Click to collapse
You won't get any varification you'll just recieve no errors. If you want to check the swappiness
Code:
su
vi /system/bin/user.conf
look for cc_swappiness= [] <-- That's what you're swappiness is at.
Got it working ^^
In this thread you'll find a compilations of tweaks and settings to improve your phone's performance and battery.
It isn't a walk in the park, I'll strongly advise against trying these tweaks if you don't know what you're doing. I'm not responsible for any bricked device or any kinds of problems you may have when applying the following changes. If you don't know what you're doing then simply DON'T.
Changelog 1/05/2011:
Reverted few changes, and everything should work correctly and easily. Instructions how to delete the previous version below.
Fixed the files permissions. Now you don't have to do it manually for it to work.
Download:
Tweaks .zip
Patched libsqlite .zip:
(don't use this on andy's 2.3.3 and latest CM7 from mik 6.3 roms or you'll end in a bootloop or your phone will drain a lot of battery according to some users)
libsqlite.so
Data2ext: http://forum.xda-developers.com/showthread.php?t=1042828 (thanks ungaze).
Very important:
libsqlite.so is a patched sqlite library file to turn sync off. With that change I/O should be waaay faster during db writes and reads. It only works with 2.3.x ROMs, don't bother flashing if you're with Froyo or you'll end up with a boot loop.
Instructions:
To delete the previous versions (thanks 32bits):
If you've installed any of the previously tweaks then you'll have to roll back. You have to do the following steps (this includes every possible locations):
1. Remove /system/etc/tweaks.sh
2. Remove /system/etc/init.d/00script
3. Remove /system/etc/init.d/99a
4. Remove /system/etc/init.d/99tweaks
5. Remove /data/local.prop
6. Reboot your phone.
For the .zips:
1. Download the .zips.
2. Enter recovery.
3. Flash them.
4. Reboot.
5. Done.
Prop settings, you can add them to your build.prop or local.prop:
Code:
wifi.supplicant_scan_interval=300
windowsmgr.max_events_per_sec=260
ro.lge.proximity.delay=25
mot.proximity.delay=25
net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960
ro.HOME_APP_ADJ=1
ro.mot.eri.losalert.delay=1000
video.accelerate.hw=1
ro.ril.disable.power.collapse=0
pm.sleep_mode=1
Don't forget to nand backup first in case something goes wrong. I'm not responsible for any problem from your part.
Thank you for your donation:
- Momaro
franciscofranco said:
Battery life increase for Dummies
Do you want some extra juice in your battery life? Does it seem that you lose your battery too fast? Then you came to the right
place.
Over the time I've gathered some information about our battery and while this isn't 100% proof (because all of us use the phone for different purposes)
I think it's most accurate:
The myth of having the lowest possible frequency on your CPU while it's asleep:
Having the lowest frequencies (122 or 248) set up, it's not good. Our phone doesn't change voltages while underclocking or overclocking (as far as I know overclocking
doesn't change voltages as well) so, and only talking about underclocking, having such a low frequency is bad for your phones battery and performance. For the battery
that's because it takes longer to wake up from sleep and the time that the cpu takes to scale from 122/248 to maximum instead of using it for processing power eats
your battery away. About the performance hit, well that's pretty obvious and it takes longer to idle up, so again, more battery drain.
Having read about this the last few days actually running in Performance Governor is pretty beneficial to your battery: it wakes up faster, it performs every task faster,
then it idles up faster. Yeah during "sleep" time having 122 frequency or 806 it's the same thing because it's not using its power for anything, it's just there idling.
In any case what I always suggest is TEST it up and see for yourself. If you don't want to run with Performance governor at least run with 480 minimum frequency, it really helps.
---
Why do you run with auto-sync, gps, wifi, 3G, firewalls, anti-virus, background apps killing your battery? That's bull****. Most of you complain that your battery doesn't last as long
as it should...well that's not ROMs fault, I've been running with CM7 buils since the first builds and I never, ever, ever had battery problems even when everyone complained. Why?
Because I'm careful. If you don't need auto-sync at that time, disable it...if you don't need gps, disable it and so on. I don't know why people leave this stuff on even when they are not
using them. Firewalls? That's bull**** as well along with anti-viruses. They eat up your resources for nothing. Same goes for background apps that eat it up. Google Maps = bull****. If
you used it go kill it after you're done with it. Same with Music app. Kill it after you've listened to your 1315618 songs. But DON'T use task killers. I can't repeat this enough, just
DON'T use them for your own sake. Same goes for 3G...just don't enable it all time if you're not using it.
No Live Wallpapers as well, nor 3D app drawers, these blow your battery away easily without you knowing how or why. Don't bother tuning your brightness down...you have a device, and
that's to be used. Why buying a mobile for 200€ and not using it's screen propely? It's there to be used, full brightness looks better, it's not by decreasing it down and hurting your
eyes that you'll get 21564561 more battery hours.
---
Do you want even more battery? Flash my tweaks along with local.prop. I'm running 2.3.3 without any modification except my tweaks + local.prop + libsqlite + LauncherPro as a launcher
(this is where most of the performance comes from).
So these are my "secrets". As you can see this is not really secret and I can easily run my device without charging for 1 day and a half, 2 days max with moderate usage.
AH there's something important. After flashing a ROM be sure to charge it to 100%, enter recovery and wipe battery stats, then reboot and only when the phone is up and running you then
unplug it.
Have fun reading, I laughed a lot while writting it
Click to expand...
Click to collapse
---------------------------------------------------------------------------------------
Different method to apply the tweaks. Make sure you thank ungaze for this script
Visit this thread for a completely new method to apply these tweaks: SD Tweakz
Code:
What does it do?
-mounts SD
-checks if "scriptz" folder exists
-copies scripts from "scriptz" folder to /data partition
-sets permission to scripts
-runs all the scripts
-deletes "scriptz" folder from /data partition
-unmounts SD
-done
P.S.- Everything is pretty clear, I won't be answering anything that is specifically stated above in my post or in the following ones.
in case u dont have root explorer
1. mount -t yaffs2 -o remount,rw /dev/block/mtdblock1 /system
2. echo 4096 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
PS: u cud have integrated that read_ahead_kb in your script too..and dont u have to mount /system rw first ???
EDIT: found something !!! busybox has crontab ..Guess we can schedule the above script to execute like every half and hour or so !!!
franciscofranco said:
debug.sf.hw=1 // activates hardware acceleration
Click to expand...
Click to collapse
Lol . How is that and battery life or performance , even remotely equivalate ?
" ls -1 /sys/block/mtdblock* " u need to use cut and tr with it..DOesnt work
Here's My script :
mount -t yaffs2 -o remount,rw /dev/block/mtdblock1 /system
echo 4096 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
for i in `ls -l /sys/block/mtdblock* | tr -s " "| cut -d " " -f 6`
do
echo "noop" > /sys/block/$i/queue/scheduler
done
echo "noop" > /sys/block/mmcblk0/queue/scheduler
Zerobarat1 said:
Lol . How is that and battery life or performance , even remotely equivalate ?
Click to expand...
Click to collapse
It increases performance and I'm sure a lot of people doesn't even remotely know how to activate HW acceleration.
sarfaraz1989 said:
" ls -1 /sys/block/mtdblock* " u need to use cut and tr with it..DOesnt work
Here's My script :
mount -t yaffs2 -o remount,rw /dev/block/mtdblock1 /system
echo 4096 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
for i in `ls -l /sys/block/mtdblock* | tr -s " "| cut -d " " -f 6`
do
echo "noop" > /sys/block/$i/queue/scheduler
done
echo "noop" > /sys/block/mmcblk0/queue/scheduler
Click to expand...
Click to collapse
That's a variation, but my script works as well, been using it for a good while, but thanks anyway
sarfaraz1989 said:
in case u dont have root explorer
PS: u cud have integrated that read_ahead_kb in your script too..and dont u have to mount /system rw first ???
Click to expand...
Click to collapse
As far as I know there is no need to mount /system rw with any of those scripts, never did it before and always worked fine.
franciscofranco said:
build.prop edit:
windowsmsg.max_events_per_sec=60 // makes the ui more fluid and snappy
Click to expand...
Click to collapse
Are you sure it is not:
windowsmgr.max_events_per_sec
?
freddysam said:
Are you sure it is not:
windowsmgr.max_events_per_sec
?
Click to expand...
Click to collapse
Yes it is, it was a typo, thank you.
Some observations:
If you want to use "-1" option with ls, you'll need to use busybox's version. The stock ls doesn't support it.
The Linux sysfs file system (as mounted in /sys) is by design a read-write virtual file system. No need to do anything extra to play with it, other than be root.
These commands shouldn't be run from cron, they belong in some init script, perhaps /init.rc or other appropriate startup location.
My class 4 Kingston can achieve something like 40 mb/s with this tweak, but it may vary from card to card, this is just my experience.
Click to expand...
Click to collapse
with which benchmarking tool/app? Using SD tools but no apparent change.
@franciscofranco
sent you a PM
ungaze said:
with which benchmarking tool/app? Using SD tools but no apparent change.
@franciscofranco
sent you a PM
Click to expand...
Click to collapse
SD Tools indeed
First post updated with new tweaks.
cud somebody post differences before and after applying the patch..SOmebody benchmark 'em !!!
franciscofranco said:
SD Tools indeed
First post updated with new tweaks.
Click to expand...
Click to collapse
so we just add the new scripts from Ungaze?
and let the previous one as is....
using GScript, these folders are missing?
silly question but, do we need to create this folders?
-----------
and also, will this work in general for all android devices regardless of ROM?
franciscofranco said:
This thread contains some tweaks that I've found and tested myself to improve performance and battery of your ROM.
It isn't a walk in the park, I'll strongly advise you to try these tweaks if you don't know what you're doing. I'm not responsible for any bricked device or any kinds of problems you may have when applying the following changes, if you don't know what you're doing then simply DON'T.
build.prop edit:
wifi.supplicant_scan_interval=200 // interval of seconds that wifi scans for another networks
mot.proximity.delay=25 // proximity sensor tweak to make it more responsive
windowsmgr.max_events_per_sec=60 // makes the ui more fluid and snappy
debug.sf.hw=1 // activates hardware acceleration
System files tweaks using Root Explorer (paid app from the Market):
Change /sys/devices/virtual/bdi/179:0/read_ahead_kb value to 4096, it improves the reading speed from the SD card. My class 4 Kingston can achieve something like 40 mb/s with this tweak, but it may vary from card to card, this is just my experience.
I/O schedulers:
To check which scheduler is used:
Code:
adb shell
~ # cat /sys/block/mtdblock0/queue/scheduler
[noop] cfq // in this case noop scheduler was selected
To select a different scheduler:
Code:
adb shell
~ # echo "noop" > /sys/block/mtdblock0/queue/scheduler
// you can change the schedulers for all your blocks, which, more likely will be mtdblock1,2,3,4,5,6,7,8 and 9. then mmcblk0 for the SD card.
This settings won't last through reboots, so either you create a shell script to run it every reboot or you change then manually. Same applies when changing read_ahead_kb file, it resets on reboot.
This is the script I'm using to run every reboot to change the scheduler:
Code:
for i in `ls -1 /sys/block/mtdblock*`
do
echo “noop” > $i/queue/scheduler
done
echo “noop” > /sys/block/mmcblk0/queue/scheduler
#[b]new line[/b] echo "noop" > /sys/block/dm-0/queue/scheduler
EDIT: ungaze kindly sent me a bunch of shell scripts and after researching, modifying them, and testing I'll suggest you to run them to increase general performance:
Code:
DM=`ls -d /sys/block/dm*`;
MTD=`ls -d /sys/block/mtd*`;
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
for j in $DM $MTD $LOOP $RAM;
do
echo 0 > $j/queue/rotational;
done
This one tells the kernel that all those devices are not "spinning disks" to it treats them as flash memory, because that's exactly what they are.
Code:
echo 0 > /proc/sys/vm/swappiness;
echo 10 > /proc/sys/vm/dirty_ratio;
echo 1000 > /proc/sys/vm/vfs_cache_pressure;
echo 4096 > /proc/sys/vm/min_free_kbytes;
These are tweaks to kernel Virtual Memory management.
Use GScript Lite from the market, it works fine.
If you want to know about the i/o schedulers I suggest you google it.
P.S.- Everything is pretty clear, I won't be answering anything that is specifically stated above in my post.
Click to expand...
Click to collapse
Thanks. any chance of making it flashable for us troglodytes...
bluviper said:
so we just add the new scripts from Ungaze?
and let the previous one as is....
using GScript, these folders are missing?
silly question but, do we need to create this folders?
-----------
and also, will this work in general for all android devices regardless of ROM?
Click to expand...
Click to collapse
Yes just add the scripts, don't need to mess with the previous ones.
If it says a directory was not been found don't worry about it, sometimes dm-0 is mounted, sometimes it is not, I still haven't found out when.
sarfaraz1989 said:
cud somebody post differences before and after applying the patch..SOmebody benchmark 'em !!!
Click to expand...
Click to collapse
You won't notice benchmark improvements, instead you'll notice it in the normal usage. Benchmark don't measure real life scenarios.
Omnichron said:
Thanks. any chance of making it flashable for us troglodytes...
Click to expand...
Click to collapse
I don't know how to do it I'm sorry.
EDIT: I'll have a loot at it.
to tell my experience, after installing the scripts, screen transitions is now snappy.
not like before that youll have to wait half a sec or something near that... now its instant and snappy, its cool to look at. returning to homescreen is abit faster now.
opening files on my ES explorer, unzipping etc etc. works faster now.
exploring and changing files on Root Explorer is quite faster than before.
im using LG Optimus P500....
so again my question goes... will this also work with other android phones under different ROMS?
bluviper said:
to tell my experience, after installing the scripts, screen transitions is now snappy.
not like before that youll have to wait half a sec or something near that... now its instant and snappy, its cool to look at. returning to homescreen is abit faster now.
opening files on my ES explorer, unzipping etc etc. works faster now.
exploring and changing files on Root Explorer is quite faster than before.
im using LG Optimus P500....
so again my question goes... will this also work with other android phones under different ROMS?
Click to expand...
Click to collapse
Awesome
It will probably work on most devices but most likely with some adjustments, nothing I can really predict unless taking a look over the phone and it's filesystems.
possible fix workaround for the DSI errors on Motorola Milestone Froyo on nadlabaks github
http://github.com/nadlabak/android_...mmit/e1bb339b133dd88389a4c3a80bad3a984d12db50
EDIT:
IanTester said:
echo 1 > /sys/devices/omapdss/display0/update_mode
Click to expand...
Click to collapse
should do the same
EDIT:
<nadlabak> it causes slight tearing, visible e.g. when scrolling through email list...
Click to expand...
Click to collapse
but better than reboots or freezes
also fps might drop
EDIT:
for stock 2.2.1, customroms should use their 2nd init (CM7 HowTo):
move original file:
Code:
mv /system/bin/mot_boot_mode /system/bin/mot_boot_mode.bin
create file /system/bin/mot_boot_mode:
Code:
#!/system/bin/sh
export PATH=/system/bin:$PATH
mot_boot_mode.bin
echo 1 > /sys/devices/omapdss/display0/update_mode
set rights:
Code:
chmod 755 /system/bin/mot_boot_mode
EDIT:
made HowTo more clear, hopefully
How to apply this?
Sent from my Milestone using XDA App
to apply this fix you hafe to (as root or in OR)
if /system is readonly:
Code:
mount -o rw,remount /system
then edit /system/etc/rootfs/init.mapphone_umts.rc and add
Code:
# Set OMAP DSS update_mode to 1 (auto) to get rid of the DSI errors
write /sys/devices/omapdss/display0/update_mode 1
after these lines
Code:
# Enable panic on softlockup
write /proc/sys/kernel/softlockup_panic 1
reboot Milestone
Maybe it should be
mount -o ro,remount /dev/block/mtdblock6 /system
Hm, there is no directory rootfs in /system/etc/ ... Have you tried what you are writing here? Maybe "rootfs" refers to the root dir "/" and the file to edit is "/init.mapphone_umts.rc".
You don't need a reboot.
echo 1 > /sys/devices/omapdss/display0/update_mode
Click to expand...
Click to collapse
(I presume that's what that command in the rc file does, right?)
But make the changes to the rc file as well, so the above action is performed on subsequant boots.
as it's on nadlabaks github for cyanogenmod4milestone (CM7) it might differ from the way to do in official froyo. but IanTesters way should do the same
ColdSphinX said:
as it's on nadlabaks github for cyanogenmod4milestone (CM7) it might differ from the way to do in official froyo. but IanTesters way should do the same
Click to expand...
Click to collapse
Seems to be the case. But since I'm not able to edit /init.mapphone_umts.rc (that's the reason why there is an extra dir for this in cyanogenmod), how am I supposed to implement this fix in the official froyo?
Done on CM6.
Yesterday I was browsing the system folders and found this file, full of customizable options, now I know that it's useful.
@tuxor1337: look for the mot_boot_mode hack to run a script as it's used for overclock
IanTester said:
echo 1 > /sys/devices/omapdss/display0/update_mode
Click to expand...
Click to collapse
For stock Froyo roms, i applied VR and then ran AOR, connected phone to pc and used the following commands in command prompt.
adb devices ( should show your device as connected )
adb shell
echo 1 > /sys/devices/omapdss/display0/update_mode
reboot
Upon reboot, i did not find any errors in dmesg which i usually find.
Can someone with more knowledge than me confirm if this is ok?
I know that can be a noobish question but what VR stands for ?
fuggii said:
I know that can be a noobish question but what VR stands for ?
Click to expand...
Click to collapse
VR --> Vulnerable recovery
AOR --> Androidiani openrecovery
I had to do it because adb was not recognising my phone while in the stock recovery menu.
Once i ran AOR, adb recognised my phone to be in recovery mode.
I make this "echo 1 > /sys/devices/omapdss/display0/update_mode" from terminal emulator and after reboot its back to "2" it must be done form adb in AOR ?
it has to be done on or after any boot.
I edited the 1st post to include the changes to do on stock 2.2.1
fuggii said:
I make this "echo 1 > /sys/devices/omapdss/display0/update_mode" from terminal emulator and after reboot its back to "2" it must be done form adb in AOR ?
Click to expand...
Click to collapse
Looks like it loses it during reboot, so it could be added to the init.rc file as well. I am not sure, that's why i asked with someone more knowledge to confirm this.
Anyone?
I have Autostart app and i make autostart.sh with that command and now its start every system boot.
In home i will try that ColdSphinX method and see what happend
@fuggii it's not my method, it's just a mot_boot_mode hack so you don't need any app and the fix get's applyed as early as we can
I think this should work but I copied all of this https://github.com/nadlabak/android...b50/prebuilt/etc/rootfs/init.mapphone_umts.rc
And used that as init.mapphone_umts.rc
Hey the OP needs updating....
It's missing the 1
echo 1 > /sys/devices/omapdss/display0/update_mode 1
zeppelinrox said:
It's missing the 1
echo 1 > /sys/devices/omapdss/display0/update_mode 1
Click to expand...
Click to collapse
no
Code:
echo [B]1[/B] > /sys/devices/omapdss/display0/update_mode
writest the value 1 into file /sys/devices/omapdss/display0/update_mode it's an other syntax then using write in the .rc
Hi guys, im new here and ive succesfuly installed gingderdxV31b on my w8 with locked bootloader i already read and followed overclock tutorial made by doixanh. but it not working when i set the setcpu to 718mhz the speed still on 600mhz. please guys help me i will appreciate ur help. thank you! and godbless
yoitsmark said:
Hi guys, im new here and ive succesfuly installed gingderdxV31b on my w8 with locked bootloader i already read and followed overclock tutorial made by doixanh. but it not working when i set the setcpu to 718mhz the speed still on 600mhz. please guys help me i will appreciate ur help. thank you! and godbless
Click to expand...
Click to collapse
First you might want to see if the module loaded properly. In Terminal Emulator, write the following line:
dmesg | grep x8oc
If you get no output, the module isn't running. If it isn't running, write:
su
insmod system/lib/modules/x8oc.ko
For some users it happens that the module just doesn't work properly either with SetCPU or by echoing the hexadecimal value to /proc/x8oc, as mentioned in the x8oc thread. You should try echoing the overclock speed directly, as in:
echo 710400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq (for 710 MHz)
All the changes you make in Terminal Emulator won't stick on the next reboot, but this is a good thing since you're still testing what works best and some instabilities might occur. When you find the optimal frequency, open hw_config.sh and add the insmod and echo commands to the file, but be sure to create a backup before doing so if something goes awry.
Here you can find the exact frequency steps along with other useful lines:
http://www.modaco.com/topic/338337-permanently-change-cpu-governer-and-clockspeed/
Be sure to overclock to at least 710 MHz, because your phone will actually run slower on lower speeds. In the x8oc thread, one user reported that overclocking to 748 MHz (or higher) on stock kernel is actually best. If your phone cannot handle these speeds then it's best to drop the whole thing completely.