1

I ran the following command and the phone automatically rebooted after copying. Why? Was it because the so file was in use?

$ adb shell 'mount -o rw,remount /system && cp /sdcard/libfoo.so /system/lib'

My phone is rooted and enters as root when issued the adb shell command. My Android version is 5.1.

I also tried the following commands and the phone still restarted.

$ adb remount
remount succeeded
$ adb shell 'cp /sdcard/libfoo.so /system/lib'
  • What's your Android version and model ? ... sometimes it can be caused by a protection measure that protects the system partition from modifications, it's now why new root programs use "systemless root". You still have the ability to modify some aspects of the system, but changing files in specific directories can cause problems, this is because systemless root is still in the development stage and has many issue's still. – Zillinium Nov 17 '18 at 20:42
1

If you don't want the phone to reboot, push the so file directly to the system/lib folder. Don't make the sdcard folder an intermediary. So you do:

$ adb remount
$ adb push libfoo.so /system/lib

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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