Adb shell operation "not allowed" for each command

I recently made a factory reset of my Android phone. Before reset, I was able to install applications through adb install . The phone was not rooted.

After factory reset, I basically get “Operation not allowed” for almost every command in the adb shell (including those that don't exist):

 $ install install: permission denied $ push push: permission denied $ remount remount: permission denied $ su su: permission denied $ kmmsaldfmaldskfmlasdf kmmsaldfmaldskfmlasdf: permission denied $ 

Most PATH is not readable to me (except for / system / bin and / system / xbin):

 $ echo $PATH /sbin:/vendor/bin:/system/sbin:/system/bin:/system/xbin $ ls /sbin opendir failed, Permission denied $ ls /vendor/bin /vendor/bin: No such file or directory $ ls /system/sbin/ /system/sbin/: No such file or directory 

If I run adb root :

 $ adb root adbd cannot run as root in production builds 

From my search (which has already robbed me of more time than necessary), some pointers to default.prop:

 $ cat default.prop # # ADDITIONAL_DEFAULT_PROPERTIES # ro.secure=1 ro.allow.mock.location=0 ro.debuggable=0 persist.service.adb.enable=1 $ 

But I do not have write access to default.prop:

 $ ls -l default.prop -rw-r--r-- root root 118 1969-12-31 19:00 default.prop $ 

I can't remount either. I was able to successfully use adb on an unmanaged device, why is there so much sorrow now? Has anyone encountered this problem? My own phone is practically unsuitable for me, and, of course, I can not do anything.

Trying to remount as rw:

 $ mount rootfs / rootfs ro,relatime 0 0 tmpfs /dev tmpfs rw,relatime,mode=755 0 0 devpts /dev/pts devpts rw,relatime,mode=600 0 0 proc /proc proc rw,relatime 0 0 sysfs /sys sysfs rw,relatime 0 0 tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0 tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0 /dev/stl9 /system rfs ro,relatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=cp437 0 0 /dev/stl10 /cache rfs rw,nosuid,nodev,relatime,vfat,llw,gid/uid/rwx,iocharset=cp437 0 0 /dev/stl6 /mnt/.lfs j4fs rw,relatime 0 0 /dev/stl11 /data rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=cp437 0 0 $ mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 / mount: Operation not permitted 

My phone is a Samsung Galaxy Y, which can make a difference

+6
source share
8 answers

You need to issue commands such as install from the PC command line:

 C:\> adb install ... 

not inside the adb shell. If this does not work, you may need to run

 adb remount 

and / or restart the phone and / or reinstall the phone driver. See this thread for more details.

I found that a path in an adb shell session can contain all kinds of non-existent directories on it. I don’t know why this is so, but usually it will not ruin anything.

+3
source

Assuming you haven't put a new version of Android on your phone, I assume that your phone is no longer in developer mode.

Go to the "Settings" section. Scroll down until you see the system title. Under it you should see several options. If the developer is not one of them, click "About phone", then scroll down to "Build number". Click Build 7 times. This should return developer mode.

+1
source

Try to execute these commands from recovery, the most recent recoveries are debugged = 1 others then decompile the kernel and change ro.debuggable = 0 to 1, and this will allow you to remount using adb and allow adb to run as root!

0
source

I may have found a solution for you

I recently upgraded my (root) LGP500 from Froyo (android 2.2.1) to Gingerbeard (android 2.3.3). After that, I found myself in a situation very similar to yours (the same, to be honest). I lost SU authority and was desperate to find a solution to this problem. I was so desperate - I even tried the famous Android 4.2 method , which allows you to set the developer’s settings, for a long time clicking my bad device like crazy. So ... I had exactly the same problem. While on the Internet I found out that the problem was in the Gingerbeard build, I came across some interesting solutions. And, after all the efforts - it took me a while to figure out which way is best - I (finally) had my device with 2.3.3 rooted.

Please note that I share these things for educational purposes only. No crime was committed if you accidentally blocked your device.


Before proceeding, check:

  • You installed the ADB drivers correctly (if not, an error appears with the following text: “could not find an online device, enable USB debugging!”; The solution is to install or reinstall ADB drivers. That you need to install the drivers with the connected device, BUT “USB debugging is disabled.
  • You have the "USB Debugging" and "Allow Layouts" checkboxes selected.

    It is highly recommended that you have a backup to prevent data loss. (At least export your contacts to a .vcf file)

If everything is in order:

  • Install UnlockRoot (you can find Unlock_Root_2.3.0.exe here ) and execute it.
  • Run "root" (you can ignore everything except the "root" button). Select your device from the pop-up menu.
  • Reboot the device (to complete the installation of the SU binary file - you will be prompted in the application if you want to reboot, but you can do it yourself through the adb shell) And voila! your device is rooted this way.
0
source

You must install the SuperSU app from Google Play. This is the only superuser application that correctly enabled root functions on my device (Galaxy S4).

After that, do adb shell and su . If you want to extract the file from the / data strong> directory , you will need to change the permissions of this file (using chmod ). Then it should work!

0
source

Your user capabilities are being lost somewhere. Look at the / proc // status to see a mask of features.

0
source

I had this problem endlessly on my Galaxy S3. When I built my kitchen for Android, I found a way around this.

  • Correct the device if you require permissions
  • Unpack the kernel for your device in default.prop change these values ​​to the appropriate

ro.secure=0 ro.debuggable=1

  1. Compile / repack and execute flash
  2. Enabling USB Debugging
0
source

You can try SUInstaller.

http://theroot.ninja/apks/SUInstaller.apk

Basically configurable su on your phone. This MAY work, from memory I used one click androroot for root samsung y. If this fails, try to boot into recovery and blinking supersu, you can try the samsung galaxy method or build on it, http://www.android.gs/root-samsung-galaxy-s3-with-cwm-recovery-and-supersu /

Good luck.

-1
source

Source: https://habr.com/ru/post/954987/


All Articles