Man*_*rma 14 android imei android-emulator genymotion
有没有办法将IMEI添加到AndroVM(现在是Genymotion)或任何其他Android模拟器.而且我想要wlan0端口的MAC地址.我们已经有模拟器在lan0端口包含MAC但不包含wlan.我们怎么能这样做?如果熟人中有人这样做,请让他们捐款.
细节:
我正在尝试建立一个基于云的Android App测试中心作为我的大学预科课程,以部分实现我的技术学士(计算机科学)学位.我想知道如何为Genymotion获得更多配置.或者,如果您可以为我提供更多设备配置,并且是否可以非常快速地为不同设备构建genymotion配置.其次,如何在构建中添加MAC地址和IMEI号?
我们正在尝试模拟移动设备(非Google nexus)来构建基于云的测试中心.为此,我们尝试使用androVM(Genymotion),我们正面临一些问题
到目前为止我们做了什么
我们一直致力于从源代码"构建androVm"并尝试完成一些任务
我们到现在为止做了什么
下载使用repo init初始化repo的AndroVm源代码使用repo sync下载源代码使用午餐选择午餐菜单选择vbox86tp-userdebug
其他菜单full-eng没有工作,所以停止
很少有错误出现在我们的路上
制造错误:它们非常简单,所以解决了system.img没有生成:再次通过再次解决bin/bash jar命令错误:碰巧是通过导出jar命令的路径解决的路径错误.
几个问题


现在让事情变得有趣
这是我从Genymotion团队得到的回复:
Run Code Online (Sandbox Code Playgroud)I want my project to cover various configurations but for starters if i can get something like Samsung Galaxy phones and tab or as a如果我可以获得三星galaxy tab 2,那就开始吧.
您可以更改每个虚拟设备的屏幕大小和DPI.您可以切换导航栏和虚拟键盘.但是,我们无法提供包含三星等专有应用程序的虚拟设备.
Run Code Online (Sandbox Code Playgroud)Now here what we get is the MAC address of eth0/1 port. What if I need wlan MAC.除非已禁用两个网络接口中的一个,否则应该有2个接口,2个IP和2个MAC地址:adb shell ip a.2:eth0:mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:d4:fe:e0 brd ff:ff:ff:ff:ff:ff inet 192.168.56.101/24 brd 192.168.56.255 scope global eth0 inet6 fe80 :: a00:27ff:fed4:fee0/64范围链接valid_lft forever preferred_lft forever 3:eth1:mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:c8:37:e7 brd ff:ff :ff:ff:ff:ff inet 10.0.3.15/24 brd 10.0.3.255 scope global eth1 inet6 fe80 :: a00:27ff:fec8:37e7/64 scope link.
抱歉,我们不提供对特定ROM的支持.不过,我强烈建议您访问社区:https: //groups.google.com/forum/#!forum/genymotion-users
Run Code Online (Sandbox Code Playgroud)1. What an OVA file consits of and how can it be created ?From what i have seen it contains few VMDK's and few configurations files附在上面,
"整个目录可以作为OVA包进行分发,这是一个包含OVF目录的tar归档文件." (http://en.wikipedia.org/wiki/Open_Virtualization_Format)
Run Code Online (Sandbox Code Playgroud)2. How to convert the platform specific image files(system.img ramdisk.img userdata.img) into an OVA or ISO file. If at all we are missing few files to give to the emulator, can you just name them.请阅读社区教程
Run Code Online (Sandbox Code Playgroud)3. Also how to add IMEI number目前无法添加IMEI号码.此功能将在不久的将来推出
Run Code Online (Sandbox Code Playgroud)4. We already have MAC for eth0 port but we want it on wlan port有2个接口:eth0和eth1.Eth0用于Genymotion应用程序小部件.如果此网络连接中断,Genymotion将无法再启动.Eth1用于网络当前访问(假WiFi连接).您可以根据需要更改此网络配置.
Viv*_*sal 11
移动应用程序通常通过IMSI号码(与SIM卡相关联)或IMEI号码(设备的唯一ID)来识别用户.当然,它也可以在Android上:
TelehponyManager manager = (TelehponyManager)getSystemService(TELEPHONY_SERVICE);
String imei = manager.getDeviceId();
String imsi = manager.getSubscriberId();
此代码在真实设备上完美运行,但在仿真器下IMEI始终为全零,并且不可配置.调试使用IMEI作为用户ID的启用网络的应用程序时,很快就会变得很尴尬.
尝试解决问题我首先查看了TelephonyManager服务,只是为了找到以下代码段:
private IPhoneSubInfo getSubscriberInfo() {
// get it each time because that process crashes a lot
return IPhoneSubInfo.Stub.asInterface(ServiceManager.getService("iphonesubinfo"));
}
公平评论,不是吗?它真的让我的一天:)
无论如何,代码分析显示IMEI/IMSI请求通过所有电话层(参见图表)向下,最终到达基带设备.在仿真系统的情况下,rild守护进程与libreference-ril.so一起使用 - 参考Vendor RIL库,它使用普通的旧AT命令与基带调制解调器设备通信.
调制解调器设备本身是在Android系统外部模拟的,作为qemu(这是模拟器的核心)的一部分.仿真器和在仿真器内部运行的Android系统之间的通信细节本身很有趣(所有通信都通过虚拟串口,Android系统的qemud守护进程用于(de)多路复用数据).我将尽快发布该主题的简要介绍.
可以在external/qemu/telephony/android_modem.c中找到虚拟调制解调器实现.该文件最重要的部分是这个功能:
const char*  amodem_send( AModem  modem, const char*  cmd );
为每个接收到的AT命令调用此函数.对于每个命令,搜索sDefaultResponses数组以查找给定命令,并发送预定义响应,或执行命令处理程序.数组本身看起来像:
static const struct {
const char*      cmd;     /* command coming from libreference-ril.so, if first
                             character is '!', then the rest is a prefix only */
const char*      answer;  /* default answer, NULL if needs specific handling or
                             if OK is good enough */
ResponseHandler  handler; /* specific handler, ignored if 'answer' is not NULL,
                             NULL if OK is good enough */
} sDefaultResponses[] =
{
    /* ... */
    { "+CIMI", OPERATOR_HOME_MCCMNC "000000000", NULL },   /* request internation subscriber identification number */
    { "+CGSN", "000000000000000", NULL },   /* request model version */
    /* ... */
};
上面引用的两个数组行负责IMSI和IMEI检索.如您所见,这两个值都是硬编码的,如果不重新编译模拟器,就没有机会修改它们.
然而,一个老派的黑客派上用场.模拟器二进制文件未加密也未压缩,因此字符串文字应在模拟器二进制文件中可见.实际上它们是,并且可以通过几个简单的步骤修改IMEI号:
** backup the emulator binary
** open the binary with your favourite hex editor
** search for +CGSN string followed by a null byte, it should be followed by 15 digits of the IMEI number
** edit the number, be careful not to change the number of digits
** save the file, that’s all!
当然,这不是一个非常舒适的解决方案,但总比没有好.在下一部分中,我将解释如何使IMEI编号成为可配置选项.请享用!