Re: [Interest] [Android] Qt machine unique id

2018-11-19 Thread Thiago Macieira
On Monday, 19 November 2018 10:19:12 PST rol...@logikalsolutions.com wrote:
> At one point Intel had the "Big Brother" ID.
> 
> https://www.zdnet.com/article/intel-piii-is-big-brother-inside/

See also https://en.wikipedia.org/wiki/Ship_of_Theseus.

Any HW ID you can use in a computer is wrong. If you used the processor's 
serial number and someone replaced the processor, is it the same computer? If 
you used the MAC address on the wired Ethernet, but that got replaced with a 
faster card, is it the same computer? And so on.

That is, if you can take all the parts from the old computer, replacing them 
one at a time with new parts, is it the same computer? And if you do that, and 
then build a computer out of all the parts you've removed, is the other 
computer a new one or the old one? Hence the Wikipedia link.

This also applies to software: if you use the UUID of the filesystem but 
reformat, is it the same computer? If you use /etc/machine-id but erase that 
file (so it gets regenerated on the next boot), is it the same computer?

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-11-19 Thread roland



At one point Intel had the "Big Brother" ID.

https://www.zdnet.com/article/intel-piii-is-big-brother-inside/

Which is pretty much why what you are looking for doesn't exist  
(publicly) anymore. Lots of theories and stories in the dark corners  
of the world though.


TRADITIONALLY, what you want to do has always been accomplished via a  
dongle for work/business machines. During the VAX 11 days this was a  
25-pin RS-232 dongle with burnt in software that would see a special  
escape sequence sent to the console and respond with a burnt in value.  
There are still companies providing such solutions.


https://www.keylok.com/products

If ALL of your systems have EFI instead of BIOS you could read up on the specs

http://wiki.phoenix.com/wiki/index.php/EFI_FILE_PROTOCOL

and figure out how to park a hidden one line text file out there. If  
the file exists, have the software refuse to install. Don't  
automatically remove the file as part of the un-install either.


Quoting interest-requ...@qt-project.org:



On Wednesday, 10 October 2018 13:18:59 PDT J?r?me Godbout wrote:

I was hoping some device id was existing, but I will go with android id and
make a platform function, with a TODO for the iOS one and trying to figure
out to cross the bridge when I get there.




--
Roland Hughes, President
Logikal Solutions
(630) 205-1593

http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.johnsmith-book.com
http://www.logikalblog.com
http://www.interestingauthors.com/blog
http://lesedi.us

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-11 Thread Thiago Macieira
On Thursday, 11 October 2018 11:26:54 PDT Thiago Macieira wrote:
> But it's somehow broken:
> 
> $ tests/manual/qsysinfo/qsysinfo | grep Unique
> QSysInfo::machineUniqueId() =
> QSysInfo::bootUniqueId() =

As far as I can tell, this is not our fault. This Python script[1] also fails 
to get *any* sysctl. The sysctlbyname() function is returning -1 in the Python 
test but errno remains 0. Debugging the Qt code shows it returns 0 but does 
not fill in the data.

Please complain to Apple.

[1] https://gist.github.com/pudquick/581a71425439f2cf8f09

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-11 Thread Thiago Macieira
On Thursday, 11 October 2018 01:26:47 PDT Marek.Floriańczyk wrote:
> I'm using QSysInfo::uniqueMachineId in Windows environment but on macOS Qt
> 5.11.1 does not have this implemented 

Yes, it does:
https://code.woboq.org/qt5/qtbase/src/corelib/global/
qglobal.cpp.html#_ZN8QSysInfo15machineUniqueIdEv

See the part about "Darwin" on line 2920.

> so I started using MAC address of
> network interface. Is this code you mention (for macOS) available somewhere
> or will be released in Qt 5.12 ?

It was released in Qt 5.11.

But it's somehow broken:

$ tests/manual/qsysinfo/qsysinfo | grep Unique
QSysInfo::machineUniqueId() = 
QSysInfo::bootUniqueId() = 

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-11 Thread coroberti .
On Wed, Oct 10, 2018 at 10:53 PM Thiago Macieira
 wrote:
