Oruxmaps downloads to internal SD in Android 6 (Marshmallow)

For all high tech electronic equipment including GPS, PLB, chargers, phones, computers, software. Discussion of simple electrical devices such as torches, belongs in the main 'Equipment' forum.

Oruxmaps downloads to internal SD in Android 6 (Marshmallow)

Postby Off-track » Sat 01 Jul, 2017 9:40 pm

There is useful information in this forum on offline Oruxmaps http://www.oruxmaps.com/, including http://bushwalk.com/forum%20viewtopic.php?f=21&t=23630, http://bushwalk.com/forum/viewtopic.php?f=21&t=24062&p=310421, http://bushwalk.com/forum/viewtopic.php?f=36&t=23130, QLD http://bushwalk.com/forum/viewtopic.php?f=38&t=21764&p=286919, NSW http://bushwalk.com/forum/viewtopic.php?f=21&t=21989, VIC http://bushwalk.com/forum/viewtopic.php?t=23800 and TAS http://bushwalk.com/forum/viewtopic.php?f=3&t=17091&p=228044.

If you have an Android 6 (Marshmallow) or later phone with limited internal memory, you may opt to access more memory by setting up a fast, high-capacity micro-SD card as emulated internal (= adoptable = flex) storage. There are trade-offs https://liliputing.com/2015/10/android-6-0-can-treat-sd-cards-as-internal-storage-at-a-cost.html, but short of rooting the phone (thus voiding the warranty) it is the only way to get apps like Oruxmaps with their data into the extra memory provided by the card. The most serious risks (loss of phone capability in the event of SD card failure) are managed by a thorough phone backup routine https://www.howtogeek.com/125375/how-to-create-a-full-android-phone-or-tablet-backup-without-rooting-or-unlocking-your-device.

Unfortunately, Oruxmaps (to version 7.0.12) is not completely seamless in use of emulated internal storage. But it can be worked around. Here is what I use on a ZTE A462 (=Telstra 4GX Plus) phone, following some leads in the Oruxmaps manual and forum including http://www.oruxmaps.com/foro/viewtopic.php?t=4286, http://www.oruxmaps.com/foro/viewtopic.php?t=4286, http://www.oruxmaps.com/foro/viewtopic.php?t=1887. On this phone I have set Oruxmaps to use emulated internal memory(SD), which can be done in phone Settings>App Manager or Storage.

Some of this I have also needed in Android 5 (Lollipop) on a Samsung tablet with a microSD card installed as regular (portable) memory.

Vector topo OpenAndroMaps http://www.openandromaps.org/en/downloads are available through the link in Oruxmaps> Maps> Switch Map> Offline> +> World> OpenAndroMaps. For Australia, you would click ‘Download maps’ then choose Oceania followed by your region of interest. But then clicking ‘+’ and using direct installation fails if Oruxmaps has been set to use emulated internal memory. It gives >Error! in the Android notification, after a long time downloading.

Raster topo WMS maps are available as detailed in previous posts linked above (thanks to ken333 and others). Some menus have changed slightly with Oruxmaps versions (e.g. Map Creator is now under Map Tools). You can use multiple <wms>...</wms> entries in your wms_services.xml file to have all the corresponding servers appear in the Oruxmaps WMS list. Note that Oruxmaps reads this wms_services.xml file from the old location (oruxmaps\mapfiles) not the new one (Android\data\com.orux.oruxmaps\files\mapfiles) needed for map downloads as described below. One possibility (now that you have plenty of Android memory) is to download (via WiFi) the areas of interest at several resolutions (called layers in Oruxmaps Map Creator) so that when they are zoomed out somewhat they still fill the screen, giving fewer annoying prompts to select alternative maps. You might try the highest few layers in any set. Caution: this can result in very big downloads, or exceed the download limit. There will likely be download errors after Oruxmaps is set to use emulated internal memory, unless the work-around below is used.

