From f4ef63752b5ae58f719c582525e30b402014c0b9 Mon Sep 17 00:00:00 2001 From: pancake Date: Fri, 10 Apr 2026 14:03:20 +0200 Subject: [PATCH] class-factory: Reject unsupported Dalvik arch The switch now throws a clear Unsupported architecture for Dalvik error instead of leaving pattern undefined and propagating a confusing failure into Memory.scan. --- lib/class-factory.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/class-factory.js b/lib/class-factory.js index 68a1a3b..2dd3793 100644 --- a/lib/class-factory.js +++ b/lib/class-factory.js @@ -709,6 +709,11 @@ export default class ClassFactory { // Verified with 4.3.1 and 4.4.2 pattern = '8d 64 24 d4 89 5c 24 1c 89 74 24 20 e8 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 85 d2'; break; + default: + throw new Error([ + 'Unsupported architecture', + 'for Dalvik: ' + Process.arch + ].join(' ')); } Memory.scan(libdvm.base, libdvm.size, pattern, {