i finally get it to work.
this script (if kernel support) create a swapfile on mostly unused /cache partition
-copy the script to phone
-chmod
-add it to end of hw_config.sh (or any other way of bootexecute)
have fun
inteks
update:
new version creates own loopdevice (thx to hygge)
pls guider install ??
niceee.
Does this work on rooted and locked 2.3.4 Arc ?
dubist said:
niceee.
Does this work on rooted and locked 2.3.4 Arc ?
Click to expand...
Click to collapse
sorry but you need a kernel with swap support ...
le_manhpro said:
pls guider install ??
Click to expand...
Click to collapse
the easiest way is to use i.e. rootexplorer to run the script but then you have to do it after every reboot.
maybe a good idea for testing
will it work on ray?
What's benefits we have using swap file?
Thx for answer
inteks said:
sorry but you need a kernel with swap support ...
Click to expand...
Click to collapse
So what kind of kernel, is DoomKernel support? why you dont give a sameple?
Interesting idea, I have setup swap as descriped but I had to change loop device to /dev/block/loop18 which was the only unused loop device on my mobile.
It was wierd, because all new loop devices I created was quickly reserved for the same app by the system, rather annoying. But luckily I had one unused allready available.
I will let you know how it works, how the system performance is percieved after some testing. I would think it could slow down the device, the memeory is increased but it will be on slower memory.
donghungx said:
So what kind of kernel, is DoomKernel support? why you dont give a sameple?
Click to expand...
Click to collapse
yepp, doomkernel support swap
Sent from my MT15i using Tapatalk
Hi inteks
Thanks allot for your script, it actually feels like its memory has been increased with 64MB. I have a few times experienced a slight lag when starting up memory hungry games but the homescreen no longer has to redraw when returning from the game
It is usually problematic in the Order and Chaos game to chat as the game loads the default keyboard which takes some time as it is removed from memory again as soon as you have send your message. The swap makes the keyboard stay in memory and open up instantly
I am also able to keep more applications open during normal use, I would normally have problems having mail, web and other document open at the same time.
I had to modify your script and manually create a new loop device, all loop devices from loop0 to loop38 was allready used.
# mknod -m640 /dev/block/loop50 b 7 50
hygge said:
Hi inteks
Thanks allot for your script, it actually feels like its memory has been increased with 64MB. I have a few times experienced a slight lag when starting up memory hungry games but the homescreen no longer has to redraw when returning from the game
It is usually problematic in the Order and Chaos game to chat as the game loads the default keyboard which takes some time as it is removed from memory again as soon as you have send your message. The swap makes the keyboard stay in memory and open up instantly
I am also able to keep more applications open during normal use, I would normally have problems having mail, web and other document open at the same time.
I had to modify your script and manually create a new loop device, all loop devices from loop0 to loop38 was allready used.
# mknod -m640 /dev/block/loop50 b 7 50
Click to expand...
Click to collapse
pls guider install tks
le_manhpro said:
pls guider install tks
Click to expand...
Click to collapse
Here is the script with my modifications manually creating a new loop devices. I have used loop50 as 0-38 was allready in use and it would leave some room for new loop devices.
I am using scriptmanager to either run the script manually or run it at boot.
Have marked my changes with bold
#!/system/bin/sh
if busybox [ ! -f /cache/swap/swapfile.swp ]
then
echo "Create Swapfile"
mkdir /cache/swap
busybox dd if=/dev/zero of=/cache/swap/swapfile.swp bs=1M count=64
busybox mkswap /cache/swap/swapfile.swp
busybox chmod 0600 /cache/swap/swapfile.swp
else
echo "Swapfile Exist"
fi
echo "connect loop devices"
mknod -m640 /dev/block/loop50 b 7 50
losetup /dev/block/loop50 /cache/swap/swapfile.swp
echo "use loopdev for swap"
swapon /dev/block/loop50
echo "raise swappiness 2 "
echo 90 > /proc/sys/vm/swappiness
cat /proc/sys/vm/swappiness
free
Thanks a lot for the script. What is this loop anyways?
matus201 said:
Thanks a lot for the script. What is this loop anyways?
Click to expand...
Click to collapse
It is a device driver in linux, the loop device driver is created as a block device which functions as disc device. The loop device driver are used to loop back into local imagefiles on the existing filesystem.
You then use losetup to point the loop device file towards an imagefile on the existing memory devices. In this case it is configured to point towards the new empty 64MB file that are created in the beginning of the script.
You now have a small 64MB filesystem attached that we can use as linux swap
Why not making a 128 swap file to improve even more?!
I'm a noob... So I just intested to know how it works...
Sent from my LT15i using XDA App
must this be added for your kernel to start swapping inactive applications from the RAM to the cache partition ?!
thanks man
---------- Post added at 09:30 PM ---------- Previous post was at 09:29 PM ----------
haimelf said:
Why not making a 128 swap file to improve even more?!
I'm a noob... So I just intested to know how it works...
Sent from my LT15i using XDA App
Click to expand...
Click to collapse
the cache partition is only 100mb
yes
Sent from my MT15i using Tapatalk
i heard that swap would wear the cache partition in time thus making it un-useful @ all for it's original use , i believe that cache is used for stuff like downloading apps from market !
thanks
What is "chmod" ??
Sent from my LT15i using xda premium
Related
Well like the title states, I would like to see the kernel messages instead of a boot animation. Just for the geeky look of course ^__^
So is there a way of doing that?
I'm using a German Vodafone Magic 32B, running Cyanogenmod 5.0.8.
I think you can't put the boot in verbose mode, you could do an animated sequence with PNG files to emulate the verbose mode but it won't be the real boot messages of course, just images
Yeah I'm using a boot animation that imitates the BIOS POST-screen on a PC, it's nice but the verbose mode is much cooler
The boot animation I'm using:
http://forum.xda-developers.com/showthread.php?t=648555
What I'm after:
http://www.youtube.com/watch?v=HQKfeDnMVQ8 (about 2 minutes into the video)
If there was a simple setting in a configuration file, it would be awesome, if it required modifing the boot loader, it would suck
From what I understand, you need to change the init.rc file in \
setprop ro.kernel.android.bootanim 0
setprop debug.sf.nobootanimation 1
or simply change export ANDROID_BOOTLOGO 1 to export ANDROID_BOOTLOGO 0 also in init.rc
However, all changes to init.rc are gone after restarting the phone....
Any ideas?
Hm, it seems like the init.rc we see in our rootfs is part of a ramdisk. A ramdisk created from an image in our boot image, i guess a modification of the boot image would help the cause, but that's way too much trouble
quazar666 said:
From what I understand, you need to change the init.rc file in \
setprop ro.kernel.android.bootanim 0
setprop debug.sf.nobootanimation 1
or simply change export ANDROID_BOOTLOGO 1 to export ANDROID_BOOTLOGO 0 also in init.rc
However, all changes to init.rc are gone after restarting the phone....
Any ideas?
Click to expand...
Click to collapse
I modified the boot.img with the first changes but it just broke it. Apparently the setprop method won't work. I'll try the export suggestion sometime in the next couple days and report back.
Awesome, thanks for trying
No problem. If I get it working I'll post a tutorial on how to rebuild the boot.img to do this. I'll also post a premade boot.img for the latest CM release candidate.
Any news ?
nattiii said:
Well like the title states, I would like to see the kernel messages instead of a boot animation. Just for the geeky look of course ^__^
So is there a way of doing that?
I'm using a German Vodafone Magic 32B, running Cyanogenmod 5.0.8.
Click to expand...
Click to collapse
What you want is this http://www.youtube.com/watch?v=7u6qNzsgbxY
As you indicated yourself.......they are messages from the kernel. You would need a kernel that's verbose instead of having a logo.rle. Kernels have specific headers & hashes so its really hard to just 'add' or 'remove' stuff inside. You would need to compile a special kernel to achieve this. I'm pretty sure the permissions & logo.rle are in the initrd which is 1/2 of the Boot.img alongside the zImage. Hope that helps
Any updates on this? This would be killer!
92drls said:
Any updates on this? This would be killer!
Click to expand...
Click to collapse
Try chainfire's "live dmesg" and " live logcat" boot animations, should be available on the market
Sent from my HTC Desire using XDA App
I just tried the live dmesg. That's absolutly brilliant! Thanks for the tip!
Sent from my XT894 using xda app-developers app
NEW POST AT: http://forum.xda-developers.com/showthread.php?t=1297712
NEW POST AT: http://forum.xda-developers.com/showthread.php?t=1297712
this gingerbread rockz man
Thanks for all your work on the Tattoo camera. You are AWESOME!
Does Google Goggles work with the current state of the ROM?
not works with goggles and scan bar programs.
4 said:
Thanks for all your work on the Tattoo camera. You are AWESOME!
Does Google Goggles work with the current state of the ROM?
Click to expand...
Click to collapse
Is suposed to work but I never use it
You recived my pray?
Yesterday i install your rom following the spanish post, with google translate!
All works, only thing that i found is that with FactoryROM of Tattoo the browser render the website "nearest" than the GB Rom, it is normal?
@noob question:
I make the sdcard 3 partition 1 FAT32, 1 ext2 (sd-ext), 1 swap trought linux cfdisk and format the partitions using mkfs.* commands, but ClockworkRecovery doest see my sdcard anymore, so i have to reboot, and format the sdcard again, it is normal?
Kalim i believe in you
Dont miss :*
-vt- said:
You recived my pray?
Yesterday i install your rom following the spanish post, with google translate!
All works, only thing that i found is that with FactoryROM of Tattoo the browser render the website "nearest" than the GB Rom, it is normal?
@noob question:
I make the sdcard 3 partition 1 FAT32, 1 ext2 (sd-ext), 1 swap trought linux cfdisk and format the partitions using mkfs.* commands, but ClockworkRecovery doest see my sdcard anymore, so i have to reboot, and format the sdcard again, it is normal?
Kalim i believe in you
Dont miss :*
Click to expand...
Click to collapse
Partitioning sdcar is only for people willing to switch beetwen 1.6 and 2.3 OS. I you want this you nedd to create VFAT partition, ext3 partition labeled sd-ext, and swap partition labeled swap. then use the recovery I have compiled at HtcMania.
You're the best men, thanks for your job and wish a fully working camera
Nick85
Multilanguage
Can you tell me which languages contain?
hey man,im using your rom for 2 days now and is workin like a charm...its a litle slower then nFinityGB 0.5 but works,i specialy like built-in overclocking option ....just have one question: can you recommend me an app for monitoring temps and speed of CPU in real time?
Have you tried to use program like swapper or swapper2 ? they make my rom fly
after reboot try this from terminal
echo 3 > /proc/sys/vm/drop_caches
Usualy for linux cached memory is best of free memory, but i got boost from doing this command many times while testing
a little exaple
/data # free
total used free shared buffers
Mem: 190368 186228 4140 0 968
Swap: 49144 332 48812
Total: 239512 186560 52952
/data # echo 3 > /proc/sys/vm/drop_caches
/data # free
total used free shared buffers
Mem: 190368 157188 33180 0 16
Swap: 49144 332 48812
Total: 239512 157520 81992
/data #
Click to expand...
Click to collapse
this is a great achievement....but please can u correct a few issues im facing here
1)Status bar cannot be changed to white
2)Batter circle...takes steps of 5..
i mean from 100% it goes to 95% and then to 90%....
3)wifi is connecting properly....but must say this rom connects to the data connection very fast....
sorry for my bad english...
-vt- said:
Have you tried to use program like swapper or swapper2 ? they make my rom fly
after reboot try this from terminal
echo 3 > /proc/sys/vm/drop_caches
Usualy for linux cached memory is best of free memory, but i got boost from doing this command many times while testing
a little exaple
Click to expand...
Click to collapse
tnx for tip man.....
vman987 said:
this is a great achievement....but please can u correct a few issues im facing here
1)Status bar cannot be changed to white
2)Batter circle...takes steps of 5..
i mean from 100% it goes to 95% and then to 90%....
Click to expand...
Click to collapse
This is not an issue. its a custom circle battery mod that is supposed to work like that.
Can in future be more than 320 video recording? Maybe 480p or 720?
Been using this for past couple of days & very happy. Finally have camera... woohoo.
Keep up the good work, I have full faith in you getting our little camera the full functionality it should have.
djemm1996 said:
Can in future be more than 320 video recording? Maybe 480p or 720?
Click to expand...
Click to collapse
The camera doesn't actually work properly yet. Let alone video recording. If you want to film 720p videos, spend 50 quid on something that's designed to do it. It will do a 100x better job than a crap Tattoo.
-vt- said:
Have you tried to use program like swapper or swapper2 ? they make my rom fly
after reboot try this from terminal
echo 3 > /proc/sys/vm/drop_caches
Usualy for linux cached memory is best of free memory, but i got boost from doing this command many times while testing
a little exaple
Click to expand...
Click to collapse
If you test swap and find an improvement just let us know, so more people will try and I will add to the new ROM.
Hello, Thanks for all your camera work, but i have a Big problem with my Tattoo!
I am allowed to recive and make calls, and to recive messages, but not send...
I Gets this error "Message Not Sent - select to review the message and try again."
I have Just been in the secret Settings( "*#*#4636#*#*) and went wrong and changed the radio(have changed it back) and edited "WCDMA Preferred" to some thing else( switched back now).... I Need Help!
BTW, Nice Work!
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.
SD Tweakz v2
Only works on custom ROMs with init.d(aka busybox runparts) support
UPDATED 04/11/11(added a few battery tweaks)
Wondering around on XDA will sometimes lead you to threads with scripts/tweaks that may or may not help you improve your android device in one way or another. Now most of these scripts/tweaks are not boot resistant. Meaning, after rebooting the tweaks gets disabled and you need to enter/execute them once again.
Well here's another script that would help you initialize those scrips/tweaks every time you restart/reboot you phone and make your life a lot more easier.
Instructions / How does it work?
1. Download the initial script here (SD Tweakz v2)
2. Flash via recovery This will install/copy the initial script into a portion of your android system which initializes/runs every time the phone boots
3. Create a folder on SD called "scriptz" (/sdcard/scriptz)
4. Place your tweaks/scripts inside "scriptz" folder. Usefull scripts/tweaks with explanation below
5. Reboot and see your script run on boot time By this point, every time you boot, the initial script will check your sdcard(/sdcard/sctiptz) if any scripts/tweaks are present. Once found it will then run the scripts for you each and every time you boot
What is it good for
Well there are lots of tweaks out there just waiting to be discovered. Some can yield great performance and some can provide you with a better battery management that can extend your battery life for hours. Unfortunately, some tweaks can only give you one of the benefits above and a bad performance on the other. Meaning you just can't have 'em all. Here you can choose which tweaks/scripts to apply, modify the values as you want as well as debugging which script provides the benefits that you expect. Another reason for using this mod is compatibility as some tweaks/scripts can be ROM dependent. Most of the time it's a kernel issue but some libraries can get involved too.
The Scripts
Scripts are just plain linux compliant text document which has certain linux commands that can be issued using adb/terminal.
You can make one yourself using some android text editors(from es file explorer, dropbox, root explorer etc.). Don't forget to add a ".sh" file extension.
Here's a few example of the scripts I use:
Code:
#These scripts are from various sources from different sites including [URL="http://forum.samdroid.net/"]Samdroid.net[/URL]
#And of course in collaboration with FranciscoFranco
#
#My approach in the scripts/tweaks that I use is basically just to
#squeeze more juice out of my phone. So in contrast to the tweaks
#included in FranciscoFranco's thread, the tweaks/scripts I use are less
#aggressive in terms of performance and more inclined to save battery.
#
#non-rotational.sh
#this script tells android that you are not using spinning disks
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
#noatime.sh
#Remount all partitions with noatime, for more info visit [URL="http://forum.xda-developers.com/showpost.php?p=8708125&postcount=1"]http://forum.xda-developers.com/showpost.php?p=8708125&postcount=1[/URL]
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done
#scheduler.sh
#Changes the scheduler used by the system, for more info visit [URL="http://forum.xda-developers.com/showpost.php?p=4806456&postcount=1"]http://forum.xda-developers.com/showpost.php?p=4806456&postcount=1[/URL]
for i in `busybox ls -1 /sys/block/mtdblock*`
do
echo "noop" > $i/queue/scheduler;
done
echo "noop" > /sys/block/mmcblk0/queue/scheduler;
echo "noop" > /sys/block/dm-0/queue/scheduler;
echo "noop" > /sys/block/dm-1/queue/scheduler;
#setprop.sh (currently testing)
#various build.prop settings
setprop wifi.supplicant_scan_interval 600
These are few of the tweaks that I have tested(and using right now), I will update it every time I test something out and will eventually add some of FranciscoFranco's tweaks for you to try out.
You can get some useful scripts from here - Performance and battery tweaks - by Franciscofranco (just read along)
Note: These scripts are no different from the scripts in FranciscoFranco's thread, I just categorized each individual tweaks and separated them for you to be able to apply each one separately. I will be more inclined to describe only battery saving tweaks as I am only interested with tweaks that could extend battery life(this includes performance tweaks that doesn't seem to affect the battery behavior at all)
Here's the my initial script again: SD Tweakz v2
Here's the downloadable version of each tweak mentioned above:
non-rotational.sh
scheduler.sh
noatime.sh
setprop.sh
If anything bad happens, just flash this Undo.zip(unsigned so just toggle signature verification) and everything should be back as it was before.
Huge thanks to NervGaz for providing a solution to the mount point conflict issue and of course Franciscofranco for those lively discussions and ideas we exchange.
Awesome job, I already linked this on my first page
@Ungaze
what is the difference from Tweakz V2?
bluviper said:
@Ungaze
what is the difference from Tweakz V2?
Click to expand...
Click to collapse
almost everything. Flashing this script alone won't do anything. You need to get your tweaks from here first and save it to /sdcard/tweakz folder. reboot and this way it will do exactly what Tweakz V2 did. Now if you notice any lag or performance drop, apply each tweak/script one by one to debug/troubleshoot which one is causing it.
Additionally if you found anything useful, you can make your own script.sh and place it on the /tweakz folder to run it on every boot.
ungaze said:
almost everything. Flashing this script alone won't do anything. You need to get your tweaks from here first and save it to /sdcard/tweakz folder. reboot and this way it will do exactly what Tweakz V2 did. Now if you notice any lag or performance drop, apply each tweak/script one by one to debug/troubleshoot which one is causing it.
Additionally if you found anything useful, you can make your own script.sh and place it on the /tweakz folder to run it on every boot.
Click to expand...
Click to collapse
Yes please, keep posting feedback either here or the other thread. Anything is useful since some users say they suffer some ocasional lag, others don't notice improvements, others say their phone became super fast...
ok now i get it... so the first batch of scripts on zip cannot be run on boot...
thats why you created this...
..ok i have finally applied everything! hehehe since i love smorgasbords...
and its very hard to tell that its there.... hehehe.. seems like fine to me.
no hiccups whatsoever..
but i feel its OK... thanks again man..
ok now i get it... so the first batch of scripts on zip cannot be run on boot...
thats why you created this...
Click to expand...
Click to collapse
the first batch of scripts had to be manually moved to init.d and had to be in a specific filename with a specific header and containing all the tweaks altogether in order to run on boot.
now what I did with the update.zips(Tweakz V1, Tweakz V2) was make moving it to init.d, renaming and fixing the header all easier for you guys but it still contain all the tweaks with no option for you guys to modify/add/remove lines that you want. This time it already runs on boot.
with this tweak, everything is easily manipulated through the sd card and a simple file explorer for more flexibility and easy troubleshooting. This should also work on most phones with init.d support.
Yes please, keep posting feedback either here or the other thread.
Click to expand...
Click to collapse
And to make things neater, just post stuff regarding only this script here and everything about tweaks on the other thread mentioned above.
You don't really need to move the scripts to the data partition, just invoke the with sh, ie. "sh /sdcard/scriptz/script.sh" it would make your for loop something like this:
for script in $list
do
sh /sdcard/scriptz/$script
done
Also I'd be careful with mounting SD ahead of vold, atleast on /sdcard or /mnt/sdcard make a tempfolder somewhere as a mount point instead and you shouldn't to worry about vold throwing up on you... Just a thought.
You don't really need to move the scripts to the data partition, just invoke the with sh, ie. "sh /sdcard/scriptz/script.sh" it would make your for loop something like this:
Click to expand...
Click to collapse
didn't work last time i tried running the scripts directly from sdcard but will try it with your script.
Also I'd be careful with mounting SD ahead of vold, atleast on /sdcard or /mnt/sdcard make a tempfolder somewhere as a mount point instead and you shouldn't to worry about vold throwing up on you... Just a thought.
Click to expand...
Click to collapse
I don't really have a choice right now but to use the same method as "VOID rom" is using when loading modules. Any ideas?
BTW thanks so much
A quick and simple solution would be to just add something along the lines of
mount -o rw,remount auto /
mkdir /tmp
<mount the sdcard>
<run the scripts>
<unmount the sdcard>
rmdir /tmp
mount -o ro,remount auto /
Not the cleanest solution of all time, but it should work and no risk of conflicting mount points. Another solution is to just have people install the scripts on the /data partition in a directory there as /data is mounted rw.
Sent from my LG-P500 using Tapatalk
NervGaz said:
A quick and simple solution would be to just add something along the lines of
mount -o rw,remount auto /
mkdir /tmp
<mount the sdcard>
<run the scripts>
<unmount the sdcard>
rmdir /tmp
mount -o ro,remount auto /
Not the cleanest solution of all time, but it should work and no risk of conflicting mount points. Another solution is to just have people install the scripts on the /data partition in a directory there as /data is mounted rw.
Sent from my LG-P500 using Tapatalk
Click to expand...
Click to collapse
I was worried about the mount point traffic as well, but I guess I will be implementing the second solution instead, with a very different approach, and a more complex script.
You seem to know your trade, too bad we didn't get to collaborate before I made this script(from scratch, with no knowledge at all with scripting and how they work). Was asking and trolling on different threads with no help at all. Good thing mr. google was always there for anyone who needs help .
I'll start working and hope to hear from you about my next release as well.
You might want to look at the userinit script in the CM based ROM's around if you're going down that route, it does what you want and there's no point reinventing the wheel if you know what I mean.
Sent from my LG-P500 using Tapatalk
Great! Nice tip, never done that before. Thanks alot man.
so all in all, is this script really running on boot or not?
It runs, only problem encountered is with CM7 roms. (mount point traffic or something like that in a sense) will edit 1st page till I finish the reworked script.
Hey ungaze,I have just flashed the script and everything. I'm on CM7. What is the problem? Do I have to wait for a fix and do everything over again? Because I'm currently not experiencing any problems
Nope, it worked once, it should also work every time. Dunno which beta version of CM7 some people are having problem with. I still think this method is easier and faster for testing scripts to run on boot, but the next script will just be more lets say "compatible to a wider variety of ROMs and even other devices".
The issue can occur on rom's that mount the sdcard on /mnt/sdcard and symlink that to /sdcard as your mountpoint doesn't exist. If memory serves me right this is the correct mount procedure since 2.2 and is more in line with FHS. Potentially you can see issues with this if it mounts before vold runs as well as vold with throw an error if the mountpoint is in use. This can occur on rom's that mount to /sdcard. Hope that clears it up a bit.
Sent from my LG-P500 using Tapatalk
How does this look?
Code:
mount -o rw,remount auto /
mkdir /tmp
mount sd
mount -t vfat /dev/block/mmcblk0p1 /tmp
if [ -e /tmp/scriptz ]
then
list=`ls /tmp/scriptz/*.sh`
for script in $list
do
sh $script
done
fi
umount sd
umount /tmp
rmdir /tmp
mount -o ro,remount auto /
Also "ls /tmp/scriptz/*.sh" would show the complete path including /tmp/scriptz/------ and so I just used sh $script on line 10. is this ok?
No need to mount the sdcard in the script, vold handles all that and its not used anyway. Apart from that it looks good to me.
Sent from my LG-P500 using Tapatalk
Hi!
Last 48h I've been digging forums for an answer. Is it possible to partition SD Card in Milestone using "parted" and THIS guide?
The problem comes with one little thing:
Code:
C:\Users\DrNO>adb shell
Milestone-Recovery:/
# parted /dev/block/mmcblk0
parted /dev/block/mmcblk0
bash: parted: command not found
Milestone-Recovery:/
# exit
After sleepless night I'm richer in knowledge that (probably) parted is not included in AOR (it's 3.3 that I'm using) [as zeppelinrox posted HERE]
OK, 51dusty used CM recovery, I've tried CMR2.5.0.7, with little success. Maybe I've used it the wrong way but hey!... First I had trouble finding it, then tried to install/flash it through "ROM Manager 4.x", ok it said that's done, reboot into recovery > "Error". Then I looked into the package it looked like an "update" to apply in AOR. It worked, but "adb shell" freezes, it unfreezes after closing CMR. wtf... it was 3 a.m.
1. Am I doing something wrong?
2. Is it possible to implement "parted" in AOR
3. Is it possible to use mentioned above guide on Milestone?
The reason is to part SD "the right way" and split it: FAT32+EXT2(3)+SWAP
Please, help
You can't have swap on Milestone.
And... that's the guide that I used as well... I made a step by step post about it... see my Handy Dandy Fixes thread I linked to it in there... I think I called it "The Hard Way" but ended up being fun...
Oh... and it took me a whole weekend to get it right!
ok, i'll try that anyway, also I'll try to "mount" swap using app called "A2SDGUI", it did miracles with ext2 and it has swap initialing capabilities. when I try to punch it, it flashes short text for half a sec, something about not finding suitable partition, if I get it right, it might work...
two additional Qs:
1. call me retarded but where do I find proper "parted"?
2. is there a windows app that can part disk and make not only ext but swap too? currently I don't have any linux system running, I could install one or make live CD but it would be only for one thing only so I think that you can understand my lazyness ;P
DrNO[PL] said:
2. is there a windows app that can part disk and make not only ext but swap too? currently I don't have any linux system running, I could install one or make live CD but it would be only for one thing only so I think that you can understand my lazyness ;P
Click to expand...
Click to collapse
http://www.partitionwizard.com/free-partition-manager.html
Guide to using Minitool partition wizard.
http://forum.xda-developers.com/wiki/index.php?title=SD_card_partitioning
DrNO[PL] said:
1. call me retarded but where do I find proper "parted"?
Click to expand...
Click to collapse
http://forum.xda-developers.com/showpost.php?p=12361294&postcount=842
thank you Sir for those above and more that I've already read around forum search module is not so great as I thought, because it never returned that post withw "parted".
will report soon how's the battle evolving...
Good luck.
ok then...
parted worked, SD8GB splited nicely:
FAT32 7,25GB
EXT3 512MB
SWAP 32GB
that was easy
next thing "apps2ext", reinstalled Darktremor script, restored ext2 backup, worked, mounted FAT, copied backup, reboot, OS did't even noticed any change (except cutting ext2 by a half and upgrading to ext3, in a good way). then swap. first i've tried some apps, like DroidSwap (only FC's), then Swapper2, which found swap partition, but is still limited by the "f" kernel. formating went OK, (un)mounting part. FAILed. then I've started messing arround > in short, bricked soft :] nothing serious, only /system could not mount, thank you nandroid you exist. now I'm back to the point after spliting SD, having Firefox weighting something like 0.8GB in memory with opened tabs about swap vs milestone. after much reading I'll try more serious approach, more digging, lower coding, no apps, console yes, wish me luck.
quick question, people keep saying linux-swap on milestone is not possible, therefore why are you still including it?
I believe it's possible but the commands the set it up / use it are unknown. It doesn't follow the standard "linux way".
Someone please correct me if I'm wrong.
Swap relies on the kernel being compiled with CONFIG_SWAP. Unfortunately for us, Motorola did not enable swap in the kernels they release. Coupled with the kernel verification scheme, we are unable to swap the kernel with one that has CONFIG_SWAP enabled.
If you do a mkswap and swapon on Milestone, you'd get "Not Implemented". So, swap support is not possible. I'd like to be proven wrong though.
Sent from my Milestone using XDA App
swap enable = impossible, dude..
If you read some threads at droidforums, alot of guys don't use swap anyway as it kills the sd card quicker.
Compcache is more interesting... you can squeeze more apps in the same amount of free ram via compression.
The debate is that it takes time to uncompress the app from ram when it's recalled but ram is fast and it would be even faster with a V6 under the hood lol
SWAP is impossible, because motorola kernel don't support it. So, as long as we can't compile our own kernel on Motorola Milestone, this will remain impossible.
Sent from my Milestone using XDA App