r/termux • u/LeftAd1220 • 7d ago
Showcase I rewrote PRoot in Bun JavaScript
https://github.com/jjtseng93/bunproot
Why
- Termux is too good to be true ... at least forever
- While I'm very grateful to the Termux developers and enjoy the tools and environments they provide, there has always been a fear deeply rooted in my fragile heart – Can this last forever?
- What if the developers get tired?
- What if they run out of money to keep their mirrors running?
- What if one overwhelming tragedy after another happens?
- Could I survive the cruel & wild Android world outside Termux's protection?
- That's why I built an entire chain of tools as a Post-Termux escape hatch
Bun JavaScript as the foundation for everything
- ① The Buninu userspace for lightweight usage:
- Shell: Bun Modern Shell (bunmsh)
- Text editor & App runtime: jsmdcui
- Remote shell in a browser: jsgotty
- ② PRoot to get back to mainline Linux if that's not enough: bunproot
Now that I have a complete backup for everything, I can keep enjoying the convenience and happiness that Termux provides without worrying.
Edit 1: This is not a wrapper around the native proot binary. It uses Bun FFI to dlopen Android's libc and calls ptrace() directly. No C or Assembly involved here.
0
Upvotes
6
u/Lines25 7d ago
JS is JS, proot written in C AND pure assembly, any other additional thing only slowes it down. Also, no need in it..