Magnetic charging cable for smartphone with USB