Wearable Apps w/ Andreas Göransson – XDA:DevCon 2014

XDA:DevCon 2014 in Manchester, UK featured quite a few interesting topics as … more

Browse Your Files with Ease using MK Explorer

Google has made quite an effort in perfecting the powerful and multi-faceted OS that we know as … more

How to Fix the Nexus Available Storage Bug – XDA TV

Is your Nexus device only showing half of the available storage as it should? Many … more

Don’t Forget About Birthdays with Birthday Reminder

A person’s birthday is, without a doubt,one of the most important days in his … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] CWM ADB Shell All Commands Permission Denied

OP MitchumMan

10th June 2014, 07:43 PM   |  #1  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: Jun 2014
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
10th June 2014, 10:43 PM   |  #2  
Senior Member
Flag Netherlands
Thanks Meter: 313
 
1,971 posts
Join Date:Joined: May 2009
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.
10th June 2014, 11:07 PM   |  #3  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: Jun 2014
Quote:
Originally Posted by Lennyz1988

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"
11th June 2014, 10:34 AM   |  #4  
Senior Member
Flag Netherlands
Thanks Meter: 313
 
1,971 posts
Join Date:Joined: May 2009
I am not that an expert of adb, but couldn't that be caused by the fact that you are not rooted?
11th June 2014, 04:03 PM   |  #5  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: Jun 2014
Quote:
Originally Posted by Lennyz1988

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.
11th June 2014, 05:38 PM   |  #6  
Senior Member
Flag Netherlands
Thanks Meter: 313
 
1,971 posts
Join Date:Joined: May 2009
nvm
Last edited by Lennyz1988; 11th June 2014 at 05:46 PM.
12th June 2014, 07:42 PM   |  #7  
OP Junior Member
Thanks Meter: 0
 
5 posts
Join Date:Joined: 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 ...
Last edited by MitchumMan; 12th June 2014 at 08:55 PM.

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes