FORUMS

Huawei To Sell Honor Smartphones Via Indian Retail Outlets

World’s fourth largest smartphone maker Huawei plans to now sell its … more

Sunday Debate: Are Smaller Bezels Better or Worth It?

Bezels have been getting smaller and smaller as the years go by, and while devices … more

LG G4 First Impressions and Unboxing – XDA TV

The latest in LG’s signature line of “G phones” has been released. … more

Galaxy S6 Weekly Shooting Challenge

Over in our forums this weekend, XDA Forum member DevonSloan has started a thread for talented … more
Post Reply Subscribe to Thread Email Thread

[Q] CWM ADB Shell All Commands Permission Denied

10th June 2014, 06:43 PM |#1  
OP Junior Member
Thanks Meter: 0
 
More
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, 09:43 PM |#2  
Senior Member
Flag Amsterdam
Thanks Meter: 416
 
More
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, 10:07 PM |#3  
OP Junior Member
Thanks Meter: 0
 
More
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, 09:34 AM |#4  
Senior Member
Flag Amsterdam
Thanks Meter: 416
 
More
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, 03:03 PM |#5  
OP Junior Member
Thanks Meter: 0
 
More
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, 04:38 PM |#6  
Senior Member
Flag Amsterdam
Thanks Meter: 416
 
More
nvm
Last edited by Lennyz1988; 11th June 2014 at 04:46 PM.
12th June 2014, 06:42 PM |#7  
OP Junior Member
Thanks Meter: 0
 
More
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 07:55 PM.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes