[Sprint HTC One (M7)] guitarpager:
Microsoft Windows [Version 6.1.7601]

Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Page Butler>adb shell cat /system/etc/init.d/21viperrom

adb server is out of date. killing...

* daemon started successfully *

#!/system/bin/sh

#created by -viperboy-

log -p i -t viperinit " *** start 21viperrom init.d file ***"

log -p i -t viperinit " "

log -p i -t viperinit "mount system rw"

log -p i -t viperinit " "

busybox mount -o remount,rw /system

#enable alogcat to read system logs

pm grant org.jtb.alogcat android.permission.READ_LOGS

if [ `cat /proc/last_kmsg | grep -ci "kernel panic"` -gt "0" ]; then

echo 1 > /system/etc/virtuous_oc/showwarning

log -p i -t viperinit "kernel panic found, enable showwarning for vc"

log -p i -t viperinit " "

else

log -p i -t viperinit "no kernel panic found"

log -p i -t viperinit " "

fi

# kill old garbage market doesnt clean - (thanks Team Synergy)

log -p i -t viperinit "cleaning garbage"

log -p i -t viperinit " "

busybox rm -f /cache/*.apk;

busybox rm -f /cache/*.tmp;

busybox rm -f /cache/recovery/*;

busybox rm -f /data/dalvik-cache/*.apk;

busybox rm -f /data/dalvik-cache/*.tmp;

busybox rm -f /data/system/userbehavior.db;

busybox chmod 400 /data/system/usagestats/;

#filesystem tweaks

log -p i -t viperinit "filesystem tweaks"

log -p i -t viperinit " "

if [ `getprop vc.filesystem.tweak` = '1' ]; then

busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,discard,bar

ier=0,nobh /system;

busybox mount -o remount,nosuid,noatime,noauto_da_alloc,errors=continue

nodiratime,discard,nodev,barrier=0,nobh /data;

busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,discard,nod

v,barrier=0,nobh /cache;

elif [ `getprop vc.filesystem.tweak` = '0' ]; then

busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,barrier=0,n

bh /system;

busybox mount -o remount,nosuid,noatime,noauto_da_alloc,errors=continue

nodiratime,discard,nodev,barrier=0,nobh /data;

busybox mount -o remount,noatime,noauto_da_alloc,nodiratime,nodev,barri

r=0,nobh /cache;

else

log -p e -t viperinit "bad setting for vc.filesystem.tweak! value = `ge

prop vc.filesystem.tweak`"

fi

busybox mount -o rw,remount /system

log -p i -t viperinit "Setting permissions"

log -p i -t viperinit "Setting /app & /framework permissions"

log -p i -t viperinit " "

for file in /system/app/* /system/framework/*; do

chmod 644 $file

done

log -p i -t viperinit "Setting init.d permissions"

log -p i -t viperinit " "

chmod 777 /system/etc/init.d

for file in /system/etc/init.d/*; do

log -p i -t viperinit "setting permissions (777) for $file"

log -p i -t viperinit " "

chmod 777 $file

done

#Volume wake

echo 1 > /sys/keyboard/vol_wakeup

#sysctl start

log -p i -t viperinit "sysctl start"

log -p i -t viperinit " "

sysctl -p /system/etc/sysctl.conf

#kernel tweaks

log -p i -t viperinit "kernel tweaks"

log -p i -t viperinit " "

echo "512" > /sys/block/mmcblk0/queue/nr_requests;

# SD Card Readahead tweak

if [ -e /sys/devices/virtual/bdi/179:0/read_ahead_kb ]

then

/system/xbin/echo "512" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;

fi;

log -p i -t viperinit " "

log -p i -t viperinit " *** end 21viperrom init.d file ***"

C:\Users\Page Butler>