Adb Change Serial Number Android
How can I change the device name? (adb devices). Songs free download mp3. The device serial number (as reported by 'adb devices'). Change android development device id.
This question already has an answer here:
- adb shell dumpsys iphonesubinfo not working since Android 5.0 Lollipop 3 answers
I want to get/set an imei number for rooted android phone.
I tried this command
I tried this command also
I tried this command also
marked as duplicate by Alex P., Yvette Colomb♦, HaveNoDisplayName, Soner Gönül, VinzJan 8 '16 at 12:36
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
1 Answer
You can't set the IMEI, of any of the forms.
For getting it via ADB, see this question
Not the answer you're looking for? Browse other questions tagged androidadb or ask your own question.
I have two smart phones (ZTEV788d, system Android 2.3.6) connected to a computer (Ubuntu 11.10) at the same time, using command: adb devices
I got this:
The serial numbers are the same!
I wrote an application in the computer side to communicate with these two phones, for example install app and push files.
I used these commands:
Now these two phones have the same serial no (P753A12D
), when I run these commands I get this error:
So, my questions are:
Silver Efex Pro Viveza Analog Efex Pro HDR Efex Pro Dfine Sharpener Pro. A 30-day free trial with all Nik Collection 7 plugins features unlocked. Adobe Photoshop Elements 12 through 2018 (apart from HDR Efex Pro 2. With Photoshop Elements); Adobe Photoshop Lightroom 3 through 6/Classic CC 2018. Nik sharpener pro 3 free download. Apr 8, 2013 - Free to try Nik Software Windows XP/2003/Vista/7 Version 3.0 Full Specs. Nik Software has designed Nik Sharpener Pro 3.0 as a powerful, easy to use. All Versions. Out of 1 votes. You can download a 30 day free trial of Adobe Photoshop Maya 2011 mac CS4 for Windows, and download nik software sharpener pro 3 key a a free download.
- Is that normal that two phones to have the same serial no?
- Can I change the serial no? if yes, how?
- Is there any way to run these install, push commands successfully even if the serial no are the same?
Serial Number Idm
BTW, the WiFi/3G network will be turned off when I'll run the test.
7 Answers
Today I found an easy solution for this issue.
You'll get list of devices with their qualifiers
Then you can use qualifiers instead of serial numbers like this
or with transport_id
and -t
I faced the very same problem. It's because the adb tool uses the serial numbers for identification of devices connected to usb instead of their device paths (which are unique for sure).
If you feel up to getting your hands dirty, download the Android source tree, go to system/core/adb/transport.c
, change it to something like that:
type make adb
from the top level path and voila. Devices use usb paths for identification. Now you can install & execute all of the devices from Eclipse with one click.
if your device is rootedtry this way
to change serial number your devices , first connect one of them to your pc then type this in cmd
this shows your device id (serial number).
pick some new name ,for example NAME1
then type this commands
exit
exit from root exit
exit from shell
START
now unplug the usb cable and run this commands
connect your device again and type
now you can see changes
END
note : if it did not work first time
disconnect your phone and do this parts of my guide from START to END again.
1. Is that normal that two phones to have the same serial number?
The purpose of the serial number is to uniquely identify the device, so they should be different. That being said, some manufacturers don't bother. It's also possible that the firmware is reporting the number incorrectly.
You can check the serial number on the actual devices, and see if it matches what adb
is reporting.
2. Can I change the serial number? if yes, how?
There isn't an easy or consistent method for doing this that I'm aware of. Here are some examples where others have accomplished this feat (but I have not):
3. Is there any way to run these install, push commands successfully even if the serial numbers are the same?
There shouldn't be any problem running commands if only one device is connected at a time.
The answer given by @mirokropacek works for Linux (and presumably Mac, too) but doesn't work for Windows, unfortunately. This is due to the way the register_usb_transport
function is called in Windows. It turns out the devpath parameter is always NULL
in Windows. I needed to handle the same situation so I adapted the solution given above to randomly generate a device ID for each device if the serial
parameter is NULL or it is empty (zero length).
I don't need to worry about differentiating devices over long periods of time and many devices so generating a pseudo-random number for the device ID with rand
, then using sprintf
to create a string representation of that ID seems to be sufficient for my needs but YMMV. It only generates a 4-digit hex number but it works well enough for me (for now at least).
If you don't want to change the device itself, and/or don't have root access, and the device has network access, you could switch to using TCPIP instead of USB:
- Switch adb to using TCPIP:
adb tcpip 5555
- Have adb connect to the device using the network:
adb connect yourhostname
I've run this through SSH tunnels where it would connect to localhost, so all devices show up as 'localhost' which is quite unuseful. Adding hosts to /etc/hosts (that all pointed to localhost) fixed that for me.
Now newer adb
supports transport ID besides serial number:
Firstly run
You would see like below:
Now you could specify a device with