[Q] ADB Permission Denied - G2 Q&A, Help & Troubleshooting

I'm trying to follow this thread (http://forum.xda-developers.com/showthread.php?t=2515141) to get IR working on my MIUI 5.5.8 ROM. I have root permissions (SuperSU) and I have adb shell granted root permissions on SuperSU.
I'm trying to run this part:
adb root
adb shell "mkdir -p /data/local/userinit.d"
But that's what I get:
C:\Users\Leandro\Downloads\platform-tools>adb devices
List of devices attached
06902d4f16cf0d35 device
C:\Users\Leandro\Downloads\platform-tools>adb root
restarting adbd as root
C:\Users\Leandro\Downloads\platform-tools>adb shell "mkdir -p /data/local/userin
it.d
mkdir failed for /data/local/userinit.d/, Permission denied
What could I do to solve this?
Thank you.

Have you tried it like this
adb devices
adb shell
su
mkdir -p /data/local/userinit.d

Art Vanderlay said:
Have you tried it like this
adb devices
adb shell
su
mkdir -p /data/local/userinit.d
Click to expand...
Click to collapse
I'm trying to push TWRP and Loki flash tool via ADB but I'm getting permission denied. Do you know what I can to gain access?
It says root access when in download mode but I don't have root while OS is running. Does this mean my phone is semi rooted? What should I do now?

y300owner said:
I'm trying to push TWRP and Loki flash tool via ADB but I'm getting permission denied. Do you know what I can to gain access?
It says root access when in download mode but I don't have root while OS is running. Does this mean my phone is semi rooted? What should I do now?
Click to expand...
Click to collapse
What android version are you on?

Art Vanderlay said:
What android version are you on?
Click to expand...
Click to collapse
Was on Stock Verizon VS980_27A 4.4.2. Tried many ways. Didn't work. Stumproot.apk fixed the problem.

Related

[SOLVED]Just flashed latest 0.3 ROM - no root?

EDIT: SOLVED
I just flashed the latest ROM but when I enable debugging and type "adb shell" im getting "$" instead of "#"...? I'm trying to remount the filesystem "mount -o rw,remount /dev/block/mtdblock3 /system" but am getting access denied because of this.
Do I need to try reflashing?
you need to adb shell then type "su" to get to a root shell i believe
EDIT: SOLVED! I was too blind to notice i had to allow the root request on my phone. thanks!
after i type 'adb shell' and get "$" everything i type next just gets echoed
ex:
Code:
$ su
su
test
test
etc
gohamstergo said:
EDIT: SOLVED! I was too blind to notice i had to allow the root request on my phone. thanks!
after i type 'adb shell' and get "$" everything i type next just gets echoed
ex:
Code:
$ su
su
test
test
etc
Click to expand...
Click to collapse
Usually if you have root, adb shell will automatically grant root access...the notification on the phone is a new one to me...
xsnipuhx said:
Usually if you have root, adb shell will automatically grant root access...the notification on the phone is a new one to me...
Click to expand...
Click to collapse
It seems to be caused by the "Superuser Permissions" app, included with the ROM

how do i root now that i have gingerbread?

I have a Verizon tab that was rooted. I updated to gingerbread which removed root. Is there a way to root now that I have gingerbread?
Thanks!
you may try SuperOneClick 2.2 with ZergRush...
Thanks. I'll give it a shot.
Soundchasr said:
Thanks. I'll give it a shot.
Click to expand...
Click to collapse
Did it work?
Haven't had a chance yet.
I tried it hangs on Step 7.. Does not root.
Sent from my SCH-I800 using xda premium
receptr said:
I tried it hangs on Step 7.. Does not root.
Sent from my SCH-I800 using xda premium
Click to expand...
Click to collapse
I've had the same problem. I can't seem to find a method that works; this Tab isn't getting much attention at all anymore.
Telling me, I have gingerbread on mine and it does nothing but forceclose crap all over the place
Lakilaulea said:
I've had the same problem. I can't seem to find a method that works; this Tab isn't getting much attention at all anymore.
Click to expand...
Click to collapse
I was able to get mine rooted by using the kernel from Galaxy Cubed 3 ROM. Downloaded the whole ROM and flashed only the kernel in heimdall. Then I used adb to push the correct files to the system and fixed permissions and rebooted. Worked great.
UPDATE:
If people want to know the adb commands I used, here they are:
adb push busybox /data/local/tmp/.
adb shell "chmod 755 /data/local/tmp/busybox"
adb shell "/data/local/tmp/busybox mount -o remount,rw /system"
adb shell "dd if=/data/local/tmp/busybox of=/system/xbin/busybox"
adb shell "chown root.shell /system/xbin/busybox"
adb shell "chmod 04755 /system/xbin/busybox"
adb shell "/system/xbin/busybox --install -s /system/xbin"
adb shell "rm -r /data/local/tmp/busybox"
adb push su /system/bin/su
adb shell "chown root.shell /system/bin/su"
adb shell "chmod 06755 /system/bin/su"
adb shell "rm /system/xbin/su"
adb shell "ln -s /system/bin/su /system/xbin/su"
adb push Superuser.apk /system/app/.
adb shell "cd /data/local/tmp/; rm *"
You can copy and paste these commands to a bat file and run it in a command prompt window. These were taken from a script used to root devices.
Here are links for the files you need. They are:
su
superuser.apk
busybox
They need to be placed in the same directory that you run the adb commands from.
SECOND UPDATE:
Rather than go through all this, go here:
http://forum.xda-developers.com/showthread.php?p=19678785
This is dsb9938's plain stock EI04 VZW ROM that is pre-rooted. Just flash in Heimdall and you are good to go. As long as you only wipe cache and dalvik, all your apps should stay intact.
Gingerbreak.apk should do the trick. Worked on my P1010
chris_toshiba said:
Gingerbreak.apk should do the trick. Worked on my P1010
Click to expand...
Click to collapse
It did not work on my VZW Tab. Someone said it is because it only works on 2.3.3 and older gingerbread and we have 2.3.5.
BTW, look at my earlier post (second update) to get a really easy way to have rooted stock 2.3.5 VZW Tab.

