- A global variable connect was added to track the device connection status. the code now checks for device connection only if it hasn't been connected yet, reducing redundant checks.
This will reduce the process time by about half, and it cannot be reduced further because the problem is with termux &termux-api itself.
- Add some messages to let the user know that the process is in progress.