Needle icon indicating copy to clipboard operation
Needle copied to clipboard

HowTo cyanogenmod12.1 remount,rw and push

Open lambdaupb opened this issue 9 years ago • 3 comments

I had to mount -oremount,rw /system before replacing the framework.jar. Furthermore adb push exited with a "permission denied" so i pushed it do my sdcard and moved the jar manually per terminal+su. Maybe this depends on "allow root for apps & debug" but i did not care to check.

so to replicate:

su
# <allow root>
mount -oremount,rw /system

# after framework.jar is somewhere on the internal storage/sdcard
mv /storage/sdcard0/framework.jar /system/framework/framework.jar
chown root:root /system/framework/framework.jar
chmod 644 /system/framework/framework.jar

Maybe this is helpful for others with Cyanogenmod 12.1

lambdaupb avatar Jan 21 '16 00:01 lambdaupb

The script does try to remount if it can. If you have had to do adb shell and then su it suggests that you are not running adbd in root mode on the device, which is why the pushing back to the phone is failing. If you run adb root (and accept on the phone) before running the script it should no longer give a permission denied error?

souramoo avatar Jan 21 '16 22:01 souramoo

Quite possible.

Maybe add a section to the README stating that requirement. I was to lazy to check since I knew how to do it manually, but more novice users might get stuck.

Furthermore, you could replace the subprocess.call statements in the root+remount part with subprocess.check_call and print an appropriate message.

lambdaupb avatar Jan 21 '16 23:01 lambdaupb

adb just display a textual error but it doesn't really fail so subprocess.check_call do nothing in this case, although it is still good to use it for other possible more serious errors.

Pull request #20 replace subprocess.call with subprocess.check_call to prevent other errors but it stil doesn't fix this issue.

ale5000-git avatar Sep 01 '16 16:09 ale5000-git