Labels

Wednesday, 31 December 2014

[Windows 7 Install] Unable to copy files using windows 7 usb/dvd download tool

Sometimes if your USB stick has something in its MBR you might get the error
Windows 7 USB/DVD Download Tool error: We were unable to copy your files. Please check your USB device and the selected ISO file and try again.
You have to start command prompt as an Administrator (On Windows 7 that means right clicking the cmd and selecting Run as Administrator) and use the diskpart utility.


WARNING: Be careful to select the right drive or else your day won’t have a happy end because if you select the wrong drive you will lose all your data on this drive!


Instead of formatting the partition with FAT32, you can also use NTFS (like WUDT does), but then you need an extra step to make the drive bootable:
Bootsect.exe /nt60 X:
“X:” is the drive letter of your USB stick. Bootsect.exe can be found on the Windows 7 DVD in the boot folder. However, I can’t really recommend using NTFS. Some USB stick, at least, appeared to be slower with NTFS.
  1. Start command prompt as Administrator and type  diskpart 
  2. type  list disk
  3. type select disk  and number of your USB disk (Base on USB capacity like select disk 1 )
  4. type  clean
  5. type  create partition primary
  6. type  select partition 1
  7. type  active
  8. type  format quick fs=fat32
  9. type  assign
  10. type exit  to exit the diskpart utility
  11. type exit  to close command prompt





diskpart

Source: http://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/unable-to-copy-files-using-windows-7-usbdvd/bd21e76d-5174-4f76-8db5-36df105a12c5

Saturday, 13 December 2014

[ANDROID] The styles.xml file is not generated in my android project

ERROR: The styles.xml file is not generated in my android project.

SOLUTION:
I fixed mine by downgrading as seen at this other SO discussion using the version 23.0.5 (I'd post direct links, but I don't have enough points here to post more than two).
Again, I have no idea WHY this is happening, only that it prevents me from creating new projects with the latest SDK.

ACTION:
Anyway, for those who want to downgrade Android SDK Tools to a previous version, it can be possible following these steps:
  1. Find your Android SDK folder
  2. Locate the "tools" subfolder and rename it to "tools1" (just to keep a backup copy of the original tools folder)
  3. Download from google repository the SDK Tool version you want to downgrade to (for instance: http://dl-ssl.google.com/android/repository/tools_r22.6.2-macosx.zip) and unpack it.
  4. The ZIP file you downloaded contains a tools folder that has to be moved to your Android SDK folder.
NOTE
Now download the tools by using the following pattern:
http://dl-ssl.google.com/android/repository/tools_rXXX windows.zip 
http://dl-ssl.google.com/android/repository/tools_rXXX-linux.zip http://dl-ssl.google.com/android/repository/tools_rXXX-macosx.zip 

Where you must replace XXX with the exact revision number noted above. For example, to download revision 23.0.5 for Windows , download the file:
http://dl-ssl.google.com/android/repository/tools_r23.0.5-windows.zip

Source: http://stackoverflow.com/questions/9555337/how-to-downgrade-my-sdk-version


 

 

Friday, 12 December 2014

[SOLVED] Android Studio install problem, fails saying components not installed

ERROR:
The following SDK components were not installed: extra-android-m2repository, tools, addon-google_apis-google-21, android-21, sys-img-x86-addon-google_apis-google-21, source-21, extra-google-m2repository "

SOLUTION:

It seems there is a problem with the default installer of Android Studio 1.0.0, the one that contain both the IDE and di SDK Tools: the default installation path for the android sdk tools ends with myInstallPath../sdk/android-sdk but the first run setting for the Android Studio points at myInstallPath../sdk. So here is what i did.

  • Step 1:
  • Cut & Paste the content of the android-sdk folder outside the  sdk folder, so the files are under:
  •  myInstallPath../android-sdk
  •  myInstallPath../sdk/
  • Step 2:
  • Use SDK Manager from the new location to update everything (Use this instead of the automatic wizard, you can select which package you want or need and you get also the speed and estimate time for the download)
  • Step 3:
  • Run Android Studio (it should load and check that the SDK is up to date and start the creation of an AVD, after that the IDE will load completely)
UPDATE - Workaround for the "download interrupted: read timed out" problem
The firewall and the proxy prevented my SDK Manager to download some updates, so i've recovered the .xml url for these updates, searched for the .zip files i needed and directly downloaded them with the help of a download manager, then i've manually installed them in their relative folder under the sdk folder ..a bit tricky but worked for me. For example in the Addon_xml_file i've searched for the m2repository, found the entry and downloaded the archive with the link m2repository_r14_zip_file. You always find the files you need in the same base as the .xml file (take a look at the url i've posted for the example).

Source: http://stackoverflow.com/questions/27376465/android-studio-doesnt-start-fails-saying-components-not-installed

Thursday, 11 December 2014

[LINUX] Format USB Drive in the Terminal


1. Insert your USB drive into your system.

2. Open the terminal. (CTRL + ALT + T)

3. Look for the USB drive you want to format, by running:

df

The command above will display the directory path of your various drives. Take note of the drive you wish to format.


In this tutorial, the name of the drive am going to format is Seth and its path under the filesystem is /dev/sdc1.
NOTE: if df can not  list your usb drive you can use the following command: 
dmesk | tail

3. Unmount drive using the syntax below:
with root administrator:

umount /dev/sdc1



4. Now run this command to format drive to fat32:

mkfs.vfat -n 'Ubuntu' -I /dev/sdc1



Understanding the above command

mkfs
mkfs is used to build a Linux filesystem on a device, usually a hard disk partition. The device argument is either the device name (e.g. /dev/hda1, /dev/sdb2), or a regular file that shall contain the filesystem. The size argument is the number of blocks to be used for the filesystem.

vfat
Formats the drive to FAT32, other formats available are mkfs.bfs, mkfs.ext2, mkfs.ext3, mkfs.ext4, mkfs.minix, mkfs.msdos, mkfs.vfat, mkfs.xfs, mkfs.xiafs etc.

-n
Volume-name sets the volume name (label) of the file system. The volume name can be up to 11 characters long. The default is no label. In this tutorial my volume-name is Ubuntu.

-I
It is typical for fixed disk devices to be partitioned so by default, you are not permitted to create a filesystem across the entire device.

Running df after formatting displays this.



You are done and your pen drive has successfully been formatted.


Source: http://www.unixmen.com/how-to-format-usb-drive-in-the-terminal/