Skip to content

Commit 58e93fa

Browse files
authored
1.0.1 version
Fixed bugs
1 parent 3461ac8 commit 58e93fa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sfa

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
#Screenfetch for Android by aspadm(c)2016
1+
#Screenfetch for Android (c)aspadm, 2016
22
#MIT license
33
#dependings: root(for screenshots), busybox(?)
44
#Used: cat, echo, ls, pm, grep, [[, clear, input, screencap, getprop, let, dumpsys, am
5-
sfav="0.1.1 alpha"
5+
sfav="1.0.1"
66

77

88

@@ -14,7 +14,7 @@ echo
1414
echo "usage: sfa <-hctsv>"
1515
echo " h - show help (this message)"
1616
echo " v - show version and exit"
17-
echo " c - also take screenshot (need root)"
17+
echo " c - also take screenshots of console/homescreen (need root)"
1818
echo " s - show system info with simple no utf8 logo"
1919
echo " t - as is prev, but without color (simple text)"
2020
echo
@@ -354,13 +354,13 @@ echo -e '\E[37;40m\033[0m'
354354
fi
355355

356356
#Screenshot taking
357-
if [[ "$root" == "1" ]]; then
358357
if [[ "$1" == -*c* ]]; then
358+
if [[ "$root" == "1" ]]; then
359359
sleep 1&&screencap -p /sdcard/sfa-console.png
360360
am start -a android.intent.action.MAIN -c android.intent.category.HOME&&sleep 1&&screencap -p /sdcard/sfa-homescreen.png
361+
else
362+
echo "Need root access for screenshot"
361363
fi
362-
elif [[ "$1" != "" ]]; then
363-
echo "Required root acces for screenshot"
364364
fi
365365

366366

0 commit comments

Comments
 (0)