循环执行脚本:
while true;do procrank | grep com.topway.livetv; sleep 1; done
网络设置:
抓包:tcpdump-i eth1 -s0 -w /data/test.pcap
开启关闭网络端口:busyboxifconfig eth0 up; busybox ifconfig eth0 down
设置静态IP:busybox ifconfig eth0 192.168.88.2
配置VLan:busybox vconfig add eth0 10
修改VLan命名:ip link set eth0.10 name eth1
添加默认路由:busyboxroute add default gw 192.168.88.1 dev eth1
busybox route add -net10.0.0.0 netmask 255.0.0.0 dev eth0
删除路由:busyboxroute del -net 192.168.88.0 netmask255.255.255.0 dev eth0;
busybox route delete192.168.88.0;
busybox route delete192.168.88.0 dev eth0;
删除默认路由:
busybox route del default gw 192.168.88.1
海思平台录制码流:
echo save esstart > /proc/msp/demux_main -- beginsave es
echo savees stop > /proc/msp/demux_main --stop save es
echo saveallts start x[portid] > /proc/msp/demux_main -- begin save allts
echo saveallts stop > /proc/msp/demux_main --stop save allts
echo saveipts start x[ram portid]> /proc/msp/demux_main -- begin save ram port ts
echo saveipts stop > /proc/msp/demux_main --stop save ram port ts
echo savedmxts start x[dmxid] > /proc/msp/demux_main -- begin save all channels ts
echo savedmxts stop > /proc/msp/demux_main --stop save dmx ts
echo help> /proc/msp/demux_main -- show helpinfo
改变码流的存储路径:
echo storepath=/mnt/sda/sda1> /proc/msp/log
windows增加、删除路由:
routeadd -p 192.168.2.0 mask 255.255.255.0 192.168.2.117
routedelete -p 192.168.2.0
修改权限,用户组
chmod777 dir
chownroot:root skydb.db
手动DHCP
netcfg eth2dhcp
路由跟踪
busyboxtraceroute
海思显示,隐藏OSD层
echo show> /proc/msp/hifb0
echo hide> /proc/msp/hifb0
推jar包不用换重启
直接stop,start虚拟机
关闭内核打印
echo 0 >/proc/sys/kernel/printk
原因是因为压缩文件使用的相对路径 在当前目录下找不到 /usr目录,通过使用-C指定解压目录可解决此问题
tar -zxvfeclipse-jee-indigo-SR2-linux-gtk-x86_64.tar.gz -C /usr
在服务器自己的目录vim .bashrc
找到PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
修改为PS1='[\u@\W]$'
重新连接服务器即可
Git指令
git log--pretty=oneline
SQL查询指令
sqlite3/data/skyworth/database/skydb.db
查看数据库文件信息命令(注意命令前带字符'.'):
sqlite>.database
查看所有表的创建语句:
sqlite>.schema
查看指定表的创建语句:
sqlite>.schema table_name
以sql语句的形式列出表内容:
sqlite>.dump table_name
Example:设置显示信息以‘:’分隔
sqlite>.separator :
设置显示模式:
sqlite>.mode mode_name
Example:默认为list,设置为column,其他模式可通过.help查看mode相关内容
sqlite>.mode column
select *from service_tab where svid = 1010
网络包过滤字符串
httpcontains "sting"
设置环境变量
exportBOOTCLASSPATH=“/system/framework/skyworthdigital.jar”
export$BOOTCLASSPATH
开启海思打印
echo debugon > /proc/msp/hifb0
am手动掉起服务
amstartservice --es actionType "start" com.guoantvbox.skyduer/com.guoantvbox.skyduer.service.DuerService
amstartservice --es actionType "end"com.guoantvbox.skyduer/com.guoantvbox.skyduer.service.DuerService
拷贝指令
cp在脚本中执行加-cp拷贝文件,如果没有的文件就忽略错误;
编译升级包
makeout/target/product/Hi3798MV200/Emmc/update.zip
待机模式
echo mem> /sys/power/state
单独编译数太和库
mmmvendors/skyworth/libs/sksdk:libsk_ca_udrm
android系统mk中打印变量
$(warning "JNI_H_INCLUDE = $(JNI_H_INCLUDE)")
Android中查看当前的Surface
dumpsysSurfaceFlinger
sample_tsplay_pid播放ts
sample_tsplay_pid/mnt/sda/sda1/test.ts 1080i_50 0x5e1 h264 0x5e2 ac3
uti过滤录制码流
utiotgServer-D -f /mnt/test.ts
查看系统信息:
cat/proc/msp/sys
十六进制查看文件
hexdumpfile
readelf -dout/target/product/Hi3798MV200/loader_root/sbin/loader_recovery
echo off> /proc/utiotg
录制码流
echo tsstart > /proc/utiusb
echo tsstop > /proc/utiusb
echo saveipts start 130 > /proc/msp/demux_main
echo saveipts stop 130 > /proc/msp/demux_main
mount -oremount,rw /system
mount -text4 -rw /dev/block/platform/soc/by-name/system /system
读取寄存器的值
ln -s/dev/hi_mem /dev/mem
himm 0xf9c0c260 0x18
himm 0xf9c0c350 0
海思底层播放器日志抓取脚本
while true
do
cat /proc/msp/demux_*;
cat /proc/msp/vdec*;
cat /proc/vfmw/*;
cat /proc/msp/vpss*;
cat /proc/msp/avplay*;
cat /proc/msp/sync*;
cat /proc/msp/adec*;
cat /proc/msp/sound*;
cat /proc/msp/win*;
sleep 0.5;
done
编译指令
mkuserimg.sh-s out/target/product/Hi3798MV200/systemout/target/product/Hi3798MV200/obj/PACKAGING/systemimage_intermediates/system.imgext4 system 536870912 out/target/product/Hi3798MV200/root/file_contexts
查询共享内存
ls/proc/2897/fd -l | grep ashmem
查看空间大小
du -sh ~/
du -h--max-depth=1 ./dir
随机切台脚本
!/bin/sh
while true;
do
inputkeyevent 19;
sleep 2.5;
num=$(($RANDOM%145+1));
h=$((7+$(($num/100))));
t=$((7+$(($num%100/10))));
o=$((7+$(($num%10))));
echo $num$h $t $o;
inputkeyevent $h $t $o;
sleep 2.5;
num=$(($RANDOM%57+300));
h=$((7+$(($num/100))));
t=$((7+$(($num%100/10))));
o=$((7+$(($num%10))));
echo $num $h $t $o;
input keyevent $h $t $o;
sleep 2.5;
done
串口设置分辨率
disptest--help
关闭uti过滤
echo write0x10 0x882 0x0 > /proc/utiotg
喂狗
wdg feed
wdg disable
读取字节
md 0x1FFFFC0
抓取echo输出打印
while((1))
do
cat /proc/msp/vdec0* | grep ErrF;cat/proc/msp/vdec0* | grep ErrF >> /data/errFrame.log;sleep 1;
done &
windows中cmd打开抓包
net start npf
windows开启热点
netsh wlanset hostednetwork mode=allow ssid=wifi_yezi key=12345678
netsh wlanstart hostednetwork
write_rawfastplay clean
/system/bin/sleep9 && /system/bin/sy_tr069
不校验kernel,bootargs中加入caverify=n
录制命令
echo 0x2000 > /proc/vfmw
如果/proc/vfmw找不到
echo 0x200 0 >/proc/vfmw/info
查找端口号
busyboxnetstat -apn
echo outrect -40,176,576,352 >/proc/msp/win0100
查看window
dumpsyswindow
比make clean更严格的指令
makeclobber