The problem is that after Oruxmaps is set to use emulated internal memory it can not use for this purpose its default map location at ...\emulated\0\oruxmaps\mapfiles. The work-around is to: (i) set up another folder at ...\sdcard\Android\data\com.orux.oruxmaps\files\mapfiles (ii) assign this new path for map files in Oruxmaps settings.

Once the Oruxmaps settings point to the correct new folder for mapfiles, direct installation into Oruxmaps works again. Alternatively, you can download the maps of interest to a computer (then unzip if necessary) and copy the .map (and .poi if interested) files into this new folder. If the downloaded maps do not appear automatically, refresh the offline map list in Oruxmaps.

For (i) I have used Windows File Explorer with the phone connected via USB in MTP mode (after driver installation); or the more Android-friendly MyPhoneExplorer http://www.fjsoft.at/en/. The paths look a bit different in these explorers, but it is not too hard to work out either way.

For (ii), I find it necessary (after clicking in Oruxmaps settings on the path to be altered) to start at Root, then work along the path by first clicking the required box (to get a blue tick) then clicking the folder to add it to the path and access the sub-folders. For the last folder in the path, just click the box for a tick (don’t add it to the path) then select OK. The Oruxmaps path set in these steps was Root/sdcard/Android/data/com.orux.oruxmaps/files/mapfiles or Root/storage/emulated/0/Android/data/com.orux.oruxmaps/files/mapfiles (these paths seem to be equivalent).

