The Cell ID does not live in the SW. It lives in the RIL, which resides
below the OS. For CDMA the Cell ID would be the ESN #, and for GSM, that
number resides on the SIM. Is that what you're after? If so, I don't think
there is a way.
I know how to acquire that # manually, and it changes from device to device.
Basically there are methods, proprietary to each manufacturer to query the
RIL to get that information. It's undocumented, and I don't know if
manufacturers really want that information to be widely shared.