1. If a new xforce patch has not been created, this is the current solution on Lion....
  2.  
  3. As people have noticed, Lion broke X-Force's Autodesk 2011 Keygen. This keygen was also working for 2012 products under Snow Leopard but the memory patching function broke for all products under Lion. Luckily it isn't too tough to fix if you've got gdb installed and don't mind digging around a bit. It's worth noting that I remained offline during the entire process to be safe.
  4.  
  5. First download the unpacked keygen from here: http://www.mediafire.com/?2imtd5mjcgbtos5
  6.  
  7. The keygen was originally packed with UPX but I unpacked it to allow gdb to set breakpoints on it without problems. Next launch the app you want to register, in my case Maya 2012 Hotfix 4. Once you get to the activation screen select "I have an activation code" and open activity monitor making sure "All Processes" is selected at the top.
  8.  
  9. Now find the Autodesk License Manager process, noting it's PID in the left column. Then maximize a terminal window and enter the following line:
  10. Code: Select all
  11. vmmap -resident -interleaved PID
  12.  
  13. replacing PID with the PID you previously noted. Search through the vmmap output for "libadlmact_libFNP.dylib" and note the hexadecimal base address of the __TEXT segment. This address is what the keygen is unable to locate on Lion. Now jumping over to gdb, load the keygen with the following line:
  14. Code: Select all
  15. sudo gdb /path/to/adesk.app/Contents/MacOS/x-force
  16.  
  17. This will load gdb and it's child process as root whgdb ich is needed for the memory patching to work. Now set a breakpoint at 0x32c2 by entering the following in gdb:
  18. Code: Select all
  19. b *0x32c2
  20.  
  21. The breakpoint at 0x32c2 immediately follows the call to getRemoteLibraryImageBase(uint,char const*) in the memory patching function which returns 0 on Lion rather than the address it should. We are going to patch this value in memory with the one we grabbed from the vmmap output earlier.
  22.  
  23. To do this, run the keygen by entering "r" into gdb and pressing the return key. The keygen will launch and you can now enter your request code, click the "Generate" button, and then paste your activation code back into Maya. At this point you can click the "Mem Patch" button and gdb should break in the breakpoint we set earlier. To check the current return value of the function getRemoteLibraryImageBase, we can enter:
  24. Code: Select all
  25. p/x $eax
  26.  
  27. which will show zero on Lion. To change this to the correct value, simply type:
  28. Code: Select all
  29. set $eax=0xADDRESS
  30.  
  31. replacing ADDRESS with the hexadecimal address grabbed earlier from vmmap. Then just type "c" into gdb and press enter, and the keygen should give you the patching successful message. Now jump back over to Maya or whatever autodesk app you're working on and press activate. Assuming nothing went wrong you'll get to the activation success screen and the app will launch. Now you can quit the keygen, terminal, etc and you're done. I've tested this with Maya 2012 Hotfix 4 but it should also work with any of the other apps that the keygen could previously patch under Snow Leopard.