Originariamente inviato da
ChristianTroy
codice:
property_get("persist.sys.vold.switchexternal", switchable, "0");
if (!strcmp(switchable,"1")) {
char *first, *second = NULL;
const char *delim = ",";
property_get("ro.vold.switchablepair", switchable, "");
if (!(first = strtok(switchable, delim))) {
SLOGE("Mount switch requested, but no switchable mountpoints found");
return;
} else if (!(second = strtok(NULL, delim))) {
SLOGE("Mount switch requested, but bad switchable mountpoints found");
return;
}
if (!strcmp(mount_point,first)) {
free(mMountpoint);
mMountpoint = strdup(second);
} else if (!strcmp(mount_point,second)) {
free(mMountpoint);
mMountpoint = strdup(first);
}
}
}
deve esser sempre inserita, altrimenti switcha il mount point si però poi android non si trova, ad esempio, /mnt/sdcard ed i programmi che devon scriver sulla memoria esterna si incazzano
nella cm7 questo era gestito da CMParts che in cm9, per ora, manca
nelle prossime buld inserisco le stringhe, ma con switchexternal=0, se uno vuole cambiare il comportamento basta che sostituisca lo 0 con 1