How can I access the brick id in ev3-g?
Only thing I can think of is to write the ID in a text file manually and use the file block to read the ID.
To do that: Use an application like notepad++ to create the text file. Make sure the line endings are just a newline character, not the carriage return.
Save the file with .rtf as extension.
Use the memory browser in the EV3 software to upload the file to the brick in the project folder of your program...
Alternatively, modify your program temporarily to write the ID first to file (manually select the value in a File block...), don't forget to close the file (second file block).