Skip to content

feat: add advanced dpkg/apt lock fixer script for Termux#6

Merged
djunekz merged 4 commits into
djunekz:mainfrom
jeanlucnail:main
Jun 23, 2026
Merged

feat: add advanced dpkg/apt lock fixer script for Termux#6
djunekz merged 4 commits into
djunekz:mainfrom
jeanlucnail:main

Conversation

@jeanlucnail

Copy link
Copy Markdown
Contributor

On some Termux environments (especially non-rooted recent Android versions like Android 13/14 on Xiaomi/Redmi devices), the standard tdoc fix routine might fail to completely release or detect stale dpkg or apt frontend locks.

This script provides a safe, automated, and strict fallback method:

  1. It checks if an actual apt or dpkg process is running to prevent breaking active installations.
  2. If no active PID is found, it forcefully removes the standard orphan lock files (lock, lock-frontend, etc.).
  3. It triggers a final verification via tdoc doctor.

Environment tested:

  • Termux 0.118.3
  • Device: Xiaomi Redmi Note 13 Pro+ 5G (Android 13 / SDK 33, non-rooted)

Feel free to integrate this logic into the main core or keep it as a standalone helper script (tdocfix.sh).

Description
On some Termux environments (especially non-rooted recent Android versions like Android 13/14 on Xiaomi/Redmi devices), the standard tdoc fix routine might fail to completely release or detect stale dpkg or apt frontend locks.
This script provides a safe, automated, and strict fallback method:
It checks if an actual apt or dpkg process is running to prevent breaking active installations.
If no active PID is found, it forcefully removes the standard orphan lock files (lock, lock-frontend, etc.).
It triggers a final verification via tdoc doctor.

Environment tested:
Termux 0.118.3
Device: Xiaomi Redmi Note 13 Pro+ 5G (Android 13 / SDK 33, non-rooted)
Feel free to integrate this logic into the main core or keep it as a standalone helper script (tdocfix.sh).
@djunekz djunekz merged commit c593fa7 into djunekz:main Jun 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants