@leejungkiin/awkit 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -10
- package/package.json +3 -9
- package/workflows/mobile/reverse-android-build.md +106 -156
- package/workflows/mobile/reverse-android-design.md +136 -0
- package/workflows/mobile/reverse-android-discover.md +150 -0
- package/workflows/mobile/reverse-android.md +68 -37
- package/workflows/mobile/reverse-ios-build.md +72 -191
- package/workflows/mobile/reverse-ios-design.md +103 -0
- package/workflows/mobile/reverse-ios-discover.md +120 -0
- package/workflows/mobile/reverse-ios.md +64 -38
- package/workflows/mobile/reverse-android-scan.md +0 -158
- package/workflows/mobile/reverse-ios-scan.md +0 -155
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: 🔧 Dịch ngược APK Android (Apktool output) → App Kotlin hiện đại với Jetpack Compose, Clean Architecture
|
|
2
|
+
description: 🔧 Dịch ngược APK Android (Apktool output) → App Kotlin hiện đại với Jetpack Compose, Clean Architecture. Progressive Disclosure: Map → Blueprint → Build.
|
|
3
3
|
skill: smali-to-kotlin
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# /reverse-android — Android APK Reverse Engineering Workflow
|
|
7
7
|
|
|
8
|
-
> **Skill:** `smali-to-kotlin` | **Tech:** Kotlin + Compose + Hilt + Retrofit + Room
|
|
9
|
-
> **Philosophy:** "
|
|
8
|
+
> **Skill:** `smali-to-kotlin` v2.0 | **Tech:** Kotlin + Compose + Hilt + Retrofit + Room
|
|
9
|
+
> **Philosophy:** "Treat decompiled code as a MAP, not a TODO list"
|
|
10
|
+
> **Approach:** Map → Blueprint → Build (progressive disclosure)
|
|
10
11
|
|
|
11
12
|
---
|
|
12
13
|
|
|
13
14
|
## ⚡ QUICK START
|
|
14
15
|
|
|
15
16
|
User cung cấp: Apktool output dir, `AndroidManifest.xml`, hoặc nói "reverse engineer APK này".
|
|
16
|
-
Workflow dẫn dắt
|
|
17
|
+
Workflow dẫn dắt qua **4 phases** — mỗi phase có zoom level riêng, **không bao giờ nhảy cóc**.
|
|
17
18
|
|
|
18
19
|
---
|
|
19
20
|
|
|
@@ -25,18 +26,20 @@ Workflow dẫn dắt từng bước — **không bao giờ nhảy cóc**.
|
|
|
25
26
|
reverse_session:
|
|
26
27
|
project_name: "[TBD - từ manifest]"
|
|
27
28
|
apktool_dir: "[path]"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
current_phase: 0
|
|
30
|
+
current_zoom: 0 # 0=satellite, 1=district, 2=block, 3=ground
|
|
31
|
+
current_feature: null # set khi user chọn feature ở Phase 2
|
|
32
|
+
app_map_done: false
|
|
33
|
+
architecture_done: false
|
|
34
|
+
completed_features: []
|
|
35
|
+
pending_features: []
|
|
33
36
|
decisions: []
|
|
34
37
|
```
|
|
35
38
|
|
|
36
39
|
### Bước 0.2: Xác nhận input
|
|
37
40
|
|
|
38
41
|
```
|
|
39
|
-
🔧 Android Reverse Engineering
|
|
42
|
+
🔧 Android Reverse Engineering v2.0 — Map → Blueprint → Build
|
|
40
43
|
|
|
41
44
|
Em cần biết:
|
|
42
45
|
1. Thư mục Apktool output ở đâu?
|
|
@@ -47,25 +50,50 @@ Chưa chạy Apktool? → apktool d your-app.apk -o ./decompiled/
|
|
|
47
50
|
|
|
48
51
|
---
|
|
49
52
|
|
|
50
|
-
## 📋 Pipeline Overview (
|
|
53
|
+
## 📋 Pipeline Overview (4 Phases)
|
|
51
54
|
|
|
52
|
-
|
|
|
53
|
-
|
|
54
|
-
| 0 |
|
|
55
|
-
| 1 |
|
|
56
|
-
| 2 |
|
|
57
|
-
| 3 |
|
|
58
|
-
| 4 | 🎨 UI & ViewModel | [`/re-android-build`](reverse-android-build.md) | Per-screen loop |
|
|
59
|
-
| 5 | 📦 SDK Integration | [`/re-android-build`](reverse-android-build.md) | Checkpoint |
|
|
60
|
-
| 6 | ✅ Parity Check | [`/re-android-build`](reverse-android-build.md) | Final QA |
|
|
55
|
+
| Phase | Name | Sub-workflow | Zoom | Code? | Gate |
|
|
56
|
+
|-------|------|-------------|------|-------|------|
|
|
57
|
+
| 0 | 🗺️ Discovery | [`/re-android-discover`](reverse-android-discover.md) | Satellite | ❌ | User approves Map |
|
|
58
|
+
| 1 | 🏗️ Architecture | [`/re-android-design`](reverse-android-design.md) | District | ❌ | User approves Architecture |
|
|
59
|
+
| 2 | 📐 Blueprint | [`/re-android-build`](reverse-android-build.md) | Block | Signatures | Per-feature approval |
|
|
60
|
+
| 3 | 🔨 Implementation | [`/re-android-build`](reverse-android-build.md) | Ground | Full | Per-feature checkpoint |
|
|
61
61
|
|
|
62
62
|
### Execution Flow
|
|
63
63
|
|
|
64
64
|
```
|
|
65
|
-
Session Setup
|
|
65
|
+
Session Setup
|
|
66
|
+
↓
|
|
67
|
+
Phase 0: Discovery (/re-android-discover) → App Map
|
|
68
|
+
↓ [User approves]
|
|
69
|
+
Phase 1: Architecture (/re-android-design) → Architecture Blueprint
|
|
70
|
+
↓ [User approves + picks feature]
|
|
71
|
+
Phase 2+3 Loop (/re-android-build):
|
|
72
|
+
→ Blueprint Feature X → Build Feature X → Checkpoint
|
|
73
|
+
→ Blueprint Feature Y → Build Feature Y → Checkpoint
|
|
74
|
+
→ ... (repeat for all features)
|
|
75
|
+
↓
|
|
76
|
+
Final: Parity Check & Quality Gate
|
|
66
77
|
```
|
|
67
78
|
|
|
68
|
-
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 🔭 ZOOM CONTROL
|
|
82
|
+
|
|
83
|
+
AI phải tự check **TRƯỚC MỖI output**:
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
pre_output_check:
|
|
87
|
+
- "Đang ở zoom level nào? (0/1/2/3)"
|
|
88
|
+
- "Output có đúng zoom level không?"
|
|
89
|
+
- "Có function body trong Phase 0/1 không? → REMOVE"
|
|
90
|
+
|
|
91
|
+
zoom_rules:
|
|
92
|
+
zoom_0: "NO CODE. Only diagrams, tables, maps."
|
|
93
|
+
zoom_1: "NO CODE BODIES. Only architecture diagrams, file lists."
|
|
94
|
+
zoom_2: "SIGNATURES ONLY. Interfaces, data classes, sealed classes."
|
|
95
|
+
zoom_3: "FULL CODE. Implementation for ONE feature at a time."
|
|
96
|
+
```
|
|
69
97
|
|
|
70
98
|
---
|
|
71
99
|
|
|
@@ -73,34 +101,37 @@ Session Setup → Step 0+1 (/re-android-scan) → Step 2-6 (/re-android-build)
|
|
|
73
101
|
|
|
74
102
|
```yaml
|
|
75
103
|
never_skip:
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
104
|
+
- Phase 0 (Discovery) — always first, MUST create App Map
|
|
105
|
+
- Phase 1 (Architecture) — MUST design before coding
|
|
106
|
+
- User approval at each phase gate
|
|
107
|
+
- Per-feature Blueprint before Implementation
|
|
79
108
|
|
|
80
109
|
never_do:
|
|
110
|
+
- Write code in Phase 0 or Phase 1
|
|
81
111
|
- Mass-copy resources from APK (on-demand only)
|
|
82
|
-
-
|
|
83
|
-
- Skip parity check for
|
|
84
|
-
- Proceed to next step without user confirmation
|
|
112
|
+
- Implement multiple features simultaneously
|
|
113
|
+
- Skip parity check for crypto utils
|
|
85
114
|
|
|
86
115
|
always_do:
|
|
87
|
-
-
|
|
88
|
-
- Present
|
|
89
|
-
-
|
|
90
|
-
-
|
|
116
|
+
- Start with App Map (Phase 0)
|
|
117
|
+
- Present Architecture for review (Phase 1)
|
|
118
|
+
- Create Blueprint before coding each feature (Phase 2)
|
|
119
|
+
- Checkpoint after each feature (Phase 3)
|
|
120
|
+
- Document all decisions in session state
|
|
91
121
|
```
|
|
92
122
|
|
|
93
123
|
---
|
|
94
124
|
|
|
95
125
|
## 🔗 Related
|
|
96
126
|
|
|
97
|
-
- **Sub-workflows:**
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
127
|
+
- **Sub-workflows:**
|
|
128
|
+
- [`/re-android-discover`](reverse-android-discover.md) — Phase 0: Discovery
|
|
129
|
+
- [`/re-android-design`](reverse-android-design.md) — Phase 1: Architecture
|
|
130
|
+
- [`/re-android-build`](reverse-android-build.md) — Phase 2+3: Blueprint + Build
|
|
131
|
+
- **Skill:** `smali-to-kotlin` v2.0 (core knowledge & rules)
|
|
101
132
|
- **Sibling:** `/reverse-ios` (iOS counterpart)
|
|
102
133
|
- **After RE done:** `/test`, `/deploy`, `/code-janitor`
|
|
103
134
|
|
|
104
135
|
---
|
|
105
136
|
|
|
106
|
-
*reverse-android workflow
|
|
137
|
+
*reverse-android workflow v3.0.0 — Progressive Disclosure RE Pipeline*
|
|
@@ -1,248 +1,129 @@
|
|
|
1
1
|
---
|
|
2
|
-
description:
|
|
2
|
+
description: 🔨 RE iOS Phase 2+3 — Per-feature Blueprint → Implementation → Parity Check
|
|
3
3
|
parent: reverse-ios
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# /re-ios-build —
|
|
6
|
+
# /re-ios-build — Blueprint & Build (Per Feature)
|
|
7
7
|
|
|
8
|
-
> **Parent:** [`/reverse-ios`](reverse-ios.md) →
|
|
9
|
-
> **Prerequisite:**
|
|
10
|
-
> **Skill:** `smali-to-swift`
|
|
8
|
+
> **Parent:** [`/reverse-ios`](reverse-ios.md) → Phase 2+3
|
|
9
|
+
> **Prerequisite:** Completed Architecture from [`/re-ios-design`](reverse-ios-design.md)
|
|
10
|
+
> **Skill:** `smali-to-swift` → `phase-2-blueprint.md` + `phase-3-build.md`
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## 🔄 Feature Loop
|
|
15
15
|
|
|
16
|
-
> **Input:** Class-dump headers cho network, models, storage
|
|
17
|
-
|
|
18
|
-
### 2.1: Models (ObjC → Swift Codable)
|
|
19
|
-
|
|
20
|
-
```objc
|
|
21
|
-
// From class-dump
|
|
22
|
-
@interface UserModel : NSObject
|
|
23
|
-
@property (nonatomic, copy) NSString *userId;
|
|
24
|
-
@property (nonatomic, copy) NSString *fullName;
|
|
25
|
-
@end
|
|
26
16
|
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
case id = "user_id"
|
|
34
|
-
case fullName = "full_name"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### 2.2: API Client (URLSession async/await)
|
|
40
|
-
|
|
41
|
-
```swift
|
|
42
|
-
actor APIClient {
|
|
43
|
-
func request<T: Decodable>(_ endpoint: Endpoint) async throws -> T {
|
|
44
|
-
var request = URLRequest(url: baseURL.appending(path: endpoint.path))
|
|
45
|
-
request.httpMethod = endpoint.method.rawValue
|
|
46
|
-
let (data, response) = try await session.data(for: request)
|
|
47
|
-
guard let http = response as? HTTPURLResponse,
|
|
48
|
-
(200...299).contains(http.statusCode) else {
|
|
49
|
-
throw APIError.invalidResponse
|
|
50
|
-
}
|
|
51
|
-
return try decoder.decode(T.self, from: data)
|
|
52
|
-
}
|
|
53
|
-
}
|
|
17
|
+
For each feature (from Architecture Build Order):
|
|
18
|
+
Phase 2: Blueprint (Zoom 2 — signatures only)
|
|
19
|
+
↓ [User approves]
|
|
20
|
+
Phase 3: Implementation (Zoom 3 — full code)
|
|
21
|
+
↓ [Checkpoint]
|
|
22
|
+
→ Next feature
|
|
54
23
|
```
|
|
55
24
|
|
|
56
|
-
### 2.3: SwiftData (nếu app dùng Core Data / SQLite)
|
|
57
|
-
|
|
58
|
-
- `@Model` classes thay Core Data entities
|
|
59
|
-
- `@Attribute(.unique)` cho primary keys
|
|
60
|
-
- `ModelContext` cho CRUD operations
|
|
61
|
-
|
|
62
|
-
### 2.4: Repository Pattern
|
|
63
|
-
|
|
64
|
-
- Protocol: `protocol UserRepository: Sendable`
|
|
65
|
-
- Implementation: offline-first (local → remote → cache)
|
|
66
|
-
|
|
67
|
-
### ✅ Checkpoint Step 2
|
|
68
|
-
|
|
69
25
|
---
|
|
70
26
|
|
|
71
|
-
##
|
|
27
|
+
## 📐 Phase 2: Feature Blueprint (Zoom 2)
|
|
72
28
|
|
|
73
|
-
> **
|
|
29
|
+
> **Output:** Contracts, protocols, state design. **Signatures only.**
|
|
74
30
|
|
|
75
|
-
###
|
|
31
|
+
### 2.1: Deep Header Reading
|
|
76
32
|
|
|
77
|
-
|
|
78
|
-
import CryptoKit
|
|
79
|
-
import CommonCrypto
|
|
33
|
+
Read class-dump headers + Hopper pseudo-code for chosen feature.
|
|
80
34
|
|
|
81
|
-
|
|
82
|
-
static func md5(_ input: String) -> String {
|
|
83
|
-
let data = Data(input.utf8)
|
|
84
|
-
var digest = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
|
|
85
|
-
data.withUnsafeBytes { CC_MD5($0.baseAddress, CC_LONG(data.count), &digest) }
|
|
86
|
-
return digest.map { String(format: "%02x", $0) }.joined()
|
|
87
|
-
}
|
|
88
|
-
static func sha256(_ input: String) -> String {
|
|
89
|
-
SHA256.hash(data: Data(input.utf8))
|
|
90
|
-
.compactMap { String(format: "%02x", $0) }.joined()
|
|
91
|
-
}
|
|
92
|
-
}
|
|
35
|
+
**ObjC → Swift Quick Ref:**
|
|
93
36
|
```
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
final class CryptoUtilsTests: XCTestCase {
|
|
99
|
-
func testMD5MatchesOriginal() {
|
|
100
|
-
XCTAssertEqual(CryptoUtils.md5("test"), "098f6bcd4621d373cade4e832627b4f6")
|
|
101
|
-
}
|
|
102
|
-
}
|
|
37
|
+
@property (copy) NSString *name → let name: String
|
|
38
|
+
@property (assign) BOOL active → let active: Bool
|
|
39
|
+
- (void)fetchWith:(block)completion → func fetch() async throws -> T
|
|
40
|
+
+ (instancetype)sharedInstance → static let shared
|
|
103
41
|
```
|
|
104
42
|
|
|
105
|
-
###
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## 🎨 Step 4: UI & ViewModel (Per Screen — Loop)
|
|
110
|
-
|
|
111
|
-
> **Input:** Storyboard + VC headers + disassembly
|
|
112
|
-
> **Lặp lại** cho MỌI screen từ Step 1
|
|
113
|
-
|
|
114
|
-
### 4.0: Thứ tự ưu tiên
|
|
115
|
-
|
|
116
|
-
1. LaunchScreen → 2. Auth → 3. Main TabView → 4. Detail → 5. Settings
|
|
117
|
-
|
|
118
|
-
### 4.1: Resource extraction (on-demand only)
|
|
119
|
-
|
|
120
|
-
Images, colors, strings, fonts — chỉ cho screen hiện tại.
|
|
121
|
-
|
|
122
|
-
### 4.2: UIKit → SwiftUI
|
|
43
|
+
### 2.2: Domain Contracts
|
|
123
44
|
|
|
124
45
|
```swift
|
|
125
|
-
struct
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
NavigationStack {
|
|
129
|
-
ScrollView {
|
|
130
|
-
VStack(spacing: 24) {
|
|
131
|
-
TextField("Email", text: $viewModel.email)
|
|
132
|
-
SecureField("Password", text: $viewModel.password)
|
|
133
|
-
Button("Login") { Task { await viewModel.login() } }
|
|
134
|
-
.buttonStyle(.borderedProminent)
|
|
135
|
-
.disabled(viewModel.isLoading)
|
|
136
|
-
}
|
|
137
|
-
.padding()
|
|
138
|
-
}
|
|
139
|
-
.overlay { if viewModel.isLoading { ProgressView() } }
|
|
140
|
-
.alert("Error", isPresented: $viewModel.showError) { Button("OK") {} }
|
|
141
|
-
message: { Text(viewModel.errorMessage) }
|
|
142
|
-
}
|
|
143
|
-
}
|
|
46
|
+
struct [Model]: Codable, Identifiable, Sendable {
|
|
47
|
+
let field1: Type
|
|
48
|
+
// CodingKeys if needed
|
|
144
49
|
}
|
|
145
|
-
```
|
|
146
50
|
|
|
147
|
-
|
|
51
|
+
protocol [Feature]Repository: Sendable {
|
|
52
|
+
func [method](...) async throws -> [Type]
|
|
53
|
+
}
|
|
148
54
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
final class LoginViewModel {
|
|
152
|
-
var email = "", password = ""
|
|
153
|
-
var isLoading = false, showError = false, errorMessage = ""
|
|
154
|
-
|
|
155
|
-
private let authRepository: AuthRepository
|
|
156
|
-
|
|
157
|
-
func login() async {
|
|
158
|
-
isLoading = true
|
|
159
|
-
defer { isLoading = false }
|
|
160
|
-
do { try await authRepository.login(email: email, password: password) }
|
|
161
|
-
catch { errorMessage = error.localizedDescription; showError = true }
|
|
162
|
-
}
|
|
55
|
+
struct [Action]UseCase: Sendable {
|
|
56
|
+
func execute(...) async throws -> [Type]
|
|
163
57
|
}
|
|
164
58
|
```
|
|
165
59
|
|
|
166
|
-
###
|
|
60
|
+
### 2.3: UI State Design
|
|
167
61
|
|
|
168
|
-
|
|
62
|
+
- @Observable ViewModel properties
|
|
63
|
+
- User actions
|
|
64
|
+
- Navigation events
|
|
65
|
+
- Wireframe
|
|
169
66
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
## 📦 Step 5: SDK & Native Library Integration
|
|
67
|
+
### ✅ Blueprint Gate
|
|
173
68
|
|
|
174
|
-
### 5.1: App entry point
|
|
175
|
-
|
|
176
|
-
```swift
|
|
177
|
-
@main
|
|
178
|
-
struct MyApp: App {
|
|
179
|
-
@UIApplicationDelegateAdaptor private var appDelegate: AppDelegate
|
|
180
|
-
var body: some Scene {
|
|
181
|
-
WindowGroup { ContentView() }
|
|
182
|
-
.modelContainer(for: [UserEntity.self])
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
69
|
```
|
|
186
|
-
|
|
187
|
-
### 5.2: AppDelegate (Firebase, Push)
|
|
188
|
-
|
|
189
|
-
```swift
|
|
190
|
-
class AppDelegate: NSObject, UIApplicationDelegate {
|
|
191
|
-
func application(_ app: UIApplication,
|
|
192
|
-
didFinishLaunchingWithOptions opt: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
|
193
|
-
FirebaseApp.configure(); return true
|
|
194
|
-
}
|
|
195
|
-
}
|
|
70
|
+
"📐 Blueprint cho [Feature] xong. OK? → Code."
|
|
196
71
|
```
|
|
197
72
|
|
|
198
|
-
|
|
73
|
+
---
|
|
199
74
|
|
|
200
|
-
|
|
201
|
-
// App-Bridging-Header.h
|
|
202
|
-
#include "native_lib.h"
|
|
203
|
-
```
|
|
75
|
+
## 🔨 Phase 3: Implementation (Zoom 3)
|
|
204
76
|
|
|
205
|
-
|
|
77
|
+
> **Full Swift code for THIS feature only.**
|
|
206
78
|
|
|
207
|
-
|
|
79
|
+
### 3.1: Domain → Data → DI → ViewModel → Screen
|
|
208
80
|
|
|
209
|
-
|
|
81
|
+
Standard implementation order:
|
|
82
|
+
1. Codable structs
|
|
83
|
+
2. Repository protocol + implementation
|
|
84
|
+
3. APIClient endpoints
|
|
85
|
+
4. SwiftData models (if applicable)
|
|
86
|
+
5. DI container entries
|
|
87
|
+
6. @Observable ViewModel
|
|
88
|
+
7. SwiftUI Screen
|
|
89
|
+
8. Resource extraction (on-demand only)
|
|
210
90
|
|
|
211
|
-
###
|
|
91
|
+
### 🔒 Crypto (Special)
|
|
212
92
|
|
|
213
|
-
```
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
- [ ] Deep link handling
|
|
218
|
-
- [ ] Push notification → correct screen
|
|
93
|
+
```swift
|
|
94
|
+
import CryptoKit
|
|
95
|
+
import CommonCrypto
|
|
96
|
+
// XCTest mandatory for crypto utils
|
|
219
97
|
```
|
|
220
98
|
|
|
221
|
-
|
|
99
|
+
> ⚠️ Crypto MUST match original output.
|
|
222
100
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
101
|
+
### ✅ Feature Checkpoint
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
## ✅ Feature Complete: [Name]
|
|
105
|
+
### Files created: [list]
|
|
106
|
+
### Tests: [crypto verified?]
|
|
107
|
+
⏭️ Next: Phase 2 for [next feature]
|
|
227
108
|
```
|
|
228
109
|
|
|
229
|
-
|
|
110
|
+
---
|
|
230
111
|
|
|
231
|
-
|
|
232
|
-
## Complete!
|
|
233
|
-
- Screens: [count] | Frameworks reused: [count] | Replaced: [count]
|
|
112
|
+
## ✅ Final Parity Check
|
|
234
113
|
|
|
235
|
-
|
|
236
|
-
|
|
114
|
+
- [ ] API Parity
|
|
115
|
+
- [ ] Data/Crypto Parity
|
|
116
|
+
- [ ] UI Parity
|
|
117
|
+
- [ ] Build: `xcodebuild build && xcodebuild test`
|
|
237
118
|
|
|
238
119
|
---
|
|
239
120
|
|
|
240
121
|
## 🔗 Related
|
|
241
122
|
|
|
242
123
|
- **Parent:** [`/reverse-ios`](reverse-ios.md)
|
|
243
|
-
- **Previous:** [`/re-ios-
|
|
244
|
-
- **
|
|
124
|
+
- **Previous:** [`/re-ios-design`](reverse-ios-design.md)
|
|
125
|
+
- **Skill:** `smali-to-swift` → `phase-2-blueprint.md` + `phase-3-build.md`
|
|
245
126
|
|
|
246
127
|
---
|
|
247
128
|
|
|
248
|
-
*re-ios-build
|
|
129
|
+
*re-ios-build v3.0.0 — Phase 2+3: Blueprint & Build*
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: 🏗️ RE iOS Phase 1 — Architecture Design (NO CODE BODIES)
|
|
3
|
+
parent: reverse-ios
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /re-ios-design — Architecture Blueprint
|
|
7
|
+
|
|
8
|
+
> **Parent:** [`/reverse-ios`](reverse-ios.md) → Phase 1
|
|
9
|
+
> **Prerequisite:** Completed App Map from [`/re-ios-discover`](reverse-ios-discover.md)
|
|
10
|
+
> **Skill:** `smali-to-swift` → `phase-1-architecture.md`
|
|
11
|
+
> **Zoom Level:** 1 — District View
|
|
12
|
+
> **Output:** Architecture Blueprint (NO CODE BODIES)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## ⛔ ZOOM 1 RULE
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
NO CODE BODIES. Only architecture diagrams, file paths, tables, SPM declarations.
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 📐 Architecture Steps
|
|
25
|
+
|
|
26
|
+
### Step 1: Layer Design
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
┌────────────────────────────────┐
|
|
30
|
+
│ Presentation (SwiftUI) │
|
|
31
|
+
├────────────────────────────────┤
|
|
32
|
+
│ Domain (Models, Protocols, UC) │
|
|
33
|
+
├────────────────────────────────┤
|
|
34
|
+
│ Data (Network, Local, Repos) │
|
|
35
|
+
├────────────────────────────────┤
|
|
36
|
+
│ DI (AppContainer) │
|
|
37
|
+
└────────────────────────────────┘
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Step 2: Feature → File Mapping
|
|
41
|
+
|
|
42
|
+
| Feature | Model | Repository | UseCase | Screen | ViewModel |
|
|
43
|
+
|---------|-------|-----------|---------|--------|-----------|
|
|
44
|
+
|
|
45
|
+
### Step 3: API Inventory
|
|
46
|
+
|
|
47
|
+
| # | Method | Endpoint | Auth | Notes |
|
|
48
|
+
|---|--------|----------|------|-------|
|
|
49
|
+
|
|
50
|
+
### Step 4: Data Schema
|
|
51
|
+
|
|
52
|
+
| Model | Key Fields | Source | Storage |
|
|
53
|
+
|-------|-----------|--------|---------|
|
|
54
|
+
|
|
55
|
+
### Step 5: Xcode Structure
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
App/
|
|
59
|
+
├── App.swift
|
|
60
|
+
├── DI/
|
|
61
|
+
├── Data/Network/ + Local/ + Repositories/
|
|
62
|
+
├── Domain/Models/ + Repositories/ + UseCases/
|
|
63
|
+
├── Presentation/Navigation/ + Screens/ + Theme/
|
|
64
|
+
├── Utilities/
|
|
65
|
+
└── Resources/
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Step 6: Build Order
|
|
69
|
+
|
|
70
|
+
| # | Phase | Scope | Complexity |
|
|
71
|
+
|---|-------|-------|-----------|
|
|
72
|
+
|
|
73
|
+
### Step 7: Tech Decisions
|
|
74
|
+
|
|
75
|
+
| Decision | Choice | Rationale |
|
|
76
|
+
|----------|--------|-----------|
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 📊 Output
|
|
81
|
+
|
|
82
|
+
Template: `skills/smali-to-swift/templates/architecture.md`
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## ✅ Gate
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
"🏗️ Architecture xong! Anh chọn feature nào làm trước?"
|
|
90
|
+
→ /re-ios-build (Phase 2: Blueprint)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## 🔗 Related
|
|
96
|
+
|
|
97
|
+
- **Previous:** [`/re-ios-discover`](reverse-ios-discover.md)
|
|
98
|
+
- **Next:** [`/re-ios-build`](reverse-ios-build.md)
|
|
99
|
+
- **Parent:** [`/reverse-ios`](reverse-ios.md)
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
*re-ios-design v3.0.0 — Phase 1: Architecture Blueprint*
|