[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
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.
Lennyz1988 said:
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.
Click to expand...
Click to collapse
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"
I am not that an expert of adb, but couldn't that be caused by the fact that you are not rooted?
Lennyz1988 said:
I am not that an expert of adb, but couldn't that be caused by the fact that you are not rooted?
Click to expand...
Click to collapse
You're conflating the environments. CWMis inherently rooted; when in recovery, Android is never booted. I have execute permission in Android, not in CWM.
nvm
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 ...

root for 306SH

So I'll update randomly...
boot.img and recovery.img -> https://drive.google.com/file/d/0B5QYBzdG6RuyZy1TSHc2VDVhY2M/view?usp=sharing
temp root:
Code:
adb push root /data/local/tmp
adb push wpoff /data/local/tmp
adb push fbunlock /data/local/tmp
adb push recovery.img /data/local/tmp
adb push boot.img /data/local/tmp
adb shell
$ [COLOR="Red"]chmod 755 /data/local/tmp/root[/COLOR]
$ [COLOR="Red"]chmod 755 /data/local/tmp/wpoff[/COLOR]
$ [COLOR="Red"]chmod 755 /data/local/tmp/fbunlock[/COLOR]
$ /data/local/tmp/root
...
#
defeat WP:
Code:
# /data/local/tmp/wpoff --unprotect-all
check WP status(optional):
Code:
# /data/local/tmp/wpoff --dump
If you see it's all zeroes there it means good, or if there are many 5555 it means NG.
unlock bootloader:
Code:
# /data/local/tmp/fbunlock
install TWRP and patched boot:
Code:
# dd if=/data/local/tmp/recovery.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
# dd if=/data/local/tmp/boot.img of=/dev/block/platform/msm_sdcc.1/by-name/boot
install SuperSU:
Code:
FLASH SUPERSU LIKE OLD DAYS
Why patch boot?
Cos MIYABI stops ptrace, some apps depends on it won't work properly.
Chinese here:
禁止转载到国内论坛,禁止用于商业用途。日版不会有的。
Note:
a. Remember to rename recovery.00X.zip to recovery.zip.00X before unzipping!
b. If you don't flash boot.img before install SuperSU, you will end up in boot loop. To restore, delete /system/xbin/daemonsu.
Attachments will be uploaded soon.
Hi tewilove, many thanks for publishing this. Amazing work! And a big time saver
tewilove tnx allot !!
hey some one know how can i put su inside in system and then to use SuperSU ?
thank you a lot
thanks but i can not use root app and super su can not install bin su
thank you for your help
tewilove said:
Tested with a 306SH with SW version S4081.
How to:
https://youtu.be/UJs7ruckGgc
This is v1, since the shell code has to be improved yet(WIP).
It only obtains temp root with kernel context. The left things are changing to init context, disable mmc_protect_part, disable miyabi LSM.
There might be v2, which solves all above, if I have time.
And it also works with many other devices.
For example, 305SH, MI4C, SH-01G.
If it keeps crashing, it should be my hard coded offsets.
PS: Please don't reshare this thread.
PS: Chinese: 请不要转载到贴吧,论坛,谢谢。
Click to expand...
Click to collapse
thank you for your help 谢谢某因幡分享
Please I'd like to know how you did that.could you be more clear, a step by step maybe?
Sent from my D6616 using XDA Free mobile app
salmanaman said:
Please I'd like to know how you did that.could you be more clear, a step by step maybe?
Sent from my D6616 using XDA Free mobile app
Click to expand...
Click to collapse
you can watch the video that tewilove make for us .. but we need to wait when some one unlock protect bcs after you restart phone root will disappear..
tewilove said:
Tested with a 306SH with SW version S4081.
Click to expand...
Click to collapse
How can I know that I got the temporary root? Is this step in the input ID?
all step working on my 305sh like youtube video but supersu not working and root checker say me no rooted
soudara said:
all step working on my 305sh like youtube video but supersu not working and root checker say me no rooted
Click to expand...
Click to collapse
yes we know about this .. i try to remount system ( with this command : busybox mount -o remount,rw /system) to get permission but my device is restart when i try .. maybe its from this write protection that @tewilove tell us .. if he can tell us how we can install su in system if its possible for now .. ?
ok so for the moment is useless ?
soudara said:
all step working on my 305sh like youtube video but supersu not working and root checker say me no rooted
Click to expand...
Click to collapse
me too?maybe just kernel root??
---------- Post added at 12:48 PM ---------- Previous post was at 12:31 PM ----------
loonbg said:
yes we know about this .. i try to remount system ( with this command : busybox mount -o remount,rw /system) to get permission but my device is restart when i try .. maybe its from this write protection that tewilove tell us .. if he can tell us how we can install su in system if its possible for now .. ?
Click to expand...
Click to collapse
yea?rootxplore and xposed said no root?
I don't think that folks are understanding what "temp" root means. This solution allows you to achieve root for the current shell session. This does not install the additional binaries to allow other applications to use root access.
With that being said, I am wondering if we can use this temporary elevated access to correct the vulnerability outlined in CVE-2015-1474 affecting /system/lib/libui.so that Sharp has neglected to address in previous OTA updates. The only "corrected" libui.so that I have been able to locate was compiled for v5.0.1 so I am afraid that file would not be compatible with this earlier version of Android on the 306SH. I am not really savvy with in depth programming to be able to fully investigate this and develop a viable solution... anyone who would be able to point me in the right direction would receive many thanks. :banghead:
My apologies if this should have been posted in a separate thread.
awesom! it worked in my 306sh with root permission acquired in shell.
can you use root app and install super su ?
Write protection is keeping us from remounting /system as rw. This prevents us from doing anything that would have any type of impact on the current situation. I want to experiment with attempting to mount partitions with the device powered off... but my device is encrypted so I am unable to access the shell with device off until I perform a factory reset. I am planning on doing that tonight so hopefully I will be able to report back with more information soon.
Sent from my 306SH
soudara said:
can you use root app and install super su ?
Click to expand...
Click to collapse
No. We are working on it though.
On another note, I can't get this temp root to work.
Video of what happens is linked. (too large to attach)
https://mega.co.nz/#!blNTjbhS!p2ljioY_43xlWkpu3EWpj8LvfMVP5eushZT23KLPASk
TechInMD said:
Write protection is keeping us from remounting /system as rw.
Click to expand...
Click to collapse
So I assume, from the quoted text, you have tried mounting /system as rw while in the temp root shell session?
Yes. I tried using the mount command both directly from the root shell prompt plus I tried using busybox to mount also. There seem to be slight variations between them. Also, not sure if it is relevant but I attempted it both through adb and in terminal on the device. I can get to the root prompt but not further.
Sent from my 306SH

Phone boot directly in recovery, but boots normally in bootloader mode.

Recently my phone got back from warranty with a retail board (don't know if it's relevant), so I had to do all the unlocking and rooting things. but all the times that I changed custom roms my phone only booted if I went to bootloader and pressed start, any other way it boots directly into rcovery mode.
actualy using Ressurection Remix (Pie) no root.
redejcr said:
Recently my phone got back from warranty with a retail board (don't know if it's relevant), so I had to do all the unlocking and rooting things. but all the times that I changed custom roms my phone only booted if I went to bootloader and pressed start, any other way it boots directly into rcovery mode.
actualy using Ressurection Remix (Pie) no root.
Click to expand...
Click to collapse
In ADB shell type
Code:
adb shell dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
[email protected] said:
In ADB shell type
Code:
adb shell dd if=/dev/zero of=/dev/block/platform/soc/7824900.sdhci/by-name/misc
Click to expand...
Click to collapse
Only shows permission denied even if adb interface was authorized.
redejcr said:
Only shows permission denied even if adb interface was authorized.
Click to expand...
Click to collapse
You can root it, and get permission, or.... add "sudo", or "su" command to beginning of command shell. Haven't done it without root, but that should get you root permission for bash shell. Something like this
Code:
adb shell su -c "your command here"
[email protected] said:
You can root it, and get permission, or.... add "sudo", or "su" command to beginning of command shell. Haven't done it without root, but that should get you root permission for bash shell. Something like this
Code:
adb shell su -c "your command here"
Click to expand...
Click to collapse
Yeap, that worked, thanks a lot. You saved me from this headache.
The only diference is that I had to root AND add su to the command.

Categories

Resources