╔═══════════════════════════════════════════════════════════════════════════╗
║                  🔍 TOKEN COMPARISON - User: 318265575419                ║
╚═══════════════════════════════════════════════════════════════════════════╝

📍 STEP 1: ACTIVATION REQUEST
──────────────────────────────────────────────────────────────────────────────
{
  "code": "318265575419",
  "mac": "8c:fd:f0:00:7f:13",
  "sn": "8c:fd:f0:00:7f:13",
  "model": "SM-N975F",
  "group": 1,
  "mode": "active"
}

📍 STEP 2: SERVER RESPONSE (Activation)
──────────────────────────────────────────────────────────────────────────────
✅ Status: 100
✅ Message: "The Code is active"
✅ Username: 318265575419
✅ Password: 641860341690e1b8ce36aa
✅ Expires: 2025-11-14

🔑 TOKEN RECEIVED FROM SERVER:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
0522fb95ed22b9a16c67d633df0a0acfGPBu0jUTt9Y8KMnTCE68u5MgjUCCwnh6HXanXUrNCxelws1ZDqeLtK7OVd02IykkqAa63YfwX7jowfCK2GDJVg==
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

MD5 Prefix: 0522fb95ed22b9a16c67d633df0a0acf
Length: 120 characters
Status in DB: ✅ EXISTS and VALID until 2025-11-14


📍 STEP 3: SUBSEQUENT REQUEST (movies_latest)
──────────────────────────────────────────────────────────────────────────────
{
  "code": "318265575419",
  "mac": "8c:fd:f0:00:7f:13",
  "sn": "8c:fd:f0:00:7f:13",
  "model": "SM-N975F",
  "group": 1,
  "mode": "movies_latest",
  "token": "995754fc4c34ec52c3e10c5d5d1e9005..."  ← ❌ WRONG TOKEN!
}

🔑 TOKEN SENT BY APP:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
995754fc4c34ec52c3e10c5d5d1e9005dojbwuusZ45ym8mpqC34jPmGdVNkWx2Cg7xk7B+OaPcSrut9zV+Jzj+6AXVyYuKvEWQaiFWG0Bbg1XVZmj0biQ==
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

MD5 Prefix: 995754fc4c34ec52c3e10c5d5d1e9005
Length: 120 characters
Status in DB: ❌ DOES NOT EXIST

📍 STEP 4: SERVER RESPONSE
──────────────────────────────────────────────────────────────────────────────
❌ error: invalid or expired token


╔═══════════════════════════════════════════════════════════════════════════╗
║                           📊 ANALYSIS                                     ║
╚═══════════════════════════════════════════════════════════════════════════╝

┌─────────────────────────────────────────────────────────────────────────┐
│                      MD5 PREFIX COMPARISON                              │
├─────────────────────────────────────────────────────────────────────────┤
│ Received: 0522fb95ed22b9a16c67d633df0a0acf                              │
│ Sent:     995754fc4c34ec52c3e10c5d5d1e9005                              │
│           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                             │
│           COMPLETELY DIFFERENT!                                         │
└─────────────────────────────────────────────────────────────────────────┘

Position-by-position comparison:
   Pos:  0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15
   ───────────────────────────────────────────────────────
   Rcv:  0  5  2  2  f  b  9  5  e  d  2  2  b  9  a  1
   Snt:  9  9  5  7  5  4  f  c  4  c  3  4  e  c  5  2
   ───────────────────────────────────────────────────────
   Dif:  ✓  ✓  ✓  ✓  ✓  ✓  ✓  ✓  ✓  ✓  ✓  ✓  ✓  ✓  ✓  ✓

❌ RESULT: Tokens are COMPLETELY DIFFERENT from position 0!


╔═══════════════════════════════════════════════════════════════════════════╗
║                          🎯 CONCLUSION                                    ║
╚═══════════════════════════════════════════════════════════════════════════╝

The Android app is NOT saving/using the token from the server!

Evidence:
  ✅ Server generates token: 0522fb95ed22b9a16c67d633df0a0acf...
  ✅ Token is saved to database
  ✅ Token is valid until 2025-11-14
  ❌ App sends different token: 995754fc4c34ec52c3e10c5d5d1e9005...
  ❌ App's token doesn't exist in database
  ❌ Server rejects: "invalid or expired token"


╔═══════════════════════════════════════════════════════════════════════════╗
║                       🔧 THE FIX (Android Code)                           ║
╚═══════════════════════════════════════════════════════════════════════════╝

AFTER ACTIVATION - Save the token EXACTLY as received:

// ❌ WRONG - What app is doing now:
String token = generateOwnToken();  // Creating new token!
or
String token = getCachedToken();    // Using old token!

// ✅ CORRECT - What app MUST do:
JSONObject response = new JSONObject(decryptedResponse);
String token = response.getString("token");  // Get from server

Log.d("TOKEN", "Server gave us: " + token.substring(0, 32));
// Output should be: 0522fb95ed22b9a16c67d633df0a0acf

SharedPreferences prefs = getSharedPreferences("app_data", MODE_PRIVATE);
prefs.edit().putString("token", token).apply();

String saved = prefs.getString("token", "");
Log.d("TOKEN", "We saved: " + saved.substring(0, 32));
// Output should be: 0522fb95ed22b9a16c67d633df0a0acf (SAME!)


WHEN MAKING REQUESTS - Use the saved token:

String token = prefs.getString("token", "");
Log.d("TOKEN", "We're sending: " + token.substring(0, 32));
// Output should be: 0522fb95ed22b9a16c67d633df0a0acf (SAME!)

JSONObject request = new JSONObject();
request.put("mode", "movies_latest");
request.put("token", token);  // Use the EXACT token from server


╔═══════════════════════════════════════════════════════════════════════════╗
║                      🧪 TEST WITH CORRECT TOKEN                           ║
╚═══════════════════════════════════════════════════════════════════════════╝

Use this token in your next request:

0522fb95ed22b9a16c67d633df0a0acfGPBu0jUTt9Y8KMnTCE68u5MgjUCCwnh6HXanXUrNCxelws1ZDqeLtK7OVd02IykkqAa63YfwX7jowfCK2GDJVg==

This token is:
  ✅ Valid
  ✅ In database
  ✅ Expires: 2025-11-14 17:18:21
  ✅ Will work!


═══════════════════════════════════════════════════════════════════════════
                              END OF REPORT
═══════════════════════════════════════════════════════════════════════════
