[MOD][GUIDE]tweak collections for build.prop/init.d - Android Software Development

1 i DIDNT made this all tweaks ... Credit goes to their Developers...
I am not responsible for your bricked phone/sd if u pointed on me i will laugh at u
Forever king Tweaks....​
Build.prop tweaks​
1 VM Heapsize; higher the RAM
Code:
dalvik.vm.heapsize=48m
2 Good JPG quality
Code:
ro.media.enc.jpeg.quality=100
3 Render UI with GPU
Code:
debug.sf.hw=1
4 Best Scrolling
Code:
windowsmgr.max_events_per_sec=150
5 Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
6 battery Saving
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
7 Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
8 Increase touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
9 Awesome photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
10 Network tweaks
Code:
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
11 Internet fast tweaks
Code:
net.tcp.buffersize.default=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.wifi=524288,1048576,2097152,524288,1048576,2097152
net.tcp.buffersize.umts=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.gprs=6144,87380,1048576,6144,87380,524288
net.tcp.buffersize.edge=6144,87380,524288,6144,16384,262144
net.tcp.buffersize.hspa=6144,87380,524288,6144,16384,262144
net.tcp.buffersize.lte=524288,1048576,2097152,524288,1048576,2097152
net.tcp.buffersize.hsdpa=6144,87380,1048576,6144,87380,1048576
net.tcp.buffersize.evdo_b=6144,87380,1048576,6144,87380,1048576
12 Fix some application issues (FC)
ro.kernel.android.checkjni=0
13 Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
14 Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
15 faster streaming
Code:
media.stagefright.enable-meta=true
media.stagefright.enable-record=false
16 Miscellaneous Tweaks for performance
Code:
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
17 Use Google DNS
Code:
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4
Init.d tweaks​
(needs ROM with init.d access and busybox, open empty file, insert header "#!/system/bin/sh" and put these there, save in /system/etc/init.d and name it something like tweak1)
1 strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2 internet speed hack tweaks
Code:
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
3 kernel tweaks
Code:
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
4 vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
5 battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6 removes journalism
Code:
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
7 increases cache size and increases speed
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8 SD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9 Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
10 Ondemand governor
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11 Governor Best: Minmax , SavagedZen , Smoothass , Smartass, Interactive
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12 Move dalvik-cache to cache partition
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
13 Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
Other tweaks (not build.prop,init.d)​
1 v6 supercharger
Code:
http://forum.xda-developers.com/attachment.php?attachmentid=591730&d=1305000576
Credit- zeppelinrox
2 Use CyanogenMOD's APN list file (fully , for every operator)
Its in system>etc
3 Use uot kitchen for Theming your rom
Code:
http://uot.dakra.lt/
4 Never use Task killer............
please hit thanks and comment if you like this guide....if using in Rom proper credits to this guide!

Related

[DEV/TOOL] Automated(ish) T-Mobile Theme Generator

A script I've been working on for a couple of days. Still a work in progress so if you suck less, I could use improvements. It's real simple:
** Put this script in a stock theme template like Cyanbread
1.) Place a source ROM you want to theme for, the base ROM/THROM you're taking images from and a stock theme template (like Cyanbread) and set them in the script at the top.
2.) Modify the script as needed (it's not done as of this writing) and set verbosity out the output, etc.
2.) Run the script and it will do the work
The code should be pretty self explanatory and I'll update it as I go. Just about finished at this point.
Screenshot shows you what it does
Code:
#!/bin/bash
# ------------------------- Set theme name TODO
# themeName=$(cat Android.mk | grep LOCAL_PACKAGE_NAME | sed 's/^LOCAL_PACKAGE_NAME\s:=\s//g')
# read -p "Enter theme name. Enter for default [$themeName]: " REPLY
# REPLY=${REPLY:-$themeName}
# echo "Theme name is $themeName"
# ------------------------- for testing to spare the parameters
SRCROM="ABSOLUTE/PATH/TO/ROOT/OF/SOURCEROM"
BASEROM="ABSOLUTE/PATH/TO/ROOT/OF/BASEROM/YOURE/THEMING/FOR"
# my example:
# SRCROM=~/GBSense2.1/
# BASEROM=~/cm_glacier_full-42/
# running this script from ~/haxzamatic-Templatebread--918313e/
DSTROM=$(pwd)
LOGFILE=$DSTROM/logfile.log
decompile_rom(){
cd $1/app
if [ ! -d $1/app/Browser/ ]; then # need apktool for drawables
#apktool if framework/framework_res.apk
#if [ -e framework/com.htc.resources.apk ]; then
# apktool if framework/com.htc.resources.apk
#fi
for i in `ls $1/app/*.apk`; do echo "Decompiling $i"; apktool d $i; done
cd ../framework
for i in `ls $1/framework/*.apk`; do echo "Decompiling $i"; apktool d $i; done
else
echo "Already decompiled"
fi
}
decompile_rom $SRCROM/system
decompile_rom $BASEROM/system
cd $DSTROM
rm $DSTROM/res/xml/*.xml
echo "" > appendleftovers.tmp
# ------------------------- Log file purge and title
cat <<EOF > $LOGFILE
*********************************************************
Missing files from $SRCROM
*********************************************************
EOF
# ------------------------- Redirections.xml
cat <<EOF > res/xml/redirections.xml
<?xml version="1.0" encoding="utf-8"?>
<theme-redirections
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:pluto="http://www.w3.org/2001/pluto.html">
EOF
# ------------------------- Android.xml
echo "<resource-redirections>">$DSTROM/res/xml/android.xml
# ------------------------- Main Loop
find "$BASEROM" -type f -name "*.png" | while read fimg; do
# ------------------------- Base Params
FIMGFNAME=$(cat $(dirname $fimg)"/../../apktool.yml" | grep "apkFileName" | sed 's/apkFileName:\s//g' | sed 's/\.apk//g' )
FIMGPNAME=$(cat $(dirname $fimg)"/../../AndroidManifest.xml" | grep "package" | tr " " "\n" | grep package= | cut -d \" -f 2)
if [ $FIMGPNAME = "android" ]; then FIMGPNAME=framework_res; fi
FIMGDNAME=$(echo $(dirname $fimg) | sed "s/\(.*\)\///" )
cd $DSTROM
if [ "$FIMGFNAME" = "framework-res" ] || [ "$FIMGFNAME" = "com.htc.resources" ]; then wp="framework"
else wp="app"
fi
# -------------------------
SRCFILEPATH=$SRCROM/system/$wp/$FIMGFNAME/res/$FIMGDNAME/$DESTFILE
SRCFILENAME=$(echo $(basename $fimg))
DSTFILEPATH=$DSTROM/system/$wp/$FIMGFNAME/res/$FIMGDNAME/$DESTFILE
DSTFILENAME=$(echo $(echo $FIMGPNAME|sed 's/\./_/g')"_$(basename $fimg)")
BSEFILEPATH=$BASEROM/system/$wp/$FIMGFNAME/res/$FIMGDNAME/$DESTFILE
BSEFILENAME=$(echo $(basename $fimg))
# -------------------------
[ -d res ] || mkdir res
[ -d res/$FIMGDNAME ] || mkdir res/$FIMGDNAME
# -------------------------
if [ -f $SRCFILEPATH$SRCFILENAME ]; then
echo "cp $SRCFILEPATH$SRCFILENAME $DSTROM/res/$FIMGDNAME/$DSTFILENAME"
cp $SRCFILEPATH$SRCFILENAME $DSTROM/res/$FIMGDNAME/$DSTFILENAME
# ------------------------- Redirections.xml
thispname=$(cat $(dirname $fimg)"/../../AndroidManifest.xml" | grep "package" | tr " " "\n" | grep package= | cut -d \" -f 2)
if ! grep -iq $thispname $DSTROM/res/xml/redirections.xml ; then
echo "<package-redirections android:name=\"$thispname\" android:minSdkVersion=\"7\" android:resource=\"@xml/$(echo $thispname|sed 's/\./_/g')\" />" >>$DSTROM/res/xml/redirections.xml
fi
# ------------------------- Android.xml
drawrsrc=$(echo $SRCFILENAME | sed 's/\(.*\)\..*/\1/' | sed 's/\.9//g')
drawrdst=$(echo $DSTFILENAME | sed 's/\(.*\)\..*/\1/' | sed 's/\.9//g')
echo "<item name=\"@drawable/$drawrsrc\">@drawable/$drawrdst</item>" >>$DSTROM/res/xml/android.xml
# ------------------------- Package Redirections
drawrfnamenoext=$(echo $drawrsrc | sed 's/\./_/g')
dstfilenameparsed=$(echo $drawrdst | sed 's/\./_/g')
dstredirfname=`echo "$DSTROM/res/xml/$(echo $FIMGPNAME | sed 's/\./_/g').xml"`
if [ ! -f $dstredirfname ]; then
cat <<EOF > $dstredirfname
<?xml version="1.0" encoding="utf-8"?>
<resource-redirections>
EOF
echo "$dstredirfname" >> appendleftovers.tmp
fi
echo "<item name=\"drawable/$drawrfnamenoext\">@drawable/$dstfilenameparsed</item>" >>$dstredirfname
else
echo "[MISSING]: $SRCFILEPATH$SRCFILENAME" >> $LOGFILE
#echo "1.) $fimg" >> $LOGFILE
#echo "2.) $FIMGFNAME" >> $LOGFILE
#echo "3.) $FIMGPNAME" >> $LOGFILE
#echo "4.) $FIMGDNAME" >> $LOGFILE
#echo "5.) $SRCFILEPATH" >> $LOGFILE
#echo "6.) $SRCFILENAME" >> $LOGFILE
#echo "7.) $DSTFILEPATH" >> $LOGFILE
#echo "8.) $DSTFILENAME" >> $LOGFILE
#echo "9.) $BSEFILEPATH" >> $LOGFILE
#echo "10.)$BSEFILENAME" >> $LOGFILE
#echo "------------------------------" >> $LOGFILE
fi
# echo "1.) $fimg"
# echo "2.) $FIMGFNAME"
# echo "3.) $FIMGPNAME"
# echo "4.) $FIMGDNAME"
# echo "5.) $SRCFILEPATH"
# echo "6.) $SRCFILENAME"
# echo "7.) $DSTFILEPATH"
# echo "8.) $DSTFILENAME"
# echo "9.) $BSEFILEPATH"
# echo "10.)$BSEFILENAME"
# echo "------------------------------"
# ------------------------- Example output:
# 1.) ~/cm_glacier_full-42/system/app/Browser/res/drawable-hdpi/fav_icn_background.png
# 2.) Browser
# 3.) com.android.browser
# 4.) drawable-hdpi
# 5.) ~/GBSense2.1/system/app/Browser/res/drawable-hdpi/
# 6.) fav_icn_background.png
# 7.) ~/haxzamatic-Templatebread--918313e/system/app/Browser/res/drawable-hdpi/
# 8.) com_android_browser_fav_icn_background.png
# 9.) ~/cm_glacier_full-42/system/app/Browser/res/drawable-hdpi/
# 10.)fav_icn_background.png
done
# ------------------------- Close out the XML tags
echo "</resource-redirections>">>$DSTROM/res/xml/android.xml
echo "</theme-redirections>">>$DSTROM/res/xml/redirections.xml
cat $DSTROM/appendleftovers.tmp | while read thistmp; do
echo "</resource-redirections>" >> $thistmp
done
rm $DSTROM/appendleftovers.tmp
echo "FINISHED:::::::::::::::::::::::::::::::::::::::::::::::::::::::"
reserved for spam

Universal Script for Android Phone

