0

Is there a simple way to edit the contents of the data.tar.gz archive inside of an .ipk file??

BackDoorNoBaby
  • 141
  • 1
  • 9
  • Can you just use ipkg-extract-file to extract the file you need to edit? – airhuff Jan 19 '17 at 21:52
  • I need to edit the `data.tar.gz` and add a `symlink`, then install the package. I can extract the file, edit it, i can put it back in the `data.tar.gz`, but I can't remake the `.ipk` file.. – BackDoorNoBaby Jan 19 '17 at 21:54

1 Answers1

3

So figured out how to do this, in case anyone is wondering:

Step 1: Extract the .ipk archive using ar x <archive name>

This should create a control.tar.gz, a data.tar.gz, and a debian-binary

Step 2: Then extract the data.tar.gz using tar -xvzf data.tar.gz

Step 3: Modify the extracted file(s) as necessary

Step 4: Then re-create data.tar.gz using the modified files by using tar -czvf data.tar.gz <list of files or folders separated by spaces>

Step 5: Overwrite the data.tar.gz in the original .ipk archive using ar r <archive name> data.tar.gz to complete the process

BackDoorNoBaby
  • 141
  • 1
  • 9