Replace Arrays.copyOf* with System.arraycopy

Arrays.copyOf is not supported on android api8