Giter Club home page Giter Club logo

Comments (14)

gefin avatar gefin commented on May 28, 2024

There are some automatic settings in navit.xml which overwrite your changes. You can use your own navit.xml to change this automatics.

I use /sdcard in the path tool to store maps and my own navit.xml internal.
try /storage/nnnn-nnnn/Android/data/org.navitproject.navit/files to use the card.

nnnn-nnn is the uuid of the filesystem.

from navit.

freecycler avatar freecycler commented on May 28, 2024

I use /sdcard in the path tool to store maps and my own navit.xml internal.
try /storage/nnnn-nnnn/Android/data/org.navitproject.navit/files to use the card.

That's exactly the problem... while /sdcard is on the custom map location menu, /storage is not. So how can I choose it?

from navit.

gefin avatar gefin commented on May 28, 2024

maybe your device use an other path.

I checked the path with adb shell.

mount
/dev/fuse on /storage/4DDA-23FE type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)

Use your android an other path?
Navit should show the path even there is no access allowed.

from navit.

freecycler avatar freecycler commented on May 28, 2024

Here is output from mount

/dev/root on / type ext4 (ro,seclabel,relatime,block_validity,delalloc,barrier,user_xattr)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=926908k,nr_inodes=122750,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600,ptmxmode=000)
none on /dev/stune type cgroup (rw,nosuid,nodev,noexec,relatime,schedtune)
none on /dev/cpuctl type cgroup (rw,nosuid,nodev,noexec,relatime,cpu)
none on /dev/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent)
cg2_bpf on /dev/cg2_bpf type cgroup2 (rw,nosuid,nodev,noexec,relatime)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
proc on /proc type proc (rw,relatime,gid=3009,hidepid=2)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,seclabel,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,seclabel,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,seclabel,nosuid,nodev,noexec,relatime)
tmpfs on /mnt type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=926908k,nr_inodes=122750,mode=755,gid=1000)
/dev/block/bootdevice/by-name/persist on /mnt/vendor/persist type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/bootdevice/by-name/persist2 on /mnt/product/persist type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/data/media on /mnt/runtime/default/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal)
/data/media on /mnt/runtime/read/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal)
/data/media on /mnt/runtime/write/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
/dev/block/vold/public:179,65 on /mnt/media_rw/9C33-6BBD type exfat (rw,dirsync,nosuid,nodev,noexec,noatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,namecase=0,errors=remount-ro)
/dev/block/vold/public:179,65 on /mnt/secure/asec type exfat (rw,dirsync,nosuid,nodev,noexec,noatime,uid=1023,gid=1023,fmask=0007,dmask=0007,allow_utime=0020,namecase=0,errors=remount-ro)
/mnt/media_rw/9C33-6BBD on /mnt/runtime/default/9C33-6BBD type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,mask=6)
/mnt/media_rw/9C33-6BBD on /mnt/runtime/read/9C33-6BBD type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/mnt/media_rw/9C33-6BBD on /mnt/runtime/write/9C33-6BBD type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
/dev/block/dm-1 on /vendor type ext4 (ro,seclabel,relatime,block_validity,discard,delalloc,barrier,user_xattr)
/dev/block/bootdevice/by-name/modem on /vendor/firmware_mnt type ext4 (ro,context=u:object_r:firmware_file:s0,nosuid,nodev,relatime,block_validity,delalloc,barrier,user_xattr)
/dev/block/bootdevice/by-name/dsp on /vendor/dsp type ext4 (ro,seclabel,nosuid,nodev,relatime,data=ordered)
/dev/block/bootdevice/by-name/fsg on /vendor/fsg type ext4 (ro,context=u:object_r:fsg_file:s0,nosuid,nodev,relatime,block_validity,delalloc,barrier,user_xattr)
none on /acct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct)
none on /config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/block/bootdevice/by-name/userdata on /data type ext4 (rw,seclabel,nosuid,nodev,noatime,discard,nobarrier,noauto_da_alloc,resgid=1065,data=ordered)
/dev/block/bootdevice/by-name/cache on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/dm-2 on /oem type ext4 (ro,context=u:object_r:oemfs:s0,nosuid,nodev,relatime,block_validity,delalloc,barrier,user_xattr)
tmpfs on /storage type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=926908k,nr_inodes=122750,mode=755,gid=1000)
/data/media on /storage/emulated type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal)
/mnt/media_rw/9C33-6BBD on /storage/9C33-6BBD type sdcardfs (rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,mask=18)
tmpfs on /storage/self type tmpfs (rw,seclabel,nosuid,nodev,noexec,relatime,size=926908k,nr_inodes=122750,mode=755,gid=1000)

and the custom map location menu
Screenshot_20230516-193853

from navit.

freecycler avatar freecycler commented on May 28, 2024

Ugh... give me a few minutes to see if I can clean up that formatting...

edit: sorry, it just won't format nicely

from navit.

gefin avatar gefin commented on May 28, 2024

your screenshot shows the current directory is /mnt
Tap on "Up" then storage should be showed.

from navit.

freecycler avatar freecycler commented on May 28, 2024

No such luck...
Screenshot_20230517-054026

I think my navit.xml is just being ignored and the hidden default one is still being used, along with ignoring my layout files in favor of the shipped ones too.

from navit.

gefin avatar gefin commented on May 28, 2024

Which Android version use you?
My devices show the directorys in /
Grant you Storage access for navit?
Unfortunately I have no further ideas.

from navit.

