adbd cannot run as root
时间: 2023-11-15 10:54:21 浏览: 149
adbd is the Android Debug Bridge daemon, which allows communication between the Android device and a computer. By default, adbd runs as a non-root user for security reasons. However, there are certain situations where you may need adbd to run as root.
To run adbd as root, you can modify the device's init.rc file. You will need root access to make this change. Follow these steps:
1. Connect your device to your computer using a USB cable.
2. Open a terminal or command prompt and execute the following command to access the device shell:
```
adb shell
```
3. Execute the following command to remount the /system partition in read-write mode:
```
mount -o rw,remount /system
```
4. Use a text editor (such as vi or nano) to edit the init.rc file. The file is usually located in the /system/etc directory.
```
vi /system/etc/init.rc
```
5. Look for the line that starts with "service adbd" and modify it to include the "root" option. It should look like this:
```
service adbd /sbin/adbd --root
```
6. Save the changes and exit the text editor.
7. Reboot your device for the changes to take effect.
```
reboot
```
Keep in mind that running adbd as root can have security implications, so be cautious when making this change.
阅读全文