shumeiBoxId is the value the SFS2X Login request sends as its ShuMei anti-fraud device fingerprint. It is not a locally-invented token: it is the smid (ShuMei Machine ID) that the ShuMei backend assigns in response to uploading a device profile to /deviceprofile/v4. This page documents that flow, recovered from the Obfuscator-LLVM-hardened libsmsdk.so and the com.ishumei.smantifraud Java classes, so a from-scratch Go client can register a device and mint its own shumeiBoxId.
Three names, three different things
The protocol uses three ShuMei-related identifiers that are easy to conflate:The flow
l11l11l1l1Il) adds "retry":1. The error
handler starts it for codes other than 1902, so the first request never
carries retry.
Configuration values (byte-exact)
All recovered fromcom.sdkmanager.SmSdkManager and com.ishumei.smantifraud:
The SDK’s own built-in datasites are region-pinned on
fengkongcloud.com
(fp-it / fp-sa-it / fp-na-it-acc, each with an api-fp-retry-*
companion). Last War bypasses them entirely with the
shumei-api.lastwargame.com:19091 proxy above, so the region mapping matters
only as documentation.
Cryptography
The SDK’s protection is hybrid RSA-OAEP + AES-256-CBC, decompiled froml11l11l1lIl.java and l11l111l1lll.java:
data sub-object wires it together: pri carries the RSA-OAEP-encrypted
AES key (rsaOaep(cert, aesKey)), so the server can encrypt its reply with
that same key and the client decrypts it AES-CBC. This shape belongs to the
cloudconf request (/v3/cloudconf), not the deviceprofile request.
Its data sub-object looks like this (from l11l111l1lll’s request builder):
PSpecified.DEFAULT). In Go,
rsa.EncryptOAEP(sha256.New(), rand.Reader, pub, msg, nil).
The deviceprofile protection (native w1)
The deviceprofile request (/deviceprofile/v4) uses a different, simpler
hybrid than the cloudconf request above. It is built by the native w1, and
it is the scheme the Go client reproduces. In the decompiled libsmsdk.so,
the w1 JNI stub at 0xa07c calls FUN_0010f8d0, which calls
FUN_0010c160:
rawDeflate is raw DEFLATE (RFC 1951, no zlib header) — Go’s
compress/flate, not compress/zlib. The server decrypts ep to recover r,
derives the AES key from MD5(r), decrypts data, and inflates the result to
recover the aNN device-data JSON. A body whose data/tn/ep it cannot
decrypt gets 1902.
Profile fields (byte-exact names)
The device-profile body is built by the nativew1, which writes exactly these
top-level fields:
a1 … a174 device-data slots live inside the protected data payload
(the aNN fingerprint), not at the top level. The other names in the SDK’s
name table (l111l1111lI1l.java) belong to other requests: sdkver/md5/
pri/bb to cloudconf (l11l111l1lll.java), and smid/appname/
sessionId/wevent to the v3 event flow (l1l1l111Il.java). No
decompiled Java builder references enc or sid.
Response codes
The
detail object (l1l11I1l.l11l1111I11l) carries deviceId (the smid),
oldDeviceId, sid, c, t (l11l111llI1l.java).
How ShuMei drives account bans
TheshumeiBoxId isn’t only a stored fingerprint. It feeds a ShuMei-backed
account-creation risk decision that the server pushes back to the client in two places. Both
carry the same field, creat_account_rick_level (the wire name is misspelled in the client), which
the server sets to 1 or 2 when it classifies the device behind the login as risky.
The two risk pushes
The login-server variant tests only
== 1 (Assembly-CSharp:8921); the in-game one treats both
1 and 2 as a ban (AccountManager.lua:486-494). Both are gated client-side on
ClientSwitch.IsOn(36) (ENABLE_SHUMEI_CREATE_ACCOUNT_RISK_BAN, Assembly-CSharp:44163): with the
switch off, the real client still shows New Game and never pops the ban, whatever the level the
server pushed. The server’s decision to push is independent of that switch.
What the levels mean
The server’s own telemetry lumps the reason into one string,shumei_null_or_emulator (AccountManager.lua:510-515), but the two levels map onto its two halves:
The level-to-contact mapping is
UIAccountBanView.lua:121-149 (contactType 2 → E021,
contactType 3 → E022) and the contact entrances are Assembly-CSharp:238427-238432. So
creat_account_rick_level == 2 is the “no ShuMei ID at all” case, and it’s the one the client treats
as permanent: the popup offers no way to start a new game.
This risk push is a separate surface from the Login rejection ban (ec=28, ep[0] starting with
4;). The Login ban is the account-level ERROR_BANID documented in
Identity, login & session; the ShuMei push arrives after a successful login and
targets the device behind the account rather than a specific role.
A stale build is a separate ShuMei gate
ShumeiSdkManager.IsForbidCreateRole (Assembly-CSharp:59785-59841) blocks new role creation on
a different signal: when the server has set the player switch shumei_new_user_check and the client’s
claimed appVersion is more than login_shumei_level_limit.k6 minor-versions behind the server’s
new_version, the client shows a “go to the store” dialog instead of creating the role. It’s a version
gate, not a ban, but it’s ShuMei-branded and targets the same fresh-account flow.
What this means for a clean-room client
The fingerprint is spoofable in principle: theaNN device data is collected locally by the SDK and
self-reported, protected only with the static embedded public key (see
Cryptography), so nothing on the wire binds it to a real phone’s hardware. A
from-scratch client can build a plausible profile, and goclient now does the three things that
make one convincing:
- Per-device hardware — a catalog entry selected by
deviceId(HardwareForininternal/shumei/hardware.go), not one shared Samsung profile. - Internal consistency — a real Android 12
SP1Abuild ID, a SoC that matches the board and the boot hardware, a screen whose dpi matches its resolution, and RAM/cores/clock that match the SoC. - Cross-field consistency with the
Login—auth.BuildLoginParamsderivesphone_model,osVersion,device_string,mt,AndroidID(Build.SERIAL,"unknown"on a SDK 36 target) andIMEI(the build dump) from the sameHardwareFor(deviceId)entry,androidDidfrom the build fields’ MD5 (generateHighVersionUUID), and thetablob’s#device_model/#manufacturer/#os_version/#screen_*/#ram/#fps/#device_id(ANDROID_ID) follow it too, so the ShuMei fingerprint and the login describe the same phone. The iOSLoginis left as-is: it has its own device model domain (idfa/idfv), and no iOS hardware is modeled yet.
deviceUniqueId, keystore attestation
chains, and Play Integrity. Last War’s ShuMei config skips some of it (notCollect
{input, protect}, no ACCESS_FINE_LOCATION, the cloudconf default excludes gps/tel), but not
the attestation: from its second registration on, a real install’s upload carries Android Key
Attestation certificate chains (l111l1111llIl.java:866-879, generated by l111l11111lIl.java:51-135;
notCollect doesn’t gate that block, only a169 does). A minted ID has none (a173 0, no chain),
and goclient must not emulate one. The
practical bar for a spoof is therefore consistency and uniqueness per device, not any single
unforgeable field. None of this has been validated against the server’s risk verdict, and the game’s
emulator check (Udid.CheckEmulatorBuild) only runs on the real device’s own build properties, so a
convincing fingerprint is still a constructed one, not a proven pass.
iOS
The iOS app (1.0.344, build 786) links the ShuMei SDK statically intoFrameworks/UnityFramework.framework/UnityFramework. Its SmSdkManager
configures the same organization and the same deviceprofile/v4 and
v3/cloudconf URLs, but a different public key: a 1024-bit RSA
SubjectPublicKeyInfo, stored as base64 at file offset 0x863ffdf, right after
the organization string:
aNN template,
protected with the w1 scheme above (confirmed live):
The server can’t use the iOS key with the
w1 scheme under any of those
paddings, so the iOS SDK protects its profile some other way. That scheme, and
the iOS SDK’s device-data fields, haven’t been reversed.
The server does accept os: "ios" with the Android key and fingerprint, but
goclient doesn’t use that. Only the outer os field would change: the
protected fingerprint would still describe an Android phone (a6: "android",
the com.fun.lastwar.gp package and paths, a catalog Android model), which is the
pairing the iOS-mode skip below avoids. A real iOS shumeiBoxId needs the iOS
protection scheme and an iOS fingerprint template.
Go implementation
internal/shumei reimplements this. Register(client, deviceID, device) does what
one start of the SDK does (SmAntiFraud.java:384-396): it builds the aNN device-data
fingerprint, POSTs the cloud config request to /v3/cloudconf with the same session id as
a80, then protects the fingerprint with the hybrid scheme above, POSTs it, and returns
"B" + detail.deviceId (the full shumeiBoxId) with the install as that start leaves it.
The install counts the start and the collection (a4, a130, and a127 after a reboot) even
when the upload fails, and caches the cloud config the reply carried. (BoxID is the profile
upload alone.) main.go’s -cs-shumei-gen flag calls Register before building Login
params when no shumeiBoxId was supplied, and saves the install whenever it changed; a failure only logs a warning and falls back to
the empty value the server already accepts. In iOS mode (-cs-ios or a
session config’s iosMode) the flag is ignored, because the fingerprint is an
Android device profile, which an iOS Login never carries.
Status (live-tested 2026-10-11): the full fingerprint, protected with the
hybrid scheme, returns code:1100 and a real smid, so BoxID now mints a
real shumeiBoxId ("B" + 88-char deviceId). The server validates the
protection: an empty or minimal data/tn/ep returns 1902, and an empty
body returns 9101 "invalid organization". The aNN fingerprint is a spoofed
Android device profile — this client runs on a desktop and has no real device
telemetry — so the smid it mints is for a device that does not exist. The
game server does not require a real shumeiBoxId (an empty one is accepted), so
this is an optional best-effort path, not a hard gate.
What is byte-exact vs. reconstructed: the configuration values, field
names, endpoint, response shape, and crypto primitives (RSA-OAEP spec, AES-256
CBC IV, the MD5-derived key) are byte-exact from decompilation and confirmed
live. The aNN device-data values themselves are a spoofed profile, not
collected from a real device. The clock fields below come from the host, and
the per-install values below are generated in the formats a real phone uses.
Per-device hardware. The device-specific half of the profile (build
fingerprint, model, brand, board, SoC, screen, sensors, launcher, locale) is
not one fixed phone: HardwareFor(deviceId) selects an internally-consistent
entry from a catalog of 11 real Android 12 signatures (hardware.go). Since the 1.0.370 fixes
every entry has a US SIM on its home network (T-Mobile 310260, AT&T 310410 or Verizon 311480,
with its gsm.operator.alpha name and us as both country codes), so
two distinct deviceIds report two distinct phones instead of sharing a single
Samsung profile. The selection is a pure function of the deviceId, so one
device stays the same phone across registrations. a60 (the app’s Linux uid,
u0_a<uid>) is per-install, generated with the other install values and kept
in the session config.
The same Hardware drives the Android Login’s device fields
(auth/identity.go): phone_model, osVersion, device_string, mt,
AndroidID (Build.SERIAL, "unknown" on a SDK 36 target) and IMEI (the
build dump) all come from the selected entry, androidDid is the build fields’
MD5 (generateHighVersionUUID), and the ta blob’s #device_model/
#manufacturer/#os_version/#screen_*/#ram/#fps and #device_id
(ANDROID_ID) follow it, so the ShuMei fingerprint and the login describe one
phone. ta’s #install_time is the Android install’s time (.lastwar_goclient_android_install):
a new Android install takes the session’s ShuMei firstInstallTime for its deviceId, a ShuMei
install minted later takes the Android install’s time as its a125 fit, and the afuid’s
first launch is 5 to 90 s after it. The Android Login also sends the SIM’s simOp and
simOpName, and ta’s #carrier as ThinkingData reports it. The iOS login fields are not
modeled.
1.0.370 SDK slots. The template follows the 1.0.370 SDK (static analysis): a2/a97 are the
stored smid (absent before the first registration; the Login deviceId is never sent); a56/a57
come from the app’s signing certificate (O=LCYD); a131/a132 are the SIM and network country
codes; a37 is the screen brightness of the run; the launcher entry’s key is ver (a154);
a83 is 0001100, a86 1101110, a90 the target SDK 36, and there is no a5; each a47
sensor is type,vendor (the first field is the sensor type, not an index); a29 is the radio
version; storage is sized from the catalog, with available space no more than free and free no more than total; a141 is 0 with no
a156; a72 (battery) is read per run and a120 grows within a boot.
Credit: the aNN template started as C485’s C# ShumeiInnerTemplate, and
the FUN_0010c160 address comes from their GetShumeiBoxId. Both were shared
in discussion #21.
Fields that change between collections
The SDK samples some fields fresh on every collection.BoxID fills them the
same way, from the host by default:
-cs-shumei-boot (RFC 3339) replaces the host’s boot time.
Wi-Fi details (a19, a30, a31) are absent by default, as on a real
device. The SDK reads the BSSID, SSID and Wi-Fi IP only when the app holds
both ACCESS_WIFI_STATE and ACCESS_FINE_LOCATION (l1l11l1Illl). Last War
1.0.364’s manifest doesn’t declare ACCESS_FINE_LOCATION, so all three come
back empty. The SDK’s reflection serializer (l1l1l11Ill) then skips them,
along with every other null, empty-string, empty-list and empty-map field.
BoxID serializes the same way: compact JSON, with empty top-level entries
dropped. Its keys come out in alphabetical order, while the SDK’s follow
Java’s field order. The server accepted the alphabetical order live. -cs-shumei-ssid and -cs-shumei-bssid add Wi-Fi details for a
device that holds the location permission. The SSID gets the quotes
WifiInfo.getSSID() adds, and a31 becomes the host’s LAN IPv4. Both
shapes returned 1100 and an 88-char smid on 2026-10-12 (confirmed live).
a133 changes too: it’s how long the collection took, in milliseconds
(l111l1111llIl). BoxID picks a random 150 to 600 ms on each call.
The app version, and what Last War doesn’t collect
a38 is the app’s versionName (PackageInfo.versionName, read in
l111l11111lIl). A -cs-shumei-gen run sets it to the build its Login
claims: the session config’s appVersion when it sets one, otherwise
gsl.AppVersion. BoxID refuses a device without one. The template used to
send a fixed 1.0.352, which contradicted the Login. a125’s
lastUpdateTime stays fixed for an install, so changing the config’s
appVersion reports a new version without a new update time.
SmSdkManager.callCreate() sets the SDK’s notCollect to
{"input", "protect"}. The collector merges in the cloud config’s exclusions,
reports the merged set as a85 (unless it holds "a85"), and hands it to the
native collector too.
Until a /v3/cloudconf reply has been cached, the cloud config is the SDK’s
built-in default. The config getter (l11l111l1lll) tries the one in memory,
then the cached one, then a default compiled into the SDK. A fresh install
starts the cloudconf and deviceprofile requests together on two network
threads, so its first registration most likely reads the default. The
default is {"ver":1,"code":0,"data":"…","length":11349,"enc":1}, whose
data is base64, AES-256-CBC under the key
5sn2vI1UbnoQZgr/32T6yh1xr62EQtNR9DJ3zNXl/9s= (base64) with the 16 ASCII bytes
0102030405060708 as the IV, then zlib. It decrypts to 15,108 bytes of JSON whose
sensitive.gps and sensitive.tel are false and whose other sensitive.*
keys are true, so it excludes gps and tel. A first registration therefore sends a85
as ["input","tel","gps","protect"], in Java’s HashSet order. No Java gate
checks gps or tel; they matter only to the native collector.
a63, the input-method list (InputMethodManager.getInputMethodList()), is in
the SDK’s schema, but Last War never collects it: the collector skips a63
whenever the set holds "input" or "a63" (l111l1111llIl). Among the
collector’s Java gates, "input" gates only a63, and none checks
"protect". The native side hasn’t been traced. The template used to send
a63. C485 reached the same reading in
discussion #21.
A server reply replaces the default once it’s cached, so later registrations
may report a different set. The parser reads two formats. A ver: 1 config,
like the default, has flat sensitive.<name> keys, and a value that isn’t
true excludes the name. Any other version has a nested sensitive object,
where true excludes it. Either way the server can switch off a whole category
or a single aNN field. A flat key’s name is its second dot-separated part, as
Java’s split gives it (sensitive.wifi.scan names wifi; a bare sensitive.
is skipped), and each name counts once. Register fetches the cloud config and caches it in
shumeiInstall (its md5 and exclusions), and logs the reply’s code and requestId. A
failed request, or a reply with no detail.data, keeps the cached config, as the SDK’s
error handler is empty. A reply whose detail has data that doesn’t decode (no numeric
length, bad base64, the wrong key) clears the cache instead: the SDK’s success handler
takes such a reply, so its built-in config is in force from then on. The decoder takes
data the way Base64.decode(…, DEFAULT) does, line breaks and missing = padding
included. The next start sends that md5 back, reports the
cached set in a85, and leaves out every slot the set gates, by the slot’s own key or a group
name; one key of a coupled gate such as a45/a131/a132 drops the group, and a primitive
slot is sent as 0. No live reply has been decrypted, so which keys Last War’s server sends is
unknown.
Values one install keeps
Some fields stay the same for the life of an app install.goclient keeps them
per session, in the session config’s shumeiInstall object. The first
-cs-shumei-gen run for a session generates whatever the object leaves out and
writes it back, so every later registration reports the same phone. A value
already in the object stays, such as a real phone’s MediaDrm ID.
a24 (the Android ID, Settings.Secure.ANDROID_ID) is not an install
value: it is one per device, like the Login deviceId, persisted in the
device-identity state file (.lastwar_goclient_android_id) and shared by both
the ShuMei fingerprint’s a24 and the Login’s ta.#device_id (ThinkingData’s
#device_id). deviceData reads it from Device.AndroidID, not the install.
One install belongs to one Login deviceId, so the object records the one it
was made for, in its own deviceId key. A run under a different deviceId
registers a fresh install instead. That includes a run where -cs-deviceid
overrides the config’s. The registration doesn’t save the fresh install over the
config’s when the config belongs to the other deviceId. The owner is the
config’s top-level deviceId, or, if there’s none, the deviceId of the
install already saved.
There’s one exception. If that same run also follows a server redirect,
refreshes its token, or looks its server up after a failed connect, it saves
the whole config back under the deviceId it used, together with that run’s
install. That is how the config has always treated deviceId. A run that
never had an install (no -cs-shumei-gen, or iOS) writes none.
Without a session config (-no-config, or bare -cs-* flags and no file),
there’s nowhere to keep the values, so every run reports a new phone.
goclient logs a warning saying so. Without -cs-deviceid, all those phones
share the one persisted deviceId.
goclient checks the object only on runs that register: -cs-shumei-gen, no
shumeiBoxId, and not iOS. It exits on a value a real install couldn’t hold.
The three times are RFC 3339 strings, such as
2026-03-04T10:22:31.123Z. The
wire and dumpsys package show them as milliseconds or in other formats. A
number there fails to parse, and every run then exits while loading the config.
The template used to send fixed values for all of these, including an a84 in
the wrong format and a167/a168 timestamps next to an empty a126, a pairing
a real install doesn’t produce.
After a registration succeeds, goclient stores the box ID in boxId and the
time in boxIdSavedAt. The next run sends them back as a126, a167 and
a168, as the SDK does on every launch. Android rewrites a prefs file only when
a value changes, so getting the same smid again keeps the earlier time. In
practice that doesn’t happen: on 2026-10-12, three registrations with one
throwaway install all returned 1100, each with a different 88-char smid. The
first was a fresh install, the second sent the first smid back as a126, and
the third was the same install with no a126 (confirmed live). The smid looks
like an opaque token re-issued on every reply, so boxIdSavedAt moves on every
run. A failed registration still saves the generated values. The minted box ID stays
out of the config’s top-level shumeiBoxId: that field means “send this one
and don’t register”, so storing a minted ID there would stop later runs from
registering.
Three assumptions remain. SMSDK.u2 is native and hasn’t been traced, so “0
for a missing file” comes from its Java wrapper, which returns 0 when the call
fails. The Widevine ID length (32 bytes) is the common one, not one read from a
catalog device. And the a133 range of 150 to 600 ms is a guess: the real collection
waits up to 3 s on one of its threads (thread.join(3000L)), and no real
timing has been measured.