[Scripts] Nexus 4 LTE Build Prop Editor & Tmobile Soundfile Edits - Nexus 4 Themes and Apps

The following scripts are made to ease the life of a flashaholic and LTE. I flash a ton of Cyanogen Nightlies and new Roms of others.
They have been working for me for a while now and I though I should share them.
Soon ill look into adding the APN for Tmobile LTE to the apns-conf.xml and possibly combine into one script.
You Must Have Root! I have run these using the free $cripter but you should be able to use Script Manager as well.
I have also added them as attachments below.
Please test these before blindly running. Just because they work flawless for me doesn't mean it will for everyone in every case. The Tmobile sound edits are the newest one so please watch this one a little more careful and I have not run it as much and mine uses tab and not spaces as the reference post.
If you find any of the scripts useful, feel free to hit the [Thanks] button below
Disclaimer: I am not responsible bricking your phone, voiding your warranty, or any other issue may have as result of using these scripts
Build.prop Editor
Last Updated: 04/13/2013
Version: b01 custom b02 prop edit to possible speed up internet
Description: This will change entries if already in build.prop or add the needed entries at the bottom to enable LTE and also perfered network options in Cyanogenmod. It will make a backup of the file prior to doing this.
Code:
#!/system/bin/sh
# Nexus 4 build.prop Editor to enabled LTE
# created by XDA user: justinaz
# created on 4/13/13
# version: b01
# mounting system as rw
busybox mount -o remount,rw /system
if [ $? != 0 ] ; then exit
fi
# Set the File to Edit
FILE=/system/build.prop
#Make Backup of build.prop
if [ -f $FILE.orig ];
then
cp $FILE $FILE.orig.1
else
cp $FILE $FILE.orig
fi
# Set the Build.prop items below
# line# is the Build Prop you want to change
# lineArg# is the value you want it to be
line1=telephony.lteOnGsmDevice
lineArg1=1
line2=ro.telephony.default_network
lineArg2=9
line3=ro.ril.def.preferred.network
lineArg3=9
# X should end with number of changes above 1 2 3
for X in 1 2 3
do
lineNum=
eval prop=\$line$X
eval arg=\$lineArg$X
echo $prop=$arg
if grep -Fq $prop $FILE ; then
lineNum=`sed -n "/${prop}/=" $FILE`
echo $lineNum
sed -i "${lineNum} c${prop}=${arg}" $FILE
else
echo "$prop does not exist in $FILE"
echo "Adding to end of $FILE"
echo $prop=$arg >> $FILE
fi
done;
# mounting system as ro
busybox mount -o remount,ro /system
Soundfile Editor (Tmobile Fixes)
Last Updated: 04/13/2013
Version: s01
Description: This will change the needed snd_soc_msm_2x_Fusion3 entries for T-Mobile. It will make a backup prior to doing this.
Reference: XDA post: simobile: Fix for no in-call audio/T-Mobile US/4.2.2/.33 radio or lower
Code:
#!/system/bin/sh
# Nexus 4 Sound File Editor to fix enabled LTE Sound Issues
# created by XDA user: justinaz
# created on 4/13/13
# version: s01
# Reference XDA post: simobile http://forum.xda-developers.com/showthread.php?t=2233319
# mounting system as rw
busybox mount -o remount,rw /system
if [ $? != 0 ] ; then exit
fi
# Set the File to Edit
FILE=/system/etc/snd_soc_msm/snd_soc_msm_2x_Fusion3
#Make Backup File we ar editing just in case
if [ -f $FILE.orig ];
then
cp $FILE $FILE.orig.1
else
cp $FILE $FILE.orig
fi
# line# is the Line Item you want to change
# lineArg# is the value you want it to be
line1=" ACDBID 81:1"
lineArg1=" ACDBID 7:1"
line2=" ACDBID 91:2"
lineArg2=" ACDBID 6:2"
# X should end with number of changes above 1 2
for X in 1 2
do
lineNum=
eval prop=\$line$X
eval arg=\$lineArg$X
if grep -Fq "$prop" $FILE ; then
lineNum=`sed -n "/${prop}/=" $FILE`
echo "Line number $lineNum found for: $prop"
sed -i "${lineNum} c${arg}" $FILE
echo "$lineNum from: $prop :TO: $arg"
else
echo "$prop does not exist in $FILE"
fi
done;
# mounting system as ro
busybox mount -o remount,ro /system

justinaz said:
The following scripts are made to ease the life of a flashaholic and LTE. I flash a ton of Cyanogen Nightlies and new Roms of others.
They have been working for me for a while now and I though I should share them.
Soon ill look into adding the APN for Tmobile LTE to the apns-conf.xml and possibly combine into one script.
You Must Have Root! I have run these using the free $cripter but you should be able to use Script Manager as well.
I have also added them as attachments below.
Please test these before blindly running. Just because they work flawless for me doesn't mean it will for everyone in every case. The Tmobile sound edits are the newest one so please watch this one a little more careful and I have not run it as much and mine uses tab and not spaces as the reference post.
If you find any of the scripts useful, feel free to hit the [Thanks] button below
Disclaimer: I am not responsible bricking your phone, voiding your warranty, or any other issue may have as result of using these scripts
Build.prop Editor
Last Updated: 04/13/2013
Version: b01
Description: This will change entries if already in build.prop or add the needed entries at the bottom to enable LTE and also perfered network options in Cyanogenmod. It will make a backup of the file prior to doing this.
Code:
#!/system/bin/sh
# Nexus 4 build.prop Editor to enabled LTE
# created by XDA user: justinaz
# created on 4/13/13
# version: b01
# mounting system as rw
busybox mount -o remount,rw /system
if [ $? != 0 ] ; then exit
fi
# Set the File to Edit
FILE=/system/build.prop
#Make Backup of build.prop
if [ -f $FILE.orig ];
then
cp $FILE $FILE.orig.1
else
cp $FILE $FILE.orig
fi
# Set the Build.prop items below
# line# is the Build Prop you want to change
# lineArg# is the value you want it to be
line1=telephony.lteOnGsmDevice
lineArg1=1
line2=ro.telephony.default_network
lineArg2=9
line3=ro.ril.def.preferred.network
lineArg3=9
# X should end with number of changes above 1 2 3
for X in 1 2 3
do
lineNum=
eval prop=\$line$X
eval arg=\$lineArg$X
echo $prop=$arg
if grep -Fq $prop $FILE ; then
lineNum=`sed -n "/${prop}/=" $FILE`
echo $lineNum
sed -i "${lineNum} c${prop}=${arg}" $FILE
else
echo "$prop does not exist in $FILE"
echo "Adding to end of $FILE"
echo $prop=$arg >> $FILE
fi
done;
# mounting system as ro
busybox mount -o remount,ro /system
Soundfile Editor (Tmobile Fixes)
Last Updated: 04/13/2013
Version: s01
Description: This will change the needed snd_soc_msm_2x_Fusion3 entries for T-Mobile. It will make a backup prior to doing this.
Reference: XDA post: simobile: Fix for no in-call audio/T-Mobile US/4.2.2/.33 radio or lower
Code:
#!/system/bin/sh
# Nexus 4 Sound File Editor to fix enabled LTE Sound Issues
# created by XDA user: justinaz
# created on 4/13/13
# version: s01
# Reference XDA post: simobile http://forum.xda-developers.com/showthread.php?t=2233319
# mounting system as rw
busybox mount -o remount,rw /system
if [ $? != 0 ] ; then exit
fi
# Set the File to Edit
FILE=/system/etc/snd_soc_msm/snd_soc_msm_2x_Fusion3
#Make Backup File we ar editing just in case
if [ -f $FILE.orig ];
then
cp $FILE $FILE.orig.1
else
cp $FILE $FILE.orig
fi
# line# is the Line Item you want to change
# lineArg# is the value you want it to be
line1=" ACDBID 81:1"
lineArg1=" ACDBID 7:1"
line2=" ACDBID 91:2"
lineArg2=" ACDBID 6:2"
# X should end with number of changes above 1 2
for X in 1 2
do
lineNum=
eval prop=\$line$X
eval arg=\$lineArg$X
if grep -Fq "$prop" $FILE ; then
lineNum=`sed -n "/${prop}/=" $FILE`
echo "Line number $lineNum found for: $prop"
sed -i "${lineNum} c${arg}" $FILE
echo "$lineNum from: $prop :TO: $arg"
else
echo "$prop does not exist in $FILE"
fi
done;
# mounting system as ro
busybox mount -o remount,ro /system
Click to expand...
Click to collapse
I LOVE YOU !!! lol

Will this work with the new radio?
Sent from my Nexus 4

Contivity said:
Will this work with the new radio?
Sent from my Nexus 4
Click to expand...
Click to collapse
No, newest radio can't use lte

I know this is off topic, but was wondering if you can help me with this. Can you please make a script that will add these 4 lines to the build.prop?
ro.ril.hsxpa=2
ro.ril.gprsclass=12
ro.ril.hsdpa.category=24
ro.ril.hsupa.category=7
I got these lines from Simms22 awhile back. It helps with data connection and speeds with T-Mobile. Please! =)

Goog1e Phone said:
I know this is off topic, but was wondering if you can help me with this. Can you please make a script that will add these 4 lines to the build.prop?
ro.ril.hsxpa=2
ro.ril.gprsclass=12
ro.ril.hsdpa.category=24
ro.ril.hsupa.category=7
I got these lines from Simms22 awhile back. It helps with data connection and speeds with T-Mobile. Please! =)
Click to expand...
Click to collapse
Its pretty easy to add additional build prop additions.
THis is the new one.... i tested and appears to work correctly
Code:
#!/system/bin/sh
# Nexus 4 build.prop Editor to enabled LTE
# created by XDA user: justinaz
# created on 4/13/13
# version: b02
# mounting system as rw
busybox mount -o remount,rw /system
if [ $? != 0 ] ; then exit
fi
# Set the File to Edit
FILE=/system/build.prop
#Make Backup of build.prop
if [ -f $FILE.orig ];
then
cp $FILE $FILE.orig.1
else
cp $FILE $FILE.orig
fi
# Set the Build.prop items below
# line# is the Build Prop you want to change
# lineArg# is the value you want it to be
line1=telephony.lteOnGsmDevice
lineArg1=1
line2=ro.telephony.default_network
lineArg2=9
line3=ro.ril.def.preferred.network
lineArg3=9
line4=ro.ril.hsxpa
lineArg4=2
line5=ro.ril.gprsclass
lineArg5=12
line6=ro.ril.hsdpa.category
lineArg6=24
line7=ro.ril.hsupa.category
lineArg7=7
# X should end with number of changes above 1 2 3
for X in 1 2 3 4 5 6 7
do
lineNum=
eval prop=\$line$X
eval arg=\$lineArg$X
echo $prop=$arg
if grep -Fq $prop $FILE ; then
lineNum=`sed -n "/${prop}/=" $FILE`
echo $lineNum
sed -i "${lineNum} c${prop}=${arg}" $FILE
else
echo "$prop does not exist in $FILE"
echo "Adding to end of $FILE"
echo $prop=$arg >> $FILE
fi
done;
# mounting system as ro
busybox mount -o remount,ro /system

