This object is in archive! 

Locus disables external sdcard after start (using Lollipop)

Thomas Steffen shared this problem 3 years ago
Not a Problem

Hello everybody,

i have a Samsung Galaxy S4 (I9505). Yesterday i flashed Cyanogenmod 12 (Beta) wit Android Lollipop 5.0.1. My smartphone is rooted.

e06e2ad4579d5ebff170a9a1c9cd9da4

My external 32GB sdcard uses the exFAT Filesystem. All my Offline-Maps (Vector+Raster) are located there. As you can see in the following screenshots, I can use the sdcard with ES-Explorer (and many other apps) without any problems:

dd4107eec5dbc6ad44f6af455ed32adb

aeef2cf2f85e6232591813a035d557f2

4bcc8fad4896e7fe264fbaa2a46831e5

b94ed8a7644214e3ef4ed9b6b09f35d7

After installing and starting Locus maps (from internal sdcard), i tried to add my maps manually. I navigated to my maps folder on my external sdcard and locus starts to initialize the maps:

c9390c759687eb9b3daabfadd14fe1c7

After a while, locus shows up this error message:

e8bb216e12becece773e9a89469d0871

When I exit locus, my external sdcard is no longer available! I have to reboot android to use it again!

1467741b0b41c02ebf08e224564ac2b0

After rebooting android i can use my external sdcard again. When starting locus the next time, i can see this screen:

7ff663026a6885cce0eec8b829e705e2

I couldn't resolve this problem. Other Apps like the gallery can read and write the pictures from my external sd card, Poweramp can play and download music to my external sdcard, so i think it is a locus problem, isn't it?

I also tried other filesystems:

FAT32: I cannot use it, because my maps are in the sqlite-format (single file) and over 7GB big.

ext4: I had problems to write on my external sdcard.

I hope you can help me!

Best regards

Thomas Steffen

Comments (59)

photo
2

Ok, I figured out, that if I delete everything inside my maps directory on the external sdcard (image maps in sqlite format), then everything (vector maps, added online maps, ...) works fine and my external sdcard keeps working. If I create a own map inside locus (download current view), it is stored on the internal sdcard - no problem. When i exit locus and cut the two created map files out and paste them to the map folder of my external sdcard, locus shows up an error message again and my external sdcard isn't usable anymore (until reboot).

So I think the problem are maps in the sqlite-format placed on an external sdcard.

photo
2

Good day Thomas,


sorry to hear about such issues. On second side, experimental Cyanogen mode - no surprise.


Only what I can do for you now, is if you create a log right after this error appear, I can check content of this log. Maybe there will be any clue, why this problem happen.


How to create a log is wrote here: http://docs.locusmap.eu/doku.php?id=manual:faq:how_to_create_debug_log . You have probably rooted device, so you may use second bottom method with app called "CatLog".

photo
2

Hello Menion,


I've attached the logfile to this post. But I couldn't find anything. Maybe I have to try another format for my maps instead of sqlite. Can you suggest another format?


Best Regards

Thomas

photo
2

Good day Thomas,


thanks. For my own surprise, I also found nothing in your log. Expected at least some small error message that SD card was unmounted. Hmm ...


Because you use some alternative, not yet full tested BETA version, I'm worried I cannot help here. Because SQLite database is used by almost every application, I'm surprised such problems cause only Locus.


Anyway you may try convert these maps to for example GEMF or RMAP. Not sure how to do it :), but try to check Mapc2mapc app, that do a lot of powerful stuff. Something about formats in Locus is here: http://docs.locusmap.eu/doku.php?id=manual:maps:map_formats

photo
2

Hello Menion,

thank your for the response. I'll try that and report it here.

photo
photo
1

Ok, I've made a little test map in the GEMF-Format and it works perfectly on my external sdcard. The problem is, that i don't like the fomat, because of hundred thousands of files are created, it you choose a big area with all zoom levels.

I will now try diffrent versions of the SQLite-Format an hope that one version will work for me.


P.S.: For the creation of the maps I use the freeware "Mobile Atlas Creator" which support many format!


a60cd3c102112fa76d8d5aca7808059f

photo
2

"hundred thousands of files"? Really? It's weird because GEMF should be just a few files (one file is limited to 1 GB). You have such a lot of files and it works? I'm surprised :)


Check for example this page: http://forum.locusmap.eu/index.php?topic=1163.0

photo
photo
2

about mobac:

tried "Big Planet..."?

photo
2

The same problem with "BigPlanet-Tracks SQLite":


7fb067c754bac1c23fd8f37de837cf3c

photo
2

[DE]


