Is there any Native Android Java/Kotlin equivalent to C#'s IntPtr and Marshall?
IntPtr unmanagedMemory = Marshal.AllocHGlobal(length);
Marshal.Copy(source, sourceIndex, unmanagedMemory, length);
object returnValue = Marshal.PtrToStructure(unmanagedMemory, destinationType);
Marshal.FreeHGlobal(unmanagedMemory);
There is no possible way to do this with Android. Even in my personal experience I tried with sun.misc.Unsafe, but that does not even helped me.