<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sylvain Bellone</title>
    <description>The latest articles on DEV Community by Sylvain Bellone (@sbellone).</description>
    <link>https://dev.to/sbellone</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F623866%2F0f37c0ff-e984-49cc-b07e-fa9bc2fe356a.jpeg</url>
      <title>DEV Community: Sylvain Bellone</title>
      <link>https://dev.to/sbellone</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sbellone"/>
    <language>en</language>
    <item>
      <title>How to install Anbox on Debian</title>
      <dc:creator>Sylvain Bellone</dc:creator>
      <pubDate>Sun, 02 May 2021 20:00:25 +0000</pubDate>
      <link>https://dev.to/sbellone/how-to-install-anbox-on-debian-1hjd</link>
      <guid>https://dev.to/sbellone/how-to-install-anbox-on-debian-1hjd</guid>
      <description>&lt;p&gt;While waiting to see how it works on the PinePhone, I've recently tried to install &lt;a href="https://anbox.io/" rel="noopener noreferrer"&gt;Anbox&lt;/a&gt; on a Debian (Bullseye), and found out that the official documentation or other online articles don't have proper Debian instructions. Most of those articles are based on Snap, while nowadays everything is present to install it the Debian way.&lt;/p&gt;

&lt;p&gt;After digging around, it turns out that most of what I will describe here is properly documented in the dedicated Debian README (&lt;code&gt;/usr/share/doc/anbox/README.Debian&lt;/code&gt;), but I have to admit that it took me time to find it and I personally often prefer a simple and visual tutorial.&lt;/p&gt;

&lt;p&gt;So, here is what I had to do to run Anbox and the F-Droid apk on Debian!&lt;/p&gt;

&lt;h1&gt;
  
  
  Core installation
&lt;/h1&gt;

&lt;p&gt;The first thing to do is of course to install Anbox itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt install anbox
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, as stated in the &lt;a href="https://docs.anbox.io/userguide/install.html#install-kernel-modules" rel="noopener noreferrer"&gt;official doc&lt;/a&gt;, check that the necessary kernel modules are enabled:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ ls -1 /dev/{ashmem,binder}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo modprobe ashmem_linux
$ sudo modprobe binder_linux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If like me, &lt;code&gt;/sbin&lt;/code&gt; is not in your &lt;code&gt;$PATH&lt;/code&gt; (&lt;code&gt;modprobe: command not found&lt;/code&gt;), add it or use the full path:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo /sbin/modprobe ashmem_linux
$ sudo /sbin/modprobe binder_linux
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At that point, if you try to run it (&lt;code&gt;anbox session-manager&lt;/code&gt;), you will probably get the following error:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Failed to connect to socket /run/anbox-container.socket: No such file or directory
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Android image
&lt;/h1&gt;

&lt;p&gt;Anbox indeed expect to find an Android image at &lt;code&gt;/var/lib/anbox/android.img&lt;/code&gt;.&lt;br&gt;
Download the latest image available at &lt;a href="https://build.anbox.io/android-images/" rel="noopener noreferrer"&gt;https://build.anbox.io/android-images/&lt;/a&gt; and move it there:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ sudo mv ~/Downloads/android_amd64.img /var/lib/anbox/android.img&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Restart the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo service anbox-container-manager restart
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should now be able to run Anbox, either from your Desktop environment launcher, or with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;anbox launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7j2ikppgdlcg674g2aj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb7j2ikppgdlcg674g2aj.png" alt="Anbox in XFCE Whisker Menu"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Installing and running APKs
&lt;/h1&gt;

&lt;p&gt;This last part is well explained in the &lt;a href="https://docs.anbox.io/userguide/install_apps.html" rel="noopener noreferrer"&gt;doc&lt;/a&gt;. Start by installing adb:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo apt install android-tools-adb
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You now have everything needed to install new applications:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open the Anbox Application Manager&lt;/li&gt;
&lt;li&gt;Download F-Droid: &lt;code&gt;$ wget https://f-droid.org/F-Droid.apk&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Install the apk: &lt;code&gt;$ adb install F-Droid.apk&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You should now see F-Droid in Anbox Application Manager!&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp2v2b5ve6566xrbzp0um.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp2v2b5ve6566xrbzp0um.png" alt="Anbox Application Manager"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Refs:&lt;br&gt;
&lt;a href="https://superuser.com/a/1464899" rel="noopener noreferrer"&gt;https://superuser.com/a/1464899&lt;/a&gt;&lt;br&gt;
&lt;a href="https://lists.debian.org/debian-user/2021/01/msg00894.html" rel="noopener noreferrer"&gt;https://lists.debian.org/debian-user/2021/01/msg00894.html&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/anbox/anbox/issues/123" rel="noopener noreferrer"&gt;https://github.com/anbox/anbox/issues/123&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>android</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
