Context. Worldwide very-long-baseline radio interferometry (VLBI) arrays are expected to obtain horizon-scale images of supermassive black hole candidates as well as of relativistic jets in several nearby active galactic nuclei. This, together with the expected detection of electromagnetic counterparts of gravitational-wave signals, motivates the development of models for magnetohydrodynamic flows in strong gravitational fields. Aims. The Black Hole Accretion Code (BHAC) is a publicliy available code intended to aid with the modelling of such sources by performing general relativistic magnetohydrodynamical (GRMHD) simulations in arbitrary stationary spacetimes. New additions to the code are required in order to guarantee an accurate evolution of the magnetic field when small and large scales are captured simultaneously. Methods. We discuss the adaptive mesh refinement (AMR) techniques employed in BHAC, essential to keep several problems computationally tractable, as well as staggered-mesh-based constrained transport (CT) algorithms to preserve the divergence-free constraint of the magnetic field, including a general class of prolongation operators for face-allocated variables compatible with them. Results. After presenting several standard tests for the new implementation, we show that the choice of divergence-control method employed can produce qualitative differences in the simulation results for scientifically relevant accretion problems. We demonstrate the ability of AMR to decrease the computational costs of black-hole accretion simulations while sufficiently resolving turbulence arising from the magnetorotational instability. In particular, we describe a simulation of an accreting Kerr black hole in Cartesian coordinates using AMR to follow the propagation of a relativistic jet while self-consistently including the jet engine, a problem set up-for which the new AMR implementation is particularly advantageous. Conclusions. The CT methods and AMR strategies discussed here are being currently employed in the simulations performed with BHAC used in the generation of theoretical models for the Event Horizon Telescope Collaboration.