Context : HD 188112 is a bright ( V = 10.2 mag ) hot subdwarf B ( sdB ) star with a mass too low to ignite core helium burning and is therefore considered a pre-extremely low-mass ( ELM ) white dwarf ( WD ) . ELM WDs ( M \la 0.3 M _ { \odot } ) are He-core objects produced by the evolution of compact binary systems . Aims : We present in this paper a detailed abundance analysis of HD 188112 based on high-resolution Hubble Space Telescope ( HST ) near- and far-ultraviolet spectroscopy . We also constrain the mass of the star ’ s companion . Methods : We use hybrid non-LTE model atmospheres to fit the observed spectral lines , and to derive the abundances of more than a dozen elements and the rotational broadening of metallic lines . Results : We confirm the previous binary system parameters by combining radial velocities measured in our UV spectra with the previously published values . The system has a period of 0.60658584 days and a WD companion with M \geq 0.70 M _ { \odot } . By assuming a tidally locked rotation combined with the projected rotational velocity ( v sin i = 7.9 \pm 0.3 km s ^ { -1 } ) , we constrain the companion mass to be between 0.9 and 1.3 M _ { \odot } . We further discuss the future evolution of the system as a potential progenitor of an underluminous type Ia supernova . We measure abundances for Mg , Al , Si , P , S , Ca , Ti , Cr , Mn , Fe , Ni , and Zn , and for the trans-iron elements Ga , Sn , and Pb . In addition , we derive upper limits for the C , N , O elements and find HD 188112 to be strongly depleted in carbon . We find evidence of non-LTE effects on the line strength of some ionic species such as Si ii and Ni ii . The metallic abundances indicate that the star is metal-poor , with an abundance pattern most likely produced by diffusion effects . Conclusions :