Skip to content

Commit 9f5cb6d

Browse files
author
docs-bot
committed
docs: update from source@aa57c8e
1 parent 3d27824 commit 9f5cb6d

6 files changed

Lines changed: 130 additions & 13 deletions

File tree

‎docs/features.html‎

Lines changed: 49 additions & 3 deletions
Large diffs are not rendered by default.

‎docs/kernel-configuration.html‎

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<link rel="apple-touch-icon" href="/favicon.ico">
2424
<link rel="stylesheet" href="/assets/css/site.css?v=b310d7c992">
2525
<link rel="stylesheet" href="/assets/css/main.css?v=ccd72260b9">
26-
<script type="application/ld+json">[{"@context": "https://schema.org", "@type": "TechArticle", "headline": "Kernel configuration", "description": "How to compile an Android kernel with Droidspaces support: the config options and patches for non-GKI and GKI kernels.", "url": "https://www.droidspaces.org/docs/kernel-configuration.html", "inLanguage": "en", "dateModified": "2026-10-03", "author": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "publisher": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "isPartOf": {"@type": "WebSite", "name": "Droidspaces", "url": "https://www.droidspaces.org/"}}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.droidspaces.org/"}, {"@type": "ListItem", "position": 2, "name": "Documentation", "item": "https://www.droidspaces.org/docs/"}, {"@type": "ListItem", "position": 3, "name": "Kernel configuration", "item": "https://www.droidspaces.org/docs/kernel-configuration.html"}]}]</script>
26+
<script type="application/ld+json">[{"@context": "https://schema.org", "@type": "TechArticle", "headline": "Kernel configuration", "description": "How to compile an Android kernel with Droidspaces support: the config options and patches for non-GKI and GKI kernels.", "url": "https://www.droidspaces.org/docs/kernel-configuration.html", "inLanguage": "en", "dateModified": "2026-10-04", "author": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "publisher": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "isPartOf": {"@type": "WebSite", "name": "Droidspaces", "url": "https://www.droidspaces.org/"}}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.droidspaces.org/"}, {"@type": "ListItem", "position": 2, "name": "Documentation", "item": "https://www.droidspaces.org/docs/"}, {"@type": "ListItem", "position": 3, "name": "Kernel configuration", "item": "https://www.droidspaces.org/docs/kernel-configuration.html"}]}]</script>
2727
<script>(function(){const t=localStorage.getItem('theme');if(t)document.documentElement.setAttribute('data-theme',t);})();</script>
2828
</head>
2929
<body>
@@ -122,13 +122,17 @@ <h3 id="step-1-mandatory-configuration">Step 1: Mandatory configuration <a class
122122
<span class="c"># Control groups support</span>
123123
<span class="nv">CONFIG_CGROUPS</span><span class="o">=</span>y
124124
<span class="nv">CONFIG_CGROUP_DEVICE</span><span class="o">=</span>y
125-
<span class="nv">CONFIG_CGROUP_PIDS</span><span class="o">=</span>y
126-
<span class="nv">CONFIG_MEMCG</span><span class="o">=</span>y
127125
<span class="nv">CONFIG_CGROUP_SCHED</span><span class="o">=</span>y
128126
<span class="nv">CONFIG_FAIR_GROUP_SCHED</span><span class="o">=</span>y
129127
<span class="nv">CONFIG_CGROUP_FREEZER</span><span class="o">=</span>y
130128
<span class="nv">CONFIG_CGROUP_NET_PRIO</span><span class="o">=</span>y
131129

130+
<span class="c"># Resource limits: --memory, --cpus, --pids-limit, in that order.</span>
131+
<span class="c"># Optional: a limit whose option is missing is skipped with a warning</span>
132+
<span class="nv">CONFIG_MEMCG</span><span class="o">=</span>y
133+
<span class="nv">CONFIG_CFS_BANDWIDTH</span><span class="o">=</span>y
134+
<span class="nv">CONFIG_CGROUP_PIDS</span><span class="o">=</span>y
135+
132136
<span class="c"># Device filesystem support</span>
133137
<span class="nv">CONFIG_DEVTMPFS</span><span class="o">=</span>y
134138

@@ -258,7 +262,8 @@ <h3 id="step-1-apply-the-mandatory-kabi-patches">Step 1: Apply the mandatory kAB
258262
<h3 id="step-2-edit-gki_defconfig">Step 2: Edit <code>gki_defconfig</code> <a class="header-anchor" href="#step-2-edit-gki_defconfig">#</a></h3>
259263
<p>Do not use separate fragment files here. Edit <code>arch/arm64/configs/gki_defconfig</code> directly and apply this <strong>GKI-only configuration</strong>.</p>
260264
<p>These options are tested on all GKI kernels and do not break the ABI.</p>
261-
<div class="callout callout-warning"><strong class="callout-title">Warning</strong><p><strong>Do not</strong> enable anything beyond the GKI configuration below. These specific options are kABI-safe only in combination with the Step 1 patch.</p></div>
265+
<div class="callout callout-warning"><strong class="callout-title">Warning</strong><p><strong>Do not</strong> enable anything beyond the GKI configuration below. These specific options are kABI-safe only in combination with the Step 1 patch.</p>
266+
<p>The <strong>Resource limits</strong> group at the end is the exception: it is not kABI-tested. Leave it out unless you need CPU or process limits, and test each option on its own.</p></div>
262267
<div class="code-block"><span class="code-lang">makefile</span><button class="icon-button copy-btn" onclick="copyCode(this)" aria-label="Copy"><span class="icon" aria-hidden="true">content_copy</span></button><pre><code><span class="c"># Kernel configurations for full DroidSpaces support for GKI</span>
263268
<span class="c"># Copyright (C) 2026 ravindu644 &lt;droidcasts@protonmail.com&gt;</span>
264269

@@ -300,6 +305,12 @@ <h3 id="step-2-edit-gki_defconfig">Step 2: Edit <code>gki_defconfig</code> <a cl
300305
<span class="c"># For NixOS support</span>
301306
<span class="nv">CONFIG_TMPFS_POSIX_ACL</span><span class="o">=</span>y
302307
<span class="nv">CONFIG_TMPFS_XATTR</span><span class="o">=</span>y
308+
309+
<span class="c"># Resource limits: --cpus and --pids-limit. CONFIG_MEMCG is already on in GKI.</span>
310+
<span class="c"># Not covered by the kABI patches: both resize scheduler and cgroup structures</span>
311+
<span class="c"># that vendor modules read. Enable one at a time and be ready for a bootloop</span>
312+
<span class="nv">CONFIG_CFS_BANDWIDTH</span><span class="o">=</span>y
313+
<span class="nv">CONFIG_CGROUP_PIDS</span><span class="o">=</span>y
303314
</code></pre></div>
304315
<p><strong>How to edit the file:</strong></p>
305316
<ul>
@@ -335,6 +346,7 @@ <h3 id="1-run-the-requirements-check">1. Run the requirements check <a class="he
335346
<li>OverlayFS support (optional, for volatile mode)</li>
336347
<li>VETH and Bridge support (optional, for NAT mode)</li>
337348
<li>IPv6 NAT support (optional, for IPv6 in NAT mode)</li>
349+
<li>Memory, CPU and process limit support (optional, for <code>--memory</code>, <code>--cpus</code> and <code>--pids-limit</code>)</li>
338350
<li>PTY/devpts support</li>
339351
<li>Loop device support</li>
340352
<li>ext4 support</li>
@@ -427,6 +439,21 @@ <h3 id="3-what-to-do-if-something-is-missing">3. What to do if something is miss
427439
<td><code>CONFIG_SECCOMP=y</code></td>
428440
<td>Seccomp shield disabled. Security risk.</td>
429441
</tr>
442+
<tr>
443+
<td>Memory limit</td>
444+
<td><code>CONFIG_MEMCG=y</code></td>
445+
<td><code>--memory</code> is skipped.</td>
446+
</tr>
447+
<tr>
448+
<td>CPU limit</td>
449+
<td><code>CONFIG_CFS_BANDWIDTH=y</code></td>
450+
<td><code>--cpus</code> is skipped.</td>
451+
</tr>
452+
<tr>
453+
<td>Process limit</td>
454+
<td><code>CONFIG_CGROUP_PIDS=y</code></td>
455+
<td><code>--pids-limit</code> is skipped.</td>
456+
</tr>
430457
</tbody>
431458
</table></div>
432459
<hr />

‎docs/linux-cli.html‎

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<link rel="apple-touch-icon" href="/favicon.ico">
2424
<link rel="stylesheet" href="/assets/css/site.css?v=b310d7c992">
2525
<link rel="stylesheet" href="/assets/css/main.css?v=ccd72260b9">
26-
<script type="application/ld+json">[{"@context": "https://schema.org", "@type": "TechArticle", "headline": "Linux CLI", "description": "Reference for the droidspaces command line: every command, flag and config file key.", "url": "https://www.droidspaces.org/docs/linux-cli.html", "inLanguage": "en", "dateModified": "2026-10-03", "author": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "publisher": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "isPartOf": {"@type": "WebSite", "name": "Droidspaces", "url": "https://www.droidspaces.org/"}}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.droidspaces.org/"}, {"@type": "ListItem", "position": 2, "name": "Documentation", "item": "https://www.droidspaces.org/docs/"}, {"@type": "ListItem", "position": 3, "name": "Linux CLI", "item": "https://www.droidspaces.org/docs/linux-cli.html"}]}]</script>
26+
<script type="application/ld+json">[{"@context": "https://schema.org", "@type": "TechArticle", "headline": "Linux CLI", "description": "Reference for the droidspaces command line: every command, flag and config file key.", "url": "https://www.droidspaces.org/docs/linux-cli.html", "inLanguage": "en", "dateModified": "2026-10-04", "author": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "publisher": {"@type": "Organization", "name": "Droidspaces", "url": "https://www.droidspaces.org/", "sameAs": ["https://github.com/ravindu644/Droidspaces-OSS", "https://t.me/Droidspaces"]}, "isPartOf": {"@type": "WebSite", "name": "Droidspaces", "url": "https://www.droidspaces.org/"}}, {"@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{"@type": "ListItem", "position": 1, "name": "Home", "item": "https://www.droidspaces.org/"}, {"@type": "ListItem", "position": 2, "name": "Documentation", "item": "https://www.droidspaces.org/docs/"}, {"@type": "ListItem", "position": 3, "name": "Linux CLI", "item": "https://www.droidspaces.org/docs/linux-cli.html"}]}]</script>
2727
<script>(function(){const t=localStorage.getItem('theme');if(t)document.documentElement.setAttribute('data-theme',t);})();</script>
2828
</head>
2929
<body>
@@ -370,6 +370,30 @@ <h3 id="feature-flags">Feature flags <a class="header-anchor" href="#feature-fla
370370
</tr>
371371
</tbody>
372372
</table></div>
373+
<h3 id="resource-limits">Resource limits <a class="header-anchor" href="#resource-limits">#</a></h3>
374+
<div class="table-wrap"><table>
375+
<thead>
376+
<tr>
377+
<th>Option</th>
378+
<th>Description</th>
379+
</tr>
380+
</thead>
381+
<tbody>
382+
<tr>
383+
<td><code>--memory=SIZE</code></td>
384+
<td>Most RAM the container may use. Takes <code>K</code>, <code>M</code>, <code>G</code> or <code>T</code> suffixes, for example <code>--memory=2G</code>. Minimum 4M.</td>
385+
</tr>
386+
<tr>
387+
<td><code>--cpus=COUNT</code></td>
388+
<td>Most CPU time, in cores. Fractions are fine, for example <code>--cpus=1.5</code>.</td>
389+
</tr>
390+
<tr>
391+
<td><code>--pids-limit=N</code></td>
392+
<td>Most processes and threads at once.</td>
393+
</tr>
394+
</tbody>
395+
</table></div>
396+
<p>Each limit needs kernel support and is skipped with a warning that names the missing option if the kernel lacks it. A limit is saved in the container's config, so it applies on every later start. See <a href="features.html#resource-limits">Resource limits</a>.</p>
373397
<h3 id="bind-mounts">Bind mounts <a class="header-anchor" href="#bind-mounts">#</a></h3>
374398
<div class="table-wrap"><table>
375399
<thead>
@@ -451,6 +475,14 @@ <h2 id="4-configuration-files">4. Configuration files <a class="header-anchor" h
451475
<span class="c1"># Run the container in the foreground instead of forking</span>
452476
<span class="na">foreground</span><span class="o">=</span><span class="s">0</span>
453477

478+
<span class="c1"># Resource limits. Leave a key out for no limit.</span>
479+
<span class="c1"># memory_limit is in bytes, pids_limit is a process count.</span>
480+
<span class="c1"># CPU time is cpu_quota microseconds per cpu_period: 200000 / 100000 = 2 cores.</span>
481+
<span class="na">memory_limit</span><span class="o">=</span><span class="s">2147483648</span>
482+
<span class="na">cpu_quota</span><span class="o">=</span><span class="s">200000</span>
483+
<span class="na">cpu_period</span><span class="o">=</span><span class="s">100000</span>
484+
<span class="na">pids_limit</span><span class="o">=</span><span class="s">1024</span>
485+
454486
<span class="c1"># ----------------------------------------</span>
455487
<span class="c1"># Android App Configuration</span>
456488
<span class="c1"># Any lines that the CLI engine does not recognize will be safely</span>
@@ -545,7 +577,7 @@ <h2 id="next-steps">Next steps <a class="header-anchor" href="#next-steps">#</a>
545577
<nav class="doc-nav" aria-label="Pages"><a href="usage-android-app.html" class="doc-nav-prev"><small>Previous</small>Android app usage</a><a href="networking-from-zero.html" class="doc-nav-next"><small>Next</small>Networking from zero</a></nav>
546578
</main>
547579
<aside class="toc-column">
548-
<nav class="toc" aria-label="On this page"><p class="toc-title">On this page</p><ul><li class="toc-h2"><a href="#quick-navigation">Quick navigation</a></li><li class="toc-h2"><a href="#1-getting-started">1. Getting started</a></li><li class="toc-h3"><a href="#start-your-first-container">Start your first container</a></li><li class="toc-h3"><a href="#enter-the-container">Enter the container</a></li><li class="toc-h3"><a href="#stop-the-container">Stop the container</a></li><li class="toc-h2"><a href="#2-command-reference">2. Command reference</a></li><li class="toc-h2"><a href="#3-options--flags">3. Options &amp; flags</a></li><li class="toc-h3"><a href="#rootfs-selection">Rootfs selection</a></li><li class="toc-h3"><a href="#container-identity--configuration">Container identity &amp; configuration</a></li><li class="toc-h3"><a href="#networking">Networking</a></li><li class="toc-h3"><a href="#feature-flags">Feature flags</a></li><li class="toc-h3"><a href="#bind-mounts">Bind mounts</a></li><li class="toc-h2"><a href="#4-configuration-files">4. Configuration files</a></li><li class="toc-h2"><a href="#5-common-workflows">5. Common workflows</a></li><li class="toc-h3"><a href="#running-with-a-config-file">Running with a config file</a></li><li class="toc-h3"><a href="#persistent-development">Persistent development</a></li><li class="toc-h3"><a href="#nat-isolation-with-port-forwarding">NAT isolation with port forwarding</a></li><li class="toc-h3"><a href="#nat-with-a-pinned-uplink">NAT with a pinned uplink</a></li><li class="toc-h3"><a href="#gateway-mode-lan-owned-by-openwrt">Gateway mode (LAN owned by OpenWRT)</a></li><li class="toc-h3"><a href="#ephemeral-testing">Ephemeral testing</a></li><li class="toc-h3"><a href="#one-off-commands">One-off commands</a></li><li class="toc-h3"><a href="#gpu-acceleration">GPU acceleration</a></li><li class="toc-h3"><a href="#deep-customization-privileged-mode">Deep customization (privileged mode)</a></li><li class="toc-h2"><a href="#6-advanced-usage--lifecycle">6. Advanced usage &amp; lifecycle</a></li><li class="toc-h3"><a href="#container-recovery">Container recovery</a></li><li class="toc-h2"><a href="#7-system-requirements">7. System requirements</a></li><li class="toc-h2"><a href="#next-steps">Next steps</a></li></ul></nav>
580+
<nav class="toc" aria-label="On this page"><p class="toc-title">On this page</p><ul><li class="toc-h2"><a href="#quick-navigation">Quick navigation</a></li><li class="toc-h2"><a href="#1-getting-started">1. Getting started</a></li><li class="toc-h3"><a href="#start-your-first-container">Start your first container</a></li><li class="toc-h3"><a href="#enter-the-container">Enter the container</a></li><li class="toc-h3"><a href="#stop-the-container">Stop the container</a></li><li class="toc-h2"><a href="#2-command-reference">2. Command reference</a></li><li class="toc-h2"><a href="#3-options--flags">3. Options &amp; flags</a></li><li class="toc-h3"><a href="#rootfs-selection">Rootfs selection</a></li><li class="toc-h3"><a href="#container-identity--configuration">Container identity &amp; configuration</a></li><li class="toc-h3"><a href="#networking">Networking</a></li><li class="toc-h3"><a href="#feature-flags">Feature flags</a></li><li class="toc-h3"><a href="#resource-limits">Resource limits</a></li><li class="toc-h3"><a href="#bind-mounts">Bind mounts</a></li><li class="toc-h2"><a href="#4-configuration-files">4. Configuration files</a></li><li class="toc-h2"><a href="#5-common-workflows">5. Common workflows</a></li><li class="toc-h3"><a href="#running-with-a-config-file">Running with a config file</a></li><li class="toc-h3"><a href="#persistent-development">Persistent development</a></li><li class="toc-h3"><a href="#nat-isolation-with-port-forwarding">NAT isolation with port forwarding</a></li><li class="toc-h3"><a href="#nat-with-a-pinned-uplink">NAT with a pinned uplink</a></li><li class="toc-h3"><a href="#gateway-mode-lan-owned-by-openwrt">Gateway mode (LAN owned by OpenWRT)</a></li><li class="toc-h3"><a href="#ephemeral-testing">Ephemeral testing</a></li><li class="toc-h3"><a href="#one-off-commands">One-off commands</a></li><li class="toc-h3"><a href="#gpu-acceleration">GPU acceleration</a></li><li class="toc-h3"><a href="#deep-customization-privileged-mode">Deep customization (privileged mode)</a></li><li class="toc-h2"><a href="#6-advanced-usage--lifecycle">6. Advanced usage &amp; lifecycle</a></li><li class="toc-h3"><a href="#container-recovery">Container recovery</a></li><li class="toc-h2"><a href="#7-system-requirements">7. System requirements</a></li><li class="toc-h2"><a href="#next-steps">Next steps</a></li></ul></nav>
549581
</aside>
550582
<footer class="footer">
551583
<div class="footer-inner">

‎docs/search.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)