FORUMS
Remove All Ads from XDA

[email protected]@holic help thread

7,548 posts
Thanks Meter: 8,476
 
By Setting.Out, Inactive Recognized Contributor on 6th September 2014, 09:04 PM
Post Reply Email Thread
This is a thirteen step program for flashaholics.



Since there is no cure for flashaholism, we may as well give those afflicted more to flash..



**ALWAYS FLASH AT YOUR OWN RISK ANYTHING THAT GETS POSTED HERE**



Just follow these simple steps:

1. Rate this thread 5 stars
2. Subscribe to this thread
3. Tell other flashaholics to join this thread
4. Treat all flashaholics with respect
5. Be on the constant lookout for anything new and noteworthy
6. Be helpful to those afflicted by posting these new found links
7. Always use protection when flashing (have a backup)
8. Don't be discrete about your flashing adventures, share your steamy details
9. Be helpful to outsiders that aren't as flash savvy as you and answer their posts nicely
10. If you feel a member is on the wagon, help them fall off by bragging about how cool your phone is
11. Remember to follow XDA rules
12. Happy flashing!!
13. Always thank your developers, and donate if you can..


BECOME PART OF AN ADDICTIVE COMMUNITY



I'm on telegram




HELP THE COMMUNITY AND JOIN THE ROM "WIKI"
You can add your knowledge to this growing chart of roms



-JOIN HERE-



When not flashing I will update the thread with notable links of what, where, and how to flash..

Contributors


@#sychrome#
XDA community

Get your support banners -HERE-
The Following 60 Users Say Thank You to Setting.Out For This Useful Post: [ View ] Gift Setting.Out Ad-Free
6th September 2014, 09:05 PM |#2  
Setting.Out's Avatar
OP Inactive Recognized Contributor
Flag Asnieres-Sur-Seine
Thanks Meter: 8,476
 
More
WE'RE HERE FOR YOUR TUNING NEEDS




KA MOD (Kernel aduitor)

http://forum.xda-developers.com/andr...ernel-t3333549

How to apply profiles

http://forum.xda-developers.com/onep...3/post68636831

Lightning Kernel profiles

http://forum.xda-developers.com/onep...4/post69351130

New Kernel profiles (jgcaap rom)

http://forum.xda-developers.com/onep...4/post69271814

Moriarty Kernel profiles (S.O.S. rom)

http://forum.xda-developers.com/show...&postcount=175




Battery Savings tips

1. Keep unneeded services off (location, BT, NFC, ect..)
2. Lower the screen brightness
3. Manage your apps with greenify (many apps will abuse services if you let them)
4. Don't discharge the battery to zero, and try to keep it cool (hot batteries discharge faster)
The Following 17 Users Say Thank You to Setting.Out For This Useful Post: [ View ] Gift Setting.Out Ad-Free
6th September 2014, 09:05 PM |#3  
Setting.Out's Avatar
OP Inactive Recognized Contributor
Flag Asnieres-Sur-Seine
Thanks Meter: 8,476
 
More
Settings Script
WELCOME TO SETTINGS SCRIPT

This is a set scripts I started collecting and working on since my days of old using a Nexus S. It has been updated and tested 100's of times and is ready for use on the OnePlus. I am not going to claim 1000's of points gained in benchmarks, or days of battery life, but it should help balance performance and battery..

Basically it's a collection of init.d scripts to gently modify some services, system, battery and various functions. This is active at boot (assuming you have init.d support and busybox). Please don't use this with other scripts (seeder is okay). Don't operate while intoxicated or holding an iPhone..

Code:
#!/system/bin/sh


# test
if [ -f /data/Test.log ] ; then
    rm /data/Test.log
fi

echo "Script is working !!!" >> /data/Test.log
echo "excecuted on $(date +"%d-%m-%Y %r" )" >> /data/Test.log


# Expand Kernel Permission
if [ -e /dev/cpuctl/apps/cpu.notify_on_migrate ]; then 
  chown system.system /dev/cpuctl/apps/cpu.notify_on_migrate 
  chmod 0666 /dev/cpuctl/apps/cpu.notify_on_migrate 
fi


# Cleaner
#Interval between runs, in seconds, 172800=48 hours
RUN_EVERY=172800

busybox rm -f /data/anr/*.*
busybox rm -f /data/cache/*.*
busybox rm -f /data/log/*.*
busybox rm -f /data/local/tmp/*.*
busybox rm -f /data/mlog/*
busybox rm -f /data/tombstones/*
busybox rm -f /data/backup/pending/*
busybox rm -f /data/system/dropbox/*
busybox rm -f /cache/recovery/*
busybox rm -f /dev/log/main/*
chmod 700 /data/system/dropbox
busybox chmod 700 /data/system/usagestats


# Zipalign
# 86400=24 hours
RUN_EVERY=86400

LOG_FILE=/data/zipalign.log
ZIPALIGNDB=/data/zipalign.db

if [ -e $LOG_FILE ]; then
  rm $LOG_FILE;
fi;

if [ ! -f $ZIPALIGNDB ]; then
  touch $ZIPALIGNDB;
fi;

echo "Starting FV Automatic ZipAlign $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE

for DIR in /system/app /data/app ; do
  cd $DIR
  for APK in *.apk ; do
    if [ $APK -ot $ZIPALIGNDB ] && [ $(grep "$DIR/$APK" $ZIPALIGNDB|wc -l) -gt 0 ] ; then
      echo "Already checked: $DIR/$APK" | tee -a $LOG_FILE
    else
      zipalign -c 4 $APK
      if [ $? -eq 0 ] ; then
        echo "Already aligned: $DIR/$APK" | tee -a $LOG_FILE
        grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
      else
        echo "Now aligning: $DIR/$APK" | tee -a $LOG_FILE
        zipalign -f 4 $APK /cache/$APK
        cp -f -p /cache/$APK $APK
        busybox rm -f /cache/$APK
        grep "$DIR/$APK" $ZIPALIGNDB > /dev/null || echo $DIR/$APK >> $ZIPALIGNDB
      fi
    fi
  done;
done;

touch $ZIPALIGNDB
echo "Automatic ZipAlign finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE


# Renice
B=/system/xbin/busybox

( while true
do

sf=$( service list | $B grep -c "SurfaceFlinger" )

if [ $sf -eq 1 ]
then
service call SurfaceFlinger 1008 i32 1
break
else
sleep 2
fi
done
) &


# Kernel Tweaks 
if [ -e /proc/sys/kernel/softlockup_panic ]
then 
 echo 0 > /proc/sys/kernel/softlockup_panic
fi
if [ -e /proc/sys/kernel/hung_task_timeout_secs ]
then 
 echo 0 > /proc/sys/kernel/hung_task_timeout_secs
fi
if [ -e /proc/sys/kernel/panic_on_oops ]
then 
 echo 0 > /proc/sys/kernel/panic_on_oops
fi
if [ -e /proc/sys/kernel/panic ]
then 
 echo 0 > /proc/sys/kernel/panic
fi
if [ -e /proc/sys/kernel/msgmni ]
then 
 echo 2048 > /proc/sys/kernel/msgmni
fi
if [ -e /proc/sys/kernel/msgmax ]
then 
 echo 64000 > /proc/sys/kernel/msgmax
fi
if [ -e /proc/sys/kernel/shmmax ]
then 
 echo 268435500 > /proc/sys/kernel/shmmax
fi
if [ -e /proc/sys/kernel/threads-max ]
then 
 echo 525810 > /proc/sys/kernel/threads-max
fi
if [ -e /proc/sys/kernel/nmi_watchdog ]; then
echo "0" > /proc/sys/kernel/nmi_watchdog;
sysctl -e -w kernel.nmi_watchdog=0;
fi;
if [ -e /proc/sys/vm/drop_caches ]; then
echo "3" > /proc/sys/vm/drop_caches;
sysctl -e -w vm.drop_caches=3;
fi;


#fsync
if [ -e /sys/devices/virtual/misc/fsynccontrol/fsync_enabled ]; then
echo "0" > /sys/devices/virtual/misc/fsynccontrol/fsync_enabled;
fi;
if [ -e /sys/class/misc/fsynccontrol/fsync_enabled ]; then
echo "0" > /sys/class/misc/fsynccontrol/fsync_enabled;
fi;
if [ -e /sys/module/sync/parameters/fsync ]; then
echo "0" > /sys/module/sync/parameters/fsync;
fi;
if [ -e /sys/module/sync/parameters/fsync_enabled ]; then
echo "0" > /sys/module/sync/parameters/fsync_enabled;
echo "N" > /sys/module/sync/parameters/fsync_enabled;
fi;


# Disable Sleepers
echo "NO_NEW_FAIR_SLEEPERS" > /sys/kernel/debug/sched_features;
echo "NO_NORMALIZED_SLEEPER" > /sys/kernel/debug/sched_features;


# Kill Media Tweak
LOG=/data/mediaserver_log.txt;
supolicy --live "allow mediaserver mediaserver_tmpfs:file { read write execute };";
if [ "$SDK" -le "18" ]; then
if [ "$SDK" -gt "10" ]; then
echo "Mediaserver kill" >> $LOG;
busybox killall -9 android.process.media;
busybox killall -9 mediaserver;
fi;
fi;

# Vsync tweak
if [ -e /sys/kernel/debug/msm_fb/0/vsync_enable ]; then
echo 0 > /sys/kernel/debug/msm_fb/0/vsync_enable
fi;


#Sqlite
# Log file location 
LOG_FILE=/data/sqlite.log 
#Interval between SQLite3 runs, in seconds, 604800=1 week 
RUN_EVERY=604800 
# Get the last modify date of the Log file, if the file does not exist, set value to 0 
if [ -e $LOG_FILE ]; then
LASTRUN=`stat -t $LOG_FILE | awk '{print $14}'`
else
LASTRUN=0
fi; 
# Get current date in epoch format 
CURRDATE=`date +%s` 
# Check the interval 
INTERVAL=$(expr $CURRDATE - $LASTRUN) 
# If interval is more than the set one, then run the main script 
if [ $INTERVAL -gt $RUN_EVERY ]; then
  if [ -e $LOG_FILE ]; then
  rm $LOG_FILE;
  fi;
echo "SQLite database VACUUM and REINDEX started at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
for i in `busybox find /d* -iname "*.db"`; 
do 		/system/xbin/sqlite3 $i 'VACUUM;';
resVac=$?
if [ $resVac == 0 ]; then
resVac="SUCCESS";
else
resVac="ERRCODE-$resVac"; 		
fi; 		 		
/system/xbin/sqlite3 $i 'REINDEX;';
resIndex=$?
if [ $resIndex == 0 ]; then
resIndex="SUCCESS";
else
resIndex="ERRCODE-$resIndex";
fi;
echo "Database $i: VACUUM=$resVac REINDEX=$resIndex" | tee -a $LOG_FILE;
done
echo "SQLite database VACUUM and REINDEX finished at $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE;
fi;


#Lcd power
if [ -e /sys/class/lcd/panel/power_reduce ]; then
echo "LCD power reduce detected. Activating..";
echo "1" > /sys/class/lcd/panel/power_reduce;
fi;


# Properties tweak
setprop ro.kernel.android.checkjni 0
setprop debug.kill_allocating_task 0
setprop dev.pm.dyn_samplingrate 1
setprop pm.sleep_mode 1
setprop persist.sys.purgeable_assets 1
setprop persist.cust.tel.eons 1
setprop ro.ril.enable.amr.wideband 1
setprop ro.ril.transmitpower true
setprop ro.ril.sensor.sleep.control 1
setprop ro.config.combined_signal true
setprop ro.ril.hep 1
setprop wifi.supplicant_scan_interval 300
setprop cm.filesystem.ready 1
setprop persist.service.pcsync.enable 0
setprop persist.service.lgospd.enable 0
setprop ro.min_pointer_dur 1
setprop ro.sys.fw.bg_apps_limit 6
setprop ro.lcd_min_brightness 1
setprop persist.sys.use_dithering 0
setprop persist.sys.use_16bpp_alpha 1
setprop ro.max.fling_velocity 20000
setprop ro.min.fling_velocity 10000


#Ext4 mount
# Log file location 
LOG_FILE=/data/fsck.log 
if ( mount | grep -w ext4 ) then
	echo "EXT4 Partition Found!"
	echo "Remounting..."
	mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc /cache /cache;
	mount -o noatime,remount,rw,discard,barrier=0,commit=60,noauto_da_alloc,delalloc /data /data;
	mount >> /data/fsck.log;
else
	echo "EXT4 Partition Not Found!"
fi;


echo "Script finished"

FLASH AT YOUR OWN RISK


INSTALLATION:

**Requires BusyBox and init.d support**

(For some Nougat roms emulation of init.d may be nessesary, use KA mod, or another app for init.d emulation..)

Just flash in recovery, no extra steps required to enjoy..

It removes the old version, so flash and forget, it also survives a dirty flash (v5.5+)..



This has been tested, but no guarantees for protection from aliens or ninjas..

SPECIAL THANKS TO: @h-cspu @7u5h4r @Stone_88@ashutoshmn @Purerawenergy and @maxed4901 for helping me improve it..

Unless there's a bug fix or something I like, this won't get updated further.. NO ETAS



DOWNLOAD(s)

https://www.androidfilehost.com/?w=files&flid=123565

SCRIPTS & UNINSTALLER



LATEST UPDATE

VERSION: 6.1 SS Beta 08/04/2017
VERSION: 3.1 SS Stable 08/04/2017


Enjoy
The Following 28 Users Say Thank You to Setting.Out For This Useful Post: [ View ] Gift Setting.Out Ad-Free
6th September 2014, 09:11 PM |#4  
ghettopops's Avatar
Senior Member
Thanks Meter: 150
 
More
Mine
The Following 3 Users Say Thank You to ghettopops For This Useful Post: [ View ] Gift ghettopops Ad-Free
6th September 2014, 09:22 PM |#5  
Setting.Out's Avatar
OP Inactive Recognized Contributor
Flag Asnieres-Sur-Seine
Thanks Meter: 8,476
 
More
CARBON
DOWNLOAD

Normal ext4 Debloated, with Android L keyboard and MiXplorer

Converted F2FS Converted, debloated, with Android L keyboard and MiXplorer.. THIS DOES NOT NEED A KERNEL FLASHED OVER THIS it is an "all in one" convert and is complete..

Original from Moonlight Original with extra Chinese apps
The Following 5 Users Say Thank You to Setting.Out For This Useful Post: [ View ] Gift Setting.Out Ad-Free
6th September 2014, 09:29 PM |#7  
Senior Member
Flag Jax and The DMV
Thanks Meter: 916
 
Donate to Me
More
yeeeaaaaaa

Sent from my 1+1
The Following 2 Users Say Thank You to dadoc04 For This Useful Post: [ View ] Gift dadoc04 Ad-Free
6th September 2014, 09:39 PM |#8  
gordon.shameway's Avatar
Senior Member
Flag Munich
Thanks Meter: 266
 
More
Thank you so much for bringing us carbon!
The Following 3 Users Say Thank You to gordon.shameway For This Useful Post: [ View ] Gift gordon.shameway Ad-Free
6th September 2014, 10:19 PM |#9  
Inactive Recognized Developer
Flag New York, NY
Thanks Meter: 37,901
 
Donate to Me
More
For the spreadsheet, it requires access. Don't forget to change the permissions
Quote:

You need permission

Want in? Ask the owner for access, or switch to an account with permission. Learn more

The Following 2 Users Say Thank You to zephiK For This Useful Post: [ View ] Gift zephiK Ad-Free
6th September 2014, 10:22 PM |#10  
Setting.Out's Avatar
OP Inactive Recognized Contributor
Flag Asnieres-Sur-Seine
Thanks Meter: 8,476
 
More
Quote:
Originally Posted by zephiK

For the spreadsheet, it requires access. Don't forget to change the permissions

I'll get that fixed, its a work in progress..

Sent from my One using XDA Premium 4 mobile app
The Following 3 Users Say Thank You to Setting.Out For This Useful Post: [ View ] Gift Setting.Out Ad-Free
6th September 2014, 10:24 PM |#11  
Member
Thanks Meter: 48
 
More
My name is ninjanurse, and I am a [email protected]@holic

Sent from my One A0001 using Tapatalk
The Following 2 Users Say Thank You to ninjanurse For This Useful Post: [ View ] Gift ninjanurse Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes