10/4/2019 How To Clone Sd Card Serial Number
Hi, I have been trying to figure out the simplest way to solve this problem and haven't come across anything similar online so if you have any suggestions or relevant links I really appreciate the help. The best solution I've found is Nexcopy, but I'm not sure it solves my problem. Basically my issue is that I will be selling a product with an RPi built in and I want the SD cards of each product to be the same except with a unique ID (16 characters) hard-coded into each of them. I also want to print this ID on a sticker and include it in the box of the corresponding RPi. I expect 100-1000 sales in the first year so manually doing this for each of them isn't ideal.
Why am I doing this? When my product is turned on and connected to the internet it will subscribe to a Pubnub channel with the name 'company'. I want the user to be able to download my app, enter their unique ID from the sticker into the app, and have their phone subscribe to the same channel so they can control my product remotely. Nexcopy provides a way for me to make 20 duplicates at a time and get the unique CID of each in.csv format on my PC which I could then print on stickers, but the CID is 120 characters and I can't have my users manually entering that on their phone lol. I think using an SD duplicator would still help even if I have to manually generate and add an ID afterwards. To summarize: I want a way to copy SD cards and give them each a hard-coded unique ID/product key and print that ID on a sticker to include in the box. Any way that I can automate this or speed up the process is better than doing each manually.
Thanks in advance! Maybe I'm reaching for something that doesn't make sense - and I've never tried it and my script skills are poo, but I might try (on a machine you do not intend to sell: 1. Make a file that contains the serial number. Make an program that when called, reads the number in the file and increments it by 1 (or whatever), then saves it. Write a script that when you insert a new sd card into the usb, it: a.
Copies your.img from wherever to the new card b. Copies the txt file with the serial number in it to a specified location on the mew sd card c. Runs the other program that increments the serial number for you. I have no idea how your automatic sticker printer works but it'd be neat if that was automatic here as well, just by calling the same file.
Actually this belongs before you increment. Makes a cool train whistle sound to tell you it's done.
(Optional) Again, I don't know what part of this might be harder than I think (or impossible even), but I dont see why not either. Could you not just use the serial number of the Pi? They are random(ish) and (almost) unique.
Assuming the Pi is sealed inside your product, the user won't have access to get around it, plus they won't have any way of knowing which serial numbers are recognised by your server. All you need to do is keep track of which Pi serial numbers have been used by your product and in the unlikely event you get a new Pi with the same serial as one that has already been used, just sell it on ebay or something (not giving the reason, of course). Like ElEscalador said, I'm not trying to secure my Pi (I've seen many threads asking that question), this is for manufacturing convenience. DougieLawson, I think maybe you're misunderstanding that the person who buys the Pi MUST know this unique ID.
I am not trying to hide it for security. Their Pi will automatically connect to a channel named, and they can enter that same channel name into their mobile app to connect to the Pi and send/receive messages. Thank you all for the answers! I think for now I like rpdom's solution of using the Pi's serial number since it allows me to use the exact same SD card image for all of them. I'll just have to deal with getting the serial number, checking if its been used, and printing the stickers for each of them.
I'll have to look into it more, but at first glance it looks like it'll get the job done. ElEscalador and scruss I think your solutions will work, but they achieve the same thing with more work. If this were a larger project I think generating my own ID's would be the way to go. Mikerr I looked into using the SD cards serial number but they're 120 characters long and I can't expect users to enter that on their phones lol. Rpdom wrote:Someone may pop up in a minute to say 'That's 100% insecure and anyone could fake the serial number with a bit of work', but as it'll be you getting the serial number on a clean system, that situation won't arise. You could put a systemd entry to mount a fake cpuinfo over the real one before the script reads it. I'm pretty sure the first mount is pretty early on in the boot process so this should be able to be done.
Thank you for proving me right. As I said, that is irrelevant in this case as Sulley will be building the systems from scratch and will take a note of the Pi serial numbers. Only Pis registered on his server will be able to access it.
Someone could fake the serial number, but the only way they could get it to work is to copy the serial of a Pi that is knows to work. I'm sure Sulley would notice if his server started getting accessed from more than one system with the same serial number.
Rpdom wrote:Someone may pop up in a minute to say 'That's 100% insecure and anyone could fake the serial number with a bit of work', but as it'll be you getting the serial number on a clean system, that situation won't arise. You could put a systemd entry to mount a fake cpuinfo over the real one before the script reads it. I'm pretty sure the first mount is pretty early on in the boot process so this should be able to be done.
How To Clone Sd Card Serial Number
Thank you for proving me right. As I said, that is irrelevant in this case as Sulley will be building the systems from scratch and will take a note of the Pi serial numbers. Only Pis registered on his server will be able to access it. Someone could fake the serial number, but the only way they could get it to work is to copy the serial of a Pi that is knows to work.
I'm sure Sulley would notice if his server started getting accessed from more than one system with the same serial number. The point being that there is nothing that is 100% foolproof. You still would a Pi of course to get the serial number registered, but then you could deploy it to a number of Pis. Then, you would have to write software to somehow analyze the requests to his server and see if they're over a limit. It would be a good solution, but just to keep in mind that it can be fooled.
From: Larry Sabo on 19 Jun 2007 19:09 I'll be receiving a GPS programs and maps on an SD card soon and would like to clone the card for backup. The software is locked to the serial number of the SD card, so just backing up the data isn't enough. I suspect it is impossible to clone the card completely, including serial number, but thought I'd ask if anyone has investigated this and found a solution. I believe one can change the Volume ID of hard drives and imagine something similar being possible for SD cards. I appreciate that unscrupulous people might clone such cards and sell copies, and I certainly don't want to facilitate that behaviour through this thread.
Given that the program and data on the card in question cost me $183 CAD, I do feel rather vulnerable, even if I can backup the contents of the card excluding the serial number. I have had SD cards become totally unreadable and unformatable and would like to be prepared should it happen with this one.
Only freeware, please. Thanks, Larry. From: on 19 Jun 2007 19:17 I'll be receiving a GPS programs and maps on an SD card soon and would like to clone the card for backup.
Metro 2033 book in english pdf. When paru married debdas left from his home.
Let me guess: is it TomTom by any chance? Even if you get a TT unit with a hard drive, there is no backup on CD/DVD or anything. You have to make a complete backup.first. before using it incase you mess anything up. I think it is terrible that you can pay a lot of money and if you are not aware and screw something up, you would think the backup (map) is on the CD - wrong! Hope you find a solution and I know your predicament.you.do. need that backup because cards fail.
(Sorry I can't offer an answer!). From: Larry Sabo on 19 Jun 2007 20:29 ' wrote: I'll be receiving a GPS programs and maps on an SD card soon and would like to clone the card for backup.
Let me guess: is it TomTom by any chance? Even if you get a TT unit with a hard drive, there is no backup on CD/DVD or anything. You have to make a complete backup.first. before using it incase you mess anything up. I think it is terrible that you can pay a lot of money and if you are not aware and screw something up, you would think the backup (map) is on the CD - wrong!
Hope you find a solution and I know your predicament.you.do. need that backup because cards fail. (Sorry I can't offer an answer!) No, it's OCN6. Thanks for the reply. From: Lord Possum on 19 Jun 2007 21:12 In article, larrysabo (a)hotmail.com says. I'll be receiving a GPS programs and maps on an SD card soon and would like to clone the card for backup.
The software is locked to the serial number of the SD card, so just backing up the data isn't enough. I suspect it is impossible to clone the card completelyincluding serial number.snip Larry, you did specify the serial number shown for the SD card in consideration, but wonder if you were speaking of the VOLUME No. This will appear as a binary pair looking like this: 0a33:fa15 (fictitious, of course) This is called the volume no. Or Volume Serial Number. (VSN) Understand we are not talking about the drive Label name.
That is different. There are several proggies that will enable a user to recode any particular drive, SD card, thumbdrive, etc. Using any combination of valid binary digits like the above. I always delighted in re-volume-setting my various SD cards with C0DE:FEED (That 0 is zero) Look for a DOS program called SETVOLNO.EXE, 1992 Micrological Designs. From: Lord Possum on 19 Jun 2007 21:24 In article, lord.possum (a)yahoo.com says.
In articlelarrysabo (a)hotmail.com says. I'll be receiving a GPS programs and maps on an SD card soon and would like to clone the card for backup. The software is locked to the serial number of the SD card, so just backing up the data isn't enough. I suspect it is impossible to clone the card completelyincluding serial number.snip Larry, you did specify the serial number shown for the SD card in consideration, but wonder if you were speaking of the VOLUME No. This will appear as a binary pair looking like this: 0a33:fa15 (fictitious, of course) This is called the volume no. or Volume Serial Number. (VSN) Understand we are not talking about the drive Label name.
That is different. There are several proggies that will enable a user to recode any particular drive, SD card, thumbdrive, etc. Using any combination of valid binary digits like the above. I always delighted in re-volume-setting my various SD cards with C0DE:FEED (That 0 is zero) Look for a DOS program called SETVOLNO.EXE, 1992 Micrological Designs LATE COMMENT: I misspoke the above: the correct examples should read 0a33-fa15 and C0DE-FEED (Use hyphens - instead of colons:) Just did it to make sure.
I'll be receiving a GPS programs and maps on an SD card soon and would like to clone the card for backup. The software is locked to the serial number of the SD card, so just backing up the data isn't enough. I suspect it is impossible to clone the card completely, including serial number, but thought I'd ask if anyone has investigated this and found a solution.
I believe one can change the Volume ID of hard drives and imagine something similar being possible for SD cards. I appreciate that unscrupulous people might clone such cards and sell copies, and I certainly don't want to facilitate that behaviour through this thread.
Given that the program and data on the card in question cost me $183 CAD, I do feel rather vulnerable, even if I can backup the contents of the card excluding the serial number. I have had SD cards become totally unreadable and unformatable and would like to be prepared should it happen with this one. Only freeware, please. Thanks, Larry ┊ 19/6/2007, 16:17 น. I'll be receiving a GPS programs and maps on an SD card soon and would like to clone the card for backup.
Let me guess: is it TomTom by any chance? Even if you get a TT unit with a hard drive, there is no backup on CD/DVD or anything. You have to make a complete backup.first.
before using it incase you mess anything up. I think it is terrible that you can pay a lot of money and if you are not aware and screw something up, you would think the backup (map) is on the CD - wrong! Hope you find a solution and I know your predicament.you.do. need that backup because cards fail. (Sorry I can't offer an answer!) LarryS 19/6/2007, 17:29 น.
In article, says. I'll be receiving a GPS programs and maps on an SD card soon and would like to clone the card for backup. The software is locked to the serial number of the SD card, so just backing up the data isn't enough. I suspect it is impossible to clone the card completelyincluding serial number.snip Larry, you did specify the serial number shown for the SD card in consideration, but wonder if you were speaking of the VOLUME No. This will appear as a binary pair looking like this: 0a33:fa15 (fictitious, of course) This is called the volume no.
Or Volume Serial Number. (VSN) Understand we are not talking about the drive Label name.
How To Clone Sd Card In Linux
That is different. There are several proggies that will enable a user to recode any particular drive, SD card, thumbdrive, etc. Using any combination of valid binary digits like the above. I always delighted in re-volume-setting my various SD cards with C0DE:FEED (That 0 is zero) Look for a DOS program called SETVOLNO.EXE, 1992 Micrological Designs Lord Possum 19/6/2007, 18:24 น. Lord Possum wrote: Thanks, Lord Possum.
I don't have the card yet, hence no volume number supplied. I haven't studied the file structure of SD cards yet, so am totally ignorant of their structure and nomenclature. I'll try the program you recommend with a spare SD card and see how it goes. Should receive my OCN6 card in a week and will make a backup using a media reader and the desktop before inserting it into the PDA. Hopefully, the autostart inf won't screw things up doing that. I know the program installs itself upon the card being inserted into the PDA. Probably generates an encrypted key at that point, too.
Thanks again for your helpfulness. Cheers, Larry [email protected] 5/6/2017, 10:16 น.
Of some common, open format? Practically impossible.
The way you protect data (temporarily) is by using a proprietary format, and creating your own programs or hardware to run it (you get better results if you make the hardware). For non-connected devices (ie, standard GPS receivers) there's nothing you could conceivably do to prevent people sharing some sort of unlock key. Who provides the card? What happens if somebody gets a new GPS unit, are they supposed to buy a new copy of your map? – Apr 9 '15 at 11:12. By its very nature, data on an SD card is meant to be read. Unless you control the program reading the file, you cannot do anything with the file that would protect it in any way.
In other words, if you make the GPS units, or the GPS software, you could perhaps integrate a solution that would tie the data to the unit at hand, at the very least make it more difficult to get the data working on another unit. If the map data is read by 3rd party software, you have no way to secure it.
– Apr 9 '15 at 12:49. I Think the OP is out after the DRM protection buildin SD cards: Thats why they're called 'SD' as in 'Secure Digital'.
The access to the DRM encoding Equipment for SD cards is limited to those buying a license, so I would suggest you Contact the SD Association for purchasing a license: This DRM protection can perform a challenge-response type of authentication Before allowing access to the content on SD-card, which will be transmitted encrypted. Preferably, your GPS device then contains a 'smart card chip' containing keys, and your map SD card will communicate with this chip to create a encrypted channel. Then you could generate symmetric keys using a secret algoritm using the GPS device's serial number + a secret master key as input.
The master key is only stored in your production Equipment. When a customer wants to purchase a map, they will have to specify the GPS device serial number, and then they will be sent a SD card tailored for that GPS device.
A bit more work was involved. I've used deviceIOControl quite alot from vb.net, so I figured I could get this going. Google didn't turn up any working.Net code. Anyhoo, I think I have it working, someone who knows about these things can check it and tell me I'm doing it all wrong. The main problem I had was getting the device name for the SD Card to pass to CreateFile.
I've fudged it by reading all the valid ones from the registry. It also gets CF cards and god knows what else, which don't store serial nos and manufacturer ids. So if someone knows how to enumerate SD Cards and get thier device name (DSK1: etc) it would be great. Edit, found, so the getdisks thing is overloaded now. I don't know how useful this is though, it dosn't sound like it is a unique id.
Public Class Form1 Private label1 As New Label Sub New ' This call is required by the Windows Form Designer. InitializeComponent ' Add any initialization after the InitializeComponent call. Please note the above code does not read the hardware serial number from the CID register of the card. Instead it reads a temporary serial number created by windows - not what people are looking for. IOCTLDISKGETSTORAGEID is not the way to go. Instead you can from the simplified SD Spec. This will only work for cards plugged in to a reader connected directly to the PCI bus - it won't work with any USB card reader.
It also depends on the SD Bus host driver playing ball and dealing with the request correctly. Also there seems to be some problem in Vista, with two hotfixes available for this particular command (kb 970 ). So, not too useful either I'm afraid. For usb readers people have said to use techniques like, but this gets a different number (and it gets the same number no matter which SD card you plug in). Presumably it is reading the serial number of the USB host controller.
Sorry for the gravedig, I can't edit my post as it is way over the max number of characters.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |