Android根据bootmode设置usb config

1 Shell Script
bootmode=`getprop ro.bootmode`
bootmode=${bootmode:0:4}
adb_enabled=`getprop ro.debuggable`
pid9091_qti_bam="diag,serial_smd,rmnet_qti_bam,adb"
oem_usbcfg_init()
{
    case "$bootmode" in
        "ffbm" | "pid9")
            setprop persist.sys.usb.config $pid9091_qti_bam
            return
        ;;
    esac

    case "$adb_enabled" in
        "1")
            setprop persist.sys.usb.config mtp,adb
        ;;
        *)
            setprop persist.sys.usb.config mtp
        ;;
    esac
}

2 Abbreviations
ARC: Argonant RISC Core
AT91SAM9260: SAM means Smart ARM-based
ATMEL SAMBA: ATMEL Smart ARM-based Boot Assistant
DWC2:Design Ware Controller 2,Apple的嵌入式设备,包括iPad和iPhone都是使用的DWC2
ISP1161:Philips' Integrated host Solution Pairs 1161,“Firms introduce USB host controllers”,https://www.eetimes.com/document.asp?doc_id=1290054
SL811HS:Cypress/ScanLogic 811 Host/Slave,性能上与ISP1161(Integrated host Solution Pairs 1161)相当
TDI:TransDimension Inc.,该公司首先发明了将TT集成到EHCI RootHub中的方法,这样对于嵌入式系统来说,就省去了OHCI/UHCI的硬件,同时降低了成本,作为对该公司的纪念,Linux内核定义了宏ehci_is_TDI(ehci)
TT:Transaction Translator(事务转换器,将USB2.0的包转换成USB1.1的包)

你可能感兴趣的:(USB,bootmode,usb,config)