Collection of Apps, Guides, Mods Scripts, Tweaks etc. Updated on 27/01/2012 - Galaxy 3 Android Development

Here are the collection of various apps, guides, mods, scripts, tweaks etc.
Warning: All of the scripts & other tweaks are collected from various sources. So please please be careful before experimenting with them.
The purpose of this thread is to put all of them in one place for easy access.

build.prop tweaks
First copy the build.prop and rename it to build.prop.bak for backup
Open build.prop in notepad.
at the end of the line write a line of code into build.prop and that line tells the android system what to do.
Code:
[B][U]Experimental / Not Tested[/U][/B]
##Date format
ro.com.android.dateformat=MM-dd-yyyy
ro.com.google.locationfeatures=1
ro.setupwizard.mode=DISABLED
keyguard.no_require_sim=true
ro.com.android.dataroaming=true
# Default network type.
ro.telephony.default_network=8
##8 => CDMA/EVDO/LTE auto mode preferred. (I don't know what should be the value for our Galaxy 3)
#proximit sensor disable touch distance
mot.proximity.distance=60
[B][U]Working[/U][/B]
##Makes phone boot rapidly fast
persist.sys.shutdown.mode=hibernate
##Force launcher into memory
ro.HOME_APP_ADJ=1
## Raise JPG quality to 100%
ro.media.enc.jpeg.quality=100
##VM Heapsize; 178MB RAM = 32 is better
dalvik.vm.heapsize=48m
##Render UI with GPU
debug.sf.hw=1
##Decrease dialing out delay
ro.telephony.call_ring.delay=0
##Helps scrolling responsiveness
windowsmgr.max_events_per_sec=150
##Save battery
wifi.supplicant_scan_interval=180
pm.sleep_mode=1
ro.ril.disable.power.collapse=0
##Disable debugging notify icon on statusbar
persist.adb.notify=0
##Increase overall touch responsiveness
debug.performance.tuning=1
video.accelerate.hw=1
##Raise photo and video recording quality (2.3 ROM only)
ro.media.dec.jpeg.memcap=8000000
ro.media.enc.hprof.vid.bps=8000000
# Photo and video recording quality tweak (2.2 Rom only)
ro.media.dec.jpeg.memcap=10000000
ro.media.enc.hprof.vid.bps=1000000
##Signal (3G) tweaks
ro.ril.hsxpa=2
ro.ril.gprsclass=12
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=6
ro.ril.def.agps.feature=1
ro.ril.enable.sdr=1
ro.ril.enable.gea3=1
ro.ril.enable.fd.plmn.prefix=23402,23410,23411
ro.ril.enable.a52=1
ro.ril.enable.a53=1
ro.ril.enable.dtm=1
##Net speed tweaks
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
##Disable blackscreen issue after a call
ro.lge.proximity.delay=25
mot.proximity.delay=25
##Fix some application issues
ro.kernel.android.checkjni=0
##Phone will not wake up from hitting the volume rocker
ro.config.hwfeature_wakeupkey=0
##Force button lights on when screen is on
ro.mot.buttonlight.timeout=0
##Disable boot animation for faster boot
debug.sf.nobootanimation=1
# Enable Stagefright helps stream Video and Music Faster
media.stagefright.enable-player=true
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true
# Enable display Dithering
persist.sys.use_dithering=1
# Enable purgeable assets
persist.sys.purgeable_assets=1
# For SD storage insert notification sound
persist.service.mount.playsnd=0
##Miscellaneous flags
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

init.d scripts
(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)
=> app2sd script v.1
=>app2sd script v.2
=> app2sd script v.3
Code:
##internet speed tweaks
echo "0" > /proc/sys/net/ipv4/tcp_timestamps;
echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse;
echo "1" > /proc/sys/net/ipv4/tcp_sack;
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle;
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling;
echo "5" > /proc/sys/net/ipv4/tcp_keepalive_probes;
echo "30" > /proc/sys/net/ipv4/tcp_keepalive_intvl;
echo "30" > /proc/sys/net/ipv4/tcp_fin_timeout;
echo "404480" > /proc/sys/net/core/wmem_max;
echo "404480" > /proc/sys/net/core/rmem_max;
echo "256960" > /proc/sys/net/core/rmem_default;
echo "256960" > /proc/sys/net/core/wmem_default;
echo "4096,16384,404480" > /proc/sys/net/ipv4/tcp_wmem;
echo "4096,87380,404480" > /proc/sys/net/ipv4/tcp_rmem;
##vm management tweaks
echo "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
##misc kernel tweaks
echo "8" > /proc/sys/vm/page-cluster;
echo "64000" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;
echo "500,512000,64,2048" > /proc/sys/kernel/sem;
##battery tweaks
echo "500" > /proc/sys/vm/dirty_expire_centisecs
echo "1000" > /proc/sys/vm/dirty_writeback_centisecs
##EXT4 tweaks (greatly increase I/O)
(needs /system, /cache, /data partitions formatted to EXT4)
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
##perfect mount options
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
##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 card speed tweak
echo "2048" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
##Defrags database files
for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done
##Remove logger
rm /dev/log/main
##Ondemand governor tweaks
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
##Auto change governor and I/O Scheduler
a) I/O Scheduler (Best: MTD devices - VR; EMMC devices - SIO) - needs kernel with these
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
echo "governor-name-here" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
##[B]Block Ads with Hosts[/B] regularly updated in Sekhy ROM
Patch your hosts file for blocking Ads
(please think before doing this; many developers are supported through this way)
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
##Use Google's dns servers
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/.
Update Superuser and su binary to latest version
http://goo-inside.me/superuser/
Terminal Emulator Tips
#Find top CPU/memory using apps. value after -m is how many apps to show, value after -n is how many times to update (be sure to set this value or it will run endlessly until terminal is closed)
top -m 10 -n 1
#Loading a module for apps2sdext (link2sd style apps2sd)
Run this in terminal emulator with superuser permission, substituting ext3 for whatever extension you want loaded (keep the .ko though)
insmod /system/lib/modules/ext3.ko
*Listing loaded modules
Run this in terminal emulator with superuser permissions
lsmod
*Forcing a hot reboot to clear caches
Run this in terminal emulator with superuser permissions
pkill zygote
*terminal tips-
Find list of many possible scripts to run
busybox
List sysctl commands
sysct -h
List first or last 10 lines of another scripts output (note | is not lower case L, its a separate character)
First 10-
(script) | head
Last 10
(script) | tail
Example (list first 10 sysctl values)
sysctl -a | head
Finding lines with certain letters/word in another scripts output
(script) | grep (letters/word)
Example (show only sysctl lines with vm in them) (note | is not lower case L, its a separate character)
sysctl -a | grep vm
improve peformance?
Add this to the build.prop
#disable the zygote loader
ro.wmt.blcr.enable=0
Increse overall touch resposivness?
Add these to build.prop
debug.performance.tuning=1
video.accelerate.hw=1
ro.min_pointer_dur=8
Misc:
Tweaking Virtual Memory For Battery Power
Open a Terminal and Execute these conmmds as root Tweak virtual memory to conserve power when running on battery:
Code:
echo 0 > /proc/sys/vm/swappiness #can be ignored if you don't use swap
echo 0 > /proc/sys/vm/dirty expire centisecs #can be ignored if you don't use swap
echo 0 > /proc/sys/vm/dirty=writeback_centisecs #can be ignored if you don't use swap
echo 60 > /proc/sys/vrn/dirty_background_ratio
echo 95 > /proc/svs/vrn/dirty ratio

Experimental only
Code:
[B][U]XLoud Engine[/U][/B]
Xloud is making Sound enhancement,Volume enhancement,Equalizer enhancement credits goes to su.angga
Download [URL="http://hotfile.com/dl/142227330/6333c65/XLOUD.zip.html"]Here[/URL]
Add this line at bottom of your build.prop
ro.semc.xloud.supported=true
persist.service.xloud.enable=1
Set all permission to rw-r-r
[V][V][0]
[V][0][0]
[V][0][0]
Reboot,Enjoy
[B][U]Bravia Engine[/U][/B]
With Bravia Engine Without Bravia Engine
[IMG]http://img855.imageshack.us/img855/6278/photobravia.png[/IMG][IMG]http://img841.imageshack.us/img841/2163/photonobravia.png[/IMG]
Download [URL="http://hotfile.com/dl/142227731/d0e7cda/Braviaengine.rar.html"]Here[/URL]
Add this line at bottom of your build.prop
[B]# BRAVIA HACK[/B]
ro.service.swiqi.supported=true
persist.service.swiqi.enable=1
Copy be_photo and be_movie to system/etc
Set permissions in terminal emulator like this:
su
busybox chmod 0755 /system/etc/be_photo
busybox chmod 0755 /system/etc/be_movie
busybox chown 0.0 /system/etc/be_photo
busybox chown 0.0 /system/etc/be_movie
Reboot,Enjoy

