Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

FIX: [droid] Do not define XBMC_TEMP, thus moving temp to user folder, thus external storage if avail #1805

Closed
wants to merge 1 commit into from

4 participants

@koying
Collaborator

Main goal is to move xbmc.log to user folder, so that it is accessible.

Still a FIX, IMO, because:
1) temp, i.e. ever-changing files, should not be put on internal flash if possible.
2) this aligns droid with the other 'nix platforms

@theuni theuni was assigned
@Montellese
Owner

IIRC initially I had it setup to have the temporary files on the external storage if available but someone changed it (due to speed reasons?).

@koying
Collaborator

Yeah, should probably be tested on a device with a "real" sdcard (on Nexus7 is just a link to another flash partition).
OTOH, "degrading" (as in x writes before bad sector) the internal flash to write some log/temp files is something I'm not at ease with... AFAIK, it is not what the droid cache is made for.

@da-anda
Collaborator

I could test on my phone having a real SD card (running Android 2.3.5 or so) - but I would need an apk as I can't build for Android.

@koying
Collaborator

I had an issue with smb with this PR on. Don't know why but it isn't worth spending time on this

@koying koying closed this
@theuni
Owner

Hmm, just saw this PR, never noticed it before. Sorry for that.

@koying Likely your issue was that android refuses to allow unix sockets on removable media.

@koying
Collaborator

Ah, ok. Thanks.
We should still find something regarding logs because, on JB, even an adb pull is not permitted if you are not root.
So the one and only way to get logs there is via the uploader.

@theuni
Owner

Yep, we need to break log out into its own configurable path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 16, 2012
  1. @koying

    FIX: [droid] Do not define XBMC_TEMP, thus moving temp to user folder…

    koying authored
    …, thus external storage if avail
This page is out of date. Refresh to see the latest.
Showing with 0 additions and 5 deletions.
  1. +0 −5 xbmc/android/activity/android_main.cpp
View
5 xbmc/android/activity/android_main.cpp
@@ -84,7 +84,6 @@ void setup_env(struct android_app* state)
// Get the path to the temp/cache directory
char cacheDir[PATH_MAX] = {0};
- char tempDir[PATH_MAX] = {0};
jmethodID midActivityGetCacheDir = env->GetMethodID(cActivity, "getCacheDir", "()Ljava/io/File;");
jobject oCacheDir = env->CallObjectMethod(oActivity, midActivityGetCacheDir);
@@ -95,14 +94,10 @@ void setup_env(struct android_app* state)
jstring sCachePath = (jstring)env->CallObjectMethod(oCacheDir, midFileGetAbsolutePath);
temp = env->GetStringUTFChars(sCachePath, NULL);
strcpy(cacheDir, temp);
- strcpy(tempDir, temp);
env->ReleaseStringUTFChars(sCachePath, temp);
env->DeleteLocalRef(sCachePath);
env->DeleteLocalRef(oCacheDir);
- strcat(tempDir, "/temp");
- setenv("XBMC_TEMP", tempDir, 0);
-
strcat(cacheDir, "/apk");
//cache assets from the apk
Something went wrong with that request. Please try again.