Development checkpoint (2026-09-11): outgoing/incoming call owners use one Electron call window with remote video, local camera preview and acknowledged mic/camera controls. Incoming Từ chối now sends the authenticated desktop cancel request for voice/video before local teardown. Snapshot
8d7a0d0is installed and running from the verified user-local copy; 25 call-control suites and all 21 aggregate regression commands pass under Electron 22's embedded Node. Real Electron zimage, single-instance, call-control and native H.264 localhost encode/decode/canvas fixtures also pass. It includes the corrected NV21 camera path, contact name/avatar presentation, normalized remote decline/end, and a cold-start incoming path that no longer creates a competing 401 call. Current two-account confirmation remains a release gate. This is not a finished release. See current evidence and remaining gates.
Independent project: this repository is RuriMeiko/zalo-linux-native, a public standalone GitHub repository (
fork: false, default branchmain). Development builds on realdtn2/zalo-linux-2026, not a from-scratch implementation. See credits and provenance, current status and publication checklist. Native outgoing voice was confirmed audible in both directions in one user-assisted test, and the user later reported two-way video on a previous trial. Those observations do not validate every control in the current build. No binary release is claimed yet.
For native voice/video startup with user-local runtime and device settings, see NATIVE-LAUNCH.md. This development launcher does not run the inherited upstream updater.
- Cuộc gọi đi (Outgoing Call - Phía mình gọi cho người ta): ✅ Hoạt động tốt (Working) — Phía mình gọi cho người khác nghe nói 2 chiều và camera hoạt động bình thường trên Linux.
- Cuộc gọi đến (Incoming Call - Người khác gọi tới mình): 🚧 Đang phát triển, hiện CHƯA nghe / cúp máy được (WIP - Cannot answer/end yet) — Khi người khác gọi đến máy tính, luồng xử lý tín hiệu và giao diện nghe/cúp máy vẫn đang được khắc phục và hoàn thiện.
This is an unofficial port of the Zalo macOS desktop client to Linux — not a web wrapper. The experimental native call path is documented in native/android-zrtc. It runs the existing ZRTC engine in a Linux/Bionic worker and connects it to PulseAudio, V4L2 and the desktop signaling/UI; it does not use Wine or an Android emulator.
The port was created by:
- Extracting the
.dmgfrom the macOS version - Locating
app.asarat/Applications/Zalo.app/Contents/Resources/ - Extracting it with
asar extract app.asar app - Running the extracted app with Electron 22.3.27 (
electron .)
Note: Newer versions of Electron cause errors — v22.3.27 is required.
Bạn chỉ cần copy link tài liệu chuẩn LLM dưới đây và đưa cho AI Agent của bạn để nó tự động thiết lập từ A đến Z:
Link cho AI Agent:
https://raw.githubusercontent.com/RuriMeiko/zalo-linux-native/main/llms.txt
Câu lệnh mẫu (Prompt):
"Hãy đọc hướng dẫn tại https://raw.githubusercontent.com/RuriMeiko/zalo-linux-native/main/llms.txt và tiến hành kiểm tra môi trường, tải Electron 22.3.27, tạo cấu hình và cài đặt Zalo Linux Native trên máy của tôi."
- Hệ điều hành: Linux x86_64 (Ubuntu, Debian, Fedora, Arch Linux,...).
- Node.js: Phiên bản 18 đến 22 (khuyến nghị v20 hoặc v22).
- Electron: Bắt buộc phiên bản v22.3.27 (các bản Electron mới hơn sẽ phát sinh lỗi).
- Tải Electron 22.3.27: Electron v22.3.27 Release (tải file
electron-v22.3.27-linux-x64.zipvà giải nén).
- Tải Electron 22.3.27: Electron v22.3.27 Release (tải file
- Âm thanh: PulseAudio hoặc PipeWire (với gói
pipewire-pulse). - Camera (tùy chọn cho video call): Thiết bị V4L2 (mặc định
/dev/video0). - ZRTC Runtime: Runtime native engine chuẩn bị sẵn (xem hướng dẫn tại native/android-zrtc/README.md).
Zalo Linux Native sử dụng file cấu hình launch.json để quản lý đường dẫn và thiết bị phần cứng.
Tạo file launch.json (ví dụ đặt tại thư mục dự án hoặc ~/.config/zalo-native-linux/launch.json):
{
"appDir": "/đường_dẫn_tuyệt_đối_đến/zalo-linux-native",
"electron": "/đường_dẫn_tuyệt_đối_đến/electron-v22.3.27/electron",
"runtime": "/đường_dẫn_tuyệt_đối_đến/runtime",
"source": "tên_microphone_từ_pactl",
"sink": "tên_loa_từ_pactl",
"noSandbox": true,
"experimentalVideo": true,
"videoDevice": "/dev/video0",
"experimentalIncoming": true,
"log": true
}Mở terminal và chạy lệnh:
# Lấy danh sách microphone (chọn tên thiết bị, không chọn dòng có đuôi .monitor):
pactl list sources short
# Lấy danh sách loa / tai nghe:
pactl list sinks shortLưu ý: Tất cả đường dẫn trong launch.json phải là đường dẫn tuyệt đối (bắt đầu bằng /home/...), không dùng ký hiệu ~ hoặc biến môi trường $HOME.
# Clone mã nguồn:
git clone https://github.com/RuriMeiko/zalo-linux-native.git
cd zalo-linux-native
# Kiểm tra tính toàn vẹn và thiết bị phần cứng trước khi chạy:
bash start.sh launch.json --check
# Khởi chạy Zalo:
bash start.sh launch.jsonScript cài đặt sẽ tự nhận diện thiết bị, tải đúng Electron 22.3.27 khi cần, build bản có manifest, thay bản cũ bằng một bản backup có thể phục hồi và đăng ký đúng một mục menu tên Zalo với icon Zalo:
git clone https://github.com/RuriMeiko/zalo-linux-native.git
cd zalo-linux-native
bash install.shCài nhanh bằng một dòng lệnh (Linux x86_64, cần git, node 18–22, curl, unzip):
git clone --depth 1 https://github.com/RuriMeiko/zalo-linux-native.git ~/zalo-linux-native && bash ~/zalo-linux-native/install.shGiữ thư mục ~/zalo-linux-native sau khi cài, vì bản cài dùng runtime trong đó cho đến lần cập nhật đầu tiên.
node ~/.local/share/zalo/scripts/update-native.mjs --check # có bản mới không
node ~/.local/share/zalo/scripts/update-native.mjs # cập nhật (đóng Zalo trước)
node ~/.local/share/zalo/scripts/update-native.mjs --rollback # quay về bản trước
node ~/.local/share/zalo/scripts/update-native.mjs --install-timer # tự kiểm tra mỗi 6 giờBản mới được tải vào thư mục riêng, kiểm hash rồi mới thay; nếu bản mới không qua bước
kiểm tra thì tự quay về bản cũ. Cấu hình thiết bị trong launch.json được giữ nguyên.
Khi cập nhật, thoát Zalo từ tray rồi chạy lại bash install.sh. Bản cũ được
chuyển vào ~/zalo-native-recovery/, không đụng tới hồ sơ đăng nhập.
install.sh đã làm bước này. Nếu dùng installer cấp thấp, có thể đăng ký lại:
node scripts/register-desktop.mjs ~/.local/share/zaloNó tạo duy nhất ~/.local/share/applications/zalo.desktop, tên hiển thị
Zalo, và dùng pc-dist/zalo.png trong bản cài.
bash update.sh --checkKhi đặt "log": true trong launch.json, toàn bộ log kết nối cuộc gọi được lưu tại:
tail -f ~/.config/ZaloData/zcall-agent.logStatus: Experimental native voice/video with incoming/outgoing UI is deployed; voice was confirmed audible both ways and one video trial displayed both peers. Current-build two-account controls/rejection and packaging remain release gates.
Description:
A massive proprietary VoIP and WebRTC stack built around custom ZRTP-based encryption. Implemented through zcall_mac.node and responsible for all voice and video calling functionality.
zcall_mac.node is a Mach-O binary and cannot run on Linux. The native path
replaces it with a Linux helper plus a bounded Bionic worker around the pinned
Android x86_64 ZRTC engine. The helper owns authenticated desktop signaling,
PulseAudio PCM, Logitech/V4L2 camera capture, H.264 frame transport and the
dedicated call window. Architecture, evidence and remaining limitations are in
CALL-LINUX.md, PORT-CHECKLIST.md and
INTEGRATION-STATUS.md.
Status: ✅ Ported
Description:
Replaces the original macOS Mach-O binary. Intercepts backup restoration calls to decompress and decrypt proprietary ZDB4.0 backup containers using AES-256-CBC and LZMA2, enabling full chat history recovery.
State:
Fully reverse-engineered and reimplemented in C++. The Linux replacement is complete and currently active.
Status: ✅ Ported
Description:
Replaces the macOS binary with a Linux x64 NAPI addon (build/linux_x64/jxl.node) built against libjxl 0.11. All runtime dependencies (libjxl, brotli, highway, libjpeg, lcms2) are bundled next to the addon with $ORIGIN RUNPATH, so no system packages are required. Full API parity: decodeToJpeg, bitmapToJxl, getJxlInfo, resizeJxl, resizeJxlLimit, jxlDecompressMulti, moduleReady.
Status: ✅ Ported
Description:
Pure-JS port of the thumbnail pipeline: prefers Electron nativeImage (zero dependencies, always available in the main process), falls back to sharp if the app ever bundles it, then to the system vips thumbnail CLI. Matches the macOS semantics consumers use (Image.thumbnail / resizeQA, fit-inside, JPEG quality, alpha flattened onto white).
Status: ✅ Ported
Description:
Spawns ffmpeg (ZALO_FFMPEG override → Electron's bundled ffmpeg → PATH) to extract one scaled frame, mirroring the static-FFmpeg macOS wrapper. When no ffmpeg binary exists the port rejects with the same { error: 'LIB_ERR' } shape the loader fallback already produced, so callers are unaffected.
Status: ✅ Ported
Description:
Rust NAPI-RS module rebuilt for Linux x64 (linux-x64/file-utilities.node, sources under native/). Exposes the full surface: getDirectorySize(Async|Sync), detectHardlinks(Async|Sync), detectFilesystem(Async|Sync), getDirectorySizeByGlob(Async|Sync).
Status: ✅ Ported
Description:
Pure-JS reimplementation of the napi-rs crawler: scanDirectory, updateReferenceMessageId, deleteHomelessFiles (conservative/aggressive), statUnmarkedFiles, deleteEmptyFolders. Parity-tested against the macOS binary's observed semantics (.zwalker.json marker format, atime buckets, homeless math, error codes 1016/1017).
Status: ✅ Ported
Description:
Pure-JS port: moveFileToTrash (FreeDesktop.org Trash spec — files/info layout, collision renaming, .trashinfo), copyFileSync, ensureDirSync, isFileExecutable. No "not support" fallback on Linux anymore.
Status: ✅ Ported
Description:
Pure-JS shim over Node's core inspector module (V8 Profiler.start/stop/setSamplingInterval). Provides the same profiles map, startProfiling/stopProfiling/setSamplingInterval/deleteAllProfiles surface as the macOS profiler addon.
Status: ✅ Ported
Description:
Pure-JS port: stat/statFolder (size, fileCount, mtime), diskInfo() keyed by mount point (statvfs/df), copyFolder/cancelCopy (cancellable recursive copy), canRead/canWrite/canReadAndWrite.
Status: ✅ Supported
Description:
The native database engine used to access local message shard databases (.db files).
State:
The original macOS binary has been replaced with a Linux ELF build (node_sqlite3.node) bundled within the application. Functionality is fully operational.
Status: ✅ Supported
Description:
Custom logging infrastructure utilizing an IPC transport layer.
State:
Implemented entirely in cross-platform JavaScript and requires no platform-specific porting work.
This is an active work-in-progress project. Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add your feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
For issues, questions, or suggestions, please open an issue on the independent project's GitHub Issues page. The predecessor repository remains credited above and in CREDITS.md.