FORUMS
Remove All Ads from XDA

[Guide] [Android 6.0+] Change Device Model Name (Additional Steps Required)

422 posts
Thanks Meter: 96
 
By JBNex, Senior Member on 18th February 2017, 08:35 PM
Post Reply Email Thread
Starting from Android Marshmallow and above, simply changing the ro.product.model entry in /system/build.prop will not change the device's name everywhere. The build.prop change can only be seen in Settings > About phone.

Introduced in 6.0, Android stores your device name in an additional location, in addition to the build.prop entry. It is stored in a database in your phone's memory. The value in the database is populated the first time you boot up your device (after installing ROM for example), so even if you alter the device name in build.prop, apps can still detect your "old" device name through the database entry.

In the past, the database was stored in a file, but since Marshmallow Settings Storage (com.android.providers.settings) stores a bunch of your phone's settings in memory. Here is how you can change your device's model name.

1. You should modify the ro.product.model entry your /system/build.prop if you haven't already:
Example:
Code:
ro.product.model=My Phone Model Name
2. Next, connect your device to the computer, make sure you have ADB installed.

Alternatively, you can use Terminal Emulator on your device. Run the commands below as root user, but do not include the adb shell part.

3. Execute the following to see the device name stored in the device's Settings database:
Code:
adb shell settings get global device_name
It should return your current device name, <DEVICE_NAME>.

4. Replace the existing model name with a new one:
Code:
adb shell settings put global device_name "<NEW_DEVICE_NAME>"
For example, if I want to change my device name to My Phone Model Name, I would issue the following command:
Code:
adb shell settings put global device_name "My Phone Model Name"
6. Now check to see the device name is updated (same as first command)
Code:
adb shell settings get global device_name
It should now return the updated device name. E.g, My Phone Model Name

Next, reboot your device and apps should correctly detect your new device name.

I hope this helps! Feel free to leave any questions or comments in this thread.

Additional Resources:
@piit79 has a similar tutorial for changing your device's ID, also for Marshmallow and above:
https://forum.xda-developers.com/nex...2#post63168322
The Following 9 Users Say Thank You to JBNex For This Useful Post: [ View ] Gift JBNex Ad-Free
 
 
19th February 2017, 12:30 AM |#2  
MishaalRahman's Avatar
Editor in Chief
Thanks Meter: 1,817
 
More
Good tutorial, but I would recommend using simpler ADB commands.

For example, change this:

adb shell content insert --uri content://settings/global --bind name:s:device_name --bind value:s:<DEVICE_NAME>

to this:

adb shell settings put global device_name <DEVICE_NAME>
The Following 2 Users Say Thank You to MishaalRahman For This Useful Post: [ View ] Gift MishaalRahman Ad-Free
19th February 2017, 01:13 PM |#3  
JBNex's Avatar
OP Senior Member
Thanks Meter: 96
 
More
Quote:
Originally Posted by MishaalRahman

Good tutorial, but I would recommend using simpler ADB commands.

For example, change this:

adb shell content insert --uri content://settings/global --bind name:s:device_name --bind value:s:<DEVICE_NAME>

to this:

adb shell settings put global device_name <DEVICE_NAME>

Thanks, that makes it much simpler. Seems like the put command overwrites the existing value for you.
20th February 2017, 10:02 PM |#4  
bombaglad's Avatar
Senior Member
Flag Bratislava
Thanks Meter: 140
 
More
wow, good job, this looks really good (though i don't need it right now, it is good to know it's possible). my question is, would something similar be possible for the name of the rom and kernel? i'd like my bank's app to think i'm on stock, it does check safetynet but even with magisk and passed safetynet it doesn't work on any other rom than stock.. thanks in advance for your answer!
20th February 2017, 10:27 PM |#5  
prwnd's Avatar
Member
Thanks Meter: 14
 
More
Google Photos
Will this enable Google Photos full size backup if I rename my 6P to Pixel XL?
The Following User Says Thank You to prwnd For This Useful Post: [ View ] Gift prwnd Ad-Free
20th February 2017, 11:48 PM |#6  
Member
Flag Garland, TX
Thanks Meter: 13
 
More
This looks like it only changes the device name, that we can change through settings anyways. Editing the build.prop changed the model, but nothing else has changed that I can tell. For example, my Note 3 is running an S7 Edge port, the device and model name have been changed back to SM-900V (for the Note 3) but the product is still showing hero2ltexx. I realize that's just another build.prop line.

There is a huge possibility that this is doing just what it was intended to do and I daydreamed some imaginary far off results, but I figured I'd list it in case it was any help...thank you
21st February 2017, 12:57 AM |#7  
JBNex's Avatar
OP Senior Member
Thanks Meter: 96
 
More
Quote:
Originally Posted by bombaglad

wow, good job, this looks really good (though i don't need it right now, it is good to know it's possible). my question is, would something similar be possible for the name of the rom and kernel? i'd like my bank's app to think i'm on stock, it does check safetynet but even with magisk and passed safetynet it doesn't work on any other rom than stock.. thanks in advance for your answer!

Hi, the ROM and kernel information are not stored in the global settings database. However, you can try modifying your ROM name in the /system/build.prop file.
The Following User Says Thank You to JBNex For This Useful Post: [ View ] Gift JBNex Ad-Free
21st February 2017, 01:02 AM |#8  
JBNex's Avatar
OP Senior Member
Thanks Meter: 96
 
More
Quote:
Originally Posted by prwnd

Will this enable Google Photos full size backup if I rename my 6P to Pixel XL?

I'm not sure, but I think the device name must be set to Pixel XL when you set up your device for the first time. This is why full-size Photo backups work on custom "Pixel" ROMs (for non-Pixel devices).
21st February 2017, 10:32 AM |#9  
Senior Member
Thanks Meter: 286
 
More
I'm sure you can do it with terminal emulator on rooted device, so no ADB and PC is needed.
21st February 2017, 01:28 PM |#10  
JBNex's Avatar
OP Senior Member
Thanks Meter: 96
 
More
Quote:
Originally Posted by minimale_ldz

I'm sure you can do it with terminal emulator on rooted device, so no ADB and PC is needed.

You are right, if using Terminal on your device, you must be root user and use the same commands but remove the adb shell part.
21st February 2017, 01:56 PM |#11  
srdjanLeo's Avatar
Senior Member
Flag Belgrade
Thanks Meter: 156
 
More
I got this:
Too many arguments
usage: settings [--user NUM] get namespace key
settings [--user NUM] put namespace key value
settings [--user NUM] delete namespace key
settings [--user NUM] list namespace
namespace' is one of {system, secure, global}, case-insensitive
If '--user NUM' is not given, the operations are performed on the owner user.

Xperia M4 Aqua E2303


EDIT: OK; old method worked for me. Successfuly changed it. New method didn't work.
Post Reply Subscribe to Thread

Tags
change android id, change name, device, model

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes