如何在诺基亚 S60 SDK 模拟器中设置特定的 IMEI

发布于 2024-07-07 19:09:14 字数 43 浏览 10 评论 0原文

我还对其他允许设置模拟器 IMEI 的 Symbian SDK 感兴趣。

I'm also interested in other Symbian SDKs that allow to set their emulator's IMEI.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

陌路终见情 2024-07-14 19:09:15

模拟器的 IMEI 硬编码为“000000000000000”。 将 what 替换为您想要使用的任何内容,然后继续运行您的代码。

Symbian C++:

    TPlpVariantMachineId imei;
    PlpVariant::GetMachineIdL(imei); 
    imei.Copy(_L("123456789012345"));

S60 的 Python (PyS60):

    import sysinfo
    my_imei = sysinfo.imei()
    my_imei = u"123456789012345"

Emulator has hardcoded IMEI of '000000000000000'. Replace what with whatever you want to use and continue running your code.

Symbian C++:

    TPlpVariantMachineId imei;
    PlpVariant::GetMachineIdL(imei); 
    imei.Copy(_L("123456789012345"));

Python for S60 (PyS60):

    import sysinfo
    my_imei = sysinfo.imei()
    my_imei = u"123456789012345"
稍尽春風 2024-07-14 19:09:15

我处理这类事情的一般方法是用软件来实现

  1. 将 IMEI 获取代码放入一个全局可访问的函数中,并且仅使用该函数来获取 IMEI。
  2. #ifdef __WINS__ 可在 C++ 代码中使用,选择性地编译您想要在模拟器中返回的硬编码 IMEI。 在Java中,您可能可以通过其他方式告诉您正在模拟器中(例如,如果返回的IMEI是模拟器中固定的奇怪值),并采取相应的行动。
  3. 您可以更进一步,获得动态 IMEI。 一旦你这样做了,你会发现使用不同的 IMEI 测试你的代码变得更加容易。

My general approach to these kinds of things is do it in software.

  1. Put the IMEI fetching code into one globally-accessible function, and only use this function for IMEI fetching.
  2. #ifdef __WINS__ can be used in C++ code to selectively compile in the hard-coded IMEI you want to return in the emulator. In Java, you can probably tell you are in the emulator by other means (eg if the IMEI returned is a fixed weird value in the emulator), and act accordingly.
  3. You can go one step further and have a dynamic IMEI. Once you do that, you will find that testing your code with different IMEIs becomes much easier.
节枝 2024-07-14 19:09:15

我从未真正尝试过,但这是我最好的猜测:

模拟器没有适当的电话实现,除非:

  • 您通过红外/USB/串行将其链接到实际电话。 在这种情况下,模拟器电话组件将需要配置为使用 AT 命令来操控手机(即使手机不是 Symbian 手机)。 这允许您拨打电话、发送和接收 SMS/MMS,但肯定不会更改 IMEI。

  • 您使用SIMTSY模块。 这是一个使用配置文件来模拟电话事件的组件。 它可以假装发送短信/彩信,假装您正在接听电话……您知道,这些实际上都不会产生任何类型的网络流量。 我假设 IMEI 位于配置文件中,但我不希望您可以在不重新启动模拟器的情况下正确更改它。 我从未见过 SIMTSY 在 Symbian 本身之外使用,所以我不知道它是否可供第三方开发人员使用。 不过,它应该会在未来 2 年内与操作系统的其余部分一起开源。

还有一种可能性是,SDK 本身的构建方式使用构建时宏禁用了模拟器的大部分电话框架。 您应该检查 http://forum.nokia.com

I have never actually tried that but here's my best guess:

The emulator doesn't have a proper telephony implementation unless:

  • you link it to an actual phone over infrared/usb/serial. In which case the emulator telephony component will need configuration to use AT commands to pilot the phone (even if the phone isn't a Symbian phone). This allows you to make phone calls, send and receive SMS/MMS but certainly not change the IMEI.

  • you use the SIMTSY module. This is a component that uses configuration files to simulate telephony events. It can pretend to send SMS/MMS, pretend you are receiving a phone call...none of that actually creates any kind of network traffic, you understand. I assume the IMEI is in the configuration file but I don't expect you can properly change it without restarting the emulator. I have never seen SIMTSY used outside of Symbian itself so I don't know whether it is available to third-party developer. It should be open-sourced with the rest of the operating system within the next 2 years, though.

There is also the possibility that the way the SDK itself was built disabled most of the telephony framework for the emulator, using build-time macro. You should check http://forum.nokia.com

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文