开发者

How to detect phone handset brand and model info on Brew?

开发者 https://www.devze.com 2023-03-21 09:39 出处:网络
How do I runtime detect which make and model开发者_运维问答 a phone is, which is running Brew or Brew MP?This should work if you have USB logging enabled

How do I runtime detect which make and model开发者_运维问答 a phone is, which is running Brew or Brew MP?


This should work if you have USB logging enabled

printdevinfo(s, AEE_DEVICEITEM_MODEL_NAME); 
printdevinfo(s, AEE_DEVICEITEM_MANUFACTURER_NAME); 
printdevinfo(s, AEE_DEVICEITEM_FRIENDLY_NAME); 

and if printdevinfo is defined like this:

static void printdevinfo(IShell* s, int id) 
{ 
    AECHAR* pItemBuff;
    int nItemLen = 0; 

    ISHELL_GetDeviceInfoEx(s, AEE_DEVICEITEM_MANUFACTURER_NAME, NULL, &nItemLen); 
    pItemBuff = (AECHAR*)MALLOC(nItemLen); 
    if (!pItemBuff) return; 
    ISHELL_GetDeviceInfoEx(s, AEE_DEVICEITEM_MANUFACTURER_NAME, pItemBuff, &nItemLen); 
    DBGPRINTF("id_%d: '%S'", id, pItemBuff); 

    FREE(pItemBuff); 
} 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号