Using a Google Account to Transfer Contacts:

You can use your Google account in order to easily transfer the contacts stored on your HTC One X to the HTC One M8, by simply syncing the contacts from the One X with the Google account. Then, you can re-sync the contacts from the account with your HTC One M8, as explained below:

  1. On the HTC One X, sign in with your Google account
  2. Swipe the "Status" bar down using two fingers
  3. Tap "Settings" and scroll to "Personal"
  4. Tap "Accounts & sync"
  5. Tap "Google" and then select an account
  6. Tap the "Menu" button located in the upper-right corner and select "Sync all". (NOTE: you can sync only the contacts by clearing and marking the check box next to "Contacts"
  7. On the HTC One M8, register the same account as the one used on the HTC One X for syncing
  8. Go to "Apps" and tap "Settings"
  9. Tap "Accounts & sync", select the account and allow it to sync contacts with your device

Transferring Contacts via "Import / Export":

You can export the contacts stored on your HTC One X in the form of a vCard file, which can then be sent to the HTC One M8 via email, or copied over using a computer and a USB cable.

  1. Launch the "People" app on the HTC One X
  2. Access the "People" tab and press "Menu"
  3. Tap "Manage contacts" and select "Import / Export contacts"
  4. Tap "Export to phone storage" and select an account
  5. From the confirmation window, make sure you remember the backup file's name before tapping "OK"
  6. Open the "Email" / "Gmail" app and compose a new email with the VCF file attached to it
  7. Send the email to your own Gmail address
  8. On the HTC One M8, launch the email client and open the email containing the backup file
  9. Download the vCard attachment and launch the "People" app
  10. Tap "Menu" > "Import / Export contacts"
  11. Select to "Import form phone storage"
  12. Browse for the downloaded vCard file and load it in your phonebook

NOTE: you can transfer the VCF file from the HTC One X to the HTC One M8 without having to send it via email. In order to achieve this, you can connect your HTC smartphones to your computer via USB, and you can manually transfer the vCard file from the One X's storage to the M8's internal or external memory

Using "Send Anywhere" to Transfer Contacts:

"Send Anywhere" is a third party application that uses a P2P connection in order to transfer contacts and other types of files cross-platform, without needing a computer with Internet access. To perform this method of transfer:

  1. Visit the Play Store and download "Send Anywhere" on both HTC devices
  2. Once installed, open the application on both smartphones
  3. On the HTC One X, tap "Send" > "Contacts"
  4. Mark the contacts that you wish to transfer and tap "Send"
  5. Finally, select the desired method of transfer. By tapping "Receive" on the HTC One M8, you can enter the transfer code that has been randomly generated on the HTC One X. Alternatively, you can tap "Generate QR Code" on the One X, and scan the resulting QR code with the HTC One M8's camera to commence the transfer

See More: Transfer Contacts from an HTC One X to the HTC One M8