Wie kopierst du die Datei vom PC auf die externe Karte?

Kannst du einmal versuchen die extSD in den Kartenleser deines PCs zu schieben und dann die sqlite vom PC rüber zu kopieren?

photo
2

Danke für den Tip, aber habe schon verschiedene Möglichkeiten ausprobiert. Kopieren über Datenkabel, WLAN und über Kartenleser. Alles mit dem gleichen Resultat. Wenn ich nach dem Fehler "disk i/o error 778" google, kann man zu dem Schluss kommem, dass es sich um ein Problem der SQLite-Datenbank unter Android 5 handel.

photo
2

Hey Menion, there seems to be a Problem with SQLite in Android Lollipop! Have a look at http://stackoverflow.com/questions/26816561/android-lollipop-changed-behavior-of-sqlite:

photo
2

Ok, I downgraded back to Android 4.4 (Imperium v16 ROM). Now everything works perfectly again! The thread can be closed

photo
1

Hello Thomas,


not a best solution :/. As I read in mentioned discussion, it should be also possible to move Locus manually to internal memory. Unfortunately I'm now unable to test it on own device as Nexus 7 do not have SD card. Home that soon coming update of Android L solve this stupid issue.

photo
photo
1

I've got the exact same problem :

galaxy s4 i9505

cyanogenmod 12

more than 200 apps (with no problem)

The phone has an external sd of 64g fat with 3gb of maps

The external SD is mounted as /storage/sdcard1/

As soon as I select this directory in Locus (settings/misc/Default directories) it unmount sdcard1. I can acces the external sd only after unmount and mount again in android settings/storage.

How could I help ?


Here is the log cat during the problem : https://dl.dropboxusercontent.com/u/328269/locusproblem-log.txt


Thanks in advance

photo
2

Hello Vincent,


I'm sorry to say it, but

  1. Locus do not use any special hacks/methods to work with SD card
  2. you both use some alternative ROM cyanogenmode so it has definitely something to do with this ROM and not generally with Android itself.

Also as I see in your log, there is some issue in native code:


  1. 02-02 17:04:30.167: I/DEBUG(28155): ABI: 'arm'

    02-02 17:04:30.167: I/DEBUG(28155): pid: 9772, tid: 9772, name: mount.exfat >>> /system/bin/mount.exfat <<<

    02-02 17:04:30.167: E/DEBUG(28155): AM write failure (32 / Broken pipe)

    02-02 17:04:30.167: I/DEBUG(28155): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2c

    02-02 17:04:30.177: I/DEBUG(28155): r0 b6f7c838 r1 00000000 r2 ffffffc8 r3 b6f3ae04

    02-02 17:04:30.177: I/DEBUG(28155): r4 b6f7c838 r5 bedd8720 r6 00000000 r7 b6f7ae0c

    02-02 17:04:30.177: I/DEBUG(28155): r8 b6c6a200 r9 bedd8714 sl 00000001 fp 00000000

    02-02 17:04:30.177: I/DEBUG(28155): ip b6f7af2c sp bedd8658 lr b6f5eed3 pc b6f62540 cpsr 80000030

    02-02 17:04:30.177: I/DEBUG(28155): backtrace:

    02-02 17:04:30.177: I/DEBUG(28155): #00 pc 00006540 /system/bin/mount.exfat

    02-02 17:04:30.177: I/DEBUG(28155): #01 pc 00002ecf /system/bin/mount.exfat

    02-02 17:04:30.177: I/DEBUG(28155): #02 pc 0000a4ab /system/bin/mount.exfat


So I rather suggest to post it on CyanogenMode support site.

photo
1

Thanks Menion for your investigation and your answer. I'll post in CM site.

And in the meantime, I'll move my file internaly (could i make a symbolic link to external sd ?)

photo
1

Hi,


I have just found out the same issue with CM12, Locus and external SD card. If I try to read data for Locus, the cards is unmounted and Locus crashes.


Is the moving files from SD card to phone internal memory ony one way or is there another solution?


Thanks

photo
photo
1

I think in the moment, it is the only solution and if you don't use big offline maps, it should not be a problem. I went back to Android 4.4, because of big Maps.

You will have to wait until the CM-Team will fix this issue.

photo
2

Hi ! Good news :)

The problem is solved, at least in last cm12 for galaxy S4. Don't know when it has been fixed, I just retest today and no more problem with external_sd.

Regards

photo
2

Hmm very good news, congratulation to CM team!

photo
2

unfortunately, it seems to be broken again... I've try to change the filesystem from the sdcard (ext4, f2fs) without success. still seaching...

photo
2