:: Modding & Mods ::
ICS Transition Animations
A simple tutorial to get ICS transition animations on any ROM
Full credits to Capez only
Download APK Multi Tool (previously known as APK manager) from here
2) Extract with WinRAR, from the ROM you want to modify, the file framework-res.apk, that you can find in the directory \System\framework\.
3) Go to the apk manager folder and place the framework-res.apk file in the folder "place-apk-here-for-modding".
4) In the apk manager folder, double click on the file "Script". A cmd window will open.
5) Where it says "Please make your decision", write "22" (Set current project) and enter. Then enter "1" (to choose the first apk) and enter. Then enter "9" (Decompile apk) and enter.
The script will decompile the framework-res.apk.
6) Now go to your apk manager folder, go to Projects\framework-res.apk\res\anim\.
In this folder there are the animations of your rom. They consist in some .xml files decompiled.
7) Download this:
http://www.mediafire.com/?1qjwtotg1r8umm1
8) Copy the files from the folder "anims" of the zip downloaded into the anim folder and you are asked to replace the files; choose yes. Then copy also the files from the folder "other_files" to the anim folder.
9) Now go to your apk manager folder, go to Projects\framework-res.apk\res\values\. Edit the file integers.xml and put these two lines under the line of "shortAnimTime":
<integer name="config_activityShortDur">150</integer>
<integer name="config_activityDefaultDur">220</integer>
Save.
10) Return to Script. Enter "11" (Compile apk) and enter.
The script will rebuild the framework-res.apk.
11) You are asked if this is a system application. Enter "y" and enter. Then a second question appears. Enter newly "y".
12) Then after it processes, Don't press anything & DON'T CLOSE THIS WINDOW!!! A new folder "keep" is created in the apk manager folder. Go inside it and delete the file "resources.arsc". Now go inside keep\res\anim\ and delete every file with the same name as every file of the "anims" folder of the zip downloaded.
Then return to Script and press enter. It processes, then if everything went ok, in the folder "place-apk-here-for-modding" a file "unsignedframework-res.apk" is created. Copy it outside and rename it "framework_res.apk".
13) Now you can create a flashable zip or you can simply push it to your system (but you have to sign the apk).
CONGRATRULATIONS!!! YOU ARE DONE!!!
Video of this mod working:
http://www.youtube.com/watch?v=vf1U_30Ngfk
Enable / Disable media scanning on boot
To enable media scanning on boot:
Code:
su
pm enable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
To disable media scanning on boot:
Code:
su
pm disable com.android.providers.media/com.android.providers.media.MediaScannerReceiver
Caution: I personnaly tried it on our Galaxy 3. But it is looped in Bootanimation.
Please test and confirm anybody, if possible.
Swapping out PNG's in .apk
Full credits to itiskonrad
***Swapping out PNG's***
Okay, so say you have an icon or an image in your phone that you just don't like and would like to swap out with something (or swap out with nothing, so you can't see it at all). Here is what you'll need:
7zip for your computer
Root explorer for your phone
Some kind of image editor. I'm partial towards Paint.net. =) (Only if you're actually going to edit an image. If you're just going to swap it out for something else, you obviously won't need this.)
Here is a good example of something where I really felt like I needed to change some images we can use that I just discovered last night while calling to activate my credit card over the phone. Here is the dialer when you start the phone:
Notice those handy letters next to the numbers =)
Once I started the call to the credit card company, it asked me to verify myself by inputting, using the keypad, the letters of my mother's maiden name. So I opened the dialer, and what did I see?
For whatever STUPID STUPID REASON, they REMOVE the letters next to the numbers on the keypad that opens DURING the call, making it extremely difficult for me to type my mother's maiden name in the time permitted, given that no, I don't off the top of my head know where the letters sit on the dialer. So I felt this needed fixing =)
1.) Copy the apk you want to modify from your phone (using root explorer) and transfer to your computer
In this case, I wanted my Phone.apk, which is in /system/app. The vast majority of system apps are in this folder with the major exception of framework-res.apk, which is the phone’s BIG cajone in /system/framework, and as such, should be handled with utmost care. Messing with framework-res.apk incorrectly is an EASY way to brick your phone in a heartbeat.
2.) Unzip the apk using 7zip and look for your PNG's!
Keep the original, untouched, zipped apk somewhere safe on your computer. You’re going to need one to modify and another copy for safekeeping in case you want to revert back to the stock apk, or something goes wrong. Unzipping the apk just makes searching for the PNG you’re looking for much easier, since you can change the folder view in windows to give you a thumbnail of each of the items. And lookee, lookee, here they are in phone/res/drawable-hdpi, right next to other dial buttons with those handy letters!!
3.) Edit your PNG's however you want.
In this case, the work is pretty much done for us! I just swapped out the PNG's without the letters for copies of the ones with the letters, and just changed the names of the files to the original versions, like so:
4.) Using 7zip, right click on the original, untouched apk, choose 7zip, and open archive. DO NOT EXTRACT.
Open archive will let you explore the apk without having to extract it and lose the proper packaging of the apk.
5.) Select all your newly modified PNG’s and drag and drop them into the correct location in the open archive of the original apk, letting them overwrite the old PNG’s.
6.) Put this newly modified apk back onto your phone. Using root explorer, copy the new apk into the /system folder of your phone.
7.) CHANGE THE PERMISSIONS of the apk to match those of the original apk in /system/app.
In this case, long press on the phone.apk, select permissions, and select the check boxes as follows- Owner: Read, Write; Group: Read; Others: Read. This matches the permissions of phone.apk in /system/app
8.) Move the new apk into /system/app, and let it overwrite the original!
9.) Restart your phone!
Voila! Now when I call my credit card company and have to type in names, I can!
Regional Fonts (Indian)
Download Desifonts.zip
Copy to sdcard. Go to CWM Recovery.
Install it.
Reboot.

::Credits::
capez (ICS transition animations)
Great.Apo
itiskonrad
knzo
Kyrillos
Super.Angga

No offense but we do have individual threads for these already . What's the need for another one?

Rapier07 said:
No offense but we do have individual threads for these already . What's the need for another one?
Click to expand...
Click to collapse
+1 to that
Sent from Galaxy
Kyrillos' ROM GWK74 Alpha4
powered by
CM7-kernel 1.2--800Mhz

rkkoby said:
+1 to that
Sent from Galaxy
Kyrillos' ROM GWK74 Alpha4
powered by
CM7-kernel 1.2--800Mhz
Click to expand...
Click to collapse
I thought it is useful to kept all of them in one place.
But based on your response if you feel it is not necessary and the Mod also feeling the same, Please delete this thread.
I don't mind.

I think this thread is very useful and i will surely subscribe and use this thread in the future

Smonic said:
I think this thread is very useful and i will surely subscribe and use this thread in the future
Click to expand...
Click to collapse
Thank you very much for your support. But lets wait for the MOD's reply.

Just to help your argument, there's a collection of ROM's so why not a collection of tweaks

yup... make a master index of tweaks
and we can apply only those we want separately ..great idea !

satishynd said:
yup... make a master index of tweaks
and we can apply only those we want separately ..great idea !
Click to expand...
Click to collapse
Thanks for your support.
Regarding your battery problem (seen in your signature)
Me too faced battery problem. But at first I thought it is an issue with firmware or problem with out G3 itself. But after getting it replaced by Samsung Service Centre it gives huge battery backup, of course with Custom ROMs only.

+1 for this topic. Great job!

Good work! But Jazux shouldn't be given any credits for these, it was knzo who repo'ed it ... Jazux did nothing!
@Rapier07 - See, I have joined forces with you officially in totally elimination of the Sux effect

Orr.Penn.18 said:
Good work! But Jazux shouldn't be given any credits for these, it was knzo who repo'ed it ... Jazux did nothing!
@Rapier07 - See, I have joined forces with you officially in totally elimination of the Sux effect
Click to expand...
Click to collapse
Yeah i can see that lol

Just used some of these tweaks on stock XXJPS (only the ones i found useful for me). I will see the result

plz delete jazux from credits, because he had opened similar thread long back which he had copied from other thread and didnt even care to give that guy credits..so i think jazux doesnt deserve those credits

deadwood01 said:
plz delete jazux from credits, because he had opened similar thread long back which he had copied from other thread and didnt even care to give that guy credits..so i think jazux doesnt deserve those credits
Click to expand...
Click to collapse
Jazux removed.

Related

REQUEST/IDEA for a safety script for tweaking/OC

