Skip to content
Permalink
Browse files

Updated Kernel Source and Added Synapse Support

  • Loading branch information...
XXH3X committed Mar 16, 2019
1 parent a3a26e3 commit 83fc878800cbdc3b02b489b97abba557ff7a801c
Showing 423 changed files with 17,154 additions and 27 deletions.
@@ -135,7 +135,7 @@ If you wish to add a kernel/new device, leave a link to source here and feel fre

# - Samsung Galaxy S6, Galaxy S6 edge
# AOSP/LineageOS
# git clone https://github.com/XXH3X/Kernel_Official_Lineage -b cm-14.1
# git clone https://github.com/XXH3X/Exynos7420_Nethunter -b cm-14.1
# TouchWiz
# git clone https://github.com/XXH3X/Ultimate-Kali

@@ -0,0 +1,11 @@
shift=$1
mask=`cat $2`

if [[ ! -z $3 ]]; then
bit=$3
echo $(((~(1 << shift) & mask) | (bit << shift))) > $2
fi

mask=`cat $2`

[ $(((1 << shift & mask) & mask)) -gt 0 ] && echo 1 || echo 0
@@ -0,0 +1,30 @@
if [ ! -f /su/xbin/busybox ]; then
BB=/system/xbin/busybox;
else
BB=/su/xbin/busybox;
fi;

if [ -f $1 ]; then
if [[ ! -z $2 ]]; then
VALUE=$2;

if [ "$VALUE" -eq 1 ]; then
$BB echo "Y" > $1 2> /dev/null;
elif [ "$VALUE" -eq 0 ]; then
$BB echo "N" > $1 2> /dev/null;
fi;
fi;

VALUE=`$BB cat $1`;

if [ $VALUE = "Y" ]; then
$BB echo "1";
elif [ $VALUE = "N" ]; then
$BB echo "0";
else
$BB echo "0";
fi;

else
$BB echo "0";
fi;
@@ -0,0 +1,11 @@
if [ -f $1 ]; then
if [[ ! -z $2 ]]; then
echo $2 > $1
fi

echo $(cat $1 | sed -n -e '/\[[^]]/s/^[^[]*\[\([^]]*\)].*$/\1/p')
else
case $1 in
/sys/block/mmcblk1/queue/scheduler) echo "noop" ;;
esac
fi
@@ -0,0 +1,43 @@
if [ ! -f /su/xbin/busybox ]; then
BB=/system/xbin/busybox;
else
BB=/su/xbin/busybox;
fi;

if [[ ! -z "$2" ]]; then
if [[ "$1" != *".dns"* ]]; then
if [ "$2" != "-1" ]; then
if [ $1 == "dalvik.vm.heapsize" ]; then
VMHS="$2";
VMHS="$((VMHS))m";

setprop $1 $VMHS;
else
setprop $1 "$2";
fi;
fi;
else
setprop $1 "$2";
fi;
fi;

if [ $1 == "dalvik.vm.heapsize" ]; then
VMHS="`getprop "$1" 2> /dev/null`";
VMHS=${VMHS%?};

$BB echo $VMHS;
else
if [ "`getprop "$1" 2> /dev/null`" == "" ]; then
if [ "$1" == "net.hostname" ]; then
$BB echo "";
elif [ "$1" == "persist.sys.purgeable_assets" ] || [ "$1" == "service.adb.tcp.port" ]; then
$BB echo "0";
elif [[ "$1" != *".dns"* ]]; then
$BB echo "-1";
else
$BB echo "0.0.0.0";
fi
else
$BB echo "`getprop "$1" 2> /dev/null`";
fi;
fi;
@@ -0,0 +1,48 @@
case $(basename $0) in
c1volt)
P=/sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster1_volt_table
;;
c0volt)
P=/sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster0_volt_table
;;
gpuvolt)
P=/sys/devices/14ac0000.mali/volt_table
;;
intvolt)
P=/sys/class/devfreq/exynos7-devfreq-int/volt_table
;;
mifvolt)
P=/sys/class/devfreq/exynos7-devfreq-mif/volt_table
;;
ispvolt)
P=/sys/class/devfreq/exynos7-devfreq-isp/volt_table
;;
esac

readValue() {
while read FREQ UVOLT; do
if [ $FREQ == $1 ]; then
echo $UVOLT
return
fi
done < $P
}

writeValue() {
case $(basename $0) in
intvolt) ;&
mifvolt) ;&
gpuvolt) ;&
c1volt) ;&
c0volt) ;&
ispvolt)
echo $1 $2 > $P
return
esac
}

if [[ ! -z $2 ]]; then
writeValue $1 $2
fi

echo $(readValue $1)
@@ -0,0 +1,48 @@
case $(basename $0) in
c1volt)
P=/sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster1_volt_table
;;
c0volt)
P=/sys/devices/system/cpu/cpufreq/mp-cpufreq/cluster0_volt_table
;;
gpuvolt)
P=/sys/devices/14ac0000.mali/volt_table
;;
intvolt)
P=/sys/class/devfreq/exynos7-devfreq-int/volt_table
;;
mifvolt)
P=/sys/class/devfreq/exynos7-devfreq-mif/volt_table
;;
ispvolt)
P=/sys/class/devfreq/exynos7-devfreq-isp/volt_table
;;
esac

