I've been thinking (but haven't tested).. as an alternative to the current ADB root method... a "safer" and temporary alternative MAY work.
tho it's very possible I have overlooked a detail and something along the way won't work.
be sure you have a KDZ and LGUP working prior to trying anything just in case u need to go back to stock.
might be good to try n backup any data before all this too... I believe you can use LG Bridge for this backup (or just manually pull stuff off internal sd).
again these are just some thoughts/ideas.. and they may need some "polishing" before it works how I'm imagining it.
Instead of using dirtysanta and writing the debug boot.img to the boot partition... you can:
use
@jcadduono 's "recowvery" to get a limited root shell...
flash the debug boot.img to the RECOVERY partition (yes recovery not boot)
"adb reboot recovery" which will reboot the phone and "boot recovery"
since the debug boot.img is now in the recovery partition slot..
it will actually boot back into android.. only with the debug boot img instead of stock boot.img. :good:
from here you should now be able to run adb root etc.
potentially make changes to system... install a new HOSTS file for blocking ads... swap some files for hotspot mod... delete some files... etc
do whatever you wanted to run while having root (running root apps.. xposed etc wont work because this is only adb root not a full root)
then after you're done you can just reboot your phone and you'll be back on the stock boot.img (since u flashed debug img to recovery not boot)
but all the changes you made in system will still stick.
flashing to the recovery partition allows us to keep the stock boot.img in the boot partition slot so all it takes is a reboot to get the stock boot.img back.
the debug img is from the US Cellular variant and is rather outdated which I believe is why some find the performance "laggy" while using it.
so my overall idea is just to "get in and get out". use the debug img to make the modifications you want to system.. then go back to stock boot.img
now.. it may be possible that when going back to the stock boot.img... SOME modifications you made to system will cause booting into android to fail.
the trick would be to find out which modifications can be made to system while using debug img but still holds up after switching back to the stock img.
for example... build.prop edits alone would allow the phone to boot.. even on the stock boot.img.
I would think that perhaps the same would be true of a HOSTS edit for blocking ads... possibly a tether/hotspot mod as well.
Where you may run into trouble is if removing apps... stock boot.img may not like that and fail to boot if you delete the wrong file.
So an alternative to deleting apps would be to use adb shell to "freeze" them instead.
see here for info on that.
you could potentially "dual boot" with both the debug img and the stock boot img as well.
currently with what I described above... after you reboot into recovery (which loads the debug boot img you flashed)..
the phone boots into android.. but on that boot.. the recovery partition gets reverted to stock recovery.
this is thanks to a patch file in the root of system that checks the hash of the recovery partition and if it ever changes... it restores stock recovery on boot.
this is why when you install TWRP on unlocked phones.. you must also flash supersu etc which also blocks this recovery patching.. allowing TWRP to stick.
anyway.. to STOP android from patching recovery and reverting it to stock... you can edit your build.prop and delete the last line in it:
ro.expect.recovery_id=0xlettersandnumbershere
with that line gone.. android should stop attempting to patch recovery partition.
but since you booted into android with the debug img before you made this build.prop change...
you'll have to reflash the debug.img again to the recovery slot. (use adb root shell to dd the debug img back to recovery partition).
at this point you'd have the debug boot img in the recovery partition slot and still have the stock boot.img in the boot slot.
and you should be able to "boot into recovery" (using the hardware buttons at boot.. or adb reboot recovery) to boot using the debug img...
and just boot normally to use the stock boot.img.
but again.. all this rides on the stock boot.img still booting android successfully after you had made changes to /system with the debug img.
as I said... I know build.prop alone can be changed and stock boot.img still work.. but not sure what happens when you start deleting files. dm-verity could very well "kick in" and stop you from booting. trial and error will most likely be required.
I think I got most of my ideas out above.. possible I left something out.. was typing it all on the fly as I thought of it.
Dont get mad at me if something breaks. but if you can understand everything I wrote you should be able to test it all without too many issues.. and worst case just flash KDZ to get back to normal.
no, I want nothing to do with the bounty.. so thats not why Ive posted this. I just see so many people having issues in the ADB root thread I thought I'd see if we could maybe just use the debug img temporarily to make the changes you want then go back to stock boot.img to get rid of the lag etc from the outdated debug boot img. If anyone gets a bounty it should be tungkick for providing the debug img.. as none of these ideas would be possible without it. and also to jcadduono or the dirtysanta crew (depending on which exploit you used to allow flashing of the boot img).
once again.. it's very possible this wont play out as I've imagined. But for anyone sitting on the sidelines who's capable of understanding what I'm saying.. see if you can work all this out and finalize it for everyone else. A single bat/sh file should be all thats needed to run recowvery and flash the debug boot img to recovery partition then rebooting to "recovery" which then loads the debug boot img instead. then from there.. some manual commands could be used to initialize adb root and remounting system r/w etc. And determining which files can/cant be edited/removed to allow stock boot.img to still work after the modifications.
Hopefully something comes from this.. or at least gives some people some ideas to try something else as I feel the ideal situation with all this adb root stuff is to make some mods with the debug img then go back to the stock img since the debug img is so old and laggy and way behind on security updates etc. :fingers-crossed:
*UPDATE*
Part 2 Here