On the official raspberrypi.org forum, "Dom" - a moderator wrote:
I've fudged my board to have your serial number
How do I edit the serial number of a Raspberry Pi?
On the official raspberrypi.org forum, "Dom" - a moderator wrote:
I've fudged my board to have your serial number
How do I edit the serial number of a Raspberry Pi?
I'm copying this from this forum thread.
Dom has access to all the source code, the Videocore debugger and many closed VC specific tools. And releasing any information to allow you to change the serial number would break the mechanism for codec licencing, so will never happen.
Additionally as posted in the thread. The only reason for changing the serial would be to copy someone else's MP4 licence and use it. As that is the security around the licensing. Your unique serial is linked to the MP4 licence, so even if someone got your licence key, they will be unable to do anything with it (unless they could change the Raspberry Pi's serial number.
UPDATE: To answer the actual question. I'd say that as Dom has the source for the actual low level firmware. I'd imagine that he is really just changing the source code that reads the serial and forcing it to return a different value. I honestly doubt that it was actually changed (on the CPU I mean), more like he changed some of the firmware code to return a different serial. Also apologies to the asker, we all just gave you a "Why? Thats not nice. Your stealing" instead of answering the question. My bad.
As far as userspace programs are concerned, it's pretty easy to fool them and fake the contents of just about any file. For example, suppose a C program is using /proc/cpuinfo
file to verify the serial number. The program is copy-protected and tied to the serial, and I don't have the source code. However, I can still run strace program 2>&1 | grep cpuinfo
, which will reveal something like:
open("/proc/cpuinfo", O_RDONLY) = 3
At this point, I can create a small library, cpuinfo.so
with the following function:
int open(const char *file, int flags) {
static int (*real_open)(const char *file, int flags);
if(!real_open) real_open = dlsym(RTLD_NEXT, "open");
if(!strcmp(file, "/proc/cpuinfo")) file = "/tmp/cpuinfo";
return real_open(file, flags);
}
As you can see, I'm checking if the user of the library tries to open /proc/cpuinfo
, in which case I open /tmp/cpuinfo
instead.
Then I will run the original copy-protected program as LD_PRELOAD=/path/to/cpuinfo.so program
, and it will happily read my fake file thinking it's /proc/cpuinfo
, while working correctly with the rest of the files.
Note that if the copy-protected software includes kernel objects, it will be much harder to fool, as it could access hardware directly. However, such software will also only work with the kernel for which it was built, making it quite impractical to distribute.
/proc/cpuinfo
? Not sure if that would help with decoder blobs though ..