[Android Software/Hacking General [Developers Only]] aerial4ce:
Trying to run the script in twrp terminal, it's unable to locate the file. This is the black shark 3, custom kernel hasn't been released so the twrp isn't fully accessible of the system. Like in file manager in twrp, there's no "/system" folder.

When trying to run script in adb shell, it says permission denied.

Script only ran for me in termux. But

Getting this issue, not sure how to proceed, can't out to super fixed. Tried chmodding /data folder and everything. Unsure if it's permissions related.

systemrw: Initiating procedure...

systemrw: Device is in Android mode. Ignoring
systemrw: Current device: blackshark
systemrw: Current Android version: 10
systemrw: Current SELinux status: Permissive
systemrw: Current slot is: 0
systemrw: Your super partition is located at: /dev/block/sda6
systemrw: / is read-only
systemrw: /product is read-only
systemrw: /vendor is read-only
systemrw: Attempting to disable dm-verity and verification...
verification is already disabled on slot with suffix _a.
verity is already disabled on slot with suffix _a.
systemrw: Dumping super partition to: ./img/super_original.bin
systemrw: Please wait patiently...

31457280+0 records in
31457280+0 records out
16106127360 bytes (15 G) copied, 106.587449 s, 144 M/s

systemrw: Successfully dumped super partition to: ./img/super_original.bin
systemrw: Unpacking embedded partitions from ./img/super_original.bin
systemrw: Nested partitions were successfully extracted from super

systemrw: Current size of system_b.img in bytes: 5153959936
systemrw: Current size of system_b.img in MB: 4915
systemrw: Current size of system_b.img in 512-byte sectors: 10066328

systemrw: 'shared_blocks feature' detected @ system_b.img

systemrw: Increasing filesystem size of system_b.img...
Resizing the filesystem on ./img/system_b.img to 1572863 (4k) blocks.
The filesystem on ./img/system_b.img is now 1572863 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of system_b.img...
systemrw: Read-only lock of system_b.img successfully removed

systemrw: Shrinking size of system_b.img back to minimum size...
Resizing the filesystem on ./img/system_b.img to 1295341 (4k) blocks.
The filesystem on ./img/system_b.img is now 1295341 (4k) blocks long.

=================================================

systemrw: Current size of product_b.img in bytes: 321642496
systemrw: Current size of product_b.img in MB: 306
systemrw: Current size of product_b.img in 512-byte sectors: 628208

systemrw: 'shared_blocks feature' detected @ product_b.img

systemrw: Increasing filesystem size of product_b.img...
Resizing the filesystem on ./img/product_b.img to 98157 (4k) blocks.
The filesystem on ./img/product_b.img is now 98157 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of product_b.img...
systemrw: Read-only lock of product_b.img successfully removed

systemrw: Shrinking size of product_b.img back to minimum size...
Resizing the filesystem on ./img/product_b.img to 77403 (4k) blocks.
The filesystem on ./img/product_b.img is now 77403 (4k) blocks long.

=================================================

systemrw: Current size of vendor_b.img in bytes: 1237516288
systemrw: Current size of vendor_b.img in MB: 1180
systemrw: Current size of vendor_b.img in 512-byte sectors: 2417024

systemrw: 'shared_blocks feature' detected @ vendor_b.img

systemrw: Increasing filesystem size of vendor_b.img...
Resizing the filesystem on ./img/vendor_b.img to 377660 (4k) blocks.
The filesystem on ./img/vendor_b.img is now 377660 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of vendor_b.img...
systemrw: Read-only lock of vendor_b.img successfully removed

systemrw: Shrinking size of vendor_b.img back to minimum size...
Resizing the filesystem on ./img/vendor_b.img to 316594 (4k) blocks.
The filesystem on ./img/vendor_b.img is now 316594 (4k) blocks long.

=================================================

systemrw: Current size of system_a.img in bytes: 5178011648
systemrw: Current size of system_a.img in MB: 4938
systemrw: Current size of system_a.img in 512-byte sectors: 10113304

systemrw: 'shared_blocks feature' detected @ system_a.img

systemrw: Increasing filesystem size of system_a.img...
Resizing the filesystem on ./img/system_a.img to 1580203 (4k) blocks.
The filesystem on ./img/system_a.img is now 1580203 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of system_a.img...
systemrw: Read-only lock of system_a.img successfully removed

systemrw: Shrinking size of system_a.img back to minimum size...
Resizing the filesystem on ./img/system_a.img to 1295694 (4k) blocks.
The filesystem on ./img/system_a.img is now 1295694 (4k) blocks long.

=================================================

systemrw: Current size of product_a.img in bytes: 321634304
systemrw: Current size of product_a.img in MB: 306
systemrw: Current size of product_a.img in 512-byte sectors: 628192

systemrw: 'shared_blocks feature' detected @ product_a.img

systemrw: Increasing filesystem size of product_a.img...
Resizing the filesystem on ./img/product_a.img to 98155 (4k) blocks.
The filesystem on ./img/product_a.img is now 98155 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of product_a.img...
systemrw: Read-only lock of product_a.img successfully removed

systemrw: Shrinking size of product_a.img back to minimum size...
Resizing the filesystem on ./img/product_a.img to 77400 (4k) blocks.
The filesystem on ./img/product_a.img is now 77400 (4k) blocks long.

=================================================

systemrw: Current size of vendor_a.img in bytes: 1237409792
systemrw: Current size of vendor_a.img in MB: 1180
systemrw: Current size of vendor_a.img in 512-byte sectors: 2416816

systemrw: 'shared_blocks feature' detected @ vendor_a.img

systemrw: Increasing filesystem size of vendor_a.img...
Resizing the filesystem on ./img/vendor_a.img to 377627 (4k) blocks.
The filesystem on ./img/vendor_a.img is now 377627 (4k) blocks long.

systemrw: Removing 'shared_blocks feature' of vendor_a.img...
systemrw: Read-only lock of vendor_a.img successfully removed

systemrw: Shrinking size of vendor_a.img back to minimum size...
Resizing the filesystem on ./img/vendor_a.img to 316592 (4k) blocks.
The filesystem on ./img/vendor_a.img is now 316592 (4k) blocks long.

=================================================

systemrw: Joining all extracted images back into one single super image...
systemrw: Please wait and ignore the invalid sparse warnings...

systemrw: Error! failed to create super_fixed.img file. Error code: 73