# Objection

### Update

```
pip3 install -U objection
```

### Patching an APK

```
objection patchapk --source app-release.apk
```

{% hint style="warning" %}
You might need to use the flag `--skip-resources` if there is an error while rebuilding the APK.
{% endhint %}

### Explore APK

First you will need to [start the Frida server](https://techbrunch.gitbook.io/workspace/mobile/frida#starting-frida-server) (either you patched the APK to run Frida when starting or you previously started the Frida's server).

```
objection -g com.package.package explore
```

### Disable SSL Pinning

```
android sslpinning disable
```

### Early Instrumentation

```
objection explore --startup-command 'android sslpinning disable'
objection explore --startup-script ssl-pinning.js
```

### List activities

```
android hooking list activities com.package.package
```

### List classes

```
android hooking list classes
```

### Simple hooks for each Class method

```
android hooking generate simple <class name>
```

### Launch Activity

```
android intent launch_activity com.package.package.class.NameActivity
```

### Hook return\_value

```
android hooking set return_value com.package.package.paywall.PayWallStorageImpl.retrievePayWallIsOp
en true
```

### Making a patch permanent

```
objection patchapk -s UnCrackable-Level1.apk -c gadget -l root.js
```

{% tabs %}
{% tab title="gadget" %}
{% code title="gadget" %}

```javascript
{
  "interaction": {
    "type": "script",
    "path": "libfrida-gadget.script.so"
  }
}
```

{% endcode %}
{% endtab %}

{% tab title="root.js" %}
{% code title="root.js" %}

```javascript
Java.perform(function() {
    var c = Java.use("sg.vantagepoint.a.c");
    c.a.implementation = function(v) { return false; }
    c.b.implementation = function(v) { return false; }
    c.c.implementation = function(v) { return false; }
})
```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://techbrunch.gitbook.io/workspace/mobile/objection.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
