For single SIM following code works:
TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE);
String imei= tm.getDeviceId();
AFAIK it is not possible. The java reflection, you used could work for some devices but not all. However there might be some manufacturer specific API's that allows for this.
Quoting Commonsware,
Android does not support multiple SIMs, at least from the SDK. Device manufacturers who have created multi-SIM devices are doing so on their own. You are welcome to contact your device manufacturer and see if they have an SDK add-on or something that allows you to access the second SIM.