JB 4.3 for Xperia T is smoother and more performant than 4.1.2 but some system tweaks can still bring a more enhanced experience.
I present you XperiaTweaks v3.1
Features:
1- build.prop add-ons:
- dalvik tweaks
- dns tweaks
- 100% jpeg quality
- nfc off by default, statubar icon enabled when on
- dexopt-flags modified for compliancy with Z2 SystemUI & Home port
- other performance tweaks
2- Scripts :
- cleaner
- power management tweaks
- interactive governor with tweaked parameters
- deadline I/O scheduler
- low memory killer (lmk - minfree) improved for better multitasking
- sysctl tweaks
- remount optimized
- read_ahead optimized
- swap in cache partition (200 Mb, swapiness 60)
- darky zipalign
- databases optimized by sqlite3
Requirements:
- rooted
- Stock rom 4.3 /.205 (T/TX) or .210 (V) or custom rom based on stock 4.3 (for instance Ultimate PureXT or Rockers X)
- Busybox
- Smanager
Installation for stock rom 4.3 /.205&.210:
1- CWM Backup first
2- Flash XperiaTweaks_T.zip or XperiaTweaks_TX.zip or XperiaTweaks_V.zip via CWM depending on your device
3- Open SManager and select the scripts 1, 2, 3, 4, 5, 6 (& 7) in /system/etc/XperiaTweaks. Set them as "su" and "boot" and don't forget to save the configurations. For script 7 (sqlite), it's better to schedule it to run once a week rather than at each boot.
4- Reboot and enjoy
Update from v3.0: Skip step 3. SManager is operational again, you can update it via playstore.
Installation for custom rom based on stock 4.3:
1- CWM Backup first
2- Flash XperiaTweaks_Universal.zip via CWM
3- Open SManager and select the scripts 1, 2, 3, 4, 5, 6 (& 7) in /system/etc/XperiaTweaks. Set them as "su" and "boot" and don't forget to save the configurations. For script 7 (sqlite), it's better to schedule it to run once a week rather than at each boot.
4- Edit your build.prop:
Look for the lines:
Code:
ro.nfc.on.default=true
ro.nfc.icon.enable=false
and change them in this way:
Code:
ro.nfc.on.default=false
ro.nfc.icon.enable=true
Look for the line:
Code:
dalvik.vm.dexopt-flags=m=y
and change it in this way:
Code:
dalvik.vm.dexopt-flags=v=n,o=v,m=y
Look for the line:
Code:
af.resampler.quality=255
and change it in this way:
Code:
af.resampler.quality=4
And add the following lines at the end of the file:
Code:
########## XperiaTweaks v3.1 #########
ro.media.enc.jpeg.quality=100
ro.kernel.android.checkjni=0
ro.kernel.checkjni=0
ro.vold.umsdirtyratio=20
ro.fb.mode=1
ro.min.fling_velocity=8000
ro.max.fling_velocity=12000
ro.min_pointer_dur=8
net.dns1=8.8.8.8
net.dns2=8.8.4.4
debug.performance.tuning=1
debug.enabletr=true
debug.overlayui.enable=1
dalvik.vm.execution-mode=int:jit
dalvik.vm.checkjni=false
dalvik.vm.verify-bytecode=false
dalvik.vm.jmiopts=forcecopy
dalvik.vm.dexopt-data-only=1
dev.pm.dyn_samplingrate=1
persist.android.strictmode=0
persist.service.lgospd.enable=0
persist.service.pcsync.enable=0
hw3d.force=1
video.accelerate.hw=1
windowsmgr.max_events_per_sec=300
Save your build.prop and apply the correct permissions (rw-r--r--)
5- Reboot and enjoy
Advices :
- Do not install this mod if you have just installed 4.3. Use the rom without tweaks during few days to evaluate its potential, its performances and to detect its weaknesses,
- To my experience, launching scripts with SManager is much more reliable and versatile than with init.d,
- Don't judge this mod regarding the Antutu benchmark (that being said, you may get a score around 17300, which is good)
- Use your device with this mod during 1 or 2 weeks before to draw any conclusions.
Future updates of the mod : I no longer own the T (I'm now powered by Z2) but I'll keep this mod updated. Suggestions are welcome...
Updates :
- 21/05: v3.1: read_ahead increased to 2048 kb for better performances - audio resampler quality improved
- 27/04: Updated instruction about Smanager: the new version from the playstore does not work properly, install the attached version and do not update it!
- 15/04: Universal mod fixed
- 12/04: v3.0: mod updated for stock 4.3 / .205 (T/TX) and .210 (V) - One build.prop tweak added
- 01/04: v2.2: some build.prop tweaks added - Universal support for custom roms based on stock
- 20/03: v2.1: nfc off by default, nfc statubar icon enabled when on; dexopt-flags modified for compliancy with Z2 SystemUI & Home port
- 15/03: v2.0: mod updated for stock 4.3 / .199
- 04/03: v1.3: remount of /cache and /data partitions optimized
- 22/02: v1.2: some unnecessary lines removed from the scripts, some bugs fixed.
- 19/02: Xperia TX&V now supported
- 18/02: v1.1: missing zipalign added
Credits :
- Thanks to @peetr_ , I've used some parts of the scripts of his hybrid rom
- Thanks to @slaid480 for his sqlite3 and libncurse.so
- Thanks to @delta-roh for his script turbo boost triple swap that I have modified to perform well on Xperia T
Additional instructions
Additional instructions
1) About scheduling in SManager:
If you want to schedule some scripts, for instance scripts 6 & 7 once a week, open SManager and select the scripts (6 & 7) in /system/etc/XperiaTweaks. Set them as "su" (not "boot", you can check "Ntfy") and don't forget to save the configurations.
Then, hit the menu button in the bottom right corner and select "Scheduler". Schedule your scripts and save.
2) About swap in cache partition:
To verify that swap is enabled, open a terminal and type free. You will see the available size for the swap and the part currently used (which should not be higher than 150-160Mb).
To disable the swap, deactivate the script 5swap_cache_v300 in SManager and reboot. Then, in rootexplorer, erase the directory /cache/swap.
3) Definitely get rid of home redraws
Despite all the tweaks, home redraws can persist... Nevermind, a great app will help us!!
First, install the latest version of Xposed Framework for Xperia.
Then install App Settings v1.7.1.
Launch Xposed Installer and in the tab called "modules" tick the App settings and reboot.
Then, open App Settings and search the Home Laucher. Select it, swipe the button to turn it on and enable the "resident" option. Save changes and close the app. It will restart the launcher and after that home will be definitely locked in memory = no more redraws!!
After having done several tests on my device, I find that this method is safe and reliable (I've also added Walkman as resident, it prevent it to be killed during web browsing).
For Xperia Z1?
Enviado desde mi C6906 mediante Tapatalk
danytrial said:
For Xperia Z1?
Enviado desde mi C6906 mediante Tapatalk
Click to expand...
Click to collapse
No, don't flash it on Z1!!!
However, some script may work, you can test them one by one.
Update 19/02
Update 19/02 : now support for V, check the attachement
how it work
i flashed your tweak, install busybox, smanager. Then i find the Xperia tweak in system/etc/XperiaTweak, but i dont know how to set it "Su" and "boot" like you said. Can you tell me, please thanks a lot
zorrohk said:
i flashed your tweak, install busybox, smanager. Then i find the Xperia tweak in system/etc/XperiaTweak, but i dont know how to set it "Su" and "boot" like you said. Can you tell me, please thanks a lot
Click to expand...
Click to collapse
Look here in "Instructions", you will see how to use SManager.
thanks forr your help
i got a mail, thank you
2nd update 19/02
2nd update 19/02 : now support for TX, check the attachement
Flashed in my xv. Lets c what changes i can like
Sent from my LT25i using XDA Premium 4 mobile app
I've rooted my phone and installed busybox ,then I flashed your XperiaTweaks for Xperia T , but I cannot find XperiaTweaks folder in System/etc using SManager :crying:
why ?
I'm using official JB 4.3 CE_unbranded
elpryn said:
I've rooted my phone and installed busybox ,then I flashed your XperiaTweaks for Xperia T , but I cannot find XperiaTweaks folder in System/etc using SManager :crying:
why ?
I'm using official JB 4.3 CE_unbranded
Click to expand...
Click to collapse
In SMananger, hit the arrow up button several time to be sure to be at the root of the internal memory. Then navigate to /system/etc. You should find it.
If not, copy the files manually.
Update 22/02: v1.2
Update v1.2: some unnecessary lines removed in the scripts, some bugs fixed.
If an old versions is already installed, skip step 3 of installation instructions, just flash the zip.
So smooth
I really like your works
Can I add these to my ROM? :fingers-crossed::fingers-crossed::fingers-crossed:
Thanks you so much :laugh:
y9420045825 said:
I really like your works
Can I add these to my ROM? :fingers-crossed::fingers-crossed::fingers-crossed:
Thanks you so much :laugh:
Click to expand...
Click to collapse
Of course, just give credits
What do you think about an init.d version of these tweaks? Personally I don't want to install SManager only for a few tweaks, and I think init.d would be useful for some people who don't want an app that runs on each boot and init.d is pretty good alternative for any third-party app for running scripts.
Cheers!
Edit:
Besides I don't think that putting the whole build.prop in the flashable file is a good idea, this overwrites original build.prop files on the phone this script is flashed on. There's a script to just add some extra lines to build.prop rather than just overwriting it with yours.
I've found some code in one of the flashable zips I have on my SD card. The file inside the package is named add_to_buildprop.sh but I think you can use any name.
Here it is:
Spoiler
Code:
#!/sbin/sh
#By Jeeko
busybox echo "" >> /system/build.prop
busybox echo "debug.sf.hw=1" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "ro.HOME_APP_ADJ=1" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "video.accelerate.hw=1" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "persist.sys.use_dithering=1" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo " " >> /system/build.prop
busybox echo "# System Tweaks" >> /system/build.prop
busybox echo "ro.HOME_APP_ADJ=1" >> /system/build.prop
busybox echo "ro.mot.eri.losalert.delay=1000" >> /system/build.prop
busybox echo "ro.config.hw_fast_dormancy=1" >> /system/build.prop
busybox echo "ro.ril.enable.amr.wideband=1" >> /system/build.prop
busybox echo "ro.config.hw_fast_dormancy=1" >> /system/build.prop
busybox echo "ro.config.hw_quickpoweron=true" >> /system/build.prop
busybox echo "# Miscellaneous Tweaks" >> /system/build.prop
busybox echo "persist.sys.NV_FPSLIMIT=90" >> /system/build.prop
busybox echo "debug.qctwa.statusbar=1" >> /system/build.prop
busybox echo "debug.qctwa.preservebuf=1" >> /system/build.prop
busybox echo "debug.qc.hardware=true" >> /system/build.prop
busybox echo "com.qc.hardware=true" >> /system/build.prop
busybox echo "ro.telephony.sms_segment_size=160" >> /system/build.prop
busybox echo "persist.telephony.support.ipv6=1" >> /system/build.prop
busybox echo "persist.telephony.support.ipv4=1" >> /system/build.prop
busybox echo "ro.config.hw_fast_dormancy=1" >> /system/build.prop
busybox echo "persist.sys.shutdown.mode=hibernate" >> /system/build.prop
busybox echo "ro.config.hw_power_saving=true" >> /system/build.prop
busybox echo "ro.media.enc.hprof.vid.fps=65" >> /system/build.prop
busybox echo "ro.mot.buttonlight.timeout=1" >> /system/build.prop
busybox echo "ro.ril.set.mtu1472=1" >> /system/build.prop
busybox echo "touch.presure.scale=0.001" >> /system/build.prop
busybox echo "# Signal Tweaks" >> /system/build.prop
busybox echo "ro.ril.hsxpa=1" >> /system/build.prop
busybox echo "ro.ril.gprsclass=10" >> /system/build.prop
busybox echo "ro.ril.hsdpa.category=8" >> /system/build.prop
busybox echo "ro.ril.hsupa.category=6" >> /system/build.prop
busybox echo "persist.cust.tel.eons=1" >> /system/build.prop
busybox echo "# Wireless Speed Tweaks" >> /system/build.prop
busybox echo "net.tcp.buffersize.default=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.wifi=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.umts=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.gprs=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.tcp.buffersize.edge=4096,87380,256960,4096,16384,256960" >> /system/build.prop
busybox echo "net.ipv4.tcp_ecn=0" >> /system/build.prop
busybox echo "net.ipv4.route.flush=1" >> /system/build.prop
busybox echo "net.ipv4.tcp_rfc1337=1" >> /system/build.prop
busybox echo "net.ipv4.ip_no_pmtu_disc=0" >> /system/build.prop
busybox echo "net.ipv4.tcp_sack=1" >> /system/build.prop
busybox echo "net.ipv4.tcp_fack=1" >> /system/build.prop
busybox echo "net.ipv4.tcp_window_scaling=1" >> /system/build.prop
busybox echo "net.ipv4.tcp_timestamps=1" >> /system/build.prop
busybox echo "net.ipv4.tcp_rmem=4096 39000 187000" >> /system/build.prop
busybox echo "net.ipv4.tcp_wmem=4096 39000 187000" >> /system/build.prop
busybox echo "net.ipv4.tcp_mem=187000 187000 187000" >> /system/build.prop
busybox echo "net.ipv4.tcp_no_metrics_save=1" >> /system/build.prop
busybox echo "net.ipv4.tcp_moderate_rcvbuf=1" >> /system/build.prop
busybox echo "# Makes streaming videos stream faster" >> /system/build.prop
busybox echo "media.stagefright.enable-player=true" >> /system/build.prop
busybox echo "media.stagefright.enable-meta=true" >> /system/build.prop
busybox echo "media.stagefright.enable-scan=true" >> /system/build.prop
busybox echo "media.stagefright.enable-http=true" >> /system/build.prop
busybox echo "media.stagefright.enable-record=true" >> /system/build.prop
busybox echo "# Website Bypass" >> /system/build.prop
busybox echo "net.rmnet0.dns1=8.8.8.8" >> /system/build.prop
busybox echo "net.rmnet0.dns2=8.8.4.4" >> /system/build.prop
busybox echo "net.dns1=8.8.8.8" >> /system/build.prop
busybox echo "net.dns2=8.8.4.4" >> /system/build.prop
busybox echo "# Graphics Enhancement" >> /system/build.prop
busybox echo "debug.performance.tuning=1" >> /system/build.prop
busybox echo "video.accelerate.hw=1" >> /system/build.prop
busybox echo "ro.media.dec.jpeg.memcap=20000000" >> /system/build.prop
busybox echo "ro.media.enc.hprof.vid.bps=8000000" >> /system/build.prop
busybox echo "ro.media.enc.jpeg.quality=100" >> /system/build.prop
busybox echo "# Disables data sent and logging" >> /system/build.prop
busybox echo "ro.config.nocheckin=1" >> /system/build.prop
busybox echo "profiler.force_disable_err_rpt=1" >> /system/build.prop
busybox echo "profiler.force_disable_ulog=1" >> /system/build.prop
busybox echo "# Scrolling Responsiveness" >> /system/build.prop
busybox echo "windowsmgr.max_events_per_sec=90" >> /system/build.prop
busybox echo "persist.cust.tel.eons=1" >> /system/build.prop
busybox echo "# Power Saving Tweaks" >> /system/build.prop
busybox echo "ro.ril.disable.power.collapse=1" >> /system/build.prop
busybox echo "pm.sleep_mode=1" >> /system/build.prop
busybox echo "wifi.supplicant_scan_interval=180" >> /system/build.prop
busybox echo "# Dialing Tweaks" >> /system/build.prop
busybox echo "ro.telephony.call_ring.delay=0" >> /system/build.prop
busybox echo "ro.lge.proximity.delay=25" >> /system/build.prop
busybox echo "mot.proximity.delay=25" >> /system/build.prop
busybox echo "# DalvikVM" >> /system/build.prop
busybox echo "dalvik.vm.verify-bytecode=false" >> /system/build.prop
busybox echo "dalvik.vm.execution-mode=int:fast" >> /system/build.prop
busybox echo "dalvik.vm.checkjni=false" >> /system/build.prop
busybox echo "dalvik.vm.dexopt-data-only=1" >> /system/build.prop
busybox echo "dalvik.vm.heapstartsize=1m" >> /system/build.prop
busybox echo "dalvik.vm.heapgrowthlimit=64m" >> /system/build.prop
busybox echo "dalvik.vm.heapsize=128m" >> /system/build.prop
busybox echo "dalvik.vm.verify-bytecode=false" >> /system/build.prop
busybox echo "dalvik.vm.execution-mode=int:jit" >> /system/build.prop
busybox echo "dalvik.vm.lockprof.threshold=250" >> /system/build.prop
busybox echo "dalvik.vm.dexopt-flags=m=v,o=y" >> /system/build.prop
busybox echo "dalvik.vm.jmiopts=forcecopy" >> /system/build.prop
busybox echo "# Performance" >> /system/build.prop
busybox echo "debug.composition.type=gpu" >> /system/build.prop
busybox echo "ro.max.fling_velocity=20000" >> /system/build.prop
busybox echo "ro.min.fling_velocity=18000" >> /system/build.prop
busybox echo "debug.performance.tuning=1" >> /system/build.prop
busybox echo "debug.kill_allocating_task=0" >> /system/build.prop
busybox echo "debug.overlayui.enable=1" >> /system/build.prop
busybox echo "debug.egl.profiler=1" >> /system/build.prop
busybox echo "debug.egl.hw=1" >> /system/build.prop
busybox echo "debug.sf.hw=1" >> /system/build.prop
busybox echo "hw3d.force=1" >> /system/build.prop
busybox echo "hw2d.force=1" >> /system/build.prop
busybox echo "force_hw_ui=true" >> /system/build.prop
busybox echo "profiler.force_disable_err_rpt=1" >> /system/build.prop
busybox echo "profiler.force_disable_ulog=1" >> /system/build.prop
busybox echo "ro.min_pointer_dur=8" >> /system/build.prop
busybox echo "debug.kill_allocating_task=0" >> /system/build.prop
busybox echo "persist.sys.ui.hw=1" >> /system/build.prop
busybox echo "ro.debuggable=1" >> /system/build.prop
busybox echo "ro.config.disable.hw_accel=false" >> /system/build.prop
busybox echo "ro.kernel.android.checkjni=0" >> /system/build.prop
busybox echo "persist.sys.purgeable_assets=1" >> /system/build.prop
busybox echo "persist.sys.use_dithering=1" >> /system/build.prop
busybox echo "ro.secure=0" >> /system/build.prop
busybox echo "ro.min_pointer_dur=1" >> /system/build.prop
busybox echo "# 16bit Transparency" >> /system/build.prop
busybox echo "persist.sys.use_16bpp_alpha=1" >> /system/build.prop
busybox echo "#" >> /system/build.prop
My phone is T. Xperia T.
romcio47 said:
What do you think about an init.d version of these tweaks? Personally I don't want to install SManager only for a few tweaks, and I think init.d would be useful for some people who don't want an app that runs on each boot and init.d is pretty good alternative for any third-party app for running scripts.
Cheers!
Edit:
Besides I don't think that putting the whole build.prop in the flashable file is a good idea, this overwrites original build.prop files on the phone this script is flashed on. There's a script to just add some extra lines to build.prop rather than just overwriting it with yours.
I've found some code in one of the flashable zips I have on my SD card. The file inside the package is named add_to_buildprop.sh but I think you can use any name.
Here it is:
Spoiler
Code:
#!/sbin/sh
#By Jeeko
busybox echo "" >> /system/build.prop
busybox echo "debug.sf.hw=1" >> /system/build.prop
busybox echo "" >> /system/build.prop
busybox echo "#" >> /system/build.prop
My phone is T. Xperia T.
Click to expand...
Click to collapse
I always had problems of reliability with init.d support, so I won't. But feel free to move the scripts from /system/etc/XperiaTweaks to your init.d directory and set the correct permissions (755).
I had tested the script of Jeeko few months ago and it didn't work, but I will try again. Thanks.
Hi,
How can I set zipalign and sqlite running at boot once a week ? Thanks
gorneman said:
Hi,
How can I set zipalign and sqlite running at boot once a week ? Thanks
Click to expand...
Click to collapse
Open SManager and select the scripts (6 & 7) in /system/etc/XperiaTweaks. Set them as "su" (not "boot", you can check "Ntfy") and don't forget to save the configurations.
Then, hit the menu button in the bottom right corner and select "Scheduler". Schedule your scripts and save.
It's done.
good tweaks but Battery Draining tooo fasttttttt.
Related
I'm trying to make a script that will do a modification to the build.prop on boot.
Usually I flash the cm7 nightly and I pull the build.prop, modify it and push it back before the first boot. The idea is to make it easier for flashing roms on the go. Using custom_backup_list.txt seems to be a viable option but it will keep an old build.prop indefinitely.
Some of the properties that I want to change are
Code:
windowsmgr.max_events_per_sec=100
ro.sf.lcd_density=201
ro.config.ringtone=_Mosquito 16bit.mp3
ro.config.alarm_alert=Alarm_Beep_02.ogg
From what I read today CM7 looks for inituser.sh file at two different locations:
Code:
/sd-ext/userinit.sh
/data/local/userinit.sh
As of now I have tried without success doing the following
Make a userinit.sh script at /data/local with the following code
Code:
#!/system/bin/sh
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
setprop windowsmgr.max_events_per_sec 100
setprop ro.sf.lcd_density 201
setprop ro.config.ringtone "_Mosquito 16bit.mp3"
setprop ro.config.alarm_alert Alarm_Beep_02.ogg
I'm not sure if there's something wrong in the above code, or CM7 is not running the scripts on boot.
EDIT: after adb push the file I do
Code:
adb shell
chmod 755 /data/local/userinit.sh
I've been trying for several hours now. Still get issue with stuck at X.
This is my updated script. Not sure what is wrong...
Using CM7 nightly36
cavs intersectraven
ss4n1 script
dtapp2sd
this is my userinit.sh at /data/local
Code:
#!/system/bin/sh
file=/system/.bproped
if [ -f "$file" ]; then
echo "Done already"
else
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=202/g' /system/build.prop
sed -i '/ro.config.ringtone/d' /system/build.prop
sed -i '/ro.config.alarm_alert/d' /system/build.prop
echo "ro.telephony.call_ring.delay=1000" >> /system/build.prop
echo "ro.config.ringtone=_Mosquito 16bit.mp3" >> /system/build.prop
echo "ro.config.alarm_alert=Alarm_Beep_02.ogg" >> /system/build.prop
echo "windowsmgr.max_events_per_sec=100" >> /system/build.prop
echo > /system/.bproped
fi;
exit 0
I know where you're coming from. Takes a while to customize your phone manually after each nightly, so I actually have a custom script similar to what you're doing, which updates build.prop and other config files (hosts, gps.conf, etc). Only mine is run within the update.zip, using the recovery shell /sbin/sh.
For your method, you can try this ...
Code:
#!/system/bin/sh
MODIFIED=`cat /system/build.prop|grep "zeus_chingon"`
if [ "$MODIFIED" ];
then
echo "Done already"
else
mount -o remount,rw /system
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=202/g' /system/build.prop
RINGTONE=`cat /system/build.prop|grep "ro.config.ringtone"`
sed -i 's/$RINGTONE/ro.config.ringtone=_Mosquito_16bit.mp3/g' /system/build.prop
ALARM=`cat /system/build.prop|grep "ro.config.alarm_alert"`
sed -i 's/$ALARM/ro.config.alarm_alert=Alarm_Beep_02.ogg/g' /system/build.prop
echo "ro.telephony.call_ring.delay=1000" >> /system/build.prop
echo "windowsmgr.max_events_per_sec=100" >> /system/build.prop
echo "# Modified by zeus_chingon" >> /system/build.prop
mount -o remount,ro /system
fi
EDIT:
My own custom script is HERE. Feel free to modify for your own use.
ch33kybutt said:
I know where you're coming from. Takes a while to customize your phone manually after each nightly, so I actually have a custom script similar to what you're doing, which updates build.prop and other config files (hosts, gps.conf, etc). Only mine is run within the update.zip, using the recovery shell /sbin/sh.
For your method, you can try this ...
Code:
#!/system/bin/sh
MODIFIED=`cat /system/build.prop|grep "zeus_chingon"`
if [ "$MODIFIED" ];
then
echo "Done already"
else
mount -o remount,rw /system
sed -i 's/ro.sf.lcd_density=240/ro.sf.lcd_density=202/g' /system/build.prop
RINGTONE=`cat /system/build.prop|grep "ro.config.ringtone"`
sed -i 's/$RINGTONE/ro.config.ringtone=_Mosquito_16bit.mp3/g' /system/build.prop
ALARM=`cat /system/build.prop|grep "ro.config.alarm_alert"`
sed -i 's/$ALARM/ro.config.alarm_alert=Alarm_Beep_02.ogg/g' /system/build.prop
echo "ro.telephony.call_ring.delay=1000" >> /system/build.prop
echo "windowsmgr.max_events_per_sec=100" >> /system/build.prop
echo "# Modified by zeus_chingon" >> /system/build.prop
mount -o remount,ro /system
fi
EDIT:
My own custom script is HERE. Feel free to modify for your own use.
Click to expand...
Click to collapse
Thanks for your help, I end up using your zip file with some modification. The problem that I keep encountering is that using the /data/local/userinit.sh method it get stuck on boot at X.
I saw in your buildprop.sh some settings like
Code:
ro.HOME_APP_ADJ=1
ro.HOME_APP_MEM=3072
what does each one do?
I use LauncherPro if that have anything to do with it.
ro.HOME_APP_ADJ determines oom_adj value and ro.HOME_APP_MEM determines memory threshold, for your chosen launcher app. In short, these settings help to keep the launcher resident in memory and thus reduce homescreen lag.
One thing you have know about the ro.* settings in build.prop, are that they are writeable one-time only, i.e. once any ro.* value has been set, it becomes read-only and you cannot use setprop to change it further.
So it seems that your orginal buildprop.sh script add to the first line of build prop by using the
Code:
sed -i '1i\Something' /system/build.prop;
to put it in "higher priority" so that it get run first and overlook the second occurence that might occur in the build.prop afterwards?
So if i want to add something to line number n it would be
sed -i 'ni\something' .......
zeus_chingon said:
So it seems that your orginal buildprop.sh script add to the first line of build prop by using the
Code:
sed -i '1i\Something' /system/build.prop;
to put it in "higher priority" so that it get run first and overlook the second occurence that might occur in the build.prop afterwards?
So if i want to add something to line number n it would be
sed -i 'ni\something' .......
Click to expand...
Click to collapse
That's correct.
Build.prop
Hi All,
By default my System folder didn't had the build.prop. i extracted it from the CM7 Rom made some changes and copied it to System folder and rebooted.
Changes ringtone(default) Playa.ogg to Rigel.ogg.
After reboot still Playa.ogg as my default ringtone.
What is figured was my Phone isnt including build.prop file
Any suggestions?
Thanx
Wildfire Rooted(CM7 Nightly 2.3.5)
So yea I've been working on a proper "app2sd" solution that doesn't involve just switching the MicroSD for the eMMC, but I like the stock rom so far, so I didn't feel like flashing a rom just to get init.d, and I didn't feel like modifying the ramdisk in the kernel either. So I cooked up this script that anyone can run from terminal to get init.d support. It should work for other devices too, as long as they run /system/etc/install-recovery.sh on boot.
There's only three requirements for it to work:
#1 You must be rooted
#2 Your device must run /system/etc/install-recovery.sh
#3 You must have busybox
I tested a few times on my own device (GT-N8013), but haven't had anyone else test it, so don't freak out if it doesn't work. Just let me know what went wrong and I'll figure something out.
Running it is very simple:
#1 Open any terminal app
#2 su
#3 navigate to the folder where you have the script
#4 sh ./enableinit.sh
Your device will be rebooted once the process is done, don't freak out. If everything went fine, you'll have a file in /sdcard called init.d.log created by the test init.d script that is made by the enabler.
You can either download the attachment (rename it to enableinit.sh if you get the attachment), or create the file with the contents betlow:
Code:
#!/system/bin/sh
# Adds init.d support to any device that automatically runs /system/etc/install-recovery.sh
# on startup.
#
# Made by TweakerL, make sure to visit us at and-host.com or chat with us on freenode #and-host
echo '##################################################'
echo '## ##'
echo '## Script by TweakerL ##'
echo '## Visit us at and-host.com ##'
echo '## Chat with us at freenode #and-host ##'
echo '## ##'
echo '##################################################'
echo ''
echo 'This script will enable init.d if your device'
echo 'executes /system/etc/install-recovery.sh'
echo ''
echo 'Your tablet will be rebooted once the process'
echo 'is done.'
echo ''
echo 'If the script successfully enabled init.d you will'
echo 'have a file in /sdcard called init.d.log after'
echo 'the device is done rebooting. Remember to always'
echo 'set the proper permissions in your scripts or they'
echo 'will not work.'
echo ''
read -p "Press ENTER to continue..."
if [ ! -f /system/xbin/busybox -a ! -f /system/bin/busybox ]
then
echo 'You do not have busybox. Exiting now...'
else
# Mount system as rw in order to execute the script
busybox mount -o remount,rw -t ext4 /dev/block/mmcblk0p9 /system
# Check if install-recovery.sh already exists, and if so
# add the necessary lines, otherwise create it
if [ -f /system/etc/install-recovery.sh ]
then
if cat /system/etc/install-recovery.sh | busybox egrep -i "sysinit"
then
echo sysinit already present in install-recovery.sh, skipping this step.
else
busybox cp -f /system/etc/install-recovery.sh /sdcard/qsxdrgbhuk.sh
echo '' >> /sdcard/qsxdrgbhuk.sh
echo '/system/bin/sysinit' >> /sdcard/qsxdrgbhuk.sh
busybox cp -f /sdcard/qsxdrgbhuk.sh /system/etc/install-recovery.sh
fi
else
echo '#!/system/bin/sh' >> /sdcard/qsxdrgbhuk.sh
echo '' >> /sdcard/qsxdrgbhuk.sh
echo '/system/bin/sysinit' >> /sdcard/qsxdrgbhuk.sh
busybox cp -f /sdcard/qsxdrgbhuk.sh /system/etc/install-recovery.sh
busybox chmod 755 /system/etc/install-recovery.sh
fi
# Check if sysinit already exists and if so skip step
# otherwise create it
if [ ! -f /system/bin/sysinit ]
then
echo '#!/system/bin/sh' >> /sdcard/kuhbgrdxsq
echo 'export PATH=/sbin:/system/sbin:/system/bin:/system/xbin' >> /sdcard/kuhbgrdxsq
echo '' >> /sdcard/kuhbgrdxsq
echo '/system/bin/logwrapper busybox run-parts /system/etc/init.d' >> /sdcard/kuhbgrdxsq
busybox cp -f /sdcard/kuhbgrdxsq /system/bin/sysinit
busybox chmod 755 /system/bin/sysinit
else
echo sysinit already exists in /system/bin. init.d should already be enabled.
fi
# Cleanup
busybox rm -f /sdcard/qsxdrgbhuk.sh
busybox rm -f /sdcard/kuhbgrdxsq
#Check that init.d folder exists and if not create it
# as well as set the right permissions
if [ -d '/system/etc/init.d' ]
then
chmod 755 /system/etc/init.d
else
mkdir /system/etc/init.d
chmod 755 /system/etc/init.d
fi
# Create a test init.d script that echoes a file to
# /sdcard on successful execution
echo '#!/system/bin/sh' > /sdcard/99testinit
echo '' >> /sdcard/99testinit
echo 'echo init.d works > /sdcard/init.d.log' >> /sdcard/99testinit
busybox cp -f /sdcard/99testinit /system/etc/init.d
chmod 755 /system/etc/init.d/99testinit
busybox rm -f /sdcard/99testinit
# Sync and remount system
sync
busybox mount -o remount,ro -t ext4 /dev/block/mmcblk0p9 /system
# Reboot system to enable init.d
if [ -f /system/bin/reboot ]
then
echo Your device will reboot in 3 seconds
sleep 3
reboot
else
echo "Your device doesn't appear to have a reboot command,"
echo "please reboot your device now to avoid problems."
fi
fi
reserved
TweakerL said:
reserved
Click to expand...
Click to collapse
it is good!
TweakerL said:
reserved
Click to expand...
Click to collapse
Thanks for sharing.
Im tested my ainol elf offical rom novo0706, and worked. Thank
Sent from my Ainol Novo 7 Elf using Tapatalk 2
Pretty awesome. Will edit once i try this out.
Edit: Everything worked. Tested on GT-N8013
Thanks alot.
Sent from my GT-N8013 using Tapatalk 2
Hi, Can you tell more clearly how to make this work.
Sent from my GT-N8000 using xda app-developers app
Can any one make .zip file to flash thru recovery..thanks
The point was not to have to go into recovery...
Anyway, it's really simple...
Download the attached file
open terminal
then do the following commands
Code:
su
cd /sdcard
sh ./Download/enableinit.sh.txt
assuming that your browser saves files to /sdcard/Download
Sorry, I am a computer idiot . I really donot how to do after I had downloaded the text file. Appreciated if you can explain more detail.
Sent from my GT-N8000 using xda app-developers app
So now with init.d support ready, is it going to be possible to run proper a2sd scripts? And which one specifically would you recommend? Excuse me if i'm asking the wrong questions.
andylam16 said:
Sorry, I am a computer idiot . I really donot how to do after I had downloaded the text file. Appreciated if you can explain more detail.
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
It has nothing to do with knowing anything about computers, as you don't need a computer to do this... just your device...
Download the file, on your device, if you're using stock browser it will go to /sdcard/Download
Make sure you have busybox, download a busybox installer from the market, install it, and run it, and tell it to install busybox
Download a terminal app from the play store for free, such as android terminal emulator, install it and open it
then type in these exact commands, just like they're in here, in the terminal:
Code:
su
sh /sdcard/Download/enableinit.sh
Assuming of course, that your stuff is getting download to /sdcard/Download.
If you can't do this... sell your android device and buy an iCrap one...
drnish83 said:
So now with init.d support ready, is it going to be possible to run proper a2sd scripts? And which one specifically would you recommend? Excuse me if i'm asking the wrong questions.
Click to expand...
Click to collapse
I'm working on my own app2sd script that should beat anything ever made. Here's what it does:
It uses a second partition in the MicroSD card for gaining extra storage, this partition has to be formatted to ext4
#1 It mounts the external ext4 partition to a new location
#2 It detects the location for /sdcard/Android; /data/data; /data/app no matter what device you have (suppose the directories aren't the same for a certain device)
#3 It has the option to mount /sdcard/Android to a folder in the external partition
#4 It has the option to mount /data/data to a folder in the external partition
#5 It has the option to mount /data/app to a folder in the external partition
#6 It has the option to automatically copy everything from any of those folders to the appropriate folder in the external partition
#7 It has the option to automatically wipe from the internal storage anything that it moves
#8 If you have all options enabled, apps will be automatically installed to the external partition and never take any space in the internal storage, while everything else (Download/recovery/backup/pictures/videos/etc...) all remain in the internal partition.
Wow... cant wait for this script
Sent from my GT-N8013 using Tapatalk 2
Thanks for explaining. Interesting indeed! Will definitely wait for it eagerly!
Here's a preview of the super app2sd script I'm working on. Much of it is already implemented, should have it all in a couple of days
confusing
I have tried your script and it has successful at first.. then i flashing my note again with stock rom and i try using ur script again but now there is nothing chance.. do you know why?? what must i do now??
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
NessLookAlike said:
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
Click to expand...
Click to collapse
Busy box installs on mine.
Sent from my GT-N8013 using Tapatalk 2
NessLookAlike said:
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
Click to expand...
Click to collapse
Only reason you wouldn't be able to install busybox is if you're not rooted.
Mr tweaker, i have done the process of init.d but there is nothing changed.. where is my false?
Sent from my GT-N8000 using XDA Premium HD app
Welly_11 said:
Mr tweaker, i have done the process of init.d but there is nothing changed.. where is my false?
Sent from my GT-N8000 using XDA Premium HD app
Click to expand...
Click to collapse
Look for these files and let me know if they're there:
/system/etc/install-recovery.sh
/system/bin/sysinit
/system/etc/init.d/99testinit
**************************************
If anybody needs help, look for me on irc - #and-host in freenode
I found a script that adds boot audio. In it there is a line calling stagefright, stagefright either doesn't exist on my ROM and I have no clue as to add it. Here is the script in question which I don't know the original author however lithid from http://forum.cyanogenmod.org did some work on it and was close to creating a updater-script. Please Help Me as I know some scripting but not a lot
PS I was advised to ask this question to the devs by a cyanogenmod.org mod named bassmadrigal
Code:
#!/system/bin/sh
#I just made this into a script this was from a post on XDA by spiicytuna
#http://forum.xda-developers.com/showpost.php?p=8274824&postcount=2
#Please give the credit to him not me.
echo "preparing system..."
#Setting up the system for read/write access
mount -o remount,rw /system
#linking busybox mkdir (broken in rc2)
rm /system/bin/mkdir
ln -s /system/xbin/mkdir /system/bin/mkdir
mkdir -p /data/local/boot
echo "checking for previous bootsound installation..."
if [ -e /system/bin/bootsound ];
then
echo "bootsound already enabled, exiting.."
mount -o remount,ro /system
exit
fi
if [ "`ls /sbin|grep -q recovery;echo $?`" = "0" ];
then
mount -a > /dev/null
recoverymode=y
else
mount -o rw,remount /system
recoverymode=n
fi
echo "preparing startup scripts..."
#This is to create the needed scripts in init.local.rc
echo '' >> /system/etc/init.local.rc
echo '' >> /system/etc/init.local.rc
echo '###Bootsound - Safe to Delete: Start ###' >> /system/etc/init.local.rc
echo "" >> /system/etc/init.local.rc
echo 'service bootsound /system/bin/bootsound' >> /system/etc/init.local.rc
echo ' user media' >> /system/etc/init.local.rc
echo ' group audio' >> /system/etc/init.local.rc
echo ' disabled' >> /system/etc/init.local.rc
echo ' oneshot' >> /system/etc/init.local.rc
echo '' >> /system/etc/init.local.rc
echo 'on property:init.svc.bootanim=running # to correct timin' >> /system/etc/init.local.rc
echo ' start bootsound' >> /system/etc/init.local.rc
echo '' >> /system/etc/init.local.rc
echo 'on property:dev.bootcomplete=1' >> /system/etc/init.local.rc
echo ' stop bootsound' >> /system/etc/init.local.rc
echo '### Bootsound - Safe to Delete: End ###' >> /system/etc/init.local.rc
echo "creating script for bootsound in /system/bin..."
echo '#Now creating the bootsound script'
touch /system/bin/bootsound
echo '#!/system/bin/sh' >> /system/bin/bootsound
echo '' >> /system/bin/bootsound
echo 'bprop=/system/build.prop' >> /system/bin/bootsound
echo '' >> /system/bin/bootsound
echo 'play=$(cat $bprop | egrep -c -i -o ro.config.play.bootsound=1)' >> /system/bin/bootsound
echo 'if [ "$play" = "1" ]; then' >> /system/bin/bootsound
echo ' stagefright -a -o /system/media/android_audio.mp3' >> /system/bin/bootsound #this is the line that breaks the code
echo 'fi' >> /system/bin/bootsound
echo 'exit 0' >> /system/bin/bootsound
#Changing some permissions
chmod 777 /system/bin/bootsound
chown root:shell /system/bin/bootsound
echo '' >> /system/build.pro
echo 'ro.config.play.bootsound=1' >> /system/build.prop
echo 'media.stagefright.enable-player=true' >> /system/build.prop
echo 'media.stagefright.enable-meta=true' >> /system/build.prop
echo 'media.stagefright.enable-scan=true' >> /system/build.prop
echo 'media.stagefright.enable-http=true' >> /system/build.prop
#removed self-destruct, script checks for previous install
sleep 1
mount -o ro,remount /system
echo "done."
exit
ethan_hines said:
I found a script that adds boot audio. In it there is a line calling stagefright, stagefright either doesn't exist on my ROM and I have no clue as to add it. Here is the script in question which I don't know the original author however lithid from http://forum.cyanogenmod.org did some work on it and was close to creating a updater-script. Please Help Me as I know some scripting but not a lot
PS I was advised to ask this question to the devs by a cyanogenmod.org mod named bassmadrigal
Click to expand...
Click to collapse
Not sure if this works , but I will eventually try it , but not now , on my free time.
stagefright indeed is not included , my phone too doesn't have stagefright , if you go to youtube and search for android developement tutorials by "thenewboston" . you'll find 200 videos series , just watch the first 20 ones and you'll learn to use Media which replaces stagefright...I didn't try it yet.
It includes
Our_Player and Media Player and the directory of the song....check it out and give us heads ups!
thethiny said:
Not sure if this works , but I will eventually try it , but not now , on my free time.
stagefright indeed is not included , my phone too doesn't have stagefright , if you go to youtube and search for android developement tutorials by "thenewboston" . you'll find 200 videos series , just watch the first 20 ones and you'll learn to use Media which replaces stagefright...I didn't try it yet.
It includes
Our_Player and Media Player and the directory of the song....check it out and give us heads ups!
Click to expand...
Click to collapse
I appreciate the info, I took a look at his tutorials esp the ones involving animation, he really knows his stuff. I am not a Java programmer by any means and to be honest I find it quite tedious, it's like trying to teach a baby (this case the Dalvik VM) to do basic stuff like draw a green ball took like 20 lines of code!
What I need to know essentially is, do I have to use JAVA to get this to work now? In the past ie ICS and lower, there wasn't a problem with Custom Boot Audio, now with JB it seems it has disappeared from the radar.
I know the binary /system/bin/bootanimation (is this written in JAVA?, is there a source code for this bin?) is called at boot time by init.rc in the following manner:
Code:
service bootanim /system/bin/bootanimation
class main
user graphics
group graphics
disabled
oneshot
/system/bin/bootanimation (at least from what I gather) looks in /system/media for bootanimation.zip (zipped in store mode) decompresses it , looks at desc.txt for the code and displays the animation png by png.
In some desc.txt there is an s line, example:
Code:
# mobility
p 1 0 SOUND
s transdroid.mp3
which is SUPPOSED TO call a custom boot audio from /system/media (.mp3?) at the same time. This appears not to work. So logicaly I think the binary needs some tweaking. Can you offer any suggestions?
As you can see I have spent ALLOT of time mulling over why this,one would think, simple task: display a series of images and play audio at boot time I mean how hard can that be?
I am not trying to be a pest I just need to know WHY this doesn't work in JB (CM10.1)
Dsploit is not an application I made, all credit belongs to evilsocket. I only made this script to update the apk.
Every hour or so, everytime the source code of the app changes. A apk is generated automatically.
So this script updates the apk every time you type the command in android terminal emulator.
HOW TO INSTALL?
1) Download the dsupdate.zip
2) Flash it in recovery mode.
HOW TO USE?
1) Download Android Terminal Emulator from the playstore if you had not done so..
2) Open the app
3) Type the following:-
su -
dsupdate
*NOTE Ignore the app_process warnings
4) That's it. You successfully updated the app.
What this script currently does?
1) Backs up the current apk.
2) Downloads the latest apk.
3) Installs the latest version.
This is the current script, if anyone has any suspicions...
Code:
#!/system/bin/sh
DT=$(busybox date)
echo "Script Made By La2o"
echo "Script started at:- $DT"
echo "Checking if old backup exists..."
if [ -e /data/app/it.evilsocket.dsploit-1.apk.bak ]; then
echo "Backup found! Deleting..."
rm -f /data/app/it.evilsocket.dsploit-1.apk.bak
fi
echo "Making a backup of the current apk..."
cp /data/app/it.evilsocket.dsploit-1.apk /data/app/it.evilsocket.dsploit-1.apk.bak
chmod 0644 /data/app/it.evilsocket.dsploit-1.apk.bak
echo "Done!"
cd sdcard
echo "Downloading Nightly APK"
busybox wget "http://94.75.228.27/dsploit/dSploit-nightly.apk"
echo "Installing!"
pm uninstall it.evilsocket.dsploit
pm install dSploit-nightly.apk
echo "Done..."
echo "Deleting Downloaded APK";
rm -f dSploit-nightly.apk
echo "Checking if the app installed correctly..."
cd ..
cd /data/app
ls -a -l | grep dsploit
echo "Done"
How can I run a script with the code that I will give on kitkat , because my touchscreen get unresponsive and this script should fix it?
#!/system/bin/sh
echo 20 > /sys/devices/i2c-3/3-0024/main_ttsp_core.cyttsp4_i2c_adapter/finger_threshold
chmod 666 /sys/devices/i2c-3/3-0024/main_ttsp_core.cyttsp4_i2c_adapter/signal_disparity
echo 0 > /sys/devices/i2c-3/3-0024/main_ttsp_core.cyttsp4_i2c_adapter/signal_disparity