In javascript include this code
function functionName()
{
var transportList = blackberry.identity;
IMEI_No = transportList.IMEI;
}
and in config file include
<feature id="blackberry.identity" />
This will return the Imei number.