• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Root [Development] Unofficial TWRP - K2_CL

M

ModdingMyMind

Guest
K2_CL ONLY!!!!!

Kernel Source: Click Here!

Changelog Version 2:
Code:
* From commit [URL="https://github.com/ModdingMyMind/android_kernel_htc_k2_cl_twrp/commit/86a317157a741ef12042426696e3c84eeed3e263"]86a317157a[/URL] on my github.
* Kernel built in version 2.7.1.0
* Disabled Module support
Changelog Version 1:
Code:
* From commit [URL="https://github.com/ModdingMyMind/android_kernel_htc_k2_cl_twrp/commit/c34ea02e20b758e78cae9f8b8bc975d268accd84"]c34ea02[/URL] on my github.
* Kernel built in version 2.7.0.2[B]d[/B]
* Added full SELinux support.
* Removed HTC write protection.
---------------------------
---------------------------

TWRP 2.7.1.0 - for 4.2.2

TWRP 2.7.0.2d - for 4.2.2

TWRP 2.7.0.2c - for 4.2.2

TWRP 2.7.0.2b - for 4.2.2 (deprecated)

TWRP 2.7.0.2a - for 4.2.2 (deprecated)

---------------------------
---------------------------

TWRP source was patched from https://gerrit.omnirom.org/#/c/6283/
This patch allows the ability to take screenshots while in the recovery. It has not been merged over to the TWRP source yet so only unofficial builds at this moment will be seen with this feature.

To take screenshots while in recovery just press both the power key and volume down key. The screen will flash. It will naturally store the screenshot in your pictures folder of your sdcard if mounted in either your internal or external.



TWRP Changelogs:
Code:
[U]2.7.1.0

[/U]Built with custom kernel.
- [B]Removed custom theme and reverted back to stock theme.[/B]
- Add GUI option to change or repair file systems on individual  partitions. The change is destructive so backup your data including  internal sdcard first. This option should make it a little easier to  migrate a device from ext4 -> f2fs, for instance. You will find this  option under Wipe -> Advanced Wipe, then select only one partition  and then press the Repair or Change File System button.
- Various bugfixes to backup and restore
- Improvements to USB storage handling
- Added a class to search for files to make finding the correct brightness file automatic in most cases
- Various other bugfixes and tweaks

[U]2.7.0.2d[/U]

Built with custom kernel.
 - Added full SELinux support
 - Completely removed HTC write protection.

[U]2.7.0.2c[/U]

Fixed init.rc to allow communication with binaries in /sbin.

TWRP 2.7.0.2c is built ready for SELinux, but the kernel is stock. Until they release the source I can't modify the kernel to support SELinux. This is really only needed for having 4.3+ roms but I want to include it in case the day comes and we see CM, AOSP, or possibly other sources.

[U]2.7.0.2b[/U]

Minor theme adjustment

Upgraded screenshot functionality throughout entire recovery
Note - version 2.7.0.2a screenshots are limited to only the main page

TWRP 2.7.0.2b is built ready for SELinux, but the kernel is stock. Until they release the source I can't modify the kernel to support SELinux. This is really only needed for having 4.3+ roms but I want to include it in case the day comes and we see CM, AOSP, or possibly other sources.


[U]2.7.0.2a[/U]

Built from CM11 and Omni 4.4 sources. 

Extended backup options.
  1. System
  2. Boot
  3. Cache
  4. Data
  5. Recovery
  6. Misc
  7. Firmware_radio
  8. Firmware_q6
  9. android secure
*** I think I listed them all ;-)

Built in AromaFM.

Implemented screenshot functionality.

Added offmode charging.

Completely updated to fit with 4.2.2. 

Includes Holofied Black Theme.

TWRP 2.7.0.2a is built ready for SELinux, but the kernel is stock. Until they release the source I can't modify the kernel to support SELinux. This is really only needed for having 4.3+ roms but I want to include it in case the day comes and we see CM, AOSP, or possibly other sources.

