ADXL 345 & Adafruit SD data logger_ how to merge the two working codes together?

    Wire.beginTransmission(device);      //start transmission to device (initiate again)
  Wire.requestFrom(device, num);         // request 6 bytes from device

  int i = 0;
  while(Wire.available())            //device may send less than requested (abnormal)

  {
    buff[i] = Wire.read();           // receive a byte
    i++;
  }
  Wire.endTransmission();            //end transmission

You don't do a Wire.beginTransmission before doing a Wire.requestFrom (nor a Wire.endTransmission afterwards).

Don't you need to close logfile at some stage?

What do your serial prints tell you?