Basic Structure and requirements - JohnJ80/Karoo-App-Sideloading GitHub Wiki
Basic Structure of Data on the Karoo
Before you use this script, make sure and read this entire page through. There are important caveats at the bottom.
The data for side loaded apps is stored in the internal storage of the Karoo at /sdcard/Android.
There is a Hammerhead directory and some files that you should not disturb. That is the reason that the shell scripts supplied are explicit in the folders of the apps that they backup. Additionally, apps such as Dropbox and others that sync with the cloud may maintain their sync status in some of the folders in this directory so it is better to not jam things brute force into the directory but just write files that matter.
Here are the apps and their storage in the Karoo internal storage. Add to this list as we go.
- Osmand stores at /sdcard/Android/data/net.osmand.plus
- Komoot stores at /sdcard/Android/data/de.komoot.android
Basic structure on the Mac
When you install the debugging tools on your mac, they will be put in a newly created directory named "platform-tools". This will be your home directory for your work on the Karoo. If you move files to other directories or out of this folder, you will screw up all the file references so you will need to edit them to point to the correct folders. Maybe later if this goes much farther, we can deal with that, but for now the focus is on riding my bike not software development.
Location of storage of backed up Karoo data.
On your mac, the backup of the data will create a director called Karoo (./platform-tools/Karoo). In here will be a subdirectory called apps (./Karoo/apps) that will contain the backed up apks that were installed and backed up on the Karoo using ES File Explorer.
The next directory created in the ./Karoo directory is for the application data. This is all found in the directory ./Karoo/Android/data. This is where you will find the maps for Osmand and Komoot. This is also where the restore script expects to find that data to push it back out to the Karoo.
Backup of apps using ES File Explorer
When you load ES File Explored on your Karoo via the Amazon app store, in the upper left hand corner you will find a menu to select various functions. If you select "Home", you will find a folder called "APP". You can open this folder and it will show you an icon for each apk you have installed on your Karoo. If you hold your finger down on this icon, it will show as selected. Notable - a "select all" pops up along the top bar. You can touch this to select all of your apks. This backs up the apk in a folder that the backup script accesses and moves to your mac. This is how the apps folder under the Karoo directory in platform-tools gets all your apks and backs them up. You can then choose "backup" from the menu bar along the bottom.
From this point, you can then go to the Backup script and it will backup all of the app's and Osmand and Komoots data.
That's it. Pretty simple.
Important Caveats
- In order for this simple script to work, all the file names in the ./Karoo/apps directory must be edited so that they do not have any spaces in them. Eventually, I'll correct this in the script, but I haven't yet. Therefore, any apps that have spaces in them will cause adb to not properly identify the file name and it won't have anything to download. Do note that editing the names has absolutely no impact on the Android side. It doesn't care what the file name is of the file, it just cares what's in it.**