Magnetic rigid packaging box for smartphones