======================================
tweaKr -an Android tuning tool
======================================
#########################################
# Preliminary draft - subject to change #
#########################################
What it is
==========
tweaKr is a menu driven shell script that gives the user an easy means of adjusting
common tuning options of the Android/Linux system.
The main tweaKr script isn't much in itself, merely a collection of reuseable
functions that take care of menu generation, custom bootscripts & other functions to
talk to various interfaces of the underlying Linux system.
The real power is the easy means for others to be able to write modules that operate
within a familiar interface...
It is aimed at anyone who has an interest... developers, end users, you name it.
As a shell script, you can run tweaKr via adb shell & adjust things in realtime
whilst another app has focus on the device eg for benchmarking or testing purposes.
Usage
=====
Eventually will end up as a flashable zip of sorts... once I have figured out the
best places to put things
As of now, tweaKr & twkr_firstrun live in /system/bin/
and the modules live in /system/bin/modules/ # this could/should probably change?
to run:
open android terminal
type su, then return
then type a comand
tweaKr - text output 43 chars, good with 12pt font in terminal emulator in portrait
tweaKr adb - text output width to 80 chars
tweaKr debug - verbose output & width 80 chars, handy when you're writing a module
What is a module?
=================
# TIP set your text editor for .twkr files to have bash or shell script highlighting
A tweaKr module (*.twkr) is nothing more than a collection of functions that get
imported on demand into the tweaKr script at runtime.
They have all the common tweaKr functions to use to generate their own menu, handle
user input, apply new settings & set these to run at boot.
-This uses the busybox run-parts applet, in particular /etc/init.d/20userinit
that looks for the directory at /data/local/userinit.d and executes run-parts
there.
-Using this mechanism, no permanent changes are being made to the base ROM & the
tweaKr script doesn't have to mount system r/w everytime it needs to amend a
script.
Ultimately, a module can do anything that you can do as root from the command line...
The template.twkr file has a heap of notes included to help in writing your own
modules as does the main tweaKr script.
Feel free to contribute code if my handling of something isn't quite working as you
want it to!... or I've done something really backwards ;)
Future Plans
============
Who knows yet... I need to get some direction from what people want to be able to do
:)
The ultimate vision would be to host this centrally at github or the like and end up
with a library of tweaKr modules contributed by the community that people can choose
from where they could be for specific devices, kernels or ROM's
Due to the power of root & possible bricks some sort of moderation by peer review could
be required before a module could be released to the wild through the official
distribution channel... ?
tweaKr CHANGELOG
0.8.41
-blank userscript is only generated upon first write
-option to set at boot - gone - was too confusing
-now always writes to userscript
-refined menu generation
-if userscript exists, gives option to restore defaults
-if info text exists, gives option to view
-reports as to whether using system defaults or whether user settings are in effect
-tidied up main header - author only appears in the "about" screen
-auto detects console width, launch opts not required
-fixed main menu generation & plugin loading
-moved plugin install location to /etc/twkr
-marginally improved debug flag
0.8.43
-created tweaKr-reset.zip
-flashable from recovery to delete all autostart entries
-gets copied to sdcard at first run
0.8.45
-changing up the common function naming
-modules now called plugins
-smartCPU
-small fixes to make it a bit more informative
0.8.46
-tidy up project folders
-prefixing *.twkr with numbers to give order to the main menu
-README changes
-fixed permissions on init.d patcher
-small bugfixes throughout thanks to nobnut & mexDroid Team
-changed methods when executing the userscripts
0.8.47
-moved install location for first_run, stop polluting bin/
-changes to twkr_firstrun.sh, better welcome message & a bit more detail about the script
-including reminders about the reset.zip :)
-started implementing a general log...
-utilities
-add function to gather log, system & device diagnostic information & package for email
-started a helper script for anyone trying to write a plugin... under tools/
0.8.48
-new function: script viewer, enables the user to view &/or delete specific lines
-more updates to the info text
-disabled sysro for now until I can figure a solution to the device busy errors
0.8.49
-major overhaul of smart_cpu
-dynamic main menu
-service disabled by default, but startup script created at install time
-much more intuitive-minor fixes to the vdd plugin
Credits
=======
Firerat, rtkirton, collins_ph & anyone else who has written complex scripts
dasmoover, spacemoose1, TheNewGuy & others for their input & help
mjybarr & the users of the meXdroidMod ROM for testing it out
License
=======
freeBSD...? still undecided as to what would be best