Professional Documents
Culture Documents
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
search
plus
LOGIN REGISTER
xda-developers Asus Transformer TF700 Transformer TF700 Android Development [Guide] [Dec.15] How to Tweak and
FORUMS
Tweet
Thanks: 466
Like
+1
Reply
1
Troubleshooting
Last
This guide was written for those who want to be rid of apps that dig into their
kernel at every boot. It is a simple guide to writing init.d scripts that the average
user should be able to implement.
Happy Tweaking,
Lucius
PS......ITS A CELEBRATION, BITCHES!!!!!!!
Basics:
3) User space programs load - this is where init.d scripts are invoked
Init.d scripts execute commands as if they were entered into a terminal. These
commands modify the value of parameters that in uence our devices
behaviour. They are much more exible than tweaking apps and give end users
the ability to tweak and optimize their device as they see t. They are small,
fast, clean... and awesome.
MOST THANKED
ALL-TIME
_that
2013-Mar-20 4:35
_that
2014-Nov-06 16:51
lucius.zen OP
lucius.zen OP
2014-Oct-30 23:38
2013-Nov-25 11:40
lucius.zen OP
2013-Mar-19 23:42
Requirements:
See my guide to modding and optimization for instructions on how to unlock,
https://forum.xdadevelopers.com/showthread.php?t=2198510
1/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
search
plus
LOGIN
REGISTER
January 3, 2017
Init.d Support: Needed to run init.d scripts at boot - enabled in every custom
ROM/kernel I have come across.
create/test a script and AntTek File Explorer Ex's built in text editor to edit a
script.
Root File Manager: I use AntTek Explorer Ex, it reminds me of my old linux
January 3, 2017
setup, its very functional but clean as hell. Also has a built-in text editor.
I use Android Tuner for script creating/testing. You could also use a text editor.
AntTek Explorer Ex has a built in text editor that works well. You could also use
Notepad++, its a free linux based text editor. Just avoid windows-based editors,
they leave extra spaces and invisible characters when enter is pressed.
"script manager" in Android Tuner. Put your cursor at the very top left corner to
January 3, 2017
To create a script open your text editor or select "create new script" within the
begin writing. The rst line of a script must invoke a compatible shell that will
#!/system/bin/sh
Once this line is typed simply hit enter to start a new line. I usually put an empty
line after the rst line as it makes things easier to see. Extra lines for spacing
purposes are ne so long as they are completely empty.
NOTE - Android tuner automatically appends the above line to the beginning of
all scripts. It will not be displayed in the script creator but can be found in the
nal script you save.
TIP - Do not add spaces at the end of a line. Syntax must be exact.
January 3, 2017
TIP - Adding a "#" to the front of the line instructs the shell to avoid this line,
which is essential for writing notes and keeping scripts organized.
https://forum.xdadevelopers.com/showthread.php?t=2198510
2/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
LOGIN REGISTER
search
plus
Now we can start writing tweaks. If written correctly each line that you enter
will execute a command that changes a kernel or system level parameter. This
seems daunting at rst but it is really quite easy. Once you are nished typing a
line simply hit enter to begin the next line. Here is an example of an executable
command so you know what we are talking about going forward.
The tweaks that we are interested in typically begin by identifying the value to
be written to the desired parameter:
/sys/devices/system/cpu/cpu0/cpufreq/parameter le
In order to create:
/sys/devices/system/cpu/cpu0/cpufreq/
This is where cpu parameters, and often gpu parameters, are located. These
les/parameters determine how our kernel controls our CPU. To modify our
CPU's behaviour these parameters are modi ed at boot utilizing init.d scripts.
Familiarize yourself with these les, open them up with a text editor - it's
entirely safe so long as you don't start changing values. If the name of a
3/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
voltage
REGISTER
UV_mV_table LOGIN
- sets the
table for the cpu
search
plus
GOVERNOR TWEAKS:
The CPU governor determines how our CPU behaves in response to changes in
workload. Changing the governor will impact how our CPU scales through the
freq steps available to our CPU. This has a signi cant impact on the time our
CPU spends at di erent frequency steps, which in uences e ciency,
performance, battery life, and stability. For more info about the various
governors available in android see post #1 at the following link http://forum.xda-developers.com/show....php?t=1369817
Tweakable governor parameters are located in:
sys/devices/system/cpu/cpufreq/
Various interactive governor parameters can be accessed, such as:
go_hispeed_load - Go to hispeed_freq when cpu load at or above this value
hispeed_freq - freq to bump to once go_hispeed_load is passed
If the cpu is busy between exiting idle and the timer ring we assume the cpu is
underpowered and ramp frequency up
HOTPLUG CONFIG:
The hotplug con g in Hundsbuah's Kernel allows you to control how CPU cores
are brought online as threads are processed. A thread is the smallest sequence
of instructions that can be managed independently by a process scheduler.
Threads are contained within a process. A process is the execution of
instructions contained within a program. On a single processor system multithreading (multitasking) is generally implemented by transmitting/sending
signals over a common signal path; the processor switches between di erent
threads. This switching generally happens frequently enough that the user
perceives the threads or tasks as running at the same time. If the CPU is
overloaded and a thread is queued up by the process scheduler then
lag/stuttering is likely to occur because thread switching does not occur quickly
enough to be hidden from the user. On a multi-core system threads can be truly
concurrent, with every processor or core executing a separate thread
switch between threads. However, we also do not want to bring cores online
needlessly. If a core is able to process multiple threads fast enough such that
switching is unnoticeable then it would be ine cient to bring another core
online. The hotplug con g can be found in the following location:
/sys/kernel/rt_con g/rt_con g
https://forum.xdadevelopers.com/showthread.php?t=2198510
4/14
1/4/2017
I/O TWEAKS:
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
LOGIN REGISTER
search
plus
The I/O scheduler handles read/write requests from memory (RAM and storage).
The I/O scheduler we use can signi cantly impact I/O (read/write) performance.
For more info about the various I/O schedulers available in android see post #4
in the following thread - http://forum.xda-developers.com/show....php?
t=1369817
/sys/block/mmcblk0/queue/scheduler
/sys/block/mmcblk1/queue/scheduler
Use the follIng lines to change the I/O scheduler:
hardware (ex - bluetooth), utilize various le systems (ex - NTFS), or system calls
(ex - frandom.ko). Kernels do not automatically come with all available modules,
loading only the most essential modules can reduce a kernels footprint and
can improve performance in some cases (ex - frandom.ko). For more info about
various kernel modules see post #3 in the following thread - http://forum.xdadevelopers.com/show....php?t=1369817
NOTE - You cannot download and load kernel modules from the internet. They
need to be compiled for kernel you are using.
rather than read-only (see step #5 for further instructions). Copy the module .ko
le (ex - tntfs.ko) to the following location:
/system/lib/modules
To check what modules are loaded at boot enter the following command in a
terminal:
lsmod
To load a kernel module at boot add the following line to your init.d script:
5/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
LOGIN
SYSCTL TWEAKS:
REGISTER
search
plus
This section is currently under construction, more tweaks will be posted once I
To change the TCP Congestion Algorithm add the following line to your script:
/system/xbin/sysctl -w net.ipv4.tcp_congestion_control=westwood
NOTE - For a brief explanation of TCP/IP protocols and network congestion
algorithms see the following post - http://forum.xdadevelopers.com/show...postcount=1884
FINISHING YOUR SCRIPT:
Once all your tweaks are written go through the entire script and make sure
syntax is exact - no extra spaces or characters. Save your rst script as w/e you
want (ill explain naming later) just make sure it doesn't have a le extension. I'm
talking total absence of le extensions. WHOA! WHAT! WTF YO!
NOTE - Android Tuner saves scripts by default in the "at" folder in "sdcard0"
Example Script:
Code:
#!/system/bin/sh
#CPUTweaks
echo"135013201280124012001150110010501000950900860820780750720700">/sys/devices/system/c
#GovernorTweaks
echo"40000">/sys/devices/system/cpu/cpufreq/interactive/min_sample_time
#SDTweaks
echo"vr">/sys/block/mmcblk0/queue/scheduler
echo"vr">/sys/block/mmcblk1/queue/scheduler
You can test your script using a root terminal shell (Android Tuner has a
terminal). Open a terminal, type "su", and hit enter (or select the box beside "su"
in AT). This will give you the ability to run commands as root. To test your script
enter the following command:
worked. If the values were correctly modi ed then you have o cially nished
https://forum.xdadevelopers.com/showthread.php?t=2198510
6/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
worked. If the values were correctly modi ed then you have o cially nished
writing your
LOGIN
init.d
REGISTER
rst
working
script.
search
plus
First, open your le manager, go to your root directory, and remount your
we can move our script to the init.d folder and change our scripts permissions.
The init.d folder is located here:
/system/etc/init.d
The name of your script determines the order in which it is executed. The rst
two characters determine the order of execution. The ordering is as follows -
numbers from 0-99, then letters from A-Z. The rst two letters of a script's name
are typically numbers between 0-99, this is the standard method of script
naming that most developers/tweakers use. Set the name of your script so that
it is executed in the order that you wish. Mine is set to execute rst because I
want to get kernel tweaks done as early as possible.
Once you have named your script long-press it and select "Change Permissions"
(or however this is done in your le manager). Give User, Group, and Other read,
write, and execute permissions.
Your init.d script will now optimize your tablet quickly and e ciently at every
boot. Don't get out of your chair too fast....Before doing anything else, I suggest
revelling in your awesome new-found abilities for a signi cant period of time.
Pat yourself on the back. Start referring to yourself as "a boss" if you like. You
deserve it.
CAUTION:
Although init.d scripts are easy to make, a bad script may cause boot looping.
However, a bad script does not necessarily = boot looping. I have yet to cause a
boot loop and I have written many scripts that did not work. Everything
typically boots normally, the bad lines in the script are simply not applied.
TWRP. To do so boot into TWRP and select "Backup" from the home screen. This
will allow you to restore your entire system, which is done via the "Restore" tool
in TWRP.
NOTE - Do not enable scripts to run at boot in a program like Android Tuner or
others similar to it. If the script is bad it will cause boot looping because the app
will keep trying to run it. If you put the script in the init.d folder and enable it
yourself you will avoid this issue.
SUGGESTION:
https://forum.xdadevelopers.com/showthread.php?t=2198510
7/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
SUGGESTION:
LOGIN
REGISTER
search
plus
see my guide to tweaking and optimization. It lls any gaps in this guide and
contains many useful resources. You can nd it here - http://forum.xdadevelopers.com/show....php?t=2232715
The Following 79 Users Say Thank You to lucius.zen For This Useful Post: [ View ]
snypa
Senior Member
Thanks: 59
tweakalicous...
Quote:
Originally Posted by lucius.zen
HAPPY TWEAKING,
Lucius
The Following User Says Thank You to snypa For This Useful Post: [ View ]
iamborba
Member
Thanks: 15
lucius.zen
OP
Senior Member
Thanks: 466
I accidentally stated in Step #3 that "Android saves scripts by default in the 'at'
8/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
scripts...". Changed the OP, just wanted to make sure anyone who has read it
REGISTER
damn script! Derpa a derrrr".
already isnt likeLOGIN
"WTF ZEN!
Where is my
The Following User Says Thank You to lucius.zen For This Useful Post: [ View ]
lucius.zen
OP
search
plus
Senior Member
Thanks: 466
Breaking News.....
The Following 2 Users Say Thank You to lucius.zen For This Useful Post: [ View ]
_that
Thanks: 3,770
Quote:
Originally Posted by lucius.zen
The number, or letter, at the beggining of the init.d script determines its
order of sexecution, beginning at 1 or A, and going up to 99 or Z.
The universal convention is to use a numeric pre x from 00 to 99, but in reality
the name can be anything and the scripts are simply executed in alphanumeric
order - digits come before "A". I recommend using two-digit pre xes as
intended.
https://forum.xdadevelopers.com/showthread.php?t=2198510
9/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
intended.
search
plus
LOGIN REGISTER
Quote:
Originally Posted by lucius.zen
Code:
#!/system/bin/sh
#CPUTweaks
echo"130012001150112511121100108710751050103710251012987975962950925912900887875862
Note that the UV_mV_table has a completely di erent format when reading or
writing the le - one reason why I hate this interface. But it's the "standard" that
was established by whoever hacked the rst implementation, and user mode
apps expect it like this.
Quote:
Originally Posted by lucius.zen
Although init.d scripts are easy to make, you can potentially cause boot
looping, please proceed with caution.
To repair this, boot into recovery, connect via adb shell, and do the following:
(if needed
The Following 4 Users Say Thank You to _that For This Useful Post: [ View ]
TunedFish
Senior Member
Thanks: 56
Say I tested and am currently using 10 scripts, how do I create a .zip recovery le
so I can ash/install the scripts at once, every time I re ash or factory reset my
rom?
SynnyG
Thanks: 656
Senior Member
10/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
Thanks for your awesome tuto ! But I've a question concerning the gpu
search
plus
LOGIN to
set
REGISTER
LetMeKnow
Thanks: 700
Senior Member
@lucius.zen
It is a nice write up and great tutorial. I am enjoy reading it and keep up the
good work...
The Following User Says Thank You to LetMeKnow For This Useful Post: [ View ]
lucius.zen
OP
Senior Member
Thanks: 466
Quote:
Originally Posted by LetMeKnow
@lucius.zen
It is a nice write up and great tutorial. I am enjoy reading it and keep up
the good work...
@LetMeKnow
Thanks a lot dude very much appreciated, makes me miss contributing to xda. I
made a lot of promises and left too much work un nished. I haven't been on for
6 months because I have been dealing with some pretty serious mental health
issues. Apparently I am mildly schizophrenic with comorbid anxiety and
attention issues. Been super fun times lol. Hoping to get back in the game this
holiday season, would be sweet to share some tweaking/optimization ideas, I
havent had much of a chance to check out your tweaks but I have heard great
things.
The Following 2 Users Say Thank You to lucius.zen For This Useful Post: [ View ]
Thanks: 700
Senior Member
https://forum.xdadevelopers.com/showthread.php?t=2198510
11/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
Senior Member
LetMeKnow
search
plus
LOGIN REGISTER
Quote:
Originally Posted by lucius.zen
@LetMeKnow
Thanks a lot dude very much appreciated, makes me miss contributing to
xda. I made a lot of promises and left too much work un nished. I haven't
been on for 6 months because I have been dealing with some pretty
serious mental health issues. Apparently I am mildly schizophrenic with
comorbid anxiety and attention issues. Been super fun times lol. Hoping
to get back in the game this holiday season, would be sweet to share
some tweaking/optimization ideas, I havent had much of a chance to
check out your tweaks but I have heard great things.
All the best,
Lucius
Thanks for a kind word...
little better before worrying about the contributing to xda. You do a lot for the
community already and hope you will get very soon. Please let me know
whenever you have time to talk about tweaks and more than happy to share
what I know.
The Following User Says Thank You to LetMeKnow For This Useful Post: [ View ]
Reply
Subscribe to Thread
Page 1 of 4
Last
Tags
android, init.d, script, tf700, tweak
https://forum.xdadevelopers.com/showthread.php?t=2198510
12/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
Message:
search
plus
LOGIN REGISTER
Go Advanced
Previous Thread
Next Thread
[APP][6.0+] Fingerprint Quick Action -- Let your ngerprint sensor more useful
Android Themes
xda-developers Asus Transformer TF700 Transformer TF700 Android Development [Guide] [Dec.15] How to Tweak and
XDA Developers was founded by developers, for developers. It is now a
valuable resource for people who want to make the most of their mobile
devices, from customizing the look and feel to adding new functionality.
Are you a developer?
More info
https://forum.xdadevelopers.com/showthread.php?t=2198510
13/14
1/4/2017
[Guide][Dec.15]HowtoTweakandModAndroi|AsusTransformerTF700
LOGIN
Contact Rules Suggest Content Security Privacy Policy XDA App Root Any Device Remove ads on XDA
search
REGISTER
plus
Copyright xda-developers. Hosted by Leaseweb
https://forum.xdadevelopers.com/showthread.php?t=2198510
14/14