>
> On Wednesday, 10 October 2018 07:00:13 PDT Igor Mironchik wrote:
> > Maybe MAC address of the network interface is good enough for you?
>
> There are some RFCs and internet drafts that recommend creating random or
> pseudo-random MAC addresses, for privacy. In other words, the MAC address
> would change depending on which network you're connected to and often which
> day it is.
>
> I do that for my Linux system for WiFi. Windows 10 has this feature too, but I
> don't remember if it's enabled by default.
>
> https://www.ietf.org/blog/mac-privacy/
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center

MAC-randomization commonly means that per network (SSID) a MAC address
to be generated and used based on the machine's interface MAC (HW MAC) for
a certain connection and next changed not to be recognized by this network.

However, that doesn't mean that the implementation with overwrite the HW MAC
seen by commands and API. There's no need for that.

This links tells about one such linux distribution, but it seems that
there are no more such cases:
http://papers.mathyvanhoef.com/asiaccs2016.pdf

Are you familiar with any other cases?

There are cases when user with enough privileges can overwrite HW MAC,
and so Qt's way seems to be doing a great job by using other
parameters, not MACs.

Kind regards,
Robert Iakobashvili

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-11 Thread Marek.Floriańczyk
Dnia środa, 10 października 2018 15:50:44 CEST Thiago Macieira pisze:
> On Wednesday, 10 October 2018 13:18:59 PDT Jérôme Godbout wrote:
> > I was hoping some device id was existing, but I will go with android id
> > and
> > make a platform function, with a TODO for the iOS one and trying to figure
> > out to cross the bridge when I get there.
> 
> If there's an ID we could get on Android and it isn't /etc/machine-id,
> please submit either a feature request or a patch implementing it in
> QSysInfo::uniqueMachineId. Ditto for iOS (we already have working code for
> macOS).

Hi

I'm using QSysInfo::uniqueMachineId in Windows environment but on macOS Qt 
5.11.1 does 
not have this implemented so I started using MAC address of network interface. 
Is this code you mention (for macOS) available somewhere or will be released in 
Qt 5.12 ?

Best,
Marek

> 
> It isn't implemented for those because I don't develop for Android or iOS,
> so I didn't do anything beyond superficial search to find out what types of
> IDs exist.


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-10 Thread Thiago Macieira
On Wednesday, 10 October 2018 13:18:59 PDT Jérôme Godbout wrote:
> I was hoping some device id was existing, but I will go with android id and
> make a platform function, with a TODO for the iOS one and trying to figure
> out to cross the bridge when I get there.

If there's an ID we could get on Android and it isn't /etc/machine-id, please 
submit either a feature request or a patch implementing it in 
QSysInfo::uniqueMachineId. Ditto for iOS (we already have working code for 
macOS).

It isn't implemented for those because I don't develop for Android or iOS, so 
I didn't do anything beyond superficial search to find out what types of IDs 
exist.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-10 Thread Jérôme Godbout
That was one aspect I was fearing (just like dynamic MAC into BLE protocol)
and I would only be able to access that MAC if the WIFI is enabled which is
another show stopper for me.

I was hoping some device id was existing, but I will go with android id and
make a platform function, with a TODO for the iOS one and trying to figure
out to cross the bridge when I get there.

On Wed, 10 Oct 2018 at 15:53, Thiago Macieira 
wrote:

> On Wednesday, 10 October 2018 07:00:13 PDT Igor Mironchik wrote:
> > Maybe MAC address of the network interface is good enough for you?
>
> There are some RFCs and internet drafts that recommend creating random or
> pseudo-random MAC addresses, for privacy. In other words, the MAC address
> would change depending on which network you're connected to and often
> which
> day it is.
>
> I do that for my Linux system for WiFi. Windows 10 has this feature too,
> but I
> don't remember if it's enabled by default.
>
> https://www.ietf.org/blog/mac-privacy/
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
>
>
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>


-- 



RAPPROCHEZ LA DISTANCE


*Jérôme Godbout*Senior Software Developer

*p:* +1 (418) 800-1073 ext.:109

*m:* +1 (581) 777-0050

amotus.ca 
statum-iot.com
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-10 Thread Jason H
MAC Randomization was supposed to be a feature of Android Oreo - and it may be, 
but only for Wifi scanning. Android P is supposed to do a better job but it is 
still listed as experimental.



