After a lot of digging around, looking android's source code exhaustively, I found a way to get the image from a raw contact.
Using Android's native code to get it, I did my own solution (my problem was getting the raw contact's image URI, I couldn't find a way to get it). So from here public static boolean savePhotoFromUriToUr I did this:
public InputStream getBitmapFromUri(String rawContactId) throws FileNotFoundException {
final Uri photoUri = Uri.withAppendedPath(
ContentUris.withAppendedId(RawContacts.CONTENT_URI, Long.valueOf(rawContactId)), RawContacts.DisplayPhoto.CONTENT_DIRECTORY);
final InputStream imageStream = contentResolver.openInputStream(photoUri);
return imageStream;
}
So here it is, how to get the raw contact's photo.