Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,814,393 Members 53,255 Now Online
XDA Developers Android and Mobile Development Forum

[Q] CWM ADB Shell All Commands Permission Denied

Tip us?
 
MitchumMan
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Jun 2014
Default [Q] CWM ADB Shell All Commands Permission Denied

Greetings,

I'm new here, and can't get over to the developers forums to ask. I have two GT-I9500s for development purposes, one if full of junk, and the other is still stock, except for recovery. They both have CWM Recovery v6.0.3.2, the latest available pre-compiled I've found. The stock phone has only been booted once. That system is not rooted (and this is my whole point, I want as close to stock as possible)

I am attempting to extract the system image from Stock I9500. I have booted into CWM Recovery mode, then "adb shell" into the device. All commands I issue to the shell return "Permission Denied"

Code:
:$ adb shell
~ $ ls
/sbin/sh: ls: Permission denied
~ $ dd of=/storage/extSdCard/SYSTEM.img if=/dev/block/mmcblk0p20 bs=4069
/sbin/sh: dd: Permission denied
~ $ su
/sbin/sh: su: Permission denied
~ $ sudo su
/sbin/sh: sudo: Permission denied
I have tried to use Advanced->Fix Permissions to no avail.

CWM is pure and latest from www dot clockworkmod dot com slash rommanager (new users apparently cannot post links). CWM is able successfully operate "Backup to External" from the stock device.

The end goal is to clone the clean, stock device onto the other one. CWM claims success on "Restore from External" to the other device, but it sits on the "Samsung" loading screen forever.

A solution to either or both of these problems would be appreciated.

This was accidentally posted to General a few minutes ago, but as a new user, I don't have the ability to delete it.

-MM
 
Lennyz1988
Old
#2  
Senior Member
Thanks Meter 226
Posts: 1,716
Join Date: May 2009
Location: Netherlands
You need to boot the device and then connect it to adb. Then you get a popup on your phone to allow your pc. After that you can use adb from cwm.
Current:

Samsung Galaxy S 4 I9505 | WanamLite v3.0

Retired:

Samsung Galaxy S II I9100 : AOKP 4.2.1
HTC Touch Pro2 | ROM: Valkyrie 6.5.23115TR2.5
HTC HD2 | DarkStone1337 [FroyoStone Sense - V3.2]
HTC Desire : Oxygen v2.1.3
 
MitchumMan
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Jun 2014
Quote:
Originally Posted by Lennyz1988 View Post
You need to boot the device and then connect it to adb. Then you get a popup on your phone to allow your pc. After that you can use adb from cwm.

I booted into android, connected it to Ubuntu, enabled ADB, authorized the device, chose to remember the device, then "adb shell" into the phone. I can LS and CD around.

I rebooted into CWM Recovery, did "adb shell" and still cannot execute LS. CD works but that is bash internal not a program. Other programs are still "Permission Denied"
 
Lennyz1988
Old
#4  
Senior Member
Thanks Meter 226
Posts: 1,716
Join Date: May 2009
Location: Netherlands
I am not that an expert of adb, but couldn't that be caused by the fact that you are not rooted?
Current:

Samsung Galaxy S 4 I9505 | WanamLite v3.0

Retired:

Samsung Galaxy S II I9100 : AOKP 4.2.1
HTC Touch Pro2 | ROM: Valkyrie 6.5.23115TR2.5
HTC HD2 | DarkStone1337 [FroyoStone Sense - V3.2]
HTC Desire : Oxygen v2.1.3
 
MitchumMan
Old
#5  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Jun 2014
Quote:
Originally Posted by Lennyz1988 View Post
I am not that an expert of adb, but couldn't that be caused by the fact that you are not rooted?
You're conflating the environments. CWMis inherently rooted; when in recovery, Android is never booted. I have execute permission in Android, not in CWM.
 
Lennyz1988
Old
(Last edited by Lennyz1988; 11th June 2014 at 04:46 PM.)
#6  
Senior Member
Thanks Meter 226
Posts: 1,716
Join Date: May 2009
Location: Netherlands
nvm
Current:

Samsung Galaxy S 4 I9505 | WanamLite v3.0

Retired:

Samsung Galaxy S II I9100 : AOKP 4.2.1
HTC Touch Pro2 | ROM: Valkyrie 6.5.23115TR2.5
HTC HD2 | DarkStone1337 [FroyoStone Sense - V3.2]
HTC Desire : Oxygen v2.1.3
 
MitchumMan
Old
(Last edited by MitchumMan; 12th June 2014 at 07:55 PM.)
#7  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Jun 2014
As resolution to my problem, I never did fix Clockwork Mod. Instead, I flashed TWRP for the I9500 and it allows me to execute
Code:
adb shell su -c ...

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes