简体   繁体   English

以编程方式找到所连接设备的IMEI / ESN

[英]Find IMEI / ESN of attached device programmatically

I need to get IMEI/ESN of a mobile device when it is connected with the computer system using USB. 当使用USB将移动设备与计算机系统连接时,我需要获取移动设备的IMEI / ESN。 What can I do? 我能做什么? I came across JTAPI, but I am still not sure if there is an implementation good enough for my task. 我遇到了JTAPI,但是我仍然不确定是否有足够好的实现我的任务的实现。

PS: I of course need to do it programmaticaly. PS:我当然需要以编程方式进行。 I am using Java, and targeting windows systems. 我正在使用Java,并以Windows系统为目标。 So I am good with a C# solution too. 所以我对C#解决方案也很满意。 :) :)

Best Regards 最好的祝福

To do it in a (semi) generic way, the only way is to send this on the (emulated) serial port of the phone; 要以(半)通用方式进行操作,唯一的方法是在手机的(模拟)串行端口上发送此信息。

 AT+CGSN 

Some/most phones allow it, some don't. 有些/大多数手机允许,有些则不允许。 Those that don't sometimes have a manufacturer specific way of getting the IMEI, some don't allow it at all. 那些有时没有制造商特定方法来获取IMEI的方法,有些则根本不允许。

In other words, if you need a solution that is 100% generic for every manufacturer, you're probably out of luck. 换句话说,如果您需要一个对每个制造商都是100%通用的解决方案,那么您可能就不走运了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM