Skip to content

Commit

Permalink
Fixup minor stuff
Browse files Browse the repository at this point in the history
Signed-off-by: Pedrozzz0 <[email protected]>
  • Loading branch information
pedrozzz0 committed Aug 14, 2022
1 parent a4ba4c8 commit 0826eaf
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
3 changes: 1 addition & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ echo ""

echo "Zipping ${blink}FSCC-$v..."

zip -0 -r9 -ll "FSCC-$v.zip" . -x *.git* -x *.txt -x cleantrash -x mod-util.sh -x adjshield -x fscache-ctrl -x *.yml -x kingd -x ktsrmenu -x kingtweaks -x gameoptd -x libcommon.sh -x libktsr.sh -x kcal.sh -x build.sh

zip -0 -r9 -ll "FSCC-$v.zip" . -x *.git* -x fscache-ctrl -x fscc -x build.sh -x _config.yml
mv -f "FSCC-$v.zip" ../out

exit=$(date +%s)
Expand Down
16 changes: 15 additions & 1 deletion fscc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ apx1="/apex/com.android.art/javalib"
apx2="/apex/com.android.runtime/javalib"
fscc_file_list=""
fscc_log="/data/media/0/ktsr/fscc.log"
ver="1.0.0"
ver="1.0.1"

log_i() {
echo "[$(date +%T)]: [*] $1" >>"$fscc_log"
Expand All @@ -41,6 +41,20 @@ notif_end() { su -lp 2000 -c "cmd notification post -S bigtext -t 'FSCC is execu
exit 1
}

[[ "$(command -v busybox)" ]] && {
total_ram=$(busybox free -m | awk '/Mem:/{print $2}')
total_ram_kb=$(grep [0-9] /proc/meminfo | awk '/kB/{print $2}' | head -1)
avail_ram=$(busybox free -m | awk '/Mem:/{print $7}')
} || {
total_ram=$(free -m | awk '/Mem:/{print $2}')
total_ram_kb=$(grep [0-9] /proc/meminfo | awk '/kB/{print $2}' | head -1)
avail_ram=$(free -m | awk '/Mem:/{print $7}')
}

sdk=$(getprop ro.build.version.sdk)
[[ "$sdk" == "" ]] && sdk=$(getprop ro.vendor.build.version.sdk)
[[ "$sdk" == "" ]] && sdk=$(getprop ro.vndk.version)

# $1:apk_path $return:oat_path
# OPSystemUI/OPSystemUI.apk -> OPSystemUI/oat
fscc_path_apk_to_oat() { echo "${1%/*}/oat"; }
Expand Down
4 changes: 2 additions & 2 deletions module.prop
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
id=fscc
name=FSCC
version=1.0.0
versionCode=99
versionCode=102
author=pedro (pedrozzz0 @ GitHub), Matt Yang (yc9559 @ GitHub)
description=A filesystem optimizer which focus on optimizing user-experience.
build_date=Sun Aug 14 12:09:12 -03 2022
build_date=Sun Aug 14 12:27:41 -03 2022

0 comments on commit 0826eaf

Please sign in to comment.