Extension: Terminal. Shell LINUX.

2720 views
Skip to first unread message

Juan Antonio

unread,
Aug 20, 2017, 7:47:42 AM8/20/17
to mitappinv...@googlegroups.com
Hi friends,

this extension is a Terminal, a Shell LINUX.

- You can write a line command in TextBox and then Click Run Button, or
- Select an example in ListView.

Commands: 
mkdir, ls, echo, cat, cp, mv, rm, date, uptime, pwd, id, df, ifconfig, touch, mount, rmdir, ps, top, grep, set, netstat, logcat, getprop, service list, use wildcards.

- You can get information about battery, system, user, device, memory,...

- You can copy database:
 /data/data/com.android.providers.settings/databases/settings.db in SdCard, then in PC, and then open Sqlite with https://sqliteonline.com/
 
 - With https://play.google.com/store/apps/details?id=com.airmore you can look and copy files from mobile to PC by WiFi. (Click Archives and Reflector.)

- Restrictions:

- Not return errors messages.

- cd command doesn't work

- gzip compress, but not uncompress.


- Commands examples in ListView:


mkdir /mnt/sdcard/DIREC,
ls -al /mnt/sdcard/,
echo "Hola amigos." > /mnt/sdcard/DIREC/saludos.txt,
cat /mnt/sdcard/DIREC/saludos.txt,
cp /mnt/sdcard/DIREC/saludos.txt /mnt/sdcard/DIREC/bien.txt,
cat /mnt/sdcard/DIREC/bien.txt,
mv /mnt/sdcard/DIREC/bien.txt  /mnt/sdcard/DIREC/BIEN.txt,
rm  /mnt/sdcard/DIREC/BIEN.txt,
date,
uptime,
pwd,
id,
df,
ifconfig wlan0,
getprop,
getprop ro.product.model,
getprop | grep serial,
getprop | grep persist.sys.timezone,
ps,
top -n 1,
cat /proc/stat,
cat /proc/meminfo,
cat /proc/version,
mount,
logcat -t 400,
touch /mnt/sdcard/ARCHIVO.TXT,
rm /mnt/sdcard/DIREC/*,
rmdir - p /mnt/sdcard/DIREC,
sleep 4,
ls /sdcard/*.txt,
ls /system/bin/,
ls /system/bin/ > /mnt/sdcard/comandos.txt,
ls -l /system/media/audio/ui/,
cp /system/media/audio/ui/* /mnt/sdcard/,
ps | grep appin,
echo $PATH,
echo $EXTERNAL_STORAGE,
set,
netstat,
service list,
ls -l /sys/class/power_supply/battery/,
cat /sys/class/power_supply/battery/batt_vol,
cat /sys/class/power_supply/battery/capacity,
cat /sys/class/power_supply/battery/batt_temp,
cat /sys/class/power_supply/battery/health,
cat /sys/class/android_usb/android0/iSerial,
ls -l /sys/class/,
cat /data/data/com.android.providers.settings/databases/settings.db > /mnt/sdcard/settings.db

- Regards.

- Juan Antonio Villalpando



p178i_Extension_Terminal.aia
com.KIO4_Terminal.aix

Abraham Getzler

unread,
Aug 21, 2017, 1:01:09 PM8/21/17
to MIT App Inventor Forum

Juan Antonio

unread,
Aug 21, 2017, 5:44:40 PM8/21/17
to mitappinv...@googlegroups.com
Thanks Abraham.

Now a new update,

I add this lines to end file comandos.txt

cat /data/data/com.android.providers.settings/databases/settings.db > /mnt/sdcard/settings.db,
su -c "cat /data/misc/wifi/wpa_supplicant.conf > /storage/sdcard1/wifi-networks.txt",
cat /storage/sdcard1/wifi-networks.txt

If you can be root, in that file you can read your wifi passwords.

------------------------------------------------------------------------------------------

- Others commands:

alias
history
alias dire='ls -ali'  (?)
dire                      (?)

- File start sh (bash) (sh is mkshrc) alias, prompt...

cat /system/etc/mkshrc



p178i_Extension_Terminal.aia
Reply all
Reply to author
Forward
0 new messages