I had an Idea for a script that would run at bootup, and if a certain variable had a "value" of NOT 1.
then the script would change the CHMOD of a userinit.sh located in the sd-ext from 050 or 777 to 750 then it would change the variable "value" to 0 were it would stay untill another script that runs at shut down or reboot setts the variable to 1 and changes CHMOD back to 050 or 777 so that the userinit.sh is not run.
That way if a change is made during operating the phone that causes the phone to crash with out shutting down properly the script runs which causes the userinit.sh to run and "resets" userinit.sh values to a "default". Otherwise if shut down properly nothing happens.
This could be expanded on to include repairing the EXT or clearing some special cache or other stuff I am unfamiliar with but that you might want to run after a crash.(like logcat?)
any way what do you think? any promise?
I think, for overclocking purposes anyway, making the userinit.sh unrunnable would make the phone break immediately, as I think it would go to the highest available frequency. However, I like the idea, though I'm not sure how to run scripts on shutdown. I think for overclocking, it would check if the shutdown was clean on startup, and if not change the applicable line to the next lowest number, which it would get either from a seperate file or maybe it could be stuffed in the script itself. (Just my somewhat uneducated thoughts)
TheNewGuy said:
I had an Idea for a script that would run at bootup, and if a certain variable had a "value" of NOT 1.
then the script would change the CHMOD of a userinit.sh located in the sd-ext from 050 or 777 to 750 then it would change the variable "value" to 0 were it would stay untill another script that runs at shut down or reboot setts the variable to 1 and changes CHMOD back to 050 or 777 so that the userinit.sh is not run.
That way if a change is made during operating the phone that causes the phone to crash with out shutting down properly the script runs which causes the userinit.sh to run and "resets" userinit.sh values to a "default". Otherwise if shut down properly nothing happens.
This could be expanded on to include repairing the EXT or clearing some special cache or other stuff I am unfamiliar with but that you might want to run after a crash.(like logcat?)
any way what do you think? any promise?
Click to expand...
Click to collapse
Keep it simple. If a change in userinit.sh breaks your system, reboot to recovery and edit it and reboot again.
TheNewGuy said:
I had an Idea for a script that would run at bootup, and if a certain variable had a "value" of NOT 1.
then the script would change the CHMOD of a userinit.sh located in the sd-ext from 050 or 777 to 750 then it would change the variable "value" to 0 were it would stay untill another script that runs at shut down or reboot setts the variable to 1 and changes CHMOD back to 050 or 777 so that the userinit.sh is not run.
That way if a change is made during operating the phone that causes the phone to crash with out shutting down properly the script runs which causes the userinit.sh to run and "resets" userinit.sh values to a "default". Otherwise if shut down properly nothing happens.
This could be expanded on to include repairing the EXT or clearing some special cache or other stuff I am unfamiliar with but that you might want to run after a crash.(like logcat?)
any way what do you think? any promise?
Click to expand...
Click to collapse
most rom devs/tweakers launch userinit.sh by calling it with a sh
e.g.
/system/bin/sh /system/sd/userinit.sh
so it will still run !! ( as init doesn't care about permissions, it is god )
don't believe me?
Code:
echo "echo I ran" > /data/test.sh
chmod 000 /data/test.sh
sh /data/test.sh
Keep it simple. If a change in userinit.sh breaks your system, reboot to recovery and edit it and reboot again.
Click to expand...
Click to collapse
Yea thats the easy way!...
(Seriously I'm not that good at Linux Command Line code,wording,but i'm getting there.)
I think, for overclocking purposes anyway, making the userinit.sh unrunnable would make the phone break immediately, as I think it would go to the highest available frequency. However, I like the idea, though I'm not sure how to run scripts on shutdown. I think for overclocking, it would check if the shutdown was clean on startup, and if not change the applicable line to the next lowest number, which it would get either from a seperate file or maybe it could be stuffed in the script itself. (Just my somewhat uneducated thoughts)
Reply With Quote
Click to expand...
Click to collapse
And I know that most roms now have a script called something like in /system/etc/init.d/20userinit that runs at startup and checks to see if a userinit.sh is present in sd-ext,if so it runs it.Also I noticed that the script can be there but if it is CHMOD to 777 it wont run. This is the "Reset script" Set to restet to something you like and run other tasks to help Fix/Diagnose probs.
The OC changes would be made from a different script such as 86supersettings
Or a userinit located in system/sd maybe ?
The thing is making sure one is read before the other.
Any way I probably will just learn the language better and do it from recovery console.
Thanks again
TheNewGuy said:
Yea thats the easy way!...
(Seriously I'm not that good at Linux Command Line code,wording,but i'm getting there.)
And I know that most roms now have a script called something like in /system/etc/init.d/20userinit that runs at startup and checks to see if a userinit.sh is present in sd-ext,if so it runs it.Also I noticed that the script can be there but if it is CHMOD to 777 it wont run. This is the "Reset script" Set to restet to something you like and run other tasks to help Fix/Diagnose probs.
The OC changes would be made from a different script such as 86supersettings
Or a userinit located in system/sd maybe ?
The thing is making sure one is read before the other.
Any way I probably will just learn the language better and do it from recovery console.
Thanks again
Click to expand...
Click to collapse
chmod 777 makes it rw and executable by everyone!!!!!!!!
have a look here
http://www.comptechdoc.org/os/linux/usersguide/linux_ugfilesp.html
but as I mentioned above, init ( the initial progam runs as root and doesn't care about permissions, ( it wouldn't be very good at doing initialising the system if it had to seek permission )
Yea your right. Well I said I wasn't that good at this linux stuff! Now I Proved it.
Any way as you can see this is more of a request..... I still think it's a good Idea.
Thanks for your help FireRat.
Keep it simple. If a change in userinit.sh breaks your system, reboot to recovery and edit it and reboot again.
Click to expand...
Click to collapse
I understand how I could manualy Replace the modified script with a default one that was on my sdcard from within recovery after a faild OC change...but..
Are you saying I could actualy modify the original script from recover? Do you have any info on how? A link?
TheNewGuy said:
I understand how I could manualy Replace the modified script with a default one that was on my sdcard from within recovery after a faild OC change...but..
Are you saying I could actualy modify the original script from recover? Do you have any info on how? A link?
Click to expand...
Click to collapse
If you have RA-Recovery, adb works, so you can pull/push the userinit.sh script. You can also enter the terminal and use vi to edit it from recovery. You may have to mount the ext partition first, but that's pretty easy. "mount /system/sd" will do it, if /system/sd doesn't exist, "mkdir /system/sd".
Ok, Thanks that makes sense. I'm still learning adb though. And I tried vi once before with no luck. But now I know what to learn about.
Thanks a lot I appreciate it.
TheNewGuy said:
Ok, Thanks that makes sense. I'm still learning adb though. And I tried vi once before with no luck. But now I know what to learn about.
Thanks a lot I appreciate it.
Click to expand...
Click to collapse
ok, this would do what you want
/system/bin/shutdown
bold is new
Code:
#!/system/bin/sh
stop;
stop dhcpcd;
sleep 1;
[B]echo "1" > /data/cleanshutdown[/B]
for i in `cat /proc/mounts | cut -f 2 -d " "`;
do
busybox mount -o remount,ro $i 2>&1 > /dev/null;
done
sync;
if [ "$1" = "-r" ];
then
toolbox reboot -f;
else
toolbox reboot -fp;
fi
your script
Code:
#!/system/bin/sh
if [ "`cat /data/cleanshutdown`" != "1" ];
then
echo "shutdown was not clean"
[B]your tweaks[/B]
else
echo "shutdown was clean"
[B]your tweaks[/B]
fi
echo "0" > /data/cleanshutdown
I'm not sure you need it,
this is for education value, if you want to play ^^^ is where to start
Thank You!
That is perfect
I need to add all of this to the startup script right?
if [ "`cat /data/cleanshutdown`" != "1" ];
then
echo "shutdown was not clean"
your tweaks
else
echo "shutdown was clean"
your tweaks
fi
echo "0" > /data/cleanshutdown
Click to expand...
Click to collapse
I am going to use the beta boot up script from ZKX called 86Supersettings, but I could use a userinit/user.conf like most do. Correct?
TheNewGuy said:
Thank You!
That is perfect
I need to add all of this to the startup script right?
I am going to use the beta boot up script from ZKX called 86Supersettings, but I could use a userinit/user.conf like most do. Correct?
Click to expand...
Click to collapse
well, a .conf file should be just that
a file with configurations , not an executable script
well, a .conf file should be just that
a file with configurations , not an executable script
Click to expand...
Click to collapse
OK. I guess I meant both together. I would use the user.conf to make tweaks. Then have to modify the userinit.sh with the part you made. Something like.
#!/system/bin/sh--LEAVE THIS OUT. ITS ALL READY AT THE BEGINNING
if [ "`cat /data/cleanshutdown`" != "1" ];
then
echo "shutdown was not clean"
Dont run user.conf
and set cpu or other stuff to "default"
else
echo "shutdown was clean"
Run user.conf for tweaked settings
fi
echo "0" > /data/cleanshutdown
Click to expand...
Click to collapse
If I'm way off then I guess I need to re-read the Userinit thread.
TheNewGuy said:
OK. I guess I meant both together. I would use the user.conf to make tweaks. Then have to modify the userinit.sh with the part you made. Something like.
If I'm way off then I guess I need to re-read the Userinit thread.
Click to expand...
Click to collapse
well, in practise it doesn't matter
the file extension is only for use humans, if I'm looking in a directory and I see .conf I expect it to be a configuration file, I see .sh, its a shell script, .py python, pl perl .......
I see. Well Thanks again for your help. Your script does work. I tried it. crash on purpose.
I still have a lot to learn.
Folks;
1) If you're OC'ing via SetCPU, remember that this doesn't change the recovery kernel, and you can uninstall SetCPU from Recovery. From there, all you need is a "safe" userinit.sh.
3) If you're OC'ing via userinit.sh -- same deal. Your phone crashes on you and you just edit it to a safe config from recovery.
Tweak away.
This is what I ended up with
Thanks to
XxKolohexX
FireRat
Licknuts
Code:
#!/system/bin/sh
#
echo 255 >/sys/class/leds/blue/brightness;
echo "+++ Now entering the speedy madness of Z.X.D.!"
echo "----- let's clear that Cache first."
echo "----- Too much DBs make System go sloow..."
echo "----- Also be shure to check out CacheMate"
echo "----- It's in the Market. (Made by Android AppCritic)."
echo "----- It's way more powerfull than this script!"
echo "----- (Times 10 or 100... Clears everything :P)"
echo "----- And this script already took hours to build..."
echo "----- domenukk - 2010."
find /data/data -name app_admob_cache | while read line; do du -s $line/* | cut -f1; rm -Rf $line/*; done;
find /data/data -name cache | while read line; do du -s $line/* | cut -f1; rm -Rf $line/*; done;
find /data/data -name google_analytics.db | while read line; do du -s $line | cut -f1; rm -Rf $line; done;
find /data/data -name webviewCache.db | while read line; do du -s $line | cut -f1; rm -Rf $line; done;
rm -rf /data/data/com.facebook.katana/files
rm -rf /data/data/com.google.android.apps.genie.geniewidget/app_news_image_cache
rm -rf /data/data/com.code.i.music/app_admob_cache
rm -rf /data/data/fm.last.android/databases/google_analytics.db
echo "--- All the Cache has been cleared."
sleep 10
echo 0 >/sys/class/leds/blue/brightness;
####determin if shutdown was clean####
if [ "`cat /data/cleanshutdown`" != "1" ];
then
####RUN CLEAN SHUTDOWN SCRIPT####
echo 255 >/sys/class/leds/green/brightness;
####Turbo Script by [email protected]####
####Prioritize everyting ####
echo "----- Enabling Turbo."
dirty_writeback_centisecs=500
/system/bin/prior &
#
# Linux-SWAP
#
if [ -e /dev/block/mmcblk0p3 ];
then
if [ -n /dev/block/mmcblk0p3 ];
then
echo "+++ Set Linux Swap"
busybox mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then
echo "+++ Set Swapiness"
echo 100 > /proc/sys/vm/swappiness;
echo "+++ Activate Swap"
busybox swapon /dev/block/mmcblk0p3;
fi;
fi;
####Better CPU Settings...####
echo "----- Speed up the CPU"
echo 633600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo 122800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 95 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold;
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load;
echo 100000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias;
echo 0 >/sys/class/leds/green/brightness;
echo 255 >/sys/class/leds/blue/brightness;
else
####RUN DIRTY SHUTDOWN SCRIPT####
echo 255 >/sys/class/leds/red/brightness;
####Turbo Script by [email protected]####
####Prioritize everyting ####
echo "----- Enabling Turbo."
dirty_writeback_centisecs=500
/system/bin/prior &
#
# Linux-SWAP
#
if [ -e /dev/block/mmcblk0p3 ];
then
if [ -n /dev/block/mmcblk0p3 ];
then
echo "+++ Set Linux Swap"
busybox mkswap /dev/block/mmcblk0p3;
fi;
if [ -e /dev/block/mmcblk0p3 ];
then
echo "+++ Set Swapiness"
echo 83 > /proc/sys/vm/swappiness;
echo "+++ Activate Swap"
busybox swapon /dev/block/mmcblk0p3;
fi;
fi;
####Better CPU Settings...####
echo "----- Speed up the CPU"
echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq;
echo 122800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq;
echo 45 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold;
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load;
echo 2000000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
echo 200 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/powersave_bias;
fi;
echo "0" > /data/cleanshutdown
echo "+++ continue on lame stock SuperD boot "
##Clearing Davlik-Cache##
for dc in dalvik-cache;
do
umount /cache/$dc;
rm -fr /cache/$dc;
mkdir /cache/$dc;
chown 1000:1000 /cache/$dc;
chmod 771 /cache/$dc;
mount -o bind /data/$dc /cache/$dc;
done;
Named 86supersettings so it runs after userinit.sh if one exists.
I put some Led indicators in so you can tell if it ran right at boot up. (about all I did besides copy and paste) Thinking about adding some other stuff like repair ext, or some kind of log to help me see what happed... any suggestions.
OK, here's another Idea for another safety feature...
I would like to "hard code" a temp fail-safe in to the code. I would like to get rid of SetCPU and when OC-ing it's nice to have a temp failsafe.SHUTDOWN!LOL
Any way I guess I would just add a few lines to some existing script in my phone?.... Any suggestions.
Thanks for your time.

[KERNEL MOD] keytimer user setting script for mkasick Epic 4G keyboard patch

After having shared this on the #epic channel, I decided to share it here... This is for kernel devs who've incorporated mkasick's sysfs keyboard patch, located here.
This kernel mod and accompanying script are meant to be used in conjunction with mkasick's epic keyboard patch, and will perform the following:
1) Allow the kernel developer to easily choose the initial timer_delay value for the patch
2) Allow the end user to adjust the setting, and have it persist past boot
3) Checks user input for the setting, and not allow settings to occur that will make the keyboard unresponsive, or unusable
Files:
keytimer_initscript.sh
keytimer
Instructions for kernel devs:
1) Take the script inside keytimer_initscript.sh, and add it to your custom initscript called from init.rc
Note: place after the init.d section, or theimpaler747 script will overwrite the keytimer script.
2) Place the keytimer script inside your initramfs /sbin
Instructions for users:
1) Have a kernel with this mod inside, like mine:
DRockstar.Clean.Kernel.EC05.v1.02.zip
Note: Other kernel devs have this now, so it should come to your favorite kernel soon!
Also: If your current kernel has the mkasick sysfs keyboard patch, but not my kernel mod, you can take the keytimer script, and place it /system/xbin, and chmod 755 /system/xbin/keytimer. Without my kernel mod, the setting won't persist through a reboot, but it will give you an easy way to change the setting.
2) Open Connectbot or Android Terminal, and type su
3) type command: keytimer
it will show usage and the current value, the default is 7.
example use to change to theimpaler747 value of 5:
keytimer 5
Accepted values are 1 through 16.
The change will be immediate, and will persist after reboot.
Hope you all like this one, enjoy it!
CODE:
keytimer_initscript.sh :
Code:
#!/system/bin/sh
# keytimer script to be called by init.rc, written by DRockstar for the Epic 4G
# assumes busybox is already installed
# kernel developers may just copy script to existing custom init script
# can be adjusted by accompanied keytimer script in /sbin
# keyboard patch sysfs call 7 for snappy keyboard performance
if [ ! -f "/data/local/timer_delay" ]; then
echo 7 > /data/local/timer_delay
fi
cat /data/local/timer_delay > /sys/devices/platform/s3c-keypad/timer_delay
keytimer :
Code:
#!/system/bin/sh
# keytimer shortcut script by DRockstar
usage()
{
echo "keytimer: shortcut for Epic 4G keyboard response time"
echo "usage: keytimer , 7 is default, 1 - 16 accepted"
}
error()
{
usage
echo "error: $1"
exit
}
mount -t rootfs -o remount,rw / /
if [ "$1" = "" ]; then
timer="`cat /sys/devices/platform/s3c-keypad/timer_delay`"
usage
echo "current keytimer value is $timer"
exit
fi
case $1 in *[!0-9]*)
error "input is not a positive number"
esac
if [ $1 -gt 16 ]; then
error "only numbers 1 - 16 are accepted"
fi
echo $1 > /sys/devices/platform/s3c-keypad/timer_delay
echo $1 > /data/local/timer_delay
mount -t rootfs -o remount,ro / /
yeeeah
Good job DRockstar ....This is saweet
good **** DRockstar....i already have it commited to my source for the next version
keep up the good work!
OK, links fixed, with code also posted.
Posted instructions for those who just want to use keytimer script, in case your favorite kernel doesn't have the keytimer mod installed yet, but has the keyboard patch installed.
Thanks to Rodderik for server space, after fossnet server got toasted.
Peace!
I'm pleased that folks are making good use of the sysfs patch, and making the user-side keytimer configuration much more approachable and useful. Thanks for doing this, it means a lot.
DRockstar said:
After having shared this on the #epic channel, I decided to share it here... This is for kernel devs who've incorporated mkasick's sysfs keyboard patch, located here.
This kernel mod and accompanying script are meant to be used in conjunction with mkasick's epic keyboard patch, and will perform the following:
1) Allow the kernel developer to easily choose the initial timer_delay value for the patch
2) Allow the end user to adjust the setting, and have it persist past boot
3) Checks user input for the setting, and not allow settings to occur that will make the keyboard unresponsive, or unusable
Files:
keytimer_initscript.sh
keytimer
Instructions for kernel devs:
1) Take the script inside keytimer_initscript.sh, and add it to your custom initscript called from init.rc
Note: place after the init.d section, or theimpaler747 script will overwrite the keytimer script.
2) Place the keytimer script inside your initramfs /sbin
Instructions for users:
1) Have a kernel with this mod inside, like mine:
DRockstar.Clean.Kernel.EC05.v1.01.zip
Note: Other kernel devs have this now, so it should come to your favorite kernel soon!
Also: If your current kernel has the mkasick sysfs keyboard patch, but not my kernel mod, you can take the keytimer script, and place it /system/xbin, and chmod 755 /system/xbin/keytimer. Without my kernel mod, the setting won't persist through a reboot, but it will give you an easy way to change the setting.
2) Open Connectbot or Android Terminal, and type su <enter>
3) type command: keytimer
it will show usage and the current value, the default is 7.
example use to change to theimpaler747 value of 5:
keytimer 5
Accepted values are 1 through 16.
The change will be immediate, and will persist after reboot.
Hope you all like this one, enjoy it!
CODE:
keytimer_initscript.sh :
Code:
#!/system/bin/sh
# keytimer script to be called by init.rc, written by DRockstar for the Epic 4G
# assumes busybox is already installed
# kernel developers may just copy script to existing custom init script
# can be adjusted by accompanied keytimer script in /sbin
# keyboard patch sysfs call 7 for snappy keyboard performance
if [ ! -f "/data/local/timer_delay" ]; then
echo 7 > /data/local/timer_delay
fi
cat /data/local/timer_delay > /sys/devices/platform/s3c-keypad/timer_delay
keytimer :
Code:
#!/system/bin/sh
# keytimer shortcut script by DRockstar
usage()
{
echo "keytimer: shortcut for Epic 4G keyboard response time"
echo "usage: keytimer <number>, 7 is default, 1 - 16 accepted"
}
error()
{
usage
echo "error: $1"
exit
}
mount -t rootfs -o remount,rw / /
if [ "$1" = "" ]; then
timer="`cat /sys/devices/platform/s3c-keypad/timer_delay`"
usage
echo "current keytimer value is $timer"
exit
fi
case $1 in *[!0-9]*)
error "input is not a positive number"
esac
if [ $1 -gt 16 ]; then
error "only numbers 1 - 16 are accepted"
fi
echo $1 > /sys/devices/platform/s3c-keypad/timer_delay
echo $1 > /data/local/timer_delay
mount -t rootfs -o remount,ro / /
Click to expand...
Click to collapse
Sorry for asking this noob question but I just want to clarify. This is the stock Kernel with mkasicks fix to allow for the keyboard tweaks correct?
Nothing else is different about the kernel? If so, this is exactly what I was looking for.
Updated the kernel download to v1.02... which fixed some apps like metamorph not working with the location I set for busybox.
I need to make a post for the kernel now... sources are now posted at github.com/DRockstar.
to answer the previous question, yes, this kernel is intended to be a simple rooted kernel, based off samsung stock, with only simple mods ... its feature are:
* Root and busybox with minimal system mods
* designed to allow OTA update after flashing back the stock kernel
* mkasick sysfs keyboard patch, with my keytimer script
* voodoo sound 7 by supercurio, controlled by voodoo control app in android market
* additonal custom scripts in /sbin for cleaning root, busybox, and flash kernels and recoveries
This kernel was built to replace the traditional one click root method for my all in one root and recovery script.
Sent from my SPH-D700 using Tapatalk

[TWEAKS][SCRIPTS] Collection of 'em all - build.prop; init.d; etc.

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,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.
Wow... Neojn, will tis work on lg optimus one? I know u used to have a optimus one...
Sent from LGE Secret phone using tapatalk app...
Most of them will, yeah.
Noejn said:
Most of them will, yeah.
Click to expand...
Click to collapse
Will try, thanks...
Sent from LGE Secret phone using tapatalk app...
my word thats a MASSIVE list lol thanks, some interesting tweaks there
Sent from my HTC Desire using XDA App
If I have time in the future I can create a script that applies them all.
(with a check of already existing tweaks / compatibility with the device, etc)
If some script fail it may cause bootloop? And can use for all device?
thanks for answer.
Deaw^^ said:
If some script fail it may cause bootloop? And can use for all device?
thanks for answer.
Click to expand...
Click to collapse
None of them should cause bootloop, at least if you follow everything I wrote.
Yes, they work on most devices. Just read what it needs.
how do i test this one because i cant remember what i rename the bold parts to lol
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
thanks in advanced
Eoghan
I hav another question..What is "Flags"?
- 18. Miscellaneous flags
- 7. Flags blocks as non-rotational and increases cache size
thanks for answer
eoghan2t7 said:
how do i test this one because i cant remember what i rename the bold parts to lol
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
thanks in advanced
Eoghan
Click to expand...
Click to collapse
It's like it says, you need the /dev/block/ path to system, data and cache partitions.
And they need to be formatted to ext4 of course.
This varies from device to device, whether it is emmc or mtd.
Running the command "mount" should give you the answer for both.
Deaw^^ said:
I hav another question..What is "Flags"?
- 18. Miscellaneous flags
- 7. Flags blocks as non-rotational and increases cache size
thanks for answer
Click to expand...
Click to collapse
As a noun it's like a property, as a verb is like defining.
Either way, I think I may have some time during next week to make a script to deploy these tweaks on most ROMs.
thanks ya knzo.
thanks . If you have time it would be awesome if you make a zip that can be flashed to CWM
I need a little help creating the script files. I dont need all of these tweaks. So, I need instructions on how to create the file with only what I need.
Can I create just one script file for all the tweaks or do they have to be seperate?
Sent from my Nexus One using Tapatalk
dgart08 said:
I need a little help creating the script files. I dont need all of these tweaks. So, I need instructions on how to create the file with only what I need.
Can I create just one script file for all the tweaks or do they have to be seperate?
Sent from my Nexus One using Tapatalk
Click to expand...
Click to collapse
Pm the tweaks you want and i can make the script for you
Sent from my GT540 using XDA Premium App
eoghan2t7 said:
Pm the tweaks you want and i can make the script for you
Sent from my GT540 using XDA Premium App
Click to expand...
Click to collapse
Thanks! I will PM you shortly...
Question... will these tweaks interfere w/ Juwe's Ram Script? Can they replace it?
dgart08 said:
Thanks! I will PM you shortly...
Question... will these tweaks interfere w/ Juwe's Ram Script? Can they replace it?
Click to expand...
Click to collapse
I will make it so it doesnt interfere with them
Sent from my GT540 using XDA Premium App
eoghan2t7 said:
I will make it so it doesnt interfere with them
Sent from my GT540 using XDA Premium App
Click to expand...
Click to collapse
...and maybe neither with supercharger/kickasskernel/3gturbocharger?
eoghan2t7 said:
I will make it so it doesnt interfere with them
Sent from my GT540 using XDA Premium App
Click to expand...
Click to collapse
PM sent. Thanks!
post removed

[MOD][SCRIPTS] Boot Script Utilities

About this thread
In this thread i will post my work on a init.d like support for stock rom which i call "Boot Script Utilities".
This work was developed for personal use and for my personal purposes.
If you do not like to use it please do not.
Click to expand...
Click to collapse
Just to be clear
I am not responsible for whatever happens to your phone.
Some Info
What is init.d?
Init.d is a folder located in "/system/etc/init.d/", but not all roms have his folder (stock rom don't have the folder).
What is special with this folder is that any script inside this folder will run on phone boot.
Why to run scripts on boot?
On boot many system variables are initiated before any application run, so you can make automatic tweaks on every boot.
ex. Swap external storage to internal.
Click to expand...
Click to collapse
Boot Script Utilities on stock Samsung Galaxy Core
This was developed for personal use. This is not the original init.d support.
I developed a similar support in order to implement some more features.
This do not means that this is a better way to roon scripts on boot.
What do i need?
A rooted Samsung Galaxy Core (I used I8260, for how to root search the forum)
A good root explorer (well Root Explorer worked)
A recovery with backup/restore support (to backup your rom in case you soft brick your phone)
What we will do?
We will edit a system file to run a script i wrote. This script will run all scripts (or not all read more below) inside /system/etc/init.d/ folder.
Step 0 - Backup your rom
Boot into your recovery and make a backup.
Step 1 - init.d folder
Create a directory on "/system/etc/" and name it "init.d".
So now directory "/system/etc/init.d/" exist.
Step 2 - Boot Script Utilities main script
Copy "init.bsu.boot.sh" file (link on the end of the post) in "/system/etc/".
So now file "/system/etc/init.bsu.boot.sh" exist.
Step 3 - Edit system file, run Boot Script Utilities
The system file we will edit is "/system/etc/init.qcom.post_boot.sh"
Insert this code on the bottom of the script
Code:
# Run Boot Script Utilities
# For galaxy core stock rom
# by DarkThanos
/system/bin/sh /system/etc/init.bsu.boot.sh > /data/tmp/init.bsu.log 2>&1 &
Step 4 - Ready
Insert your scripts inside "/system/etc/init.d/" and whey will run on boot.
Click to expand...
Click to collapse
Boot Script Utilities features
Disable all scripts
If file "/system/etc/init.d/disabled" exist no script will run.
Disable scripts
Any script named like "*.disabled" or "*.disabled.sh" will not run.
ex. "/system/etc/init.d/testscript.disabled.sh" will not run.
Run scripts asynchronous
Any script named like "*.async" or "*.async.sh" will run asynchronous.
ex. "/system/etc/init.d/testscript.async.sh" will run asynchronous.
Scripts run order
Scripts run in name order.
Log on every boot
All scripts results-errors output (stdout/stderr) will be printed on "/data/tmp/init.bsu.log"
Click to expand...
Click to collapse
[Change log]
1.0 Version
Script Public for first time.
init.d like support
Click to expand...
Click to collapse
[Dev Doc]
It does not really matters from where the script is called.
The script first checks if boot is completed, if not it sleeps for 2 seconds.
(so you need to call the script after boot, or before but asynchronous)
Code:
# Get boot complete state
isBootCompleted=`getprop dev.bootcomplete`
# Wait For boot complete event
# Probably useless unless script called from other file
while [ "$isBootCompleted" -ne '1' ]
do
# Wait and check again
sleep 2
# Check if boot completed
isBootCompleted=`getprop dev.bootcomplete`
done
The next step is to check if "/system/etc/init.d/disabled" file exist.
If it do not exist, it will run all not disabled scripts inside "/system/etc/init.d/".
It will check every file inside and analyze its name so it knows if the script is disabled or asynchronous.
Code:
# Create a init.d Support
# Implement /system/etc/init.d/ folder
# Check if init.d is disabled
# If /system/etc/init.d/disabled file exist, then init.d is disabled
if [[ ! -f /system/etc/init.d/disabled ]]
then
echo "[$manager_name] Initiating init.d scripts"
# Run every script on init.d folder
for scriptfile in /system/etc/init.d/*
do
if test -f "$scriptfile"
then
# Get script name
scriptname=$(basename $scriptfile)
# Check if script is disabled
# ex1 : 'testscript.sh.disabled' is disabled
# ex1 : 'testscript.disabled.sh' is disabled
echo "$scriptname" | grep -q -E '\.(disabled|disable\.sh)$'
if [ $? -eq 0 ]
then
echo "[$manager_name] Script $scriptname is disabled"
else
# check if script is asynchronous
# ex1 : 'testscript.sh.async' is asynchronous
# ex2 : 'testscript.async.sh' is asynchronous
echo "$scriptname" | grep -q -E '\.(async|async\.sh)$'
if [ $? -eq 0 ]
then
echo "[$manager_name] Run Script $scriptname asynchronous"
/system/bin/sh "$scriptfile" | script_log &
else
echo "[$manager_name] Run Script $scriptname"
/system/bin/sh "$scriptfile" | script_log
fi
fi
fi
done
else
echo '[$manager_name] init.d is disabled'
fi
That's all.
Please suggest any fixes or any improvements by messaging me.
Thanks for your time.
Click to expand...
Click to collapse
All Scripts
Links to all scripts posts
Optimize apks using ZipAlign
Optimize SQlite databases of apps
Swap External SD with Internal SD
Click to expand...
Click to collapse
[Script][Swap External SD with Internal SD][v1.0]
Name : Swap External SD with Internal SD
Version : v1.0
Author : DarkThanos
Thanks to: codlab
Click to expand...
Click to collapse
This script wait for your external sd card to be mounted and swap it with internal if it is bigger.
One minute after boot it will stop waiting.
(Fastest swap method I found)
I am not responsible for whatever happens to your phone.
Tested on my Samsung Galaxy Core (I8260)
[Change log]
1.0 Version
Script Public for first time.
Swap internal sd with external (if external>internal)
Click to expand...
Click to collapse
[Dev Doc]
The script first creates 2 directories to mount external sd and internal sd,
so that it can distinguish them from each other ("/data/sd_cards/internal/", "/data/sd_cards/external/").
Code:
# Mount root rw
mount -o remount,rw /
# Create directory to mount sd cards
# Make directory to save cards
mkdir -p /data/sd_cards
# Make directory to save internal
mkdir -p /data/sd_cards/internal
# Make directory to save external
mkdir -p /data/sd_cards/external
In the next step, the script waits for an external sd to be mounted.
This wait time is the reason why the script is better to be asynchronous.
The script checks every 5 seconds for an external sd, but after 1 minute (12 tries) it stops.
Code:
# Wait for external sd card to be mounted
# Max wait time is 1 minute
maxWaitTime=60
# While external Sd Card has 0 Capacity
while [[ $(du -s /storage/extSdCard | awk '{print $1}') == "0" && $maxWaitTime>0 ]]
do
# Check again in 5 seconds
sleep 5
# Count down max wait time
maxWaitTime=maxWaitTime-5
done
As soon as an external sd is mounted, the script mounts the external sd on "/data/sd_cards/external/"
and the internal on "/data/sd_cards/internal/".
Code:
# Save mount points on folders
# Mount bind internal SD in folder /data/sd_cards/internal
mount -o bind /storage/sdcard0 /data/sd_cards/internal
# Mount bind external SD in folder /data/sd_cards/external
mount -t vfat -o rw,nosuid,nodev,noexec,relatime,user_id=1023,group_id=1023,default_permissions,allow_other /dev/block/vold/179:33 /data/sd_cards/external
So now the real internal sd can be found in the directory "/data/sd_cards/internal/"
and the real external sd can be found in the directory "/data/sd_cards/external/".
The reason we do this is to be able to make a script swap them again.
Then it checks the size of each, so that it knows if it ia worthing of swapping them.
Code:
# Get sd cards sizes
internalSdSize=$(du -s /storage/sdcard0 | awk '{print $1}')
externalSdSize=$(du -s /storage/extSdCard | awk '{print $1}')
If external sd is bigger, then on "/storage/sdcard0/" we mount "/data/sd_cards/external/"
and on "/storage/extSdCard/" we mount "/data/sd_cards/internal/".
Code:
# Swap sd cards
# If external sd card is bigger than internal swap
if [ $externalSdSize -gt $internalSdSize ]
then
# Swap
mount -o bind /data/sd_cards/internal /storage/extSdCard
mount -o bind /data/sd_cards/external /storage/sdcard0
fi
Click to expand...
Click to collapse
[Script][Optimize SQlite databases of apps][v1.0]
Name : Optimize SQlite databases of apps
Version : v1.0
Rewritten by : DarkThanos
Based on work of: pikachu01
Click to expand...
Click to collapse
This script optimize applications' database using sqlite3 (Vacuum/Reindex) every 5 boots or 5 days.
On any other boot it optimize only databases of phone, contacts, mms and settings .
Before use make a folder "libs" inside "/system/etc/init.d/",
insert the "sqlite3" file inside and give it execute permissions (the file is given with the script)
Bugs: (Its safe for use, its a warning not an error)
Contacts database is always locked, so can't be optimized.
I am not responsible for whatever happens to your phone.
Tested on my Samsung Galaxy Core (I8260)
[Change log]
1.0 Version
Script Public for first time.
SQlite databases on "/data/" optimize every 5 boots or 5 days.
SQlite databases of phone, contacts, mms and settings optimize on every boot.
Click to expand...
Click to collapse
[Dev Doc]
Script first initiate some variables
(path to Sqlite lib, path to a folder to save scripts data, minimum time between optimizes)
Code:
# Some variables
# SQLite path
sql_lib="/system/etc/init.d/libs/sqlite3";
# Data folder path
data_folder="/data/boot_scripts_data/";
# Data counter file name
data_file_counter="sql_optimize_counter";
# Data last run file name
data_file_lastrun="sql_optimize_lastrun";
# Max time between optimizes (in sec)
# 5 days = $(expr 5 \* 24 \* 60 \* 60 )
max_time_dif=432000
Check how many boots passed since last optimize
and when the last optimize was by reading scripts data.
Code:
# Create data folder if not exist
mkdir -p "$data_folder"
# Get data from files
# Run Counter
if [[ ! -f "$data_folder$data_file_counter" ]]
then
# File do not exist
touch "$data_folder$data_file_counter"
echo "0" > "$data_folder$data_file_counter"
runCount="0"
else
runCount=$(cat $data_folder$data_file_counter)
fi
# Last run date
if [[ ! -f "$data_folder$data_file_lastrun" ]]
then
# File do not exist
touch "$data_folder$data_file_lastrun"
echo "0" > "$data_folder$data_file_lastrun"
lastRun=0
else
lastRun=$(cat $data_folder$data_file_lastrun)
fi
If boots passed since last optimize equals with 5 or last optimized more than 5 days before,
then make a full database optimization.
Code:
# Check if its time for optimize
if [ $(( $(date +%s) - $lastRun )) -ge $max_time_dif -o $runCount -ge 5 ]; then
echo "Full mode optimize"
# Save data
echo "0" > "$data_folder$data_file_counter"
echo $(date +%s) > "$data_folder$data_file_lastrun"
# Optimize /data/
optimize_folder "/data/"
echo "All applications' databases were optimized"
Else make a light optimize.
(only phone, contacts, mms and settings)
Code:
else
echo "Light mode optimize"
# Save data
echo $((runCount+1)) > "$data_folder$data_file_counter"
# Only for Galaxy Core
# Count databases optimized
count=0
# phone optimize
optimize_folder "/data/data/com.android.phone/databases/"
# contacts optimize
optimize_folder "/data/data/com.android.providers.contacts/databases/"
# mms optimize
optimize_folder "/data/data/com.android.mms/databases/"
# email optimize
optimize_folder "/data/data/com.android.mms/databases/"
# settings optimize
optimize_folder "/data/data/com.android.settings/databases/"
echo "Important databases were optimized"
fi;
Optimize functions
Code:
# Some functions
# Optimize db
optimize_db(){
# Vacuum and then reindex
$sql_lib $1 'VACUUM;';
$sql_lib $1 'REINDEX;';
#echo $(basename $1)" was optimized."
}
# Optimize every db on folder
optimize_folder(){
local path=$1
count_result=0;
find $path -type f -iname "*.db" -print0 | while IFS= read -r -d $'\0' database; do
optimize_db $database
done
#echo "Databases inside $path were optimized."
}
Use the sqlite binary to VACUUM and REINDEX the given database.
Click to expand...
Click to collapse
[Script][Optimize apks using ZipAlign][v1.0]
Name : Optimize apks using ZipAlign
Version : v1.0
Author : Wes Garner
Suggestions : oknowton
Edited by : DarkThanos
Click to expand...
Click to collapse
This script zipalign applications' apk (only the apks that are not already zipaligned) on every boot.
First boot may take a while.
Before use make a folder "libs" inside "/system/etc/init.d/",
insert the "zipalign" file inside and give it execute permissions (the file is given with the script)
Bugs:(Not for use, more testing needed)
Some apps return an error after zipaligned, and need to be reinstalled.
(Found fix. Zipaligned apk do not holds read rights after copy. Command "cp -p" do not hold permissions. Temp fix "chmod 644". [I need help with that])
A download will be posted when it is stable.
I am not responsible for whatever happens to your phone.
Tested on my Samsung Galaxy Core (I8260)
Need to be tested for stable use.
[Change log]
1.0 Version
Script Public for first time.
Optimize apks using ZipAlign (on every boot check apps).
Click to expand...
Click to collapse
[Dev Doc]
Script code
Code:
#!/system/bin/sh
# Optimize apks using ZipAlign
#
# Work of:
# Wes Garner (Script code)
# oknowton (Suggestions)
#
# Modifications by:
# DarkThanos
#
# For the xda Galaxy Core users
#
# Some variables
# SQLite path
zipalign_lib="/system/etc/init.d/libs/zipalign";
# Data folder path
data_folder="/data/boot_scripts_data/";
# Data database file name
apk_cache="zipalign_apk_cache";
# Counters
count_apps=0
count_zipaligned_apps=0
count_zipalign_failed=0
# Report ZipAlign start
echo "ZipAlign Optimization Start";
# For every apk in /data/app/
for apk in /data/app/*.apk ; do
# Check if this apk is zipaligned
$zipalign_lib -c 4 $apk;
# Get results
not_zipaligned=$?;
# Count app
count_apps=$((count_apps+1))
# If not, align it
if [ $not_zipaligned -eq 1 ]; then
# ZipAlign app
result=`$zipalign_lib -f 4 $apk $data_folder$apk_cache`
if [ -e $data_folder$apk_cache -a ${#result} -eq 0 ]; then
# Successful zipalign
/system/xbin/busybox cp -p $data_folder$apk_cache $apk;
chmod 644 $apk;
rm $data_folder$apk_cache;
count_zipaligned_apps=$((count_zipaligned_apps+1))
else
echo "[ERROR] $result"
# Failed zipalign
count_zipalign_failed=$((count_zipalign_failed+1))
#echo ZipAligning $(basename $apk) Failed | tee -a $LOG_FILE;
fi;
fi;
done;
# Report results
echo "Apks ZipAligned $count_zipaligned_apps/$count_apps ($count_zipalign_failed failed)";
# Exit
exit 0
I need help with the code:
Code:
/system/xbin/busybox cp -p $data_folder$apk_cache $apk;
chmod 644 $apk;
rm $data_folder$apk_cache;
I try to make all my script work with no busybox. "cp" command do not exist in android (without busybox).
Is "cat" a good alternative?
Also, should I use "chmod 644 $apk;"? "cp -p" do not work and I am pretty sure the script has root rights.
Thanks for your time.
Click to expand...
Click to collapse
I need betatester
Sent from my GT-I8262 using XDA Premium 4 mobile app
NieeLz said:
I need betatester
Click to expand...
Click to collapse
Download the "init.bsu.boot" script (from first post). Create the "/system/etc/init.d/" folder. And run the script (from your download folder) using Script Manager (do not forget to enable "su"). Then check "/data/tmp/init.bsu.log" (open as text) and see the log.
This is an easy safe test.
You can also make a test script, like:
Code:
#!/system/bin/sh
# Test Script
echo "This will be on log."
(You can read the script codes too, I have many comments.)

LEAGOO Shark 1 - Development & Support

In order to keep this thread clean, please use this one to discuss about Development, Support or Software Updates.​
ROMs:
Custom ROMs (based on Android 5.1)
AOSP-like 5.1 ROM - by GearLabs: https://mega.nz/#!lBtSBaDC!Jh1PXA_jEn8ynrISB8GeupVn-lJbHTlHtozhggb3UOg
Features:
- Clean Nexus-Like UI (get rid of the LEAGOO OS)
- Updated Google Apps (and most of them replace crappy Mediatek ones)
- Optimized for Maximum Performance
- with Root, Busybox & init.d support
What you'll lose compared to LEAGOO OS? (missing features)
- Miravision Menu
If you notice something else that is missing, just let me know.
Flashable Touchscreen Delay Fix: http://forum.xda-developers.com/attachment.php?attachmentid=3823450&d=1469457127​
Stock (Android 6.0)
160729: https://yadi.sk/d/tPz_sgnRtyqdA (Thanks @seraser for the report)
Stock (Android 5.1)
160712: https://mega.nz/#!UBFTzILY!Ympxl5aTRg1x5cAeEha12XgLHxXZ_kYPKDuYvlZUpIo
Previous Releases:
160620: https://yadi.sk/d/fp5sDnfJsvHve | Mirror
160530 (official): http://leagooftp.com.my/Shark 1/t87...10_LEAGOO_Shark_1_OS1.2_160530_release.tar.gz | Mirror
Flash Tools:
SP Flash Tool v5.1628 for Windows & Linux: https://mega.nz/#F!dYUm0TbB!SWeMLb5Wu1NbRzTPQ8-s_A
Flash Tool with Drivers provided by LEAGOO (Windows Only): http://leagooftp.com.my/Flashtool Elite Series, Shark 1/Flashtool Elite series, Shark 1.rar | Mirror
Choose the one that works better for you.
Recovery:
TWRP 3.0.2-1 - by GearLabs: https://mega.nz/#!9UsUXDJZ!b3-LhR8FfXpo9mPoN-vXxreVkMtJU0c1Y0_AGsPilvg
Previous Releases:
TWRP 3.0.0 - by @megthebest (buggy and outdated): https://mega.nz/#!0A8AlK7Y!yVXgeQksrVTe83IGQZdEY2FPC1dHmyvtcdpRmDtOPgE
Root:
SuperSU (flashable using TWRP): http://forum.xda-developers.com/apps/supersu
Extras (Root-Only):
Xposed Framework: http://forum.xda-developers.com/showthread.php?t=3034811
Useful Third-Party Apps:
Battery Life
Amplify: https://play.google.com/store/apps/details?id=com.ryansteckler.nlpunbounce&hl=en
Greenify: https://play.google.com/store/apps/details?id=com.oasisfeng.greenify&hl=en
Alberto96 said:
....... As soon as I have more time, I'll work on a CM ROM for this device.
Click to expand...
Click to collapse
Allready working on CM ROM?
I allways thought, CM is not possible for Mediatek Devices, because of Mediatek not opening Sources for its SoCs?
And also Leagoo doesnt seem to be very helpfull with CustomROMs.....
Robot12 said:
Allready working on CM ROM?
I allways thought, CM is not possible for Mediatek Devices, because of Mediatek not opening Sources for its SoCs?
And also Leagoo doesnt seem to be very helpfull with CustomROMs.....
Click to expand...
Click to collapse
Not yet, without kernel sources it will be hard.
Alberto96 said:
Not yet, without kernel sources it will be hard.
Click to expand...
Click to collapse
If I'm not wrong, you can use @bluefame CM12.1 sources for Elephone P8000, same SoC. Just need to change to our device parameters.
Btw, I dunno if the fact that Shark has 32bit Rom affects anything.
Sent from my s3 using Tapatalk
TWRP 3.0 for 160620 firmware
Hello guys,
I have flashed the full 160620 firmware as the OTA didn't work in my phone, even after exchanging TWRP with the stock recovery.
The Leagoo OTAs doesn't come as zip files so they can't be installed from TWRP either.
Now on 160620 fw I can't install TWRP 3.0.0 by @megthebest. It looks ok in SP_Flash_Tool but when I try to boot from TWRP I just get the dead Android robot on the screen and a message saying something like "No data available" or something like that.
Can it be that the partition map has changed and that the scatter file needs to be edited, or do I have something wrong in my phone?
Has anyone tried to do what I did? Flashed a full 160620 fw and tried to install TWRP 3.0.0 by @megthebest? If so, did you succeed?
---------- Post added at 08:42 AM ---------- Previous post was at 08:17 AM ----------
genesisalgor said:
If I'm not wrong, you can use @bluefame CM12.1 sources for Elephone P8000, same SoC. Just need to change to our device parameters.
Btw, I dunno if the fact that Shark has 32bit Rom affects anything.
Sent from my s3 using Tapatalk
Click to expand...
Click to collapse
The question I'd like to have an answer to is why they choose to go for a 32-bit Android 5.1, when it wouldn't have meant more work for them to go for the 64-bit version instead. There are many MT6753 devices at half the price of the Shark 1 on 64-bit Android. Could it be that there are some hardware in the Shark 1 that limits them to use 32-bit Android? The SoC is 64-bit for sure but how about bus controllers and other chips around the SoC?
If there are some 32-bit hardware in Shark 1 then the CM12.1 for Elephone P8000 won't be very useful as a starting point for a CM for Shark 1.
(Admin: this is partly a device question and maybe it should be in the other Shark 1 thread, but I answer with further questions to the quoted post about CM ROM)
The question I'd like to have an answer to is why they choose to go for a 32-bit Android 5.1, when it wouldn't have meant more work for them to go for the 64-bit version instead. There are many MT6753 devices at half the price of the Shark 1 on 64-bit Android. Could it be that there are some hardware in the Shark 1 that limits them to use 32-bit Android? The SoC is 64-bit for sure but how about bus controllers and other chips around the SoC?
If there are some 32-bit hardware in Shark 1 then the CM12.1 for Elephone P8000 won't be very useful as a starting point for a CM for Shark 1.
(Admin: this is partly a device question and maybe it should be in the other Shark 1 thread, but I answer with further questions to the quoted post about CM ROM)
Click to expand...
Click to collapse
No differences, the same MT6753 on both devices, or any other with the MT6753. What happens is, to compile/develop in 64bit its about twice of the work, storage, everything on theses socs demands more power than old MTKs.
Leagoo did this to avoid the work, and save money with the development. The SoC is able to run at 64Bit, but they put a 32bit software just to save with development, so theorically we don't have 64bit files on our Rom (I have a Jiayu S3 MT6752 it haves in example /system/libs and libs64. Leagoo and some other brands usually do this. But the processor/hardware is exact the same as P8000.
Sent from my s3 using Tapatalk
genesisalgor said:
No differences, the same MT6753 on both devices, or any other with the MT6753. What happens is, to compile/develop in 64bit its about twice of the work, storage, everything on theses socs demands more power than old MTKs.
Leagoo did this to avoid the work, and save money with the development. The SoC is able to run at 64Bit, but they put a 32bit software just to save with development, so theorically we don't have 64bit files on our Rom (I have a Jiayu S3 MT6752 it haves in example /system/libs and libs64. Leagoo and some other brands usually do this. But the processor/hardware is exact the same as P8000.
Sent from my s3 using Tapatalk
Click to expand...
Click to collapse
Unfortunately if they choose to use a 32-bit OS, then it isn't possible to run a 64-bit version due to bootloader incompatibilities.
Anyway, the new devices from LEAGOO will have a 64-bit OS. (just check my LEAGOO Z5L review, that ultra-low cost device has a 64-bit OS haha)
MacArthur67 said:
Hello guys,
I have flashed the full 160620 firmware as the OTA didn't work in my phone, even after exchanging TWRP with the stock recovery.
The Leagoo OTAs doesn't come as zip files so they can't be installed from TWRP either.
Now on 160620 fw I can't install TWRP 3.0.0 by @megthebest. It looks ok in SP_Flash_Tool but when I try to boot from TWRP I just get the dead Android robot on the screen and a message saying something like "No data available" or something like that.
Can it be that the partition map has changed and that the scatter file needs to be edited, or do I have something wrong in my phone?
Has anyone tried to do what I did? Flashed a full 160620 fw and tried to install TWRP 3.0.0 by @megthebest? If so, did you succeed?
Click to expand...
Click to collapse
I flashed the 160620 with SP-flashtool, but unticked "recovery" before flashing.
So after flashing, I still had TWRP.
Then reboot to TWRP, flashed super-su, everything ok.
So, i didnt do EXACTLY what you did, because I didnt had to install TWRP new after flashing 160620, but TWRP is working on my Phone with 160620.
When you flash, does it flash the stock-recovery? Maybe your recovery-partition got messed up, when you used Flashify to get Stock-recovery for the OTA-update?
Dont know, i am not that much of an expert........:silly:
Robot12 said:
I flashed the 160620 with SP-flashtool, but unticked "recovery" before flashing.
So after flashing, I still had TWRP.
Then reboot to TWRP, flashed super-su, everything ok.
So, i didnt do EXACTLY what you did, because I didnt had to install TWRP new after flashing 160620, but TWRP is working on my Phone with 160620.
When you flash, does it flash the stock-recovery? Maybe your recovery-partition got messed up, when you used Flashify to get Stock-recovery for the OTA-update?
Dont know, i am not that much of an expert........:silly:
Click to expand...
Click to collapse
Yes, Flashify messed up my phone badly. But since then I formated the internal storage except the bootloader so then with a clean install of 160620, invluding stock recovery it should be ok. Maybe I flash 160509 again because I know I can install TWRP in that fw. Then do like you, flash 160620 without stock recovery.
Has anybody use sp flash latest 11th july 2016 rom in needrom.com ?
some tips...
Well after 2 months with this phone, I think it's time to share some tips and improvements I found usefull.
** Please notify me if it's the wrong thread for posting these kind of stuff, but I thought it doesn't belong to the other leagoo shark thread... **
I personnally think it's a very good phone, good hardware, and you got a lot for the price. But like with other phones, some improvements doesn't hurt
(1)--> At first, you need to install TWRP recovery and you have to root the phone. You need it to tweak this beast.
Everything you need is in first post.
Important: For superSu, you have to untick "mount namespace separation", because most of the init.d tweaks won't work with this option activated. And you have to tick "activate su during boot" for the same reason
(2)--> Second step, install busybox (let's say with the stericson installer, install it directly -no need to wait for the "smart install" process-, and remove the installer apk after, because we doesn't need it anymore)
(3)--> Third step, let's add init.d support:
like I explained in the other leagoo shark thread, just search for the file install-recovery.sh In the directory /etc/ and modify it like that:
Code:
#!/system/bin/sh
/system/xbin/daemonsu --auto-daemon &
#init.d support
run-parts /system/etc/init.d/
All you have to do now, is to create a folder "init.d" (without the quotes) in /etc/ folder with 0777 permissions.
(4)--> Now that we have init.d support, here are some scripts I collected & adapted for our phone:
00opti:
This one increase sdcard0/sdcard1 -if any installed- read_ahead value for faster i/o, removes some debug flags, tunes oom, disable ipv6 and tunes ipv4 parameters
Code:
#!/system/bin/sh
echo 512 > /sys/block/mmcblk0/queue/read_ahead_kb
echo 512 > /sys/block/mmcblk1/queue/read_ahead_kb
setprop profiler.debugmonitor false
setprop profiler.launch false
setprop profiler.hung.dumpdobugreport false
setprop debugtool.anrhistory 0
setprop profiler.force_disable_ulog 1
setprop profiler.force_disable_err_rpt 1
setprop logcat.live disable
setprop dalvik.vm.debug.alloc 0
setprop dalvik.vm.checkjni false
echo 0 > /sys/module/alarm_dev/parameters/debug_mask
echo 0 > /sys/module/alarmtimer/parameters/debug_mask
echo 0 > /sys/module/binder/parameters/debug_mask
echo 0 > /sys/module/kernel/parameters/initcall_debug
echo 0 > /sys/module/xt_qtaguid/parameters/debug_mask
echo 0 > /sys/module/sbsuspend/parameters/sbsuspend_debug_mask
echo 0 > /sys/module/earlysuspend/parameters/debug_mask
echo 0 > /sys/module/lowmemorykiller/parameters/debug_level
sysctl -w vm.block_dump=0
sysctl -e -w vm.oom_dump_tasks=1
sysctl -e -w vm.oom_kill_allocating_task=1
echo "1" > /proc/sys/net/ipv6/conf/all/disable_ipv6
echo "1" > /proc/sys/net/ipv6/conf/default/disable_ipv6
/system/bin/ip6tables -P INPUT DROP
/system/bin/ip6tables -P OUTPUT DROP
/system/bin/ip6tables -P FORWARD DROP
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_dsack
echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle
echo "1" > /proc/sys/net/ipv4/tcp_window_scaling
echo "1" > /proc/sys/net/ipv4/tcp_moderate_rcvbuf
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo "1" > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses
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
01rmt:
This one does classics 'perfect" remounts, tunes some fs parameters,ipv4 tweaks and fstrim function
Code:
#!/system/bin/sh
mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier=0,nobh,errors=continue,nomblk_io_submit,ro /system
mount -o remount,commit=19,nomblk_io_submit,errors=continue,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh,rw /data
mount -o remount,commit=19,nomblk_io_submit,errors=continue,noatime,noauto_da_alloc,nosuid,nodev,nodiratime,barrier=0,nobh,rw /cache
echo 0 > /sys/kernel/debug/tracing/tracing_on
sysctl -e -w fs.lease-break-time=10
sysctl -e -w fs.inotify.max_queued_events=32000
sysctl -e -w fs.inotify.max_user_instances=256
sysctl -e -w fs.inotify.max_user_watches=10240
sysctl -e -w fs.file-max=165164
sysctl -w vm.laptop_mode=0
sysctl -w net.ipv4.icmp_echo_ignore_all=1
sysctl -w net.ipv4.route.flush=1
busybox fstrim -v /cache
busybox fstrim -v /system
busybox fstrim -v /data
02touch:
touch tuning **thanks seraser
Code:
#!/system/bin/sh
echo 20 > /sys/module/tpd_setting/parameters/tpd_em_auto_time_interval
echo 25 > /sys/module/tpd_setting/parameters/tpd_em_pressure_threshold
echo 4 > /sys/module/tpd_setting/parameters/tpd_em_debounce_time
echo 5 > /sys/module/tpd_setting/parameters/tpd_em_debounce_time0
echo 9 > /sys/module/tpd_setting/parameters/tpd_em_debounce_time1
03others:
disabling Zram, some other tweaks, temporary folders cleaning, scrolling and touch tuning
Code:
#!/system/bin/sh
swapoff /dev/block/zram0
setprop persist.sys.scrollingcache 3
setprop ro.min.fling_velocity 8000
setprop ro.max.fling_velocity 12000
echo "1" > /sys/module/tpd_setting/parameters/tpd_mode
echo "63" > /sys/module/hid_magicmouse/parameters/scroll_speed
setprop ENFORCE_PROCESS_LIMIT false
setprop MAX_SERVICE_INACTIVITY false
setprop MIN_HIDDEN_APPS false
setprop MAX_HIDDEN_APPS false
setprop CONTENT_APP_IDLE_OFFSET false
setprop EMPTY_APP_IDLE_OFFSET false
setprop MAX_ACTIVITIES false
setprop ACTIVITY_INACTIVE_RESET_TIME false
setprop MAX_RECENT_TASKS false
setprop MIN_RECENT_TASKS false
setprop APP_SWITCH_DELAY_TIME false
setprop MAX_PROCESSES false
setprop PROC_START_TIMEOUT false
setprop CPU_MIN_CHECK_DURATION false
setprop GC_TIMEOUT false
setprop SERVICE_TIMEOUT false
setprop MIN_CRASH_INTERVAL false
setprop touch.pressure.scale 0.001
busybox rm -f /data/*.log
busybox rm -f /data/tombstones/*
busybox rm -f /data/system/dropbox/*
busybox rm -f /storage/sdcard0/LOST.DIR/*
busybox rm -f /storage/sdcard1/LOST.DIR/*
busybox rm -f /data/system/usagestats/*
busybox rm -r /data/system/appusagestats/*
busybox rm -f /data/anr/*
busybox rm -f /cache/*.apk
busybox rm -f /cache/*.tmp
busybox rm -f /data/backup/pending/*
busybox rm -f /data/local/tmp/*
busybox rm -r /data/tmp/*
setprop media.stagefright.enable-player true
setprop media.stagefright.enable-meta true
setprop media.stagefright.enable-scan true
setprop media.stagefright.enable-http true
setprop media.stagefright.enable-aac true
setprop media.stagefright.enable-qcp true
04gsf:
disabling some google services functions, use it at your own risks ^^^ Can't remember where I find these tweaks, so all credits goes to the author(s)
For this script to work, you need sqlite3 binary, you can use the one I attached (put it in system/xbin/ with according 0777 permissions)
Code:
#!/system/bin/sh
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'perform_market_checkin' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'market_force_checkin' and value = -1"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'checkin_interval'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:snet' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:snet_gcore' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:snet_idle' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:snet_launch_service' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:SYSTEM_RECOVERY_KMSG' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:event_log' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'checkin_dropbox_upload:SYSTEM_RECOVERY_LOG' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'ads:jams:is_enabled' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 'false' where name = 'analytics.service_enabled' and value = 'true'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = '127.0.0.1' where name = 'url:feedback_url'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'market_force_checkin' and value = 1"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'secure:bandwidth_checkin_stat_interval'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'secure:send_action_app_error'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update main set value = 0 where name = 'send_action_app_error'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update saved_secure set value = '0' where name = 'send_action_app_error'"
/system/xbin/sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "update saved_global set value = '0' where name = 'send_action_app_error'"
05renice:
renice processes, especially fingerprint scanner service. Please note this two lines:
- busybox renice -19 `pidof com.teslacoilsw.launcher` <--- because I use Nova launcher instead of the stock launcher, wich I personally recommend.
- busybox renice -19 `pidof com.mrbimc.udn.lite:udn_service` <----- I'm using Ultimate Dynamic Navbar instead of the stock one, I will explain this later.
If you doesn't use this two apps, you can remove these lines. (well, if you don't, it will not hurt either)
Code:
#!/system/bin/sh
sleep 80
pid=$(busybox pgrep zygote 2>/dev/null)
busybox renice -1 $pid
busybox ionice -c 1 -n 0 -p $pid
for pid in `dumpsys activity services | busybox grep -i app=ProcessRecord | busybox awk '{ print $2 }' | busybox grep -v '/100[0-9]}' | busybox cut -d: -f1`; do
busybox renice 7 $pid
busybox ionice -c 2 -n 7 -p $pid
done;
busybox renice -20 `pidof com.android.phone`
busybox renice -19 `pidof egistec.fingerauth.host.service`
busybox renice -19 `pidof egistec.fingerauth.host.service:remote`
busybox renice -19 `pidof com.teslacoilsw.launcher`
busybox renice -19 `pidof com.mrbimc.udn.lite:udn_service`
busybox renice -19 `pidof com.android.mms`
busybox renice -15 `pidof com.android.systemui`
busybox renice -3 `pidof android.process.acore`
busybox renice -3 `pidof android.process.media`
(5)--> Now let's tweak the build.prop file a bit...
I added this lines to the build.prop file:
Code:
#seb tweaks
ro.media.enc.jpeg.quality=100
profiler.force_disable_err_rpt=1
profiler.force_disable_ulog=1
logcat.live=disable
wifi.supplicant_scan_interval=240
ro.kernel.android.checkjni=0
ro.kernel.checkjni=0
ro.config.nocheckin=1
persist.sys.scrollingcache=3
net.rmnet0.dns1=8.8.8.8
net.rmnet0.dns2=8.8.4.4
net.dns1=8.8.8.8
net.dns2=8.8.4.4
net.ppp0.dns1=8.8.8.8
net.ppp0.dns2=8.8.4.4
net.wlan0.dns1=8.8.8.8
net.wlan0.dns2=8.8.4.4
net.eth0.dns1=8.8.8.8
net.eth0.dns2=8.8.4.4
net.gprs.dns1=8.8.8.8
net.gprs.dns2=8.8.4.4
#seb experimental
mot.proximity.delay=25
windowsmgr.max_events_per_sec=90
ro.max.fling_velocity=12000
ro.min.fling_velocity=8000
debugtool.anrhistory=0
profiler.debugmonitor=false
profiler.launch=false
profiler.hung.dumpdobugreport=false
ro.config.hw_quickpoweron=true
net.tcp.mss.wlan=491520
net.tcp.mss.rmnet=491520
persist.service.zram=0
ro.zram.default=0
persist.sys.use_dithering=0
pm.sleep_mode=1
power.saving.mode=1
(6)-->Xposed
Let's install xposed, you need this for Amplify and Greenify, wich I strongly recommend against the stock power saver (I removed it).
You can also install the module "Deny location Consent", very usefull as I doesn't want other localisation than the gps one (very good with this phone by the way) and I'm tired of clicking "disagree" to the google popup when I activate location.
(7)-->Launcher
I doesn't like the stock launcher. At all. I prefer to use Nova Launcher and remove "Launcher3". Your choice
With my firmware version (20160530), there is no tts settings in "settings" :-/ ... But with Nova, and the widget "activity", you can access tts settings (.Settings$TextToSpeechActivity ;see image attachement). I found other interresting activities in parameters too like :
.RadioInfo
.Settings$NotificationsStationActivity
.Settings$GestureSettingsHct ("Somatosensoriel intelligente" ?....)
.Settings$CaptioningSettingsActivity
.Settings$HeadsetSettingActivity
.MonitoringCertInfoActivity
(8)-->Debloating
Use a file explorer (with root access granted) to remove some system apps and titanium backup (or another tool with similar functionnality) to freeze some others.
I removed:
-All the themes (related to launcher 3, wich I doesn't use) : cn.sh.hct.themeOtdColors, cn.sh.hct.themeOtdNusiness, cn.sh.hct.themeOtdEasyFlat, cn.sh.hct.themeOtd, cn.sh.hct.themeOtdluxurious. I keep the main app "Themes" because It allows us to easily change the lockscreen wallpaper. (via the app or via the galery app)
-UpgradeSys, Tags, Power On/Off scheduler, Power Saver, Pico sv (I installed google tts), MTKLogger, MTKNlpServices, MTK android suite daemon, ConfigUpdater, FWupgrade, FWUpgradeProvider, RockClient, Music (I prefer another player), MusicFx.
I froze:
-BSPTelephonyDevTool, com.mediatek.batteryWarning, FastCamera (doesn't know what it is for ?), MTK Thermal manager
(9)-->The navbar
Well, I think there are two problems with the leagoo navbar.
At First, I doesn't like the resolution changing when you activate/desactivate the navbar wich occurs with certain apps. It can even crash some very specific apps (like Igo primo).
And the second thing very annoying is that you have to hide it manually. Too bad there isn't a "auto hide feature".
I solved these two issues with "Ultimate Dynamic Navbar", http://forum.xda-developers.com/showthread.php?t=2270198
Now the navbar is superposed with anything on the screen, without changing the resolution of the running app. And you can specify a timeout for it to automatically hide.
Very customizable, very good and far better than the leagoo or the android stock navbar. You can use the integrated xposed module to hide the leagoo navbar; or modifying these two lines in build.prop (thanks to genesisalgor) :
ro.hct_navigationbar=0
qemu.hw.mainkeys=1
...... more to come if you are interrested
(like customizing the clock view with the flip cover -by modifyng framework-res.apk-,services disabling, optimizing system apks, bootanimation, .... and other tweaks).
Great stuff for helping other.
BTW related to navbar, the navbar in Shark isn't the stock Android Navbar, is another implementation. There is a line on build.prop called hct navbar or something, set it to 0 then the leagoo navbar goes away.
Then
qemu.hw.mainkeys=0
And you get stock Android navbar, which is a bit smaller, so I use Xstana to get a better one.
Sent from my s3 using Tapatalk
genesisalgor said:
BTW related to navbar, the navbar in Shark isn't the stock Android Navbar, is another implementation. There is a line on build.prop called hct navbar or something, set it to 0 then the leagoo navbar goes away.
Then
qemu.hw.mainkeys=0
And you get stock Android navbar, which is a bit smaller, so I use Xstana to get a better one.
Click to expand...
Click to collapse
Thanks a lot ! I still prefer to use Ultimate Dynamic Navbar as I found it more convenient and customizable than the "real" android stock navbar, but now I doesn't need to use the Xposed module, I only have to modify the build.prop like this:
ro.hct_navigationbar=0
qemu.hw.mainkeys=1
Hi.
@seb3773
From here...
http://forum.xda-developers.com/showthread.php?p=67860377
Can you check values of touch after init.d boot?
Thanks.
Enviado desde mi Shark 1 mediante Tapatalk
seraser said:
Hi.
@seb3773
From here...
http://forum.xda-developers.com/showthread.php?p=67860377
Can you check values of touch after init.d boot?
Thanks.
Enviado desde mi Shark 1 mediante Tapatalk
Click to expand...
Click to collapse
Yes, I checked the values (both with terminal and engineer mode) after boot and it's working, I mean the values are those mentionned in the script.
for testing purposes, can you install terminal emulator app, then open a windows, type "su" to get root and then type "run-parts", just to check there isn't something wrong with the busybox install ?
You should then see something like that:
Code:
[email protected]_35gu_l:/ # run-parts
BusyBox v1.24.1-Stericson (2015-11-06 19:11:24 EST) multi-call binary.
Usage: run-parts [-a ARG]... [-u UMASK] [--reverse] [--test] [--exit-on-error] [--list] DIRECTORY
Run a bunch of scripts in DIRECTORY
-a ARG Pass ARG as argument to scripts
-u UMASK Set UMASK before running scripts
--reverse Reverse execution order
--test Dry run
--exit-on-error Exit if a script exits with non-zero
--list Print names of matching files even if they are not executable
If it's ok, then try the command "run-parts --list /etc/init.d/ : you should get the listing of the scripts in init.d folder
seb3773 said:
Yes, I checked the values (both with terminal and engineer mode) after boot and it's working, I mean the values are those mentionned in the script.
for testing purposes, can you install terminal emulator app, then open a windows, type "su" to get root and then type "run-parts", just to check there isn't something wrong with the busybox install ?
You should then see something like that:
Code:
[email protected]_35gu_l:/ # run-parts
BusyBox v1.24.1-Stericson (2015-11-06 19:11:24 EST) multi-call binary.
Usage: run-parts [-a ARG]... [-u UMASK] [--reverse] [--test] [--exit-on-error] [--list] DIRECTORY
Run a bunch of scripts in DIRECTORY
-a ARG Pass ARG as argument to scripts
-u UMASK Set UMASK before running scripts
--reverse Reverse execution order
--test Dry run
--exit-on-error Exit if a script exits with non-zero
--list Print names of matching files even if they are not executable
If it's ok, then try the command "run-parts --list /etc/init.d/ : you should get the listing of the scripts in init.d folder
Click to expand...
Click to collapse
Run parts works fine, showme 02touch, I don't understand.
You feel the touch sensitive only with init.d and without settings fresh boot activation?
Thanks.
Enviado desde mi Shark 1 mediante Tapatalk
Guys instead of doing so many tweaks, all can be implemented into the ramdisk. Coming soon
Alberto96 said:
Guys instead of doing so many tweaks, all can be implemented into the ramdisk. Coming soon
Click to expand...
Click to collapse
Right. I was thinking of doing it as it is not a problem to decompile/compile mtk img files, but having these tweaks in scripts files/build.prop allow me to test, modify, remove some of them or add others tweaks without the hassle of playing with the ramdisk.
But you're definitively right, maybe we can make a list of the "good" working tweaks for the shark, and when we are sure it's ok and working properly, then integrate all of them in ramdisk.
---------- Post added at 01:28 PM ---------- Previous post was at 01:25 PM ----------
seraser, to be honnest, I already feel the touch enough sensitive for me without the tweaks, so I'm maybe not the good person to do this kind of test
Maybe others can try and tell us if there's a difference or not...
Shark 1 20160711 ROM: https://mega.nz/#!tV0DXRDI!7qEXPptHmC9eA9WORwzomdl3vy2nUrZzlTkJkewkcMo
- Rooted using SuperSU
- Busybox Support
- De-Bloated (just a bit)
- Improved Performance
Flashable using TWRP Recovery.
Touchscreen Sensitivity tweak hasn't been added because it seems that this last update doesn't have that issue.
I'm now working on an AOSP variant in order to get rid of the LEAGOO OS UI. UPDATE: Done, coming soon.
Alberto96 said:
Shark 1 20160711 ROM: https://mega.nz/#!tV0DXRDI!7qEXPptHmC9eA9WORwzomdl3vy2nUrZzlTkJkewkcMo
- Rooted using SuperSU
- Busybox Support
- De-Bloated (just a bit)
- Improved Performance
Flashable using TWRP Recovery.
Touchscreen Sensitivity tweak hasn't been added because it seems that this last update doesn't have that issue.
I'm now working on an AOSP variant in order to get rid of the LEAGOO OS UI.
Click to expand...
Click to collapse
Great work man!
And yeeeess, please AOSP it, I l don't like this UI [emoji14]
Sent from my s3 using Tapatalk

Categories

Resources