Create 00tweaks and put all the codes inside 00tweaks then put the file to system/etc/init.d
This universal script boost RAM performance.
This universal script mounts all partition as NOATIME
This universal script lessen lags on selected applications (MMS / Handcent / DialerOne)
This universal script enhances deadline scheduler
This universal script performs background process to check screen state
Click to expand...
Click to collapse
Code:
#!/system/bin/sh
#remounting the file systems with noatime and nodiratime flags to save battery and CPU cycles
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime,nodiratime $k
done
#if mounting is not successful then manual mounting will do the thing for you
mount -o remount,noatime,nodiratime auto /
mount -o remount,noatime,nodiratime auto /dev
mount -o remount,noatime,nodiratime auto /proc
mount -o remount,noatime,nodiratime auto /sys
mount -o remount,noatime,nodiratime auto /mnt/asec
mount -o remount,noatime,nodiratime auto /system
mount -o remount,noatime,nodiratime auto /data
mount -o remount,noatime,nodiratime auto /cache
mount -o remount,noatime,nodiratime auto /mnt/sdcard
mount -o remount,noatime,nodiratime auto /mnt/secure/asec
mount -o remount,noatime,nodiratime auto /mnt/sdcard/.android_secure
#flags every mounted partition as non rotational and increases it's cache size for more read speed
MTD=`ls -d /sys/block/mtd*`;
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $MTD $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "4096" > $j/queue/read_ahead_kb;
done
echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
for a in $MTD $MMC
do
echo "512" > $a/queue/nr_requests;
done
#internet speed tweaks
echo 0 > /proc/sys/net/ipv4/tcp_timestamps;
echo 1 > /proc/sys/net/ipv4/tcp_tw_reuse;
echo 1 > /proc/sys/net/ipv4/tcp_sack;
echo 1 > /proc/sys/net/ipv4/tcp_tw_recycle;
echo 1 > /proc/sys/net/ipv4/tcp_window_scaling;
echo 5 > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo 30 > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo 30 > /proc/sys/net/ipv4/tcp_fin_timeout;
echo 404480 > /proc/sys/net/core/wmem_max;
echo 404480 > /proc/sys/net/core/rmem_max;
echo 256960 > /proc/sys/net/core/rmem_default;
echo 256960 > /proc/sys/net/core/wmem_default;
echo 4096 16384 404480 > /proc/sys/net/ipv4/tcp_wmem;
echo 4096 87380 404480 > /proc/sys/net/ipv4/tcp_rmem;
#vm management tweaks
echo "0" > /proc/sys/vm/swappiness;
echo "95" > /proc/sys/vm/dirty_ratio;
echo "10" > /proc/sys/vm/vfs_cache_pressure;
echo "20480" > /proc/sys/vm/min_free_kbytes;
echo "1" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/laptop_mode;
echo "60000" > /proc/sys/vm/dirty_expire_centisecs;
echo "60" > /proc/sys/vm/dirty_background_ratio;
echo "6000" > /proc/sys/vm/dirty_writeback_centisecs;
echo "3" > /proc/sys/vm/drop_caches;
#kernel tweaks
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo 500 512000 64 2048 > /proc/sys/kernel/sem;
# use deadline scheduler
echo deadline > /sys/class/block/mmcblk0/queue/scheduler;
echo deadline > /sys/class/block/stl14/queue/scheduler;
echo deadline > /sys/class/block/stl13/queue/scheduler;
echo deadline > /sys/class/block/stl12/queue/scheduler;
echo 8 > /sys/class/block/mmcblk0/queue/iosched/fifo_batch;
echo 8 > /sys/class/block/stl14/queue/iosched/fifo_batch;
echo 8 > /sys/class/block/stl13/queue/iosched/fifo_batch;
echo 8 > /sys/class/block/stl12/queue/iosched/fifo_batch;
echo 400 > /sys/class/block/mmcblk0/queue/iosched/read_expire;
echo 400 > /sys/class/block/stl14/queue/iosched/read_expire;
echo 400 > /sys/class/block/stl13/queue/iosched/read_expire;
echo 400 > /sys/class/block/stl12/queue/iosched/read_expire;
echo 4 > /sys/class/block/mmcblk0/queue/iosched/writes_starved;
echo 4 > /sys/class/block/stl14/queue/iosched/writes_starved;
echo 4 > /sys/class/block/stl13/queue/iosched/writes_starved;
echo 4 > /sys/class/block/stl12/queue/iosched/writes_starved;
#setprop
setprop wifi.supplicant_scan_interval 600;
setprop windowsmgr.max_events_per_sec 260;
setprop ro.lge.proximity.delay 25;
setprop mot.proximity.delay 75;
setprop net.tcp.buffersize.default 4096,87380,256960,4096,16384,256960;
setprop net.tcp.buffersize.wifi 4096,87380,256960,4096,16384,256960;
setprop net.tcp.buffersize.umts 4096,87380,256960,4096,16384,256960;
setprop ro.HOME_APP_ADJ 1;
setprop ro.mot.eri.losalert.delay 1000;
setprop video.accelerate.hw 1;
setprop ro.ril.disable.power.collapse 0;
setprop pm.sleep_mode 1;
setprop media.stagefright.enable-player true;
#lowmemory
FOREGROUND_APP_MEM="2560";
VISIBLE_APP_MEM="4096";
SECONDARY_SERVER_MEM="6144";
HIDDEN_APP_MEM="17408";
CONTENT_PROVIDER_MEM="19456";
EMPTY_APP_MEM="23552";
#governor scaling awake
GOVERNOR_SCALE="ondemand";
GOVERNOR_FREQENCY_MAX="800000";
GOVERNOR_FREQENCY_MIN="245760";
SAMPLING_RATE="50000";
FREQ_STEP="40";
UP_THRESHOLD="90";
DOWN_THRESHOLD="20";
#governor scaling sleep
SLEEP_SCALE="ondemand";
SLEEP_FREQENCY_MAX="480000";
SLEEP_FREQENCY_MIN="245760";
XSAMPLING_RATE="100000";
XFREQ_STEP="15";
XUP_THRESHOLD="90";
XDOWN_THRESHOLD="20";
#locking app
LOCK_APP_IN_MEMORY_ENABLED="0"
LOCK_APP_SU="1"
LOCK_APP_DIALER="0"
LOCK_APP_MMS="0"
LOCK_APP_HANDCENT="0"
# =========
# remove lag when answering phone calls
# =========
MAX_PHONE()
{
pidphone=`pidof com.android.phone`;
if [ $pidphone ];
then
/system/xbin/echo "-17" > /proc/$pidphone/oom_adj;
renice -20 $pidphone;
if [ $MAX_APP -eq "1" ];
then
exit;
else
MAX_APP_STARTER;
MAX_APP=1;
exit;
fi;
else
sleep 3;
MAX_PHONE;
fi;
}
# =========
# remove lag from su (root)
# =========
MAX_SU()
{
pidsu=`pidof com.noshufou.android.su`;
if [ $pidsu ];
then
/system/xbin/echo "-17" > /proc/$pidsu/oom_adj;
renice -20 $pidsu;
exit;
else
sleep 3;
MAX_SU;
fi;
}
# =========
# remove lag from Clock
# =========
MAX_DIALER()
{
piddialer=`pidof kz.mek.DialerOne`;
if [ $piddialer ];
then
/system/xbin/echo "-17" > /proc/$piddialer/oom_adj;
renice -10 $piddialer;
exit;
else
sleep 3;
MAX_DIALER;
fi;
}
# =========
# remove lag from MMS
# =========
MAX_MMS()
{
pidmms=`pidof com.android.mms`;
if [ $pidmms ];
then
/system/xbin/echo "-17" > /proc/$pidmms/oom_adj;
renice -10 $pidmms;
exit;
else
sleep 3;
MAX_MMS;
fi;
}
# =========
# remove lag from HANDCENT
# =========
MAX_HANDCENT()
{
pidhandcent=`pidof com.handcent.nextsms`;
if [ $pidhandcent ];
then
/system/xbin/echo "-17" > /proc/$pidhandcent/oom_adj;
renice -10 $pidhandcent;
exit;
else
sleep 3;
MAX_HANDCENT;
fi;
}
# =========
# Background process to optimize process
# =========
MAX_APP_STARTER()
{
if [ $LOCK_APP_IN_MEMORY_ENABLED -eq "1" ];
then
if [ $LOCK_APP_SU -eq "1" ];
then
(while [ 1 ];
do
sleep 5;
MAX_SU;
done &);
fi;
if [ $LOCK_APP_MMS -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_MMS;
done &);
fi;
if [ $LOCK_APP_HANDCENT -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_HANDCENT;
done &);
fi;
if [ $LOCK_APP_DIALER -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_DIALER;
done &);
fi;
exit;
else
(while [ 1 ];
do
sleep 3;
MAX_APP_STARTER;
done &);
fi;
}
if [ $LOCK_APP_IN_MEMORY_ENABLED -eq "1" ];
then
(while [ 1 ];
do
sleep 3;
MAX_PHONE;
done &);
fi;
GOV_MODE()
{
echo "1" >/proc/sys/vm/overcommit_memory;
echo "4" > /proc/sys/vm/min_free_order_shift;
echo $FOREGROUND_APP_MEM,$VISIBLE_APP_MEM,$SECONDARY_SERVER_MEM,$HIDDEN_APP_MEM,$CONTENT_PROVIDER_MEM,$EMPTY_APP_MEM > /sys/module/lowmemorykiller/parameters/minfree;
echo $GOVERNOR_SCALE > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo $GOVERNOR_FREQENCY_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo $GOVERNOR_FREQENCY_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/sampling_rate;
echo $FREQ_STEP > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/freq_step;
echo $UP_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/up_threshold;
echo $DOWN_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$GOVERNOR_SCALE/down_threshold;
}
SLEEP_MODE()
{
echo "1" >/proc/sys/vm/overcommit_memory;
echo "4" > /proc/sys/vm/min_free_order_shift;
echo $FOREGROUND_APP_MEM,$VISIBLE_APP_MEM,$SECONDARY_SERVER_MEM,$HIDDEN_APP_MEM,$CONTENT_PROVIDER_MEM,$EMPTY_APP_MEM > /sys/module/lowmemorykiller/parameters/minfree;
echo $SLEEP_SCALE > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor;
echo $SLEEP_FREQENCY_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo $SLEEP_FREQENCY_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo $XSAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/sampling_rate;
echo $XFREQ_STEP > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/freq_step;
echo $XUP_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/up_threshold;
echo $XDOWN_THRESHOLD > /sys/devices/system/cpu/cpu0/cpufreq/$SLEEP_SCALE/down_threshold;
}
# =========
# Background process to check screen state
# =========
(while [ 1 ];
do
STATE=`cat /sys/power/wait_for_fb_wake`;
GOV_MODE;
sleep 3;
STATE=`cat /sys/power/wait_for_fb_sleep`;
SLEEP_MODE;
sleep 3;
done &);
Some brief explanation for the contents of the script
1. /proc/sys/vm/laptop_mode
How many seconds after a read should a writeout of changed files start (this is based on the assumption that a read will cause an otherwise spun down disk to spin up again).
2. /proc/sys/vm/dirty_writeba​ck_centisecs
How often the kernel should check if there is "dirty" (changed) data to write out to disk (in centiseconds).
3./proc/sys/vm/dirty_expir​e_centisecs
How old "dirty" data should be before the kernel considers it old enough to be written to disk. It is in general a good idea to set this to the same value as dirty_writeback_centisecs above.
4./proc/sys/vm/dirty_ratio​
The maximum amount of memory (in percent) to be used to store dirty data before the process that generates the data will be forced to write it out. Setting this to a high value should not be a problem as writeouts will also occur if the system is low on memory.
5./proc/sys/vm/dirty_backg​round_ratio
The lower amount of memory (in percent) where a writeout of dirty data to disk is allowed to stop. This should be quite a bit lower than the above dirty_ratio to allow the kernel to write out chunks of dirty data in one go.
I thought I should return the Tweak Manager's 00tweaks script back to initramfs
let me give it a try
what if i already have 00tweaks? should i had this script to the current file or substitute?
Hey, the values are similar to CF-Root Great then, gonna try it out
What should I do if I want to try your script, but I have already used CF-Root With Tweak Manager that also using another script in 00tweaks file
Wow I just ran this on GSB 3.8 workshed for the eris. And WOW the phone rings on 1 1/2 rings with a ringtone and the screen lights up. Very nice work. I hope you don't mind but i posted a link from the eris fourms to this file. I been looking for for so long on how to get rid of the rintone LAG and WOW i think you got it! Thank you
How to create the script?
Thnx
A lil question, this wont collide with the V6 Supercharger?
Hey guys,
can somebody please tell me how to make a script of this? I really want to know, but i'm new to this.
I can't find anything on the "search".
Cheers
QNBT said:
A lil question, this wont collide with the V6 Supercharger?
Click to expand...
Click to collapse
I think something does because I am getting complete homescreen redraws since I started using this a couple days ago. The phone seems to boot way faster and seems to run a little better but I think there is a conflict somewhere.
Sgace said:
Hey guys,
can somebody please tell me how to make a script of this? I really want to know, but i'm new to this.
I can't find anything on the "search".
Cheers
Click to expand...
Click to collapse
You don't have to make a script just copy it all to a text document on your desktop and after you save it delete the .txt at the end. Then put it on your SD card and use Root Explorer, or similar, to move it the proper location. I set the ownership and permissions the same as other files in the same location and rebooted. Just be sure to tap the "R/W" button at the top of the screen if you are using Root Explorer so you have read/write permission to work in the folder.
PieceKeepr said:
You don't have to make a script just copy it all to a text document on your desktop and after you save it delete the .txt at the end. Then put it on your SD card and use Root Explorer, or similar, to move it the proper location. I set the ownership and permissions the same as other files in the same location and rebooted. Just be sure to tap the "R/W" button at the top of the screen if you are using Root Explorer so you have read/write permission to work in the folder.
Click to expand...
Click to collapse
Hey,
thnx man. Found notepad++ and made a text file with that.
Tried the script for a couple of ours and for my personal feeling it made my phone slower at multiple points. Also Quadrant standard gave me a lower score (11-13) then when i'm using 00tweaks/v4 tt.
So this goes out the door.
Cheers
I hate bringing things back from the dead, so I apologize in advance.
If I want just the atime section of this script, do I just keep the first part? Where does it stop?
AUTO
what does the auto do in the mounting script?

