[Q] Autokiller advanced system tweaks in own script - Android Q&A, Help & Troubleshooting

I am referring to this thread:
http://forum.xda-developers.com/showthread.php?t=771232
I'd like to add/change some of these settings on my Archos 70 IT (no phone).
Windows max events
wifi scan level
Dalvik heap size
Unfortunately, the thread says, the values have to be adjusted in the build.prop, but I don't have these settings in there. In my opinion I should have the settings above as they are common in Android.
In fact, I'd like to add all settings of Autokiller memory optimizer.
What I did so far:
IO scheduler, set to noop
Added
http://www.xda-developers.com/android/the-best-ram-optimisation-script-for-android/
and changed the settings for lowmemorykiller
SD Card Cache, I have an app for that.
Can anybody tell me how to add the other settings in a script?
http://andrs.w3pla.net/autokiller/kernel

Even if you don't have some of the values already there, you can add them. Check out this thread: http://forum.xda-developers.com/showthread.php?t=1227269 .

Thanks.
One more question:
Are these files executed on boot?
I'd feel better if I have the additional settings in an own script such as /system/etc/init.d/S99ownscript.
This is, as I understand it, executed as the last scricpt. (R before S, and then numbers)
Is this possible or do I have to write the settings in the boot.prop or init.d file?
Are the build.prop and init.d files executed at each boot or only once, when the machine is set up?
€dit:
I added the following to my S99 script:
ro.HOME_APP_ADJ=1
ro.media.enc.jpeg.quality=100
debug.sf.hw=1
debug.performance.tuning=1
video.accelerate.hw=1
Click to expand...
Click to collapse
What do I have to enter in terminal to check, if these values are active?
For example:
cat /sys/block/mmcblk0/queue/scheduler
Click to expand...
Click to collapse
to check, which scheduler is active.

*push*
nobody?

lordofazeroth said:
One more question: Are these files executed on boot?
I'd feel better if I have the additional settings in an own script such as /system/etc/init.d/S99ownscript.
Is this possible or do I have to write the settings in the boot.prop or init.d file?
Are the build.prop and init.d files executed at each boot or only once, when the machine is set up?
Click to expand...
Click to collapse
Yes, those files (build.prop and init.d) are executed at every boot. It is possible to make your own script, but it's better if you make a flashable one so that it will always stay and you wouldn't have to worry about if it was executed or not (since it will be "in" the rom and always executed).

Related

[APP] LUKS Manager [v2.3] - Encrypted volumes via loopback for rooted phones

