emacs-devel
[Top][All Lists]
Advanced

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

Re: [tramp-adb] su?


From: Neal Becker
Subject: Re: [tramp-adb] su?
Date: Fri, 01 Mar 2013 06:55:35 -0500
User-agent: KNode/4.9.5

Michael Albinus wrote:

> 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)
> 
groups=1003(graphics),1004(input),1007(log),1009(mount),1011(adb),1015(sdcard_rw),1028(sdcard_r),3001(net_bt_admin),3002(net_bt),3003(inet),3006(net_bw_stats)
> 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
> hints.
> 
> Best regards, Michael.

I'm not familiar with the code.  But here are a couple of thoughts:

1. Always issue su and if it doesn't work, ignore the error

2. Isn't it true that adb push/pull runs with root privledge?  I haven't 
tested, 
but I don't recall ever seeing permission denied when doing adb push.




reply via email to

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