usb-otg应用程序挂起批量转接电话

时间:2019-01-31 14:26:42

标签: java usb-otg apktool

我正在尝试调试一个适用于通过USB OTG连接的设备的Android应用程序-该应用程序的名称为OTG Disk Explorer Pro 3.02。

我正在不带root访问权限的智能手机上对其进行调试,但是我能够将调试消息重定向到文件中。所以我确实有日志。问题是该应用程序有时会因日志中的以下内容而挂断:

2019-01-31 07:58:11 :: Download :: Download Start
2019-01-31 07:58:11 :: Download :: Thread Start
2019-01-31 07:58:11 :: ODE :: >==< Download Start!!! >==<
2019-01-31 07:58:11 :: Download :: Download Start:smth.mp3
2019-01-31 07:58:11 :: Download :: CopyFileToUSB Start:smth.mp3
2019-01-31 07:58:11 :: ODE :: >==< PATH:/storage/emulated/0/ADM/smth.mp3 >==<
2019-01-31 07:58:11 :: ODE :: >==< get file entry >==<
2019-01-31 07:58:11 :: Download :: File is Local:smth.mp3
2019-01-31 07:58:11 :: ODE :: >==< get file ok, length= 12130124 >==<
2019-01-31 07:58:13 :: FTDI_USB :: >==< Data Read:55 53 42 53 28 03 00 00 00 00 00 00 00 >==<
2019-01-31 07:58:23 :: FTDI_USB :: >==< Data Read:55 53 42 53 2a 03 00 00 00 00 00 00 00 >==<
2019-01-31 07:58:24 :: FTDI_USB :: >==< [Send CBW Fail] 55 53 42 43 2d 03 00 00 00 40 00 00 00 00 0a 2a 00 00 44 00 10 00 00 10 00 00 00 00 00 00 00 get return bytes:-1 >==<
2019-01-31 07:58:24 :: FTDI_USB :: >==< Data Read:55 53 42 53 2a 03 00 00 00 00 00 00 00 >==<
2019-01-31 07:58:25 :: FTDI_USB :: >==< [Send CBW Fail] 55 53 42 43 2e 03 00 00 00 40 00 00 00 00 0a 2a 00 00 44 00 20 00 00 10 00 00 00 00 00 00 00 get return bytes:-1 >==<
2019-01-31 07:58:25 :: FTDI_USB :: >==< Data Read:55 53 42 53 2a 03 00 00 00 00 00 00 00 >==<
2019-01-31 07:58:25 :: FTDI_USB :: >==< [Send CBW Fail] 55 53 42 43 2f 03 00 00 00 40 00 00 00 00 0a 2a 00 00 44 00 30 00 00 10 00 00 00 00 00 00 00 get return bytes:-1 >==<
2019-01-31 07:58:25 :: FTDI_USB :: >==< Data Read:55 53 42 53 2a 03 00 00 00 00 00 00 00 >==<
2019-01-31 07:58:26 :: FTDI_USB :: >==< [Send CBW Fail] 55 53 42 43 30 03 00 00 00 40 00 00 00 00 0a 2a 00 00 44 00 40 00 00 10 00 00 00 00 00 00 00 get return bytes:-1 >==<
2019-01-31 07:58:26 :: FTDI_USB :: >==< Data Read:55 53 42 53 2a 03 00 00 00 00 00 00 00 >==<
2019-01-31 07:58:27 :: FTDI_USB :: >==< [Send CBW Fail] 55 53 42 43 31 03 00 00 00 40 00 00 00 00 0a 2a 00 00 44 00 50 00 00 10 00 00 00 00 00 00 00 get return bytes:-1 >==<
2019-01-31 07:58:27 :: FTDI_USB :: >==< Data Read:55 53 42 53 2a 03 00 00 00 00 00 00 00 >==<
2019-01-31 07:58:28 :: FTDI_USB :: >==< [Send CBW Fail] 55 53 42 43 32 03 00 00 00 40 00 00 00 00 0a 2a 00 00 44 00 60 00 00 10 00 00 00 00 00 00 00 get return bytes:-1 >==<
2019-01-31 07:58:28 :: FTDI_USB :: >==< Data Read:55 53 42 53 2a 03 00 00 00 00 00 00 00 >==<
2019-01-31 07:58:29 :: FTDI_USB :: >==< [Send CBW Fail] 55 53 42 43 33 03 00 00 00 40 00 00 00 00 0a 2a 00 00 44 00 70 00 00 10 00 00 00 00 00 00 00 get return bytes:-1 >==<

可以看到,“发送CBW失败”只是重复一次。

以下是与此相关的反编译Java代码:

private synchronized void m3393d() {                                                          ByteBuffer byteBuffer = this.f1928i;
        int i = this.f1941v;
        this.f1941v = i + 1;
        byteBuffer.putInt(4, i);
        int length = this.f1928i.array().length;
        i = this.f1922c.bulkTransfer(this.f1927h, this.f1928i.array(), length, 800);
        if (i != length) {
            m3390a("[Send CBW Fail] " + m3388a(this.f1928i.array()) + " get return bytes:" + i);
            throw new aq("Send Command Failed", -1);
        }
    }

此外,从日志中获取有关设备的信息:

2019-01-31 07:55:44 :: ODE :: >==< USB Attached! >==<
2019-01-31 07:55:45 :: ODE :: >==< enumerating >==<
2019-01-31 07:55:45 :: ODE :: >==< Found device: 0781:74E8 Class 00:00 >==<
2019-01-31 07:55:45 :: ODE :: >==< Device under: /dev/bus/usb/001/007 >==<
2019-01-31 07:55:45 :: ODE :: >==< No permission >==<
2019-01-31 07:55:45 :: ODE :: >==< no more devices found >==<
2019-01-31 07:55:52 :: ODE :: >==< Permission granted >==<
2019-01-31 07:55:52 :: ODE :: >==< Premission:true >==<
2019-01-31 07:55:52 :: ODE :: >==< Interface Count: 1 >==<
2019-01-31 07:55:52 :: ODE :: >==< connecting... >==<
2019-01-31 07:55:52 :: ODE :: >==< Got interface! >==<
2019-01-31 07:55:52 :: ODE :: >==< Claimed interface! >==<
2019-01-31 07:55:52 :: ODE :: >==< Class: 0x08 >==<
2019-01-31 07:55:52 :: ODE :: >==< Sub Class: 0x05 >==<
2019-01-31 07:55:52 :: ODE :: >==< Protocol: 0x50 >==<
2019-01-31 07:55:52 :: ODE :: >==< EP: 0x81 >==<
2019-01-31 07:55:52 :: ODE :: >==< Bulk Endpoint >==<
2019-01-31 07:55:52 :: ODE :: >==< [IN] >==<
2019-01-31 07:55:52 :: ODE :: >==< EP: 0x02 >==<
2019-01-31 07:55:52 :: ODE :: >==< Bulk Endpoint >==<
2019-01-31 07:55:52 :: ODE :: >==< [OUT] >==<
2019-01-31 07:55:52 :: ODE :: >==< USBInterface#0 >==<
2019-01-31 07:55:52 :: FTDI_USB :: >==< readcapacity >==<
2019-01-31 07:55:52 :: FTDI_USB :: >==< Capacity Result:00 fc cf ff 00 00 04 00 >==<
2019-01-31 07:55:52 :: FTDI_USB :: >==< Sectors, Sector Size:16568319, 1024 >==<
2019-01-31 07:55:52 :: ODE :: >==< Sectorsize:1024 >==<

那可能是什么问题?

0 个答案:

没有答案