not 100% sure on this... perhaps I'm thinking of Nougat rules and not Marshmallow.. but does running dm-verity even stick after a reboot?First off, this is a fantastic idea and I would be extremely interested to see if something like this does in fact work. I never even considered something like this.
The only part I would be concerned about is missing the ability to run the "adb disable-verity" command, as the stock boot.img will still have dm-verity enabled. If booting from the recovery partition DOES allow you to run the userdebug kernel, I would just make sure that you aren't deleting system files (as you stated above, just reiterating).
Other than that, this looks like a great way to get a more stable use of the root shell! Thanks for your great work as usual![]()
because the verity flag should be in the boot.img (ramdisk) and reset itself on each boot. so if the phone is booting into android after a reboot and actually fully boot.. the verity disable stuff may not even be "in play" again until you re-run "adb disable-verity". And in that case.. the phones already back into android.. working.. and retaining the system changes.
but again.. its possible I'm thinking of nougat rules which removed the ability to disable verity and have it stick after a reboot (without modifying the boot.img/ramdisk.. which wouldnt work in this situation because the bootloader is locked and therefore boot.img must be signed and wouldnt boot if edited).
but ya as I said before.. it may take some trial and error to see whats working and what isnt working after a system edit and going back to stock boot. I really see no reason to delete ANY files in system when you have the power to use the adb pm hide/disable command to freeze the apps from running etc (adb pm disable may need to be run in root shell to work). It's not like deleting files in system will save space... system partition is always a set size.. 5GB-ish and will always take up 5GB of space whether you run a 100MB ROM or a 5GB ROM.
So freezing apps may get around the stock kernel getting mad about system changes and not booting. As you may recall from the hex edited TOT... you edited build.prop and things still booted on stock boot.img.. so changes can certainly be made in system while keeping the stock boot.img happy and android booting... just have to find the perfect combo/list of mods that keeps it that way.
And since no ones really using the stock recovery for anything (on locked bootloader devices.. no TWRP obv) it would be great to dual boot this way.. best of both worlds I suppose (if any of this works.. as you said.. it may all fall apart when it comes to verity). the main unknown is how much in system can be changed while still making stock boot.img happy.
*EDIT*
derp.. so we cant use recowvery after all... must use dirtysanta. I wasnt thinking n forgot recowvery expects the bootloader unlocked and uses a custom boot img in the recovery slot to open the root shell. so a dirtysanta "boot edition" edit is needed changing sde1 (boot partition) to sde2 (recovery partition).
I decided to pull my g5 out to try all this but unfortunately the boot.img doesn't seem to work on my t-mobile g5 so I can only get as far as flashing it but cant boot with it
*EDIT 2*
as I've said in my next post...
so far I can confirm that android still boots on the stock boot.img with the following system changes:
mount -o rw,remount,rw /system
mount -o ro,remount,ro /system
editing/replacing host file in /system/etc/ (needs chmod 0644 after changes)
editing build.prop (needs chmod 0644 after changes)
now more changes need to be tested.. like hotspot mods and other framework edits to see what's possible while using stock boot.img.
Last edited: