#if ASAN_FLEXIBLE_MAPPING_AND_OFFSET == 1
extern __attribute__((visibility("default"))) uintptr_t __asan_mapping_scale;
extern __attribute__((visibility("default"))) uintptr_t __asan_mapping_offset;
-#define SHADOW_SCALE (__asan_mapping_scale)
-#define SHADOW_OFFSET (__asan_mapping_offset)
+# define SHADOW_SCALE (__asan_mapping_scale)
+# define SHADOW_OFFSET (__asan_mapping_offset)
#else
-#define SHADOW_SCALE (3)
-#if __WORDSIZE == 32
-#define SHADOW_OFFSET (1 << 29)
-#else
-#define SHADOW_OFFSET (1ULL << 44)
-#endif
+# ifdef ANDROID
+# define SHADOW_SCALE (3)
+# define SHADOW_OFFSET (0)
+# else
+# define SHADOW_SCALE (3)
+# if __WORDSIZE == 32
+# define SHADOW_OFFSET (1 << 29)
+# else
+# define SHADOW_OFFSET (1ULL << 44)
+# endif
+# endif
#endif // ASAN_FLEXIBLE_MAPPING_AND_OFFSET
#define SHADOW_GRANULARITY (1ULL << SHADOW_SCALE)