Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Runtime Development

Reply
Developer
rakesh86shankar
Posts: 988
Registered: ‎05-22-2009
My Device: Not Specified
Accepted Solution

How to get the Device OS Versions of the device

[ Edited ]

Hi,

 

I am trying to get the exact device OS versions,I am getting like below 

 

07-30 12:39:31.842: I/System.out(76509407): HEIGHT720
07-30 12:39:31.888: I/System.out(76509407): HI--2
07-30 12:39:31.896: I/System.out(76509407): Device Software Version is>>>>01
07-30 12:39:31.900: I/System.out(76509407): Release Version is2.3.3
07-30 12:39:31.900: I/System.out(76509407): CODENAME Version isREL
07-30 12:39:31.900: I/System.out(76509407): INCREMENTAL Version isplayer-2.0.0_dev.eng.SER
07-30 12:39:31.900: I/System.out(76509407): SDK Version is10
07-30 12:39:31.900: I/System.out(76509407): BOARD:SQR100-2
07-30 12:39:31.900: I/System.out(76509407): BOOTLOADER:unknown
07-30 12:39:31.900: I/System.out(76509407): BRAND:BlackBerry
07-30 12:39:31.901: I/System.out(76509407): DEVICE:Q5
07-30 12:39:31.901: I/System.out(76509407): FINGERPRINT:BlackBerry/BlackBerry/Q5:2.3.3/10.1.0.123/player-2.0.0_dev.eng.SER:user/test-keys
07-30 12:39:31.901: I/System.out(76509407): HARDWARE:SQR100-2
07-30 12:39:31.901: I/System.out(76509407): HOST:brx278cnc
07-30 12:39:31.901: I/System.out(76509407): ID:10.1.0.123
07-30 12:39:31.901: I/System.out(76509407): MANUFACTURER:RIM
07-30 12:39:31.901: I/System.out(76509407): MODEL:Q5
07-30 12:39:31.901: I/System.out(76509407): PRODUCT:BlackBerry
07-30 12:39:31.902: I/System.out(76509407): SERIAL:0000000000072276751765
07-30 12:39:31.902: I/System.out(76509407): TAGS:test-keys
07-30 12:39:31.902: I/System.out(76509407): TIME:1368606268000
07-30 12:39:31.902: I/System.out(76509407): TYPE:user
07-30 12:39:31.902: I/System.out(76509407): OS Version is:8.0.0
07-30 12:39:31.902: I/System.out(76509407): getDeviceName isRIM Q5
-------------------------------------------------------------------------
07-30 18:15:27.008: I/System.out(40493276): HEIGHT1280
07-30 18:15:27.052: I/System.out(40493276): HI--3
07-30 18:15:27.059: I/System.out(40493276): Device Software Version is>>>>null
07-30 18:15:27.064: I/System.out(40493276): Release Version is2.3.3
07-30 18:15:27.064: I/System.out(40493276): CODENAME Version isREL
07-30 18:15:27.065: I/System.out(40493276): INCREMENTAL Version isplayer-2.0.0_dev.eng.SER
07-30 18:15:27.065: I/System.out(40493276): SDK Version is10
07-30 18:15:27.065: I/System.out(40493276): BOARD:unknown
07-30 18:15:27.065: I/System.out(40493276): BOOTLOADER:unknown
07-30 18:15:27.065: I/System.out(40493276): BRAND:BlackBerry
07-30 18:15:27.065: I/System.out(40493276): DEVICE:Z10
07-30 18:15:27.065: I/System.out(40493276): FINGERPRINT:BlackBerry/BlackBerry/Z10:2.3.3/10.0.0.279/player-2.0.0_dev.eng.SER:user/test-keys
07-30 18:15:27.065: I/System.out(40493276): HARDWARE:unknown
07-30 18:15:27.065: I/System.out(40493276): HOST:brx278cnc
07-30 18:15:27.065: I/System.out(40493276): ID:10.0.0.279
07-30 18:15:27.065: I/System.out(40493276): MANUFACTURER:RIM
07-30 18:15:27.065: I/System.out(40493276): MODEL:Z10
07-30 18:15:27.066: I/System.out(40493276): PRODUCT:BlackBerry
07-30 18:15:27.066: I/System.out(40493276): SERIAL:unknown
07-30 18:15:27.066: I/System.out(40493276): TAGS:test-keys
07-30 18:15:27.066: I/System.out(40493276): TIME:1357852772000
07-30 18:15:27.066: I/System.out(40493276): TYPE:user
07-30 18:15:27.067: I/System.out(40493276): OS Version is:8.0.0
07-30 18:15:27.067: I/System.out(40493276): getDeviceName isRIM Z10
07-30 18:15:27.264: I/QNXNavigatorClient(12779732): PackagesOpenedRunnable: [com.XXX]
07-30 18:15:27.433: I/ActivityManager(12779732): Displayed com.XXX/.LoginActivity: +701ms

 

Is there anyother API that needs to be called for retreiving device OS versions,Most relevant i find is ID info,which is coming along with fingerPrint also which is not precise

 

It is not giving me precise device OS version,My OS Version is 10.0.9.2732.(z10) and Q5(10.1.0.2342)

 

Have anyone noticed this issue?I

 

Thanks

Rakesh

Please use plain text.
Trusted Contributor
imre_m
Posts: 156
Registered: ‎11-17-2010
My Device: PlayBook, Z10

Re: How to get the Device OS Versions of the device

Hello, From the Android Runtime I would access and read directly the file /etc/os.version It contains the exact OS version in plain text format. Regards, Imre
--
If you find this post useful please Like it.
If it solves your problem please mark as solution.
Please use plain text.
Developer
rakesh86shankar
Posts: 988
Registered: ‎05-22-2009
My Device: Not Specified

Re: How to get the Device OS Versions of the device

hi,

 

Can you bit ellaborate on it,Should i create file and access it in android run time?

 

Is there any file in device by default,if it so can you give me full clear path of it?

 

Thanks

Rakesh

Please use plain text.
Trusted Contributor
imre_m
Posts: 156
Registered: ‎11-17-2010
My Device: PlayBook, Z10

Re: How to get the Device OS Versions of the device

The /etc/os.version is the full path, it exists by default.

You may simply use your preferred way to read files, something like this:

 

File file = new File("/etc/os.version");
BufferedReader br = new BufferedReader(new FileReader(file));
String osVersion = br.readLine();

--
If you find this post useful please Like it.
If it solves your problem please mark as solution.
Please use plain text.
Developer
rakesh86shankar
Posts: 988
Registered: ‎05-22-2009
My Device: Not Specified

Re: How to get the Device OS Versions of the device

Thanks for the useful piece of Info.

Please use plain text.