How to unpack and package. pkg files

  android, question

I downloaded an upgrade package for Android system of a TV set with a file extension of. pkg. I want to unpack it and replace some picture files in it before repackaging it into pkg. I want to know what software tools can be used to complete it under Linux or Windows?

I also want to know. . . . . .