Default How can I unpack/repack cust.img ?

How can I unpack/repack cust.img ? or any img file of lg firmware

Mobile :LG G2
Tablet : Nexus 7 2013 LTE
facebook : www.facebook.com/droidth