> Sent: Wednesday, October 10, 2018 at 3:53 PM
> From: "Thiago Macieira" 
> To: interest@qt-project.org
> Subject: Re: [Interest] [Android] Qt machine unique id
>
> On Wednesday, 10 October 2018 07:00:13 PDT Igor Mironchik wrote:
> > Maybe MAC address of the network interface is good enough for you?
> 
> There are some RFCs and internet drafts that recommend creating random or 
> pseudo-random MAC addresses, for privacy. In other words, the MAC address 
> would change depending on which network you're connected to and often which 
> day it is.
> 
> I do that for my Linux system for WiFi. Windows 10 has this feature too, but 
> I 
> don't remember if it's enabled by default.
> 
> https://www.ietf.org/blog/mac-privacy/
> 
> -- 
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
> 
> 
> 
> ___
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-10 Thread Thiago Macieira
On Wednesday, 10 October 2018 07:00:13 PDT Igor Mironchik wrote:
> Maybe MAC address of the network interface is good enough for you?

There are some RFCs and internet drafts that recommend creating random or 
pseudo-random MAC addresses, for privacy. In other words, the MAC address 
would change depending on which network you're connected to and often which 
day it is.

I do that for my Linux system for WiFi. Windows 10 has this feature too, but I 
don't remember if it's enabled by default.

https://www.ietf.org/blog/mac-privacy/

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-10 Thread Jérôme Godbout
Thanks for the tips guys,
Yeah, we want to avoid problems where the local settings get corrupted and
the user can use multiple device to capture and for tracking purpose (this
is inspection requirements, I need to known which device was used for the
inspection). So I need to be able to identify which device was used and if
the central have banish that device (therefore the reinstalling should not
change this since it was ban server side wise). So the local UUID and 1st
time, I wish I could avoid since deleting local storage for an application
to loose the QSettings is pretty easy and I won't do what I want.

For iOS, it was for future support, since I don't need it right now and
maybe never but if I can make it cross platform agnostic that would be
better but not essential.

Maybe the MAC address of a particular interface could do the trick.
Thanks,
Jerome

On Wed, 10 Oct 2018 at 10:07, Jason H  wrote:

> 1. It'll never work on iOS. To get a device id for iOS you need to plug it
> in and use libimobiledevice, which can get that information.
> 2. I think you have a bad idea. Sometimes, reinstalling is the only way to
> fix some issues, like a corrpupted* application database. Removing that
> ability wil lshoot yourself in the foot.
> 3. On android you could get a device id, but I always used a
> generated-1-time guid. I'm not sure what the status is on the android
> device identifier though. That's a stack exchange question.
> 4. Your application directory is perserved across updates.
> 5. Regardless, I don't think QSysInfo::machineUniqueId() is what you want.
> Reading the docs, it looks like a implementation of my GUID strategy. But
> having jsut run this on iOS, returns an empty string "If no unique ID could
> be determined, this function returns an empty byte array."
>
> *Corrupted SQLITE databases get deleted on Android, this would have to be
> a application-level corruption.
> Perhaps what you want is all the user data server side and not rely on the
> device? What is the behavior if the user has more than one device?
>
>
> *Sent:* Wednesday, October 10, 2018 at 9:38 AM
> *From:* "Jérôme Godbout" 
> *To:* "Qt Interest" 
> *Subject:* [Interest] [Android] Qt machine unique id
> Hi,
> what is the best way to identify a device even if os is updated or factory
> reset, etc?
> My use case is the following:
>
>1. The user is used to identify itself and log in (security is managed
>with a secure connection to server from the application).
>2. I have some settings and device history on the server and I would
>like to tell the server the user is using which of his device
>automatically. I wish I would have this identification persistent over
>application update and reinstall.
>3. id persistent from factory reset might not be necessary.
>4. I would like it to work on Android, if possible on iOS too (iOS is
>not mandatory).
>
> I was looking at QSysInfo::machineUniqueId(), but I'm not sure it will fit
> the bill, anyone have a good way to do this?
>
> --
>
>
>
>
> RAPPROCHEZ LA DISTANCE
>
> *Jérôme Godbout*
> Senior Software Developer
>
> *p:* +1 (418) 800-1073 ext.:109
>
> *m:* +1 (581) 777-0050
>
> amotus.ca <http://www.amotus-solutions.com/>
> statum-iot.com
>
>
> ___ Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>


-- 



RAPPROCHEZ LA DISTANCE


