Alternative Dock: Android phone's journey to become a server by bypassing Docker

Subscribe to anime series + automatic download + streaming platform

After reading this post, lz deeply felt the power of private streaming platforms and the limitless possibilities of Docker, and began researching the feasibility of deploying a server in the dormitory. Unfortunately, lz’s location cannot control the dorm’s wired network port, and the roommate who does control the wired port is the type who is more enthusiastic about buying anti‑radiation underwear than his pregnant wife, showing some resistance to adding a mini computer host, and the negotiation fell apart.

6 Likes

May I ask, is it Miss Dongfang Tiexin? :pleading_face:

1 Like

I glanced at the original post; it seems to be a Linux deployed with Linux Deploy. If I remember correctly, that’s a chroot‑based tool, and I’ve even used it on my own Mi 4c. Installing Linux via chroot is relatively troublesome; the main issue is systemd (no real hardware control), and installing Docker can’t directly use systemd to manage containerd and the Docker service.

Also, if you need the phone to stay on for a long time, it inevitably has to be plugged in. After rooting, I recommend installing a module to limit the battery charge to 60%; otherwise, constantly keeping the battery fully charged can cause swelling, which is no joke… If you have the skills, you could modify the direct‑power scheme and remove the battery. I wanted to try it before, but I’ve been too busy to play :rofl:

1 Like

I have a friend who flashed Arch on a OnePlus device
Then installed the ARM version of Docker
:face_holding_back_tears_hugging_face:

1 Like

My setup is installed on an old x86 computer at home, and the Android device solution mentioned in the original post is also beyond my scope…

Although I do miss that setup in the dorm, I’m genuinely not interested this quarter, probably won’t tinker with it, and just simply subscribed to two series on qBittorrent.

Can you take a look at this?
https://www.zhihu.com/question/51710030/answer/2875412609

Long time no see, let’s sync up on progress.

After searching a lot of information, lz roughly summarized four possible routes:

  1. Compile Android kernel, enable relevant features, run Docker directly in Termux
  2. Install a QEMU virtual machine in Termux, then install Docker inside the VM
  3. Install postmarkOS, which is a complete Linux system
  4. Use Linux Deploy and install Docker within it (this is also the method used in the original post)

Overall, compiling the Android kernel is a bit beyond scope, QEMU VM performance is weak, postmarkOS does not provide an MI6 flashing package and would need to be built oneself, so lz chose the Linux Deploy route, selecting the Debian 10 distribution.

However, this path is not smooth sailing. The first problem lz encountered was ssh fail, ssh could not start; after solving that, the next issue was systemd:

This is indeed a tricky problem, because many Docker operations rely on systemctl, but it’s not impossible to work around. Trying to start the Docker daemon directly by running dockerd gave a new error message:

failed to start daemon: Devices cgroup isn't mounted

Research shows that the Linux distributions provided by Linux Deploy are not complete; the cgroup setup differs from a normal system. In short, lz is stuck here for now. Not in the mood to investigate further, will postpone for a while.

1 Like

Android heavily modifies Linux, it’s so stupid, Google is a stupid company. The Linux Foundation should change the license to prohibit Google from using the Linux kernel.

Actually, we can wait a bit longer; today I saw news that Google is adding a built-in Linux VM and Terminal to Android, with full support for cgroup and other features, and even planning to support nested virtualization :rofl: Maybe by next year this issue will be solved directly by Google.

1 Like

I won’t need this abstract solution by next year…

It feels like Linux is everywhere lately—Windows has WSL, Android is preparing to add a Linux VM, the country is developing its own Linux distribution, and even my parents’ workplace is piloting the installation of domestic operating system

This has actually been developing for a long time, such as Kylin, Deepin.
As for usability, I can only say it’s hard to put into words.
During a summer internship, a friend of mine took a photo; the whole machine was probably a Lenovo, and the system was almost Deepin.
She held an .exe file and asked me how to install WPS.
I was stunned for a long time.

Eh? I also came across it, haha

https://mp.weixin.qq.com/s/7jkSauAYeDRCMkMIme_srw

Haha, it seems the audience for these articles is quite concentrated.

After temporarily giving up the idea of installing Docker on Android, I tried some other approaches.

First is Clash, which helps me obtain apps from F‑Droid and Google Play, and by simply allowing LAN connections and opening the relevant ports, an Android phone can become a proxy server to achieve scientific internet access throughout the house.

Next is Samba; although Docker cannot run, many software can still run in Linux Deploy, and Samba can turn the Android phone into an SMB server, making file sharing within the LAN convenient.

I hoped to achieve automatic anime subscription via Auto Bangumi, but in fact qBittorrent itself supports RSS subscriptions, and qBittorrent‑nox can be installed and run directly. Combined with the aforementioned Samba file server, I can map a network drive on my computer, which essentially accomplishes a low‑spec version of automatic anime subscription. Perhaps I can also find time to run PT or something.

I’ve recently been researching embedding a Rust project’s cross‑compiled binary into Android and running it in the background. I previously looked into Tauri’s sidecar feature, but after careful study I found that Android actually doesn’t support it.

The official Android documentation is also terrible; it seems to only provide Rust source compilation and cannot directly embed a binary, which is hard to deal with.

Actually F-Droid supports mirror repositories, so you can use it without a proxy. Tsinghua TUNA maintains a mirror source.

In front of you there is a wall; you think of the other side, you can climb over the wall, tear it down, or go around it.

Ultimately, my goal is to set up a LAN streaming media platform and achieve automated anime tracking. When Docker cannot be installed, qbittorrent from the three-piece suite can be easily installed directly via apt.

The core of the automation is AutoBangumi; although it’s not highly recommended, the official provides a method for local deployment that doesn’t rely on Docker. Following the provided steps, I successfully installed and ran AB, then wrote a delayed auto‑start script to suit a server scenario.

Finally comes jellyfin; perhaps due to the chroot system, deploying jellyfin directly also encounters various odd issues. I turned my attention to jellyfin’s twin brother, emby, and was pleasantly surprised that emby directly provides an Android server installation package. After installing, it works normally and serves as a drop‑in replacement for jellyfin when not using advanced features.

In short, the problem has been resolved to some extent, and the journey can be considered concluded.