@@ -37,20 +37,6 @@ val spoofClientPatch = bytecodePatch(
37
37
38
38
dependsOn(
39
39
sharedExtensionPatch,
40
- hexPatch(ignoreMissingTargetFiles = true , block = fun HexPatchBuilder .() {
41
- listOf (
42
- " arm64-v8a" ,
43
- " armeabi-v7a" ,
44
- " x86" ,
45
- " x86_64"
46
- ).forEach { architecture ->
47
- " https://login5.spotify.com/v3/login" to " http://127.0.0.1:$requestListenerPort /v3/login" inFile
48
- " lib/$architecture /liborbit-jni-spotify.so"
49
-
50
- " https://login5.spotify.com/v4/login" to " http://127.0.0.1:$requestListenerPort /v4/login" inFile
51
- " lib/$architecture /liborbit-jni-spotify.so"
52
- }
53
- })
54
40
)
55
41
56
42
compatibleWith(" com.spotify.music" )
@@ -103,82 +89,6 @@ val spoofClientPatch = bytecodePatch(
103
89
104
90
// region Spoof client.
105
91
106
- loadOrbitLibraryFingerprint.method.addInstructions(
107
- 0 ,
108
- """
109
- const/16 v0, $requestListenerPort
110
- invoke-static { v0 }, $EXTENSION_CLASS_DESCRIPTOR ->launchListener(I)V
111
- """
112
- )
113
-
114
- startupPageLayoutInflateFingerprint.method.apply {
115
- val openLoginWebViewDescriptor =
116
- " $EXTENSION_CLASS_DESCRIPTOR ->launchLogin(Landroid/view/LayoutInflater;)V"
117
-
118
- addInstructions(
119
- 0 ,
120
- " invoke-static/range { p1 .. p1 }, $openLoginWebViewDescriptor "
121
- )
122
- }
123
-
124
- renderStartLoginScreenFingerprint.method.apply {
125
- val onEventIndex = indexOfFirstInstructionOrThrow {
126
- opcode == Opcode .INVOKE_INTERFACE && getReference<MethodReference >()?.name == " getView"
127
- }
128
-
129
- val buttonRegister = getInstruction<OneRegisterInstruction >(onEventIndex + 1 ).registerA
130
-
131
- addInstruction(
132
- onEventIndex + 2 ,
133
- " invoke-static { v$buttonRegister }, $EXTENSION_CLASS_DESCRIPTOR ->setNativeLoginHandler(Landroid/view/View;)V"
134
- )
135
- }
136
-
137
- renderSecondLoginScreenFingerprint.method.apply {
138
- val getViewIndex = indexOfFirstInstructionOrThrow {
139
- opcode == Opcode .INVOKE_INTERFACE && getReference<MethodReference >()?.name == " getView"
140
- }
141
-
142
- val buttonRegister = getInstruction<OneRegisterInstruction >(getViewIndex + 1 ).registerA
143
-
144
- // Early return the render for loop since the first item of the loop is the login button.
145
- addInstructions(
146
- getViewIndex + 2 ,
147
- """
148
- invoke-virtual { v$buttonRegister }, Landroid/view/View;->performClick()Z
149
- return-void
150
- """
151
- )
152
- }
153
-
154
- renderThirdLoginScreenFingerprint.method.apply {
155
- val invokeSetListenerIndex = indexOfFirstInstructionOrThrow {
156
- val reference = getReference<MethodReference >()
157
- reference?.definingClass == " Landroid/view/View;" && reference.name == " setOnClickListener"
158
- }
159
-
160
- val buttonRegister = getInstruction<FiveRegisterInstruction >(invokeSetListenerIndex).registerC
161
-
162
- addInstruction(
163
- invokeSetListenerIndex + 1 ,
164
- " invoke-virtual { v$buttonRegister }, Landroid/view/View;->performClick()Z"
165
- )
166
- }
167
-
168
- thirdLoginScreenLoginOnClickFingerprint.method.apply {
169
- // Use placeholder credentials to pass the login screen.
170
- val loginActionIndex = indexOfFirstInstructionOrThrow(Opcode .RETURN_VOID ) - 1
171
- val loginActionInstruction = getInstruction<FiveRegisterInstruction >(loginActionIndex)
172
-
173
- addInstructions(
174
- loginActionIndex,
175
- """
176
- const-string v${loginActionInstruction.registerD} , "placeholder"
177
- const-string v${loginActionInstruction.registerE} , "placeholder"
178
- """
179
- )
180
- }
181
-
182
92
// endregion
183
93
184
94
// region Disable verdicts.
0 commit comments