*Jérôme Godbout*Senior Software Developer

*p:* +1 (418) 800-1073 ext.:109

*m:* +1 (581) 777-0050

amotus.ca <http://www.amotus-solutions.com/>
statum-iot.com
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-10 Thread Jason H
1. It'll never work on iOS. To get a device id for iOS you need to plug it in and use libimobiledevice, which can get that information. 

2. I think you have a bad idea. Sometimes, reinstalling is the only way to fix some issues, like a corrpupted* application database. Removing that ability wil lshoot yourself in the foot.

3. On android you could get a device id, but I always used a generated-1-time guid. I'm not sure what the status is on the android device identifier though. That's a stack exchange question.

4. Your application directory is perserved across updates.

5. Regardless, I don't think QSysInfo::machineUniqueId() is what you want. Reading the docs, it looks like a implementation of my GUID strategy. But having jsut run this on iOS, returns an empty string "If no unique ID could be determined, this function returns an empty byte array."

 

*Corrupted SQLITE databases get deleted on Android, this would have to be a application-level corruption.

Perhaps what you want is all the user data server side and not rely on the device? What is the behavior if the user has more than one device?

 

 

Sent: Wednesday, October 10, 2018 at 9:38 AM
From: "Jérôme Godbout" 
To: "Qt Interest" 
Subject: [Interest] [Android] Qt machine unique id


Hi,
what is the best way to identify a device even if os is updated or factory reset, etc?


My use case is the following:



	The user is used to identify itself and log in (security is managed with a secure connection to server from the application).
	I have some settings and device history on the server and I would like to tell the server the user is using which of his device automatically. I wish I would have this identification persistent over application update and reinstall.
	id persistent from factory reset might not be necessary.
	I would like it to work on Android, if possible on iOS too (iOS is not mandatory).



I was looking at QSysInfo::machineUniqueId(), but I'm not sure it will fit the bill, anyone have a good way to do this?

 
--







 


	
		
			
			
			RAPPROCHEZ LA DISTANCE
			
			
			

	
		
		Jérôme Godbout
		Senior Software Developer
		
	
	
		
		p: +1 (418) 800-1073 ext.:109

		m: +1 (581) 777-0050
		
	
	
		
		amotus.ca
		statum-iot.com
		
	
	
		
		   
		
	

			
			
		
	









___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] [Android] Qt machine unique id

2018-10-10 Thread Igor Mironchik

Hi,

Maybe MAC address of the network interface is good enough for you?


On 10.10.2018 16:38, Jérôme Godbout wrote:

Hi,
what is the best way to identify a device even if os is updated or 
factory reset, etc?

My use case is the following:

 1. The user is used to identify itself and log in (security is
managed with a secure connection to server from the application).
 2. I have some settings and device history on the server and I would
like to tell the server the user is using which of his device
automatically. I wish I would have this identification persistent
over application update and reinstall.
 3. id persistent from factory reset might not be necessary.
 4. I would like it to work on Android, if possible on iOS too (iOS is
not mandatory).

I was looking at QSysInfo::machineUniqueId(), but I'm not sure it will 
fit the bill, anyone have a good way to do this?


--



RAPPROCHEZ LA DISTANCE



*Jérôme Godbout
*Senior Software Developer

*p:*+1 (418) 800-1073 ext.:109

*m:* +1 (581) 777-0050

amotus.ca 
statum-iot.com 



___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] [Android] Qt machine unique id

2018-10-10 Thread Jérôme Godbout
Hi,
what is the best way to identify a device even if os is updated or factory
reset, etc?
My use case is the following:

   1. The user is used to identify itself and log in (security is managed
   with a secure connection to server from the application).
   2. I have some settings and device history on the server and I would
   like to tell the server the user is using which of his device
   automatically. I wish I would have this identification persistent over
   application update and reinstall.
   3. id persistent from factory reset might not be necessary.
   4. I would like it to work on Android, if possible on iOS too (iOS is
   not mandatory).

I was looking at QSysInfo::machineUniqueId(), but I'm not sure it will fit
the bill, anyone have a good way to do this?

-- 



RAPPROCHEZ LA DISTANCE


*Jérôme Godbout*Senior Software Developer

*p:* +1 (418) 800-1073 ext.:109

*m:* +1 (581) 777-0050

amotus.ca 
statum-iot.com
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest