Here we present the result of measurements of electrical resistivity and magnetoresistivity of graphite/diamond nanocomposites (GDNC) and onion-like carbon (OLC) prepared by vacuum annealing of nanodiamond (ND) at various fixed temperatures. GDNC contain particles with a diamond core covered by closed curved graphitic shells. The electrical resistivity of annealed ND is characteristic of systems with localized electrons and can be described in terms of variable hopping-length hopping conductivity (VHLHC). The magnetoresistivity of OLC is negative in the range of field 0<B<2 T, and is positive at B>2 T. The conduction carrier concentration for OLC samples was estimated in the framework of the theory of negative magnetoresistance in semiconductors in the hopping conduction region. The free path length for conducting electrons at liquid helium temperature was estimated from the data on positive magnetoresistivity. The localization length of current carriers was also estimated. The determined parameters are in agreement with proposed structure model of OLC constructed using HRTEM data.