The recommended way is on the running device. Then you backup changes with "filetool.sh -b"
If you want to do it offline, you have to edit the content in side the mydata.tgz file.
Or unpack the tgz as root into a tmp folder, edit your files, then repack.