Magnetic fields can be used to identify lithium-ion batteries (LIBs) and help detect counterfeit and low-quality copies.