android emulator从emulator-5554重命名为唯一字符串 [英] android emulator renaming from emulator-5554 to a unique string
问题描述
因此,在启动模拟器时,adb设备会给我
So when on starting up an emulator , adb devices give me
emulator-5554设备
emulator-5554 device
直到此处都是花花公子。
All dandy till here.
我的设想是创建一个模拟器场,其中包含多个模拟器多个设备。为了与机器A上运行的模拟器5554与机器B上运行的模拟器5554唯一区分开来,我想将模拟器5554重命名为机器A-模拟器-5554和机器B-模拟器-5554。到处搜索并没有给我太大帮助(因为大多数问题都与实际设备重命名有关)。上面有任何指针吗?
What i am envisioning is to create an emulator farm with multiple emulators spawned up on multiple devices. In order to uniquely differentiate from an emulator-5554 running on machine A from emulator-5554 running on machine B ,I would like to rename emulator-5554(s) to something like machineA-emulator-5554 and machineB-emulator-5554. Searching around did not find me much help ( as a majority of the questions were regarding actual device renaming). Any pointers on the above?
NP:我曾尝试使用随机字符串
对serialno进行setprop,然后检查它是否实际上发生了变化(并且确实发生了变化)
NP:I had tried to do a setprop on serialno with a random string and then checked to see whether it actually changed ( and it had)
root @ generic_x86:/#getproppersist.usb.serialno
root@generic_x86:/ # getprop persist.usb.serialno
76876987gg
76876987gg
奇怪地运行adb设备使我的状态为
Weirdly running adb devices gave me a status of
emulator-5554脱机
emulator-5554 offline
模拟器名称未更改,状态变为脱机。我在这里想念什么吗?
The emulator name did not change and the status went offline. Am i missing something here?
推荐答案
adb
服务器扫描的TCP TCP范围
端口,当它发现在这些端口上监听的内容时,会将其注册为具有 adb
代码以实现您的自定义命名方案,也可以仅使用其他功能来标识您的模拟器实例。
adb
server scans range of TCP
ports and when it finds something listening on those ports it registers it as a device with the emulator-XXXX
name. No configuration of the device itself can change that. You could either modify the adb
code to implement your custom naming scheme or just use some other facility to identify your emulator instances.
这篇关于android emulator从emulator-5554重命名为唯一字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!