@Vincent: Where did you post this CM-bug? I am trying to create an issue now, because this bug is still unfixed, but I better need to know if it already had been reported, it seems not, is that possible?

photo
photo
2

For comparison: I run Sony Xperia S, fully rooted and all, and using the NAOSP rom. That used to be based on Android 5.0.2 and recently that moved up to the latest Android 5.1. And Locus continues to run like a charm on all of these! No issues whatsoever. I actually have 2 such phones: one stock (no root, original Sony ROM) with the old 4.1 and the other with 5.1. Oh, BTW, I also fiddled with ext4 vs f2fs and that did not impact at all either: everything just runs fine. (Actually, that old phone with 5.1 is running really well: smooth and rock stable.)


So seeing the story above: I would look at CM for the root cause.


What I think is quite handy is: connect the phone to PC, ensure that all drivers are OK and adb runs fine. Then use totalcommander and this plugin: http://www.totalcmd.net/plugring/android_adb.html

It is very convenient and with this, it is easy to capture the logcat output.

photo
1

Not sure this helps but I had the same problem. (here: http://help.locusmap.eu/topic/external-sd-card-missing-after-starting-locus) Looks like my solution was to format the SD card in NTFS. This gives you the option for files bigger than 3GB but also doesn't have the problem which seems to come from exFat format.

Hope this helps you.

Regards,

Tobias

photo
2

Oh no! I was just happy that my CM12 ran so beautiful and bugfree, then I had this same crash!

Bad luck this.

And no solution here.

Since when Android can read and write NTFS???

photo
2

Hm. I will give it a try...

photo
3

My Godness! This works indeedly, Android (CM12 at least) does be able to write on NTFS!


I made a test with my SGS4 (GT-I9505) running CM12 (the last 2015-04-20 nightly) with a spare 16 GB MicroSD where I put NTFS on it and the Locus directory with only one big vectormap (germany.map) and no problems, all worked. I could copy files on the sd and open them.

Great an many thanks to you Tobias!

photo
2

Hah, glad to hear I was helping someone. Yea, I was quiet surprised myself but hey... it works! :D

photo
2

Drawback (Nachteil) of NTFS on Android at least on my device is only:


- CWM/TWRP cannot read it, so a nandroid backup on external sd is not directly usable.


- system cannot copy files bigger than 2GB, so no big (>2gb) map file (e.g. from locus store) can be unpacked from zip or downloaded to external sd. Need a pc for these file operations.


I think the main reason why only locus met these rare SQLite-CM12 bugs is that there are no apps with these huge SQLite databases.

I am on CM12.0 from 20.4.2015, the last CM12 version. Maybe they fix this bug in CM12.1 some day.

By the way, anybody actually reported the bug to CM team?

photo
1

Hm, not sure about CM12 but I'm using CM11 (android 4.4) and have the same bug. So at least that's not a CM12 / Android 5 bug only.

photo
1

Did you test FolderMount? Locus on internal directory but the locus folder linked with FolderMount to locus folder (with all big maps) on the external sd (exFAT)?

photo
photo
2

Did anybody report this bug in CyanogenMod issue tracker?

Seems to be an old bug if it is already happening under CM11, maybe the CM-team isn't even aware of it?

photo
2

I can confirm that format the ext sdcard in NTFS solve the issue with Locus (although is just a workaround).


I've tested the same maps with orux and didn't have problems. So the problem is a Cyanogen/Locus problem.


Thanks

photo
2

OK, I cannot report a bug in the CM-Jira. The threshold is too high (no Xposed module installed, no nightly etc.). So I reported only to the german CM-Forum:

http://www.cyanogenmod-forum.de/Thread-CM-Bug-in-CM-mit-gro%C3%9Fen-SQLite-DBs-auf-extFAT-formatierten-ext-SD-Karten

So I doubt that this bug will ever reach the knowledge of the CM-Team and we most likely will have to live with it, if Menion is not able to find a real workaround in Locus (which is hopefully possible).

@Menion could you please have a look again? If Orux works, Locus could work as well, or? Tell me how I could help to fix if possible. The NTFS workaround becomes more and more unuseful.

Frank

photo
2

I have the same problem with lollipop Stock Rom Sony z1c. My smartphone is rooted.

photo
1

I reached one of the CM12 supporter "AntaresOne", he will try to do something. I will send him a complete logfile.

@menion: could you not please re-look into this and maybe find a real workaround?

photo
2

Hmm and may someone with rooted device, create for me a log with CatLog application right after SD card is detached after start of Locus? Thanks

photo
photo
2

Because of this issue I remove cyanogenmod rom and reinstall a stock Samsung rom on my Galaxy Note II and with stock (4.4.2) I don't have any problem with Locus. So right now I can't help you with log.


Thanks

photo
1

Sorry, my SD Card is formatted in NTFS now. But the moment I switch cards I will try...

photo
1

I will do it. I will test it on a spare microsd and surely I will switch back to exFAT if this CM/Locus Bug is fixed/workarounded :)