Boot Process research based on 2.2.3 Verizon WebDoctor

WIP research into HP Pre* boot process
Theoretical plan: port user-part to compatible droid - Pre3["rib"/"mantaray"]->XperiaRay["ST18i"]
Well, upstart scripts are complete... now for tracking dbus/luna services that are needed for the port to run..
Kernel configs:
linux-*/arch/arm/configs/rib_defconfig = pre3
linux-*/arch/arm/configs/semc_urushi_defconfig = xperia_ray
Device highlights:
sony: CONFIG_INPUT_APDS9702 (proximity filter)
sony: CONFIG_MDDI_NOVATEK_PANEL_SHARP_LS033T3LX01 (sharp display)
sony: CONFIG_MDDI_NOVATEK_PANEL_TMD_LT033MDV1000 (tmds controller)
sony: CONFIG_SND_MSM_MVS7x30_SOC (integrated audio)
sony: CONFIG_TI1271 (wifi)
sony: CONFIG_TOUCHSCREEN_CLEARPAD_I2C (synaptics clearpad)
palm: CONFIG_MT9P013 (5MP cmos)
palm: CONFIG_PMIC8058_UPL (qualcomm power management)
palm: CONFIG_SND_SOC_WM8994 (wolfson micro, 24bit 4-chan dac, 2-chan adc, 100dB SNR, Nice !)
palm: CONFIG_TOUCHSCREEN_CY8CTMA300 (cypress)
palm pre3 = "rib" or "mantaray"
WIFI: Pre3 -> Atheros 6K ar6000 driver = ar6k, non-upstream!, hardcoded in PmWifiService
Pre(1) -> Marvell sd8686 sd8xxx driver
Seems the biggest problem will be porting the WiFi manager, to make TexasInstruments 1271 look like an Atheros 6k series..
palm devices:
castle == Pre
pixie == Pixi ?
broadway == Pre2?
mantaray == Pre3
windsornot
topaz == TouchPad
opal
What do EVT1 EVT2 EVT3 / DVT1 DVT2 DVT3 mean ?
What are "opal" and "windsornot" devices ?
actual bootup code
Code:
/sbin/mkbootfs.sh -- or/and -- /sbin/tcpostflash.sh
for initrd...
cp /sbin/boot-init /sbin/init
/sbin/boot-init
echo "Mounting proc filesystem"
mount -t proc none /proc
echo "Mounting sysfs filesystem"
mount -t sysfs none /sys
echo "Creating /dev"
mount -t tmpfs -o mode=0755 none /dev
echo "Creating/Mounting /dev/pts"
mkdir /dev/pts
mount -t devpts -o gid=5,mode=620 none /dev/pts
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mknod /dev/systty c 4 0
mknod /dev/tty c 5 0
mknod /dev/console c 5 1
mknod /dev/ptmx c 5 2
mknod /dev/fb c 29 0
mknod /dev/tty0 c 4 0
mknod /dev/tty1 c 4 1
mknod /dev/tty2 c 4 2
mknod /dev/tty3 c 4 3
mknod /dev/tty4 c 4 4
mknod /dev/tty5 c 4 5
mknod /dev/tty6 c 4 6
mknod /dev/tty7 c 4 7
mknod /dev/tty8 c 4 8
mknod /dev/tty9 c 4 9
mknod /dev/tty10 c 4 10
mknod /dev/tty11 c 4 11
mknod /dev/tty12 c 4 12
mknod /dev/ttyS0 c 4 64
mknod /dev/ttyS1 c 4 65
mknod /dev/ttyS2 c 4 66
mknod /dev/ttyS3 c 4 67
mknod /dev/urandom c 1 9
mknod /dev/mmcblk0 b 179 0
mknod /dev/mmcblk0p1 b 179 1
mknod /dev/mmcblk0p2 b 179 2
mknod /dev/mmcblk0p3 b 179 3
mknod /dev/mmcblk0p4 b 179 4
mknod /dev/mmcblk0p5 b 179 5
mknod /dev/mmcblk0p6 b 179 6
mknod /dev/mmcblk0p7 b 179 7
mknod /dev/mmcblk0p8 b 179 8
mknod /dev/mmcblk0p9 b 179 9
mknod /dev/mmcblk0p10 b 179 10
mknod /dev/mmcblk0p11 b 179 11
mknod /dev/mmcblk0p12 b 179 12
mknod /dev/mmcblk0p13 b 179 13
mknod /dev/mmcblk0p14 b 179 14
mknod /dev/mmcblk0p15 b 179 15
lvm.static vgscan --ignorelockingfailure
lvm.static lvchange -ay --ignorelockingfailure /dev/mapper/store-root
mount -o ro /dev/mapper/store-root /realroot
/sbin/pivot_root /realroot /realroot/boot
umount /boot/dev/pts
umount /boot/dev
umount /boot/proc
umount /boot/sys
export EARLY_BOOT_STOP=`date -U`
exec /sbin/init
/sbin/init
/sbin/upstart -s /usr/sbin/setcpushares-upstart
(setcpusharesupstart sets up cgroup for every new task,
based with /etc/default/cpushareholder)
upstart config from dir <- /etc/event.d
upstart emits "startup" ->
/etc/event.d/rcS is started
telinit 2 -> emit "runlevel 2"
emit "stopping/stopped rcS"
"runlevel 2" -> /etc/event.d/banner
/etc/init.d/banner start
echo "Please wait: booting..." > $vtmaster
emit "stopping/stopped banner"
"stopped banner" -> /etc/event.d/sysfs
/etc/init.d/sysfs.sh start
mount -t proc proc /proc
mount sysfs /sys -t sysfs
echo 1 > /proc/sys/vm/oom_dump_tasks
emit "stopping/stopped sysfs"
"stopped sysfs" -> /etc/event.d/udev
/etc/init.d/udev start
mountpoint -q /dev/
echo "Starting the hotplug events dispatcher" "udevd"
## not loading as no /etc/event.d/udevd
# udevd --daemon
mkdir -p /dev/.udev/ /dev/.udev/db/ /dev/.udev/queue/ /dev/.udevdb/
make_extra_nodes (based on /etc/udev/links.conf)
echo "Synthesizing the initial hotplug events"
udevtrigger --subsystem-nomatch=platform --subsystem-nomatch=backlight
echo "Waiting for /dev to be fully populated"
udevsettle --timeout=$udevd_timeout
chmod 1777 /dev/shm
emit "stopping/stopped udev"
"stopped udev" -> /etc/event.d/alignment
echo "3" > /proc/cpu/alignment
emit "stopping/stopped alignment"
"stopped alignment" -> /etc/event.d/modutils
/etc/init.d/modutils.sh start
echo "Calculating module dependencies ..."
depmod -Ae
echo -n "Loading modules: "
foreach $module $args in /etc/modules
modprobe $module $args
emit "stopping/stopped modutils"
"stopped modutils" -> /etc/event.d/cgroups
. /etc/default/cpushareholder
cpushareholder_init
mkdir -p /dev/cpuacct
mount -t cgroup -o cpu,cpuacct none /dev/cpuacct
mkdir -p /dev/cpuacct/UX/APP
mkdir -p /dev/cpuacct/REST/BG
...
echo 7500 > /dev/cpuacct/UX/cpu.shares
echo 2500 > /dev/cpuacct/REST/cpu.shares
for $taskid in /dev/cpuacct/tasks
echo $taskid > /dev/cpuacct/REST/DAEMONS
emit "stopping/stopped cgroups"
"stopped cgroups" -> /etc/event.d/mountall
/etc/init.d/mountall.sh start
. /etc/default/rcS
. /etc/default/mount_checks
MOUNT_STAMP=/var/umount.stamp
WIPE_FLAGS_FILE=/var/.flags/on_mount
echo "$0: Mounting local filesystems..."
lvm.static vgscan --ignorelockingfailure
lvm.static vgchange -ay --ignorelockingfailure
echo "$0: vgscan/vgchange done" > /dev/kmsg
fsck -y -v /dev/mapper/store-root/var 2>&1 #/var with /dev/store
#fsck -y -v /dev/mmcblk0p3 2>&1 #/var without /dev/store
echo "$0: fsck of /var done" > /dev/kmsg
mount -a -t nonfs,vfat,ext3,tmpfs
# means NOnfs,NOvfat,NOext3,NOtmpfs: man mount
mount /var
if "mount /var" errors, do fixup:
/usr/sbin/fixup_partition.sh --mountpoint /var
umount -f /dev/mapper/store-var # up to 5 times in a loop
fsck -y /dev/mapper/store-var
mount /dev/mapper/store-var
echo "$0: /var mounted" > /dev/kmsg
clock_from_var.sh
hwclock -s -u #only do the following updates if hardware time is wrong
if (hw_time is wrong)
#date -S -s `date -d $(cat /etc/version) "+%s"`
date -S -s `cat /var/preferences/com.palm.power/time_saver`
echo "$0: set clock from $TIME_SRC: $(date)" > /dev/kmsg
hwclock -w -u
else
echo "$0: using /dev/rtc time: $(date)" > /dev/kmsg
lunaprop -n com.palm.system -m -s last_umount_clean [0|1 :/var/umount.stamp exists]
check that all /var/* are directories
if not_dir($path) rm -f $path;mkdir -p $path
if no_clean_mount() fixup_partition.sh --mountpoint /var/log --force-fsck
if exists /var/.rootfs_fsck fixup_partition.sh --device=/dev/mapper/store-media --force-fsck
rm -f /media/internal/FSCK*.REC # FAT lost blocks
rm -f /var/tmp; mkdir -p /var/tmp #reset /var/tmp as a directory and not a symlink
mount -a -t vfat,ext3,tmpfs #mount the automounted fs
echo "$0: rest mounted" > /dev/kmsg
check if everything mounted nicely. if not: fixup_partition.sh them
echo "$0: filesystem checking done" > /dev/kmsg
setup_cryptofs # based on /etc/cryptofs.conf, http://reboot78.re.funpic.de/cryptofs/
mkdir /media/internal/.palm
mountcfs -s /media/internal/.palm/.cryptofs -m /media/cryptofs -k /media/internal/.palm
cryptofs -o nonempty -o allow_other -s -r [params].. # based on .cryptofs
echo "$0: setup_cryptofs done" > /dev/kmsg
lunaprop -n com.palm.system -m -s media_fixed_how 1 # result from fixup_partitions on media partition
report reboot reasons: lines that start with "reason" in /var/umount.stamp
echo $REASON | rdx_reporter -F -C "rebooter" -c "rebooter" -d "$0"
rm -rf /var/lock/*
if any errors on "fsck /var"
echo "encountered error running fsck on /var: $VARFSCKRES $VARFSCK" \ ## res=error code, varfsck=output
| rdx_reporter -F -C "Fsck Error" -c "Fsck Error" -d "$Fsck error"
if error=4 (MAJOR ERROR) -> echo $error >/var/log/.fsck_error
date > /var/log/var_fsck.log
echo $VARFSCK >> /var/log/var_fsck.log ## last fsck output
... skipped developer-only rw rootfs stuff, reboting for rw-check and rm'ing /boot/uImage if error
touch /var/log/var_fsck.log /var/log/root_fsck.log
cat /var/log/var_fsck.log /var/log/root_fsck.log > /var/log/fsck.log
echo "$0: done reporting fsck results" > /dev/kmsg
run-parts /etc/init.d/postmountall.d:
check_initctl
if not_pipe(/dev/initctl) -> rm -f /dev/initctl; mknod -m 600 /dev/initctl p
keep_klog
cd /var/log
mv klog_1.txt.gz klog_2.txt.gz
klog last |gzip -c > klog_1.txt.gz # klog buffer from previous boot
dmesg -s 100000 | gzip -c > dmesg.txt.gz
kernel_lastboot
rdx_reporter $args ## nothing to report in clean case
lnsasetup
. /etc/default/lnsa.sh
mkdir -p /var/palm/system-services
mkdir -p /var/palm/ls2/roles
mkdir -p /var/palm/event.d
echo 'exec /bin/true' >/tmp/lnsa_marker
cp /tmp/lnsa_marker /var/palm/event.d/;msa_marker # actually, cp to tmp, sync, mv tmp real
rm /tmp/lnsa_marker
initctl newdir /var/palm/event.d ## add dir other than /etc/init.d to list, could trigger
logmods
mkdir -p /dev/logdir
mmc_protect
no "mmc_protect" binary => does nothing
report_lostandfound
for each path=("lost+found" dir) found on any mounted partition,
ls -lA $path | rdx_reporter ...
touch $path/_landf_rdxd_reported_marker_ ## so it doesn't report again
rm_varlogtmp
rm -rf /var/log/temp
runlevel
touch /var/run/utmp
runlevel --set 2 ## might trigger something, but probably doesn't
scaling
echo ondemandtcl >/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
kill -USR1 1 ## for bootloggerd ?
echo "$0 done" > /dev/kmsg
mkdir -p /var/preferences
chown root /var/preferences
chmod 777 /var/preferences
mkdir -p /var/home/root
mkdir -p /var/tmp
emit "stopping/stopped mountall"
"stopped mountall" -> swaphack, tokens, timezone, watchdogd
-> /etc/event.d/swaphack
/etc/init.d/swaphack.sh
if /var/swap -> rm /var/swap # using /dev/store/swap now !
if !/dev/store/swap
dd if=/dev/zero of=/dev/store/swap bs=100663296 count=1 # 96MB of swap
mkswap /dev/store/swap
echo cfq > /sys/block/mmcblk0/queue/scheduler
echo 6000 > /proc/sys/vm/dirty_expire_centisecs
swapon /dev/store/swap
emit "stopping/stopped swaphack" -> compcache
/etc/event.d/compcache
swapoff -a
sleep 1
modprobe xvmalloc
modprobe ramzswap memlimit_kb=25600 backing_swap=/dev/store/swap
sleep 3
swapon /dev/ramzswap0 -p 100
emit "stopping/stopped compcache" -> no listeners
-> /etc/event.d/timezone
no /usr/bin/tzset -> do nothing
emit "stopping/stopped timezone" -> no listeners
-> /etc/event.d/watchdogd
/sbin/watchdogd #respawn
talks to /dev/watchdog, pings every X seconds
emit "stopping/stopped watchdogd" -> no listeners
-> /etc/event.d/tokens
/sbin/tokens --mount #trenchcoat=storage flasher + tokens=fs-tokens supports omap24xx,omap34xx,msm,tegra
source: http://subversion.palm.com/main/nova/palm/trenchcoat/submissions/132.4/trenchcoat.c
reads /dev/tokens -> OEM Data:
ProductName,Modem,RAMSize,FlashSize,HwoRev,BToADDR,WIFIoADDR,ProdSN,ProductSKU
emit "stopping/stopped tokens" -> /etc/event.d/populate-volatile
/etc/init.d/populate-volatile.sh start
/sbin/popvol < /etc/default/popvol.d/* # actually, for file in `ls`...
/etc/default/popvol.d/00_core
mkdir|/var/backups|0|0|0755
mkdir|/var/cache|0|0|0755
mkdir|/var/lib|0|0|0755
mkdir|/var/lib/ipkg|0|0|0755
mkdir|/var/lib/misc|0|0|0755
mkdir|/var/lib/software|0|0|0755
mkdir|/var/lib/software/ModemFiles|0|0|0755
mkdir|/var/lib/software/SessionFiles|0|0|0755
mkdir|/var/lib/software/tmp|0|0|0755
mkdir|/var/lib/update|0|0|0755
mkdir|/var/local|0|0|02755
mkdir|/var/lock|0|0|01777
mkdir|/var/lock/subsys|0|0|0755
mkdir|/var/log|0|0|0755
mkdir|/var/run|0|0|0755
mkdir|/var/spool|0|0|0755
mkdir|/tmp|0|0|01777
touch|/var/run/utmp|0|0|0644
touch|/var/log/wtmp|0|0|0644
mknod|/dev/heap|0|0|1|5|020644
/etc/default/popvol.d/01_pulse
mkdir|/var/run/pulse|31|31|0755
/etc/default/popvol.d/02_jail
mkdir|/var/palm|0|0|0755
mkdir|/var/palm/jail|0|0|0755
mkdir|/var/palm/data|0|0|0755
emit "stopping/stopped populate-volatile" -> devpts, minicore2
-> /etc/event.d/minicore2 # everything disabled, so doing nothing much
echo "" > /proc/sys/kernel/minicore_pattern
echo "" > /proc/sys/kernel/core_pattern
emit "stopping/stopped minicore2" -> no listeners
-> /etc/init.d/devpts.sh start
mknod -m 666 /dev/ptmx c 5 2
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts -ogid=5,mode=620 ## 5="tty", 600='mesg n' default
emit "stopping/stopped devpts" -> hostname
-> /etc/init.d/hostname.sh start
hostname -F /etc/hostname # "webos-device"
emit "stopping/stopped hostname" -> pmsyslogd, pmklogd, urandom, usbctrl
-> /etc/event.d/pmsyslogd #PmLogDaemon, logs to /var/log/messages
/usr/bin/pmsyslogd -z -f 6 -m # UTZ/C tstamp, usec resolution, monotonic
emit "stopping/stopped pmsyslogd" -> no listeners
-> /etc/event.d/pmklogd # logs to /var/log/pmklogd.log
/usr/bin/pmklogd -n -d 1 #startup delay=1sec, "-n"=run in foreground??
emit "stopping/stopped pmklogd" -> no listeners
-> /etc/event.d/urandom
/etc/init.d/urandom start
echo "Initializing random number generator..."
cat /var/lib/urandom/random-seed >/dev/urandom
emit "stopping/stopped urandom" -> no listeners
-> /etc/event.d/usbctrl
if usbnet enabled
/sbin/modprobe -q g_composite product=0x101 #0x103 for armv6l
else if novacom enabled
/sbin/modprobe -q g_composite product=0x8002 #0x8012 for armv6l
else #(normal)
/sbin/modprobe -q g_composite product=0x8004 #0x8012 for armv6l
emit "stopping/stopped usbctrl" -> networking
-> /etc/event.d/networking
/etc/init.d/networking start
ifup -a -f # /etc/network/interfaces - auto=lo,usb0:1
echo "done."
emit "stopping/stopped networking" -> bootmisc
=========== AT THIS STAGE, ONLY BOOTMISC THREAD EXECUTION CONTINUES ============
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-> /etc/init.d/bootmisc.sh start
if "OMAP3430" matches /proc/cpuinfo
echo 600000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
echo 500000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
## needs to be set twice, board bug
chmod 666 /dev/tty[p-za-e][0-9a-f]
chown root:tty /dev/tty[p-za-e][0-9a-f]
if /etc/ld.so.cache symlinks to /var/cache/ld.so.cache
/sbin/ldconfig -C /var/cache/ld.so.cache
else
rm -f /var/cache/ld.so.cache
emit "stopping/stopped bootmisc" -> novacomd, ls-hubd_private, ttyS2
-> /etc/event.d/ttyS2
/sbin/getty console 115200 vt100
-> /etc/event.d/novacomd
#no /var/gadget/novacom_enabled => do nothing
#otherwise: mkdir /dev/gadget; mount -tgadgetfs /dev/gadget; /sbin/novacomd
emit "stopping/stopped novacomd"
-> /etc/event.d/ls-hubd_private #ls=LunaService
/usr/bin/ls-hubd --conf /etc/ls2/ls-private.conf --pmloglib
# /home/reviewdaemon/projects/nova/oe/BUILD-mantaray/work/luna-service2-2.0.0-131.2/131.2/src/hub/conf.c
#/usr/bin/ls-monitor /usr/bin/LunaSysMgr js, using /tmp/com.palm.private_hub
# UGLY HACK!!!!: /sbin/initctl emit --no-wait %s-ready
/sbin/initctl emit --no-wait ls-hubd_private-ready
..emit "ls-hubd_private-ready" -> /etc/event.d/ls-hubd_public
"ls-hubd_private-ready" ->
-> /etc/event.d/ls-hubd_public
/usr/bin/ls-hubd --public --conf /etc/ls2/ls-public.conf --pmloglib
/sbin/initctl emit --no-wait ls-hubd_private-ready
..emit "ls-hubd_public-ready" -> finish, node_fork_server
..at some point.. emit "stopping/stopped ls-hubd_public" -> ls-hubd_public_watchdog
-> /etc/event.d/ls-hubd_public_watchdog
/usr/sbin/reboot_ls-hubd_if.sh ${EXIT_STATUS} ls-hubd_public
..at some point.. emit "stopping/stopped ls-hubd_private" -> ls-hubd_private_watchdog
-> /etc/event.d/ls-hubd_private_watchdog
/usr/sbin/reboot_ls-hubd_if.sh ${EXIT_STATUS} ls-hubd_private
=========== AT THIS STAGE, PRV/PUB LS ARE RUNNING AND ONLY ONE UPSTART SIGNAL thread REMAINS ============
continuation of upstart scripts after Luna Service hub is started
Code:
"ls-hubd_public-ready" (emitted using /sbin/initctl from within /usr/bin/ls-hubd)
-> finish, node_fork_server
-> /etc/event.d/node_fork_server
if memtotal from /proc/meminfo >524288 (512M)
mkdir -p /var/palm/node
touch /var/palm/node/fork
/usr/palm/nodejs/node --max_old_space_size=23068672 /usr/palm/nodejs/fork_server.js ## 23068672=22MB
/sbin/initctl emit --no-wait node_fork_server-ready
else /sbin/initctl emit node_fork_server-ready
emit "node_fork_server-ready" -> no listeners
..emit "stopping/stopped node_fork_server" -> no listeners
-> /etc/event.d/finish
# record upstart timing for boottime tracking.
# $EARLY_BOOT_PID is set in /sbin/boot-init, ran from /sbin/tcpostflash.sh, /sbin/mkbootfs.sh, /sbin/upstart
mkdir -p /tmp/misc-props
echo -n $EARLY_BOOT_PID > /tmp/misc-props/pids.early_start
echo -n $EARLY_BOOT_START > /tmp/misc-props/timing.early_start
echo -n $EARLY_BOOT_STOP > /tmp/misc-props/timing.early_stop
echo -n $UPSTART_STARTTIME > /tmp/misc-props/timing.upstart_begin
echo -n $$ > /tmp/misc-props/pids.upstart_finish
echo -n `date -U` > /tmp/misc-props/timing.upstart_finish
/etc/init.d/bootmark.sh start
echo (16_random_bytes_in_hex) > /var/log/bootmark
run-parts /etc/event.d/finish-poststart.d
/etc/event.d/finish-poststart.d/001-mountcrypt
/usr/bin/mountcrypt /dev/mapper/store-mojodb store-cryptodb /dev/mapper/store-filecache store-cryptofilecache
mount /var/db
mount /var/file-cache
/etc/event.d/finish-poststart.d/020-setup_jails
rm -f /etc/nojail
emit "stopping/stopped finish" ->
logctld, configurator, mojodb, powerlog, PmNetConfigManager, pulseaudio, LunaDownloadMgr,
eventreporter, powerd, rdxd, lnsawait, Qmuxd, bluetooth, fontconfig_cache, certstoreinit,
tempdb, qcomm_rmt_storage, keymanager, filecache, hidd, memchute, passthrud, ossinfo,
mediaserver, audiod, PmModemEfsLogger, extractfs, TelephonyInterfaceLayer
-> TelephonyInterfaceLayer (no listeners for stop signals)
exec /usr/bin/PmWsfDaemon -c /etc/til.d/tilwsf.conf # /usr/lib/libTelephonyInterfaceLayer.so, -c /etc/til.d/til.conf
#Src/Core/NativeHost/BladeLoaderDl.cpp:101 dlopen()
#Src/Core/NativeHost/BladeLoaderDl.cpp:373 Calling %s to create service blade
#Luna Type=LunaTelephony,LunaMessaging ServiceName=com.palm.telephony
#LaunchCodeExternalApp=com.palm.app.phonediag
#LaunchCodeExternalAppCodesCdma=786;3836;33284;3282;477;673;123;889;8378;3366;\
#..72346;633;8766;87633;2539;7738;66236;2833766;28337633;
#LaunchCodeExternalAppCodesGsm=786;
#LunaMessaging ServiceName=com.palm.messagingrouter Interface=LunaInterfaceSms
#services supported by the GSM phone
#THandlersGsm=ServiceStateGsm;ServiceCallGsm;ServiceSmsGsm;ServiceLbsGsm;ServiceAudioGsm;
#..ServiceDeviceUsageGsm;ServiceSsGsm;ServiceDeviceCfgGsm;ServiceDataGsm;
#PHandlers=ServiceSim;ServicePower;ServiceSpb;ServiceStk;
# sprint verizon bellmo chinatel
-> extractfs (no listeners for stop signals)
mkdir -p /var/luna/data/extractfs
/usr/bin/extractfs -f /var/luna/data/extractfs #something to do with image extraction
umount -f /var/luna/data/extractfs
-> PmModemEfsLogger (no stop listeners)
# no modem in /proc/cmdline for normal users => not doing anything, otherwise PmModemEfsLogger would log ramdump etc
-> audiod (no stop listeners)
/usr/sbin/audiod -n -1 # com.palm.audio version 368.49, uses /etc/audio/{a,b,c}/global.conf
#/home/reviewdaemon/projects/nova/oe/BUILD-mantaray/staging/
#..arm-none-linux-gnueabi/include/boost/dynamic_bitset/dynamic_bitset.hpp etc
-> mediaserver (no stop listeners)
ionice -c1 /usr/bin/mediaserver --gst-debug=1 # version 428.51, should have been --gst-debug-level=1
-> ossinfo (no stop listeners) #copies PDF to media partition
cp /usr/lib/ossinfo/Open\ Source\ Information.pdf /media/internal/Open\ Source\ Information.pdf
-> passthrud (no stop listeners) #com.palm.usbpassthrough
#/usr/bin/start-passthrud # would run if had /var/preferences/com.palm.usbpassthrough/passthrud.conf
-> memchute (no stop listeners)
echo "0,85,95,114,120" > /sys/module/lowmemnotify/parameters/thresholds_enter
echo "0,80,90,108,112" > /sys/module/lowmemnotify/parameters/thresholds_leave
/usr/sbin/memchute # kills top 5 memory-using-procs if >THRESHOLD when low on memory
-> hidd (no stop listeners)
mkdir -p /dev/cgroup/input
echo $$ > /dev/cgroup/input/tasks #current process id
/usr/bin/hidd -v -f /etc/hidd/HidPlugins.xml --output-syslog
#plugins: keypad,touchpanel,accelerometer,compass,proximity,lightg,AVrcp(bluetooth),inputdev
-> keymanager (no listeners)
/usr/bin/keymanager -c '{"log":{"appender":{"type":"syslog"},"levels":{"default":"warning","keymanager":"info"}}}'
#using /var/palm/data/keys.db, /var/palm/data/otakeys.db, 4809febfe1df7d2a108fddc388cdb29e
#.. store-cryptodb.key, store-cryptofilecache.key, /var/luna/data/.passcode, "please", "youdidntsaythemagicword"
#does sql-style db work: SELECT id,ownerID,keyID,data,keysize,type,scope,hash FROM keytable WHERE id = ?
#.. SELECT id FROM keytable WHERE ownerId LIKE ?
# "EJGlZxDhLvgXn+p/K9s8gQ==" (base64)
-> qcomm_rmt_storage (no listeners)
/usr/sbin/qcom_rmt_storage /dev/mmcblk0p7 /dev/mmcblk0p8
#uses /dev/rmt_storage, /boot/modem_fs1, /boot/modem_fs2
-> tempdb (no listeners)
#does nothing!
-> certstoreinit (no listeners)
mkdir -p /var/ssl/crl
zcat /etc/ssl/crl/*.gz >/var/ssl/crl/crl-bundle.crl
mkdir -p /var/ssl/trustedcerts
cd /var/ssl/trustedcerts && tar xzf /etc/ssl/certs/calinks.tgz
mkdir -p /var/ssl/public
echo '01' > /var/ssl/serial
mkdir -p /var/ssl/certs
mkdir -p /var/ssl/private
touch /var/ssl/index.txt
luna-send -n 1 luna://com.palm.certificatemanager/addcrl \
'{"url":"http://crl.palm-contentid.pp.trustcenter.de/crl/v2/palmcontentid-CA-I.crl"}'
-> bluetooth (no listeners)
/usr/bin/BluetoothMonitor
-> Qmuxd (no listeners)
/usr/bin/Qmuxd #RMNET qmi connection
-> lnsawait (no listeners)
# "preventing started event from going out" ?
initctl status lnsa_marker
if no status -> loop. otherwise return ok
# should return nonzero since /var/palm/event.d was added to initctl dirs previously
# during mountall->mountall.sh->postmountall.d/lnsasetup
-> rdxd (no listeners)
/usr/bin/rdxd -s #Remote Diagnostics (incl. Telephony)
#uses /etc/rdxd.conf, /usr/lib/rdxd/*.sh scripts
-> powerd (no listeners)
mkdir -p /var/preferences/com.palm.power
cp /usr/var/preferences/com.palm.power /var/preferences/com.palm.power #use cp tmp;sync;mv tmp real
#config /sys/ parameters for PM on msm8x60, not applicable to phones
#for other devices seems there's nothing extra to do
-> eventreporter (no listeners)
/usr/bin/eventreporterserver #uses /tmp/evts.sock, /tmp/events.dat, JSON messages
-> LunaDownloadMgr (no listeners)
mkdir -p /dev/cgroup/web
echo $$ >/dev/cgroup/web/tasks # puts current process into web cgroup, later done with setcpushares-task
env CHARSET="UTF-8" /usr/bin/LunaDownloadMgr # ionice -c 3 on TouchPad (topaz)
# palm://com.palm.connectionmanager/setnovacommode {"isEnabled":true, "bypassFirstUse":false}
# palm://com.palm.connectionmanager/getStatus {"subscribe":true}
# palm://com.palm.bus/signal/registerServerStatus {"serviceName":"com.palm.connectionmanager", "subscribe":true}
# palm://com.palm.lunabus/signal/addmatch {"category":"/storaged", "method":"MSMAvail"}
# .. {"category":"/storaged", "method":"MSMProgress"}
# .. {"category":"/storaged", "method":"MSMEntry"}
# .. {"category":"/storaged", "method":"MSMFscking"}
# uses curl for downloads, /etc/palm/downloadManager.conf, /etc/palm/downloadManager-platform.conf
# logs into db: "DELETE FROM DownloadHistory WHERE owner = %", "DELETE FROM DownloadHistory WHERE ticket = %lu"
-> powerlog (no listeners)
/usr/sbin/powerlog -i 60 -c $CPUCOUNT -f $FREQ_COUNT -m
# cpucount = cpus, freq_count=number of freqs, -i60=60seconds, -m=topmemusers
-> mojodb (no listeners)
/usr/bin/mojodb-luna -c /etc/palm/mojodb.conf /var/db #version 1.9-52.16-mantaray, using /tmp/mojodb/tempdb_init
-> logctld (no listeners)
/usr/bin/logctld -v
#GPS: /var/log/gpsfixes, /var/log/gpsfixes_*.csv
#calls /sbin/logctld_clear_all.sh, /sbin/logctld_collect_all.sh
#palm://com.palm.service.collectlogs/autosend
-> pulseaudio
mkdir -p /home/root/.pulse
ionice -c1 /usr/bin/pulseaudio --log-target=syslog
#uses /etc/pulse/system.pa , /etc/pulse/default.pa, /etc/pulse/daemon.conf, /usr/lib/pulse-0.9.22/modules
#compiled using: /home/reviewdaemon/projects/nova/oe/BUILD-mantaray/staging/arm-none-linux-gnueabi/include
#.. -fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2 -fno-strict-aliasing
#.. -fno-inline-functions -g -ffast-math -D_FORTIFY_SOURCE=2 -fno-common -fdiagnostics-show-option
emit "started pulseaudio" -> systemsoundsloader
->> systemsoundsloader (no listeners)
/usr/bin/systemSoundsLoader #loadSystemSounds from /usr/share/systemsounds/* or *-ondemand.pcm
-> fontconfig_cache
ionice -c 3 nice -n 20 fc-cache #run cache rebuild as nicely as possible
touch /var/cache/fontconfig/cached
emit "stopped fontconfig_cache" -> browserserver, smartkey
->>smartkey (no listeners)
mkdir -p /dev/cgroup/web
echo $$ > /dev/cgroup/web/tasks # this process goes into web cgroup
/usr/bin/SmartKeyService #SpellChecker - find best candidates based on dictionary, score map, frequency map
#uses XT9: /usr/palm/smartkey/XT9, /etc/palm/smartkey.conf
->>browserserver (no listeners)
export LD_PRELOAD="/usr/lib/libptmalloc3.so" #use custom malloc for browser
mkdir -p /dev/cgroup/web
echo $$ > /dev/cgroup/web/tasks # files this process into web control group
/usr/bin/BrowserServer #version 2.0.0-237.13, -d 30000 on TouchPad (topaz) +browserservermojo
#uses /var/luna/data/browser/icons, /var/palm/data/browser-cookies.db /dev/msm_vidc_dec /dev/pmem_adsp
chmod -R g+w /var/ssl
chown -R root.luna /var/ssl
chown luna:luna -R /var/palm/data/http_* /var/palm/data/https_*
chmod -R o+rwx /var/palm/data/http_* /var/palm/data/https_*
#conf from /etc/palm/browser-app.conf, /etc/palm/browser-app-platform.conf, /etc/ssl/openssl.cnf
-> filecache
/usr/bin/filecache -c {\"log\":{\"appender\":{\"type\":\"syslog\"},\"levels\":{\"default\":\"warning\"}}}
emit "started filecache" -> LunaSysService, LunaUniversalSearchMgr
->>LunaSysService
/usr/bin/LunaSysService
#uses /usr/lib/luna/customization/region.json, /etc/palm/region.json,
#.. /usr/lib/luna/customization/locale.txt, /etc/palm/locale.txt,
#.. /etc/palm/defaultPreferences.txt, /etc/palm/defaultPreferences-platform.txt
#.. /usr/lib/luna/customization/cust-preferences.txt, /etc/palm/CustomerCareNumber.txt
#.. /var/luna/preferences/systemprefs.db, systemprefs_backup.db
# does ntp time update from ntp0.palmws.com (ntpdate -bqu)
#.. /etc/palm/palm-customization-info
->>LunaUniversalSearchMgr (no listeners)
export LD_PRELOAD=/usr/lib/libmemcpy.so
/usr/bin/LunaUniversalSearchMgr
# addDBSearchItem/removeDBSearchItem, modifyActionProvider
# /usr/lib/luna/customization/resources/*/UniversalSearchList.json
# SELECT value FROM SearchPreference WHERE key=%Q
# CREATE TABLE IF NOT EXISTS SearchList (id TEXT, category TEXT, displayName TEXT, iconFilePath TEXT, url TEXT,
# suggestURL TEXT, launchParam TEXT, type TEXT, enabled INTEGER, version INTEGER, PRIMARY KEY(id, category) );
# CREATE TABLE IF NOT EXISTS DBSearchList (id TEXT PRIMARY KEY, category TEXT, displayName TEXT,
# iconFilePath TEXT, url TEXT, launchParam TEXT, launchParamDbField TEXT, dbQuery TEXT, displayFields TEXT,
# batchQuery INTEGER, enabled INTEGER, version INTEGER );
# CREATE TABLE IF NOT EXISTS SearchPreference (key TEXT NOT NULL ON CONFLICT FAIL UNIQUE ON CONFLICT REPLACE,
# value TEXT);
-> PmNetConfigManager
/usr/bin/PmNetConfigManager
#logs to /tmp/netconfigmanager.log
#interfaces with netfilter, iptables, enabling/disabling nat, routes, mtu clamping:
# /usr/sbin/iptables -D FORWARD -t mangle -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
# /usr/sbin/iptables -A FORWARD -t mangle -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
# /usr/sbin/iptables -t nat --flush
# RTSP: /usr/sbin/iptables -I INPUT -p udp --sport 6970:6999 -j ACCEPT
# mDNS: /usr/sbin/iptables -I OUTPUT -p udp -m udp --dport 5353 -o %s -j DROP
# NAT: /usr/sbin/iptables -t nat -I POSTROUTING -o %s -j MASQUERADE
# /sbin/dhclient -d -cf /etc/pmnetconfig/webOsDhclient.conf -sf /etc/pmnetconfig/webOsDhclient-script -lf -pf ..
# /usr/bin/ntpdate -uq %s pool.ntp.org
# traceroute,ping,arping, wifi authenticator,tether, /etc/pmnetconfig/staticroutes, novacom
# /sbin/sysctl -n -e -q -p /etc/pmnetconfig/netsysctrl.conf
# /sbin/ip rule flush; /proc/sys/net/ipv4/route/flush
emit "started PmNetConfigManager" -> mdnsd, PmWiFiService
->>mdnsd (no listeners)
/usr/sbin/mdnsd -debug # mDNSResponder-258.14, /etc/mdnsd.conf -> /var/log/mdnsd.log
# services url: http://www.dns-sd.org/ServiceTypes.html
->>PmWifiService (no listeners)
check if /dev/tokens/WIFIoADDR exists
/usr/bin/PmWiFiService
# hardwired for Atheros AR6000:
# insmod /lib/modules/`uname -r`/kernel/net/wifi/ar6000.ko || rmmod ar6000
# /tmp/ath6k/token_bdata.SD32.bin || /var/preferences/com.palm.wifi/skip-token-caldata
# ath6k/hw2.1.1/bdata.SD32.bin ath6k/hw2.1.1/3g_bdata.SD32.bin ath6k/hw2.1.1/lte_bdata.SD32.bin
# /lib/firmware/ath6k
# uses /usr/sbin/wpa_supplicant and hostapd
# /sbin/dhclient -cf /etc/PmWiFiDhclient.conf -sf /etc/PmWiFiDhclient-script -lf -pf /var/run/dhclient.eth0.pid
-> configurator
! luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbkinds","filecache"]}' # triggers service launch?
! luna-send -n 1 palm://com.palm.configurator/run '{"types":["dbpermissions"]}' # triggers service launch?
initctl emit datastore-initialized
-> "datastore-initialized" -> /etc/event.d/activitymanager
->>activitymanager # manages activity lists, cgroup priorities
/usr/bin/activitymanager -c {\"log\":{\"appender\":{\"type\":\"syslog\"},\"levels\":{\"default\":\"warning\"}}}
/sbin/initctl emit activitymanager-ready
-> "activitymanager-ready" -> configurator-async, filenotifyd, UpdateDaemon
->>configurator-async (no listeners)
! luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities"]}' #triggers service?
->>filenotifyd (no listeners)
ionice -c2 -n7 /usr/bin/filenotifyd
# create table if not exists files (path TEXT UNIQUE ON CONFLICT REPLACE,
# size INTEGER, modified INTEGER)
# create table if not exists actions (revision INTEGER PRIMARY KEY AUTOINCREMENT,
# action_type INTEGER, size INTEGER, modified INTEGER, path TEXT, new_path TEXT)
# insert into files (path, size, modified) values (?,?,?) // insert
# select size, modified from files where path=? // get
# delete from files where path=? // remove
# update files set path=? where path=? // rename
# select path, size, modified from files where path like ? // directory list
# insert into actions (action_type, size, modified, path, new_path) values (?,?,?,?,?)
# select revision, action_type, size, modified, path, new_path from actions
# where revision >= ? order by revision asc limit ?
# select count(*) from action
# delete from actions where revision < ?
->>UpdateDaemon (no listeners)
/usr/bin/UpdateDaemon
# mount /var/lib/update
# tar xvzf /var/lib/update/data.tar.gz -m --no-same-owner --no-same-permissions
# OmaDm [-set_domain|-client|-task|-server|-prepare]
# server: https://ps.palmws.com/palmcsext/swupdateserver
# curl proxy: 68.28.31.33:80 (sprint), headers
# Expect: Cache-Control: no-cache
# User-Agent: palm/1.0 // InitHeader ?
# User-Agent: HTTP SyncML Client [en] (WinNT; I)
# Accept-Language: en
# Accept: application/vnd.syncml.dm+xml
# Content-Type: application/vnd.syncml.dm+xml
# Accept-Charset: utf-8
# x-syncml-hmac: algorithm= , username=" ", mac=
# name: omadm.swupdate.palm.com
# password: serverguestpassword
# name: guest
# passwird: guestpassword
# extra ips: 68.28.15.12, 68.28.31.12, 63.168.238.41, 68.168.229.130
# /var/lib/update/PmUpdater // /usr/bin/PmUpdater exists
#/usr/bin/mmipkg, /sbin/tellbootie
! luna-send -n 1 palm://com.palm.configurator/run '{"types":["activities"]}' # triggers service launch?
emit "stopped configurator" -> LunaSysMgr, PmWanDaemon
->>PmWanDaemon (no listeners)
/usr/bin/PmWsfDaemon -c /etc/wan.d/wan.conf # load /usr/lib/libPmWsfWanBlade.so
# set up wan connection, check TETH-ENTITLEMENT
->>LunaSysMgr
emit "started LunaSysMgr" -> CustomizationService, firstuse-createDefaultAccount,
mediasyncexporter, pubsubservice, vpnremover-eventd
->> CustomizationService (no listeners)
luna-send -n 1 luna://com.palm.lunabus/signal/registerServerStatus '{"serviceName":"com.palm.systemservice","subscribe":true}'
# up to 3 times, 10sec retry, until "connected" in output
luna-send -n 1 luna://com.palm.service.customization/customize '{}'
# up to 4 times, 15sec retry, until "connected" in output
->> firstuse-createDefaultAccount (no listeners)
luna-send -n 1 palm://com.palm.accountservices/createNovaAccount '{"createDefaultAccount":true}'
->> mediasyncexporter (no listeners)
if exists /media/internal/iPod_Control # means there is media data to export
luna-send -i -n 1 palm://com.palm.activitymanager/create \
'{"start":true, \
"type":{"priority":"lowest"}, \
"activity":{"name":"mediasyncexporter", "description": "export media sync data to standard media files", \
"callback": {"method": "palm://com.palm.mediasyncexporter/export", "params": {}}}}'
->> pubsubservice (no listeners)
/usr/bin/pubsubservice #uses /var/pubsub/cache, /var/pubsub/pubsubhandlers.conf, /etc/palm/pubsub_handlers/
# most probably uses xmpp protocol, jabber server j005.palmws.com, http://jabber.org/protocol/pubsub#node_config
# docs here: http://xmpp.org/extensions/xep-0060.html
->> vpnremover-eventd (no listeners)
# ! removes the VPN Service App/Framework from App Catalog !
luna-send -n 1 palm://com.palm.appinstaller/remove '{"packageName": "com.palm.app.vpn"}'
luna-send -n 1 palm://com.palm.appinstaller/remove '{"packageName": "com.palm.app.vpnframework"}'
echo "1" > /proc/sys/vm/overcommit_memory
mkdir -p /var/luna/preferences
mkdir -p /dev/cgroups/ui /dev/cgroups/application /dev/cgroups/focused /dev/cgroups/unfocused \
/dev/cgroups/unfocused/none /dev/cgroups/unfocused/lowest /dev/cgroups/unfocused/low /dev/cgroups/unfocused/normal \
/dev/cgroups/unfocused/high /dev/cgroups/unfocused/highest
/bin/echo $$ > /dev/cgroups/ui/tasks
/bin/echo 18432 > /dev/cgroups/ui/cpu.shares
export LD_PRELOAD="/usr/lib/libptmalloc3.so"
/usr/bin/LunaSysMgr -s [if first-time, add "-u minimal -a com.palm.app.firstuse"]
# use /etc/palm/luna.conf /etc/palm/luna-platform.conf
# application paths defined:
# /var/luna/applications/ /var/palm/data/com.palm.appInstallService /media/cryptofs/apps
# usr/palm/applications usr/palm/packages usr/palm/services
# /media/cryptofs/apps/usr/lib/ipkg/info /media/cryptofs/tmp
# /usr/luna/launchpoints/ /var/luna/launchpoints/
# /usr/lib/luna/system/luna-systemui/ /usr/lib/luna/system/luna-applauncher/
# /usr/palm/sysmgr/images/ /usr/palm/sysmgr/localization /usr/palm/sysmgr-cust/localization
# /var/luna/preferences/
# /usr/palm/command-resource-handlers.json /var/usr/palm/command-resource-handlers-active.json
# SysMgr compiled against Qt 4.6.1, HW egl render mode
# /usr/bin/jailer -t -i %s (launching processes) with LD_PRELOAD libpvrtc.so
# deals with cards and card-processes/subsumers
/sbin/initctl emit first-use-finished
emit "first-use-finished" -> configurator (already ran)
/sbin/initctl emit --no-wait LunaSysMgr-ready
emit "LunaSysMgr-ready" -> LunaReady, tap2share
->> tap2share (no listeners)
/usr/sbin/tap2shared #/dev/a6_[0-9] or a23 device for transfers, topaz has back and rear A6
->> LunaReady
mkdir -p /dev/cgroups/application
/bin/echo $(pidof WebAppMgr) > /dev/cgroups/application/tasks
/bin/echo 2048 > /dev/cgroups/ui/cpu.shares
emit "started LunaReady" -> customization-install
->> customization-install
# call customization service to install any stub apps
luna-send -n 1 -a com.palm.service.customization palm://com.palm.service.customization/postFirstUseInstall '{}'
# hack to turn on wifi after first use the first time only
luna-send -n 1 -a com.palm.service.customization palm://com.palm.wifi/setstate '{ "state": "enabled" }'
# create a semaphore so that the app install and the wifi setting only ever run one time
touch /var/luna/data/Customization/postfirstuse_complete.txt
======================= UPSTART SCRIPTS END HERE =================================
--
luna-send uses liblunaservice.so which uses the previously-started ls-hub for message transfer
/var/preferences/com.palm.bus/public_bus_default
/tmp/com.palm.private_hub /tmp/com.palm.public_hub
HUB_INET_ADDRESS
192.168.2.101:4412 192.168.2.101:4411 127.0.0.1:4412 127.0.0.1:4411
com.palm.configurator = /usr/share/dbus-1/system-services/com.palm.configurator.service
TODO: d-bus/luna services statup...
silvioster said:
palm devices:
castle == Pre
pixie == Pixi ?
broadway == Pre2?
mantaray == Pre3
windsornot
topaz == TouchPad
opal
What do EVT1 EVT2 EVT3 / DVT1 DVT2 DVT3 mean ?
What are "opal" and "windsornot" devices ?
Click to expand...
Click to collapse
broadway = Veer
roadrunner = Pre2
opal = TouchPad Go (7 inch)
windsornot = never released device
EVT = early prototypes
DVT = later prototypes, close to production.
-- Rod
silvioster said:
WIFI: Pre3 -> Atheros 6K ar6000 driver = ar6k, non-upstream!, hardcoded in PmWifiService
Pre(1) -> Marvell sd8686 sd8xxx driver
Seems the biggest problem will be porting the WiFi manager, to make TexasInstruments 1271 look like an Atheros 6k series..
Click to expand...
Click to collapse
ar6k is upstream in the staging branch since 2.6.37 according this :
lxr.free-electrons.com/source/drivers/staging/ath6kl/htc2/AR6000/ar6k.c?v=2.6.37;a=arm

Build.prop / scripts

Originally by knzo, I have tried many on my phone and thought I should share with my fellow streakers...
On my ROMs adventure I've been collecting some tweaks and scripts and seems to me it's now time to share it. While some values in terms of optimization might fluctuate from device to device, I've found these pretty consistent throughout many.
Build.prop
(edit your /system/build.prop with a file manager with root access)
Careful for already existing settings. In this case, just change the values.
1. Force launcher into memory
Code:
ro.HOME_APP_ADJ=1
2. Raise JPG quality to 100%
Code:
ro.media.enc.jpeg.quality=100
3. VM Heapsize; higher the RAM, higher the hp can be
Code:
dalvik.vm.heapsize=48m
4. Render UI with GPU
Code:
debug.sf.hw=1
5. Decrease dialing out delay
Code:
ro.telephony.call_ring.delay=0
6. Helps scrolling responsiveness
Code:
windowsmgr.max_events_per_sec=150
7. Save battery
Code:
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
8. Disable debugging notify icon on statusbar
Code:
persist.adb.notify=0
9. Increase overall touch responsiveness
Code:
debug.performance.tuning=1
video.accelerate.hw=1
10. Raise photo and video recording quality
Code:
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
11. Signal (3G) tweaks
Code:
ro.ril.hsxpa=2
ro.ril.gprsclass=10
ro.ril.hep=1
ro.ril.enable.dtm=1
ro.ril.hsdpa.category=10
ro.ril.enable.a53=1
ro.ril.enable.3g.prefix=1
ro.ril.htcmaskw1.bitmask=4294967295
ro.ril.htcmaskw1=14449
ro.ril.hsupa.category=5
12. Net speed tweaks
Code:
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
13. Disable blackscreen issue after a call
Code:
ro.lge.proximity.delay=25
mot.proximity.delay=25
14. Fix some application issues
Code:
ro.kernel.android.checkjni=0
15. Phone will not wake up from hitting the volume rocker
Code:
ro.config.hwfeature_wakeupkey=0
16. Force button lights on when screen is on
Code:
ro.mot.buttonlight.timeout=0
17. Disable boot animation for faster boot
Code:
debug.sf.nobootanimation=1
18. Miscellaneous flags
Code:
ro.config.hw_menu_unlockscreen=false
persist.sys.use_dithering=0
persist.sys.purgeable_assets=1
dalvik.vm.dexopt-flags=m=y
ro.mot.eri.losalert.delay=1000
19. Specifics to some LG devices
Code:
persist.service.pcsync.enable=0
persist.service.lgospd.enable=0
user.feature.flex=true
user.feature.lgdrm=false
user.feature.lgresource=false
user.feature.lgpoweroff=false
user.feature.ls_event=false
user.feature.ls_normal=false
user.feature.sui=false
Init.d
(needs ROM with init.d access and busybox, open empty file, insert header #!/system/bin/sh and put these there, save in /system/etc/init.d and name it something like 77tweaks)
1. strict minfree handler tweak
Code:
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
2. internet speed tweaks
Code:
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
3. vm management tweaks
Code:
echo "4096" > /proc/sys/vm/min_free_kbytes
echo "0" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/panic_on_oom;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/swappiness
echo "50" > /proc/sys/vm/vfs_cache_pressure
echo "90" > /proc/sys/vm/dirty_ratio
echo "70" > /proc/sys/vm/dirty_background_ratio
4. misc kernel tweaks
Code:
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
5. battery tweaks
Code:
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
6. EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
a) removes journalism
Code:
tune2fs -o journal_data_writeback /block/path/to/system
tune2fs -O ^has_journal /block/path/to/system
tune2fs -o journal_data_writeback /block/path/to/cache
tune2fs -O ^has_journal /block/path/to/cache
tune2fs -o journal_data_writeback /block/path/to/data
tune2fs -O ^has_journal /block/path/to/data
b) perfect mount options
Code:
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /system
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /data
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /cache
7. Flags blocks as non-rotational and increases cache size
Code:
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
for j in $LOOP $RAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done
8. microSD card speed tweak
Code:
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
9. Defrags database files
Code:
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
9. Remove logger
Code:
rm /dev/log/main
10. Ondemand governor tweaks
Code:
SAMPLING_RATE=$(busybox expr `cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_transition_latency` \* 750 / 1000)
echo 95 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo $SAMPLING_RATE > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
11. Auto change governor and I/O Scheduler
a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
Code:
echo "vr" > /sys/block/mmcblk0/queue/scheduler
or
echo "sio" > /sys/block/mmcblk0/queue/scheduler
b) Governor (Best: Minmax > SavagedZen > Smoothass > Smartass > Interactive) - needs kernel with these
Code:
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
12. Auto-zipalign on boot
(needs zipalign bin)
Code:
[url]http://forum.xda-developers.com/showthread.php?t=860586[/url]
13. Loopy Smoothness tweak
Code:
[url]http://forum.xda-developers.com/showthread.php?t=1137554[/url]
[url]http://forum.xda-developers.com/showthread.php?t=1205744[/url]
14. Move dalvik-cache to cache partition (if it's big enough) to free up data partition space
Code:
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 80000 ]
then
echo "Large cache detected, moving dalvik-cache to /cache"
if [ ! -d /cache/dalvik-cache ]
then
busybox rm -rf /cache/dalvik-cache /data/dalvik-cache
mkdir /cache/dalvik-cache /data/dalvik-cache
fi
busybox chown 1000:1000 /cache/dalvik-cache
busybox chmod 0771 /cache/dalvik-cache
# bind mount dalvik-cache so we can still boot without the sdcard
busybox mount -o bind /cache/dalvik-cache /data/dalvik-cache
busybox chown 1000:1000 /data/dalvik-cache
busybox chmod 0771 /data/dalvik-cache
else
echo "Small cache detected, dalvik-cache will remain on /data"
fi
15. Disable normalize sleeper
Code:
mount -t debugfs none /sys/kernel/debug
echo NO_NORMALIZED_SLEEPER > /sys/kernel/debug/sched_features
16. OOM groupings and priorities tweaks - SuperCharger
Code:
[url]http://forum.xda-developers.com/showthread.php?t=991276[/url]
GPS.conf
(create or edit your /system/etc/gps.conf with a file manager with root access)
For improving GPS lock time and signal.
a) European NTP server (replace for america or asia in your case)
Code:
NTP_SERVER=europe.pool.ntp.org
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra.bin
b) SE supl for A-GPS (better than Nokia's or Google's)
Code:
SUPL_HOST=supl.sonyericsson.com
SUPL_PORT=7275
Other tweaks or guidelines
1. Patch your hosts file for blocking Ads
(please think before doing this; many developers are supported through this way)
Code:
You can use AdFree application for this or changing manually your hosts file.
Here are some databases:
http://www.mvps.org/winhelp2002/hosts.txt
http://pgl.yoyo.org/adservers/serverlist.php?showintro=0;hostformat=hosts
2. Use CyanogenMOD's APN list file - it's one of the most complete.
Code:
It's located in /system/etc/apns-conf.xml
3. Use UOT kitchen for basic theming on your device.
Code:
http://uot.dakra.lt/
4. Use Google's dns servers
Code:
Create an empty file, name it resolv.conf and put there these 2 lines:
nameserver 8.8.8.8
nameserver 8.8.4.4
Save to /system/etc/.
5. Update Superuser and su binary to latest version (3.0 beta)
Code:
http://goo-inside.me/superuser/
6. Disable sync feature in sqlite
(author: ownhere - needs a source for your device so you can compile the /system/lib/libsqlite.so)
Code:
Patch file here: http://forum.xda-developers.com/showthread.php?t=903507
7. Do not use task killers.
Alright, I think this is it for now.
If you have any other tweaks or better values, you can PM me and I'll include them.
Edit: took out quote for easier copy-paste ability.
Sent from my Dell Streak using xda premium
nice awesome tweak values there
i'll try it soon
thanks for the tips my friend
WOW!!! Nice going! keep them coming.
scripts
do these only work on custom roms, or can they be used on stock? i think the files called system.prop or something instead of build.prop, hence why i ask before i start attempring to alter anything ?
gazza35 said:
do these only work on custom roms, or can they be used on stock? i think the files called system.prop or something instead of build.prop, hence why i ask before i start attempring to alter anything ?
Click to expand...
Click to collapse
System.prop is something completely differenr...the build.prop file is in the system folder.
Sent from my Dell Streak using xda premium
one of these scripts destroys wifi connection. it connects and shows the symbol but theres no internet. upon removing a few of them i now reboot to a black screen and have to restore my device.
chuuw33 said:
one of these scripts destroys wifi connection. it connects and shows the symbol but theres no internet. upon removing a few of them i now reboot to a black screen and have to restore my device.
Click to expand...
Click to collapse
Which rom are you using? I know many gb roms have had wifi reconnection problems...
Sent from my Dell Streak using xda premium
backcover sensor
Is there any way to stop dell streak to shut down when remove back cover?
Its a kernel hack, unfortunately. DJSteve's Streakdroid and DSC are the only ones I know of that have this.
beginner said:
Is there any way to stop dell streak to shut down when remove back cover?
Click to expand...
Click to collapse
Just answered in this thread..its a lever under the plate... http://forum.xda-developers.com/showthread.php?t=1393650
Sent from my Dell Streak using xda premium
/sys/devices/virtual/bdi/179:0/read_ahead_kb
is for the external SD/USB
What about the internal one?
Wow, blast from the past! You're
gianmaxfactor said:
/sys/devices/virtual/bdi/179:0/read_ahead_kb
is for the external SD/USB
What about the internal one?
Click to expand...
Click to collapse
Wow, what a blast from the past - you still have a Dell Streak 5 in 2023?
Sorry, I don't have anything useful to add I don't recall what the ID was for the internal storage on my Streak, I replaced it a decade ago.
smnc said:
Wow, blast from the past! You're
Wow, what a blast from the past - you still have a Dell Streak 5 in 2023?
Sorry, I don't have anything useful to add I don't recall what the ID was for the internal storage on my Streak, I replaced it a decade ago.
Click to expand...
Click to collapse
@smnc you seem to be a Senior Member. With any respect, is it that difficult for you to understand that was nothing about the Streak (I don't even know what you are talking about) but a "generic" android/linux setting?
gianmaxfactor said:
@smnc you seem to be a Senior Member. With any respect, is it that difficult for you to understand that was nothing about the Streak (I don't even know what you are talking about) but a "generic" android/linux setting?
Click to expand...
Click to collapse
I'll assume we have a language barrier here and that you weren't being intentionally disrespectful.
1) You posted in a thread that has been dead for 11 years+, for a specific device that has been out of production for just as long. Expecting any response should have been a long-shot, but expecting a non-device-specific response is just odd. The only reason I saw your post was because by sheer dumb luck, I happened to have notifications turned on for this thread from way back then.
2) While read_ahead_kb may be a "generic setting", storage device paths such as /sys/devices/virtual/bdi/179:0/ are not. Different Android/Linux/Unix devices, and even differnt builds for the same device may arrange storage devices in different configurations, so finding out the path for the internal storage on a Dell Streak 5 running Android Gingerbread will likely not apply to whatever device you're working on.
3) The actual read-ahead cache size from a 12-year-old device is not likely to be useful on a modern device as storage technology and speeds have changed dramatically since then.
Perhaps if you posted in a general channel, or one specific to your device, someone might be able to give you more useful information fort whatever your project is.
Hopefully that helps you.

