Hi all,
I'm rooted and running Cyanogenmod 10.2.0. I'm trying to access some files on my device through ADB that require root access. I can change to the directory but when I attempt to list the contents of the directory I get a "permission denied" error.
I did enable Root access for "Apps and ADB" in the developer options on the phone.
Any ideas what's going wrong or (most likely) what I'm doing wrong?
TIA!
Sailing_Nut said:
Hi all,
I'm rooted and running Cyanogenmod 10.2.0. I'm trying to access some files on my device through ADB that require root access. I can change to the directory but when I attempt to list the contents of the directory
Click to expand...
Click to collapse
Will you please provide which command did you execute in cmd?
Please write it in same syntax as in adb
Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands
Here are the commands I executed
Code:
adb shell
CD data/data/com.whatabou.pixeldungeon/files/
ls
The ls is where I get the error. It does change to the directory but it won't list the files. I have verified that I can see the files with root explorer.
Sailing_Nut said:
Here are the commands I executed
Code:
adb shell
CD data/data/com.whatabou.pixeldungeon/files/
ls
The ls is where I get the error. It does change to the directory but it won't list the files. I have verified that I can see the files with root explorer.
Click to expand...
Click to collapse
I have 2 answers. First - Go to adb
Code:
adb start-server
adb devices
adb shell
su
cd data/data/com.whatabou.pixeldungeon/files/
ls
Don't forget "su" command
When you give "su" command (depending on your phone) screen shows toast message or Superuser access for shell. In latter case give access.
Second- if above doesn't help
Then this will help to pinpoint problem.
Install terminal emulator from Play Store. Open and give Superuser access.
Code:
su
cd data/ /data/com.whatabou.pixeldungeon/files/
ls
Don't forget "su" command.
If 2nd method works then there is a problem with adb. If second method doesn't work then problem in phone.
Press thanks if helped
Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands
Thanks for the response.
I KNOW the problem was that I forgot the su. Stupid me! I was assuming that since I was rooted that the shell was automatically elevated.
But now I have a different problem. I'm unable to use the original PC that I was working with and I've switched to another. Now I can't seem to get ADB to connect to my device. As first it showed no devices when I did the devices command. I realized it was likley because I didn't have the Samsung drivers installed, so I installed those and now I see the phone but it shows offline.
Any ideas what might be going wrong now?
I'm going to do a bunch of Googling to try to figure it out, but if I'm not successful maybe someone here will have an answer.
Thanks tons!
OK all solved!
I'm not sure what along the way I did that fixed my device offline problem. (It may just be that I never saw the RSA fingerprint notification on the phone the first bunch of times.)
The su took care of not being able to see the files when executing ls.
Thanks @hnkotnis
Sailing_Nut said:
OK all solved!
I'm not sure what along the way I did that fixed my device offline problem. (It may just be that I never saw the RSA fingerprint notification on the phone the first bunch of times.)
The su took care of not being able to see the files when executing ls.
Thanks @hnkotnis
Click to expand...
Click to collapse
Glad to help you.
I also had the adb saying offline problem. First it wouldn't show device. Then after Computer and phone reboot, it showed offline. I reinstalled Samsung adb drivers. It said I already have drivers. I said yes still install and rebooted. Problem solved. It occurred once again, but was repaired automatically.
Sent from my GT-S5360 Gadget of Mass Destruction using xda-app
Using CWM........Busybox Commands........No I use my hands
Related
ok so on most roms this happens. i need a SU request but my phone freezes obn a black screen and on the top in gray it says SU request. i wait paciently and maybe 1-2 mins later is asks to FC because its not responding. is there a fix or what am i doing wrong. usb debugging is on and so is install nonmarket apps idk wtf im doing wrong or if somthing is just not working. any input??
I've heard su is not working properly until you activate it once via adb. In your teriminal (cmd or similar)
Code:
adb shell
$su
You should get a working super user request after which all other su requests should work fine.
Marisa said:
I've heard su is not working properly until you activate it once via adb. In your teriminal (cmd or similar)
Code:
adb shell
$su
You should get a working super user request after which all other su requests should work fine.
Click to expand...
Click to collapse
yes same thing happens to me
plug in your phone
goto your android sdk tools
and input adb shell
now go back to your phone and try it while still plugged
thats what i have been doing...
the same thing is happening for me and the instructions of simply input adb shell into terminal arent helping really. if someone could tell me exactly where to be aiming the command prompt and what the exact commands are in order to fix this I would greatly appreciate it.
WalkingTaco said:
the same thing is happening for me and the instructions of simply input adb shell into terminal arent helping really. if someone could tell me exactly where to be aiming the command prompt and what the exact commands are in order to fix this I would greatly appreciate it.
Click to expand...
Click to collapse
Are you getting the same crshes and things, but when you do the adb shell # pops up instead of $?
whenever i do adb shell I get #, so that means SU is already activated, but it's actually not on my phone, so i have no idea what's going on and no one seems to know how to fix it.
no. my Su permissions always force close after a minute of black screen. there is a fix posted above but my nerd level is not high enough to.infer the rest
Sent from my Eris using the XDA mobile application powered by Tapatalk
I don't know the exact command prompt setup, I'm running linux. However, when you originally rooted your phone you used the Android SDK correct?
With your phone plugged in, and USB Debugging enabled on your phone (Settings -> Applications -> Development -> USB Debugging) Open command prompt and get to the tools directory you used during rooting, I don't know where you installed it, so I cannot guide you through that part. If you used Ivan's guide http://forum.xda-developers.com/showthread.php?t=647707 it's probably best to refresh yourself there.
Once you've found your SDK /tools/ in command prompt, it should be as easy as running the code I mentioned earlier
Code:
adb shell
$su
in the command prompt.
The superuser prompt should show up on your phone, tell it to allow it and it should work without fail until you flash a new ROM that has the bug.
thanks very much. I used Ivans guide. I rooted it yesterday when o got my replacement from Verizon in store. I had been using the 2.1 leak on my old one and complained in store for thirty seconds. they didn't even look at it gave me a replacement in ten minutes
Sent from my Eris using the XDA mobile application powered by Tapatalk
Rock out thanks for the Super Help
Ive pushed all kinds of other stuff, I did do the add system enviromental variable to XP so this could be my issue, though like i said its worked for other things ...
ERROR I GET>
CANNOT STAT
adb push stock-hc-flyer-hboot_1.11.0006.nb0 / && adb shell dd if=/stock-hc-flyer-hboot_1.11.0006.nb0 of=/dev/block/mmcblk0p18
NO SUCH FILE OR DIRECTORY
a thourough explanation or a cut and pastable pointing my adb to this file, its in the root, the variable is to the root C also, so....
PLEASE HELP, to get me past this 10+hours of hell
May be a connection between your computer and phone issue. I have this error when I wanted to root my nexus s. Try different driver for your flyer.
Accidentally sent from my Google Nexus S using XDA Premium
Make sure the adb works via "adb devices" and "adb shell". If it does not work you can try "adb kill-server" first.
I don't think you can write (push) to "/" without "adb remount". Not sure if it is a good idea to write to root directory.
Alternatively, you can use the storage in /data/local/tmp, it is always writable.
I have my phone connected to my laptop via the USB cable and the ADB is able to identify the device. When i run adb devices it returns the phone in the list of connected devices. Running the command adb shell now gives an error stating:
reloc_library cannot locate 'fdatasync'
Infact running any command on the terminal emulator installed on my phone also returns me the same error.
Has anyone faced the same problem or has any pointers to a solution to it?
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
anuj142003 said:
I have my phone connected to my laptop via the USB cable and the ADB is able to identify the device. When i run adb devices it returns the phone in the list of connected devices. Running the command adb shell now gives an error stating:
reloc_library cannot locate 'fdatasync'
Infact running any command on the terminal emulator installed on my phone also returns me the same error.
Has anyone faced the same problem or has any pointers to a solution to it?
Click to expand...
Click to collapse
Do you have busybox installed? It seems as if the /bin directory doesnt exist or contain the proper files. Thats about all i got as of now
I have not been able to install busybox on my system. I have tried all possible versions and all possible ways of getting it installed but nothing works.
whats meant by "nothing works"? in fact you clearly installed something on your phone so it cannot start a shell anymore, did you reboot after you played around?
I have not been able to install busybox on my system. I have tried all possible versions and all possible ways of getting it installed but nothing works.
Click to expand...
Click to collapse
Well that is more than likely the issue, are you rooted? And you've tried the busybox installer from the market?
Sent from my GT-I9100 using Tapatalk
When i say "nothing works" what i mean is i have tried various busybox installers on the market and none of them seemed to work. Everytime i get the error stating that BusyBox could not be installed.
I have tried rebooting multiple times as well.
elesbb said:
Well that is more than likely the issue, are you rooted? And you've tried the busybox installer from the market?
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
Yes, my phone is rooted and yes i have tried the busybox installers from the market.
What exactly is shell.... i have root permissions on my phone and every time I turn it on all the apps that need root permissions tell me with a pop up message.... then a strange app called shell pops up and starts repeting the process of asking for root permissions.... what is shell? Is it only in my phone??
Sent from my GT-S5310 using XDA Premium 4 mobile app
leodani said:
What exactly is shell.... i have root permissions on my phone and every time I turn it on all the apps that need root permissions tell me with a pop up message.... then a strange app called shell pops up and starts repeting the process of asking for root permissions.... what is shell? Is it only in my phone??
Sent from my GT-S5310 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Shell is nothing but terminal (it is Linux command prompt).
Android is built on Linux kernel. So it includes terminal thing and it is present on every android.
You can use Terminal Emulator from Play Store or "adb shell" command from adb to get access to terminal and execute commands. (Most of the Linux commands work if you have busybox).
Speaking about toast messages of root access-
If you have used any Linux then you will see in Linux you achieve "root" rights (much similar to administrator in Windows) by executing "su" command in terminal to get elevated administrative rights. Same command is executed by root apps to get root access and when they get access toast message pops up.
You can also get "root" access in terminal/adb shell by typing "su" command (required when you use "ls", "dd" and many other commands where you cannot normally access).
Sent from my GT-S5360 Gadget of Mass Destruction by xda-app
using CWM........Busybox commands........ No I use my hands
Hi
First of all, sorry for my bad english.
It has been several hours that i'm trying to find a solution to my problem.
I want to wake my nvidia shield via adb command throught network.
I installed android tools on my raspberry pi, and when i connect to it via command line everything work, i can wake up the Shield.
But when i put my command line in a bash script
Code:
#!/bin/bash
adb kill-server
adb start-server
adb connect 192.168.1.38:5555
adb shell input keyevent KEYCODE_WAKEUP
adb kill-server
i have this error :
Code:
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I dont know why, when i am execute the command line in a bash script it can't find the rsa key, who is there and should be used.
Any ideas
Thanks in advance.
darkouz said:
Hi
First of all, sorry for my bad english.
It has been several hours that i'm trying to find a solution to my problem.
I want to wake my nvidia shield via adb command throught network.
I installed android tools on my raspberry pi, and when i connect to it via command line everything work, i can wake up the Shield.
But when i put my command line in a bash script
Code:
#!/bin/bash
adb kill-server
adb start-server
adb connect 192.168.1.38:5555
adb shell input keyevent KEYCODE_WAKEUP
adb kill-server
i have this error :
Code:
error: device unauthorized.
This adb server's $ADB_VENDOR_KEYS is not set
Try 'adb kill-server' if that seems wrong.
Otherwise check for a confirmation dialog on your device.
I dont know why, when i am execute the command line in a bash script it can't find the rsa key, who is there and should be used.
Any ideas
Thanks in advance.
Click to expand...
Click to collapse
Normally on Windows the first time you turn on usb debugging it will pop up and ask you to accept the adb key. This is what is preventing you, I haven't had to resolve this in Linux, but essentially you need to go to C:\\Users\You\.android\ (in Windows, path will be different in Linux) and copy the file adbkey. Now you need to move it to data/misc/adb/
This will most likely require root or TWRP. Good luck, my friend.
Sent from my KYOCERA-C6745 using Tapatalk
Hi
Thanks for your quick response.
I couldn't make the connection via USB my adb tells me that there is no emulated device. But it work with network And yeah the first time I made the connection, the authorization pop up appeared on my shield. I checked, always authorized this device.
I have the key in /root/.android on my raspberry pi
I don't think I have the access to the /data/ folder in my shield.
But what I don't understand is why when I execute the command in a terminal like that, it work and when it's from the bash script it won't work anymore
darkouz said:
Hi
Thanks for your quick response.
I couldn't make the connection via USB my adb tells me that there is no emulated device. But it work with network And yeah the first time I made the connection, the authorization pop up appeared on my shield. I checked, always authorized this device.
I have the key in /root/.android on my raspberry pi
I don't think I have the access to the /data/ folder in my shield.
But what I don't understand is why when I execute the command in a terminal like that, it work and when it's from the bash script it won't work anymore
Click to expand...
Click to collapse
Option B would be to dump your boot.img and use Assayed's kitchen to add insecure kernel and adb direct root, then the adbkey doesn't need to be on the device.
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
Option B would be to dump your boot.img and use Assayed's kitchen to add insecure kernel and adb direct root, then the adbkey doesn't need to be on the device.
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
Yeah as you said in your previous post, i think the solution is to root the nvidia shield cause the rsa key doesny copy itself on the device.
But would you able to explain to me why if i execute those command individually in the terminal it works.
But if i put them all in a bash script that i execute it doesnt work anymore, what's the difference between those two procedure ?
darkouz said:
Yeah as you said in your previous post, i think the solution is to root the nvidia shield cause the rsa key doesny copy itself on the device.
But would you able to explain to me why if i execute those command individually in the terminal it works.
But if i put them all in a bash script that i execute it doesnt work anymore, what's the difference between those two procedure ?
Click to expand...
Click to collapse
How are you executing the script? There's some (hopefully) helpful info here.
https://community.spiceworks.com/topic/433656-command-not-running-in-batch-but-will-run-in-cmd
Sent from my KYOCERA-C6745 using Tapatalk
RealWelder said:
How are you executing the script? There's some (hopefully) helpful info here.
https://community.spiceworks.com/topic/433656-command-not-running-in-batch-but-will-run-in-cmd
Sent from my KYOCERA-C6745 using Tapatalk
Click to expand...
Click to collapse
i m doing : sh script.sh
i m gonna read that, thanks
I found the solution.
I don't really understand why, but adding
Code:
sleep 1
before
Code:
adb shell input keyevent KEYCODE_BACK
resolved the problem, maybe the script execution was to fast for adb to adjust, dont know.
All i know is, that works
darkouz said:
I found the solution.
I don't really understand why, but adding
Code:
sleep 1
before
Code:
adb shell input keyevent KEYCODE_BACK
resolved the problem, maybe the script execution was to fast for adb to adjust, dont know.
All i know is, that works
Click to expand...
Click to collapse
Glad you got it.
Sent from my KYOCERA-C6745 using Tapatalk
sudo rm -rf /home/(username)/.android
that worked with my kde neon machine