But at this very moment I wonder why I didn't try FAT32 instead of exFAT, before using NTFS. I have no file on my sd-card bigger than 4 GB and so could easily use FAT32, if this wont bug the same.

So first I try Locus with FAT32 and then I will do a CatLog with exFAT and Locus on CM12 (SGS4).

photo
2

1. FAT32 works with Locus and CM12!!! I will go for it then. I have at the moment no file bigger 4 GB, so no need to use NTFS which caused me some other, even worse problems (with files bigger 2 GB).

2. @menion: I just sent you a logcat.zip with 3 logcat in it. A 16 GB sd-card with exFAT, only Locus dir on it, no big files, just one sqlite map with 70 mb. Throws the sd-card out after Locus start.


But one other thing: I have Xposed framework 3.0-alpha4 installed, maybe (I hope not) this is related! I didnt mention it yet, but in the logcat I see entries about it.

Just in case this is related, which I doubt though, I would be able to do again the same logcat without Xposed, when I have more time (because then maybe I have to reset a lot, if a nandroid backup wont restore my rom correctly).


Thanks

frank

photo
1

For the xposed part I didn't has xposed and had the issues so the problem is not xposed related.


Are there any disadvantages of format a 128Gb sdxc card in Fat32?


Thanks

photo
2

Disadvantage of FAT32 is, that files cannot be larger than 4 GB (4.294.967.295 Byte).

Another disadvantage is, that you need a separate tool to format 128 GB as FAT32, not possible with native Windows tools. But there are free tools, e.g. EASEUS Partition Master or MiniTool Partition Wizard easy to use.

photo
1

Ok. Maybe I'll try when I've time, For now everything is working with stock rooted Samsung 4.4.2.


Thanks

photo
photo
2

Hello. Since I updated my Samsung Galaxy S4 to Cyanogenmod 12 (Lollipop 5.1.1) I have the same problem!!! I have NO files larger than 4GB and xposed Framework is NOT installed. SD Card has exFAT and 64GB.

Hope this is solved very soon. Locus is my favourite tool for orientation...


Before android update 4.2 everything works well. Did not change Card Filesystem.


PLeaaase

photo
2

Lollipop 5.1.1 is CM 12.1 not 12

photo
photo
2

@franc: thank you for your logs.


Crashes in native C++ code are usually my nightmare as I'm not C++ developer. Unfortunately in this case, it is same ...


