Patched version of CrazyGamerGR's CrazyAquaKernel to add keyboard emulation support - Xiaomi Mi 5s Plus ROMs, Kernels, Recoveries, & Oth

I've patched CrazyGamerGR's CrazyAquaKernel to add support for this app, which lets you use your phone as a USB Keyboard/Mouse. The app requires root access.
This is only compatible with Cyanogen-based ROMs.
You can use this and DriveDroid at the same time, which I've found quite useul on my Surface Pro 3.
Zip file (flash in TWRP, but make sure your ROM's stock kernel is installed first.):
MEGA download
Google drive download
Original CrazyAquaKernel
https://forum.xda-developers.com/showthread.php?t=3661922
The source code:
I have a horrible upload speed, so I'm not going to re-upload everything if I can help it. The source is exactly the same as what's linked in the original CrazyAquaKernel post (see above), but I've applied this patch.
If this is against the rules, comment and I will upload the patched source in a github repository.

Changelog:
27092017: Initial release

Related

Fix Slimbean 3.1 Hardware/Virtual Keyboard problem (update.zip w/o atcmd_virtual_kbd)

http://forum.xda-developers.com/showthread.php?p=44680433&highlight=keyboard#post44680433
Slimbean 3.1 build is very functional for GT540 - thanks. I do not know if the Cyanogenmod 10 build is affected by the problem described in above post as well. But here is
GT540_Slimbean_Build1_kbd_fix.zip
Simply use ClockWorkMod (CWM) and install this zip AFTER Slimbean 3.1 was installed.
It will fix the "soft keyboard not showing up" problem, since the kernel is built without atcmd_virtual_kbd.
Also, CIFS and TUN are compiled into kernel (not as module, but statically linked in).
For more information see the contents of directory README/ within the zip file, which contains everything you need to reproduce what I've done.
Thanks for hitting thanks.
Cheers
cmuelle8
ps: Thanks to miroslav_mm for having been so thoughtful to include /proc/config.gz option. You'd think this is standard among open developers, but unfortunately it is not. I've seen tons of kernels without config.gz compiled in, which is a pain..
EDIT: You do NOT need to wipe cache/data to apply this, as it just exchanges boot.img, nothing else. If you lack CWM on the phone you can also extract the contained boot.img and push it with fastboot. This alternative method is documented in this forum, search for fastboot and boot.img ..

[MOD] No forced encryption on CM12 stock kernel - once and forever

Force-Encrypt Toggler
Disclaimer: I have no experience in Android/ROM development. This is the first time i decided to share something (that i initially made for myself). Flash at your own risk. I am not responsible for boot loops, unexpectedly encrypted partitions, data loses, etc. Make sure you have a backup first!
Click to expand...
Click to collapse
Now that CyanogenMod developers stated that they are going to follow Google's guidelines about forced encryption in their ROM for Nexus 9, those of us who want their tablets unencrypted will have to flash a modified boot image every time they update CM. I hate doing such things manually every time, so i created a patch that disables forced encryption the right way - flash once and forget forever.
force-encrypt-toggler reads and unpacks your boot image, patches the ramdisk, creates a new boot image and flashes it back to the boot partition. And all that is done right on your tablet. Than it uses CM's addon.d framework, so that each time you flash a new CM zip, force-encrypt-toggler is invoked automatically to patch the newly flashed boot image. Thus, you can just upgrade through CM's built-in updater and everything will be patched automatically every time . Also, the script itself can be used on any Linux computer to patch (probably) any boot.img you have.
Thus far i have used it on my Nexus 9 to stay unencrypted starting from 20150216 through 20150224 nightlies. It seems to be quite stable, i believe . See some notes in the second post.
Download
force-encrypt-toggler-1.1-flounder.zip : https://goo.gl/bw7YDq
force-encrypt-toggler-1.1-flounder-dbg.zip : https://goo.gl/95JN34 - this one creates log files in /cache every time
force-encrypt-toggler-1.1-linux.tar.gz : https://goo.gl/3PF6ru - to be used on a desktop to patch arbitrary boot.img
old versions (for CM12): https://goo.gl/125eey
Sorry, it looks like i can not post clickable links yet. Remove space between "https" and colon.
Compatibility
I have tested this script only on my Nexus 9 Wi-Fi with TWRP recovery and CM stock boot image. However, i believe that it should be possible to make it work on other devices (e.g. Nexus 6) by just changing a few constants at the beginning.
Version 1.1 requires TWRP version >= 2.8.7.1 and a CM13 nightly >= 20160110. Version 1.0 will work for CM12.x (but not for recent CM13 nightlies).
Known issues
The addon.d script uses a dirty hack to trick the recovery. While this never happened to me, if you ever encounter a strange recovery behavior regarding installation or backup of boot images after flashing CM zip over CM with this mod, this might be it. Just reboot and it should be ok. See the second post for more info.
If CM changes something in their updater or if something changes in the recovery, this mod may easily break due to the hack mentioned above. Read the disclaimer.
Each time you flash a CM zip over a CM installation with this mod installed, TWRP recovery will hang for 5-10 seconds after reporting successful completion and before showing buttons at the bottom (or before rebooting in case of open recovery script execution). It is possible to fix this easily, but than this mod might be much easier to break.
Installation
First, you should read the disclaimer above and backup your data. Than you just have to flash the zip you downloaded with TWRP recovery. CyanogenMod must be installed first. If your /data is currently encrypted, you will have to do a full factory reset to decrypt it (backup your data first!).
Your current boot image will be patched during installation process (it should not hurt, if it's already patched). In case if something goes wrong, installation script will tell you. In any case you can get force-encrypt-toggler debug output by something like:
Code:
adb pull /tmp/fet.log
Be sure to do this before you reboot, because that file is created in the RAM.
Removal
In order to remove force-encrypt-toggler you have to delete the following files from your /system partition:
Code:
/system/xbin/mkbootimg (v1.1)
/system/xbin/unpackbootimg (v1.1)
/system/bin/force-encrypt-toggler
/system/addon.d/90-force-encrypt-toggler.sh
/system/bin/mkbootimg (v1.0)
/system/bin/unpackbootimg (v1.0)
And than restore your original boot image. You can also just format /system and flash CM again, but that is such an overkill .
Usage
Normally you will not need to run force-encrypt-toggler yourself, but in case you need, you should be able to run it both in Android and in recovery via adb shell. Just run it with --help option to see what it can do. In case you will have to debug some glitches, this command may be useful:
Code:
force-encrypt-toggler --set-not-forced --debug --dry-run --no-cleanup
If you use it on a Linux computer, this is what you will probably need:
Code:
sudo ./force-encrypt-toggler --set-not-forced [ --input path/to/boot.img --output path/to/new/boot.img ]
Note that Android and computer versions are functionally equivalent, so you can theoretically patch boot images for one Android device on another one...
Changelog
Code:
v1.1
+ use toybox instead of busybox because CM now ships only the later
+ mkbootimg and unpackbootimg are now installed to /system/xbin
+ the --help option can now be used without root privileges
v1.0 - initial release
Credits
mkbootimg is built from AOSP source
unpackbootimg is taken from this GitHub page: https://github.com/Dees-Troy/unpackbootimg
update-binary is taken from a CM zip
There is one problem with patching the new boot image from an addon.d script: CM's updater-script flashes boot image after it invokes all addon.d scripts. Therefore at a time, when the script is called, it is possible to patch only the old boot image, and than it will still be overwritten anyway. In order to overcome this, i used a very dirty hack. In short, i replace the device node with a fifo and let the updater write new boot image into it, and than... Ok, so, i think there must be a cleaner solution, so i will appreciate if a more experienced developer takes a look at my code and proposes a better solution.
As for the 5-10 second hang, it is (unexpectedly) caused by that line with "sleep 15" at the end of addon.d script. If it really annoys you, you can comment it out along with the line, where force-encrypt-toggler is called directly (not through the helper script). Updating will be a bit faster than, but if CM devs ever decide to flash boot image prior to calling addon.d scripts, you /data will be silently encrypted.
Download :: For the lazy
force-encrypt-toggler-1.0-flounder.zip : http://goo.gl/N4rZDk
force-encrypt-toggler-1.0-flounder-dbg.zip : http://goo.gl/4nXmkD - this one creates log files in /cache every time
force-encrypt-toggler-1.0-linux.tar.gz : http://goo.gl/hDFNOY - to be used on a desktop to patch arbitrary boot.img
While there was zero discussion in this thread, goo.gl tells me that there was some downloads, so someone might be actually using my small mod. If so, they might notice that it got broken around one month ago. So i decided to share a fixed version. See updated links in the description (links in the USBhost's post above are for the old version, if you wonder).
If you currently have v1.0 installed, you can just flash v1.1 over it. Note however, that if you was flashing recent nightlies while using v1.0, you /data probably have been silently re-encrypted. Also, if you current boot image is patched by v1.0, the initial patching by v1.1 during zip installation will fail, but it should work during system updates afterward. Flash stock boot image and try again if you want to be sure.
The reason for v1.0 malfunction was that around a month ago CM13 stopped shipping busybox in favor of toybox. New version is only compatible with CM nightlies >= 20160110. Also you need TWRP >= 2.8.7.1.
I never took notice to this thread before until your post in the FED thread. I am going to keep an eye on it as I have been issued lately with the FED patch saying that my device is not supported (Nexus 9 Wi-Fi). Hopefully I will have better luck with this. Thank you for sharing your.

Phoenix OS for PC - Project POC - [v1.1.0] [Pre-rooted] [Busybox] [CM Apps]

I present to you
Project POC - Phoenix OS Custom
I spend countless nights developing roms, awesome mods, and scripts, if you wish to support my work and future developments you can donate to me via the link here!
Features:
1.Pre-rooted with SuperSU 2.76
2.Busybox
3.CM File Manager (root access to files)
4.Deodexed
5.Adaway
Changelog for Project POC
V1.1.0
First Build
Added SuperSU 2.76
Added Busybox
Added CM File Manager
Added Deodex
Added Adaway
Install Instructions:
1. Extract Project POC
2. Run Phoenix OS Installation Tool
3. Select desired install location: Hard Disk or USB
4. Select target drive and partition
5. Press next and choose data partition size and continue to allow the installer to finish
6. Copy system.img from the POC zip you extracted to the install location (eg. C:\PhoenixOS\)
Downloads:
Google Drive
32-bit only:
V1.1.0 https://drive.google.com/open?id=0B-mpriMWe2WUcjhhbnZXNzdYUHM
Credits:
PhoenixOS for providing us with an awesome OS
@Chainfire for SuperSU
@Stericson for Busybox
@mrRobinson for Adaway
Android (Google) for Android
CyanogenMod Team for the apps​
I spend countless nights developing roms, awesome mods, and scripts, if you wish to support my work and future developments you can donate to me via the link here!
I am trying to install on ASUS T100, no windows. I get usb stick made and it just boots to GNU GRUB grub> command line. Any ideas?
Thanks in advance,
Gary
I'm guessing this breaks OTA of official phoenix OS, but do let me know if my assumption is incorrect
meanhacker said:
I'm guessing this breaks OTA of official phoenix OS, but do let me know if my assumption is incorrect
Click to expand...
Click to collapse
I'm not entirely sure of this, but it could possibly have broken the ability to update via OTA.
It would make sense that OTA Updates won't work due to foreign files (SU, CM APPS) in the system partition.
Does it replace win bootloader with grub?

Building arm64 kernel for Galaxy S7 Edge (SM-G935F) question.

Hello,
First of all, im new to android modding and linux. I tried to build a kernel from stock G935FXXU1BPH6 source based on their readme file. My problem is, I don't have a zImage file after build that I could put into a flashable zip. I only have Image and Image.gz (I guess thats normal for arm64 kernels?) and I don't know how to make them flashable. I found a youtube video where the dude placed the Image file in a directory called "tools" in his flashable zip, I tried it and TWRP said I installed it successfully but when I start up my phone and check kernel version its still the previous one not mine.
Used this toolchain: aarch64-linux-android-4.9/bin/aarch64-linux-android-
I've set up CROSS_COMPILE path, then I set up configuration:
make ARCH=arm64 exynos8890-hero2lte_defconfig
make menuconfig (to tweak it a little bit more, like custom kernel version string so I can see if it worked)
Then I started build:
make ARCH=arm64
Output when build finished:
>>>>> Time used for generated all hashes is 6 sec
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
DTC arch/arm64/boot/dts/exynos8890-smdk8890.dtb
DTC arch/arm64/boot/dts/exynos8890-universal8890.dtb
Anyone knows how could I make it flashable? Thanks.
keezay said:
Hello,
First of all, im new to android modding and linux. I tried to build a kernel from stock G935FXXU1BPH6 source based on their readme file. My problem is, I don't have a zImage file after build that I could put into a flashable zip. I only have Image and Image.gz (I guess thats normal for arm64 kernels?) and I don't know how to make them flashable. I found a youtube video where the dude placed the Image file in a directory called "tools" in his flashable zip, I tried it and TWRP said I installed it successfully but when I start up my phone and check kernel version its still the previous one not mine.
Used this toolchain: aarch64-linux-android-4.9/bin/aarch64-linux-android-
I've set up CROSS_COMPILE path, then I set up configuration:
make ARCH=arm64 exynos8890-hero2lte_defconfig
make menuconfig (to tweak it a little bit more, like custom kernel version string so I can see if it worked)
Then I started build:
make ARCH=arm64
Output when build finished:
>>>>> Time used for generated all hashes is 6 sec
OBJCOPY arch/arm64/boot/Image
GZIP arch/arm64/boot/Image.gz
DTC arch/arm64/boot/dts/exynos8890-smdk8890.dtb
DTC arch/arm64/boot/dts/exynos8890-universal8890.dtb
Anyone knows how could I make it flashable? Thanks.
Click to expand...
Click to collapse
This particular chipset (64-bit Exynos) uses the uncompressed Image and a separate dtb.img file made from combining all the dtb revisions of your device codename and region into a DTBH format.
You can flash them using my LazyFlasher project.
See: https://github.com/jcadduono/lazyflasher
You will want to use the kernel-flasher branch. The kernel-flasher-samsung branch isn't fully ready and adds additional patch files to remove TIMA/Knox. I've yet to find out everything that needs to be changed from stock state to allow a bootable custom kernel without disabling encryption, unfortunately.
You can simply git clone it, then place your Image and optionally dtb.img in the root folder of the repository, then type "make" to build a TWRP flashable zip. They will be dynamically replaced in the current boot image on the device when the zip is flashed. You can check out the README.md for more info.
If you want to generate your own dtb.img to include in the installer, you can use a script I made from my universal8890 kernel sources on GitHub:
https://github.com/jcadduono/android_kernel_samsung_universal8890/blob/stock-6.0/dtbgen.sh
(correct the toolchain location for your build in the script)
It also requires the scripts/dtbTool folder (from the same git linked above) to be present in your repository. It's not the same as the Qualcomm dtbTool, and the sources are included (and fairly clean!) if you're interested in learning the Exynos dtb.img (DTBH) format.
./dtbgen.sh hero2lte xx
Now, there's still quite a bit that needs to be done to make the device actually boot successfully and be stable with a custom kernel. While the kernel is perfectly stable, the Samsung customized Android OS will absolutely freak out. That's a bit beyond me, and the reason I haven't really worked on any custom kernels for it myself.
Have fun!
jcadduono said:
This particular chipset (64-bit Exynos) uses the uncompressed Image and a separate dtb.img file made from combining all the dtb revisions of your device codename and region into a DTBH format.
You can flash them using my LazyFlasher project.
See: https://github.com/jcadduono/lazyflasher
You will want to use the kernel-flasher branch. The kernel-flasher-samsung branch isn't fully ready and adds additional patch files to remove TIMA/Knox. I've yet to find out everything that needs to be changed from stock state to allow a bootable custom kernel without disabling encryption, unfortunately.
You can simply git clone it, then place your Image and optionally dtb.img in the root folder of the repository, then type "make" to build a TWRP flashable zip. They will be dynamically replaced in the current boot image on the device when the zip is flashed. You can check out the README.md for more info.
If you want to generate your own dtb.img to include in the installer, you can use a script I made from my universal8890 kernel sources on GitHub:
https://github.com/jcadduono/android_kernel_samsung_universal8890/blob/stock-6.0/dtbgen.sh
(correct the toolchain location for your build in the script)
It also requires the scripts/dtbTool folder (from the same git linked above) to be present in your repository. It's not the same as the Qualcomm dtbTool, and the sources are included (and fairly clean!) if you're interested in learning the Exynos dtb.img (DTBH) format.
./dtbgen.sh hero2lte xx
Now, there's still quite a bit that needs to be done to make the device actually boot successfully and be stable with a custom kernel. While the kernel is perfectly stable, the Samsung customized Android OS will absolutely freak out. That's a bit beyond me, and the reason I haven't really worked on any custom kernels for it myself.
Have fun!
Click to expand...
Click to collapse
Thank you very much!
@jcadduono couldn't make the kernel boot after packing it with lazyflasher. I built a completely stock kernel from the mentioned source, pasted the "Image" (not the Image.gz) file in lazyflasher root and then used make command. Tried including "exynos8890-smdk8890.dtb" file as well. Same story. Not sure if I need anything else in the package or I made user mistake. Do you have any ideas how could I debug what makes it stuck on that screen?
Thanks!
EDIT: Solved Problem.
keezay said:
@jcadduono couldn't make the kernel boot after packing it with lazyflasher. I built a completely stock kernel from the mentioned source, pasted the "Image" (not the Image.gz) file in lazyflasher root and then used make command. Tried including "exynos8890-smdk8890.dtb" file as well. Same story. Not sure if I need anything else in the package or I made user mistake. Do you have any ideas how could I debug what makes it stuck on that screen?
Thanks!
EDIT: Solved Problem.
Click to expand...
Click to collapse
Can you help me set up an environment to build a kernel, arm64, for s7? I'm on Ubuntu having a heel of a time..
Galaxy S7 Edge Kernel Flashing Issues
I am currently trying to flash a different kernel into a galaxy s7 edge (SM-G935S).
I have gone as far as building a kernel and extracting a Image file from it, but every time I try flashing a boot.img with a replaced kernel image file, it seems to never work.
A mkbootimg tool that I am currently using requires a dtb file, but I cannot find where to get it from.
I have tried using @jcadduono's git code, but the dtb file created from it doesn't seem to work as well.
Can anyone tell me what I should do to flash a kernel successfully?
kernel panic after flashing
Hi @ll,
with this guide I was able to compile my own kernel and also flashing it to my phone. Unfortunatelly I'm getting kernel panic after rebooting the phone. is there any possibility to get the reason for this? Or do you have any hint, what I may have done wrong?
Thanks for your help.
Kind regards
v0ti

[6.0] MiUi Kali Nethunter

Hi,
Since my post on MiUi forums got taken down (reason-against the rules ?!?) , and I don't have enough permission to post in the dev sections, I am posting this here.
As the title suggests the following is nethunter able to run on MiUi marshmallow (tested on epic rom), just flash the provided zip over current MiUi mm rom and voila ! Have fun
**NOTE --> If wifi doesn't work even after flashing mod-mm.zip, just head over to /lib/nodules, rename wlan1.ko to wlan.ko, create a new folder in the same directory and name it "pronto" and then copy the now wlan.ko into pronto and rename this time to "pronto_wlan.ko"
The only difference in other nethunter and this one is, it is for MiUi marshmallow.
*based on radon kernel
*hid patch credits zetsubou kernel
Here are the downloads -->
https :// goo.gl/ TsrPnc
https :// goo.gl/ BTkUJU
**I just made an account to post this, so I am not allowed to post links, sorry for inconvenience
screenshots plese
**NOTE --> If wifi doesn't work even after flashing mod-mm.zip, just head over to /lib/nodules, rename wlan1.ko to wlan.ko, create a new folder in the same directory and name it "pronto" and then copy the now wlan.ko into pronto and rename this time to "pronto_wlan.ko"
The only difference in other nethunter and this one is, it is for MiUi marshmallow.
*based on radon kernel
*hid patch credits zetsubou kernel
Here are the downloads -->
https://goo.gl/TsrPnc
https://goo.gl/BTkUJU
for those who are lazy for download links
also gr8 work including wifi fix
working fine installed on epic rom 7.7.20
for those who want flashing order
here is order
1. clean installed miui epic rom global beta (completed setup added account flashed supersu)
2.backup backup backup backup epic rom in case something goes wrong
3.then rebooted to recovery flashed nethunter zip
4.then installed mod mi-mm(fix of wifi for me dosnt work done as above got wifi working)
5.reboot voila
based on radon 5.4 miui version
nethunter stock rom
enjoy will post screens later
links aren't working .
[email protected] said:
**NOTE --> If wifi doesn't work even after flashing mod-mm.zip, just head over to /lib/nodules, rename wlan1.ko to wlan.ko, create a new folder in the same directory and name it "pronto" and then copy the now wlan.ko into pronto and rename this time to "pronto_wlan.ko"
The only difference in other nethunter and this one is, it is for MiUi marshmallow.
*based on radon kernel
*hid patch credits zetsubou kernel
Here are the downloads -->
https://goo.gl/TsrPnc
https://goo.gl/BTkUJU
for those who are lazy for download links
also gr8 work including wifi fix
working fine installed on epic rom 7.7.20
for those who want flashing order
here is order
1. clean installed miui epic rom global beta (completed setup added account flashed supersu)
2.backup backup backup backup epic rom in case something goes wrong
3.then rebooted to recovery flashed nethunter zip
4.then installed mod mi-mm(fix of wifi for me dosnt work done as above got wifi working)
5.reboot voila
based on radon 5.4 miui version
nethunter stock rom
enjoy will post screens later
Click to expand...
Click to collapse
OK sur, thenku a lot.
Kids this days ;_; @sarveshrulz

Categories

Resources