Skip to content

External SD2 - #1293

Closed
przybylski wants to merge 19 commits into
masterfrom
externalSD2
Closed

przybylski wants to merge 19 commits into
masterfrom
externalSD2

Conversation

@przybylski

Copy link
Copy Markdown
Contributor

Implement mechanism with @tobiasKaminsky to allow users to specify their owncloud storage path.
Together with migration mechanism.
#10

@tobiasKaminsky

Copy link
Copy Markdown
Contributor

Merged in beta :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this a test?
Or do you mean "custom"? If yes, it should be extracted as string ressource.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was a testing entry, 'cośtam' means 'something' in polish, I forgot to remove it :)

@tobiasKaminsky

Copy link
Copy Markdown
Contributor

with my motorola x play and an external sd card (used as "internal storage") I only get "external" shown in preferences but cannot change it to the external sd card.
via adb and mount the external sd card is mounted in /mnt/expand/3b0b630d-08a1-4bb1-880a-5993b23097b0

@przybylski

Copy link
Copy Markdown
Contributor Author

What's your motorola system version? I am using a trick which is also used in android systems.
But so far there is no support for 6.0. Also 'external' is a naming also used by android API, it might be external device but it can also be internal memory. I think 'default' might be a better wording here.

@tobiasKaminsky

Copy link
Copy Markdown
Contributor

it is android 6 with cyanogen mod

@przybylski

Copy link
Copy Markdown
Contributor Author

Android 6 changed storage implementation so I need to find a reliable solution for it

@tobiasKaminsky

Copy link
Copy Markdown
Contributor

Please let me know if I can help you (testing, coding or so)

@przybylski

Copy link
Copy Markdown
Contributor Author

I would like to know if @jancborchardt can switch to his external SD card. But 'costam' is invalid option for now :P

@tobiasKaminsky

Copy link
Copy Markdown
Contributor

pinging @jancborchardt

@przybylski
przybylski force-pushed the externalSD2 branch 2 times, most recently from c2370b2 to 6d429f6 Compare January 1, 2016 14:04
@tobiasKaminsky

Copy link
Copy Markdown
Contributor

For android 6, with sd card used as "internal storage" this does not work.
There is only "default".

shell@lux:/ $ mount
rootfs on / type rootfs (ro,seclabel,relatime)
tmpfs on /dev type tmpfs (rw,seclabel,nosuid,relatime,size=963224k,nr_inodes=113130,mode=755)
devpts on /dev/pts type devpts (rw,seclabel,relatime,mode=600)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,seclabel,relatime)
selinuxfs on /sys/fs/selinux type selinuxfs (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
none on /acct type cgroup (rw,relatime,cpuacct)
none on /sys/fs/cgroup type tmpfs (rw,seclabel,relatime,size=963224k,nr_inodes=113130,mode=750,gid=1000)
tmpfs on /mnt type tmpfs (rw,seclabel,relatime,size=963224k,nr_inodes=113130,mode=755,gid=1000)
none on /dev/cpuctl type cgroup (rw,relatime,cpu)
pstore on /sys/fs/pstore type pstore (rw,relatime)
none on /sys/fs/cgroup/bfqio type cgroup (rw,relatime,bfqio)
/dev/block/bootdevice/by-name/system on /system type ext4 (ro,seclabel,relatime,data=ordered)
/dev/block/bootdevice/by-name/cache on /cache type ext4 (rw,seclabel,nosuid,nodev,noatime,data=ordered)
/dev/block/bootdevice/by-name/fsg on /fsg type ext4 (ro,context=u:object_r:fsg_file:s0,nosuid,nodev,relatime,nobarrier)
/dev/block/bootdevice/by-name/modem on /firmware type ext4 (ro,context=u:object_r:firmware_file:s0,nosuid,nodev,relatime,nobarrier,data=ordered)
/dev/block/bootdevice/by-name/persist on /persist type ext4 (rw,seclabel,nosuid,nodev,noatime,noauto_da_alloc,data=ordered)
adb on /dev/usb-ffs/adb type functionfs (rw,relatime)
tmpfs on /storage type tmpfs (rw,seclabel,relatime,size=963224k,nr_inodes=113130,mode=755,gid=1000)
/dev/block/dm-0 on /data type f2fs (rw,seclabel,nosuid,nodev,noatime,nodiratime,background_gc=on,user_xattr,inline_xattr,acl,inline_data,active_logs=6)
/dev/fuse on /mnt/runtime/default/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /storage/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/read/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/fuse on /mnt/runtime/write/emulated type fuse (rw,nosuid,nodev,noexec,noatime,user_id=1023,group_id=1023,default_permissions,allow_other)
/dev/block/dm-1 on /mnt/expand/a86bc7ac-b798-4d58-b157-d29fae4688ec type ext4 (rw,dirsync,seclabel,nosuid,nodev,noatime)

The last entry is my external sd card.

@tobiasKaminsky

Copy link
Copy Markdown
Contributor

When you update this branch can you then do this: #1309 ?
Move storage path to section "details".

@tobiasKaminsky

Copy link
Copy Markdown
Contributor

If I can help you testing: I have a phone with an external sd.

@tobiasKaminsky

Copy link
Copy Markdown
Contributor

@przybylski I have found out that for android 6 you need to use:
context.getExternalFilesDirs(null)
with this you get a File[] Array with all writeable folders: e.g
/storage/emulated/0/Android/data/com.owncloud.android.beta/files
/storage/0F10-100D/Android/data/com.owncloud.android.beta/files

(first one is internal, second is external sd card [mounted as portable storage].

@tobiasKaminsky

tobiasKaminsky commented May 8, 2016 •

Copy link
Copy Markdown
Contributor

Do we check if the external sd card is mounted? https://developer.android.com/guide/topics/data/data-storage.html#MediaAvail

This must be done on every write of a file, unfortunately... :/

@tobiasKaminsky

Copy link
Copy Markdown
Contributor

I have pushed a suggestion for the lollipop external storage system.
Please adjust it, if you do not like it.
(I will also implement this in beta soon)

@zoff99

zoff99 commented Sep 12, 2016

Copy link
Copy Markdown

@zoff99

zoff99 commented Sep 12, 2016

Copy link
Copy Markdown

needed to do this to compile:

## ------- dirty fix ---------
    - find . -type f -name '*.java' 2> /dev/null | while read ff ; do echo "$ff" ; sed -i -e 's#Log_OC.startLogging#// Log_OC.startLogging#g' "$ff" ; done
    - find . -type f -name '*.java' 2> /dev/null | while read ff ; do echo "$ff" ; sed -i -e 's#Log_OC.stopLogging#// Log_OC.stopLogging#g' "$ff" ; done
## ------- dirty fix ---------

@davivel

davivel commented Sep 12, 2016 •

Copy link
Copy Markdown
Contributor

@zoff99 , that's not a good fix, you are just removing the lines that initialize and terminate the logging. The problem is that this branch is not pointing to the commit of the OC Android library it needs.

I'll try something fast to see if it works without removing those lines.

@przybylski , any chance you rebase this PR on master? Thanks in advance.

@davivel

davivel commented Sep 12, 2016

Copy link
Copy Markdown
Contributor

@rhabbachi , that should allow you to build locally the branch, though still needs a real rebase.

@zoff99

zoff99 commented Sep 12, 2016

Copy link
Copy Markdown

for me, i am happy to use the old version, as long as i can change the directory.

@rickyzhang82

Copy link
Copy Markdown

Hi Gentlemen,
I love this feature. I'm not an expert on Android. But can you provide a dialog to let user define file path? I believe external SD card location varied in different device and android version.

BTW, don't take it personal. I have trouble to review your PR.

@hannesa2
hannesa2 force-pushed the externalSD2 branch 2 times, most recently from d3c4911 to 6d264d0 Compare February 3, 2019 09:16
@jesmrec

jesmrec commented Jun 26, 2019

Copy link
Copy Markdown
Member

outdated code, closing... thinking on it for the future

@jesmrec jesmrec closed this Jun 26, 2019
@hannesa2
hannesa2 deleted the externalSD2 branch July 12, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants