diff -uNr pytorch-v1.12.1/torch/csrc/init_flatbuffer_module.cpp pytorch-v1.12.1.mod/torch/csrc/init_flatbuffer_module.cpp
--- pytorch-v1.12.1/torch/csrc/init_flatbuffer_module.cpp	2022-08-06 04:37:12.000000000 +0900
+++ pytorch-v1.12.1.mod/torch/csrc/init_flatbuffer_module.cpp	2022-09-05 00:27:22.542774737 +0900
@@ -27,7 +27,7 @@
   std::shared_ptr<char> bytes_copy(
       static_cast<char*>(_aligned_malloc(size, FLATBUFFERS_MAX_ALIGNMENT)),
       _aligned_free);
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__ANDROID__)
   void* p;
   ::posix_memalign(&p, FLATBUFFERS_MAX_ALIGNMENT, size);
   TORCH_INTERNAL_ASSERT(p, "Could not allocate memory for flatbuffer");
