<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jlyo</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Jlyo"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Jlyo"/>
	<updated>2026-04-27T19:34:13Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Jlyo/WIP:s6/android&amp;diff=10829</id>
		<title>User:Jlyo/WIP:s6/android</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Jlyo/WIP:s6/android&amp;diff=10829"/>
		<updated>2015-04-30T18:12:33Z</updated>

		<summary type="html">&lt;p&gt;Jlyo: Mark as a draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Draft}}&lt;br /&gt;
&lt;br /&gt;
Notes about my Alpine Linux installation on a [https://oneplus.net/one 64GB OnePlus One] phone using [http://skarnet.org/software s6] to boot Alpine&#039;s userspace.&lt;br /&gt;
&lt;br /&gt;
[http://whiteboard.ping.se/Android/Debian Similar Debian instructions]&lt;br /&gt;
&lt;br /&gt;
There are two boot configurations I went through:&lt;br /&gt;
# Boot stock Android &amp;lt;tt&amp;gt;init&amp;lt;/tt&amp;gt;, chrooting into Alpine. Hooks into &amp;lt;tt&amp;gt;/data/local/userinit.d/*&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Boot a custom &amp;lt;tt&amp;gt;init&amp;lt;/tt&amp;gt;, where the Android root filesystem is a chroot under Alpine, but keeping Android&#039;s &amp;lt;tt&amp;gt;init&amp;lt;/tt&amp;gt; as PID 1.&lt;br /&gt;
&lt;br /&gt;
==Unlock the bootloader and root your phone==&lt;br /&gt;
{{Warning|Unlocking your bootloader will revert your phone to it&#039;s stock image, causing you to lose all your personal data on your phone!}}&lt;br /&gt;
&lt;br /&gt;
Unlocking the bootloader is necessary, however rooting your phone (&amp;quot;ROM&amp;quot;) is not if you hack on the boot image initrd.&lt;br /&gt;
&lt;br /&gt;
 fastboot oem unlock&lt;br /&gt;
&lt;br /&gt;
Flash TWRP to the recovery partition.&lt;br /&gt;
Install SuperSU.&lt;br /&gt;
&lt;br /&gt;
==Install Alpine in a chroot==&lt;br /&gt;
[[Installing Alpine Linux in a chroot]]&lt;br /&gt;
&lt;br /&gt;
==Hack on Android&#039;s boot.img to boot Alpine==&lt;br /&gt;
* Download stock boot.img, unpack, hack, repack, flash.&lt;br /&gt;
* Change kernel command line so SELinux is set to permissive (TODO: figure out how to return it to enforcing)&lt;br /&gt;
&lt;br /&gt;
 fastboot boot boot.img&lt;br /&gt;
 fastboot flash boot boot.img&lt;br /&gt;
&lt;br /&gt;
==Further investigations==&lt;br /&gt;
* Employ PID namespaces, so &amp;lt;tt&amp;gt;s6-svscan&amp;lt;/tt&amp;gt; can be the real PID 1, and not a &amp;lt;tt&amp;gt;fork()&amp;lt;/tt&amp;gt;. This requires you to change your kernel configuration and recompile the kernel.&lt;br /&gt;
* Mount namespaces (?). Mount namespaces are already enabled in the OnePlus kernel.&lt;br /&gt;
* Employ &amp;lt;tt&amp;gt;s6-sudod&amp;lt;/tt&amp;gt; so Android proceses can enter the Alpine environment (without SSH)&lt;br /&gt;
** Figure out how to open a new PTY and/or set terminal line disciplines so we can have process control in our shell.&lt;/div&gt;</summary>
		<author><name>Jlyo</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=User:Jlyo/WIP:s6/android&amp;diff=10828</id>
		<title>User:Jlyo/WIP:s6/android</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=User:Jlyo/WIP:s6/android&amp;diff=10828"/>
		<updated>2015-04-30T18:09:09Z</updated>

		<summary type="html">&lt;p&gt;Jlyo: Off to a start&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Notes about my Alpine Linux installation on a [https://oneplus.net/one 64GB OnePlus One] phone using [http://skarnet.org/software s6] to boot Alpine&#039;s userspace.&lt;br /&gt;
&lt;br /&gt;
[http://whiteboard.ping.se/Android/Debian Similar Debian instructions]&lt;br /&gt;
&lt;br /&gt;
There are two boot configurations I went through:&lt;br /&gt;
# Boot stock Android &amp;lt;tt&amp;gt;init&amp;lt;/tt&amp;gt;, chrooting into Alpine. Hooks into &amp;lt;tt&amp;gt;/data/local/userinit.d/*&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Boot a custom &amp;lt;tt&amp;gt;init&amp;lt;/tt&amp;gt;, where the Android root filesystem is a chroot under Alpine, but keeping Android&#039;s &amp;lt;tt&amp;gt;init&amp;lt;/tt&amp;gt; as PID 1.&lt;br /&gt;
&lt;br /&gt;
==Unlock the bootloader and root your phone==&lt;br /&gt;
{{Warning|Unlocking your bootloader will revert your phone to it&#039;s stock image, causing you to lose all your personal data on your phone!}}&lt;br /&gt;
&lt;br /&gt;
Unlocking the bootloader is necessary, however rooting your phone (&amp;quot;ROM&amp;quot;) is not if you hack on the boot image initrd.&lt;br /&gt;
&lt;br /&gt;
 fastboot oem unlock&lt;br /&gt;
&lt;br /&gt;
Flash TWRP to the recovery partition.&lt;br /&gt;
Install SuperSU.&lt;br /&gt;
&lt;br /&gt;
==Install Alpine in a chroot==&lt;br /&gt;
[[Installing Alpine Linux in a chroot]]&lt;br /&gt;
&lt;br /&gt;
==Hack on Android&#039;s boot.img to boot Alpine==&lt;br /&gt;
* Download stock boot.img, unpack, hack, repack, flash.&lt;br /&gt;
* Change kernel command line so SELinux is set to permissive (TODO: figure out how to return it to enforcing)&lt;br /&gt;
&lt;br /&gt;
 fastboot boot boot.img&lt;br /&gt;
 fastboot flash boot boot.img&lt;br /&gt;
&lt;br /&gt;
==Further investigations==&lt;br /&gt;
* Employ PID namespaces, so &amp;lt;tt&amp;gt;s6-svscan&amp;lt;/tt&amp;gt; can be the real PID 1, and not a &amp;lt;tt&amp;gt;fork()&amp;lt;/tt&amp;gt;. This requires you to change your kernel configuration and recompile the kernel.&lt;br /&gt;
* Mount namespaces (?). Mount namespaces are already enabled in the OnePlus kernel.&lt;br /&gt;
* Employ &amp;lt;tt&amp;gt;s6-sudod&amp;lt;/tt&amp;gt; so Android proceses can enter the Alpine environment (without SSH)&lt;br /&gt;
** Figure out how to open a new PTY and/or set terminal line disciplines so we can have process control in our shell.&lt;/div&gt;</summary>
		<author><name>Jlyo</name></author>
	</entry>
</feed>