Skip to content

Commit 8932619

Browse files
authored
Merge pull request LambdaTest#1368 from shreybansal-lambdatest/stage
adb shell changes
2 parents 1f549d2 + 6717dee commit 8932619

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed
89 KB
Loading

docs/adb-commands-support.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,26 @@ result = driver.execute_script("lambda-adb",params)
111111
params = {"command": "shell", "text": "dumpsys package <package_info>"}
112112
result = driver.execute_script("lambda-adb",params)
113113
```
114+
Example -
115+
```python
116+
params = {"command": "shell", "text": "dumpsys package dumpsys input_method"}
117+
result = driver.execute_script("lambda-adb",params)
118+
```
114119

115-
- **adb shell getprop** <VirtualDeviceTag value="Virtual Device" />
120+
- **adb shell getprop** <VirtualDeviceTag value="Virtual Device" /> <RealDeviceTag value="Real Device" />
116121

117122
This command is used to retrieve system properties from an Android device. When executed, it provides a list of key-value pairs representing various system settings and configurations. These properties include information about the device's build, hardware, and other system-related details. The output can be useful for debugging, development or understanding the device's current state. The following is a Python sample using the adb command:
118123

119124
```python
120125
params = {"command": "shell", "text": "getprop"}
121126
result = driver.execute_script("lambda-adb",params)
122127
```
128+
Example -
129+
```python
130+
params = {"command": "shell", "text": "getprop ro.build.version.security_patch"}
131+
result = driver.execute_script("lambda-adb",params)
132+
```
133+
123134

124135
- **adb shell ping -c 4 YOUR_URL** <VirtualDeviceTag value="Virtual Device" />
125136

@@ -131,6 +142,16 @@ result = driver.execute_script("lambda-adb",params)
131142
result = driver.execute_script("lambda-adb",params)
132143
```
133144

145+
- **adb shell cat** <RealDeviceTag value="Real Device" />
146+
147+
This command provides detailed information about the system’s kernel version and build information. It outputs the Linux kernel version, along with build information such as the GCC version used to compile the kernel. This command is useful when you need to check the underlying kernel version of the Android device, typically for compatibility checks, debugging, or ensuring that a device meets specific requirements for apps or tests. The following is a Python sample using the adb command:
148+
149+
```python
150+
params = {"command": "shell", "text": "cat /proc/version"}
151+
result = driver.execute_script("lambda-adb",params)
152+
```
153+
<img loading="lazy" src={require('../assets/images/appium-app/adb-commands.png').default} alt="Image" width="1444" height="703" className="doc_img img_center"/>
154+
134155
### Enable/Disable Notification
135156

136157
- **enableNotification** <RealDeviceTag value="Real Device" /> <VirtualDeviceTag value="Virtual Device" />
@@ -220,4 +241,4 @@ This approach is particularly useful when testing applications that rely on corr
220241
</span>
221242
</li>
222243
</ul>
223-
</nav>
244+
</nav>

docs/realdevices-adb-shell.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ To ensure security and compatibility, we have a list of ADB commands that can be
7979
| pwd | Prints the current working directory on the device. |
8080
| dumpsys | Dumps system information from the device. |
8181
| getprop | Retrieves device properties. |
82+
| cat | Helps in compatibility checks, debugging and system diagnostics. |
8283

8384

8485

@@ -106,4 +107,4 @@ To ensure security and compatibility, we have a list of ADB commands that can be
106107
</span>
107108
</li>
108109
</ul>
109-
</nav>
110+
</nav>

0 commit comments

Comments
 (0)