How can I get programmatically when the phone was manufactured?

Is there any framework, instrumentation or toolset like Windows WMIC that allows unequivocally get hardware parameters of the device?

I found this question but it is old, related to Motorola and has no answers, that is why I decided to ask a new one. I am seeking solution for Samsung phone, but vendor-agnostic way will be way better.

I know about IMEI way of checking the production date, but I want something more accurate that can be a double check.



2 Answers 2


Grabbing the exact manufacturing date of a phone programmatically is not a straightforward task, and there is no standard framework or API in Android that provides this information aka manufacturing date is not a an exposed parameter in the device's hardware or software.

IMEI way you mentioned is one of the methods to get an approximate manufacturing date, but it's not always accurate,

The closest I have come to getting this info consistently on all Android versions is this ( build.prop metadata )

stat -c %y /system/build.prop
2020-12-31 20:30:00

On some Android devices this date maybe stored in specific files depending on propriety flavor of Android used ( e.g. MIUI or colors Android ) and Android version. Below are just some pointer approaches to dig it out , rummaging through usual places.

find /sys/fs/pstore/ /var/log/ /data/logs/  <your  other paths>   -type f -exec cat {} \; | grep -E "First boot|Installation date"'

 { cat /proc/kmsg /sys/fs/pstore/dmesg-ramoops-0; logcat ; } | grep -i -E "First boot|Installation date"
  • first, the build.prop metadata gives incorrect results, as this file frequently modified by enthusiasts on rooted devices. This confirmed by my tests, I ran this command on my Xiaomi Mi11i with custom ROM Xiaomi.eu and it returned 2008. But this phone was released in May 2021
    – Suncatcher
    Aug 8, 2023 at 6:40
  • second, executing commands in subshell {} is not supported by adb shell, so your commands are unusable
    – Suncatcher
    Aug 8, 2023 at 6:56
  • @sun not so . I don t want the modified time. I get the creation time which remains unchanged. Yes I am rooted. Yes I did modify my prop and yes that date remained the same. Its a kind of hack situation you need to see proof in the output date that you see as pudding Aug 9, 2023 at 2:25
  • @sun all my command work in adb shell. MOF I tested em there . But I wasnt able to find any data on my phone and didnt sweat it. So I just threw in the commands if you wanna try that approach . It sounds like you critique answers too much without seeing if they work in your env. Aug 9, 2023 at 2:27
  • @sun Your poss right on that metdata. I didnt read your 1st comment. Lets see if I can dig up another hack. One thing clear as Niagara is - officially your going to be nay ed - you have to find a hack that works Aug 9, 2023 at 3:17

It can be difficult and occasionally impossible to determine a phone's exact manufacturing date programmatically, especially on Android devices because of privacy and security constraints. The manufacturing date of a phone is not directly accessible via a standard Android API or framework. Using the Build class, you can get the build time as shown below:

val buildTime = Build.TIME

Remember that this represents the time at which the firmware was created, not the date the device was manufactured.

  • 3
    Note that even if the phone has never received any update the firmware build date may be far away from the hardware production date, as the firmware can be way older than the hardware. As the question is about a Galaxy S21 which receives regular [security] updates, the firmware build date will be totally different than the hardware production date.
    – Robert
    Aug 2, 2023 at 7:11
  • 2
    Thats because its from chatgpt Aug 2, 2023 at 7:44
  • 1
    As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Aug 2, 2023 at 7:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .