Android/adb 重定向控制台应用程序输出
我正在尝试通过 motorola droid 2 上的 adb shell
获取 WLAN 驱动程序控制接口的输出。该命令称为 wlan_cu。要运行该命令,我正在使用:
% wlan_cu -itiwlan0 -s /data/jay/stat.sh
与请求者建立连接.../Connection> Bssid_列表, 连接、取消关联、状态、Full_bssid_list、wPs/
状态:断开
MAC:f8.7b.7a.7b.b7.9b
SSID:<空>
BSSID:00.00.00.00.00.00
频道:<空>
驱动程序/、连接/、管理/、显示/、隐私/、扫描/、漫游/、qOs/、电源/、事件/、Bt 共存/、报告/、调试/、位/、关于、退出 [1] 分段错误 wlan_cu -itiwlan0 -s /data/jay/stat.sh
-s
选项用于从脚本读取 wlan_cu 命令。
% cat /data/jay/stat.sh
CS
/
q
如果我尝试重定向输出,即
% wlan_cu -itiwlan0 -s /data/jay/stat.sh &>; out.txt
out.txt
已创建,但为空,并且输出仍显示在屏幕上。有人有主意吗?被困在这个问题上有一段时间了。
I am trying to get the output of a WLAN driver control interface via adb shell
on a motorola droid 2. The command is called wlan_cu. To run the command,I am using:
% wlan_cu -itiwlan0 -s /data/jay/stat.sh
Connection established with supplicant .../Connection> Bssid_list,
Connect, Disassociate, Status, Full_bssid_list, wPs/Status : DISCONNECT
MAC : f8.7b.7a.7b.b7.9b
SSID :<empty>
BSSID : 00.00.00.00.00.00
Channel :<empty>
Driver/, Connection/, Management/, Show/, Privacy/, scAn/, roaminG/, qOs/, poWer/, eVents/, Bt coexsistance/, Report/, dEbug/, biT/, aboUt, Quit
[1] Segmentation fault wlan_cu -itiwlan0 -s /data/jay/stat.sh
The -s
option is to read wlan_cu commands from a script.
% cat /data/jay/stat.sh
c s
/
q
If I try to redirect the output i.e.
% wlan_cu -itiwlan0 -s /data/jay/stat.sh &> out.txt
out.txt
is created, but empty and the output still goes to screen. Anyone have an idea? been stuck on this for quite a while.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试将 stdout 和 stderr 重定向到 out.txt。试试这个,
you can try to redirect both stdout and stderr to the out.txt. Try this,