• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[MOD][XPOSED] Pictures2SD (v1.0.7) - makes Camera/Focal store photos on external SD

Search This thread

DavisNT

Inactive Recognized Developer
Aug 27, 2011
522
726
Riga
projects.dm.id.lv
This mod makes Camera and Focal apps to save pictures/videos to external SD card.

Currently this mod may not work on some Android 4.4 ROMs. Support for wider range of Android 4.4 ROMs most likely will be added in future.

Technically it works by attaching to Camera, Focal and some other apps (for full list see below), hooking getExternalStorageDirectory() and getExternalStoragePublicDirectory() Android system methods and making them return path to external SD card (first colon separated part of SECONDARY_STORAGE environment variable). Simply saying - this mod makes Camera and Focal apps to treat external SD card as internal.

Pictures2SD usually doesn't affect Camera applications that have built-in ability to save pictures/videos to external SD card.

This mod requires Xposed framework to be set up and Pictures2SD enabled as Xposed module.
Disclaimer: I am not responsible for anything that may happen as a result of using this mod.


I will be glad to hear any reviews (please also provide information on what ROM the mod was tested). :)

Pictures2SD has been tested on Samsung Galaxy S3 running CM 10.2.0 (actually it was created for CM 10.2 nightlies). If this mod doesn't work on your device/ROM, please follow tips in troubleshooting section to report the issue.

Full list of supported apps (and package names):
* Camera (com.android.gallery3d, com.google.android.gallery3d, com.android.camera2, com.google.android.GoogleCamera)
* Focal (org.cyanogenmod.focal, fr.xplod.focal)
* Snapseed (com.niksoftware.snapseed)
* Instagram (com.instagram.android)
* PixtoCam (com.pixtogram.wear.zicam)

Changelog:
v 1.0.7
* Added support for PixtoCam ("com.pixtogram.wear.zicam").
* Code refactoring.
* Improved APK size (by removing unused v4 Support Library).
* Made open-source.
v 1.0.6
* Added support for Instagram ("com.instagram.android") due to user's request.
v 1.0.5
* Added support for KitKat camera ("com.android.camera2" and "com.google.android.GoogleCamera").
v 1.0.4 (unreleased)
* Added support for Snapseed ("com.niksoftware.snapseed") due to user's request.
v 1.0.3
* Added support for new package name of Focal ("fr.xplod.focal").
v 1.0.2
* Fixed compatibility with ROMs having Camera package name "com.google.android.gallery3d".
v 1.0.1
* Fixed compatibility issues with ROMs having more than one secondary storage.
v 1.0
* Initial release.

Troubleshooting steps:
1. Check whether Camera app of your ROM supports storing pictures on external SD card out of the box (usually this can be enabled under Settings -> More Options -> Storage). If there is such an option, there is no need to use Pictures2SD (except for third party applications).
2. Open Xposed Installer and ensure that Xposed framework is installed and Pictures2SD is enabled as Xposed module. Please note, that after installing Xposed framework or enabling Xposed module it is required to reboot the device.
3. If Pictures2SD still doesn't work, please reproduce the problem, and post in this thread (along with description of the problem) name/model of your device, name of ROM it is running (if possible also link where the ROM was downloaded) and output of the following commands
Code:
su
mount
logcat -d | grep Pictures2SD
echo $SECONDARY_STORAGE

Xposed Module Repository page:
http://repo.xposed.info/module/lv.id.dm.pictures2sd

Download:
 

Attachments

  • Pictures2SD_107.apk
    34 KB · Views: 4,357
Last edited:

kroewe

Senior Member
Feb 24, 2008
86
25
Worked for me with 4.2 camera and with focal on my note 2 running slim rom

Sent from my SPH-L900 using Tapatalk 4
 
  • Like
Reactions: blorro

I[E

Senior Member
Jun 18, 2007
317
32
SGS4 running 8/16 build of CM 10.2 I get the following:
u3yjevug.jpg

Gallery version 1.1.40012

Sent from my SGH-M919 using Tapatalk 4
 

I[E

Senior Member
Jun 18, 2007
317
32
Code:
127|[email protected]:/ # logcat -d|grep Pictures2SD
I/Pictures2SD(19291): Loaded camera package com.android.gallery3d
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStoragePublicDirectory("DCIM") will return /storage/sdcard1:/storage/usbdisk0/DCIM
[1] + Done (255)           logcat -d |
      Done (127)           grepPictures2SD
[email protected]:/ # echo $SECONDARY_STORAGE
/storage/sdcard1:/storage/usbdisk0

Sent from my SGH-M919 using Tapatalk 4
 
  • Like
Reactions: DavisNT

ruvort

Senior Member
Aug 4, 2010
1,544
405
Can you please execute the following commands after opening camera and post output here (or send me via PM)?
Code:
su
mount
logcat -d | grep Pictures2SD
echo $SECONDARY_STORAGE

I have the same issue. Pacman rom sgs3.

Code:
[email protected]:/ $ su
[email protected]:/ # mount
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,nosuid,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
/sys/kernel/debug /sys/kernel/debug debugfs rw,relatime 0 0
tmpfs /storage tmpfs rw,relatime,mode=050,gid=1028 0 0
tmpfs /storage/emulated tmpfs rw,nosuid,nodev,relatime,mode=050,gid=1028 0 0
/dev/block/vold/179:33 /storage/sdcard1 vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/secure tmpfs rw,relatime,mode=700 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/dm-0 /mnt/asec/com.blackout1911.theme.BlackedOutTheme-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-1 /mnt/asec/com.ryanmkelly.me.flatro-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-2 /mnt/asec/com.keramidas.TitaniumBackupPro-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-3 /mnt/asec/com.oasisfeng.greenify.pro-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-4 /mnt/asec/com.gau.go.launcherex.theme.smplwhite-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-5 /mnt/asec/biz.bokhorst.xprivacy.pro-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
/dev/block/dm-6 /mnt/asec/com.bubblesoft.android.bubbleupnp.unlocker-1 ext4 ro,dirsync,nosuid,nodev,noatime 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/fuse tmpfs rw,relatime,mode=775,gid=1000 0 0
/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 ro,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/efs /efs ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,nosuid,nodev,noatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/cache /cache ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/persist /persist ext4 rw,nosuid,nodev,relatime,data=ordered 0 0
/dev/block/platform/msm_sdcc.1/by-name/modem /firmware vfat ro,relatime,fmask=0177,dmask=0000,allow_utime=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
/dev/fuse /mnt/shell/emulated fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/0 fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/0/Android/obb fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/legacy fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
/dev/fuse /storage/emulated/legacy/Android/obb fuse rw,nosuid,nodev,relatime,user_id=1023,group_id=1023,default_permissions,allow_other 0 0
[email protected]:/ # logcat -d | grep Pictures2SD
D/Pictures2SD( 4294): getExternalStorageDirectory() will return /storage/sdcard1
[email protected]:/ # echo $SECONDARY_STORAGE
/storage/sdcard1
[email protected]:/ #

Huge Wallpaper Collection
 

DavisNT

Inactive Recognized Developer
Aug 27, 2011
522
726
Riga
projects.dm.id.lv
New version (with bugfix) released.

Code:
127|[email protected]:/ # logcat -d|grep Pictures2SD
I/Pictures2SD(19291): Loaded camera package com.android.gallery3d
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStorageDirectory() will return /storage/sdcard1:/storage/usbdisk0
D/Pictures2SD(19291): getExternalStoragePublicDirectory("DCIM") will return /storage/sdcard1:/storage/usbdisk0/DCIM
[1] + Done (255)           logcat -d |
      Done (127)           grepPictures2SD
[email protected]:/ # echo $SECONDARY_STORAGE
/storage/sdcard1:/storage/usbdisk0

Sent from my SGH-M919 using Tapatalk 4
This should be fixed in new version (1.0.1).
Could you please test it?
 

drivel2787

Senior Member
Jan 16, 2012
648
94
Martinsburg
What should the path be? I didn't have exposed framework installed but it is now and I'm not getting the forced closes but I don't think it's saving to external sd

Sent from my sexy Android 4.3 thanks PWNCAKES
 

DavisNT

Inactive Recognized Developer
Aug 27, 2011
522
726
Riga
projects.dm.id.lv
What should the path be? I didn't have exposed framework installed but it is now and I'm not getting the forced closes but I don't think it's saving to external sd

Sent from my sexy Android 4.3 thanks PWNCAKES

Path of external SD may vary, in many cases it is /storage/sdcard1 (then pictures are saved in /storage/sdcard1/DCIM/Camera). If you didn't have Xposed framework installed then forces closes shouldn't be related to my mod.
If pictures are not saved to external SD, ensure that you have set up Xposed framework and module correctly (there are some claims/reports that SuperSU works better than CM stock Superuser for Xposed framework installations) by clicking Xposed has not been tested with Android SDK version 18, but it seems to be compatible. You can try installing it if you feel adventurous. inside Xposed installer, selecting Pictures2SD in modules tab and rebooting device afterwards.
 
Last edited:

oldslowdiver

Senior Member
Sep 14, 2011
591
196
Rome
Hi there. This does not work on my Samsung S III mini, 4.1.2, modded stock, rooted.
Package name: com.google.android.gallery3d-1.apk (version 1.1.40012).

It keeps storing pictures on internal SD. Thank you! :good:

This mod makes Camera and Focal apps to save pictures/videos to external SD card.

[cut]



I will be glad to hear any reviews (please also provide information on what ROM the mod was tested). :)

[cut]
 

DavisNT

Inactive Recognized Developer
Aug 27, 2011
522
726
Riga
projects.dm.id.lv
doesn't work on Google edition rom 4.3 for the s4

GT-I9505 Google powered


Hi there. This does not work on my Samsung S III mini, 4.1.2, modded stock, rooted.
Package name: com.google.android.gallery3d-1.apk (version 1.1.40012).

It keeps storing pictures on internal SD. Thank you! :good:

Hi! A question to @oldslowdiver and @pitastrudl - have you installed Xposed framework and enabled Xposed module correctly (see earlier posts in this thread for details)?
 
  • Like
Reactions: oldslowdiver

oldslowdiver

Senior Member
Sep 14, 2011
591
196
Rome
Yes, I believe I did it correctly, although I actually noticed only now I got this toast error message as I try to enable your module. What do I do wrong? Thanks.
 

Attachments

  • 1377010268044.jpg
    1377010268044.jpg
    64.3 KB · Views: 689

Top Liked Posts

  • There are no posts matching your filters.
  • 80
    This mod makes Camera and Focal apps to save pictures/videos to external SD card.

    Currently this mod may not work on some Android 4.4 ROMs. Support for wider range of Android 4.4 ROMs most likely will be added in future.

    Technically it works by attaching to Camera, Focal and some other apps (for full list see below), hooking getExternalStorageDirectory() and getExternalStoragePublicDirectory() Android system methods and making them return path to external SD card (first colon separated part of SECONDARY_STORAGE environment variable). Simply saying - this mod makes Camera and Focal apps to treat external SD card as internal.

    Pictures2SD usually doesn't affect Camera applications that have built-in ability to save pictures/videos to external SD card.

    This mod requires Xposed framework to be set up and Pictures2SD enabled as Xposed module.
    Disclaimer: I am not responsible for anything that may happen as a result of using this mod.


    I will be glad to hear any reviews (please also provide information on what ROM the mod was tested). :)

    Pictures2SD has been tested on Samsung Galaxy S3 running CM 10.2.0 (actually it was created for CM 10.2 nightlies). If this mod doesn't work on your device/ROM, please follow tips in troubleshooting section to report the issue.

    Full list of supported apps (and package names):
    * Camera (com.android.gallery3d, com.google.android.gallery3d, com.android.camera2, com.google.android.GoogleCamera)
    * Focal (org.cyanogenmod.focal, fr.xplod.focal)
    * Snapseed (com.niksoftware.snapseed)
    * Instagram (com.instagram.android)
    * PixtoCam (com.pixtogram.wear.zicam)

    Changelog:
    v 1.0.7
    * Added support for PixtoCam ("com.pixtogram.wear.zicam").
    * Code refactoring.
    * Improved APK size (by removing unused v4 Support Library).
    * Made open-source.
    v 1.0.6
    * Added support for Instagram ("com.instagram.android") due to user's request.
    v 1.0.5
    * Added support for KitKat camera ("com.android.camera2" and "com.google.android.GoogleCamera").
    v 1.0.4 (unreleased)
    * Added support for Snapseed ("com.niksoftware.snapseed") due to user's request.
    v 1.0.3
    * Added support for new package name of Focal ("fr.xplod.focal").
    v 1.0.2
    * Fixed compatibility with ROMs having Camera package name "com.google.android.gallery3d".
    v 1.0.1
    * Fixed compatibility issues with ROMs having more than one secondary storage.
    v 1.0
    * Initial release.

    Troubleshooting steps:
    1. Check whether Camera app of your ROM supports storing pictures on external SD card out of the box (usually this can be enabled under Settings -> More Options -> Storage). If there is such an option, there is no need to use Pictures2SD (except for third party applications).
    2. Open Xposed Installer and ensure that Xposed framework is installed and Pictures2SD is enabled as Xposed module. Please note, that after installing Xposed framework or enabling Xposed module it is required to reboot the device.
    3. If Pictures2SD still doesn't work, please reproduce the problem, and post in this thread (along with description of the problem) name/model of your device, name of ROM it is running (if possible also link where the ROM was downloaded) and output of the following commands
    Code:
    su
    mount
    logcat -d | grep Pictures2SD
    echo $SECONDARY_STORAGE

    Xposed Module Repository page:
    http://repo.xposed.info/module/lv.id.dm.pictures2sd

    Download:
    7
    @ritvikp @DIDUandroidman @Bert98 @brunoisa10 @chris.wilcox Sources of Pictures2SD are now available at https://github.com/DavisNT/Pictures2SD I am soon planning to add external SD card detection by enumerating available storages (i.e. support for Marshmallow).

    Sent from my LG-D855 using Tapatalk
    4
    Hello, I am very impressed with this mod, is very good.
    I currently own a Galaxy S3, with the Stock ROM 4.1.2, and installed the camera and the Android Gallery KitKat (4.4). This new version of camera and gallery, are two different app.
    With the mod installed, the gallery works correctly, the Camera folder that defaults to is that of the SD, but the camera continues to put the photos in the internal memory. I assume that's because it is not yet supported by the MOD.

    From already thank you very much!

    I'm not running the ROM but I am running the 4.4 launcher and camera and also have noticed that even if the module is running the camera is still defaulting back to the storage/emulated/0/dcim/camera folder.

    Using the same .apk.

    Thanks for the great work.

    New version (1.0.5) supporting KitKat camera has been released.
    2
    Works for me Note 2 with Slimbean 4.3 beta2

    Gesendet von meinem GT-N7100 mit Tapatalk 4
    2
    Hi everybody,
    Sorry me I'm a real dummy. I've the Jamal ROM for S4 GE based on 4.4.3. I've installed framework closed and the Pictures2sd module. The pictures are saved but they are completely black. What's wrong??

    Inviato dal mio GT-I9505G utilizzando Tapatalk

    Just install SD Fix from NextApp from the store, it helped to most of us with that problem. Check the previous page what you need to do.