HTC Dumlock Instructions:
HTC Dumlock Instructions specifically for S-On users but S-Off users can use it as well if they choose to:
1. Install the build of TWRP using your method of choice, but you must actually flash TWRP to recovery.* No fastboot booting it.* We need it in recovery so that this build of TWRP will be flashed to your boot.* This new build of TWRP has features in it to easily restore your original boot.

2. Reboot into recovery.

3. Make a backup of your phone.

4. Tap Advanced.

5. Tap HTC Dumlock. (If you don't see HTC Dumlock then you need to remove any custom TWRP theme that you might be using.)

6. Tap Install HTC Dumlock.* This will install the app and binaries needed to make everything work nicely.

7. Reboot your device.

8. Find and open the HTC Dumlock app.

9. If/when prompted, give the app root (SuperUser) permissions.

10. Tap the Execute HTC Dumlock button.

11. Wait patiently for a couple of minutes.* It takes a little while.
If your device doesn't reboot automatically, reboot it manually.* Reboot it normally.* DO NOT reboot it to recovery.
You should now be in your recovery, but your recovery is flashed into boot.

12. Tap Advanced.

13. Tap HTC Dumlock.

14. Tap Restore Original Boot.

Use your recovery like normal.* Flash a new kernel.* Restore a backup with a different kernel.* Do whatever you please!

ymejave5.jpg
 
I'm already building version 2.7.0.2b

Changelog includes a minor theme adjustment and extends the screenshot functionality to be used throughout the entire recovery. Version 2.7.0.2a is only limited to taking a screenshot on the main page as seen in the OP, but I have fixed this in the next build.
 
Waiting for the kernel source so I can add full SELinux support.
 
Hey guys, seems the latest build (2.7.0.2b) won't backup the boot image. The bootimage partition size is 16777216 which I currently have that set in the BoardConfig.mk file for our device tree. However, when reviewing the recovery log it shows it trying to back up the boot image size as 16777216c.

It shouldn't be doing that but nonetheless it is. So I'm working on it right now.

It's NOT harmful, just a nuisance.
 
So what's the next big project now that we have the kernel source?

Well, first I want to add full SELinux support with my TWRP.

But aside from that, I got a few ideas ;-).

Only problem is getting the kernel to build using the linaro toolchain. May have to use arm-eabi-4.6 from Google source... Sucks because linaro is pretty good.
 
Well, finally got the stock kernel building using the Google source (test run). Funny how I can pull everything together to build TWRP in just days but the kernel and my linux distro wants to make me scream hahahaha.

Fingers crossed so I can begin my projects :-)
 
i got the recovery to work 1 time, tried to do an adb sideload now if i try to enter recovery it just flashes the teamwin logo over and over again. cant even get into recovery. i tried flashing stock recovery and then back to twrp and still the same thing.........

EDIT: I finally got it working had to flash stock recovery wipe data, boot the phone up then flash twrp
 
i got the recovery to work 1 time, tried to do an adb sideload now if i try to enter recovery it just flashes the teamwin logo over and over again. cant even get into recovery. i tried flashing stock recovery and then back to twrp and still the same thing.........

EDIT: I finally got it working had to flash stock recovery wipe data, boot the phone up then flash twrp

Lol, glad you got it resolved bro :-)
 
Side note, SELinux support is already in the stock kernel (I looked in the source after noticing references to restorecon and setcon in init.rc)

No it isn't. It comes with the source but it isn't built to use it.

If you wish to confirm, then boot in to your TWRP and you will see that it says the kernel does not support SELinux ;-). It has to be implemented into the defconfig file.

You can also confirm this by reviewing my commit on github which shows the added changes to give it full SELinux support.
 
No it isn't. It comes with the source but it isn't built to use it.

If you wish to confirm, then boot in to your TWRP and you will see that it says the kernel does not support SELinux ;-). It has to be implemented into the defconfig file.

You can also confirm this by reviewing my commit on github which shows the added changes to give it full SELinux support.

Yeah, I see that now after I look at k2_cl_defconfig and didn't find CONFIG_AUDIT or CONFIG_SECURITY_SELINUX
 
Back
Top Bottom