Introduction
This is my first Android application and I'm looking for testers and feedback.
LUKS Manager
LUKS Manager provides on-the-fly encryption (AES by default) to virtual folders on Android devices.
The virtual folders can be dynamically mounted, unmounted, created and deleted as needed.
(Think TrueCrypt like functionality)
Volumes and loopback device information are stored in: /mnt/sdcard/luks/.data
And the encrypted volumes are mounted at: /mnt/sdcard/luks/<volume_name>
Requirements
The Android device must:
Be rooted
Have a kernel that supports secure dm-crypt modes and loopback devices
Have a current version of BusyBox installed
Have SuperUser app installed
This package contains:
A statically compiled, stripped and UPX compressed version of cryptsetup for the ARM using the tools provided by the The Guardian Project.
A statically compiled and stripped version of mkdosfs from dosfstools package for the ARM7.
A bash shell script called "luks" that does volume management.
And a native java app that provides a GUI interface to the luks script, a basic file explorer and simple text editor.
Download
You can find more on the apps homepage at:
nemesis2.qx.net/pages/LUKSManager/
Or the Android Market:
market.android.com/details?id=com.nemesis2.luksmanager
Changelog
Version 2.3:
Major rewrite to the luks shell script and GUI app to support user defined volume locations.
Encryption cipher and keysize are now user definable. (kernel support required)
Moved storage of volume information from /mnt/sdcard/luks/.data to /data/data/com.nemesis2.luksmanager/.data
Prompts to upgrade if loop device files are found in SDCard .data directory.
Removed top level restriction on file explorer activity.
Default file system changed from EXT4 to EXT2.
FAT file system support now enabled by default.
Added volume mount and unmount desktop shortcuts.
Added notification when volumes are mounted. (Can be toggled off in preferences)
Added landscape support to the main and volume edit activities.
Added basic SDcard support to install binaries routine.
(Fixes java.lang.NullPointerException on binary install.)
Added toggle to disable binary hash checks on startup. This enables
customized luks scripts and/or binaries.
Small fix to application initialization. (hopefully fixes odd reboot
issue on some devices)
Attempts to unmount volumes on ACTION_SHUTDOWN and MEDIA_EJECT broadcasts.
Additional checks and error handling if no volumes exist.
Additional error handling in luks script during volume mounting and creation.
Added required BusyBox applet checks on startup.
About Dialog additions / changes.
Small text changes (formatting and typo fixes).
Version 2.2:
Recompiled lm.crypsetup binary under android-ndk-r6b.
Hopefully this will stop segfaults on various devices.
Version 2.1:
Added widget:
When volumes are mounted the widget will turn red and display the number of currently mounted volumes.
A single touch unmounts all volumes.
Rewrote luks script and internal routines to use busybox all the time to avoid toolbox/busybox symlink conflicts.
Added the ability to password protect the create/remove buttons, volume properties and preferences dialog.
Improved error handling in luks script on mount.
Added additional scripts: pre-mount and pre-unmount.
Added volume management Activity.
Volume mount points are now user defineable.
The volumes loopback device is now user definable.
Added an internal file editor (to edit bash scripts).
(Editor can be used outside of LUKS Manager to edit files).
Fixed Force Close when mounting with a blank password.
Version 2.0: Added Preferences Activity.
Now allows FAT formatted volumes.
(works w/FreeOTFE on windows)
Improved error handling/cleanup on failed volume creation.
Added lm.mkdosfs binary to assets.
The lm.mkdosfs binary is sha1 hashed and replaced if out-dated or changed.
Remove Binaries nows includes the lm.mkdosfs binary.
Added additional menu options to Activities.
Increased debug logging and added system probe.
(Don't enable for normal usage!)
Added option to launch Explorer on volume mount.
Redirected stderr to stdout using redirectErrorStream.
Added validation checks to volume creation. (non-blank, sanitize filename).
Moved to dp units instead of pixels for display scaling.
Fixed a few items that needed to be .destroyed (oops).
SD Card path fix (typo fix).
File Explorer now saves/recalls list view position on directory changes and when opening files.
About Dialog updates.
Added run script on mount/unmount: <volume>.mount.sh and <volume>.unmount.sh
Added su/root check on startup.
Version 1.9:Renamed cryptsetup to lm.cryptsetup to avoid overwriting pre-existing copies.
LUKS script will use cryptsetup if it exists, solves Samsung Galaxy S2 issues.
(Users will need to manually restore the cryptsetup binary if it was overwritten!)
Added sanity checks to File Explorer. (path /mnt/sdcard must exist)
File Explorer now saves and restores path on rotation change.
Moved about html to assets file instead of an inline string.
Version 1.8: Removed Internet Access Permission (decided not to include ads).
The cryptsetup binary is no longer UPX compressed in an attempt to improve compatibility.
The cryptsetup and luks binaries are now sha1 hashed and replaced if outdated or changed.
Since "Unmount All" can take a while to complete it has been changed to an AsyncTask.
When mounted all volumes will get chmod 777 applied recursively to avoid file permission issues.
Numerous improvements and changes to the internal file explorer.
Slight wording changes to activity titles and About Dialog.
Added change log to About Dialog.
Version 1.7: Added file explorer (no longer requires ASTRO File Manager)
Updated the About Dialog
First Market Release
Version 1.6: updated and optimized the icon and background images
Updated the About Dialog
Updated failure logging to syslog
Version 1.5: now quotes passwords (oops)
Spaces in volume names are converted to underscores: _
About dialog updated
Version 1.4: code refactoring
Added about/homepage menu items
Added "Remove Binaries" to remove /system/bin files: luks and cryptsetup
Added explore menu option to explore to volume location (requires Astro Filemanager)
Added background
Version 1.3: moved binaries into apk and added extractor/binary installer
Version 1.2: first public release
Screen Shots
Any Kernals for the OTA Sense
Nemesis][ said:
Introduction
This is my first Android application and I'm looking for testers and feedback.
LUKS Manager
LUKS Manager provides on-the-fly encryption (AES by default) to virtual folders on Android devices.
The virtual folders can be dynamically mounted, unmounted, created and deleted as needed.
(Think TrueCrypt like functionality)
Volumes and loopback device information are stored in: /mnt/sdcard/luks/.data
And the encrypted volumes are mounted at: /mnt/sdcard/luks/<volume_name>
Requirements
The Android device must:
Be rooted
Have a kernel that supports secure dm-crypt modes and loopback devices
Have a current version of BusyBox installed
Have SuperUser app installed
This package contains:
A statically compiled, stripped and UPX compressed version of cryptsetup for the ARM using the tools provided by the Guardianproject.
A bash shell script called "luks" that does volume management.
And a native java app that provides a GUI interface to the luks script.
Download
You can find more on the apps homepage at:
nemesis2.qx.net/pages/LUKSManager/
(I've been a long time lurker but since I'm a first time poster I'm not allowed to post this is the main Android App Dev section nor am I allowed to post external links. )
Screen Shots
Click to expand...
Click to collapse
Hi I was wondering if you knew any kernals for the Gingerbread sense OTA cuz ive been looking around for some but i couldnt find any. THX if you reply
h4ck0rk1d said:
Hi I was wondering if you knew any kernals for the Gingerbread sense OTA cuz ive been looking around for some but i couldnt find any. THX if you reply
Click to expand...
Click to collapse
This has been mentioned again and again, there will bo NO custom kernels for the 2.3 update until the source is released. Be patient.
Sent from my MiuiSpeedy
Won't download the full file on my phone using the stock browser and dolphin HD. 1 star because I can't install it. Just joking, but can you put up a mirror please? The download link seems to work fine in Chrome, but mobile browsers it seems to crap out on.
Sent from my PG06100 using XDA App
Download Fixed (I believe)
OK. I believe I've fixed mobile downloads on the server so please try again.
And I've also updated LUKS Manager to v1.4. (lots of little fixes, tweaks)
-N2
Here's a pretty icky bug report for you: LuksManager fails to create a volume if you use spaces in the password.
Ron Overdrive said:
Here's a pretty icky bug report for you: LuksManager fails to create a volume if you use spaces in the password.
Click to expand...
Click to collapse
Thanks for catching that. Version 1.5 should now quote passwords properly.
Any other issues? (I know I should validate user input more on volume creation; but the luks script should handle failures gracefully.)
-N2
Released v1.6
Version 1.6 notes:
Images updated and optimized using optipng.
Updated the about box text.
Added additional failure logging to syslog.
And did a small bit of code cleanup.
just tried this on my hero and its almost very good it seems to create, mount and unmount ok but i'm getting an error that it cant find mkdir (i think this might be because my busybox is in /system/xbin rather than /system/bin?) and also the graphics for the buttons dont seem to resize so on a low resolution screen they overlap and arent readable.
clarkk said:
just tried this on my hero and its almost very good it seems to create, mount and unmount ok but i'm getting an error that it cant find mkdir (i think this might be because my busybox is in /system/xbin rather than /system/bin?) and also the graphics for the buttons dont seem to resize so on a low resolution screen they overlap and arent readable.
Click to expand...
Click to collapse
Ok, I switched over from pixels to dp units. It seems to render fine in the emulator with the display settings for the Hero. Please let me know if it works.
Nemesis][ said:
Ok, I switched over from pixels to dp units. It seems to render fine in the emulator with the display settings for the Hero. Please let me know if it works.
Click to expand...
Click to collapse
Thanks looks great now on the screen, still have a problem mounting though, could it auto-detect the location of busybox or have a changeable option?
Some feature recomendations to consider:
* auto-mount select volumes on startup
* auto-dismount all volumes on shutdown
* auto-dismount all volumes on X number of failed lockscreen attempts
* graphical support for moving/linking directories/files into encrypted volumes (so we can link our folders for downloads, camera, dropbox, etc. to the volumes directly)
Sent from my PG06100 using XDA App
Doesn't work on HTC DesireHD/Android 2.3.3 and Tattoo/Cyanogenmod 7.0.3
Code:
# dd if=/dev/zero of=1.vol bs=1024k count=1024
# lm.cryptsetup luksFormat 1.vol
lm.cryptsetup luksFormat 1.vol
...
Verify passphrase: 1
device-mapper: reload ioctl failed: Invalid argument
Failed to setup dm-crypt key mapping for device /dev/loop0.
Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for more info).
#
Relevant syslog lines
Code:
<3>[ 3257.202941] device-mapper: table: 254:0: crypt: Error initializing ESSIV hash
<4>[ 3257.203338] device-mapper: ioctl: error adding target to table
Looks like kernel problem... Any way to fix? YES.
Compile sha256_generic.ko as module, insmod it and all works normally.
Important note - kernel compilations with default NDK toolchain creates
broken module - kexec error - bad relocations: 27 - R_ARM_PLT32.
To compile correct module for your kernel use code sorcery arm compiler.
Details -on cyanogenmod's "compile kernel" page.
on which roms it is working ? i have zte blade - i know wrong topic but what rom should i install to have it working ?
xtam said:
on which roms it is working ? i have zte blade - i know wrong topic but what rom should i install to have it working ?
Click to expand...
Click to collapse
I think it'll work on any rom that has root, but I could be wrong. I use the latest CyanogenMod Nightlies.
Xtam, 2.0 GUI starts working for me with cyanogen 7.x ROM. It requires sha256_generic.ko module for aes-cbc-essiv cipher (FreeOTFE volume), but aes-cbc-plain volume works without additional modules.
Ron Overdrive said:
Some feature recomendations to consider:
* auto-mount select volumes on startup
* auto-dismount all volumes on shutdown
* auto-dismount all volumes on X number of failed lockscreen attempts
* graphical support for moving/linking directories/files into encrypted volumes (so we can link our folders for downloads, camera, dropbox, etc. to the volumes directly)
Click to expand...
Click to collapse
Ron,
I'll look into/consider adding some of those. I've add some code to unmount the volumes on shutdown but I'm not 100% sure it's working properly.
I like the idea of unmounting them all on after X number of failed lock screen attempts. Not quite sure how I can hook into that however.
In version 2.1 you can set the mount point; not sure if I'll write a GUI interface for symlinking however.
-N2
I'm having problems unmounting volumes in 2.1. Whenever I attempt to unmount a volume it tells me without any errors its unmounted, but when you try to remount the volume or check the status its still mounted.
I have a Samsung Infuse which is basically an i9000 galaxy S with a bigger screen and like most galaxy S devices I know of, it has internal storage which is mounted to /mnt/sdcard and an external sd card which is mounted to /mnt/sdcard/exteral_sd. I really like the app and it works perfectly, however I have a problem. It wants to create the volume on the internal sdcard instead of the external one. I edited the lukspath in the luks script but it keeps overwriting it when I start up the gui and go to create a volume. Is there a way to make this setting stick in the luks script without recompiling? Or could you update the app to allow people to change where it creates the volume? I just need to be able to create a volume in /mnt/sdcard/external_sd/. Thanks!
Nice app, thank you Nemesis.
Another suggestion for improvement: it would be nice to be able to change a volume password.

[Q] How to get this slab to move optimally

I bought this slab for my kids and wanted to get the most of it, of course XDA is where I turn to in my time of need. So, I read all the tutorials and here is where I am at:
1. Rooted with Uruk 1.0
2. Set Comp Cache to 100Mib
3. Set Swap to 100
4. Removed buttons and installed button savior
It still feels sluggish, but definitely better than stock firmware. I realize this thing is not a Ferrari, but I feel it can be snappier. What other tweaks can I do to get maximum horsepower and not care about battery? I want this thing to run full throttle. What can you guys recommend?
Archos 70s
A few thoughts
rezn said:
1. Rooted with Uruk 1.0
Click to expand...
Click to collapse
This is a good start
rezn said:
2. Set Comp Cache to 100Mib
3. Set Swap to 100
Click to expand...
Click to collapse
I think this is what's helping kill you...
Compcache is a chunk set aside from free system ram (we only have 256mb!!!), then compressed - not a very nice operating environment, but helps when theres more in memory than can be held, it'll ship the less used things to the comp - Honestly, I don't think you should go more than 15-25% of total system ram on this setting, you dont want to kill your fast, albiet small memory.
I think swap kinda sucks, even though I keep a small one on my system, but that's mainly because of the smallish spec we have to deal with... I usually dont keep this too big either - everything that gets shipped there by the system takes FOREVER to load. Maybe it works better mounted on a really fast sdcard, but I think it would be negligible.
My thoughts? Set compcache to 24-32mb and swap to 2x your compcache.
rezn said:
I realize this thing is not a Ferrari, but I feel it can be snappier. What other tweaks can I do to get maximum horsepower and not care about battery? I want this thing to run full throttle.
Click to expand...
Click to collapse
What you do with your cpu scaling has a major part to do with power, both horses and battery.
If you don't care about your battery life, set your power management to overdrive, set the cpugovernor to performance, and read up on this thread http://forum.xda-developers.com/showthread.php?t=1169625 , it will help you lock your cpu down after boot, so nothing non-SU can hijack your speeds.
Start there, and see how it runs
Thanks wokker! You provided some great information and helped me understand those compcache and swap settings better. I am going to try everything and do your suggestions and then will let you know how it goes.
Add'l recommendations
Some other tweaks you can try with a rooted Archos is the SuperCharger Script: http://forum.xda-developers.com/showthread.php?t=991276. I used Option 6 - Balanced. If you need to change your busybox version download Busybox from Stephen (Stericson). Busybox installer from jrummy16, as much as i prefer that, doesn't install correctly on my 70IT.
And SD Speed Increase from the market, based on the script from here: http://forum.xda-developers.com/showthread.php?t=1010807, to increase the cache size for SD Card reading. 2MB is the standard choice (By default the Archos only has 128kb allocated!)
Oh and turn off Live wallpapers, as nice as it looks it really bogs down the tablet!
gersto said:
Some other tweaks you can try with a rooted Archos is the SuperCharger Script: http://forum.xda-developers.com/showthread.php?t=991276. I used Option 6 - Balanced. If you need to change your busybox version download Busybox from Stephen (Stericson). Busybox installer from jrummy16, as much as i prefer that, doesn't install correctly on my 70IT.
Click to expand...
Click to collapse
I've been using AutoKiller Memory Optimizer - and from what I read in the link above is that this SuperCharger script is pretty much the same - but what about the other tweaks AKMO allows, does the SC script change those settings too?
Honestly, I like AKMO (enough to donate even!), and have been using it for sometime on my G1 and A101 (with great success, it really helps optimize everything), but don't like the load time at boot to enact all the settings, so if there's a way to script the changes I want, I would rather that.
Anyone with a bit more linux/android knowledge care to help? (I only know enough to be dangerous!)
Nope.
Nothing does what V6 SuperCharger does.
Not AKMO, Not AMM, not any minfree tweaker.
Because nothing actually fixes messed up OOM Groupings and Priorities.
As proof, nothing eliminates launcher redraws.
Except for V6.
As for the other tweaks, I'm including pretty much all the best tweaks that I can find with V8 SuperCharger - I want to implement a total system optimization.
For starters, see the following post for the 3G TurboCharger and Kick Ass Kernel Tweaks...
http://forum.xda-developers.com/showpost.php?p=15808025&postcount=208
A taste of V8... you can grab 3G TurboCharger & Kick Ass Turbo Tweak Installers from here...
3G TurboCharger and Kick Ass Kernel Tweaks
You can modify the 3G script to add metalspring's additional build.prop entries
zeppelinrox said:
For starters, see the following post for the 3G TurboCharger and Kick Ass Kernel Tweaks...
http://forum.xda-developers.com/showpost.php?p=15808025&postcount=208
Click to expand...
Click to collapse
Are these going to work alright on our systems?
V6 seems to be doing alright, but I had to heavily modify the KickAssKernel script to work on my system, and even then, I could only get the kernel tweaks to take, none of the cfq io scheduler tweaks, normalized sleeper, or noatime are going, but I'm not familiar enough with linux commands to really control the situation.
This is how I got the kernel tweaks to run:
Code:
sysctl -w vm.swappiness=0
sysctl -w vm.oom_kill_allocating_task=0
sysctl -w vm.panic_on_oom=0
sysctl -w vm.dirty_background_ratio=60
sysctl -w vm.dirty_ratio=95
sysctl -w vm.min_free_kbytes=4096
sysctl -w vm.vfs_cache_pressure=10
sysctl -w kernel.panic=0
sysctl -w kernel.panic_on_oops=1
sysctl -w kernel.msgmni=2048
sysctl -w kernel.msgmax=64000
sysctl -w kernel.shmmax=268435456
sysctl -w kernel.sem='500 512000 64 2048'
sysctl -w kernel.sched_features=24189
sysctl -w kernel.hung_task_timeout_secs=0
sysctl -w kernel.sched_latency_ns=18000000
sysctl -w kernel.sched_min_granularity_ns=1500000
sysctl -w kernel.sched_wakeup_granularity_ns=3000000
sysctl -w kernel.sched_compat_yield=1
sysctl -w kernel.sched_shares_ratelimit=256000
sysctl -w kernel.sched_child_runs_first=0
sysctl -w kernel.threads-max=5000
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 vm.dirty_writeback_centisecs=2000
sysctl -w vm.dirty_expire_centisecs=1000
The KickAssKernel would return ALOT of errors, until I cleaned it up to the above, then it all took just fine.
I would really like to get the other tweaks going... any suggestions?... Seems these systems with the Uruk CFW dont play exactly the same as others...
EDIT: I have tried the KickAssKernel Installer, the kernel tweaks take, but everything else (cfq, sleeper, etc.) errors out with a syntax error: unexpected line - I have tried to clean the cfq code in it's simplest form to:
Code:
for i in $(ls -d /sys/block/*)
do
echo "cfq" > $i/queue/scheduler
done
Still returns a syntax error...
Question
Does anyone know if JIT vm is enabled in UrukDroid?
wokker666 said:
EDIT: I have tried the KickAssKernel Installer, the kernel tweaks take, but everything else (cfq, sleeper, etc.) errors out with a syntax error: unexpected line - I have tried to clean the cfq code in it's simplest form to:
Code:
for i in $(ls -d /sys/block/*)
do
echo "cfq" > $i/queue/scheduler
done
Still returns a syntax error...
Click to expand...
Click to collapse
It may be a busybox issue. What version are you running?
zeppelinrox said:
It may be a busybox issue. What version are you running?
Click to expand...
Click to collapse
I'm running 1.17.2 - Comes stock with UrukDroid
wokker666 said:
Code:
for i in $(ls -d /sys/block/*)
do
echo "cfq" > $i/queue/scheduler
done
Still returns a syntax error...
Click to expand...
Click to collapse
Try...
Code:
for i in /sys/block/*/queue/scheduler
do
echo noop > $i
done
To see what schedulers that you have available type this in terminal:
cat /sys/block/*/queue/scheduler
You'll see a bunch of lines that look like this "noop anticipatory deadline [cfq]"
The one in the brackets is what is being used, the others are available options.
For our phones, noop or deadline are preferable.
zeppelinrox said:
Try...
Code:
for i in /sys/block/*/queue/scheduler
do
echo noop > $i
done
To see what schedulers that you have available type this in terminal:
cat /sys/block/*/queue/scheduler
You'll see a bunch of lines that look like this "noop anticipatory deadline [cfq]"
The one in the brackets is what is being used, the others are available options.
For our phones, noop or deadline are preferable.
Click to expand...
Click to collapse
That worked, got my scheduler running noop now, it was running anticipatory - after reading up on the different schedulers, dosen't seem efficient for flash memory that's for sure!
Making this unit better one tweak at a time!
Awesome... I'm really glad it worked!
It's tough when something works on one configuration but it's a syntax error on another.
Looks like I should tweak the tweak script
Updated the 3G and Kernel scripts...
Included the above adjustment as well as a couple of other things...
Oh yeah... V6 SuperCharger is on XDA's front page!
Link to article: http://www.xda-developers.com/android/make-the-best-out-of-your-android-device-with-v6-supercharger/
zeppelinrox said:
Oh yeah... V6 SuperCharger is on XDA's front page!
Link to article: http://www.xda-developers.com/android/make-the-best-out-of-your-android-device-with-v6-supercharger/
Click to expand...
Click to collapse
Well deserved i must say!
I'll have to try the 3G and kernel tweaks on my Eris and the Archos70....
Thank you
I had to update the 2 scripts again... the kernel script wasn't doing the noop/io schedular stuff or noatime...
Sorry
zeppelinrox said:
Thank you
I had to update the 2 scripts again... the kernel script wasn't doing the noop/io schedular stuff or noatime...
Sorry
Click to expand...
Click to collapse
Heh, I wouldn't worry about it, I'm pretty positive everyone here on xda, and everywhere else really appreciates your work, keep it up!!!
One thing I might suggest (if it's even possible), you may want to put some cpu governor settings and locks in your script, make a few different choices available.
I've really noticed a huge difference in performance ever since I reset the gov, and locked in the settings so nothing non-SU can hijack the values. (It may not be for your script though, so many different units out there with wildly different specs)
This is the gov / lock script I use: (thank you arpruss!)
Code:
cd /sys/devices/system/cpu/cpu0/cpufreq
echo interactive > scaling_governor
chmod 644 scaling_max_freq
echo 100000 > scaling_max_freq
chmod 444 scaling_max_freq
chmod 644 scaling_min_freq
echo 800000 > scaling_min_freq
chmod 444 scaling_min_freq
This has completely locked my cpu to progs that arent determined enough to use SU capability, i.e. Netflix (likes to clock you down when more is needed)
Reference thread: http://forum.xda-developers.com/showthread.php?t=1169625
You may also (again, if it's possible) want to leave *vm.swappiness=0* as a choice to the user - some like to use compcache and swap, and if the kernel tweak goes thru unchecked, the user will have their swap disabled and not even know it, and to boot, the system will start the swap services, reserve the space for them, and just never use them!
I had thought about including overclocking related settings but decided against it as I'm pretty sure that no one set of tweaks would apply to all roms.
I was actually going to leave the swappiness out for the same reason - not all roms have swap. But I forgot to remove it
zeppelinrox said:
I had thought about including overclocking related settings but decided against it as I'm pretty sure that no one set of tweaks would apply to all roms.
Click to expand...
Click to collapse
Not so much overclock settings, because alot of roms out there don't have OC kernels, but more like 'processing efficiency' settings.
Pretty much every rom has the basic governor settings, and most of those go a little beyond offering a couple more, but not all of them give a clear cut way to select what you want.
Maybe throw some basic settings in the script - ondemand, powersave, conservative, performance - and maybe even throw in interactive for those who can use it in their roms.
*Just the thoughts of a crazy, rambling perfomance junkie*

[GSM/CDMA -- IO OPTIMIZATION] EternityProject's V(R) I/O Scheduler Kernel Module

Welcome to another EternityProject Thread....
What do we have here?
It is the V(R) Scheduler! V(R) Scheduler is a reinforcement schedule in which the number of responses necessary to produce reinforcement varies from trial to trial.
It will produce an high rate of responding greatest activity of all schedules and responding rate is high and stable.
What do we need?
1. Willing to download something and pulling it on your phone
2. Absolutely no patience.
Download:
V(R) Scheduler Kernel Module: HERE
How to activate it:
Method 1:
1. Download it and.. cp /sdcard/downloads/vr-iosched.ko /tmp/
2. Insert it, so... insmod /tmp/vr-iosched.ko
3. Activate it. I use AnTuTu CPU Master Free: Advanced, I/O Scheduler: vr - then Apply.
Method 1 won't persist after a reboot.
Method 2:
1. Download it and.. cp /sdcard/downloads/vr-iosched.ko /tmp/
2. Use this script (AS ROOT on an app like Script Manager) for insmodding and setting it at boot time:
Code:
insmod /tmp/vr-iosched.ko
echo vr > /sys/block/mmcblk0/queue/scheduler
echo vr > /sys/block/mmcblk1/queue/scheduler
Method 2 persists after a reboot if the script is set on Script Manager (or similar) to be executed as ROOT and at every boot.
The Eternity Project Team Manager,
--kholk
Oh cool! Downloading it now!
When I run the script it says that the file cannot be found.
Where do I have to place the file?
Sorry but how do u download it... im on my phone and it just takes me to the website with a bunch of codings
Edit: ok i got it and i did method 2 with script manager... how do i kjnow if it is runnig?
Sent from my DROID RAZR using xda premium
Aashrey99 said:
When I run the script it says that the file cannot be found.
Where do I have to place the file?
Click to expand...
Click to collapse
You have to place the file in /tmp/
blkghost22 said:
Sorry but how do u download it... im on my phone and it just takes me to the website with a bunch of codings
Edit: ok i got it and i did method 2 with script manager... how do i kjnow if it is runnig?
Sent from my DROID RAZR using xda premium
Click to expand...
Click to collapse
You can check that it is running in two ways:
1. Download AnTuTu CPU Master Free and if the selcted iosched governor is vr it is working.
2. Open a root shell and type:
cat /sys/block/mmcblk0/queue/scheduler
cat /sys/block/mmcblk1/queue/scheduler
If the output contains "[vr]" and other schedulers (not closed in []) then it is working.
Note that the first method can give bad results on the "test" because I don't know if it is using the same method I'm using to apply the V(R) iosched to the disks. In any case, both will work (applying with CPU Master or with my script).
My scripts just makes sure that the scheduler is applied to both the internal eMMC and the external SDCard.
How do i download it every time i click on the link it opens the binary code!
therazrguy said:
How do i download it every time i click on the link it opens the binary code!
Click to expand...
Click to collapse
Right Click, "Save link as"
Working perfectly on XT910K
Much more responsive than before
Thanks!
Added script with ROM toolbox
Neutron90 said:
Right Click, "Save link as"
Click to expand...
Click to collapse
does it improve my benchmark performance?
Mine improved, since I/O scores and cpu scores go right up.
And scrolling is much more smoother....less spit second lags...
Keep up the good work Kholk!

new to init.d - guide?

Just starting to look into writing my own init.d (for use with perseus kernel for example.)
can any one point me in the right direction for a beginners guide to init.d?
I have searched but it is mainly linux in general that comes up - nothing specific to Android or the GSIII.
thanks
found this, which seems a very good start.
Beginner's Guide to init.d Scripts
init.d scripts has to be copied to /system/etc/init.d. All scripts in init.d are automatically executed after booting. (in Siyah, 30 seconds after booting)
I) How To:
1) In an editor such as notepad++, type #!/system/bin/sh
This should be the first line of all shell scripts. This invokes the compatible shell to execute our scripts.
2) From next line, type in your scripts line by line. After saving, push it to /system/etc/init.d using root explorer.
3) Use Script Manager from market to run the script as root to make sure there are no errors. (if you're confident of your script, then no need of script manager)
note: if you use editors such as wordpad to create a script, the carriage return leaves some 'invisible' illegal characters in the script and hence the script will fail to execute. So use editors such as notepad++, or use script manager itself to make the script.
4) If there are no errors when you run using script manager, then navigate to the script and set the following permissions:
owner: read,write
group: read
others: read
Also check 'set UID' and 'set GID'.
Now you're all good to go. Your script will be executed each time you reboot.
II) References:
We can use init.d scripts to perform a lot of things.
Refer post 2 from Q&A (courtesy kwerdenker)
http://forum.xda-developers.com/show....php?t=1325831
Use this post as a reference on how to tweak or change Cpu Frequencies/Voltages, Gpu Frequencies/Voltages, Bus Speed, I/O Scheduler, Charge Current, etc.
Apart from these, you can also tweak sched_mc values, change backlight response curve, change upper and lower thresholds for second-core-active (for screen-on and screen-off), etc.
III) Examples:
1) sched_mc
Ex:
echo "1" > /sys/devices/system/cpu/sched_mc_power_savings
This cause filling cpu0 (1st core) first for long running threads and processes.
Valid values are 0, 1 and 2
2) Second Core Active Threshold
Ex 1:
echo "70" > /sys/module/pm_hotplug/parameters/loadh
echo "25" > /sys/module/pm_hotplug/parameters/loadl
During screen on, This causes cpu1 to kick-in only after the load on cpu0 reaches 70% and cpu1 to turn off when load is less than or equal to 25%
Ex 2:
echo "90" > /sys/module/pm_hotplug/parameters/loadh_scroff
echo "35" > /sys/module/pm_hotplug/parameters/loadl_scroff
During screen off, This causes cpu1 to kick-in only after the load on cpu0 reaches 90% and cpu1 to turn off when load is less than or equal to 35 %. Useful to control power drain when you're listening to music when screen off, etc.
3) Tweak brightness Response Curve
Ex:
echo "30" > /sys/class/misc/brightness_curve/min_bl
echo "24" > /sys/class/misc/brightness_curve/max_gamma
This means any brightness value below 30 will have 0 gamma and brightness level above 30 will be linearly mapped to [0:24] gamma levels.
30 & 24 are stock values. Beta 16 will have voodoo color support as well. Use Voodo Screen Tuning R&D app from market to experiment and play around with yur SAMOLED screen.
4) Tweak Governors
Ex:
echo "85" > sys/devices/system/cpu/cpufreq/ondemandx/up_threshold
This means when ondemandx is used, the polling function scales cpu up to next frequency when cpu is 85% loaded w.r.t current frequency.
Many thanks to droidphile

[SCRIPT] MySwap v1.0 (SD and NAND) 13/11/2013

THIS IS A SCRIPT TO HAVE SWAP AND NOT A ROM!
I tested the swap on "CM10.x" by volk204 but there isn't a reason it shouldn't work on other rom versions.
version 1.0 13/11/2013 18:29 GMT+2
I experienced some lag with my wave due to its low ram memory. So after testing a few things i found myself more comfortable with setting up swapfile on sd card(NAND memory); after few minutes this terminal becomes really smooth. (It strangely is faster than setting it up on the phone memory, atleast for me)
The idea is mine, but checking around i found that many other script were made. I got the sleep line to boot part idea from "Defiant07 @ XDA" (http://forum.xda-developers.com/showthread.php?t=2359182). Everything else (as simple it is it's all mine)
Swap is the *nix term for virtual memory, that maybe many are familiar with on windows.
You set up a partition/file and use that as virtual memory. It will be much slower than real ram, but it will be much faster than reloading everything from disk everytime.
Code:
#!/system/bin/sh
# This script was authored by Defiant07 @ XDA. If you use/redistribute it, eve$
# Thanks to zeppelinrox most of all, but also many thanks to dk_zero-cool & gu5$
# Much thanks to pikachu01 @ XDA for permission to use the sysctl tweaks from T$
# Read Karl Marx!
# Nearly entirely modified by skyglow
swapfile="/storage/sdcard0/swapfile"
#swapsize in KB
swapsize=524288
swappiness=90
vfs_cache_pressure=100
dirty_background_ratio=5
dirty_ratio=20
dirty_writeback_centisecs=500
dirty_expire_centisecs=200
while [ ! "`ps | grep -m 1 [a]ndroid`" ]; do sleep 10; done
if [ ! -f "$swapfile" ]; then
dd if=/dev/zero of=$swapfile bs=1024 count=$swapsize
mkswap $swapfile
fi
# sleep 30
# mkswap $swapfile
swapon $swapfile
busybox sysctl -e -w vm.swappiness=$swappiness
busybox sysctl -e -w vm.vfs_cache_pressure=$vfs_cache_pressure
busybox sysctl -e -w vm.dirty_background_ratio=$dirty_background_ratio
busybox sysctl -e -w vm.dirty_ratio=$dirty_ratio
busybox sysctl -e -w vm.dirty_writeback_centisecs=$dirty_writeback_centisecs
busybox sysctl -e -w vm.dirty_expire_centisecs=$dirty_expire_centisecs
exit 0
Requirements
Superuser rights on terminal to change permission and copy this file
Configuration
1) set up "swapfile" field to where you want your swap
2) set up "swapsize" field to an appropriate value in KB! ( i think you should try values over 307200 => 300MB to have performance improvements)
(SD or NAND version)
SD version
size=512 MB
position=sdcard root
NAND version
size=300MB
position=bada application partition
How to install
1) Download the right zip from this page
2) Extract the file from the zip
3) Upload the file in some way on the phone
4) Become superuser
5) move it to "/system/etc/init.d"
6) this file should keep hits name "99myswap"
7) change permissions of "99myswap" to 755
8) change its rights to "root:shell"
9) done, next reboot your swap will be set up automatically
P.S.
How to check if swap is activated:
Open terminal
cat /proc/swaps
Swap filename should be displayed with the right size
[ADDED DEBUG SCRIPT]
Possible problems
1) System hangs on cyanogen loading screen ( rotating circle)
INVESTIGATING
2) Battery charge lasts less.
Any kind of virtual memory use more electrical power to perform write/read on disk (SD). This is a side effect of swap.
3) File format
*NIX file format is LF and not CR-LF (for reference why this happens http://en.wikipedia.org/wiki/Newline#Representations)
You can't edit the file with windows notepad, but use something else such as notepad++ and save it in LF coding.
4) System is slower
Possible causes are:
a) you have applications on the same filesystem where you placed the swap
b) your memory (such as SD card) is too slow. Swap will work, it will just go much slower. Try it with a better sd. I tested it with a class 4 and class 10 sdcard and they both speed up. I don't have any possibility at the moment to test a class 2. (reference http://en.wikipedia.org/wiki/Secure_Digital#Speeds)
5) How to change permissions (thanks Eltjo for copy paste from your answer)
Open terminal
Type: su
Type: cd /system/etc/init.d
Type: chmod 0755 99myswap
Type: chown root:shell 99myswap
6) zRam
On my mobile it's faster if i disable zRam from Settings > Performance > Memory Management > zRam .
Anyway i think outcome may change. Try both solutions.
could be possible to use free nand memory as swap instead of sd card?
cfernr said:
could be possible to use free nand memory as swap instead of sd card?
Click to expand...
Click to collapse
I added the NAND version that installs itself in the bada partition. If you installed the sd version remember to remove the swapfile.
darklight2k2 said:
I added the NAND version that installs itself in the bada partition. If you installed the sd version remember to remove the swapfile.
Click to expand...
Click to collapse
lets try both, thank you very much
no problem.
DEBUG REQUEST
Who had the loading screen on cyanogen circle may tell me which sd card class have?
The following procedure do not install the script, it just will work till reboot.
may them try to upload the script in a generic directory such as /storage/sdcard0 and execute it with
su
cd /storage/sdcard0
sh ./99myswap
I'd like the output of that command and the resulting /proc/swaps
then use the phone, (play/call/charge/reboot)
next boot start the script again please and tell me the resulting /proc/swaps again
Thank you for the help
seems work on my phone.
installed swapfile on nand and ram increased 30mb, but low improvement in real performance.
need to change zram options, but cant find this on my phone, maybe due to language discrepancy. can you explain better?
thank you a lot
I also cannot find zram a options under B.U.X V3.1 (4.3.1 CM10.2) by Tigrouzen
If you don't have the menu for zRam it's disabled by default. To see it you should enable all developer settings.
Settings > About phone > Build number (tap 7 times)
Some more tweaks will unlock.
saltcushy said:
I also cannot find zram a options under B.U.X V3.1 (4.3.1 CM10.2) by Tigrouzen
Click to expand...
Click to collapse
Unfortunally i didn't test that rom yet but i think the procedure above will work.
darklight2k2 said:
If you don't have the menu for zRam it's disabled by default. To see it you should enable all developer settings.
Settings > About phone > Build number (tap 7 times)
Some more tweaks will unlock.
Unfortunally i didn't test that rom yet but i think the procedure above will work.
Click to expand...
Click to collapse
tested and I have to say this is necessary if you want to enjoy a few extra mb in this phone.
I recommend nand swap because everybody have 300-400 unused mb in bada apps partition.
disabling zRAM seems also recommendable.
I hope everybody take care of this script for future ROM releases
*** I will decrease swappiness to 70 or 60, I think it is enough.
darklight2k2 said:
no problem.
DEBUG REQUEST
Who had the loading screen on cyanogen circle may tell me which sd card class have?
The following procedure do not install the script, it just will work till reboot.
may them try to upload the script in a generic directory such as /storage/sdcard0 and execute it with
su
cd /storage/sdcard0
sh ./99myswap
I'd like the output of that command and the resulting /proc/swaps
Thank you for the help
Click to expand...
Click to collapse
i've a samsung class 10 32gb.
i've not run the script with sh command, just copied it to /system/etc/init.d (aplied chmod and chown) and reboot the phone. after that it hangs on CM circle on first boot and have to re-install the rom. wipe data/factory reset didn't help.
best regards
JonasVFC said:
i've a samsung class 10 32gb.
i've not run the script with sh command, just copied it to /system/etc/init.d (aplied chmod and chown) and reboot the phone. after that it hangs on CM circle on first boot and have to re-install the rom. wipe data/factory reset didn't help.
best regards
Click to expand...
Click to collapse
To try to solve it i need to know what happens when executed with the sh command
darklight2k2 said:
To try to solve it i need to know what happens when executed with the sh command
Click to expand...
Click to collapse
after installing the rom again it can boot the first time but hangs on the second like everybody else
running with sh it runs ok
JonasVFC said:
after installing the rom again it can boot the first time but hangs on the second like everybody else
running with sh it runs ok
Click to expand...
Click to collapse
that's why i said not install in the problem request
problem is with chown, just run the chmod 755. didn't run chown command last time and it booted second and third time
edit: nevermind, it hanged again
darklight2k2 said:
that's why i said not install in the problem request
Click to expand...
Click to collapse
i did it with 2 different ways....with a fresh install between and both hang
JonasVFC said:
i did it with 2 different ways....with a fresh install between and both hang
Click to expand...
Click to collapse
You're just posting and posting what happens but not what i asked you to do to five me information.
darklight2k2 said:
You're just posting and posting what happens but not what i asked you to do to five me information.
Click to expand...
Click to collapse
i did what you asked, read again, i ran it with sh: it runs fine!! creates the swapfile and outputs some parameters that are in the script like swapiness and others....
JonasVFC said:
i did what you asked, read again, i ran it with sh: it runs fine!! creates the swapfile and outputs some parameters that are in the script like swapiness and others....
Click to expand...
Click to collapse
Hi, @JonasVFC.
I understand you've been running the Swap version of Android v2.1 Volk204. How do you get it?.
Yo, if I install the file in the directory 99myswap indicating the first page, but I get that the system does not start, stays on constantly CM logo.
A greeting.
chapito said:
Hi, @JonasVFC.
I understand you've been running the Swap version of Android v2.1 Volk204. How do you get it?.
Yo, if I install the file in the directory 99myswap indicating the first page, but I get that the system does not start, stays on constantly CM logo.
A greeting.
Click to expand...
Click to collapse
May you guys try the following attached file please?
when it hangs may you post the logfile created in the phone directory ( you can get it from bada)

Categories

Resources