readValue() {
while read FREQ UVOLT; do
if [ $FREQ == $1 ]; then
echo $UVOLT
return
fi
done < $P
}

writeValue() {
case $(basename $0) in
intvolt) ;&
mifvolt) ;&
gpuvolt) ;&
c1volt) ;&
c0volt) ;&
ispvolt)
echo $1 $2 > $P
return
esac
}

if [[ ! -z $2 ]]; then
writeValue $1 $2
fi

echo $(readValue $1)
@@ -0,0 +1,18 @@
SAY=""
case $((`cat /sys/class/power_supply/battery/batt_charging_source`)) in

1) SAY="On Battery"
;;

1) SAY="Tell Me If You See This"
;;

2) SAY="A/C Charger"
;;

3) SAY="USB Port"
;;

esac

echo $SAY / $(cat /sys/class/power_supply/battery/charge_type)
@@ -0,0 +1,167 @@
if [ ! -f /su/xbin/busybox ]; then
BB=/system/xbin/busybox;
else
BB=/su/xbin/busybox;
fi;
case $1 in
gamma)
P=/sys/class/mdnie/mdnie/gamma_curve
if [ ! -z $2 ]
then
if [ $2 == Movie ]
then
echo 0 > $P
elif [ $2 == Dynamic ]
then
echo 1 > $P
fi
fi
curve=`cat $P`
if [ $curve == 0 ]
then
echo Movie
elif [ $curve == 1 ]
then
echo Dynamic
fi
;;
mode)
P=/sys/class/mdnie/mdnie/copy_mode
if [ ! -z $2 ]
then
if [ $2 == Standard ]
then
echo 0 > $P
elif [ $2 == Natural ]
then
echo 1 > $P
elif [ $2 == Movie ]
then
echo 2 > $P
fi
fi
copy=`cat $P`
if [ $copy == 0 ]
then
echo Standard
elif [ $copy == 1 ]
then
echo Natural
elif [ $copy == 2 ]
then
echo Movie
fi
;;
screendata)
P=/sys/class/mdnie/mdnie
echo "#!/system/bin/sh\necho 1 > $P/override\necho $(cat $P/copy_mode) > $P/copy_mode\necho $(cat $P/black) > $P/black\necho $(cat $P/white) > $P/white\necho $(cat $P/red) > $P/red\necho $(cat $P/green) > $P/green\necho $(cat $P/blue) > $P/blue\necho $(cat $P/cyan) > $P/cyan\necho $(cat $P/magenta) > $P/magenta\necho $(cat $P/yellow) > $P/yellow\necho $(cat $P/gamma_curve) > $P/gamma_curve\necho $(cat $P/sharpen) > $P/sharpen\n" > /sdcard/screen
echo File saved at /sdcard/screen
;;
vread)
bin=`cat /sys/devices/system/soc/soc0/soc_pvs`
if [ $bin == 0 ]
then
pvs=1075
elif [ $bin == 1 ]
then
pvs=1050
elif [ $bin == 2 ]
then
pvs=1025
elif [ $bin == 3 ]
then
pvs=1000
elif [ $bin == 4 ]
then
pvs=975
elif [ $bin == 5 ]
then
pvs=950
elif [ $bin == 6 ]
then
pvs=925
fi
while read freq volt
do
if [ ${freq//[mhz:]/} == 2265 ]
then
val=$((${volt//[ mV]/} - $pvs))
fi
done < /sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
echo $val
;;
vwrite)
P=/sys/devices/system/cpu/cpu0/cpufreq/UV_mV_table
readvolt=$(/res/synapse/hrtkernel/actions/default vread)
default=`echo $readvolt | busybox awk '{$NF *= -1; print}'`
if [ ! -z $2 ]
then
val=""
while read freq volt; do val="$val $(($default + $2 + ${volt//[ mV]/}))"; done < $P
echo $val > $P
fi
echo $(/res/synapse/hrtkernel/actions/default vread)
;;
hotplug)
P=/sys/module/intelli_plug/parameters/intelli_plug_active
if [ ! -z $2 ]
then
if [ $2 == 1 ]
then
stop mpdecision
else
start mpdecision
fi
echo $2 > $P
fi
echo `cat $P`
;;
dev)
echo "minealex2244"
;;
codename)
echo "Aldeon"
;;
version)
echo `busybox uname -r`
;;
kernel_version)
echo "3.4"
;;
android_version)
echo `getprop ro.build.version.release`
;;
build)
echo `getprop ro.build.PDA`
;;
baseband)
echo `getprop gsm.version.baseband`
;;
bootloader)
echo `getprop ro.bootloader`
;;
date)
echo `getprop ro.build.date`
;;
rom)
echo `getprop ro.build.display.id`
;;
serial)
P=/efs/FactoryApp/serial_no
if [ -f $P ]; then
echo `cat $P`
else
echo `getprop ro.boot.serialno`
fi
;;
susp)
echo `cat /sys/kernel/power_suspend/power_suspend_version`
;;
busybox_version)
$BB echo "$(busybox | head -1)"
;;
su_version)
$BB echo "$(su -v)"
;;
esac

Oops, something went wrong.

0 comments on commit 83fc878

Please sign in to comment.
You can’t perform that action at this time.