WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Edit/modify a .tcz  (Read 3061 times)

Offline equalunique

  • Newbie
  • *
  • Posts: 6
Edit/modify a .tcz
« on: November 08, 2019, 12:47:28 PM »
Given a 3rd-party .tcz file on /mnt/sda/tce/optional/, how does one change the init.d scripts in it?

I've found resources on creating new TCZs, but am trying specifically to change one that already exists, and one that I do not have the source code for.

All suggestions welcome!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11698
Re: Edit/modify a .tcz
« Reply #1 on: November 08, 2019, 02:01:18 PM »
Hi equalunique
First install  squashfs-tool.tcz.  Then:
Code: [Select]
unsquashfs /mnt/sda/tce/optional/extension.tczYou will find the extensions directory tree under  /mnt/sda/tce/optional/squashfs-root.  Make your changes. Then:
Code: [Select]
mksquashfs /mnt/sda/tce/optional/squashfs-root /mnt/sda/tce/optional/newname.tcz
rm -rf /mnt/sda/tce/optional/squashfs-root

Offline equalunique

  • Newbie
  • *
  • Posts: 6
Re: Edit/modify a .tcz
« Reply #2 on: November 13, 2019, 02:24:22 PM »
Hi equalunique
First install  squashfs-tool.tcz.  Then:
Code: [Select]
unsquashfs /mnt/sda/tce/optional/extension.tczYou will find the extensions directory tree under  /mnt/sda/tce/optional/squashfs-root.  Make your changes. Then:
Code: [Select]
mksquashfs /mnt/sda/tce/optional/squashfs-root /mnt/sda/tce/optional/newname.tcz
rm -rf /mnt/sda/tce/optional/squashfs-root


Thank you so much for this. It worked & I was able to accomplish exactly what I was trying to do.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11698
Re: Edit/modify a .tcz
« Reply #3 on: November 13, 2019, 02:32:15 PM »
Hi equalunique
You are welcome. Thank you for reporting your success.

Offline julcar

  • Jr. Member
  • **
  • Posts: 77
Re: Edit/modify a .tcz
« Reply #4 on: November 15, 2019, 01:12:58 AM »
just to add, run this command:

Code: [Select]
md5sum {extension-name}.tcz > {extension-name}.tcz.md5.txt

this will generate the propper md5 file otherwise the extension could not be loaded with the app manager

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11698
Re: Edit/modify a .tcz
« Reply #5 on: November 15, 2019, 09:31:39 AM »
Hi julcar
If you are going to modify an existing  .tcz , you should delete the  .md5.txt  file if you don't want the  .tcz  overwritten during
an update.

If you use  Apps->Load App Locally  the extenstion will load regardless of whether the  md5.txt  exists or is correct.

If you use  Apps->Cloud(Remote)->Browse  to load the extension you have 3 possible outcomes:
1. The  .md5.txt  file is correct and the extension loads.
2. The  .md5.txt  file does not exist, the repository is checked for an  .md5.txt  file and fetched if it exists. If the  MD5
    matches the extension, it loads. Otherwise it fails to load.
3. The  .md5.txt  file does not match the extension, so it fails to load.
« Last Edit: November 23, 2019, 01:27:15 AM by Rich »