Context. Magnetic fields in accretion disks play an important role in the rich dynamics of these systems. A dynamo theory describing the generation of these magnetic field is in general very complex and requires many assumptions in order to be of practical use. In this respect, a theory with as few assumptions as possible is desirable. Aims. To investigate the generation of magnetic fields in accretion disks around magnetized central objects, a large-scale dynamo model is employed that includes feedback effects on the mass motion due to the Lorentz force. The dynamo model was developed from the fundamental magnetohydrodynamics equations with a minimum of hypothesis, and was tested in the case of the Sun and other stars. It is applied to accretion disks for the first time. Methods. The magnetic field in the disk, generated by the mentioned dynamo theory, was matched to that of the central object, considered dipolar, and to that of a magnetosphere described with the Grad-Shafranov equation. The relation between axial current and magnetic flux required in the Grad-Shafranov equation was not imposed, but was self-consistently determined along with the full solution.Results. The model is able to reproduce the patterns of magnetic field lines obtained in several works, such as closed magnetic lines near the central object and open lines for larger radii. The maximum value of the field is located near the internal radius of the accretion disk, where the currents in the disk force the concentration of field lines of the central object in the magnetosphere around this region. By varying the values of stellar mass, stellar magnetic field, mass accretion rate, and internal radius of the disk, it is found that the stellar magnetic field is the most important parameter in the determination of the disk magnetic field. The stellar mass is of secondary importance. It affects the azimuthal component of the disk magnetic field. The internal radius of the disk affects the disk zonal magnetic field and is likewise less important.