freecycler avatar freecycler commented on May 28, 2024

Which Android version use you?

Pie

Grant you Storage access for navit?

yes

thank you for trying to help.... annoying thing is this same version does work as expected on an older device running Lollipop, without all this nonsense. I might have to try an older version of Navit from before this file picker thing got added for this one device.

from navit.

gefin avatar gefin commented on May 28, 2024

Get you access to this path?
/mnt/runtime/default/9C33-6BBD

from navit.

freecycler avatar freecycler commented on May 28, 2024

No, it gets a brief popup message saying
"Path does not exist or cannot be read"
the message does not seem to allow screenshots either

from navit.

freecycler avatar freecycler commented on May 28, 2024

I found sort of a workaround for some of this...

navit.xml and bookmark.txt must be on internal storage, at /storage/emulated/0/Android/data/org/navitproject.navit/files/navit , they cannot be moved to sdcard or the app will not find them

newbees should note the android naming system is confusing, the location /sdcard is NOT on the physical card, it is on internal storage

the paths $NAVIT_USER_DATADIR and $NAVIT_SHAREDIR can never include anything on the physical sd card, so an explicit path to the physical sd card must be specified inside navit.xml for both the maps and the layout files (if you do not want them to stay on internal storage)

eg, after the line <maps type="binfile" data="/sdcard/Download/osm_bbox_*.bin"/>
add:
<maps type="binfile" data="/storage/1234-ABCD/Android/data/org.navitproject.navit/files/navit/*.bin"/>

and above the line <xi:include href="$NAVIT_USER_DATADIR/navit/navit_layout_*.xml"/>
add:
<xi:include href="/storage/1234-ABCD/Android/data/org.navitproject.navit/files/navit/navit_layout_*.xml"/>

Optional extra if you want to see bookmarks on the map, you can also toggle visibility in layers w/this, after the above maps type=binfile line add:
<map type="textfile" data="/storage/emulated/0/Android/data/org.navitproject.navit/files/navit/bookmark.txt"/>
and after the mapset section but before the layer for found items also add (and provide a suitable .png image to use for the bookmark icon, copied into the specified location) add:

<layer name="bookmarks">
  <itemgra item_types="bookmark">
    <icon src="/path/to/png-file/somefile.png" w="64" h="64"/>
    <circle color="#009640" radius="0" width="0" x="10" y="10" text_size="27"/>
  </itemgra>
</layer>

sizes may need adjusting depending on your device screen resolution

this puts everything where I want and displays properly. The only hassle left is trying to download additional maps; the app still wants to put them on the internal storage and I cannot get the sd card to be selected for this, per screenshots in previous posts. I think the root of this problem is that the set map location is not doing the suitable SAF request, and I have no way to grant a permission it has never requested for this. My workaround is to use ADB or a teminal app to move downloaded maps from internal storage to the sd card manually. If the map is too big and I am really short of internal space to temporarily hold the download, this is not going to work, and I would have to download them to a PC and then use ADB to push the file, which might be a problem for users who do not have a PC. So I think there needs to be some improvement to how the "set custom map location" function works, to allow for using SAF mode.

Of course, it would be nice if the new wiki could add a section explaining about what items could be stored where and how to change the storage locations... there used to be forum threads about this in the now-lost forums, and more stuff in the old wiki that did not get transferred to the new wiki (maybe because some portions were out of date and needed updating first?)

As for the settings changes that do not stick, it turns out the Northing setting can be made to stick, but one must first toggle between autozoom and manual zoom, then it will stick. Even more confusing, it can be "stuck" in either enabled, or disabled mode, and only using the opposite auto/manual zoom setting will allow changing it again. This also seems to apply to the 2D/3D selection. I really don't understand the reasoning behind this, but it seems related to code in navit.xml where settings are conditional on autozoom. This also seems like something that should be explained in the wiki (if it is even intended behavior rather than an oversight that might be fixed in a future release).

from navit.

freecycler avatar freecycler commented on May 28, 2024

your screenshot shows the current directory is /mnt Tap on "Up" then storage should be showed.

No such luck...

I later went and installed this on a few more devices. It seems that it is just the one device type that has this issue. A second sample of the original device (Moto E6 running Pie, one on MetroPCS, the other on T-Mobile) also behaves the same way, no real surprise there.

But I now also have 2 samples of Samsung S7 running Oreo (one on AT&T, the other on Straight Talk) that do allow choosing the custom map location as @gefin says; starting from /mnt and tapping Up lets me see available choices including the SD card, and everything seems to work as expected on both of these devices.

So, I'm not sure if the file picker problem is an Oreo vs Pie issue, or maybe Motorola vs Samsung issue.

from navit.

edd-cgfan avatar edd-cgfan commented on May 28, 2024

Hi @freecycler,

Navit is successfully used here with Android Pie too.

/storage/emulated/0/Android/data/org/navitproject.navit/files/navit

That is too complicated thought:
Simply create a directory named "navit" (without quotes) under /storage/emulated/0/
Navit will find that directory and your navit.xml there if it is there.

Also, on external sd-card:

data="/storage/1234-ABCD/Android/data/org.navitproject.navit/files/navit/*.bin"

You could simply use /storage/1234-ABCD/navit or other directory names and use them in your navit.xml.

For a more convenient work with the file system you could install the app "Total Commander" from Swiss author C. Ghisler from the Play Store.
It shows for example the access to the external sd-card:
Screenshot_20230612-205952_Total Commander_

Regards,
cgfan

from navit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.