Commands

Click the following links to install commands with uweb browser. Force exit and re-launch the app, then long press the button with clock icon to popup the command menu.

"/sdcard/uweb/default.cmds" examples:

Clear data::toybox find /data/data/info.torapp.uweb/app_webview ! -name 'Cookies' -type f -delete

VPN::am start -a android.net.vpn.SETTINGS

wireless::am start -a android.settings.WIRELESS_SETTINGS

Append query to autocomplete:uweb:cd /sdcard/uweb;cat default.autoc query.log|toybox sort|toybox uniq -i>a.tmp;mv a.tmp default.autoc;>query.log;echo file:///sdcard/uweb/default.autoc

Backup cookie::toybox cp /data/data/info.torapp.uweb/app_webview/Default/Cookies /sdcard/uweb/.

Restore cookie::toybox cp /sdcard/uweb/Cookies /data/data/info.torapp.uweb/app_webview/Default/.

Clear cache::toybox rm -rf /data/data/info.torapp.uweb/cache

Clear logcat::logcat -c

logcat.log::logcat -d > /sdcard/uweb/logcat.log

copy cookie:/clip:printf '%c'

tgz install::toybox tar -xzf %f -C /

Need root permissions:

Need termux:

cd:termux/*:cd %f;exit 1

vim:termux/*:vim %f

deduplicate history::awk -F'\t' '!s[\$2]++' /sdcard/uweb/history.rec>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/history.rec

deduplicate bookmarks::awk '!s[\$0]++' /sdcard/uweb/bookmark.html>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/bookmark.html

deduplicate hosts::toybox tac /sdcard/uweb/default.hosts|awk -F' ' '!s[\$1]++' |toybox tac>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/default.hosts

deduplicate siteconf::toybox tac /sdcard/uweb/default.siteconf|awk -F':' '!s[\$1]++' |toybox tac>/sdcard/a.tmp;mv /sdcard/a.tmp /sdcard/uweb/default.siteconf

Send url::printf '%u'|/system/bin/toybox nc 192.168.2.155 1500

Send url(player)::printf 'i:5g%u'|/system/bin/toybox nc 192.168.2.155 1500

Sendurl(bookmark)::printf 'i:51../home5:i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500

Send url(fullscreen)::printf 'i:5f%u'|/system/bin/toybox nc 192.168.2.155 1500

Send url(video)::printf 'i:0mc16:%u'|/system/bin/toybox nc 192.168.2.155 1500

Send url(clipboard):clip:(printf 'i:5b';cat)|/system/bin/toybox nc 192.168.2.155 1500

Clipboard2PC:clip:ssh fengcao@192.168.2.120 'DISPLAY=:0 xsel -i'

ClipboardFromPC:/clip:ssh fengcao@192.168.2.120 'DISPLAY=:0 xsel -o'

Clipboard broadcast:clip:socat - UDP-DATAGRAM:255.255.255.255:1500,broadcast

Clipboard from broadcast:/clip:socat -u udp-recvfrom:1500 SYSTEM:'cat;exit'

Clipboard2QR:clip/uweb:qrencode -o /sdcard/uweb/a.png;echo file:///sdcard/uweb/a.png

"Send url" needs to modify Android TV ip address. Clipboard2PC needs to modify username, PC needs xsel. ssh needs to be installed inside termux (apt install openssh). Clipboard broadcast needs socat(apt install socat)。 Clipboard2QR needs libqrencode.