WARNING: BACK UP ALL SAVE GAMES FIRST.
1) Go and download Cheat Engine. You might have to disable your anti-virus for a little bit whilst downloading and installing it. Whilst running it's fine to put them back up but overly-sensitive anti-virus software doesn't like some aspects of the programme and can corrupt the download and installation of it. The programme itself is safe, but everything you do is at your own risk. As in, if you happen to be browsing porn at the same time whilst your anti-virus is down it's not my fault if a virus attacks your system.
2) Load up ME2, (preferably on the ship, after you have access to upgrades and are able to afford at least one of them) then alt+tab out and open cheatengine. Go to icon in the top left of the programme (a little computer monitor) and open the process of Mass Effect 2.exe.
3) Now go back to ME2, press escape whilst playing and you'll be able to see how much of each mineral you have. In my case I was pretty spent and had only 4399 Palladium, 5066 Iridium, 9797 Platinum and a measley 341 Element Zero. Make a note of your amounts.
4) Now in cheat engine it should default to exact value; 4 bytes, and above that there is a white bar for input. Put in how much of whatever resource you currently have that you want to change first (lets say my Platinum at 9797) and click First Scan. It'll scan and a list of hits will come up; take note there are multiple addresses but only one is the correct one. For me it was a massive list of about 30 or so matches.
5) Now, that's a heck of a lot. We don't want to start changing random values unless you want to put your Shepard through an end of the matrix situation and The Illusive Man revealed to be Agent Smith.
To narrow that down the best way I've found is to go and buy an upgrade and take note of your now deduced mineral amount. Go back to cheat engine and find the value that has changed to your current resources. I bought a small upgrade of 2500 to take it down to 7297 so was easily able to find the value affecting resources.
6) Time to avoid the interesting yet eventually tedious mining minigame by a quick bit of programming tedium instead!
Double click the correct address for the mineral you chose. It should jump down into the box at the bottom of cheatengine. Now hover your mouse over the value, double click, and a box will come up to adjust the value. I made mine 9000000. Go back to ME2, press Esc to jump out of menu and esc again to jump back in, and check to see if the value has changed. Did it work? If so you're a bonified cheater my friend! If it hasn't you probably had the same problem as me, in that I found there were two values that changed to my reduced mineral and only through first altering one and changing it back when it didn't work did I find the true one.
7) Now here is where note-taking comes in to avoid endlessly repeating step 5 in full. Take a look at the address for your altered mineral and note the digits. It'll be like 0E382429, 27135135 or so, of which there will be multiples with similar starts. For my platinum it was 1291202C for example, so for your value you should make a note.
8) Now click New Scan, and do the same for iridium (5066 in my case). A new list of addresses will come up (it may or may not be larger than your last list). What you're looking for here is addresses with similar beginning digits, so some judgement is required. The addresses are almost exactly the same, with only up to 4 digits separating them (4-8-C in hexadecimal). You are looking for practically the same thing. In my case, iridium and palladium were both exactly the same apart from the last digit; Iridium been 12912024. Now just repeat step 4 and 6 for each mineral to verify and voila, unlimited minerals!
I saved my game IN A SEPARATE FILE just in case, and it's safe to shut cheat engine down after altering. If you want you can use it to similarly adjust your Credits, and even take this know-how and apply it to other single player games with resources. Hope you found this little guide useful.
IMPORTANT NOTE - The addresses of the minerals change each time you load up a game, which is why I don't just out and out give you my values to make the process easier.