[ZenFone 2 General] ycavan:
I've had a bunch of requests on how to run Linux on our ZF2, so this is a quick(ish) howto using some awesome tools out there.

Requirements:

1. Root ( this is necessary for creating a chroot )

2. Busybox ( from the Play Store ) for Linux Deploy and pretty much all root-related software

3. Linux Deploy ( from the Play Store ) for installing Linux

Optional:

1. XServer-XSDL ( from the Play Store ) for X

2. MicroSD card for linux

3. SD Card Partitioning software ( I use Aparted from the Play Store )

Process:

1. Root your phone. Plenty of howto's out there :)

2. Install Busybox

3. Install Linux Deploy

4. ( OPTIONAL ) Install XServer-XSDL

5. ( OPTIONAL ) If you want pulse audio support, you will need to add a /tmp folder to /data/data/x.org.server/files/img/

6. ( OPTIONAL ) Install Aparted

7. ( OPTIONAL ) repartition your microSD card with partition 1 as exFAT & the 2nd partition as ext4 ( for linux )

7b. Write down the location of your ext4 partition. Most of the time it will probably be /dev/bloc/mmcblk1p2 ( means memory card 1 partition 2 )

8. Start up Linux Deploy

8a. click on Properties ( looks like a download icon on the bottom right )

8b. Under Deploy: Select your Distribution.

8c. Under Deploy: Select your Distribution suite. ( right now there is no hw video acceleration and Mesa's new implementation fails with llvm errors; so if you want software supported glx, then choose an older distro )

8d. Under Deploy: Select i386 or i686 ( do NOT select any of the ARM processors )

8e. ( OPTIONAL ) Under Deploy: change Installation type to Partition if you want to use a real partition off your microSD card.

8f. ( OPTIONAL ) Under Deploy: change Installation path to your real partition, ie /dev/block/mmcblk1p2

8g. ( OPTIONAL ) Under Deploy: Change File system to the filesystem we partitioned the card as, ie ext4

8h. Under Startup: ONLY have SSH checked

8i. ( OPTIONAL ) Under Startup: Check Custom Mounts to mount other filesystems, like the internal SD card, the microSD card exFAT partition or even the /tmp folder for XServer-XSDL for pulse audio

8j. ( OPTIONAL ) Under Startup: Click Mount points to add mount points, here's a quick list:

/storage/emulated/0

/storage/MicroSD

/data/data/x.org.server/files/img/tmp

These 3 mounts would appear as: /mnt/0, /mnt/MicroSD and /mnt/tmp in your chroot linux

9. Install Linux ( it will take around 30 minutes or so )

10. After installation finishes, click Start and Linux Deploy will start up your ssh service.

11. Connect to your phone via ssh with default login/password: android/changeme

12. I HIGHLY recommend changing your password. ;)

13. ( OPTIONAL ) start up XServer-XSDL on your phone

14. ( OPTIONAL ) export DISPLAY=:0 to send all X commands to XServer-XSDL

15. ( OPTIONAL ) Pulse Audio: use your local package manager ( apt-get, rpm, pacman, emerge, etc... ) to install pulseaudio & pulse-alsa packages. This should set the default asound.conf to use pulse audio.

15a. ( OPTIONAL ) edit /etc/pulse/default.pa and add this line at the end:

load-module module-pipe-sink rate=44100 format=s16le channels=2 file=/mnt/tmp/audio-out

15b. ( OPTIONAL) edit /etc/pulse/default.pa and comment out the lines containing module-console-kit, ie:

# .ifexists module-console-kit.so

# load-module module-console-kit

# .endif

15c. ( OPTIONAL ) to start pulse audio before your application: $pulseaudio --start -D

16. Run your Linux executable(s)

Directions on recompiling LLVM, Gold & Mesa for Intel SSE4.1 assisted 3d: http://xdaforums.com/showpost.php?p=62024812&postcount=12

Arch Linux walkthrough: http://xdaforums.com/zenfone2/general/zf2-linux-howto-t3158034/page4#post62916375

Enjoy linux running alongside your phone.

Edit: Compiled libandroid-shmem.so for 64-bit Arch.