How to see Karoo files from your PC

Third-party apps, customisation, mods, development, custom kernels & ROMs

WARNING - Here be dragons!
If you don't entirely understand what you're doing, even following someone else's guide could end up with you bricking your Karoo, or leaving it in an unsupported state with no way to go back. By all means enter, read and learn, but undertake actions on your Karoo at your own risk!
Forum rules
Undertake any procedures at your own risk and make sure you know how to reverse any changes. You could brick your Karoo or at the very least put it into an unsupported configuration.
User avatar
Steve
Site Admin
Posts: 486
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

How to see Karoo files from your PC

Post by Steve » Mon Mar 19, 2018 2:14 pm

Apologies, but I only have Windows so can't give Mac instructions for this. But it should be pretty similar (I will add Mac instructions if anyone would like to give them to me).


It's possible to see at least some of your Karoo's files, including the .fit files from activities, on your Karoo from your PC when connected via USB. This is a guide on how to do this.

First, you need to have activated Developer Mode on your Karoo (once activated, you can turn it off again via a toggle if you want, although HH have previously confirmed that activating Developer Mode won't void your warranty on its own). This is done via the standard Android method, i.e. go into Settings -> About, scroll down to "Build number" and then tap the Build number box seven times in a row. When you've done it enough times, it will give you a message about now being a developer, and then you will have a couple of new options on your Settings menu, Apps and Developer Options. Don't start messing around with the Developer Options unless you know what you're doing.

Go into Settings -> Developer Options and scroll down until you see the USB debugging option, which you need to turn on. Then connect your Karoo to your PC via USB. Assuming your PC has the relevant drivers, then a window might pop up (if not, try firing up a File Explorer window and seeing if you can see your Karoo from This PC). However, this will initially be a blank window, and by default you can't see any files on your Karoo.

To get over this, still in Settings -> Developer Options, scroll down further until you get to "Select USB Configuration" in the Networking section. This will be showing MTP by default. Tap on this entry, and then you will get a menu asking you to pick the USB Configuration. Select RNDIS and now you should get a new window popping up on your PC which actually shows some of your Karoo's files. Note that you'll have to go through this step (picking RNDIS) each time you connect your Karoo via USB, because it resets each time to MTP.

Be very careful with the files on your Karoo. There should be no problem in copying files off your Karoo onto your PC, e.g. if you find .fit files (which are in a folder called, handily, FitFiles) from Activities that were "lost" and which you want to try and retrieve/repair. But if you start changing files on your Karoo, or copying things from your PC to your Karoo, then you won't be in Kansas any more, Toto.

stoffelve
Posts: 2
Joined: Mon Mar 19, 2018 6:05 pm

Re: How to see Karoo files from your PC

Post by stoffelve » Mon Mar 19, 2018 6:12 pm

I have currently done 4 rides with my karoo, and on the last one the 4 side buttons became unresponsive so i had to reboot the device to stop the ride. Sadly the ride data on this last ride was lost, the karoo only shows my first 3 activities. So now i'm trying to recover some data that might have been saved during my 3 hour ride.

I'm on a mac, I've activated the developer mode on the Karoo and downloaded the Android file transfer app (https://www.android.com/filetransfer/).
Now I can see the contents of the Karoo, however the FitFiles folder is empty.
Is this folder supposed to be empty? My karoo shows 3 activities, should they be here?
Attachments
Screen Shot 2018-03-19 at 19.07.52.png
Screen Shot 2018-03-19 at 19.07.52.png (61.7 KiB) Viewed 4080 times

User avatar
Steve
Site Admin
Posts: 486
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: How to see Karoo files from your PC

Post by Steve » Mon Mar 19, 2018 6:24 pm

I'm surprised that it's empty, because my own FitFiles folder has several files in it. But if there's nothing there then unless this is a weird Mac thing, e.g. due to it not recognising the file type) I'm afraid that you're not going to be recovering any data from that lost ride, sorry.

You could try a few experiments with some short tests (perhaps not even going outside) and see if you can view the files then? I'm slightly suspicious this could be a file type/extension issue.

gl00
Posts: 6
Joined: Wed Mar 14, 2018 6:42 am

Re: How to see Karoo files from your PC

Post by gl00 » Mon Mar 19, 2018 9:59 pm

stoffelve: my guess is that you might have reset your device ? in that case, past activities would still show on your screen, but the fit files are no more on the device... just to make sure, just create a bogus activity and see if it's here.

cye
Posts: 9
Joined: Sun Mar 11, 2018 6:04 am

Re: How to see Karoo files from your PC

Post by cye » Tue Mar 20, 2018 4:24 am

Oh awesome, thanks Steve!

I had tried to make MTP-mode work by using one of those MTP database rebuilding apps, but no dice so far...

Also note that Developer options can be turned off using the toggle at the top of the menu...

stoffelve
Posts: 2
Joined: Mon Mar 19, 2018 6:05 pm

Re: How to see Karoo files from your PC

Post by stoffelve » Tue Mar 20, 2018 9:28 am

I did a new ride and now i can see the fit file in the FitFiles folder.
gl00: I did indeed do a factory reset after my first three rides, otherwise karoo wouldn't install the newest update. That explains why these rides aren't there.
My lost ride however was recorded after this factory reset, so apparently karoo did not save anything during this ride. It would be nice if it would incrementally save the ride every couple of minutes so you would only lose a little bit of data in case of a reboot.

dthempel
Site Admin
Posts: 251
Joined: Tue Mar 06, 2018 3:35 pm
Location: Cape Cod, MA
Contact:

Re: How to see Karoo files from your PC

Post by dthempel » Tue Mar 20, 2018 10:56 am

They indicated it "saved" every three minutes in their last Facebook chat. Seems dubious. Not sure how to "test" it and let them know it doesn't seem to work that way.

User avatar
Steve
Site Admin
Posts: 486
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: How to see Karoo files from your PC

Post by Steve » Tue Mar 20, 2018 11:15 am

I just started a "ride" with my Karoo while sitting at home at my computer. Left it running for approximately 6 minutes while viewing the files in the FitFiles directory with the Karoo connected via USB.

As we suspected, nothing. No file created for this activity while it was running. And get this - the file didn't even show up when I stopped the activity. I had to reboot the Karoo for the fit file to show up.

Something is wrong here, some process is holding the file open and it's not showing up to the file system. No surprise that it's lost on reboot. I've reported this to HH.

dthempel
Site Admin
Posts: 251
Joined: Tue Mar 06, 2018 3:35 pm
Location: Cape Cod, MA
Contact:

Re: How to see Karoo files from your PC

Post by dthempel » Tue Mar 20, 2018 12:34 pm

Clearly I shouldn't post at 7AM prior to coffee. That was an interesting test. When they say "save", I wonder what they mean. Dumped from one buffer to another in memory prior to actually writing a file? Again... seems odd and contrary to how they presented it during the Facebook chat.

User avatar
Steve
Site Admin
Posts: 486
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: How to see Karoo files from your PC

Post by Steve » Wed Mar 21, 2018 3:25 pm

I went out for a long ride this morning. Part-way through I ended up restarting the ride on my Karoo (saving the one in progress and starting a new one) because it seemed to have got a bit confused as to the routing. After that it was fine.

So when I got home, without having rebooted the Karoo, I plugged it into my computer and checked the FitFiles folder. Sure enough, the fit file for both parts of the ride weren't visible. When I then rebooted the Karoo, they showed up.

This seems to confirm that there's a problem with the way that it's writing to the file system when the ride is in progress, and so that's why you lose the ride data (the fit file) if you reboot (either deliberately or through a bug) the Karoo. A very basic error :shock:

cye
Posts: 9
Joined: Sun Mar 11, 2018 6:04 am

Re: How to see Karoo files from your PC

Post by cye » Sun Mar 25, 2018 5:33 am

It sounds like the files in the FitFiles folder are being generated only when the ride is complete, but that doesn't necessarily mean the Ride app isn't committing activity data to non-volatile storage somewhere else on the device. I'm unfamiliar with the Fit format, but it could be that it's easier for Hammerhead to use some internal file format, and then export to fit once complete.

Ian
Posts: 7
Joined: Tue Apr 24, 2018 10:07 pm

Re: How to see Karoo files from your PC

Post by Ian » Thu Apr 26, 2018 3:22 pm

I think that it is quite likely that the Karoo stores data in RAM during a ride and writes it to the FIT file only when you choose Save. If you reboot, the operating system may wipe the contents of RAM or it could simply forget that the data is there. Either way, you can't access it.

I know nothing about Android programming so I don't know whether loss of data on reboot is inevitable or whether the Karoo operating system is responsible.

I once, long ago, wrote a word processing program for my Sharp MZ-80K computer. I wrote it in Z80 assembly code and had complete control of where everything was stored, but it was stored in RAM which forgets everything when powered down. I finished it on a Friday night and the following morning used it to write an assignment for an Open University course. I didn't save it as I went along as I was in a big hurry to finish the assignment - little did I know that I couldn't save it. It worked very well and I was happy with my assignment, so pressed the button to save it - nothing. OK, print - nothing.

I immediately knew what was wrong - I'd written the routines to poll the buttons but failed to link them to the routines to carry out the various functions, particularly save and print. I think it was an assignment of around 2000 words and the only thing I could do was to scroll backwards and forwards on the screen trying to commit it to memory, because the only way I was going to be able to get out of the program would be to reboot the computer, since the quit button wasn't linked either.

Five minutes was all it took to put in the links and I was back at the start. Funnily enough, the second attempt was better than the first and I got an A for the assignment!

The Karoo technical specification states that it has 2GB of DDR3 RAM (that will be volatile, data lost unless it is refreshed constantly) and 16GB of 'storage' which I take to mean non-volatile RAM, which will maintain the data without having to be refreshed). That's where apps and FIT files etc are stored so even if the battery goes down, you won't lose those. Think of the kind of memory which is in a USB stick. I fully expect that, while the device is rebooting, the DDR3 RAM will not be refreshed and the data will be lost.

Hammerhead might be able to program the Karoo to write current data to a temporary file in storage before starting the reboot, and write it back again afterwards, but that is unlikely to work in the case of a reboot caused by a bug.

dthempel says that Hammerhead indicated that they saved data every three minutes, which could mean several different things. It might be that they have a relatively small buffer in RAM which fills up in a bit over three minutes, and they write it to another storage area in RAM once every three minutes, or it might be that they write it into storage every three minutes, in which case they probably would append it to data already there. It could also mean that the data is converted into another format every three minutes, which implies it would be stored elsewhere. I've sent my Karoo back for replacement so can't test it, but you should be able to put your bike on a stand with the Karoo attached to your computer and simulate a ride, checking the FIT file area every few minutes to see if there is a file there which is increasing in size.

Wait a minute, Steve has done that and found nothing. If the data is being written to storage, it's in a temporary area, and is converted to FIT format only when you save the ride. I don't understand Steve's comment that the file didn't show up when he stopped the activity (he didn't say he saved it), but did show up when he rebooted. In the next paragraph, he says "it's lost on reboot". Am I missing something, Steve?

User avatar
Steve
Site Admin
Posts: 486
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: How to see Karoo files from your PC

Post by Steve » Thu Apr 26, 2018 3:30 pm

Ian wrote:
Thu Apr 26, 2018 3:22 pm
Wait a minute, Steve has done that and found nothing. If the data is being written to storage, it's in a temporary area, and is converted to FIT format only when you save the ride. I don't understand Steve's comment that the file didn't show up when he stopped the activity (he didn't say he saved it), but did show up when he rebooted. In the next paragraph, he says "it's lost on reboot". Am I missing something, Steve?
I did save the activity in my test, but it didn't show up in the FitFiles folder until I did a reboot. If you rebooted during a ride, then the behaviour was that you lost the Fit file.

However, HH changed how this works somewhat in 1.5.1.3. I haven't repeated that same test yet, but on my last ride the navigation service crashes while I was riding. I rebooted my Karoo and it told me that it was recovering a ride, and it did sync that Activity to my Dashboard later on.

So it does seem more robust now.

harpmaster
Posts: 6
Joined: Sat Apr 14, 2018 9:09 am

Re: How to see Karoo files from your PC

Post by harpmaster » Fri Apr 27, 2018 4:13 pm

Question:

I'm in developer mode, switched on USB debugging.. android file transfer opens but tells me that I have to unlock my device.
My cell-phone ( android) is working on File Transfer.. but not my Karoo.

Suggestions??

thx in advance,
Ben Bouman

User avatar
Steve
Site Admin
Posts: 486
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: How to see Karoo files from your PC

Post by Steve » Fri Apr 27, 2018 4:30 pm

harpmaster wrote:
Fri Apr 27, 2018 4:13 pm
I'm in developer mode, switched on USB debugging.. android file transfer opens but tells me that I have to unlock my device.
My cell-phone ( android) is working on File Transfer.. but not my Karoo.
When you say Android file transfer opens, where is that, on the Karoo or on your PC/Mac? And is it a PC or a Mac?

That certainly doesn't sound like how it should be working/how mine works.

harpmaster
Posts: 6
Joined: Sat Apr 14, 2018 9:09 am

Re: How to see Karoo files from your PC

Post by harpmaster » Tue May 01, 2018 8:54 am

Android File transfer opens automatically on my Mac... still saying: make sure your device is unlocked..usb debugging and /or MTP etc.
I tested it again, Karoo switched on.. same result.
I'll attach a screenshot ( sorry, in dutch) :-))
Schermafbeelding 2018-05-01 om 10.52.15.png
Schermafbeelding 2018-05-01 om 10.52.15.png (354.96 KiB) Viewed 3611 times

User avatar
Steve
Site Admin
Posts: 486
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: How to see Karoo files from your PC

Post by Steve » Tue May 01, 2018 8:57 am

harpmaster wrote:
Tue May 01, 2018 8:54 am
Android File transfer opens automatically on my Mac... still saying: make sure your device is unlocked..usb debugging and /or MTP etc.
I tested it again, Karoo switched on.. same result.
Hmm, I need to try my own Karoo with a Mac and see what happens. Or does anyone else here have a Mac where they've got this working?

It should be fine, but perhaps there's something small that we're missing that is Mac-specific.

harpmaster
Posts: 6
Joined: Sat Apr 14, 2018 9:09 am

Re: How to see Karoo files from your PC

Post by harpmaster » Tue May 01, 2018 9:00 am

another thing:
On the Karoo , in developer mode I see:
Select debug app,
Debugging application: HX Datasync Service

When I click on that i get:
Select application:
Nothing

Could that be the reason why USB debugging doesn't work ??

User avatar
Steve
Site Admin
Posts: 486
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: How to see Karoo files from your PC

Post by Steve » Tue May 01, 2018 9:00 am

harpmaster wrote:
Tue May 01, 2018 9:00 am
Select application:
Nothing

Could that be the reason why USB debugging doesn't work ??
No, that's normal, just ignore that.

User avatar
Steve
Site Admin
Posts: 486
Joined: Tue Mar 06, 2018 2:56 pm
Location: Surrey, UK

Re: How to see Karoo files from your PC

Post by Steve » Tue May 01, 2018 9:02 am

When you're at that point, what happens if you scroll down in Developer Options and press on Select USB Configuration, and select RNDIS?

Post Reply