Franco dev tweaks, very old but very good

Hello I found this flashable tweak from franco dev team, 2013 , but they are working good just sharing then. Credits to the awesome franco and his dev team.
Just flash it in recovery, to remove them just dirty flash your current ROM, enjoy.
875mntsettings
Code:
#!/system/bin/sh
# chmod -R 755 /system/etc/init.d
# 12-May-2013 by Franco's Dev Team
# malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres
# sysfs+sdcard tweaks
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /proc;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /sys;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /sys/kernel/debug;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto /mnt/shell/emulated;
for i in /storage/emulated/*; do
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto $i;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime -t auto $i/Android/obb;
done;
# partition tweaks
busybox mount -o remount,nosuid,nodev,noatime,nodiratime,barrier=0,noauto_da_alloc,discard -t auto /data;
busybox mount -o remount,nosuid,nodev,noatime,nodiratime,barrier=0,noauto_da_alloc,discard -t auto /cache;
busybox mount -o remount,nodev,noatime,nodiratime,barrier=0,noauto_da_alloc,discard -t auto /system;
925vmsettings
Code:
#!/system/bin/sh
# chmod -R 755 /system/etc/init.d
# 26-Jun-2013 by Franco's Dev Team
# malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres
# disable sysctl.conf to prevent ROM interference
if [ -e /system/etc/sysctl.conf ]; then
mount -o remount,rw /system;
mv /system/etc/sysctl.conf /system/etc/sysctl.conf.fkbak;
mount -o remount,ro /system;
fi;
# vm tweaks
echo 5 > /proc/sys/vm/dirty_background_ratio;
echo 200 > /proc/sys/vm/dirty_expire_centisecs;
echo 20 > /proc/sys/vm/dirty_ratio;
echo 500 > /proc/sys/vm/dirty_writeback_centisecs;
echo 2884 > /proc/sys/vm/min_free_kbytes;
echo 4 > /proc/sys/vm/min_free_order_shift;
echo 3 > /proc/sys/vm/page-cluster;
echo 0 > /proc/sys/vm/swappiness;
echo 100 > /proc/sys/vm/vfs_cache_pressure;
# lmk tweaks
minfree=6144,8192,12288,16384,24576,40960;
lmk=/sys/module/lowmemorykiller/parameters/minfree;
minboot=`cat $lmk`;
while sleep 1; do
if [ `cat $lmk` != $minboot ]; then
[ `cat $lmk` != $minfree ] && echo $minfree > $lmk || exit;
fi;
done&
# fs tweaks
echo 10 > /proc/sys/fs/lease-break-time;
# entropy tweaks
echo 128 > /proc/sys/kernel/random/read_wakeup_threshold;
echo 256 > /proc/sys/kernel/random/write_wakeup_threshold;
# tcp tweaks
echo "westwood" > /proc/sys/net/ipv4/tcp_congestion_control;
950iosettings
Code:
#!/system/bin/sh
# chmod -R 755 /system/etc/init.d
# 11-Jun-2013 by Franco's Dev Team
# malaroth, osm0sis, joaquinf, The Gingerbread Man, pkgnex, Khrushy, shreddintyres
# disable sysctl.conf to prevent ROM interference
if [ -e /system/etc/sysctl.conf ]; then
mount -o remount,rw /system;
mv /system/etc/sysctl.conf /system/etc/sysctl.conf.fkbak;
mount -o remount,ro /system;
fi;
# general queue tweaks
for i in /sys/block/*/queue; do
echo 512 > $i/nr_requests;
echo 512 > $i/read_ahead_kb;
echo 2 > $i/rq_affinity;
echo 0 > $i/nomerges;
echo 0 > $i/add_random;
echo 0 > $i/rotational;
done;
# override scheduler defaults with tweaked values
scheduler=reset;
while sleep 1; do
current=`cut -d\[ -f2 /sys/block/mmcblk0/queue/scheduler | cut -d\] -f1`;
if [ $scheduler != $current ]; then
scheduler=$current;
if [ $scheduler == "deadline" ]; then
# deadline tweaks
echo 250 > /sys/block/mmcblk0/queue/iosched/read_expire;
echo 2500 > /sys/block/mmcblk0/queue/iosched/write_expire;
echo 1 > /sys/block/mmcblk0/queue/iosched/writes_starved;
echo 1 > /sys/block/mmcblk0/queue/iosched/front_merges;
echo 8 > /sys/block/mmcblk0/queue/iosched/fifo_batch;
elif [ $scheduler == "row" ]; then
# row tweaks
echo 100 > /sys/block/mmcblk0/queue/iosched/hp_read_quantum;
echo 75 > /sys/block/mmcblk0/queue/iosched/rp_read_quantum;
echo 5 > /sys/block/mmcblk0/queue/iosched/hp_swrite_quantum;
echo 4 > /sys/block/mmcblk0/queue/iosched/rp_swrite_quantum;
echo 4 > /sys/block/mmcblk0/queue/iosched/rp_write_quantum;
echo 3 > /sys/block/mmcblk0/queue/iosched/lp_read_quantum;
echo 12 > /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum;
echo 10 > /sys/block/mmcblk0/queue/iosched/read_idle;
echo 25 > /sys/block/mmcblk0/queue/iosched/read_idle_freq;
## N4 and N10 row adds lsl and rsl, which were hardcoded previously
echo 10000 > /sys/block/mmcblk0/queue/iosched/low_starv_limit;
echo 5000 > /sys/block/mmcblk0/queue/iosched/reg_starv_limit;
## N4 and N10 have a new version of row with corrected entry for lsq and renamed ri and rif
[ `cat /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum` != "2" ] && echo 2 > /sys/block/mmcblk0/queue/iosched/lp_swrite_quantum;
echo 10 > /sys/block/mmcblk0/queue/iosched/rd_idle_data;
echo 25 > /sys/block/mmcblk0/queue/iosched/rd_idle_data_freq;
elif [ $scheduler == "cfq" ]; then
# cfq tweaks
echo 4 > /sys/block/mmcblk0/queue/iosched/quantum;
echo 80 > /sys/block/mmcblk0/queue/iosched/fifo_expire_sync;
echo 330 > /sys/block/mmcblk0/queue/iosched/fifo_expire_async;
echo 12582912 > /sys/block/mmcblk0/queue/iosched/back_seek_max;
echo 1 > /sys/block/mmcblk0/queue/iosched/back_seek_penalty;
echo 60 > /sys/block/mmcblk0/queue/iosched/slice_sync;
echo 50 > /sys/block/mmcblk0/queue/iosched/slice_async;
echo 2 > /sys/block/mmcblk0/queue/iosched/slice_async_rq;
echo 0 > /sys/block/mmcblk0/queue/iosched/slice_idle;
echo 0 > /sys/block/mmcblk0/queue/iosched/group_idle;
echo 1 > /sys/block/mmcblk0/queue/iosched/low_latency;
## N4 and N10 cfq adds tl, which was hardcoded previously
echo 300 > /sys/block/mmcblk0/queue/iosched/target_latency;
fi;
fi;
# loop forever independently
done&
Flash an unidentified 3-year-old zip? Thank you, but I'll pass...
fedef12evo said:
Hello I found this flashable tweak from franco dev team, 2013 , but they are working good just sharing then. Credits to the awesome franco and his dev team.
Just flash it in recovery, to remove them just dirty flash your current ROM, enjoy.
Click to expand...
Click to collapse
Why should anyone flash this?
Can you also post a Ice Cream Sandwich rom to go with it
fedef12evo said:
Hello I found this flashable tweak from franco dev team, 2013 , but they are working good just sharing then. Credits to the awesome franco and his dev team.
Just flash it in recovery, to remove them just dirty flash your current ROM, enjoy.
Click to expand...
Click to collapse
Don't you think you should at least explain exactly what these tweaks do?!
download the zip with pc, then open it and read every of 3 tweak what do, im gonna post it for you
first off, what do these "tweaks" do do you know? as nd Franco isnt a dev team, its an individual person.
simms22 said:
first off, what do these "tweaks" do do you know? as nd Franco isnt a dev team, its an individual person.
Click to expand...
Click to collapse
Read them tweak, back in thr day franco had a team
fedef12evo said:
Read them tweak, back in thr day franco had a team
Click to expand...
Click to collapse
no, he doesnt. he has people test out his kernels, but he IS alone. i know, im friends with him. i dont need to read the tweaks, you posted them here and you have to post what they do. if not, your thread will kust get closed down.
Thread closed. No-one with any sense would try this considering absolutely no info on resultant effects has been given, and the sheer age of the "tweaks".
Anyone wishing to try does so bearing the above caveat in mind.

Categories

Resources