From XastirWiki
Jump to: navigation, search

Android via GNUroot and XServer XSDL

Kurt (KC9LDH) got it working on Nexus 7 2012 3G and Nexus 7 2013 LTE tablets. I have the latter type of tablet, so giving it a try on that and my Nexus 5x phone. I tried several times to install GNUroot and GNUroot Debian and couldn't make either one work correctly. After I installed the 2nd Linux into the same root, things could never work. Kurt's notes to the Xastir list mentioned uninstalling, then deleting a left-over GNUroot directory. Once I did that and installed "GNUroot Debian" again, it started working.

Xastir Install

I set the Nexus 7 for a 30-minute display timeout just for the install, set it to Airplane mode, and turned on WIFI so I could have the fastest package downloads / not use up my cell-phone data plan.

  • Install "XServer XSDL" from the Google Play Store. It doesn't need any special access.
  • Install "ShareGPS" from the Google Play Store. No special access needed.
  • Install "GNUroot Debian" from the Google Play Store. Needs access to:
    • Photos/Media Files
    • Wi-Fi connection information
    • Device ID & call information

Note: There exist other GNUroot options if you prefer to install another type of Linux (Not tested here yet). To install a different Linux variant: Install "GNUroot" instead of "GNUroot Debian" and select the particular root image you wish to install when you start up GNUroot.

  • Start up "GNUroot Debian". It will build a root filesystem.

For the below, once you type the first apt-get command and it completes, you can use the up-arrow key (if your particular keyboard has it) to bring back the last command and edit it. Will save you some typing.

 apt-get update
 apt-get upgrade
 apt-get install lxde-core

That last will install a LOT of packages! 378 in my case. It takes a while.

 apt-get install xterm pulseaudio xastir

Another 100 or so packages!

Remember to reset your Airplane Mode and display timeout when you're done with the install.

NOTE: If you have trouble with the apt-get commands it may be because the default DNS servers are filtered out by your ISP. Google's DNS servers of 8.8.8.8 and 8.8.4.4 are in /etc/resolv.conf by default. Edit that file to put in DNS servers that work for you and try again.

Running Xastir

  • Start the XServer XSDL application. It will switch to landscape mode when it starts up.
  • The first time you run it, have XSDL download additional fonts.
    • Pay attention to the percent completion so you can perform the following step before it times out:
  • When it finishes the downloads, tap the screen ONCE to change the default screen resolution. 1900x1200 is too hard to read or manipulate in X11 with a small-ish touch-screen.
  • It will then ask for the size of font, tap on the size you like.
  • It will then go to a blue screen which means it's up and running.

This is what XSDL printed on its final screen (IP numbers may change for yours):

 Launch these commands on your Linux PC:
 export DISPLAY=192.168.3.126:0
 export PULSE_SERVER=tcp:192.168.3.126:4712 metacity & gimp
 To tunnel X over SSH, forward port 6000 in your SSH client
 If you run Linux in chroot on this device, run
 export DISPLAY=:0 PULSE_SERVER=tcp:127.0.0.1:4712
  • Start GNUroot Debian
  • Go back to the GNUroot window, type:
 export DISPLAY=:0 PULSE_SERVER=tcp:127.0.0.1:4712
 startlxde &

Put the above two commands into a shell script so you can quickly/easily run them at any time.

Start an xterm. Inside the xterm type:

 xastir &

This link explains more about how to bring up various menu options by using 1/2/3 fingers on the screen:

 https://play.google.com/store/apps/details?id=x.org.server

Enabling GPS

Set up the "ShareGPS" app as a "GPSD" server as follows:

  • CONNECTIONS -> ADD -> Setup by Activity
    • Activity -> Share my GPS with external devices by activing as a GPSD server -> OK
    • Connection Method -> Use TCP/IP to host a GPSD server.
    • NAME -> "GPSD Server"
    • NEXT
    • TCP/IP SETTINGS
      • Do NOT click on UDP
      • Port 2947 (the default)
      • TCP/IP Server (click on this one)
  • In Xastir's Interface menu set up a GPSD connection to IP address 127.0.0.1, port 2947.

You may also need to go to the ShareGPS menu and enable NMEA sentences.

To gain more battery life: Change how often ShareGPS gets GPS info from 1000ms to 90,000ms (90 secs) or 300,000ms (5 mins).

Stopping Xastir

  • Stopping Xastir: File->Exit
  • Stopping the XServer XLST server: Tap your finger along the bottom of the screen or slide your finger up from the very bottom of the screen until the normal three Android symbols come up. Touch the middle symbol to go back to the main Android screen. Bring down the "window-shade" drop-down. Find the Notification for XLST. Press the "Stop" button on that notification. If you can't get the 3 Android symbols to show: Click the power button, click it again, log into your Android device if needed, then you should see the 3 symbols and can press the middle one.
  • Stopping GNUroot: Type "exit" at the prompt and hit the return key.
  • Stopping ShareGPS: Go to the app and hit the Android left arrow icon at the bottom of the screen to exit the app.

Additional

Refer to the link below for additional things you might try. In particular you can install the synaptic package manager to make it easier to add additional packages.

 https://www.xda-developers.com/guide-installing-and-running-a-gnulinux-environment-on-any-android-device/