3

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.

Thanks.

8
  • Stack Overflow answers indicate that it's not possible to get the production date Commented Aug 2, 2023 at 8:29
  • For Samsung phones, this claims to give more info sndeep.info/en Commented Aug 2, 2023 at 10:44
  • Between the IMEI dates and the date when your phone appeared on geekbench example could give you an approximate time window as a reasonable guess Commented Aug 2, 2023 at 11:05
  • Have you ever wanted to know the When the phone was manufactured? - Samsung specific. I used this app a lot on Note 2 and found it good. IIRC it had device specific USSD codes and shortcuts to trigger them Commented Aug 3, 2023 at 10:44
  • Sadly, on Verizon Samsung phones all the USSD codes are stripped down, neither works Commented Aug 4, 2023 at 5:56

2 Answers 2

0

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" 
7
  • 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 Commented Aug 8, 2023 at 6:40
  • second, executing commands in subshell {} is not supported by adb shell, so your commands are unusable Commented 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 Commented 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. Commented 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 Commented Aug 9, 2023 at 3:17
-1

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.

1
  • 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. Commented Aug 2, 2023 at 7:11

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.