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

Saturday, December 14, 2024

SD Card Partitioning in Windows

The handy dandy tool for disk partitioning is Disk Management and it works like a charm for Hard Disks. But, when a similar thing is tried on SD cards, it becomes tricky. This is because it won't let you work on SD cards or flash disks. For that you need the low level tool named diskpart.

Follow the following steps for SD card (steps are same for External Drives as well):

  1. Open the command prompt in Administrator mode, type diskpart and press Enter (You may have to confirm UAC prompt).
    open diskpart


  2. Type list disk and press Enter (Take note of card's disk number).

  3. Type select disk <number> (<number> is disk number from previous command).

  4. Type clean and press Enter (This will overwrite partition table with zeros - all data will be lost).

  5. Type create partition primary and press Enter (This will create a partition.)

  6. Now if you go to Disk Partition utility, you will see a drive letter is assigned to the SD drive.

  7. Open Windows Explorer.

  8. Right click on the SD Card drive letter and select Format (you can select any suitable to you).

  9. After formatting the card, you are good to go.

Monday, May 6, 2013

Torchlight: "android:installLocation" manifest attribute

If we look at the Android application info on device with Android 2.2 and above there is button which will have label Move to SD card or Move to phone and in some cases this button is disabled with label Move to SD card.

This button is controlled by android:installLocation manifest attribute.

There are different values to this attribute:
  1. internalOnly (default value):
    If the value is such then the application must be installed on the internal device storage only and it will never be installed on the external storage. If the internal storage is full, then the system will not install the application. This is when button in application info is disabled with label Move to SD card.
  2. auto:
    If the value is such then the system will install the application on the internal storage by default. If the internal storage is full, then the system will install it on the external storage.
  3. preferExternal:
    If the value is such then the application prefers to be installed on the external storage. There is no guarantee this as application might be installed on internal storage if the external media is unavailable or full.
In both of the auto and preferExternal user can move the application to either internal or external storage through Move to SD card or Move to phone on application info screen.

In case of app installed on external storage  only .apk file is saved on the external storage, but all private user data, databases, optimized .dex files, and extracted native code are saved on the internal device memory.

Caution should be taken while declaring app to be installation on external storage as whenever external storage get unmounts or removed, the application get killed and becomes unavailable for user. If in the application, below services are to be used then value should be set to internalOnly:
  • Services
  • Alarm Services
  • Input Method Engines  
  • Live Wallpapers
  • App Widgets
  • Account Managers
  • Sync Adapters
  • Device Administrators
  • Broadcast Receivers listening for "boot completed"

SD Card Partitioning in Windows

The handy dandy tool for disk partitioning is Disk Management  and it works like a charm for Hard Disks. But, when a similar thing is tried ...