Well, I had a nicely rooted OV, but then I had to go and upgrade some things in /system/bin (bash and busybox). Of course just before I got all the symlinks made, my adb session disconnected, leaving me without either /system/bin/sh or /system/bin/su at the moment.
So here's a puzzle, how to recover from this, and restore "sh", after which it's a simple matter to obtain root again?
I can do a few things:
But I cannot:
So does anyone know of a way to get temporary root, without using 'adb shell'? Or to change the adb user's shell from sh to bash?
If not, can the stock recovery mode be used to flash a replacement (stock or other) ROM? All references I've found here describe flash restore operations using a custom recovery loader (which I hadn't gotten around to installing yet), adb shell + root, or various other backup utilities that require root privilege; and no one has reported getting Emergency Recovery mode to work.
I haven't rebooted, as this will revert the /system filesystem to read-only, and not sure what else will be broken due to missing "sh".
So here's a puzzle, how to recover from this, and restore "sh", after which it's a simple matter to obtain root again?
I can do a few things:
- 'adb push' files into /mnt/sdcard and /data/local/tmp
- get a shell in the Terminal Emulator app using /system/bin/bash (which I was just about to link to "sh")
- run any commands supported by /system/bin/busybox (which is not setuid root)
But I cannot:
- 'adb shell' (exec '/system/bin/sh' failed: No such file or directory)
- write to /data/local or /system/bin from Terminal Emulator, because it runs as a different user than adb shell
- chmod exploit files pushed into /data/local/tmp to make them executable (permission denied, for same reason as previous point)
So does anyone know of a way to get temporary root, without using 'adb shell'? Or to change the adb user's shell from sh to bash?
If not, can the stock recovery mode be used to flash a replacement (stock or other) ROM? All references I've found here describe flash restore operations using a custom recovery loader (which I hadn't gotten around to installing yet), adb shell + root, or various other backup utilities that require root privilege; and no one has reported getting Emergency Recovery mode to work.
I haven't rebooted, as this will revert the /system filesystem to read-only, and not sure what else will be broken due to missing "sh".