0

I absolutely can't push to /system/app/ using adb on a rooted S4 with rw remounted filesystem.

adb says: Read-only file system

Mounts:

/dev/block/platform/msm_sdcc.1/by-name/system /system ext4 rw,seclabel,relatime,data=ordered 0 0

/dev/block/platform/msm_sdcc.1/by-name/userdata /data ext4 rw,seclabel,relatime,discard,journal_checksum,journal_async_commit,noauto_da_alloc,data=ordered 0 0

Nothing helps! What is wrong? I can't use adb root, because it gives me:

adbd cannot run as root in production builds

I have following permissions:

drwxrwxrwx root     root              1971-01-17 12:49 /system
drwxrwxrwx root     root              1971-01-17 12:49 /system/app
drwxrwxrwx root     system            2014-10-28 14:15 /data
drwxrwxrwx shell    system            2014-10-28 15:02 /data/app

Now I just installed Cyanogenmod, but it doesn t work either.

3

If the ADB daemon is not running in root mode, you cannot push to /system/app even with /system mounted read-write, due to not be given the permission. As you correctly pointed out, adb root is no option on non-development-devices ("adbd cannot run as root in production builds").

To fix this up, take a look at chainfire's adb Insecure. This app requires root (a condition your device obviously meets), and (temporarily) patches the ADB daemon to run in root mode. So with "insecure mode" enabled, you should be able to push to /system/app.

Alternatively, push to e.g. /data/local, then login to the device with adb shell, execute su to switch to root-mode, and move the files (mv /data/local/whatever.apk /system/app) while /system is mounted read-write.

1

See the following instructions:

  1. Push the .apk to SD card using:

    adb push (filename) /sdcard/
    
  2. Install Terminal Emulator for Android or Connectbot from Play Store. (You may write your own too.)

  3. Launch the terminal and type su;

  4. If superuser permission is granted then mount /system for read/write by the command:

    mount -o remount,rw /system
    
  5. Copy your .apk to /system/app using:

    cp /sdcard/(filename) /system/app/
    
  6. Make /system read only:

    mount -o remount,ro /system
    

And you are done!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.