From Navit's Wiki
Revision as of 01:50, 29 September 2010 by Kiwi (talk | contribs) (note on upgrade not working)
Jump to: navigation, search

Android Port (no root required)

Since Navit is a native application, different versions are available for different processor types. Choose the one which best matches your device.

Download dir Compatible devices
android ARMv5 processors, should be compatible with most Android devices, including SE Xperia X10, Samsung I7500 Galaxy, Motorola Droid/Milestone, Samsung Galaxy Spica i5700, (?)
android_armv4t ARMv4 processors, only found in unofficial ports. This version should also work on other Android phones but the ARMv5 version is recommended. Devices which require this version include Neo Freerunner (running Android).
android_armv5te ARMv5TE processors: HTC? models? (Or same as ARMv5 build?)


Setup and Configuration

  • Get the latest apk for your phone (see above) and install it onto your device.
  • Get a map from and put it on the root of your SD card (not into a subdirectory) as navitmap.bin. If you plan to install for a Samsung I7500 Galaxy, the easiest way to start will be to put the map file on the folder /sdcard (the root of the internal memory, because the memory of the SD card is mounted to /sdcard/sd).
  • If you like to configure the initial view of the map (it automatically centers around your position once there is a fix): extract navit.xml via unzip from the .apk file and copy it to the same directory as navitmap.bin, edit it and change the <navit center=... attribute to your home coordinates. See navit.xml below for possible problems.

If Navit doesn't work please include the output of "adb logcat" (via the sdk) or "logcat" (via terminal on the device) in your bug report.

If you can't update try to uninstall it first. Note that you will lose your bookmarks and all settings.

Compiling it yourself

Note: build will fail with the latest version of the NDK as of r3490; see ticket #632 for details and solution.

You need the Android NDK and SDK.

  • Extend PATH with $NDK/build/prebuilt/linux-x86/arm-eabi-4.2.1/bin:

$SDK/tools where $NDK and $SDK refers to the development kits.

  • Check out the newest svn version with svn co
  • Run ./ from the navit dir.
  • Run configure as ./configure PKG_CONFIG=arm-eabi-pkgconfig RANLIB=arm-eabi-ranlib AR=arm-eabi-ar CC="arm-eabi-gcc -L$NDK/build/platforms/android-1.5/arch-arm/usr/lib -L. -I$NDK/build/platforms/android-1.5/arch-arm/usr/include" CXX=arm-eabi-g++ --host=arm-eabi-linux_android --enable-avoid-float --enable-avoid-unaligned --enable-cache-size=20971520 --enable-svg2png-scaling=8,16,32,48,64,96 --enable-svg2png-scaling-nav=59 --enable-svg2png-scaling-flag=32 --with-xslts=android # ***(once again replace $NDK with the appropriate path) ***
  • Run make
  • cd navit
  • Run make apk

The result is in android/bin as Navit-debug.apk

  • I had some problems with the prebuilt Android packages on the Samsung I7500 Galaxy. Navit crashes when the navigation starts. So i decided to compile it from source and detected some changes in the build process.
The configure command was changed to:
./configure PKG_CONFIG=arm-eabi-pkgconfig RANLIB=arm-eabi-ranlib AR=arm-eabi-ar CC="arm-eabi-gcc -L$NDK/build/platforms/android-3/arch-arm/usr/lib -L. -I$NDK/build platforms/android-3/arch-arm/usr/include" CXX=arm-eabi-g++ --host=arm-eabi-linux_android --enable-avoid-float --enable-avoid-unaligned --enable-cache-size=20971520 --enable-svg2png-scaling=8,16,32,48,64,96 --enable-svg2png-scaling-nav=59 --enable-svg2png-scaling-flag=32 --with-xslts=android --with-saxon=saxon-xslt (replace $NDK with the appropriate path)
You see the differences?
The include- and library-path has changed. You must use android-3 instead of android-1.5.
I used a Debian system for the build and Debian has the saxon-xslt program instead of saxon, provided by the libsaxon-java package. So you have to add the option --with-saxon=saxon-xslt.
Finally you have to modify the file navit/navit/ Remove the saxon option -snone, because it does not exist anymore.
After a make, cd navit, make apk and install to the Samsung I7500 Galaxy, i had a running Navit.
  • As a slight variation of the above on Debian/Ubuntu, try --with-saxon=saxonb-xslt; this saves you the makefile operation.


navit.xml is extracted from the apk into /data/data/org.navitproject.navit/share/navit.xml if it doesn't exist or is different from the one of the apk. You can copy it to /sdcard/navit.xml which is then used instead of the one from the data directory. Use at your own risk, it might be incompatible with future releases.

You can use for example navit_shipped.xml in,

  • edit file (if necessary),
  • rename it to navit.xml and
  • copy file to /data/data/org.navitproject.navit/share/navit.xml

Debian on Android Port

Android is a smartphone platform built on the top of the Linux kernel. Current hacks allow gaining root access and installing a full-featured distribution such as Debian, alongside the Android software, running simultaneously on top of the same kernel.

Navit porting

Navit package built on 03/03/09 is available here

You have to configure gpsd daemon before you start navit:

dpkg-reconfigure gpsd

and provide device /dev/smd27 and enable default start of gpsd daemon.

Do not bother to contact me if you have any useful ideas in connection with navit on Android. --SergiuszPawlowicz 17:20, 16 April 2009 (CEST)

Questions from users

Q: Isn't more easy to port navit on android and not on debian?. --Hire I would agree, in an ideal world, but this is a good start. I'd be more than happy to remove AndNav2 and install an open-source app. Well done SergiuszPawlowicz. --Chris debian 19:56, 27 April 2009 (CEST)

A: If it is easier for you, please provide me a link to your version :-) --SergiuszPawlowicz 17:20, 16 April 2009 (CEST)

A: Is now possible, see above --Cp15 09:50, 20 August 2009 (UTC)

Q: It would be very nice if Navit would use the android keybord for user input and would respekt the keys (especially the back-key) of android. --Cj 12:29, 16 August 2010 (UTC)