Enabling llvmpipe through phone terminal?
Is it possible to change the renderer back and forth from android to llvmpipe from within the phone (S2) itself? I tried to create a script:
#!/system/bin/sh "grep -q "ro.libagl=1" /system/build.prop && sed "s/ro.libagl=1/ro.libagl=0/" -i /system/build.prop || sed "s/ro.libagl=0/ro.libagl=1/" -i /system/build.prop" reboot
to run from the phone terminal but it didn't work. Any help would be great so I can switch to llvmpipe and use Orfox on the go.
Thanks very much
Whatever the command was on the wiki, I tried it and it worked when originally switching to Replicant 6 (on my s2).
Be prepared to reflash the Replicant 6 zip, however, when the phone runs so slowly that rolling back the change using the phone terminal is an exercise in insanity.
I suppose you could write a script before hand with 0 switched to 1, but even running that would take a long time.
RE: Enabling llvmpipe through phone terminal? - Added by pete mars about 1 month ago
Out of interested why would it be insane? I have changed renderer back and forth many times through adb with no performance issues (other than llvmpipe running very slowly).
You were asking about switching renderers from your phone (not from a computer via adb).
Obviously using a computer to run a shell script will not be bottlenecked by a slow UI and is not what I was talking about.
RE: Enabling llvmpipe through phone terminal? - Added by pete mars 29 days ago
I see you're saying it would be incredibly slow if llvmpipe was running to then use the phone terminal to change renderer back to stock.
You forgot to mount the system partition writable at the beginning of the script:
mount -o rw,remount /system
I would also remove the
" at the beginning and end of the command.
RE: Enabling llvmpipe through phone terminal? - Added by pete mars 26 days ago
Wonderful, thanks. Working now
#!/system/bin/sh mount -o rw,remount /system grep -q "ro.libagl=1" /system/build.prop && sed "s/ro.libagl=1/ro.libagl=0/" -i /system/build.prop || sed "s/ro.libagl=0/ro.libagl=1/" -i /system/build.prop mount -o ro,remount /system reboot
I don't know if it's needed to remount the system partition as read only afterwards but I thought it would be safer. No issues running it with llvmpipe enabled, it switches back fine.
RE: Enabling llvmpipe through phone terminal? - Added by Jeremy Rand 14 days ago
I've just submitted a patch for this purpose. https://redmine.replicant.us/issues/1832
It's not directly based on pete's script; I based it on my modem disable patch, but it should be mostly equivalent. The main differences are that my patch has separate scripts for enabling and disabling llvmpipe (I'm guessing some users won't know what they've currently got it set to), and that my patch reboots more gracefully (and therefore is less likely to cause data corruption or app errors).
RE: Enabling llvmpipe through phone terminal? - Added by pete mars about 3 hours ago
Thanks for that Jeremy.
Can you explain the line
am start -a android.intent.action.REBOOT
and why this is preferable to