We've done this script to make work light leds on physical keyboard, when keyboard is out, and off when is in, on X10 mini pro.
Code:
#!/system/bin/sh
do
/system/bin/logcat | grep 'keys=2/1/1' > /sdcard/true.txt
sleep 1
kill -9 $!
if [ -s /sdcard/true.txt ]; then
echo 1 > /sys/devices/platform/msm_pmic_misc_led.0/brightness
sleep 9
else
echo 0 > /sys/devices/platform/msm_pmic_misc_led.0/brightness
sleep 9
fi
while true;
problem is that it says that it can create /sdcard/true.txt, so, someone maybe can help me?
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.
First I want to apologize for my strange English (Google translator)
Returning to Questions, I would like to Know how to Remove the vibration when the screen Unlock
I also like to know how to do DroidxGovernos work on my machine because the installation is completed via CMW put the Set CPU does not recognize them, any thoughts?
Brazil to Use Retail 2.3.6 Root, Boot menu, and CMW working
Thanks
Not sure on the lockscreen vibration.
DX govs work by adding in the modules into /system/lib/modules/ and loading them with an init script. So far, they've worked on Bravo, Defy, and Defy+. Did you enable overclocking in the bootmenu? Its necessary. Some users even have to enable "Load All Modules". I've never had to, but some have. I can tell you the Boostedass works wonders on ICS with battery time. Added 16 hours of battery life on Quarx 2012\05\12. Miui runs for 2 days with about 4-5 hours of mp3 playing a day, 1 hour of wifi browsing, and being a bit anal with disabling what I'm not using with the power widget (3g, wifi, gps, etc...)
There is that chance that they just don't work. InteractiveX, from the same rom I found these governors in, won't work at all on my Bravo. I know that on CM7\MIUI\CM9 on the Bravo all that I have to do is flash the zip and enable them in No Frills and they just work.
Boosted, as well as SIO, are now built into the latest bootmenus for the Defy and Bravo now because of how well they work.
The full init script I'm using, and included with DX Gov 2.2.
Code:
#!/system/bin/sh
#Load Modules for IO Scheduler and Governors
insmod /system/lib/modules/cpufreq_smartassv2.ko
insmod /system/lib/modules/cpufreq_BOOSTEDassV2.ko
insmod /system/lib/modules/sio-iosched.ko
#Set IO Scheduler, use "sio" "noop" or "cfs" (sio and noop recommended)
for i in /sys/block/mmc*/queue; do
echo "sio" > $i/scheduler
done
#Tweak IO Parameters
for i in /sys/block/*/queue; do
[ -f "$i/rotational" ] && [ "`cat $i/rotational`" -ne "0" ] && echo "0" > $i/rotational
[ -f "$i/read_ahead_kb" ] && echo "2048" > $i/read_ahead_kb
[ -f "$i/iosched/async_read_expire" ] && echo "4000" > $i/iosched/async_read_expire
[ -f "$i/iosched/async_write_expire" ] && echo "16000" > $i/iosched/async_write_expire
[ -f "$i/iosched/fifo_batch" ] && echo "1" > $i/iosched/fifo_batch;
[ -f "$i/iosched/sync_read_expire" ] && echo "500" > $i/iosched/sync_read_expire
[ -f "$i/iosched/sync_write_expire" ] && echo "2000" > $i/iosched/sync_write_expire
[ -f "$i/iosched/writes_starved" ] && echo "0" > $i/iosched/writes_starved
[ -f "$i/nr_requests" ] && echo "2048" > $i/nr_requests
[ -f "$i/iostats" ] && [ "`cat $i/iostats`" -ne "0" ] && echo "0" > $i/iostats
done
#Set SD Card read ahead cache
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb
You can remove the smartassv2 insmod line (script above, 5th line) to save a tiny bit of ram; and the last line is the SD Speed Tweak (also script above, last 2 lines). It can be removed if you use other values or another mod with them included. I only included it so all the read ahead values were the same.
You can also use the following script to load and configure Boosted or SmartassV2. It doesn't work on the Bravo. Some reason echoing boostedass causes my phone to freeze on boot. Perhaps you'll have better luck than me.
Code:
#!/system/bin/sh
#Use either BOOSTEDassV2 or smartassV2. Comment out (# at beginning) all lines if using stock governors.
echo "BOOSTEDassV2" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
#Only use one or the other, and only if you plan on using BOOSTEDassV2 or smartassv2
#Tweak BOOSTEDassV2
echo "600000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/awake_ideal_freq
echo "300000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/sleep_ideal_freq
echo "600000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/sleep_wakeup_freq
echo "70" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/max_cpu_load
echo "40" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/min_cpu_load
echo "300000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/ramp_up_step
echo "300000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/ramp_down_step
echo "49000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/up_rate_us
echo "97000" > /sys/devices/system/cpu/cpufreq/BOOSTEDass/down_rate_us
#Tweak smartassV2
#echo "600000" > /sys/devices/system/cpu/cpufreq/smartass/awake_ideal_freq
#echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_ideal_freq
#echo "600000" > /sys/devices/system/cpu/cpufreq/smartass/sleep_wakeup_freq
#echo "85" > /sys/devices/system/cpu/cpufreq/smartass/max_cpu_load
#echo "45" > /sys/devices/system/cpu/cpufreq/smartass/min_cpu_load
#echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_up_step
#echo "300000" > /sys/devices/system/cpu/cpufreq/smartass/ramp_down_step
#echo "50000" > /sys/devices/system/cpu/cpufreq/smartass/up_rate_us
#echo "65000" > /sys/devices/system/cpu/cpufreq/smartass/down_rate_us
I have rooted my SM-G935F on stock rom and have been wondering if it's possible to change SE to permissive without installing a different kernel?
I found this post which suggested the following in TE:
su
mount -o remount,rw /system
mkdir /system/su.d
echo "#!/system/bin/sh" > /system/su.d/permissive.sh
echo "setenforce 0" > /system/su.d/permissive.sh
echo "0" > /sys/fs/selinux/enforce
chmod 755 /system/su.d/permissive.sh
Someone tried it and said their phone became a bit slow afterwards.
Are there any other solutions or workarounds please?
If flashing a modified kernel is the only option, can anyone recommend one please and would it result in losing any data?
Thanks
just do it ok
I've been using this kernel with latest Samsung stock firmware:
https://forum.xda-developers.com/s7-edge/development/kernel-tgpkernel-t3501571
Anyway, you should always backup your data before flashing you can use Smart Switch for that one click backup.
Kernel is very stable, been running it for some time. With that kernel you can switch the enforcing / permissive thing. And as always keep OEM unlocking on enable and verify it is before flashing. Never disable developer options or OEM unlocking when you have a custom kernel / recovery installed.