[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tramp-adb] su?

From: Michael Albinus
Subject: Re: [tramp-adb] su?
Date: Thu, 28 Feb 2013 20:44:39 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Neal Becker <address@hidden> writes:

Hi Neal,

> tramp-adb is working, but I don't think it's running with root permission.  It
> is using adb shell, I believe.  After
> adb shell
> To get root permission, we need to use
> su
> I'm testing using
> /adb:address@hidden:
> I got the device id using
> adb devices
> List of devices attached
> 0149B2851300A016      device
> Is there a way to get tramp-adb to have root access?

That's not so simple I fear. We could add the "su" command to the
initial hand-shaking. But there is the problem, that Tramp copies files
from/to Android devices by "adb pull" and "adb push", which have the
same permissions as adbd on the device. Even if you could navigate in
the directories being root, you wouldn't be able to open files.

Furthermore, the "su" command does not exist on unrooted devices. I own
an unrooted "Nexus S" for testing, and it tells me

--8<---------------cut here---------------start------------->8---
address@hidden ~]$ adb shell
address@hidden:/ $ id
uid=2000(shell) gid=2000(shell) 
address@hidden:/ $ su
/system/bin/sh: su: not found
--8<---------------cut here---------------end--------------->8---

Alternatively, if you have a running sshd on the device, you could use
the usual ssh-based methods for access. See the Tramp manual for setup

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]