Can i use this script for restore my TA (TA-backup)
package_extract_file("TA.img", "dev/block/mmcblk0p1");
Becaus i use this script for flashing cwm, just change mmcblk0p1 [TA] to mmcblk0p17 [boot]
Most likely it will work, but I wouldn't do that. TA is not a toy.
I assume you want to make a flashable ZIP with your TA in it. If you are flashing the TA, you should make very very absolutely sure it got flashed right and not do anything else until that. If you do this, implement a check that verifies that the TA that got written is right.
But then again, why do you want this? It's far less risky to do it manually or with some tool.