[android] adb remount permission denied, but able to access super user in shell -- android

so, i'm trying to push some files to /system on android device (zte) I've rooted, connected with ADB,

adb remount -> I get permission denied adb shell su -> I'm able to access shell and create folders etc and edit filesystem

(but in shell I can't copy a file from my computer to device)

Any help please

This question is related to android shell permissions adb root

The answer is


In case anyone has the same problem in the future:

$ adb shell
$ su
# mount -o rw,remount /system

Both adb remount and adb root don't work on a production build without altering ro.secure, but you can still remount /system by opening a shell, asking for root permissions and typing the mount command.


@echo off
color 0B
echo =============================================================================
echo.
echo              ClockworkMod Recovery for SAMSUNG GALAXY SIII E210L
echo.
echo                  ClockworkMod Recovery (v6.0.1.2 Touch)
echo.
echo     ¡ô¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¡ô
echo     ¨U                                                                  ¨U
echo     ¨U SAMSUNG GALAXY SIII E210L                                        ¨U
echo     ¡ô¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¨T¡ô
echo.
echo  1) (Settings\Developer options©¥ USB debugging)
echo.
echo  2) CWM SAMSUNG GALAXY SIII E210L 
echo.
echo  3) THANK!!!!!!
echo.
echo =============================================================================
echo                           ARE YOU READY? GO! ¡·¡·¡·
@pause
echo.
echo adb...
adb.exe kill-server
adb.exe wait-for-device
echo wiat¸!
echo.
echo conect...
adb.exe push IMG /data/local/tmp/
adb.exe shell su -c "dd if=/data/local/tmp/GANGSTAR-VEGAS-1.3.0-APK-Andropalace.net.apk of=/mnt/sdcard/Android/GANGSTAR-VEGAS-1.3.0-APK-Andropalace.net.apk
adb.exe shell su -c "rm /data/local/tmp/bootloader.img"
adb.exe shell su -c "rm /data/local/tmp/recovery.img"


echo ===============================================================
echo     ClockworkMod Recovery!
echo.
@pause

you can use:

adb shell su -c "your command here"

only rooted devices with su works.


I rebooted to recovery then

adb root; adb adb remount system; 

worked for me my recovery is twrp v3.5


Some newer builds require the following additional adb commands to be run first

adb root
adb disable-verity
adb reboot

Then

adb root
adb remount

Try with an API lvl 28 emulator (Android 9). I was trying with api lvl 29 and kept getting errors.


emulator -writable-system

For people using an Emulator: Another possibility is that you need to start the emulator with -writable-system. That was the only thing that worked for me when using the standard emulator packaged with android studio with a 4.1 image. Check here: https://stackoverflow.com/a/41332316/4962858


Try

adb root
adb remount

to start the adb demon as root and ensure partitions are mounted in read-write mode (the essential part is adb root). After pushing, revoke root permissions again using:

adb unroot

Examples related to android

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How to implement a simple scenario the OO way My eclipse won't open, i download the bundle pack it keeps saying error log getting " (1) no such column: _id10 " error java doesn't run if structure inside of onclick listener Cannot retrieve string(s) from preferences (settings) strange error in my Animation Drawable how to put image in a bundle and pass it to another activity FragmentActivity to Fragment A failure occurred while executing com.android.build.gradle.internal.tasks

Examples related to shell

Comparing a variable with a string python not working when redirecting from bash script Get first line of a shell command's output How to run shell script file using nodejs? Run bash command on jenkins pipeline Way to create multiline comments in Bash? How to do multiline shell script in Ansible How to check if a file exists in a shell script How to check if an environment variable exists and get its value? Curl to return http status code along with the response docker entrypoint running bash script gets "permission denied"

Examples related to permissions

On npm install: Unhandled rejection Error: EACCES: permission denied Warnings Your Apk Is Using Permissions That Require A Privacy Policy: (android.permission.READ_PHONE_STATE) ActivityCompat.requestPermissions not showing dialog box PostgreSQL: role is not permitted to log in Android 6.0 multiple permissions Storage permission error in Marshmallow Android M Permissions: onRequestPermissionsResult() not being called pip install failing with: OSError: [Errno 13] Permission denied on directory SSH Key: “Permissions 0644 for 'id_rsa.pub' are too open.” on mac changing the owner of folder in linux

Examples related to adb

ADB server version (36) doesn't match this client (39) {Not using Genymotion} ADB device list is empty "unable to locate adb" using Android Studio Run react-native on android emulator Solving "adb server version doesn't match this client" error Adb install failure: INSTALL_CANCELED_BY_USER Session 'app': Error Installing APK Where is adb.exe in windows 10 located? How to debug in Android Studio using adb over WiFi Set adb vendor keys

Examples related to root

SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost' Connect to docker container as user other than root MySQL user DB does not have password columns - Installing MySQL on OSX vagrant login as root by default adb shell su works but adb root does not Android: adbd cannot run as root in production builds How to get domain root url in Laravel 4? Import Certificate to Trusted Root but not to Personal [Command Line] How to check if running as root in a bash script Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?