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 HTC Desire Z, Motorola Droid/Milestone, Samsung I7500 Galaxy, Samsung Galaxy Spica i5700, Samsung Galaxy S, SE Xperia X10, (?)|
|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?) (HTC Desire Z works also with this build)|
Setup and Configuration
- Get the latest apk for your phone (see above) and install it onto your device.
- Get a map from http://maps.navit-project.org/download/ 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.
Setup and Configuration [Samsung Galaxy S running froyo]
- download and install TTS-extended (its not on the android market anymore) tts_3.1_market.apk
- run TTS, after startup it will download voice data. dont configure anything after download, just press back-key
- now download and install navit-svn navit-current.apk
- now download a map for your region (cloudmade maps do NOT work anymore!) from this page http://maps5.navit-project.org/
- select a region you want, and press "Get map!" button
- put the downloaded map file on your GalaxyS under this exact name /sdcard/navitmap.bin
- now start using navit
Compiling it yourself
- Install the prerequisite libraries see Dependencies
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 https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit
- Run ./autogen.sh 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 apkg
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/Makefile.am. 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 https://navit.svn.sourceforge.net/svnroot/navit/trunk/navit/navit/,
- 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 package built on 03/03/09 is available here http://pawlowicz.name/splot/phd/navit_0.1.0%2bsvn-2075_armel.deb
You have to configure gpsd daemon before you start navit:
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)