[Desire 626 General] BigCountry907:
I don't see any Kernel source for 6.0.1 yet.

The sources are there for 5.1

Interesting enough the version of the kernel that I pulled from my 6.0 loaded RUU has the same version number as the 5.1 kernel.

The kernel version is 3.10.49 in both Marshmallow and Lollipop. (NOT SURE OF COMPATIBILITY YET)

Here's a link.

http://www.htcdev.com/devcenter/downloads

I'm pretty sure we can use ASOP Source Kernels as well.

I just don't know which one to test.

My Plan is:

Downgrade my phone from 6.0 back to 5.1

Completed that already ( To downgrade do (dd if=/dev/block/bootdevice/by-name/misc of=/sdcard2/misc.img)

Open the misc.img in a hex editor.

Look for something like = T-MOB010.ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDeviceWarmBoot.ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿCE Serial InUse.Debug Cable Ena.CE USB InUse.................................2.17.1550.1.....

Change to something like = T-MOB010.ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿDeviceWarmBoot.ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿCE Serial InUse.Debug Cable Ena.CE USB InUse.................................1.00.0000.0.....

After you fix the Mainver in the MISC.img flash it back to the phone.

(dd if=/sdcard2/misc.img of=/dev/block/bootdevice/by-name/misc)

Now that my android version matches the kernel for 5.1 I will test compile the HTC source kernel.

After it is all working I will load up Marshmallow and test the same kernel.

If all goes well then I am ready to start modding the kernel itself. the Z-IMG not just the ramdisk.

Just remember to backup your misc.img and your boot.img.

Change misc.img byte for byte / be careful if you mess it up the phone will boot-loop. (until you flash a RUU or --->>>)

Fix by flashing TWRP and then do the fix selinux.

Then in a shell on your PC type ADB shell.

Then DD your original misc.img back to the phone.

The good thing is unless we flash the RADIO or HOSD and screw it up the phone can easily be recovered.

Unless you are s-off you cannot flash those. YET !!!

I'm working on that. I can patch the factory recovery and sign my own .zip. After the patch the main .zip will pass the signature verification. But of course the firmware.zip inside the main update.zip is signed. ( That one will fail if you unpack and re pack the firmware.zip)

So i'm looking for a open window.

My logic is I need to have full adbd insecure wile in HTC Download Mode to see whats going on.

To add some Init.d support. And to manipulate the filesystem. Maybe I can seed it somehow.

The barrier I can foresee is In HTC Download Mode (FTM) Fastboot is active.

I don't think both adbd and fastboot can run at the same time. ( So I need a Switch ) but maybe i am wrong.

It is easy to change the boot.img and the recovery.img but the problem is I am pretty sure the hosd.img is loaded during HTC Download Mode.

Since we cant flash hosd.img its a lot harder to change.

Can only make temporary changes to the loaded ramdisk if we can access that ramdisk. (ADB)

I need to see whose ramdisk is loaded during which modes.

HTC-Download-Mode

Recovery Mode

Boot loader Mode

Anyway I don't see this happening without a custom kernel.

ALSO IF YOU HAVE S-OFF please do a DD backup of each partition of your phone. If you need help let me know.

I need those partition backups to give s-on phone s-off.