This is crash clearly visible in your last log, that probably cause detach of SD card. But what this mean ... some Cyanogen mode developer should look at it. It will be a minute for them I think ...

  1. 05-06 15:09:02.519 F/libc (21530): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x2c in tid 21530 (mount.exfat)
  2. 05-06 15:09:02.619 I/DEBUG ( 231): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
  3. 05-06 15:09:02.619 W/NativeCrashListener( 636): Couldn't find ProcessRecord for pid 21530
  4. 05-06 15:09:02.619 I/DEBUG ( 231): Build fingerprint: 'samsung/jfltexx/jflte:4.2.2/JDQ39/I9505XXUAMDE:user/release-keys'
  5. 05-06 15:09:02.619 I/DEBUG ( 231): Revision: '11'
  6. 05-06 15:09:02.619 I/DEBUG ( 231): ABI: 'arm'
  7. 05-06 15:09:02.619 I/DEBUG ( 231): pid: 21530, tid: 21530, name: mount.exfat >>> /system/bin/mount.exfat <<<
  8. 05-06 15:09:02.619 I/DEBUG ( 231): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x2c
  9. 05-06 15:09:02.629 I/DEBUG ( 231): r0 b6fe5838 r1 00000000 r2 ffffffc8 r3 b6fa3e04
  10. 05-06 15:09:02.629 E/DEBUG ( 231): AM write failure (32 / Broken pipe)
  11. 05-06 15:09:02.629 I/DEBUG ( 231): r4 b6fe5838 r5 beae66f0 r6 00000000 r7 b6fe3e0c
  12. 05-06 15:09:02.629 I/DEBUG ( 231): r8 b6c61200 r9 beae66e4 sl 00000001 fp 00000000
  13. 05-06 15:09:02.629 I/DEBUG ( 231): ip b6fe3f2c sp beae6628 lr b6fc7ed3 pc b6fcb540 cpsr 80000030
  14. 05-06 15:09:02.629 I/DEBUG ( 231):
  15. 05-06 15:09:02.629 I/DEBUG ( 231): backtrace:
  16. 05-06 15:09:02.629 I/DEBUG ( 231): #00 pc 00006540 /system/bin/mount.exfat
  17. 05-06 15:09:02.629 I/DEBUG ( 231): #01 pc 00002ecf /system/bin/mount.exfat
  18. 05-06 15:09:02.629 I/DEBUG ( 231): #02 pc 0000a4ab /system/bin/mount.exfat
  19. 05-06 15:09:02.629 I/DEBUG ( 231): #03 pc 0000a50b /system/bin/mount.exfat
  20. 05-06 15:09:02.629 I/DEBUG ( 231): #04 pc 0000d33d /system/bin/mount.exfat
  21. 05-06 15:09:02.629 I/DEBUG ( 231): #05 pc 0000e005 /system/bin/mount.exfat
  22. 05-06 15:09:02.629 I/DEBUG ( 231): #06 pc 0000eee3 /system/bin/mount.exfat
  23. 05-06 15:09:02.629 I/DEBUG ( 231): #07 pc 0000c823 /system/bin/mount.exfat
  24. 05-06 15:09:02.629 I/DEBUG ( 231): #08 pc 00009113 /system/bin/mount.exfat
  25. 05-06 15:09:02.629 I/DEBUG ( 231): #09 pc 0000317d /system/bin/mount.exfat
  26. 05-06 15:09:02.629 I/DEBUG ( 231): #10 pc 0000fbf9 /system/lib/libc.so (__libc_init+44)
  27. 05-06 15:09:02.629 I/DEBUG ( 231): #11 pc 00002964 /system/bin/mount.exfat
  28. 05-06 15:09:02.809 I/DEBUG ( 231):
  29. 05-06 15:09:02.809 I/DEBUG ( 231): Tombstone written to: /data/tombstones/tombstone_04
  30. 05-06 15:09:02.809 E/SQLiteLog(22936): (1802) os_unix.c:27930: (107) fstat(/external_sd/Locus/maps/Kassel GM 0-16.sqlitedb-journal) -
  31. 05-06 15:09:02.819 I/BootReceiver( 636): Copying /data/tombstones/tombstone_04 to DropBox (SYSTEM_TOMBSTONE)
  32. 05-06 15:09:02.819 E/SharedPreferencesImpl( 636): Couldn't create directory for SharedPreferences file shared_prefs/log_files.xml

photo
1

I just have updated my phone to CM12.1 and have same problem too :(

photo
2

I had already lollipop when I installed Locus Free. It ran without error.

Then I moved it to SD card and had the same mistake. I installed it again -still the same error. If I want to move it back to the Galaxy S4, I get the message: "Can not move".


But suddenly I have no error message regarding the SD card but: "Locus Free, Version 3.9. 3, Start. -->"There are still requires more data." --> If I click on DOWNLOAD, then comes the error: "Unknown problem, problem with internet connection, error code: 44"

photo
2

Good day Thomas,

error 44? Are you sure you use original Locus version from Google Play unmodified by any external tool? If so, please try to re-install it again from Google Play because based on your code, seems that your installation is corrupted.

photo
2

Addendum: Yes, I'm sure.

photo
2

Sorry Thomas, but I cannot help here. Error 44 means, that installation of Locus is corrupted in any way. This may also means, that some external application tries to do some modifications to Locus. Hard to say what happen on your device, but it is definitely something beyond Locus.

photo
photo
2

Thank you, Menion.


I have now uninstalled it again and then installed. It works again. Get it now test and then definitely buy the full version.

photo
3

Still same (after clean reinstall from market and from backup also) :(

photo
2

Pitr, my reaction was on Thomas, not on you.


You may read my response here: http://help.locusmap.eu/topic/locus-disables-external-sdcard-after-start-using-lollipop#comment-16395 , I have no idea, how may I help here, sorry.

photo
photo
1

Now again I come here, because I have now indeed a file bigger than 4 GB, the german wiki slob-file (for Aard2).

Bad luck and troubles, I cannot use it with FAT32 but I need locus as well so I am in a "Zwiespalt" :(

Look here in Jira:

https://jira.cyanogenmod.org/browse/GETCM-55

an old bug report, was closed, maybe exactly this bug.

photo
1

Now I posted a bugreport in Jira anyway:

https://jira.cyanogenmod.org/browse/CYAN-6830

photo
1

Immediately closed, wont be fixed then.