justinaz said:
Its pretty easy to add additional build prop additions.
THis is the new one.... i tested and appears to work correctly
Code:
#!/system/bin/sh
# Nexus 4 build.prop Editor to enabled LTE
# created by XDA user:justinaz
# created on 4/13/13
# version:b02
# mounting system as rw
busybox mount -o remount,rw /system
if [ $? != 0 ] ; then exit
fi
# Set the File to Edit
FILE=/system/build.prop
#Make Backup of build.prop
if [ -f $FILE.orig ];
then
cp $FILE $FILE.orig.1
else
cp $FILE $FILE.orig
fi
# Set the Build.prop items below
# line# is the Build Prop you want to change
# lineArg# is the value you want it to be
line1=telephony.lteOnGsmDevice
lineArg1=1
line2=ro.telephony.default_network
lineArg2=9
line3=ro.ril.def.preferred.network
lineArg3=9
line4=ro.ril.hsxpa
lineArg4=2
line5=ro.ril.gprsclass
lineArg5=12
line6=ro.ril.hsdpa.category
lineArg6=24
line7=ro.ril.hsupa.category
lineArg7=7
# X should end with number of changes above 1 2 3
for X in 1 2 3 4 5 6 7
do
lineNum=
eval prop=\$line$X
eval arg=\$lineArg$X
echo $prop=$arg
if grep -Fq $prop $FILE ; then
lineNum=`sed -n "/${prop}/=" $FILE`
echo $lineNum
sed -i "${lineNum} c${prop}=${arg}" $FILE
else
echo "$prop does not exist in $FILE"
echo "Adding to end of $FILE"
echo $prop=$arg >> $FILE
fi
done;
# mounting system as ro
busybox mount -o remount,ro /system
Click to expand...
Click to collapse
You're the man. Thank you for this! I would give you 10 thanks if I could!
Sent from my Nexus 4

Will these need to run on boot or just run once?
Sent from my Nexus 4 using xda app-developers app

n2d551 said:
Will these need to run on boot or just run once?
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Just once until you dirty flash a rom

It said I need to mount? How do I that?
Sent from my Nexus 4 using xda premium

Julianmgn said:
It said I need to mount? How do I that?
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Can you give the actual error it says and detail about how you are running it? Your description is very vague.
Couple things it could be...... of the top of my head
are you running it as ROOT? (its required)
do you have busybox installed? (its required)
are you trying to run this in recovery/init.d script? (this is a shell script not one of those, you would have to modify it to run like that)

justinaz said:
Can you give the actual error it says and detail about how you are running it? Your description is very vague.
Couple things it could be...... of the top of my head
are you running it as ROOT? (its required)
do you have busybox installed? (its required)
are you trying to run this in recovery/init.d script? (this is a shell script not one of those, you would have to modify it to run like that)
Click to expand...
Click to collapse
I'm rooted and I have busy box installed, I downloaded scripter like the op said and when I try to run it, it give me the error "mount: permission denied are you root?"
Sent from my Nexus 4 using xda premium

Julianmgn said:
I'm rooted and I have busy box installed, I downloaded scripter like the op said and when I try to run it, it give me the error "mount: permission denied are you root?"
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
Same thing happened to me, try script manager, it worked for me.
Sent from my Nexus 4 using Tapatalk 2

MidtownHD said:
Same thing happened to me, try script manager, it worked for me.
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
Tried that also its giving me the same error
Sent from my Nexus 4 using xda premium

Julianmgn said:
Tried that also its giving me the same error
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
well, I would delete app data from root access app and the script app, then uninstall the script app. Reboot phone, check root access with other apps, ex. a file manager, then install preferred script app and try the scripts again. Worst case, do it manually.
Sent from my Nexus 4 using Tapatalk 2

You are making it more complicated than you need to.
You have to run the script as root. If you are using scripter long press the script and edit it. On the top there is a check box for Run as root? Check that and hit save. Then run the script.
Sent from my Nexus 4 using Tapatalk 2

Or just run it in rom toolbox
Sent from my Nexus 4 using xda app-developers app

justinaz said:
You are making it more complicated than you need to.
You have to run the script as root. If you are using scripter long press the script and edit it. On the top there is a check box for Run as root? Check that and hit save. Then run the script.
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
Maybe the apps are not detecting the root access correctly.
Sent from my Nexus 4 using Tapatalk 2

justinaz said:
You are making it more complicated than you need to.
You have to run the script as root. If you are using scripter long press the script and edit it. On the top there is a check box for Run as root? Check that and hit save. Then run the script.
Sent from my Nexus 4 using Tapatalk 2
Click to expand...
Click to collapse
Yup that did it lol
Sent from my Nexus 4 using xda premium

Julianmgn said:
Yup that did it lol
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
so you never granted root access?
Sent from my Nexus 4 using Tapatalk 2

Related

init.d performance startup script

