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

Search This thread

JBNex

Senior Member
Jul 21, 2012
422
100
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/ne...android-id-t3219345/post63168322#post63168322
 
Last edited:

MishaalRahman

Retired Editor in Chief
Nov 2, 2015
1,042
2,140
www.xda-developers.com
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>
 

JBNex

Senior Member
Jul 21, 2012
422
100
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.
 

bombaglad

Senior Member
Dec 14, 2014
356
140
25
Bratislava
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!
 

prwnd

Senior Member
Sep 11, 2011
95
14
Google Photos

Will this enable Google Photos full size backup if I rename my 6P to Pixel XL?
 
  • Like
Reactions: bombaglad

JMB2K

Member
Feb 12, 2011
36
15
Dallas, TX
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
 

JBNex

Senior Member
Jul 21, 2012
422
100
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.
 

JBNex

Senior Member
Jul 21, 2012
422
100
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).
 

srdjanLeo

Senior Member
Feb 9, 2011
638
160
35
Belgrade
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.
 
Last edited:

JBNex

Senior Member
Jul 21, 2012
422
100
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.
Which command did you use? Make sure your device name is surrounded by double quotes.
 
  • Like
Reactions: srdjanLeo

sahed01

Senior Member
Jan 26, 2015
396
29
24
Dhaka
Samsung Galaxy S21 Ultra
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).
.
i had the same question. in fact this is the main reason I wanna change my device model number :D now my question is... If i wanna change my device model from "oneplus 3" to "Google pixel" i just need to use the command "Pixel XL 9000"? right?
.
and another question... what's with the" Pixel XL 9000"??? can't i just simply use "pixel/ Google pixel" cause, as far as i know, Google also offer full size photo backup for both pixel and pixel xl.
 

JBNex

Senior Member
Jul 21, 2012
422
100
.
i had the same question. in fact this is the main reason I wanna change my device model number :D now my question is... If i wanna change my device model from "oneplus 3" to "Google pixel" i just need to use the command "Pixel XL 9000"? right?
.
and another question... what's with the" Pixel XL 9000"??? can't i just simply use "pixel/ Google pixel" cause, as far as i know, Google also offer full size photo backup for both pixel and pixel xl.

Oh that was just an example to show that you could change it to any name you want. Simply Pixel XL would work!
 

akhilchintu

New member
Aug 7, 2017
2
0
Error

Yeah bro
I have changed it using build.prox but now my device is Automatically switching off and on how to solve it.....
 

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    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/ne...android-id-t3219345/post63168322#post63168322
    2
    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>
    2
    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.
    1
    Google Photos

    Will this enable Google Photos full size backup if I rename my 6P to Pixel XL?
    1
    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.
    Which command did you use? Make sure your device name is surrounded by double quotes.