Showing posts with label sd-card. Show all posts
Showing posts with label sd-card. Show all posts

August 1, 2016

[SOLVED] Create copy of Raspberry PI SD-Card


sudo fdisk -l

Take note of how the SD card is identified.
In my case it is /dev/sdb1.
Then:
sudo dd bs=4M if=/dev/sdb | gzip > /home/your_username/image`date +%d%m%y`.gz

This will compress the image using gzip.
To restore the backup on SD card:
sudo gzip -dc /home/your_username/image.gz | sudo dd bs=4M of=/dev/sdb

January 3, 2010

[SOLVED]Attach a file from SD Card to email




Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent
.setType("plain/text");
emailIntent.putExtra(Intent.EXTRA_EMAIL, new String[] { "user@host.com" });
sendIntent
.putExtra(Intent.EXTRA_SUBJECT, "Photo");
sendIntent
.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/dcim/Camera/filename.jpg"));
sendIntent
.putExtra(Intent.EXTRA_TEXT, "Enjoy the photo");
startActivity
(Intent.createChooser(sendIntent, "Email:"));


Trying to attach a file from SD Card to email - Stack Overflow.