It is also necessary to put OpenAndroMaps rendertheme (or style) files (such as the Elevate-Elements theme http://www.openandromaps.org/en/manual/orux-installation-pc in a new ...\sdcard\Android\data\com.orux.oruxmaps\files\mapstyles folder and point the Oruxmaps Mapsforge settings there. (Android uses / where DOS uses \).

For hiking, I find the Elements - Hiking theme best with OpenAndroMaps. The offline vector maps have relatively smaller file size, so they are great for finding an area of interest before zooming in then swapping to an offline WMS raster topo map with more detail.

Offline WMS maps downloaded before all this still appear from their default location. But after setting Oruxmaps to use emulated internal memory, subsequently downloaded WMS maps and OpenAndroMaps must use the new location.

The same approach may be needed with other folders used by Oruxmaps for downloaded or SD-stored content (customwpts, dem, geocaches, tracklogs
etc.). I have not tried them all - so some may need the default location whereas others may need the new location. If Oruxmaps needs to write to a file
on SD, that file will almost certainly need to exist in a folder under ...\sdcard\Android\data\com.orux.oruxmaps\files\. Anyone interested can experiment and perhaps report back.

Screenshot_20170701-191419.png
Screenshot_20170701-191419.png (29.63 KiB) Viewed 17556 times
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 39
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male

Re: Oruxmaps downloads to internal SD in Android 6 (Marshmal

Postby Off-track » Mon 03 Jul, 2017 2:35 pm

If Oruxmaps needs to write to a file on SD, that file will almost certainly need to exist in a folder under ...\sdcard\Android\data\com.orux.oruxmaps\files\

It is not quite so simple, as I notice that after Oruxmaps is set to use emulated internal memory it is still able to write to \oruxmaps\tracklog, \oruxmaps\.cacheimg and \oruxmaps\mapfiles\OruxMapsCacheImages.db* (at least). Clearing the cache works as usual in Oruxmaps.

The rules by which Android restricts App write access to emulated internal memory folders remain somewhat mysterious (to me at least).
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 39
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male

Re: Oruxmaps downloads to internal SD in Android 6 (Marshmal

Postby Off-track » Thu 06 Jul, 2017 8:23 am

It looks like the Oruxmaps developer is working on this problem See notes on ver 7.0.13beta4 under http://www.oruxmaps.com/foro/viewtopic.php?f=4&t=4405. So the problem may be fixed without need for a workaround in subsequent versions.

In the meantime, those needing to use the workaround (by adding new folders under Android\data\com.orux.oruxmaps\files\ and pointing Oruxmaps settings to them) should also heed the developer's advice: "Do not remove old oruxmaps folders from internal storage, because some configuration files, and databases (tracks, map cache) must be there."
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 39
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male

Re: Oruxmaps downloads to internal SD in Android 6 (Marshmal

Postby keithy » Fri 07 Jul, 2017 8:22 pm

I've not had too many issues with my Android 6 Marshmallow devices. I do not really like how android restricted the write permissions to SD.

I have my files living in the emulated directory on the external SD cards of both my previous Xiaomi Redmi3 and now the Redmi Note4.

My previous Huawei was on Lollipop and I liked that I could create my own directory in the root of the SD card that was called \Oruxmaps. That way I could copy my own offline maps easily to that directory, even when downloading on via wifi on the device. I've downloaded various OSM maps and the DEM files while overseas and can share them between devices fairly easily without having to download the maps and files again.

I use Oruxmaps Donate, and v7.0.14 is out now and one of the notes is that the support to store data on external SD write permission bug has been corrected.

But the other cool thing I like is that the new version also supports Geopdf maps. I've yet to test out the VIC topo geopdfs to see how it goes.
User avatar
keithy
Phyllocladus aspleniifolius
Phyllocladus aspleniifolius
 
Posts: 737
Joined: Tue 28 Oct, 2014 5:31 pm
Region: Other Country
Gender: Male

Re: Oruxmaps downloads to internal SD in Android 6 (Marshmal

Postby wildwanderer » Tue 18 Jul, 2017 10:17 am

Thanks Off-Track for this excellent resource.

A few more General Tips

- Oruxmaps can be downloaded free from the authors website. http://www.oruxmaps.com/cs/en/. Current version 7.0.17. Currently the only the donate version (costs $) is available from Google Play. It has same functionality as the free version. Id recommend paying for the donate version if you would like to support the author. He has put a massive amount of work into this app. Non donate version was removed from Google Play due to some dispute between Google and author over the way he set up a donation button or something within the free version. Im guessing he did it in a way that prevents Google from getting a cut, so Google promptly removed it from the Play store.

- To install the free (non google play version) You need to enable install apps from 3rd party/unknown sources in your android settings. Disable this setting after you have installed oruxmaps from the apk so your phone install settings return to the high safety mode. Apk can be safely deleted after installation.

- The manual is located here - http://www.oruxmaps.com/oruxmapsmanual_en.pdf

- For NSW users or any state that provides downloadable topographic maps with GEO PDF capability. Download the needed map and place it in orux maps directory. It will work in orux maps with full routing /gps capability. NSW etopo maps - http://maps.six.nsw.gov.au/etopo.html . You need the latest oruxmaps version 7.017 for GEO PDF to work.

- Openandro maps are fairly good opentopo maps for most regions. You can download for Australia/NZ here http://www.openandromaps.org/en/downloads/australia-newzealand-oceania. (Click on the plus sign for auto download directly to oruxmaps) Dont forget the POI files as this will give you a search ability for locations with the map. You will also need rendertheme which is found for download on the the same page. (as off-track indicated there is also ability to download openandro from within oruxmaps but apparently it has some bugs (fixed?) downloading directly from the openandromaps website and choosing oruxmaps install worked fine for me)

- Its worth going into the user interface and setting up the buttons and dashboard for your preference. Eg in dashboard I always have Grid Reference co-ordinates, GPS accuracy, altitude (DEM) and sunrise,sunset displayed. If im using oruxmaps to record a route I have more information enabled but usually Im just looking at oruxmaps to get a position fix from time to time.

- Off-track has a detailed guide on waypoint creation and pois here - http://bushwalk.com/forum/viewtopic.php?f=21&t=26041

Advanced users
- You can use a 3rd party app 'Dem1" to find high res DEM files. (higher res than what is downloaded by default in oruxmaps and the high res versuion fixes a few errors with missing tiles) It automatically puts them into the orux directory. (you have to click on a small ad to make the map (in the dem finder app) work but its not to annoying) https://play.google.com/store/apps/details?id=com.portomene.dem1

- You can also set up a WMS service for maps as offtrack indicated. (gives applications like orux the ability to pull (download) map and satellite image files from a WMS server eg at six.maps.gov.au to the app). It works well and you can download maps and satellite imagery for offline use. Though the above GEO PDF download and drop maps (as well as openAndromaps) is likely going to easier for most people unless you want to spend a fair bit of time reading up how to find and then setup the WMS capability. Also downloading the WMS for off line use can take a long time especially for satellite imagery. Eg downloaded all night and took up over 1 gig of space on my phone to do a small section of the blue mountains. For WMS go into maps menu (from left hand side main menu) and click on the notebook, then click online and then WMS.

- There is a 3D viewer in orux which is a nice way to view the elevations of a potential route. Although for general bushwalking if you can read contours (as you should be able to !) the 3dDviewer not really necessary. Having the high res DEM files help alot for accurate 3D generation.
User avatar
wildwanderer
Athrotaxis selaginoides
Athrotaxis selaginoides
 
Posts: 1640
Joined: Tue 02 May, 2017 8:42 am
Location: Out of lockdown \o/
Region: New South Wales
Gender: Male

Re: Oruxmaps downloads to internal SD in Android 6 (Marshmal

Postby Off-track » Tue 18 Jul, 2017 8:09 pm

Maybe there should be another topic on geopdfs and their sources for OM; but anyhow, inspired by keithy and wildwanderer, I decided to try OM 7.0.17 and geopdf maps.

There was an initial problem of “App not installed”. The solution for me was to change OM from SD card to Internal Memory. There are various ways to do this in Android. One way is Settings > Apps > OruxMaps > Storage > Change > Internal Storage. Then the installation (upgrade) worked; without loss of previous data or settings.

In fact, OM seemed to redraw maps faster. This may be my imagination, but I decided to leave it in “internal storage” (whatever that means after one has set the SD card to be used as emulated internal storage). The new versions of OM are said to work with Marshmallow without need for the directory changes detailed in the OP; but I did not bother to change the folders I set up for 7.0.12, and everything worked fine. The offline maps are still saved to the SD card, so wherever the app is stored matters little for Android memory usage.

Then I tried a few geopdf maps. OM finds them if they are copied to whatever folder you have assigned for mapfiles. Wildwanderer has given the link above for NSW downloads. Despite the warning on that site, it did allow more than five files to be downloaded per day.

For QLD geopdf maps, go to http://qtopo.dnrm.qld.gov.au/mobile/ then follow: Click here to ... > Download a standard map sheet > 1:25,000 > Next > Search By (choose either Name or Number) > Next > enter your map Name or Number > Download Map. Even though qtopo does not mention the term, these are geopdf maps.

The QLD geopdf raster maps are higher resolution than the wms raster maps, also from qtopo. Great! Another feature to like about the geopdf maps is that they can fill the whole screen in OM at any zoom level (until you reach the edge of the map).

However, I always seem to be hiking at the corner of four mapsheets, and for this the wms (mosaic raster) maps work better. I am not sure how the OM settings to swap maps automatically will work on these geopdf standard mapsheets, which have substantial margins with scales, legends etc. around each map.

Also with some geopdf maps (e.g. Potsville NSW) OM (or my phone) seemed to struggle. Zooming caused the map to blink off and not reload for a long time, if ever. Other geopdf maps (e.g. Lamington QLD) did not show the same problem.

So overall, especially for NSW, I prefer the wms maps for 1:25000 detail. They are not hard to get using the instructions from ken333 linked in the OP. But as the bugs are ironed out I can see growing attraction to geopdfs.
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 39
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male

Re: Oruxmaps downloads to internal SD in Android 6 (Marshmal

Postby keithy » Tue 18 Jul, 2017 10:48 pm

Off-track wrote:However, I always seem to be hiking at the corner of four mapsheets, and for this the wms (mosaic raster) maps work better. I am not sure how the OM settings to swap maps automatically will work on these geopdf standard mapsheets, which have substantial margins with scales, legends etc. around each map.

Also with some geopdf maps (e.g. Potsville NSW) OM (or my phone) seemed to struggle. Zooming caused the map to blink off and not reload for a long time, if ever. Other geopdf maps (e.g. Lamington QLD) did not show the same problem.

I have found no issue between swapping between adjoining geopdf sheets or even between geopdf and a different mapsource layer. It prompts when you zoom out too far of the geopdf if you want to switch to the mapsource map. However I have some issues when switching between geopdf zooming out if I use a Garmin IMG map installed well. it switches automatically and I have to manually load the geopdf again.

I have also experienced the intermittent blinking when zooming out to the extent of the geopdf. this only seems to happen on the Qtopo and NSW topo geopdfs. I have not tried Vic geopdfs yet. I have some other geopdfs from a mil source that don't present this blinking issue.

Also I have found my USGS (North American) geopdfs do not load. They give an error prompt saying unable to find geo information. Avenza PDF and Terrago Edge on the same device opens these maps ok. I use Terrago Edge on the device to create mbtiles maps from the geopdfs that don't load up in Oruxmaps, and then transfer the mbtiles to the Oruxmaps mapfiles directory, and then it works fine as mbtiles. The conversion process using Terrago Edge is painfully slow however.

But it is a step in the right direction. There have been quite a few requests for Oruxmaps to support geopdfs natively for a few years so I'm glad the devs have incorporated the feature in now.
User avatar
keithy
Phyllocladus aspleniifolius
Phyllocladus aspleniifolius
 
Posts: 737
Joined: Tue 28 Oct, 2014 5:31 pm
Region: Other Country
Gender: Male

Re: Oruxmaps downloads to internal SD in Android 6 (Marshmal

Postby Off-track » Wed 19 Jul, 2017 1:05 pm

So much useful information is being added here on geopdf under OM that I have tried to summarise it and start a separate thread on the topic at http://bushwalk.com/forum/viewtopic.php?f=21&t=26065
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 39
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male

Re: Oruxmaps downloads to internal SD in Android 6 (Marshmal

Postby Off-track » Sun 20 Aug, 2017 3:10 pm

Oruxmaps (to version 7.0.12) is not completely seamless in use of emulated internal storage. But it can be worked around. Here is what I use ...

OM is now up to v 7.1.1. The developer has worked on the challenge of access to Android emulated storage, so the workaround in the OP may no longer be needed.

For some reason, even in OM 7.1.1, I had to use a similar approach to add a custom cursor. OM could navigate to ... /storage/emulated/0/oruxmaps/cursors but it would not accept that location for cursors. Putting the new cursor png file under ... /storage/emulated/0/Android/data/com.orux.oruxmaps/files/cursors (and setting this location under User Interface > Cursor) finally worked, even though OM reported the folder to be 'empty'.

If you have used the workaround in the OP, there should be no problems in upgrades. There is no need to move folders. Upgrades work best if you do NOT accept the Android offer to start the app directly from the upgrade process. Finish the install (upgrade) process, then start OM as usual. If anything seems missing (especially if you were too eager to bother with the advice in the previous sentence) check that your saved profile is loaded, and that your offline maps are refreshed into the database, then close the app completely and restart it. By then everything (including any custom waypoint symbols you provided) should be as before the upgrade.

The new version of OM provides better support for more versions of geo-referenced pdfs (including correct geometry with QTopo raster pdfs, use of ETopo vector pdfs without blinking on more phone models, and ability to use Caltopo pdfs).
Off-track
Nothofagus gunnii
Nothofagus gunnii
 
Posts: 39
Joined: Sat 01 Jul, 2017 8:20 pm
Region: New South Wales
Gender: Male


Return to Techno-Babble

Who is online

Users browsing this forum: No registered users and 11 guests