I've adapted the original performance tweaks by 'hardcore' @ XDA for my overclocked/undervolted Galaxy Tab. The tweaked values are pretty much the same as the ones recommended by the original poster, but my simple init.d/ script allows me to log default system values when pushing new values, which is useful for debugging. The script also contains comments to describe the role of each setting. Note that if you don't have init.d/ support in your kernel / initramfs, you can still run the script manually at each system start (use an app like GScript).
Code:
#!/system/bin/sh
#
# Original tweaks by 'hardcore' @ XDA
# http://forum.xda-developers.com/showthread.php?t=813309
# This is a startup script designed for /system/etc/init.d/.
# Note that "run-parts" support (for init.d/ scripts) is normally provided by custom a initramfs,
# which should bundle busybox in /sbin/. The /sbin/run-parts.sh script should take care of
# running init scripts (by calling /sbin/runparts), and it should subsequently trigger
# the device startup (using "setprop filesystem.ready 1", or similar).
# Note that the recovery mode typically doesn't run /system/etc/init.d/ startup scripts.
# Ensure /sbin/busybox takes precedence.
# Normally this is redundant, because the /init.rc startup script already sets the correct path.
export PATH=/sbin:$PATH
# Logging of old/new sysfs values, useful for double-checking.
logFile=/data/local/tmp/S_perf_tweaks.log
if [ -f $logFile ]
then
rm $logFile
fi
touch $logFile
# This function logs the old value and writes the new value.
echo_()
{
echo '' >> $logFile
echo -n "${2}${3} (${1}): " >> $logFile
#head -1 ${2}${3} >> $logFile
#read $firstLine < ${2}${3}
#echo -n $firstLine >> $logFile
contents=`echo -n $(cat ${2}${3})`
echo -n $contents >> $logFile
echo -n " ---> " >> $logFile
echo $1 > ${2}${3}
contents=`echo -n $(cat ${2}${3})`
echo -n $contents >> $logFile
}
# Note that the settings pushed by VoltageControl.apk
# could also be managed here (this only applies to kernels with clock/frequency tables and undervolt sysfs support):
#echo_ "50 50 50 25 25 25 25 " "/sys/devices/system/cpu/cpu0/cpufreq" "/UV_mV_table"
#echo_ 1400000 "/sys/devices/system/cpu/cpu0/cpufreq" "/scaling_max_freq"
echo "---------" >> $logFile
# Remount all partitions that use relatime with noatime and nodiratime instead.
# Note: atime generates a write-after-every-read, relatime is an optimized version of atime.
for k in $(mount | grep relatime | cut -d " " -f3)
do
echo "mount -o remount,noatime,nodiratime $k" >> $logFile
sync
mount -o remount,noatime $k
done
# Here is a sample test to measure read/write performance on rfs partitions:
### test for write: dd if=/dev/zero of=/data/test count=30000
### test for read: dd if=/data/test of=/dev/zero
echo "---------" >> $logFile
# Log the mount table
mount >> $logFile
echo "---------" >> $logFile
# Optimize the cfq/bfq I/O scheduler for flash memory (defaults are designed for spinning harddisks).
# Lower the idle wait, re-enable the low latency mode, remove the penalty for back-seeks,
# and explicitly tell the kernel that the storage is not a spinning disk.
for i in $(ls -1 /sys/block/stl*) $(ls -1 /sys/block/mmc*) $(ls -1 /sys/block/bml*) $(ls -1 -d /sys/block/tfsr*)
#for i in `ls /sys/block/stl* /sys/block/mmc* /sys/block/bml* /sys/block/tfsr*`;
do
# DEF noop anticipatory deadline cfq [bfq]
echo_ "bfq" $i "/queue/scheduler"
# DEF 1 ?
echo_ "0" $i "/queue/rotational"
# DEF 1 ?
echo_ "1" $i "/queue/iosched/low_latency"
# DEF 2 ?
echo_ "1" $i "/queue/iosched/back_seek_penalty"
# DEF 16384 ?
echo_ "1000000000" $i "/queue/iosched/back_seek_max"
# DEF 6 ?
echo_ "3" $i "/queue/iosched/slice_idle"
sync
done
# Set tendency of kernel to swap to minimum, since swap isn't used anyway.
# (swap = move portions of RAM data to disk partition or file, to free-up RAM)
# (a value of 0 means "do not swap unless out of free RAM", a value of 100 means "swap whenever possible")
# (the default is 60 which is okay for normal Linux installations)
# DEF 60
echo_ "0" "/proc/sys/vm" "/swappiness"
# Lower the amount of unwritten write cache to reduce lags when a huge write is required.
# DEF 20
echo_ "10" "/proc/sys/vm" "/dirty_ratio"
# Increase minimum free memory, in theory this should make the kernel less likely to suddenly run out of memory.
# DEF 3102
echo_ "4096" "/proc/sys/vm" "/min_free_kbytes"
# Increase tendency of kernel to keep block-cache to help with slower RFS filesystem.
# DEF 100
echo_ "1000" "/proc/sys/vm" "/vfs_cache_pressure"
# Increase the write flush timeouts to save some battery life.
# DEF 250
echo_ "2000" "/proc/sys/vm" "/dirty_writeback_centisecs"
# DEF 200
echo_ "1000" "/proc/sys/vm" "/dirty_expire_centisecs"
# Make the task scheduler more 'fair' when multiple tasks are running,
# which improves user-interface and application responsiveness.
# DEF 10000000
echo_ "20000000" "/proc/sys/kernel" "/sched_latency_ns"
# DEF 2000000
echo_ "2000000" "/proc/sys/kernel" "/sched_wakeup_granularity_ns"
# DEF 1000000
echo_ "1000000" "/proc/sys/kernel" "/sched_min_granularity_ns"
sync
# Miscellaneous tweaks
setprop dalvik.vm.startheapsize 8m
#setprop wifi.supplicant_scan_interval 90
echo '' >> $logFile
echo "---------" >> $logFile
#This apply a tweaked deadline scheduler to all RFS (and ext2/3/4, if existent) partitions.
#for i in /sys/block/*
#do
# DEF noop anticipatory deadline cfq [bfq]
#echo deadline > $i/queue/scheduler
#echo 4 > $i/queue/iosched/writes_starved
#echo 1 > $i/queue/iosched/fifo_batch
#echo 256 > $i/queue/nr_requests
#done
Thanks for this Daniel - since I know absolutely nothing about anything Android, all I can say is that I have 2 questions
1 - Would this script be any benefit to someone running a custom ROM (Overcome 1.1.3 in my case) and a custom kernel (Richard Trip's 1.4gHz EXT4)? I ask because I don't know if these guys have already including these tweaks or not... but maybe I should ask them instead...
2 - Is there any way you could put that script - in its most efficient, non-debugging form - in to a script file that us speed-freaks can just toss in to init.d and reboot?
Please do forgive me for any newbishness I have displayed here.
So should I put this script in /system/etc/init.d/ ?
UPDATE: Ok, I've done the script(without extension at the back of the file name) and put it in ~/init.d/, it runs well. I comment out the remount and logging function tho Tested it on some games that required load time like gangstar which lags alot previously, now just dnt have any lag time in it! Thanks!
Anyway, im running Overcome rom with richard's kernel, other than voltage script, i saw 2 more script that does the following:
10fixsh does:
"#!/system/bin/sh
busybox mount -o remount,rw /
find /sbin -maxdepth 1 -type l -exec rm {} \;
busybox mount -o remount,ro /
"
99done does:
"#!/system/bin/sh
sync;
setprop mcr.filesystem.ready 1;
"
So I just add your script as userinit since they do not have conflicting calls
Personally thinks that similar tweaks should be included in custom kernels so that those who wish to do more extreme settings can go with it while those who just wants increased performance as it is can still have the boost provided by such init script.
fastcx said:
Personally thinks that similar tweaks should be included in custom kernels so that those who wish to do more extreme settings can go with it while those who just wants increased performance as it is can still have the boost provided by such init script.
Click to expand...
Click to collapse
so basically just copy and paste the whole "code" in the first post, and create it as userinit.sh and put the userinit.sh file in /system/etc/init.d ?
am i right?
kay_kiat88 said:
so basically just copy and paste the whole "code" in the first post, and create it as userinit.sh and put the userinit.sh file in /system/etc/init.d ?
am i right?
Click to expand...
Click to collapse
still need more time to test, after some verification, none of the "/proc/sys/kernel" setting works with any of the kernel i'm using. thats y i need more time to rectify..
used richard's kernel and overcome kernel, both dont do anything now..perhaps wrong command in the script? Cause run-parts.sh does specify where to run script, and init.d does have 2 script in there that runs. So i'll need more time to make sure it works now..
Dont need to have .sh as extension, just a name for your script like the other 2 script that i posted in previous reply. And I did not copy the whole script to run, as the script seems questionable in some part..
fastcx said:
still need more time to test, after some verification, none of the "/proc/sys/kernel" setting works with any of the kernel i'm using. thats y i need more time to rectify..
used richard's kernel and overcome kernel, both dont do anything now..perhaps wrong command in the script? Cause run-parts.sh does specify where to run script, and init.d does have 2 script in there that runs. So i'll need more time to make sure it works now..
Dont need to have .sh as extension, just a name for your script like the other 2 script that i posted in previous reply. And I did not copy the whole script to run, as the script seems questionable in some part..
Click to expand...
Click to collapse
okay.. so basically just copy everything under the "code" and create it as userinit?
edit: hmmm okay thanks for you help. i don't think it's of any use for me now as my tab is quite fast and i don't do any intensive stuff on it. thanks anyway!
kay_kiat88 said:
okay.. so basically just copy everything under the "code" and create it as userinit?
edit: hmmm okay thanks for you help. i don't think it's of any use for me now as my tab is quite fast and i don't do any intensive stuff on it. thanks anyway!
Click to expand...
Click to collapse
Now i'm editing init.rc file instead, but it's not the safest thing to do
Wow all the best.. lol.
Sent from my GT-P1000 using Tapatalk
fastcx said:
Now i'm editing init.rc file instead, but it's not the safest thing to do
Click to expand...
Click to collapse
The init.rc file gets extracted from the initramfs ramdisc (packaged inside the zImage kernel) at each device startup. Changing this file's content is not a good idea. Regards, Dan
fastcx said:
So should I put this script in /system/etc/init.d/ ?
UPDATE: Ok, I've done the script(without extension at the back of the file name) and put it in ~/init.d/, it runs well.
Click to expand...
Click to collapse
Yes, the filename of the startup script must start with "S_" and must not end with ".sh". This is standard Linux stuff.
fastcx said:
find /sbin -maxdepth 1 -type l -exec rm {}
Click to expand...
Click to collapse
Removing the symlinks from "/sbin/" ... why ?
Normally Busybox should be installed properly in "/sbin/" by your kernel provider, you shouldn't have to touch this folder.
fastcx said:
99done does:
"#!/system/bin/sh
sync;
setprop mcr.filesystem.ready 1;
"
Click to expand...
Click to collapse
The "mcr.filesystem.ready" is only relevant if the "init.rc" file in the kernel zImage's initramfs ramdisc responds to a change to the "mcr.filesystem.ready" property (for example, when its value changes from 0 to 1). This is typically used to start the device normally, after *all* of the "/system/etc/init.d/" startup scripts have been executed.
The line of code "setprop mcr.filesystem.ready 1" is therefore typically included in "/sbin/runparts.sh", not in one of the "S_startup_scripts" (as this may trigger the device normal startup prematurely).
It really depends on your kernel, so it should be documented by your kernel provider.
daniel.weck said:
Yes, the filename of the startup script must start with "S_" and must not end with ".sh". This is standard Linux stuff.
It really depends on your kernel, so it should be documented by your kernel provider.
Click to expand...
Click to collapse
Great! thanks for clarifying! Sadly none of the kernel provider states any info on such matter. Will try your script again, as previously running thru gscript not all command works..
Copied your script 100%, put it in init.d with chmod 755, named it S_userinit, doesnt run..i double checked by cat value that I stated to change in the script.
Help? It obviously runs the UV script in init.d tho.
EDIT: Got it to work by editing the UV script, now settings are in! Great! Time to test anyway, nodiratime is not needed, noatime already has it
So how can I use this script - I want to
Hi, Just connected to my galaxy tab running froyo, and went looking in my filesystem for the init.d folder and yeah there isn't one
do i create one? where? and what permissions?
I try to keep this brief and not waste too much of your time.
many thanks for the script
Ttime & effort ++
andytof46 said:
Hi, Just connected to my galaxy tab running froyo, and went looking in my filesystem for the init.d folder and yeah there isn't one
do i create one? where? and what permissions?
I try to keep this brief and not waste too much of your time.
many thanks for the script
Ttime & effort ++
Click to expand...
Click to collapse
you will need a kernel that support init script, after that, /etc/init.d(or /system/etc/init.d) will be created
fastcx said:
Copied your script 100%, put it in init.d with chmod 755, named it S_userinit, doesnt run..i double checked by cat value that I stated to change in the script.
Help? It obviously runs the UV script in init.d tho.
EDIT: Got it to work by editing the UV script, now settings are in! Great! Time to test anyway, nodiratime is not needed, noatime already has it
Click to expand...
Click to collapse
Don't suppose you could post a copy of your trimmed & tweaked version of Daniel's script for us to use?
Cuz I, for example, have no idea what's useful in the original script, and what's not useful. But I at least know how to edit the UV script, heh.
jeebspawnshop said:
Don't suppose you could post a copy of your trimmed & tweaked version of Daniel's script for us to use?
Cuz I, for example, have no idea what's useful in the original script, and what's not useful. But I at least know how to edit the UV script, heh.
Click to expand...
Click to collapse
LOL here it goes
Code:
#!/system/bin/sh
#set UV
echo "0 0 0 0 0 0 0 0 " > /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
#select enabled states
echo "0 0 0 0 0 0 0 0 " > /sys/devices/system/cpu/cpu0/cpufreq/states_enabled_table
#set scheduler for stl, bml and mmc
for i in `ls /sys/block/stl*` /sys/block/bml* /sys/block/mmcblk*
do
echo "bfq" > $i/queue/scheduler
echo "0" > $i/queue/rotational
echo "1" > $i/queue/iosched/low_latency
echo "1" > $i/queue/iosched/back_seek_penalty
echo "1000000000" > $i/queue/iosched/back_seek_max
echo "3" > $i/queue/iosched/slice_idle
done
# Remount all partitions with noatime
for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done
# Tweak kernel VM management
echo "0" > /proc/sys/vm/swappiness
echo "10" > /proc/sys/vm/dirty_ratio
echo "4096" > /proc/sys/vm/min_free_kbytes
# Tweak kernel scheduler, less aggressive settings
echo "18000000" > /proc/sys/kernel/sched_latency_ns
echo "3000000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "1500000" > /proc/sys/kernel/sched_min_granularity_ns
# Misc tweaks for battery life
echo "2000" > /proc/sys/vm/dirty_writeback_centisecs
echo "1000" > /proc/sys/vm/dirty_expire_centisecs
# Miscellaneous tweaks
setprop dalvik.vm.startheapsize 8m
done
NOTE: If you change any settings in uv app, u'll revert S_volt_scheduler to ONLY UV settings, so It's recommended to edit your UV setting on this file instead of using uv app from now on if you wants to keep your other settings
Thanks dude!
I hit your Thanks Button too.
jeebspawnshop said:
Thanks dude!
I hit your Thanks Button too.
Click to expand...
Click to collapse
Thanks U should thanks the thread starter too U should just take it as reference, modify any that you feels ok, and perhaps post here as feedback on which makes things better, especially disc scheduler and task scheduler settings.
UPDATE: Made some changes to suggested value by daniel for "fairness", these setting really deals with multitasking better
echo "20000000" > /proc/sys/kernel/sched_latency_ns
echo "2000000" > /proc/sys/kernel/sched_wakeup_granularity_ns
echo "1000000" > /proc/sys/kernel/sched_min_granularity_ns
hey fastcx, i copied and pasted your script in the UV scheduler file in init.d but it seems that it's not working as the values don't apply. any ideas why?

[INFO] OpenVPN (tun.ko) for LG Tmobile Gslate

I just compiled a tun.ko and got OpenVPN working on the Tmobile Gslate! so I thought I would share:
1- Rooted (thanks to Chandon)
http://forum.xda-developers.com/showthread.php?t=1065882
2- Install tun.ko (Attached below)
download and unzip
Code:
adb remount
adb push tun.ko /system/lib/modules
adb shell
chmod 755 /system/lib/modules/tun.ko
Note: This tun module was built for kernel 2.6.36.3+
3- Install BusyBox using BusyBox Installer (from Market)
Install to /system/xbin
4- Install OpenVPN using OpenVPN Installer (from Market)
Install binary to /system/xbin
Install route to /system/xbin/bb
5- Install OpenVPN Settings (from Market)
6- Install OpenVPN static binary:
Download Static openvpn
Un-bz2 the file (7-Zip on Windows | bunzip2 on linux)
Code:
adb remount
adb push openvpn-static /system/xbin/openvpn
adb shell
chmod 555 /system/xbin/openvpn
7- Link Busybox ifconfig and route to /system/xbin/bb
Code:
adb shell
su
mkdir /system/xbin/bb
ln -s /system/xbin/ifconfig /system/xbin/bb/ifconfig
ln -s /system/xbin/route /system/xbin/bb/route
8- Setup OpenVPN Settings (from Market)
OpenVPN settings > Advanced > Load tun kernel module <- turn ON
OpenVPN settings > Advanced > TUN module settings
Load module using - insmod
Path to tun module - /system/lib/modules/tun.ko
9- copy your .conf files to /sdcard/openvpn
REBOOT
CONNECT!~
Extra for SMB mounters : Cifs.ko ! - Attached!
Edit: June 5 '11 - Extra for Asian users : nls_utf8.ko - Attached!
Well, I'm able to connect to my OpenVPN server now, but there must be something different in the binary..."client.conf: Connected" keeps spamming the notification area. Are you having this problem?
On a related note - I've got a couple other options, if I can get my cross-compiling tools set up correctly...I could use SonicWALL's NetExtender app, but that needs ppp_async and ppp_synctty built. I also wanted to be able to talk to a Windows-friendly PoPToP VPN server, but I suspect I'd need the ppp_mppe.ko built for that.
I tried compiling the whole kernel with the options I've mentioned, but I don't think I did it right...the make went all the way through, but I was using the gcc 4.4.3 eabi set in the SDK/NDK toolset. Since then, I've been trying to set things up according notes I found at K's Cluttered loft ( at triple-w dot (noob html limitation workaround) ailis.de/~k/archives/19-ARM-cross-compiling-howto dot HyperText Markup Language ) but start encountering problems when I try to build glibc...do you know of any instructions/tutorials which might help to educate this n00b (aye, that be me) in the fine art of ARM cross compiling?
bealesbane said:
Well, I'm able to connect to my OpenVPN server now, but there must be something different in the binary..."client.conf: Connected" keeps spamming the notification area. Are you having this problem?
On a related note - I've got a couple other options, if I can get my cross-compiling tools set up correctly...I could use SonicWALL's NetExtender app, but that needs ppp_async and ppp_synctty built. I also wanted to be able to talk to a Windows-friendly PoPToP VPN server, but I suspect I'd need the ppp_mppe.ko built for that.
I tried compiling the whole kernel with the options I've mentioned, but I don't think I did it right...the make went all the way through, but I was using the gcc 4.4.3 eabi set in the SDK/NDK toolset. Since then, I've been trying to set things up according notes I found at K's Cluttered loft ( at triple-w dot (noob html limitation workaround) ailis.de/~k/archives/19-ARM-cross-compiling-howto dot HyperText Markup Language ) but start encountering problems when I try to build glibc...do you know of any instructions/tutorials which might help to educate this n00b (aye, that be me) in the fine art of ARM cross compiling?
Click to expand...
Click to collapse
Yeah I have that spamming problem too .. always have with the honeycomb tablets.
I used 4.4.0 eabi, and had to hard code the localversion in the setlocalversion file and absolute path to the eabi modules in the makefile to get it to cross compile
I built and attached the ppp_async.ko , ppp_synctty.ko , ppp_mppe.ko for you (I did not test a insmod as I built and tested the cifs and tun on a friends tablet - do let me know if these work!)
That's great! Thanks for putting those together. All of the modules you created insert fine with insmod (this version of busybox still has an issue with modprobe running on this tablet, suspect may be related to self-referring parameter, but hope to experiment more later) with the exception of mppe. That one comes back with "insmod: init_module '/system/lib/modules/ppp_mppe.ko' failed (File exists)".
This, however, may not be due to the module itself, strictly speaking. The other two, which are presented by SonicWALL as a workaround to their proprietary VPN app, inserted fine, but still produce an I/O error when a connection is attempted...closer inspection of the app's log reveals a similar complaint under the hood:
06-01 08:01:36.848 I/NetExtender.ppp( 8207): Nxhelper: start pppd main routine
06-01 08:01:36.858 D/NetExtender.ppp( 8207): using channel 1
06-01 08:01:36.858 E/NetExtender.ppp( 8207): Couldn't create new ppp unit: File exists
06-01 08:01:36.858 I/NetExtender.ppp( 8207): Nxhelper: pppd hung up, notify the service
My off the wall guess, pending further investigation, is that inserting mppe, or trying to initialize the other two, results in an attempt to create a device handle which is not being properly enumerated? ( i.e., attempting to create an instance of /dev/ppp, which already exists, instead of a new handle, say, /dev/ppp0, ppp1, etc.) Again, just theorizing blindly at this point - but you've certainly given me a great deal to work with, and I say thank ya big big.
I'll update you with any progress I make here, but at least for the time being I still have basic connectivity to one of my networks, and I can do much with that. And the cifs module works a treat as well!
In the meantime, a simple script allows me to toggle the VPN on and off without being annoyed by the spamming...then I add a widget to the script using ScriptManager (from the market) and viola! Look ma, no hands!
Code:
#!/system/bin/sh
BB="/system/xbin/busybox"
VPN="/system/xbin/openvpn"
TUNDTL=`$BB ifconfig tun0 2>&1`
RESULT=$?
if [ $((RESULT)) -eq 1 ]; then
$VPN --config /mnt/sdcard/openvpn/client.conf --daemon MYVPN
else
VPNPID=`ps openvpn | grep "^root"`
VPNPID=`echo $VPNPID | cut -d" " -f2`
if [ $((VPNPID)) -gt 99 ]; then
$BB kill -KILL $VPNPID
fi
fi
exit
(Just for anyone who doesn't want to wait until OpenVPN Settings gets a bugfix for Honeycomb. Obviously, adjust locations as needed. Oh, and don't give the script a name that starts with "openvpn"...unless you WANT a kamikaze script. This simple script obviously wouldn't work for multiple tunnels, (if they're even supported), but it does ya fine for the basic config.)
awesome idea for the spamming .. sadly I have 8 openVPN servers I switch between so i have to put up with the spamming.. any idea what the reason of the spamming is? maybe contact the dev?
The source for the app is available at 'code.google.com/p/android-openvpn-settings'. The issue has been reported already by a few people (issue 70), but it looks like there are quite a few other issues reported, so no telling if or when Mr. Schäuffelhut will have a chance to review it. It seems like it would be a good starter project for a would-be contributor...I haven't done any java developing, but it seems like it would be easier to isolate our issue and tweak it than bloat my simple script to allow multiple PIDs to be tracked and toggled...though the latter is certainly possible, and after I get my second OpenVPN server online (Audiogalaxy offline for better part of day yesterday, need to make myself independent of that), if the Java is too daunting I just may do so. So many tempting projects, so little time.
Simple VPN handler script to tide us over until 0.4.8 or more in OpenVPN-Settings
Ok, since you were so kind as to compile those extra modules for me, I figure the least I can do is give you something in return. Here's a simple VPN handler to manage multiple tunnels. Filenames for config files are entered relative to the CFGS folder, and module load/remove is manual rather than auto...and I put in connection sharing, as I'm using it this way...but it'll certainly let you use as many tunnels as the kernel will let you work with.
As always, the standard, 'you take your life into your own hands if you use this code, not responsible for problems up to and including user death' disclaimer applies. It seems to be working for me, though I'm only using 2 VPN's ATM.
Good luck! (Will still let you know if I make any progress in Java Dev)
Code:
[email protected]: /data/local/bin > cat ./vpnhandler
#!/system/bin/sh
export BB="/system/xbin/busybox"
export VPN="/system/xbin/openvpn"
export MODS="/system/lib/modules"
export CFGS="/mnt/sdcard/openvpn"
export SPACES=" "
LOOPBACK=0
while [ $((LOOPBACK)) -eq 0 ]; do
LOOPBACK=1
CIFMOD=`$BB lsmod | grep -c "^cifs"`
if [ $((CIFMOD)) -eq 0 ]; then CIFMOD="Load"; else CIFMOD="Remove"; fi
TUNMOD=`$BB lsmod | grep -c "^tun"`
if [ $((TUNMOD)) -eq 0 ]; then TUNMOD="Load"; else TUNMOD="Remove"; fi
clear
echo "Simple VPN Handler"
echo "=================="
echo
echo "ACT # Tunnel Name Configuration File "
echo "--- --- -------------------- ------------------------------"
while read vpndefs; do
TUNNO=`echo "${vpndefs}" | cut -d"~" -f1`
TUNNAME=`echo "${vpndefs}" | cut -d"~" -f2`
TUNCFG=`echo "${vpndefs}" | cut -d"~" -f3`
TUNSTAT=`$BB ps w | grep openvpn | grep -c "\-\-daemon ${TUNNAME}\$"`
if [ $((TUNSTAT)) -eq 1 ]; then TUNSTAT="*"; else TUNSTAT=" "; fi
DISPLINE=" ${TUNSTAT} ${SPACES:0:$((3-${#TUNNO}))}${TUNNO} ${TUNNAME}${SPACES:0:$((22-${#TUNNAME}))}${TUNCFG}"
echo "${DISPLINE}"
done < "${CFGS}/cfglist"
echo
echo "_______________________________________________________________"
echo
echo " A - Add a new tunnel definition"
echo " D - Delete an existing tunnel "
echo " C - ${CIFMOD} CIFS Module "
echo " T - ${TUNMOD} TUN Module "
echo " S - Share tap0 to eth0 traffic "
echo " X - Break traffic forwarding "
echo " Q - Quit "
echo
echo -n " Select action, or a tunnel number to toggle on or off : "
read actkey
if [ "$actkey" = "C" -o "$actkey" = "c" ]; then
LOOPBACK=0
if [ "$CIFMOD" = "Load" ]; then
LOADMOD=`$BB insmod ${MODS}/cifs.ko 2>&1`
else LOADMOD=`/system/bin/toolbox rmmod cifs.ko 2>&1`
fi
fi
if [ "$actkey" = "T" -o "$actkey" = "t" ]; then
LOOPBACK=0
if [ "$TUNMOD" = "Load" ]; then
LOADMOD=`$BB insmod ${MODS}/tun.ko 2>&1`
else LOADMOD=`/system/bin/toolbox rmmod tun.ko 2>&1`
fi
fi
if [ "$actkey" = "S" -o "$actkey" = "s" ]; then
LOOPBACK=0
iptables -F; iptables -t nat -F; iptables -X; iptables -t nat -X
echo 1 | tee /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o tap0 -j MASQUERADE
iptables -A FORWARD -i eth0 -j ACCEPT
fi
if [ "$actkey" = "X" -o "$actkey" = "x" ]; then
LOOPBACK=0
iptables -F; iptables -t nat -F; iptables -X; iptables -t nat -X
echo 0 | tee /proc/sys/net/ipv4/ip_forward
fi
if [ "$actkey" = "A" -o "$actkey" = "a" ]; then
LOOPBACK=0
echo; echo -n " Enter tunnel number to assign : "; read TUNNO
TUNCHK=`cat "${CFGS}/cfglist" | grep -c "^${TUNNO}~"`
if [ $((TUNCHK)) -eq 0 ]; then
echo; echo -n " Enter a name for the tunnel : "; read TUNNAME
echo; echo -n " Enter filepath/name for config file (relative to ${CFGS}) : "; read TUNCFG
echo "${TUNNO}~${TUNNAME}~${TUNCFG}" >> "${CFGS}/cfglist"
else echo -n " That number is already in use. "; read TUNNO
fi
fi
if [ "$actkey" = "D" -o "$actkey" = "d" ]; then
LOOPBACK=0
echo; echo -n " Enter tunnel number to delete : "; read TUNNO
TUNCHK=`cat "${CFGS}/cfglist" | grep -c "^${TUNNO}~"`
if [ $((TUNCHK)) -eq 0 ]; then
echo -n " That number is not currently in use. "; read TUNNO
else vpndefs=`cat "${CFGS}/cfglist" | grep "^${TUNNO}~"`
TUNNAME=`echo "${vpndefs}" | cut -d"~" -f2`
TUNSTAT=`$BB ps w | grep openvpn | grep -c "\-\-daemon ${TUNNAME}\$"`
if [ $((TUNSTAT)) -gt 0 ]; then
echo; echo -n " Tunnel is active. Turn off before deleting."; read TUNNO
else RESULT=`cat "${CFGS}/cfglist" | egrep -v "^${TUNNO}~" > "${CFGS}/cfglist.tmp"`
$BB mv -f "${CFGS}/cfglist.tmp" "${CFGS}/cfglist"
fi
fi
fi
if [ "$actkey" = "Q" -o "$actkey" = "q" ]; then LOOPBACK=0; fi
if [ $((LOOPBACK)) -eq 1 ]; then
TUNCHK=`cat "${CFGS}/cfglist" | grep -c "^${actkey}~"`
LOOPBACK=0
if [ $((TUNCHK)) -eq 0 ]; then
echo -n " That number is not currently in use. "; read TUNNO
else TUNNO="${actkey}"
vpndefs=`cat "${CFGS}/cfglist" | grep "^${TUNNO}~"`
TUNNAME=`echo "${vpndefs}" | cut -d"~" -f2`
TUNCFG=`echo "${vpndefs}" | cut -d"~" -f3`
TUNSTAT=`$BB ps w | grep openvpn | grep -c "\-\-daemon ${TUNNAME}\$"`
if [ $((TUNSTAT)) -gt 0 ]; then
VPNPID=`$BB ps w | grep openvpn | grep "\-\-daemon ${TUNNAME}"`
VPNPID=`echo $VPNPID | cut -d" " -f1`
if [ $((VPNPID)) -gt 99 ]; then
RESULT=`$BB kill -KILL $VPNPID`
fi
else RESULT=`$VPN --config "${CFGS}/${TUNCFG}" --daemon "${TUNNAME}"`
fi
fi
fi
if [ "$actkey" = "Q" -o "$actkey" = "q" ]; then LOOPBACK=1; fi
done
exit
Note: It'll throw out some screen errors if you don't have a zero length file in $CFGS/cfglist, but it'll let you add your first tunnel anyway. (Didn't bother to trap for that.)
Oh, and ScriptManager doesn't seem to like digging for scripts in /data/local/bin, but doesn't appear to have a problem executing things in /mnt/sdcard, even though I don't seem to be able to set the execute bit on any file in that fs. There's reference in Google of known glitch in some kernels that cause fs' mounted with the 'default_permissions,allow_other' flags to behave strangely. If they ever fix that, you may need to relocate, that's all.
Note also that the "ACT" column which denotes 'active' tunnels with an '*' only verifies that there is a process running with the designated label name. At this time, actual connectivity is left to you to determine.
it's very helpful, thanks very much!!
but could you compile nls_utf8.ko too? please
You should try and come up with a working recovery!
Sent from my LG-V909 using XDA Premium App
bealesbane said:
Ok, since you were so kind as to compile those extra modules for me, I figure the least I can do is give you something in return. Here's a simple VPN handler to manage multiple tunnels. Filenames for config files are entered relative to the CFGS folder, and module load/remove is manual rather than auto...and I put in connection sharing, as I'm using it this way...but it'll certainly let you use as many tunnels as the kernel will let you work with.
As always, the standard, 'you take your life into your own hands if you use this code, not responsible for problems up to and including user death' disclaimer applies. It seems to be working for me, though I'm only using 2 VPN's ATM.
Good luck! (Will still let you know if I make any progress in Java Dev....
Click to expand...
Click to collapse
Bealsbane way to go man, that is far more code than I could figure out! now i feel like i owe you a beer! haha .. I tried the code but it helps to have a gui currently .. i although do have alot of Java experience and possibly you and I could get a new OpenVPN Settings/Installer for gingerbread/honeycomb based devices!
once again thanks!
aureole999 said:
it's very helpful, thanks very much!!
but could you compile nls_utf8.ko too? please
Click to expand...
Click to collapse
Added to the first Post .. please test it and let me know if it works! good luck!
edit: tested by aureole999 and confirmed working
Excellent work ru1dev. I just added this thread to the G-Slate XDA bit.ly bundle. Would you mind if I posted a link to it over on G-SlateFans?
Bling_Diggity said:
Excellent work ru1dev. I just added this thread to the G-Slate XDA bit.ly bundle. Would you mind if I posted a link to it over on G-SlateFans?
Click to expand...
Click to collapse
Go ahead as long as it is a link back to the OP. Thanks for spreading the knowledge
please dont bash me as i know im a little off topic but hi everyone i have a major issue with my rooted gslate.if anyone can help it would be greatly appreciated. i downloaded cw from the market and when it askes you for compatibility i accedently chose the option (lg optimus 3d) thinking it was for my gslate and now after i turned off the gslate and go to turn it back on its stuck on LG blackscreen and says
[HasValidKernelImage] Magic value mismatch:
[DetectOperatingSystems]kernel image is invalid !!!
Starting Fastboot USB download protocol
Ive looked all over the internet and cant find anything to help me out so please can someone help me.
maybe a way to nvflash the proper kernel back.
tun.ko checksum
Hi guys, can anybody please post the md5sum output of the tun.ko? even though im using the same kernel, i cannot load the module on my g-slate. thanks
jomnoc said:
Hi guys, can anybody please post the md5sum output of the tun.ko? even though im using the same kernel, i cannot load the module on my g-slate. thanks
Click to expand...
Click to collapse
md5 - 3daf2d134dc2ae6c4a40fe3d8ac49344
Thanks! I have 6707fd6a79cc849d13e8dd4016f96028 .... ideas? can you upload your file? Thanks again
jomnoc said:
Thanks! I have 6707fd6a79cc849d13e8dd4016f96028 .... ideas? can you upload your file? Thanks again
Click to expand...
Click to collapse
yes that is the md5 for the tun.ko .. in a rush i gave you the md5 for the zip of the tun.ko previously. are you sure you are running kernel 2.6.36.3+
it has to be exactly that kernel..with the '+' on the end
yes i am. or i was haha.. it was a friend's tablet. but it certainly had that kernel version. thanks for the help. if i get it again i may ask for help

[DEV]Aroma Toolkit[WIP]

As most of you no im currently working on porting firefox os to are phone but i am having a lot of bother when compiling so im going to take a break from it until i get it compiling fully and make an toolkit for are phone this will include:
Recovery's:
Lastest CWM
Latest TWRP
Latest RZ Recovery
Tweaks:
zram tweaks
build.prop tweaks
vm tweaks
cpu tweaks
low ram tweaks
internet tweaks
3G tweaks
sheduler tweaks
I/O tweaks
Launchers:
ADW Launcher
Go Launcher EX with beta version if available
and more free ones
Data partition mods:
CronMod-A2SD
CronMod-D2EXT
CronMod-INT2EXT
CronMod-A2SD+
CronMod-A2SD++
CronMod-D2EXT+
CronMod-INT2EXT+
Mount2SD
data2sd by Jikantaru
Link2SD
Mods:
Zipalign on boot
Force GPU Rendering
db defrag on boot
beats audio with srs and xloud
Apps:
Gapps packages
Superuser + SU binary
SuperSU + SuperSU SU binary
Latest Play Store
Latest Youtube
Google Search since Google renamed it to Google Now with only supports ICS and above
And more that i can think of before release and also what ever the end user wants added the reason im doing this is because i hate when i need to do a factory reset that i need to install loads of zips to get the basic setup right so making this toolkit will help speed things up after a factory reset
Ideas are welcome so please add them below
Add apex launcher, titanium backup and a file manager (Solid explorer or Es file manager)
Great work.
For a file manager, I'd recommend file manager by rhythm. It's not quite root explorer, but it will pick up the .name files on your sd when others won't.
Sent from my HTC_A510c using Tapatalk 2
Add titanium backup, es file explorer, and latest superuser, supersu. If you can, try making a root script which roots the phone
I always wanted something like this. I hope you get it done quick, because it's really handy to have something like this. Good luck.
Sent from my LG-P500 using xda app-developers app
SomeDudeOnTheNet said:
Add titanium backup, es file explorer, and latest superuser, supersu. If you can, try making a root script which roots the phone
I always wanted something like this. I hope you get it done quick, because it's really handy to have something like this. Good luck.
Sent from my LG-P500 using xda app-developers app
Click to expand...
Click to collapse
If I add the superuser/supersu apps and a user installs them that will root it anyway ill just need to add unit.d functionality to the installer .
Btw guys who don't no aroma is a zip archive that runs in recovery to install mods etc so this will need a custom recovery pre-installed.
Sent from my Wildfire S A510e using Tapatalk 2
eoghan2t7 said:
If I add the superuser/supersu apps and a user installs them that will root it anyway ill just need to add unit.d functionality to the installer .
Btw guys who don't no aroma is a zip archive that runs in recovery to install mods etc so this will need a custom recovery pre-installed.
Sent from my Wildfire S A510e using Tapatalk 2
Click to expand...
Click to collapse
Oh and one more thing, init.d should be compatible with stock. I've seen a few ones I tried causing bootloops. So careful about that.
Sent from my LG-P500 using xda app-developers app
SomeDudeOnTheNet said:
Oh and one more thing, init.d should be compatible with stock. I've seen a few ones I tried causing bootloops. So careful about that.
Sent from my LG-P500 using xda app-developers app
Click to expand...
Click to collapse
Don't worry I no what's wrong with the unit.d bootloops
Sent from my Wildfire S A510e using Tapatalk 2
eoghan2t7 said:
Don't worry I no what's wrong with the unit.d bootloops
Sent from my Wildfire S A510e using Tapatalk 2
Click to expand...
Click to collapse
Alright then. Best of luck! Expecting this soon.
Sent from my HTC Wildfire S A510e using xda premium
SomeDudeOnTheNet said:
Alright then. Best of luck! Expecting this soon.
Sent from my HTC Wildfire S A510e using xda premium
Click to expand...
Click to collapse
ill most likely have the first version out during the week once tweak it a bit more
If you want you can check me git about recoveryflasher:
It's just a bash/batch script, for automatical flashes of recoveries, I'm currently working on it:
https://github.com/OliverG96/SuperRecoveryFlasher
Check the marvel branch
OliverG96 said:
If you want you can check me git about recoveryflasher:
It's just a bash/batch script, for automatical flashes of recoveries, I'm currently working on it:
https://github.com/OliverG96/SuperRecoveryFlasher
Check the marvel branch
Click to expand...
Click to collapse
thanks but its ok recovery supports the flash_image command and since aroma is a recovery zip all i need to do is add the commands and bobs your uncle but nice work any way on the installer.
You should add some wfs optimized init.d scripts.
Sent from my HTC Wildfire S A510e using xda app-developers app
baluuu said:
You should add some wfs optimized init.d scripts.
Sent from my HTC Wildfire S A510e using xda app-developers app
Click to expand...
Click to collapse
That's the idea but it wont be in the first version as I need to make custom tweak scripts.
Sent from my Wildfire S A510e using Tapatalk 2
Cool I'm planning to write 1 myself if it ends up somewhat useful I might upload it
Sent from my HTC Wildfire S A510e using xda app-developers app
baluuu said:
Cool I'm planning to write 1 myself if it ends up somewhat useful I might upload it
Sent from my HTC Wildfire S A510e using xda app-developers app
Click to expand...
Click to collapse
Nice one sure once your finished upload it for testing
Sent from my Wildfire S A510e using Tapatalk 2
eoghan2t7 said:
Nice one sure once your finished upload it for testing
Sent from my Wildfire S A510e using Tapatalk 2
Click to expand...
Click to collapse
So here is The init.d script 99WFStweaks
And a shell script to add lines to build prop Build.prop.sh
This is like really half assed work tough I think I got it runing on boot but i havent had the chance to test for performance improvement, also I took the optimizations as is and didnt bother looking for the optimal WFS values so enjoy my ****ty work lol.
I used this thread as a guidline so thank to optik19918
Here is the code.
99WFStweaks
Code:
#!/system/bin/sh
#WFS Tweaks
#Internet speed twaks
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 mamagement tweaks
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;
#Battery Tweaks
echo "500" > /proc/sys/vm/dirty_expire_centisecs;
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs;
#Ext4 tweaks
tune2fs -o journal_data_writeback /dev/block/mtdblock3;
tune2fs -O ^has_journal /dev/block/mtdblock3;
tune2fs -o journal_data_writeback /dev/block/mtdblock4;
tune2fs -O ^has_journal /dev/block/mtdblock4;
tune2fs -o journal_data_writeback /dev/block/mtdblock5;
tune2fs -O ^has_journal /dev/block/mtdblock5;
busybox mount -o remount,noatime,noauto_da_alloc,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;
#Flags blocks as non-rotational and increases cache size
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;
#MicroSD speed fix
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
#DB vacum
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done;
#Removes logger
rm /dev/log/main
Build.prop.sh
Code:
#!/system/bin/sh
#Build.prop tweaks
echo "ro.media.enc.jpeg.quality=100" >> /system/build.prop;
echo "dalvik.vm.heapsize=48m" >> /system/build.prop;
echo "debug.sf.hw=1" >> /system/build.prop;
echo "ro.telephony.call_ring.delay=0" >> /system/build.prop;
echo "windowsmgr.max_events_per_sec=150" >> /system/build.prop;
echo "wifi.supplicant_scan_interval=180" >> /system/build.prop;
echo "pm.sleep_mode=1" >> /system/build.prop;
echo "ro.ril.disable.power.collapse=0" >> /system/build.prop;
echo "debug.performance.tuning=1" >> /system/build.prop;
echo "video.accelerate.hw=1" >> /system/build.prop;
echo "ro.media.dec.jpeg.memcap=12000000" >> /system/build.prop;
echo "ro.media.enc.hprof.vid.bps=12000000" >> /system/build.prop;
echo "ro.ril.hsxpa=2" >> /system/build.prop;
echo "ro.ril.gprsclass=10" >> /system/build.prop;
echo "ro.ril.hep=1" >> /system/build.prop;
echo "ro.ril.enable.dtm=1" >> /system/build.prop;
echo "ro.ril.hsdpa.category=10" >> /system/build.prop;
echo "ro.ril.enable.a53=1" >> /system/build.prop;
echo "ro.ril.enable.3g.prefix=1" >> /system/build.prop;
echo "ro.ril.htcmaskw1.bitmask=4294967295" >> /system/build.prop;
echo "ro.ril.htcmaskw1=14449" >> /system/build.prop;
echo "ro.ril.hsupa.category=5" >> /system/build.prop;
echo "net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
echo "net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
echo "net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
echo "net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
echo "net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
baluuu said:
So here is The init.d script 99WFStweaks
And a shell script to add lines to build prop Build.prop.sh
This is like really half assed work tough I think I got it runing on boot but i havent had the chance to test for performance improvement, also I took the optimizations as is and didnt bother looking for the optimal WFS values so enjoy my ****ty work lol.
I used this thread as a guidline so thank to optik19918
Here is the code.
99WFStweaks
Code:
#!/system/bin/sh
#WFS Tweaks
#Internet speed twaks
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 mamagement tweaks
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;
#Battery Tweaks
echo "500" > /proc/sys/vm/dirty_expire_centisecs;
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs;
#Ext4 tweaks
tune2fs -o journal_data_writeback /dev/block/mtdblock3;
tune2fs -O ^has_journal /dev/block/mtdblock3;
tune2fs -o journal_data_writeback /dev/block/mtdblock4;
tune2fs -O ^has_journal /dev/block/mtdblock4;
tune2fs -o journal_data_writeback /dev/block/mtdblock5;
tune2fs -O ^has_journal /dev/block/mtdblock5;
busybox mount -o remount,noatime,noauto_da_alloc,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;
#Flags blocks as non-rotational and increases cache size
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;
#MicroSD speed fix
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
#DB vacum
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done;
#Removes logger
rm /dev/log/main
Build.prop.sh
Code:
#!/system/bin/sh
#Build.prop tweaks
echo "ro.media.enc.jpeg.quality=100" >> /system/build.prop;
echo "dalvik.vm.heapsize=48m" >> /system/build.prop;
echo "debug.sf.hw=1" >> /system/build.prop;
echo "ro.telephony.call_ring.delay=0" >> /system/build.prop;
echo "windowsmgr.max_events_per_sec=150" >> /system/build.prop;
echo "wifi.supplicant_scan_interval=180" >> /system/build.prop;
echo "pm.sleep_mode=1" >> /system/build.prop;
echo "ro.ril.disable.power.collapse=0" >> /system/build.prop;
echo "debug.performance.tuning=1" >> /system/build.prop;
echo "video.accelerate.hw=1" >> /system/build.prop;
echo "ro.media.dec.jpeg.memcap=12000000" >> /system/build.prop;
echo "ro.media.enc.hprof.vid.bps=12000000" >> /system/build.prop;
echo "ro.ril.hsxpa=2" >> /system/build.prop;
echo "ro.ril.gprsclass=10" >> /system/build.prop;
echo "ro.ril.hep=1" >> /system/build.prop;
echo "ro.ril.enable.dtm=1" >> /system/build.prop;
echo "ro.ril.hsdpa.category=10" >> /system/build.prop;
echo "ro.ril.enable.a53=1" >> /system/build.prop;
echo "ro.ril.enable.3g.prefix=1" >> /system/build.prop;
echo "ro.ril.htcmaskw1.bitmask=4294967295" >> /system/build.prop;
echo "ro.ril.htcmaskw1=14449" >> /system/build.prop;
echo "ro.ril.hsupa.category=5" >> /system/build.prop;
echo "net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
echo "net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
echo "net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
echo "net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
echo "net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960" >> /system/build.prop;
Click to expand...
Click to collapse
looks good but these lines might not give that much of a boost as we dont have a ext4 file system
Code:
#Ext4 tweaks
tune2fs -o journal_data_writeback /dev/block/mtdblock3;
tune2fs -O ^has_journal /dev/block/mtdblock3;
tune2fs -o journal_data_writeback /dev/block/mtdblock4;
tune2fs -O ^has_journal /dev/block/mtdblock4;
tune2fs -o journal_data_writeback /dev/block/mtdblock5;
tune2fs -O ^has_journal /dev/block/mtdblock5;
busybox mount -o remount,noatime,noauto_da_alloc,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;
it would possible work better if you added this in
Code:
#Ext4 tweaks
tune2fs -o journal_data_writeback /dev/block/mtdblock3;
tune2fs -O ^has_journal /dev/block/mtdblock3;
tune2fs -o journal_data_writeback /dev/block/mtdblock4;
tune2fs -O ^has_journal /dev/block/mtdblock4;
tune2fs -o journal_data_writeback /dev/block/mtdblock5;
tune2fs -O ^has_journal /dev/block/mtdblock5;
busybox mount -o remount,noatime,noauto_da_alloc,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;
#EXT Partition
tune2fs -o journal_data_writeback /dev/block/mmcblk0p2;
tune2fs -O ^has_journal /dev/block/mmcblk0p2;
#If using Link2sd or another data2sd script that symlinks /data to /sd-ext
busybox mount -o remount,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh /sd-ext;
Lol dunno why i even added that haha. Didnt bother reading. Yes you are right i ll replace these lines
Edit: Omg the difference. Sd write went from 10 to 30 i ll further test to see if it wasnt just some kind of bug.
Edit2: No mistake thats what antutu says 29mb/s write altho its probably something causing the program to make mistakes atleast i know the lines are doing something
baluuu said:
Lol dunno why i even added that haha. Didnt bother reading. Yes you are right i ll replace these lines
Edit: Omg the difference. Sd write went from 10 to 30 i ll further test to see if it wasnt just some kind of bug.
Edit2: No mistake thats what antutu says 29mb/s write altho its probably something causing the program to make mistakes atleast i know the lines are doing something
Click to expand...
Click to collapse
ill test it on rom toolbox it has a sd benchtest on it now
edit:
also add this in instead of this
Code:
#Flags blocks as non-rotational and increases cache size
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;
add in:
Code:
#Flags blocks as non-rotational and increases cache size
LOOP=`ls -d /sys/block/loop*`;
RAM=`ls -d /sys/block/ram*`;
MMC=`ls -d /sys/block/mmc*`;
ZRAM=`ls -d /sys/block/zram*`;
for j in $LOOP $RAM $MMC $ZRAM
do
echo "0" > $j/queue/rotational;
echo "2048" > $j/queue/read_ahead_kb;
done;
That is for cm7 only right? I don't recall sense using zram or am I wrong.
Sent from my HTC Wildfire S A510e using xda app-developers app

Moved

http://forum.xda-developers.com/showthread.php?t=2390162
Thx mate, was looking for this. Just wondering if there's a script for deodexing stock rooted roms?
jaidev.s said:
Thx mate, was looking for this. Just wondering if there's a script for deodexing stock rooted roms?
Click to expand...
Click to collapse
why not give dsixda kitchen a try:fingers-crossed:
Outstanding! The idea odexing user apps is really awesome. I applied -fr and -dat (not -all why is because of Nottach Xposed and Wanam Xposed) on my SGS4(Sammy 4.2.2, deodexed) and it works flawless
I think -ncpa and -ncsa(opposite of cpa and csa) will be useful for people who want to exclude odexing a few of them. Is this a good idea?
marbulas said:
Outstanding! The idea odexing user apps is really awesome. I applied -fr and -dat (not -all why is because of Nottach Xposed and Wanam Xposed) on my SGS4(Sammy 4.2.2, deodexed) and it works flawless
I think -ncpa and -ncsa(opposite of cpa and csa) will be useful for people who want to exclude odexing a few of them. Is this a good idea?
Click to expand...
Click to collapse
In the next release i add this feature Good Idea Sir
I've a question.
When I tried to update any apps already installed with installing from package installer directly(like through file manager and not via Play Store), system says the space to install this app is not enough.
It's a problem about odexs in /data/app.
My tiny knowledge about to solve this problem is to remove all of them and reinstall them which makes trouble.
Is there a solution to solve this problem without reflashing rom and doing factory reset?
marbulas said:
I've a question.
When I tried to update any apps already installed with installing from package installer directly(like through file manager and not via Play Store), system says the space to install this app is not enough.
It's a problem about odexs in /data/app.
My tiny knowledge about to solve this problem is to remove all of them and reinstall them which makes trouble.
Is there a solution to solve this problem without reflashing rom and doing factory reset?
Click to expand...
Click to collapse
Open terminal emulator and type this:
bb="busybox";
$bb clear;
root=`$bb id -u`;
if $bb [[ "$root" == "0" ]];
then
cd /data/app;
for app in *.odex;
do
apk=`echo $app | $bb sed -e 's:.odex:.apk:g'`;
if $bb [ ! -f $apk ];
then
echo "Removing $app...";
$bb rm -f $app;
fi;
done;
else
echo "Root Permission Not Acquired!";
echo "Type 'su' and try again";
exit;
fi;
MatrixDJ96 said:
Open terminal emulator and type this:
bb="busybox";
$bb clear;
root=`$bb id -u`;
if $bb [[ "$root" == "0" ]];
then
cd /data/app;
for app in *.odex;
do
apk=`echo $app | $bb sed -e 's:.odex:.apk:g'`;
if $bb [ ! -f $apk ];
then
echo "Removing $app...";
$bb rm -f $app;
fi;
done;
else
echo "Root Permission Not Acquired!";
echo "Type 'su' and try again";
exit;
fi;
Click to expand...
Click to collapse
I rewrote the code you gave me to use as an init.d script...
for i in /data/app/*.odex
do
apk=`echo $i | busybox sed -e 's:.odex:.apk:g'`
if [ ! -f $apk ];
then
rm -f $i
fi;
done
Is this correct? Is there anything I can reduce more or wrong something?
Sorry for my ignorance ;D
Edit : Just an wrong word
marbulas said:
I rewrote the code you gave me to use as an init.d script...
for i in /data/app/*.odex
do
apk=`echo $i | busybox sed -e 's:.odex:.apk:g'`
if [ ! -f $apk ];
then
rm -f $i
fi;
done
Is this correct? Is there anything I can reduce more or wrong something?
Sorry for my ignorance ;D
Edit : Just an wrong word
Click to expand...
Click to collapse
Error...
Write This:
#!/system/bin/sh
cd /data/app
for o in *.odex
do
a=`echo $o | busybox sed -e 's:.odex:.apk:g'`
if [ ! -f $a ];
then
busybox rm -f $o
fi;
done
Remember: Set perm 777 and own 0:0
By MatrixDJ96 For You
This script works on rooted Stock i9500 ROM?
leokak said:
This script works on rooted Stock i9500 ROM?
Click to expand...
Click to collapse
Sure
Sent from my GT-S5570 using xda app-developers app
MatrixDJ96 said:
Sure
Sent from my GT-S5570 using xda app-developers app
Click to expand...
Click to collapse
I've tried and get this... What can i do?
Sent from my GT-I9500 using xda app-developers app
leokak said:
I've tried and get this... What can i do?
Sent from my GT-I9500 using xda app-developers app
Click to expand...
Click to collapse
Install Busybox by Stericson (In Play Store)
Try Again
Sent from my GT-S5570 using xda app-developers app
MatrixDJ96 said:
Install Busybox by Stecson (In Play Store)
Try Again
Sent from my GT-S5570 using xda app-developers app
Click to expand...
Click to collapse
Worked!! Thank you!! xD
New Update!
Changelog:
Universal Odex Version 6.3
- A Lot Of Bugs Fixed
http://forum.xda-developers.com/showthread.php?t=2527268
Go here to follow my new script
When i type dexo -h it says not found..
Sent from my GT-I9500 using XDA Premium 4 mobile app
wan_6142 said:
When i type dexo -h it says not found..
Sent from my GT-I9500 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Have you installed Odexer Tool or Universal Odex Script?

[mod][tweaks]*liquid speed*[ics,jb]][28/09/2013]][prop]

Code:
* Your warranty is now void..
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, you getting dumped or you getting fired because your phone
* bootloops and alarm does not go off. Please do some research if you have any
* YOU are choosing to make these modifications.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Requirements :-
- Android 4.0+
- Custom kernel (with init.d support)
- Root and Busybox installed
- 3MB of free space in "/system".
Feature :-
- Full memory management.
- kernel tweaks and improvements for better performance and battery life.
- Entropy generator engine used to reduce lags.
- Zipalign apps in "/system" and apps in "/data" every 48 hours which result in less RAM usage.
- Sqlite optimizations and faster database access.
- CPU governors tweaks and improvements for better performance and battery life.
- Increased SD Card read-ahead cache to 2048 KB .
- Ad blocking.
- Default.prop tweaks and improvements.
- Cleans log files and tombstones at every boot.
- Many other tweaks for better performance and battery life!
Steps :-
- go to system/etc/init.d/delete all files in it
- Download the zip
- Flash zip via recovery
- Feel the difference (1st boot may take time)
User praise :-
Code:
$lim $hady :- Awesome....!!!!!!!!!
One word Awesome....!!!!
Playing Subway Surfers without a Single Lag... Feels like my phone is running on GB..
Code:
skaloyskie :- Thanks man! I've noticed that my phone suffered less lag even I'm using Opera mini (Multi-tabbed browsing) and downloading movies via torrent. Nice share!
Code:
iossux :- U rock bro really boosted my performance
Some part of my Default .prop
#enable harware egl profile
debug.egl.profiler=1
#16BIT transparency , Smother Scrolling
persist.sys.use_16bpp_alpha=1
#debug.composition.type=gpu
debug.composition.type=c2d
debug.performance.tuning=1
debug.enabletr=true
debug.qctwa.preservebuf=1
dev.pm.dyn_samplingrate=1
video.accelerate.hw=1
ro.vold.umsdirtyratio=20
debug.overlayui.enable=1
debug.egl.hw=1
ro.fb.mode=1
hw3d.force=1
persist.sys.composition.type=c2d
persist.sys.ui.hw=1
ro.sf.compbypass.enable=0
#Enable tile rendering
debug.enabletr=true
persist.sys.composition.type=gpu
#3d performance
persist.android.strictmode=0
ro.min_pointer_dur=1
ro.secure=0
#Media quality
ro.media.enc.jpeg.quality=100
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
ro.media.dec.aud.wma.enabled=1
ro.media.dec.vid.wmv.enabled=1
ro.media.cam.preview.fps=0
ro.media.codec_priority_for_thumb=so
#Speed liquid
persist.service.lgospd.enable=0
persist.service.pcsync.enable=0
# For sensor sleep control
ro.ril.sensor.sleep.control=1
#loggers
ro.config.htc.nocheckin=1
ro.config.nocheckin=1
profiler.force_disable_ulog=1
profiler.force_disable_err_rpt=1
#Scrolling
windowsmgr.max_events_per_sec=90
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
#battery saver
ro.ril.disable.power.collapse=1
pm.sleep_mode=1
usb_wakeup=enable
proximity_incall=enable
power_supply.wakeup=enable
ro.config.hw_power_saving=1
ro.config.hw_fast_dormancy=1
ro.config.hw_quickpoweron=true
persist.sys.use_dithering=0
#improve battery under no signal -- need test
ro.mot.eri.losalert.delay=1000
#net speedtweaks
net.tcp.buffersize.default=4096,87380,256960,4096, 16384,256960
net.tcp.buffersize.wifi=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.umts=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.gprs=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.edge=4096,87380,256960,4096,163 84,256960
net.tcp.buffersize.hspda=4096,87380,256960,4096,16 384,256960
net.tcp.buffersize.hspa=4096,87380,256960,4096,163 84,256960
#streaming faster
media.stagefright.enable-player=true
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
media.stagefright.enable-aac=true
media.stagefright.enable-qcp=true
media.stagefright.enable-record=true
Some part of INIT.D :-
# Disable Logger
busybox rm /dev/log/main
# Busybox Remounting
busybox mount -o remount,noatime,barrier=0,nobh /system
busybox mount -o remount,noatime,barrier=0,nobh /data
busybox mount -o remount,noatime,barrier=0,nobh /cache
echo "Mounted Busybox"
# clearing junk files
busybox find /data/data -type d -iname "*cache*" -exec busybox rm -f {}/* ';' -exec echo "Cleared {}" ';'
rm -f /data/local/*.apk
rm -f /data/local/tmp/*.apk
rm -f /data/*.log
rm -f /data/log/*.log
rm -f /cache/*.*
rm -f /cache/recovery/*.*
rm -f /data/system/dropbox/*.txt
rm -f /data/backup/pending/*.tmp
rm -f /data/tombstones/*.*
echo "Junk cleared"
# Defrag Database Files
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
# Move Dalvik-Cache To Cache Partition
CACHESIZE=$(df -k /cache | tail -n1 | tr -s ' ' | cut -d ' ' -f2)
if [ $CACHESIZE -gt 4000 ]
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
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
echo "Moved Dalvik-Cache To Cache Partition"
# Mod: Battery
setprop wifi.supplicant_scan_interval=180
setprop pm.sleep_mode=1
setprop ro.ril.disable.power.collapse=1
# Mod: Performance
setprop ro.kernel.android.checkjni=0
setprop persist.sys.purgeable_assets=1
setprop debug.sf.hw=1
setprop ro.telephony.call_ring.delay=0
setprop ro.foreground_app_mem=1280
setprop ro.visible_app_mem=2560
setprop ro.perceptible_app_mem=3840
setprop ro.heavy_weight_app_mem=6400
setprop ro.secondary_server_mem=7680
setprop ro.backup_app_mem=8960
setprop ro.home_app_mem=2048
setprop ro.hidden_app_mem=12800
setprop ro.content_provider_mem=15360
setprop ro.empty_app_mem=20480
setprop ro.foreground_app_adj=0
setprop ro.visible_app_adj=1
setprop ro.perceptible_app_adj=2
setprop ro.heavy_weight_app_adj=4
setprop ro.secondary_server_adj=5
setprop ro.backup_app_adj=6
setprop ro.home_app_adj=1
setprop ro.hidden_app_min_adj=7
setprop ro.empty_app_adj=15
# Mod: Graphics
setprop debug.performance.tuning=1
setprop video.accelerate.hw=1
setprop ro.media.dec.jpeg.memcap=8000000
setprop ro.media.enc.hprof.vid.bps=8000000
setprop persist.sys.use_dithering 1
# Touch Screen Sensitivity
echo 7035 > /sys/class/touch/switch/set_touchscreen;
echo 8002 > /sys/class/touch/switch/set_touchscreen;
echo 11000 > /sys/class/touch/switch/set_touchscreen;
echo 13060 > /sys/class/touch/switch/set_touchscreen;
echo 14005 > /sys/class/touch/switch/set_touchscreen;
# Renice Apps
renice -20 `pidof com.android.phone`
renice -19 `pidof com.android.inputmethod.latin`
renice -19 `pidof com.swype.android.inputmethod`
renice -17 `pidof com.android.systemui`
renice -9 `pidof com.android.settings`
renice -9 `pidof com.android.vending`
renice -6 `pidof com.sec.android.app.camera`
renice -6 `pidof com.sec.android.app.fm`
renice -6 `pidof com.google.android.apps.maps`
renice -4 `pidof com.google.android.apps.googlevoice`
renice -3 `pidof android.process.media`
# SqLite Optimize
for i in \
`busybox find /data -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
if [ -d "/dbdata" ]; then
for i in \
`busybox find /dbdata -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
fi;
if [ -d "/datadata" ]; then
for i in \
`busybox find /datadata -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
fi;
for i in \
`busybox find /sdcard -iname "*.db"`;
do \
/system/xbin/sqlite3 $i 'VACUUM;';
/system/xbin/sqlite3 $i 'REINDEX;';
done;
echo "SqLite Database Optimized"
echo "System Optimized And Boosted at $( date +"%m-%d-%Y %H:%M:%S" )"
function mountrw {
mount|grep "/system "|grep rw >/dev/null
[ $? -eq 1 ] && mount -o remount,rw $(mount|grep "/system "|awk '{ print $1 }') /system
}
function mountro {
mount|grep "/system "|grep ro >/dev/null
[ $? -eq 1 ] && mount -o remount,ro $(mount|grep "/system "|awk '{ print $1 }') /system
}
echo " Starting package optimization"
echo "Starting ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )"
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
mountrw;
echo ZipAligning $(basename $apk)
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed DC;
fi;
else
echo Velocity ZipAlign already completed on $apk
fi;
done;
for apk in /data/app/*.apk ; do
zipalign -c 4 $apk;
ZIPCHECK=$?;
if [ $ZIPCHECK -eq 1 ]; then
echo ZipAligning $(basename $apk)
zipalign -f 4 $apk /cache/$(basename $apk);
if [ -e /cache/$(basename $apk) ]; then
cp -f -p /cache/$(basename $apk) $apk
rm /cache/$(basename $apk);
else
echo ZipAligning $(basename $apk) Failed DC
fi;
else
echo Velocity ZipAlign already completed on $apk
fi;
done;
mountro;
echo "ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )"
Tested on Xperia S thnxx to EXBLAZE ​
credits
persanno
exblaze
kuro
Works with trinity kernel and ROM,now testing
Sent from my LT26ii using XDA Premium 4 mobile app
red-Tequila said:
Works with trinity kernel and ROM,now testing
Sent from my LT26ii using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Trinity ROM and kernel already has many tweaks applied in it.. You don't need to try any.. If u have a Stock ROM without any mods, but with some custom kernel, then try this..
sudhindrakv said:
Trinity ROM and kernel already has many tweaks applied in it.. You don't need to try any.. If u have a Stock ROM without any mods, but with some custom kernel, they try this..
Click to expand...
Click to collapse
Trinity Rom has tweaks but they are not enabled by default as in init.d does not run at boot... It never did in his previous roms either, and I don't think he is to bothered to fix it!
Sent from my LT26i using xda premium
Damoedge said:
Trinity Rom has tweaks but they are not enabled by default as in init.d does not run at boot... It never did in his previous roms either, and I don't think he is to bothered to fix it!
Sent from my LT26i using xda premium
Click to expand...
Click to collapse
Yes. Its your choice in Aroma to select which kind of tweaks you need.. Anyway try this.. Do have a backup.. Lets not spam this thread.. There's another thread to discuss about Trinity ROM..
Damoedge said:
Trinity Rom has tweaks but they are not enabled by default as in init.d does not run at boot... It never did in his previous roms either, and I don't think he is to bothered to fix it!
Sent from my LT26i using xda premium
Click to expand...
Click to collapse
Hi, Just like.I.said, Ive added Init.d enabler on. 3.6 via.Settings.apk
Even you install this tweak it will never work, unless you enabled some required perm. For the init.d files
Sent from my LT26ii using xda app-developers app
TrinityHaxxorX said:
Hi, Just like.I.said, Ive added Init.d enabler on. 3.6 via.Settings.apk
Even you install this tweak it will never work, unless you enabled some required perm. For the init.d files
Sent from my LT26ii using xda app-developers app
Click to expand...
Click to collapse
You are referring on your ROM or you genaralise?
If you are using stock ROM, rooted and deodexed I don't see why it shouldn't work (at least some part of it)
Sent from my LT26i using Tapatalk 4
TrinityHaxxorX said:
Even you install this tweak it will never work, unless you enabled some required perm. For the init.d files
Sent from my LT26ii using xda app-developers app
Click to expand...
Click to collapse
So you are saying that this will not work??
Sent from my LT26i using xda premium
Man I doubt about it cause I installed and notice more fluidity,however about bb..
Sent from my LT26ii using XDA Premium 4 mobile app
I still haven't tried but guys, when you try it, test firmly.
Every device will fly after restart - when you restart it - your RAM gets cleared and device will work softer and faster.
Try to see what's happening after one or two hours - don't fall on placebo effect afrer restart.
And please, don't get me wrong, I'm not saying it doesn't work, I haven't tried it yet.
I'm just saying how to test
Sent from my LT26i using Tapatalk 4
Tested. Well done. I report two bugs, some apps does not start automatically after a reboot,like Antitirus,etc. and photos won't open from Album Widget, only from the album itself.Anyway, good job, waiting for a stable version,until then, I'm back to my backup.
sure
Mr.AnakinSkywalker said:
Tested. Well done. I report two bugs, some apps does not start automatically after a reboot,like Antitirus,etc. and photos won't open from Album Widget, only from the album itself.Anyway, good job, waiting for a stable version,until then, I'm back to my backup.
Click to expand...
Click to collapse
as i dont own this device i cannot test it many times on friends mobile
need some tester/devs from this thread
BOSS said:
as i dont own this device i cannot test it many times on friends mobile
need some tester/devs from this thread
Click to expand...
Click to collapse
I understand, at least for now we know two bugs on SONY XPERIA S
Does it work on CM ? haahah newbie question but does it?
uDroid said:
Does it work on CM ? haahah newbie question but does it?
Click to expand...
Click to collapse
I dont think so
Pls read the op
Sent from my LT26i using Tapatalk 4
Rangeeshnathan said:
I dont think so
Pls read the op
Sent from my LT26i using Tapatalk 4
Click to expand...
Click to collapse
im sorry but i tested it and it works i guess.
i feel the difference.
whaiting for XPERIA Z version

Categories

Resources