Related
Now that I'm satisfied with the results from the original testing thread, I'd like to announce the general public release of my modified version of the FIREFIREFIRE 1.2 bootloader. The main feature? You can dualboot two different ROMs! All of the downloads I'm providing are listed in the second post.
Standard disclaimer: I am not responsible for anything that happens to your Kindle Fire as a result of using this software. I designed this in my spare time, voluntarily, and choose to release it for others to hopefully enjoy. Although it has been safe throughout testing there is always a risk involved in modifying your device, including unpredictable and uncontrollable circumstances that I cannot prepare for. You have been given a fair warning.
Installation
You can install FFF Extended like you would any other bootloader:
Download the latest zipped binary from GitHub (links below).
Extract the u-boot.bin file from the zip. This is the bootloader.
If you already have a custom bootloader you can install from fastboot by rebooting into fastboot and executing fastboot flash bootloader u-boot.bin from a PC shell. You can also run this on your PC first and then reboot with your device plugged in; it should run when your device starts up fastboot.
If you do NOT have a custom bootloader, you can follow pokey9000's instructions for the original FFF:
Code:
Howto flash by hand
- Get into fastboot mode somehow. Having and older FFF from the TWRP
installer is a good start. Currently KFU or fbmode is the easiest
- flash with "fastboot -i 0x1949 flash bootloader u-boot.bin"
(take out "-i 0x1949" if FFF is already installed)
- disable fastboot: "fastboot -i 0x1949 oem idme bootmode 4000"
- reboot: "fastboot -i 0x1949 reboot"
Done! The bootloader is installed.
Prepping for dualboot
Once the bootloader is installed, you can use it right away to boot into recovery or your normal ROM. In order to use your device to dualboot, though, you're going to need to do a little bit of up-front configuration.
NOTE: Backup the data on your sdcard partition. It will be formatted during the setup procedure.
Get into fastboot somehow and execute fastboot oem dualformat
Reboot your device into recovery mode.
Use your recovery to format/wipe your sdcard partition. This varies between CWM and TWRP, but it will be in the "wipe" or "advanced" menus.
Download altrom-format-all.zip and flash it from recovery to properly format your secondary partition set.
Your device should be ready to flash an alternate ROM now.
To return to a stock partition layout, connect your device to a PC, reboot into fastboot, and execute fastboot oem format from a PC shell. You will probably want to format your sdcard partition afterwards.
Installing alternate ROMs
If you want to install an alternate ROM, the ROM must be properly packaged to use the secondary partition set instead of the default ones. Normal ROMs will install ONLY to your regular partition slots.
I am currently providing one ROM, which is a CM7 KANG build and a GAPPs package for it. You do not need to do anything special to install the ROM, just flash it from recovery as you normally would (see downloads below).
If you want to install a new alternate ROM, you can flash the altrom-factory-reset.zip to perform a "factory reset" of your alternate partitions (it will wipe data2 and cache2).
You cannot currently make a nandroid backup of an alternate ROM install (unless you want to manually use 'dd' or something). This would require recovery changes which I may or may not try to implement at some point, or someone else is welcome to do it if they feel so compelled.
Each ROM will have its own boot, data, system, and cache partitions and they will share your sdcard (media) partition. They run completely separately, and modifications to the kernel, apps, system, etc of one will not in any way affect the other.
Using the boot menu
FIREFIREFIRE Extended listens for 5 seconds and starts up fastboot like FFF1.2 does, but when you press the power button it starts a new 2.5 second countdown and effectively changes the selected boot state. This provides more flexibility because it allows you to "cycle" between boot options instead of just being a one-shot thing. Note that there is a slight delay before the power button will accept input, but you can tell when it's ready when the LED fades from bright green to darker green. You can see a demo of the boot menu on YouTube here: http://www.youtube.com/watch?v=xV2Jtu3fDSM
Packaging alternate ROMs
If you're a ROM author and would like to package your ROM for alternate booting, please see the "how-to" page on my GitHub. Note that some ROMs seem to play more nicely than others, so you may experience some bugs when running your ROM from the alternate partition set. I'd be happy to try to help you out if I can, but I can't guarantee that I'll know the solution to your specific issues.
Downloads and Source
Downloads are provided in the second post. The source for FFF Extended is available on my GitHub and is licensed under the GNU GPLv2. I've also set up a few wiki pages on my GitHub with some additional information about the bootloader.
Credits
Thanks and appreciation to:
pokey9000 for all of his development, tutorials, etc for FIREFIREFIRE and omap4boot.
All of the people that helped me test this.
Everyone who's worked on the CM7 repos that my altrom version is built on, both for the KF specifically (whistlestop, IngCr3at1on) and the CM project as a whole.
Downloads
These are various downloads provided by me. If you get a ROM from somewhere other than this post, I didn't package it. So if you have bugs, talk to the ROM author first
Bootloader
Latest version: GitHub, Mediafire (md5 of the u-boot.bin: 89df8d45262a92061c461e8ff134286a)
All versions: GitHub
Setup/Maintenance Files
altrom-format-all.zip (reformats all secondary partitions, flash from recovery)
altrom-factory-reset.zip (factory reset for your secondary partitions, flash from recovery)
My altboot ROMs
CyanogenMod7 KANG
Gingerbread GAPPS for altboot partitions
Bugs in this ROM: Unpredictably hangs on boot very occasionally (once every 5 or 6 boots, maybe?). Rebooting fixes it.
Kernels
IntersectRaven's 2.6.35.14 CM7 kernel, repackaged for altboot partitions (Thanks IR!): http://www.mediafire.com/?6b5545b55tx5jwd
Wooo hoooo, can't wait!!!!
Sent from my classic stock
Nice nice nice! Could you make a guide to change the updater-script for random ROM ?
Trojan38 said:
Nice nice nice! Could you make a guide to change the updater-script for random ROM ?
Click to expand...
Click to collapse
Check out the wiki page on GitHub. If you think it could use expansion feel free to let me know
Thanks and appreciation to:
pokey9000 for all of his development, tutorials, etc for FIREFIREFIRE and omap4boot.
All of the people that helped me test this.
Everyone who's worked on the CM7 repos that my altrom version is built on, both for the KF specifically (whistlestop, IngCr3at1on) and the CM project as a whole.
I think this is not so easy, you'll need to compile a source code of random rom.
Oh okay, I thought it was more simple, something like renaming partition names in the updater-script . Will take a look at it, thanks .
animefun135 said:
Thanks and appreciation to:
pokey9000 for all of his development, tutorials, etc for FIREFIREFIRE and omap4boot.
All of the people that helped me test this.
Everyone who's worked on the CM7 repos that my altrom version is built on, both for the KF specifically (whistlestop, IngCr3at1on) and the CM project as a whole.
I think this is not so easy, you'll need to compile a source code of random rom.
Click to expand...
Click to collapse
What?
eldarerathis said:
What?
Click to expand...
Click to collapse
Nevermind
I've installed your bootloader and running altcm7 rom, but if I want flash cm7 or cm9 kernels - how to determine to whom it is intended?
animefun135 said:
Nevermind
I've installed your bootloader and running altcm7 rom, but if I want flash cm7 or cm9 kernels - how to determine to whom it is intended?
Click to expand...
Click to collapse
If you mean "how do I know where it will install?" then it's all based on how it's packaged. Unless the ROM/kernel author packages the zip for the alternate partitions and specifically says that's what it's for, it will install for your regular ones. So everything is for your primary ROM unless otherwise noted by the author.
Dualboot Support for CM9
When will there be dualboot support for CM9??
thedeveloper1 said:
When will there be dualboot support for CM9??
Click to expand...
Click to collapse
When it's done.
Fixed
stephenm00 said:
What about a stock kindle image for the 2nd rom?
Click to expand...
Click to collapse
This would be quite a feat.
Sent from my Amazon Kindle Fire using XDA
I am kinda new to all of this so this is maybe a noob question!
I have Flashed FFF extended, but before Formatting my SD Card, I am just having some simple question: Would running 2 ROMs on my Kindle Fire be really heavy, we have a 8Gb of storage in your Kindle Fire and how much would it take out of the 8Gb? Is it acceptable for a "user" such as myself, I mean I will still have space to storage my personal data
Thanks!
pmdisawesome said:
I am kinda new to all of this so this is maybe a noob question!
I have Flashed FFF extended, but before Formatting my SD Card, I am just having some simple question: Would running 2 ROMs on my Kindle Fire be really heavy, we have a 8Gb of storage in your Kindle Fire and how much would it take out of the 8Gb? Is it acceptable for a "user" such as myself, I mean I will still have space to storage my personal data
Thanks!
Click to expand...
Click to collapse
Of the 8 GB, about 6 is usable by you normally, and 1 GB of that is reserved for apps leaving ~5 GB of general storage space (the "sdcard" partition). You'll end up with about 1 GB of data space (e.g. apps and the like) per ROM and 3.6 GB of general storage space using FFFE.
eldarerathis said:
Check out the wiki page on GitHub. If you think it could use expansion feel free to let me know
Click to expand...
Click to collapse
Thanks for taking the time to type this up, it helps alot. And thanks for your work on this project
Wow! Thanks for making this for us! It's amazing!
stephenm00 said:
What about a stock kindle image for the 2nd rom?
Click to expand...
Click to collapse
I have stock rooted 6.3 insecure, originally from here modded to install to the alternate partition.
If you want it, let me know and I can find a place to put it.
three-p-o said:
I have stock rooted 6.3 insecure, originally from here modded to install to the alternate partition.
If you want it, let me know and I can find a place to put it.
Click to expand...
Click to collapse
I know I want it........Please.
★ ☆[Recovery][Mod][Multi-Boot] MultiROM V22 | m7vzw [Unofficial][03-16-14]☆ ★
Introduction
This is a port of Tasssadar's MultiROM.
MultiROM allows you to boot multiple ROMs on the same device (as well as, in theory, Linux distros, if there were any available for our device, or android-based operating systems such as Ubuntu Touch).
ROMs are flashed in the modified recovery, and upon booting the phone, you have a boot menu that will allow you to choose which ROM you want to boot.
You can also boot ROMs off of a USB drive connected via an OTG cable (**There are some limitations to this, keep reading for details**).
First of all, I would like to thank Tasssadar because this is 100% his work. If you enjoy MultiROM, feel free to donate to him.
I have just ported it to Kitkat for the Verizon HTC One.
MultiROM in action: http://www.youtube.com/watch?v=SCYh14Zwl3s
Warning!
It _is_ dangerous. This whole thing is basically one giant hack - none of these systems are made with multibooting in mind.
It is no longer messing with data partition or boot sector, but it is possible that something goes wrong and you will have to flash factory images again.
Make backups. Always.
Sense ROM Support
MultiROM is now able to boot Sense ROMs (as secondary only), but the process is a little more complicated.
See second post for step-by-step instructions (Big thanks to vroad for figuring this out). Still in testing on m7vzw.
Installation
Note 1: Your device must not be encrypted (hint: if you don't know what it is, then it is not encrypted).
MultiROM has 3 parts you need to install:
MultiROM (multirom-YYYYMMDD-vXX-UNOFFICIAL-m7vzw.zip)) - download the ZIP file from second post and flash it in recovery.
Modified recovery (recovery_mrom_YYYYMMDD.img) - download the IMG file from second post and use fastboot or an app such as FlashImageGUI or Flashify to flash it.
Patched kernel - You absolutely MUST have a kernel with the kexec-hardboot patch on the primary ROM for this to work.
My latest Aosb and Aicp builds both have this.
The primary and secondary roms can share a kernel if you want to install one that is not patched, but may work with the primary one.
You current rom will not be erased by the installation.
Download links are in the second post.
fastboot flash recovery recovery.img (or use Flashify from the Play Store)
flash the MultiRom zip to prep the device for multi booting
Flash an internal rom with a kexec hardboot patched kernel
For now, I recommend using two Aosp roms until Sense roms are further tested by me.
If you are feeling experimental, I will include a process for trying this now if you wish.
Using USB drive
During installation, recovery lets you select install location.
Plug in the USB drive, wait a while and press "refresh" so that it shows partitions on the USB drive.
You just select the location and proceed with the installation.
Note: In theory, FAT32, EXT4, and NTFS partitions should all be supported. However, using a FAT32 partition may result in a failed flash.
I have not tried NTFS. If you want to boot off of your USB drive, I recommend putting a dedicated EXT4 partition for booting ROMs.
Also, I was unable to boot off of a thumb drive without sharing a kernel with the primary ROM or using a patched kernel on the secondary ROM.
So if you are going to do this, any ROM you want to boot off of the USB drive ALSO needs a patched kernel.
If you wanna use other than default FAT32 partition, just format it in PC. If you don't know how/don't know where to find out how, you probably should not try installing MultiROM.
If you are installing to NTFS or FAT32 partition, recovery asks you to set image size for all the partitions - this cannot be easilly changed afterward, so choose carefully.
FAT32 is limited to maximum of 4095MB per image - it is limitation of the filesystem, I can do nothing about that.
Installation to USB drives takes a bit longer, because the flash drive is (usually) slower and it needs to create the images, so installation of Ubuntu to 4Gb image on my pretty fast USB drive takes about 20 minutes.
Enumerating USB drive can take a while in MultiROM menu, so when you press the "USB" button in MultiROM, wait a while (max. 30-45s) until it searches the USB drive. It does it by itself, no need to press something, just wait.
Updating/changing ROMs
1. Primary ROM (Internal)
Flash ROM's ZIP file as usual, do factory reset if needed (it won't erase secondary ROMs)
Go to Advanced -> MultiROM in recovery and do Inject curr. boot sector.
2. Secondary Android ROMs
If you want to change the ROM, delete it and add new one. To update ROM, follow these steps:
Go to Advanced -> MultiROM -> List ROMs and select the ROM you want to update.
Select "Flash ZIP" and flash ROM's ZIP file.
In some cases, you might need to flash patched kernel - get coresponding patched kernel version from second post and flash it to the secondary ROM sama way you flashed ROM's ZIP file.
Explanation of recovery menus
Main menu
- Add ROM - add ROM to boot
- List ROMs - list installed ROMs and manage them
- Inject boot.img file - When you download a kernel which is distrubuted as whole boot.img, you have to use this option on it, otherwise you would lose MultiROM. (You will likely not need to use this option with most kernel installers)
- Inject curr. boot sector - Use this option if MultiROM does not show up on boot, for example after kernel installation.
- Settings - well, settings.
Manage ROM
- Rename, delete - I believe these are obvious
- Flash ZIP (only Android ROMs) - flash ZIP to the ROM, for example gapps
- Add/replace boot.img - replaces boot.img used by this ROM, this is more like developer option.
Source code
MultiRom - https://github.com/Tasssadar/multirom
Modified TWRP - https://github.com/Tasssadar/Team-Win-Recovery-Project (branch master)
kexec-hardboot patch - https://gist.github.com/Tasssadar/6733940
XDA:DevDB Information
Multi-Rom | m7vzw | Multi-Boot | Recovery, a Tool/Utility for the Verizon HTC One
Contributors
santod040
Version Information
Status: Testing
Current Beta Version: v22
Beta Release Date: 2014-03-16
Created 2014-03-17
Last Updated 2014-03-17
Reserved
Downloads
Modified MultiRom TWRP Recovery: DOWNLOAD
MultiROM m7vzw Zip: DOWNLOAD
My Aosp Kernel w/ kexec-hardboot patch: DOWNLOAD
Uninstaller: DOWNLOAD
Mount Disabler: DOWNLOAD (for Sense ROMs, see instructions below):
You don't need to flash mount-disabler onto primary ROMs.
You only have to flash mount-disabler onto Sense-based SECONDARY ROMs.
If you forget to flash it, Sense ROM's init will attempt to mount primary ROM's system/cache.
If something goes wrong and ROM doesn't boot, enter TWRP recovery and adb pull /proc/last_kmsg, which says why it didn't work.
FAQ and other notes
About security
In order to make multi-booting possible, MultiROM has to sacrifice some security measures.
Firstly, on secondary Android ROMs, /system is not mounted read-only.
While there are other things preventing malicious software from messing with /system, this might potentialy make it easier for such software to attack that system.
Next, MultiROM doesn't work with /data encryption. Not many people who use custom ROMs also use encryption anyway, so that isn't much of a concern.
What do the ROMs share?
All ROMs are separate, except /sdcard, which is shared between all Android ROMs.
How many ROMs can I have?/Where are the ROMs stored?
You can have as many ROMs as you can fit in your /sdcard (good thing HTC gave us a WHOPPING 32 gigs). All the ROMs are stored in /sdcard/multirom/roms or on an USB drive. This folder is unaccessible in Android, to prevent mediascanner from scanning it. You can either in recovery, or obtain root and go to /data/media/0/multirom/roms.
Can I have different versions of Android working alongside
Yes. As long as you select "Don't share kernel" when installing the secondary ROM, the systems are separated.
My secondary ROM doesn't boot if I share the kernel with the primary ROM.
Reinstall the secondary ROM, don't share the kernel this time, and flash the kernel you want to use to that ROM.
How to use Sense with MultiROM
Using Sense with MultiROM is complicated for a few reasons:
-The MultiROM boot menu doesn't show up with Sense ROMs for some unknown reason.
-Most Sense ROMs can't be flashed via the MultiROM menu because they mount partitions by explicitly using the mmc block. This causes the ROM to be partially install over the primary ROM. vroad has a pretty good explanation of why this happens:
Some users have already reported that ROMs with certain kind of updater-script will format system/data/cache of primary ROM slot, and overwrite to them, even though they have tried to flash onto secondary slot.
This is because these updater-script mount partitions with the name of block device(such as /dev/block/mmcblk0p34), not with mount points(such as /system).
-Sense ROMs also try to mount /system and /cache on boot, so the mount disabler zip is required for the ROM to boot properly.
To boot a secondary Sense ROM:
1. If you have an AOSP ROM already installed as your primary ROM, first go to Advanced > MultiROM > Swap ROMs and choose "move primary ROM to secondaries."
2. Install your Sense ROM as a primary ROM, just as you would with standard TWRP.
3. Go back to the Swap ROMs menu:
-If you had a previously installed AOSP ROM, choose "swap primary (Internal) ROM with secondary" and choose the AOSP ROM that you want to move to primary.
-Otherwise, choose "move primary ROM to secondaries"
4. Flash the Mount Disabler Zip to your secondary Sense ROM.
5. Insure that the primary AOSP ROM has a kernel with kexec-hardboot support as well as the MultiROM zip installed.
To update the secondary Sense ROM
1. Go to Advanced > MultiROM > Swap ROMs and choose " swap primary (Internal) ROM with secondary" and choose the Sense ROM you want to update.
2. Flash the ROM update to the primary ROM slot (just as you would with standard TWRP)
3. Go back to the Swap ROMs menu, and choose "swap primary (Internal) ROM with secondary" and choose the AOSP ROM that you want to move to primary.
4. Flash the Mount Disabler zip to your secondary Sense ROM.
If you do not follow these instructions properly, you will end up with a corrupted, half-Sense half-AOSP primary ROM and a secondary ROM that doesn't boot.
Kitk-Kat only. JB Sense ROMs most likely will not work.
Reserved
and one more....
Great work !! Was waiting for this for a long time...
mount disabler zip
Where do we find mount disabler zip, don't see a link to dl
kc6wke said:
Where do we find mount disabler zip, don't see a link to dl
Click to expand...
Click to collapse
Added to second post.
Just know that multi booting sense roms is still in testing, so results may vary.
So, If I am on rooted stock, can I install MultiRom and keep my stock as internal? Or do I have to use AOSP as internal and flash a new kernel? I'm assuming if stock was a necessity I would uninstall MultiRom, reinstall TWRP, then flash stock back.
jodaschmo said:
So, If I am on rooted stock, can I install MultiRom and keep my stock as internal? Or do I have to use AOSP as internal and flash a new kernel? I'm assuming if stock was a necessity I would uninstall MultiRom, reinstall TWRP, then flash stock back.
Click to expand...
Click to collapse
The internal rom must have a kernel with a Kexec hardboot patch.
The stock kernel does not have this.
Could I, given I have a backup on my computer, so I can still revert, Flash your kexec kernel over Stock,or do I have to go pure AOSP? Trying not to sound too ignorant...
jodaschmo said:
Could I, given I have a backup on my computer, so I can still revert, Flash your kexec kernel over Stock,or do I have to go pure AOSP? Trying not to sound too ignorant...
Click to expand...
Click to collapse
As of right now, as mentioned, multi booting sense roms on the m7vzw is still being tested and worked out.
This was initially intended for multi booting Aosp roms.
If you are not familiar with any of this or well adversed with messing up and recovering your device, I advise sticking with Aosp roms on this for now.
The kernel I posted is an Aosp kernel, it will not work correctly, if at all, on a Sense rom.
Makes sense. Cool, so I can update Carbon's Kernel, and work with what ever else. How does this fair for MIUI? I'm assuming it depends on the base rom?
jodaschmo said:
Makes sense. Cool, so I can update Carbon's Kernel, and work with what ever else. How does this fair for MIUI? I'm assuming it depends on the base rom?
Click to expand...
Click to collapse
Depends on the base rom and the m7vzw has no fully functional miui currently, so I would say it doesn't work with miui for now.
Yes you can update Carbons kernel and then add a secondary rom.
I would use another Aosp rom and just share the kernel across the two.
You do not need to share the kernel across the two, if you are certain that the secondary rom has a kexec hardboot patch.
I would assume they do not, unless stated specifically in the kernel threads OP, or ask that kernel Dev.
Hopefully the one I have posted works across enough Aosp roms, that it's fairly universal and fully featured.
santod040 said:
Depends on the base rom and the m7vzw has no fully functional miui currently, so I would say it doesn't work with miui for now.
Yes you can update Carbons kernel and then add a secondary rom.
I would use another Aosp rom and just share the kernel across the two.
You do not need to share the kernel across the two, if you are certain that the secondary rom has a kexec hardboot patch.
I would assume they do not, unless stated specifically in the kernel threads OP, or ask that kernel Dev.
Hopefully the one I have posted works across enough Aosp roms, that it's fairly universal and fully featured.
Click to expand...
Click to collapse
any update to this coming?? seems like a fun thing to have that and ive been trying it but it wont flash updated cm build and the kernel gives me black screen on the newer aosp roms ? lol
Alpha_wolf said:
any update to this coming?? seems like a fun thing to have that and ive been trying it but it wont flash updated cm build and the kernel gives me black screen on the newer aosp roms ? lol
Click to expand...
Click to collapse
It's a bit of work to keep current and I didn't see much interest to be honest.
So it's been on the back burner for a bit.
If I get some free time and find myself bored, I may bring it current again.
Just couldn't justify spending a lot of time on something that very few are interested in.
Sent from my HTC6525LVW using Tapatalk
santod040 said:
It's a bit of work to keep current and I didn't see much interest to be honest.
So it's been on the back burner for a bit.
If I get some free time and find myself bored, I may bring it current again.
Just couldn't justify spending a lot of time on something that very few are interested in.
Sent from my HTC6525LVW using Tapatalk
Click to expand...
Click to collapse
oh ok no prob if you do update id enjoy it lol be fun thing to have
Agreed! Especially if it would work with an internal sense rom. Anyone know if Viper kernel has kexec-hardboot patch?
Alpha_wolf said:
oh ok no prob if you do update id enjoy it lol be fun thing to have
Click to expand...
Click to collapse
Can someone please port this to sprint varient or lead me in the right direction , I have seen the op to port but still don't understand it willing to use and test my device for this
santod040 said:
Introduction
This is a port of Tasssadar's MultiROM.
MultiROM allows you to boot multiple ROMs on the same device (as well as, in theory, Linux distros, if there were any available for our device, or android-based operating systems such as Ubuntu Touch).
ROMs are flashed in the modified recovery, and upon booting the phone, you have a boot menu that will allow you to choose which ROM you want to boot.
You can also boot ROMs off of a USB drive connected via an OTG cable (**There are some limitations to this, keep reading for details**).
First of all, I would like to thank Tasssadar because this is 100% his work. If you enjoy MultiROM, feel free to donate to him.
I have just ported it to Kitkat for the Verizon HTC One.
MultiROM in action:
Warning!
It _is_ dangerous. This whole thing is basically one giant hack - none of these systems are made with multibooting in mind.
It is no longer messing with data partition or boot sector, but it is possible that something goes wrong and you will have to flash factory images again.
Make backups. Always.
Sense ROM Support
MultiROM is now able to boot Sense ROMs (as secondary only), but the process is a little more complicated.
See second post for step-by-step instructions (Big thanks to vroad for figuring this out). Still in testing on m7vzw.
Installation
Note 1: Your device must not be encrypted (hint: if you don't know what it is, then it is not encrypted).
MultiROM has 3 parts you need to install:
MultiROM (multirom-YYYYMMDD-vXX-UNOFFICIAL-m7vzw.zip)) - download the ZIP file from second post and flash it in recovery.
Modified recovery (recovery_mrom_YYYYMMDD.img) - download the IMG file from second post and use fastboot or an app such as FlashImageGUI or Flashify to flash it.
Patched kernel - You absolutely MUST have a kernel with the kexec-hardboot patch on the primary ROM for this to work.
My latest Aosb and Aicp builds both have this.
The primary and secondary roms can share a kernel if you want to install one that is not patched, but may work with the primary one.
You current rom will not be erased by the installation.
Download links are in the second post.
fastboot flash recovery recovery.img (or use Flashify from the Play Store)
flash the MultiRom zip to prep the device for multi booting
Flash an internal rom with a kexec hardboot patched kernel
For now, I recommend using two Aosp roms until Sense roms are further tested by me.
If you are feeling experimental, I will include a process for trying this now if you wish.
Using USB drive
During installation, recovery lets you select install location.
Plug in the USB drive, wait a while and press "refresh" so that it shows partitions on the USB drive.
You just select the location and proceed with the installation.
Note: In theory, FAT32, EXT4, and NTFS partitions should all be supported. However, using a FAT32 partition may result in a failed flash.
I have not tried NTFS. If you want to boot off of your USB drive, I recommend putting a dedicated EXT4 partition for booting ROMs.
Also, I was unable to boot off of a thumb drive without sharing a kernel with the primary ROM or using a patched kernel on the secondary ROM.
So if you are going to do this, any ROM you want to boot off of the USB drive ALSO needs a patched kernel.
If you wanna use other than default FAT32 partition, just format it in PC. If you don't know how/don't know where to find out how, you probably should not try installing MultiROM.
If you are installing to NTFS or FAT32 partition, recovery asks you to set image size for all the partitions - this cannot be easilly changed afterward, so choose carefully.
FAT32 is limited to maximum of 4095MB per image - it is limitation of the filesystem, I can do nothing about that.
Installation to USB drives takes a bit longer, because the flash drive is (usually) slower and it needs to create the images, so installation of Ubuntu to 4Gb image on my pretty fast USB drive takes about 20 minutes.
Enumerating USB drive can take a while in MultiROM menu, so when you press the "USB" button in MultiROM, wait a while (max. 30-45s) until it searches the USB drive. It does it by itself, no need to press something, just wait.
Updating/changing ROMs
1. Primary ROM (Internal)
Flash ROM's ZIP file as usual, do factory reset if needed (it won't erase secondary ROMs)
Go to Advanced -> MultiROM in recovery and do Inject curr. boot sector.
2. Secondary Android ROMs
If you want to change the ROM, delete it and add new one. To update ROM, follow these steps:
Go to Advanced -> MultiROM -> List ROMs and select the ROM you want to update.
Select "Flash ZIP" and flash ROM's ZIP file.
In some cases, you might need to flash patched kernel - get coresponding patched kernel version from second post and flash it to the secondary ROM sama way you flashed ROM's ZIP file.
Explanation of recovery menus
Main menu
- Add ROM - add ROM to boot
- List ROMs - list installed ROMs and manage them
- Inject boot.img file - When you download a kernel which is distrubuted as whole boot.img, you have to use this option on it, otherwise you would lose MultiROM. (You will likely not need to use this option with most kernel installers)
- Inject curr. boot sector - Use this option if MultiROM does not show up on boot, for example after kernel installation.
- Settings - well, settings.
Manage ROM
- Rename, delete - I believe these are obvious
- Flash ZIP (only Android ROMs) - flash ZIP to the ROM, for example gapps
- Add/replace boot.img - replaces boot.img used by this ROM, this is more like developer option.
Source code
MultiRom - https://github.com/Tasssadar/multirom
Modified TWRP - https://github.com/Tasssadar/Team-Win-Recovery-Project (branch master)
kexec-hardboot patch - https://gist.github.com/Tasssadar/6733940
XDA:DevDB Information
Multi-Rom | m7vzw | Multi-Boot | Recovery, a Tool/Utility for the Verizon HTC One
Contributors
santod040
Version Information
Status: Testing
Current Beta Version: v22
Beta Release Date: 2014-03-16
Created 2014-03-17
Last Updated 2014-03-17
Click to expand...
Click to collapse
kexec-hardboot patch for M7wlv CyanogenMod14.1 ?
JB sediKERNEL for the LG F3Q (codenames: FX3Q, D520)
This is the JB stock Kernel build from the LG source code.
It is modified to be able to boot on a unlocked bootloader (loki) and may contain other features in the near future.
Current features (always for the latest version):
Same as stock but build from the sources
Compatible with the locked bootloader (means loki'ed)
XATTR enabled
SELinux enabled
dmesg will provide human readable timestamps (too)
KEXEC patches available (but not applied(anymore))
Will ignore crappy LG bootloader args
Will not do a AUTOMATIC HIDDEN factory reset when kernel panics occur
Will not enforce LG signed image anymore
AROMA flashing ZIP file available! This will flash the sediKERNEL into the right place (boot partition of course ) and wipe dalvik cache for you.
With this no "adb shell + dd" etc are needed anymore. Just flash the ZIP in twrp (read the instructions at the bottom of this post).
Take a preview look at the attached images (see bottom of this post!) of the installer process - as you can see this is really easy and straight forward, isn't it?
magic key feature for booting into recovery instead of normal boot! This superseedes all the problems regarding how to reach the recovery mode when the system is damaged!!
Usage instructions:
Power on the device
when you see the LG logo the first time do NOTHING!!
When the screen goes black THEN press Volume UP + Volume DOWN. Both the same time and hold them pressed.
Release the buttons when the screen goes black again
Wait. You will see the LG logo a third time and then you will see the recovery screen!
If you see a kernel crash then you have pressed the magic keys too early! Read and follow the above steps carefully and you should be fine.
No hacks anymore, no special installation instructions to workaround things, not breaking or damaging data or anything. Just using those keys and be happy!
Known issues (always for the latest version):
High (always for the latest version):
None (known)
Medium (always for the latest version):
None (known)
Minor (always for the latest version):
When booting up while the USB cable is connected you will see the charger image instead of boot directly - even when there is enough battery capacity. Simply press power button or boot without the cable connected.
Version >= 2.0: in rare situation when you use the magic key press (vol up+down) to boot into recovery a kernel crash can occur when you have not followed the instructions step by step. This is not a problem of the kernel! It is because of a timing issue of the hook used to get into recovery when you press the magic keys too early. Simply follow the instructions and you should be fine. If you still see a crash let me know and try it again it should really work the described way.
Development progress
sediKERNEL v3.0
Current progress:
Building a custom kernel without stock initrd (that means building an own initrd which works. atm I use the custom compiled Kernel + stock initrd)
Latest stable version: sediKERNEL v2.0
Download:
USE THAT ON YOUR OWN RISK!
ZIP flashable file (see instructions at the OP thread): sediKERNEL
DD Image file (see instructions at the OP thread): really? ok if you don't like AROMA open the ZIP and use the /kernel/sediKERNEL...lok file
Changelog:
For changelog see Changelog post
Previous versions:
see Changelog post
Installation Instructions (all versions)
Pre-Requirements (both methods)
Bravery & the will to change things for a better world
You should have rooted the device
You need either CWM (not my preferred choice) or TWRP installed (TWRP is highly recommended)
Method1: Based on ZIP (AROMA installer)
DO A BACKUP! For example execute: dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/STOCK_boot.img <- This will backup your current boot partition to your external SD card.
If you have adb installed (install it here if you like: @lifehacker) the command would be:
adb shell "su -c dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/STOCK_boot.img"
Download the sediKERNEL ZIP file
Extract that ZIP on your PC.
Copy or push BOTH files to your F3Q (the ZIP you extracted + the MD5 file).
You can do this by mount the F3Q normally and use MTP or adb if you like:
e.g when in booted stock ROM: "adb push ZIPfile /storage/external_SD/" & once again for the md5 file: "adb push MD5file /storage/external_SD/"
Reboot into recovery (e.g. execute: "adb reboot recovery")
Flash the ZIP & enjoy the magic
Done
Method2: Based on DD
DO A BACKUP! For example execute: dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/STOCK_boot.img <- This will backup your current boot partition to your external SD card.
If you have adb installed (install it here if you like: @lifehacker) the command would be:
adb shell "su -c dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/STOCK_boot.img"
Download the sediKERNEL Image file
Put that image file to your F3Q (e.g when in booted stock ROM: "adb push imagefile /storage/external_SD/")
Reboot into recovery (e.g. execute: "adb reboot recovery")
execute: dd if=/storage/external_SD/your-uploaded-imagefile of=/dev/block/platform/msm_sdcc.1/by-name/boot
wipe dalvik cache (IMPORTANT!). Example: "adb shell mount /data and then: adb shell 'rm -R /data/dalvik-cache' " when recovery has booted up.
Done
Sources:
My current kernel setup of the fx3q sediKERNEL build can be found here: kernel_lge_fx3q_aosp
.
XDA:DevDB Information
[KERNEL][STOCK/AOSP][JB] sediKERNEL for LG Optimus F3Q, Kernel for the General Discussion
Contributors
xdajog, joel.maxuel
Source Code: https://github.com/xdajog/kernel_fx3q_aosp
Kernel Special Features:
Version Information
Status: Stable
Current Stable Version: v2.0_build28
Stable Release Date: 2015-05-13
Created 2015-05-19
Last Updated 2015-05-19
Changelog
sediKERNEL v2.0 (build28)
Enhancements:
Busybox (busybox_nonselinux_1.23.1) added to initial ramdisk (to get all the commands needed for the magic recovery boot keys)
Toolbox added (to get a working reboot command for the magic recovery boot keys)
added magic key press detection for booting into recovery! This superseedes all the problems regarding how to reach the recovery mode when the system is damaged!!
Usage instructions:
Power on the device
when you see the LG logo the first time do NOTHING!!
When the screen goes black THEN press Volume UP + Volume DOWN. Both the same time and hold them pressed.
Release the buttons when the screen goes black again
Wait. You will see the LG logo a third time and then you will see the recovery screen!
If you see a kernel crash then you have pressed the magic keys too early! Read and follow the above steps carefully and you should be fine.
ing those keys and be happy!
AROMA flashing ZIP file available! This will flash the sediKERNEL into the right place (boot partition of course ) and wipe dalvik cache for you. Enjoy
Fixes:
sediKERNEL version string was not optimal
Version was "Unavailable" at "About Phone" --> "Software Version" --> "Kernel Version". This was because the regex awaits "()" to filter out the correct version string. So the fix was to add build details into brakes and double escape CONFIG_LOCALVERSION string. Using EXTRAVERSION within the Makefile brakes Kernel module build when used.
Download:
USE THAT ON YOUR OWN RISK!
ZIP flashable file (see instructions at the OP thread): sediKERNEL v2.0
DD Image file (see instructions at the OP thread): open the ZIP and use the /kernel/sediKERNEL...lok file
sediKERNEL v1.5
Enhancements:
removed all kexec patches and kexec support because we do not need it atm (I want to avoid issues)
added version string to kernel (uname -a)
Fixes:
may fixes kernel crash in rare situations (kexec related)
Download:
USE THAT ON YOUR OWN RISK!
DD Image file (see instructions at the OP thread): sediKERNEL_JB-v1.5_build6.img
ZIP flashable file (see instructions at the OP thread): N / A
sediKERNEL v1.2
Enhancements:
Will ignore crappy LG bootloader args
Will not do a factory reset when kernel panics occur
Will not enforce LG signed image
Fixes:
This may fixes LG security errors (need feedback..)
May fixes a problem booting custom ROMs
Download:
USE THAT ON YOUR OWN RISK!
DD Image file (see instructions at the OP thread): sediKERNEL_JB-v1.2_26.img
ZIP flashable file (see instructions at the OP thread): N / A
sediKERNEL v1.0
Enhancements:
Same as stock but build from the sources
Compatible with the locked bootloader (means loki'ed)
XATTR enabled
KEXEC patches applied !
SELinux capable
Booting successful (tested on stock ROM)
Wi-Fi (tested on stock ROM)
Fixes:
TWRP is not unhappy anymore because of missing xattr and selinux
Download:
USE THAT ON YOUR OWN RISK!
DD Image file (see instructions at the OP thread): sediKERNEL_JB-v1.0.1.img
Reserved 2
IN THE MEANTIME YOU COULD USE THIS POST FOR ANOTHER THANKS CLICK
I appreciate all the work being done.
Would this be a solution to "Security Error" bootloops I am getting with my de-bloated ROM?
joel.maxuel said:
I appreciate all the work being done.
Would this be a solution to "Security Error" bootloops I am getting with my de-bloated ROM?
Click to expand...
Click to collapse
Possible but if you still getting security error bootloops when using this kernel then it may has something to do with a removed LG app.
It depends at which stage that security error occurs. If it appears directly when booting up it should not occur with sediKERNEL but if it booting up and you see the error then first it should be app related.
-----
Sent from my SGH-I927 using XDA Android mobile app
xdajog said:
Possible but if you still getting security error bootloops when using this kernel then it may has something to do with a removed LG app.
It depends at which stage that security error occurs. If it appears directly when booting up it should not occur with sediKERNEL but if it booting up and you see the error then first it should be app related.
Click to expand...
Click to collapse
Yeah, the error I received using the stock kernel threw before the boot animation occurred, but after the LG logo.
I read somewhere that the Security Error comes up when you even remove Videos.apk. Hopefully that is kernel related and will go away with sediKERNEL.
joel.maxuel said:
Yeah, the error I received using the stock kernel threw before the boot animation occurred, but after the LG logo.
I read somewhere that the Security Error comes up when you even remove Videos.apk. Hopefully that is kernel related and will go away with sediKERNEL.
Click to expand...
Click to collapse
Well there are 2 stages where the LG logo will be displayed:
1) When powering on the device -> that is a static LG Logo and is shown shortly after powering on
2) When booting the Kernel -> that is the same looking LG Logo but there is a little little animation on it
I think that you will receive that Security Error after stage 1 and before stage 2 so when booting the kernel and that should be fixed using sediKERNEL.
xdajog said:
Well there are 2 stages where the LG logo will be displayed:
1) When powering on the device -> that is a static LG Logo and is shown shortly after powering on
2) When booting the Kernel -> that is the same looking LG Logo but there is a little little animation on it
I think that you will receive that Security Error after stage 1 and before stage 2 so when booting the kernel and that should be fixed using sediKERNEL.
Click to expand...
Click to collapse
Oh okay. It must be ROM based then. Because I think I did get to stage 2 before the security error threw.
joel.maxuel said:
Oh okay. It must be ROM based then. Because I think I did get to stage 2 before the security error threw.
Click to expand...
Click to collapse
nevertheless it would worth to try the sediKERNEL
xdajog said:
nevertheless it would worth to try the sediKERNEL
Click to expand...
Click to collapse
Agreed. I will hold off until v1.5 is released since that one looks more promising.
joel.maxuel said:
Agreed. I will hold off until v1.5 is released since that one looks more promising.
Click to expand...
Click to collapse
Code:
Latest available version
sediKERNEL v1.2
Enhancements:
Will ignore crappy LG bootloader args
Will not do a factory reset when kernel panics occur
Will not enforce LG signed image
Fixes:
This may fixes LG security errors (need feedback..)
May fixes a problem booting custom ROMs
Ok no appologies anymore try it
So I noticed a couple things over the past few days with the kernel.
The first is minor. When doing a reboot from recovery you need to make sure the USB cable is disconnected. The impact is that the phone goes to charge mode if the cable is still connected.
The other, well, gives a real good reason to have the really bulletproof method with TWRP. The hotkeys to the bootloader no longer work. I was testing an AOSP keyboard with my ROM (think I know what to do now) when the setup wizard crashed continually, leaving me soft bricked. Luckily download mode still works.
So tonight I am using the spare, until I get the F3Q rooted, recoveried, and restored (again).
Not to complain, I really appreciate all the work done, thought you would want to know any drawbacks with the current version.
Sent from my MyTouch 4G Slide
joel.maxuel said:
The other, well, gives a real good reason to have the really bulletproof method with TWRP. The hotkeys to the bootloader no longer work.
Click to expand...
Click to collapse
Many thx for your feedback!
Hm interesting. I use method 2 and the hotkeys are still working. AFAIK those hotkeys are integrated in the bootloader and that one will never be touched by any method. Strange..
-----
Sent from my SGH-I927 using XDA Android mobile app
xdajog said:
Hm interesting. I use method 2 and the hotkeys are still working. AFAIK those hotkeys are integrated in the bootloader and that one will never be touched by any method. Strange..
Click to expand...
Click to collapse
There are so many hotkey variations across brands I lose track of the combo (keys pressed, how long). But I did try pwr +vol-dn, pwr + vol-up, even the three finger salute. Sometimes holding until the first LG logo shows, other times until the boot animation comes up (that's when I know I am screwed). I could still be doing it wrong...
Where is the bootloader stored anyway? Could it be that the opportunity for loading the bootloaders factory reset is during the kernel loading stage? TWRP kernel could still have those functions/flags. With a flipped boot and recovery image noted in method 2, that would make sense why your setup works.
Sent from my MyTouch 4G Slide
joel.maxuel said:
There are so many hotkey variations across brands I lose track of the combo (keys pressed, how long). But I did try pwr +vol-dn, pwr + vol-up, even the three finger salute. Sometimes holding until the first LG logo shows, other times until the boot animation comes up (that's when I know I am screwed). I could still be doing it wrong...
Where is the bootloader stored anyway? Could it be that the opportunity for loading the bootloaders factory reset is during the kernel loading stage? TWRP kernel could still have those functions/flags. With a flipped boot and recovery image noted in method 2, that would make sense why your setup works.
Sent from my MyTouch 4G Slide
Click to expand...
Click to collapse
The trick is to take out the battery , pressing vol+down and power while putting back the battery again. This will work 100%.
Any tries without putting out the battery may not work.
The bootloader is in "aboot" partition and i do not think it will have to do with the kernel. The reason why I can say that for near sure is that:
I tried to grab the key pressed while booting up which will be done in the init process. You can define things within an init script also key presses but they do not work while _booting_! They will work when booted up only so I tried to find out any other methods. The most meaningful would be to do that manually by writing a program to grab the key events. But at least I can say that I found no ressources about doing that other then described.
Because of that and because the bootloader steps into factory reset before kernel loads I do not think that there is anything kernel related. I think that the battery pull out will work in any case...
-----
Sent from my SGH-I927 using XDA Android mobile app
xdajog said:
The trick is to take out the battery , pressing vol+down and power while putting back the battery again. This will work 100%.
Any tries without putting out the battery may not work.
The bootloader is in "aboot" partition and i do not think it will have to do with the kernel. The reason why I can say that for near sure is that:
I tried to grab the key pressed while booting up which will be done in the init process. You can define things within an init script also key presses but they do not work while _booting_! They will work when booted up only so I tried to find out any other methods. The most meaningful would be to do that manually by writing a program to grab the key events. But at least I can say that I found no ressources about doing that other then described.
Because of that and because the bootloader steps into factory reset before kernel loads I do not think that there is anything kernel related. I think that the battery pull out will work in any case...
Click to expand...
Click to collapse
Okay, just to make things weird, I had an opportunity to do the trick. It did not work, and I had to use the LG tool again.
It seems to bypass those keys pressed. Luckily download mode still works, or else I'd be screwed royally.
So going off-topic, why did I kill my phone again? Well, it all has to do with the LG Keyboard (onscreen) failing. With the ROM I have posted, it's "Unfortunately, LG Keyboard has stopped" over and over again. Yesterday, I made a version of the ROM with the AOSP Keyboard APK replacing the Lucky Goldstar version. Same problem, except this time it's "Unfortunately, AOSP Keyboard has stopped" over and over again. Okay, so I finished the setup wizard, turned on developer mode, fired up ADB, deleted the AOSP Keyboard from the /system/app folder and installed it as a userapp. No problem. So I thought, hmmm, would this APK work if I fire it in the /system/apps/bootup folder and let it install as a userapp when the ROM first boots?
I was going to test that theory, but when I rebooted into recovery (with the debloated ROM without any keyboard apps), wiped userdata and cache, I mispelled recovery when I issued the adb shell command "reboot recovery". That made it reboot into system, and things went downhill once I could not get past the LG Setup Wizard that was continually crashing.
So, LG tool'ed back to stock, rooted, recoveried and I thought, before I restore my precious backup I should try the ROM I created, answer that question once and for all. I wiped userdata and cache, rebooted back into recovery (spelling correct this time), flashed it, rebooted, and....
AOSP Keyboard crashed once (or more), in between all the LG Setup Wizard force closes. So I backed out and restored everything (again). I now have two pieces of homework:
Find a way to have developer mode on by default, so I can make (potentially) changes to the ROM if I am in this situation again.
Investigate if LG Setup Wizard is even needed, as it is really annoying me right now. If it's not, consider it gone!
Solve these two, and I should have something a lot closer to beta.
joel.maxuel said:
Okay, just to make things weird, I had an opportunity to do the trick. It did not work, and I had to use the LG tool again.
It seems to bypass those keys pressed. Luckily download mode still works, or else I'd be screwed royally.
Click to expand...
Click to collapse
hm... yea download mode should work always as this is totally independent from that. But the main difference in the latest sediKERNEL is that it completely ignores the bootloader arguments.
I thought always that the "Factory Hard Reset" screen was/is hardcoded within the bootloader but your tests showing that this can not be (fully) true. You should at least SEE the screen where you need to confirm the factory reset then. Well that could mean it either checks for the existence of kernel or this screen IS from the kernel itself! At least the last one could be tracked I will investigate that theory because if that is the case then there would be a hook where we could load TWRP instead e.g...
...
Update: Ok search is over. There is no trace found withing the kernel sources or the end result which contains the factory hard reset strings.
That said I think the LG factory reset needs a working kernel available...
That is my theory but could be "easy" verified/declined by following those steps. Maybe if you get into that situation again you could try?
deleting partition "boot" (dd /dev/zero..). If factory reset is still showing fine (it could be enough to still have a kernel in recovery). If not well then we need a working kernel/boot image to reach factory reset and you can ABORT HERE..
Then flash sediKERNEL to the boot partition and verify that it is booting.
from there delete the recovery partition (dd /dev/zero..).
Try to get into the factory reset again. If the screen "Factory Hard Reset" is displayed fine (it could be enough to either have a kernel in recovery or in boot). If not then we need a working kernel/recovery image to reach factory reset and you can ABORT HERE..
boot into system again
Now the wicked part: delete recovery partition and boot partition (dd ..) --> THIS MEANS: SOFT-BRICKING! but it is the only way to say it for absolutely sure (if the above both tries still showing the factory reset)..
turn out the battery. try to open the factory reset.
If the screen "Factory Hard Reset" is displayed that would be a clear decline of my theory!
If you do not see the screen "Factory Hard Reset" then it means we need a working kernel / boot / recovery partition in order to reach the factory reset screen!
well and now you need to use the download mode again to unbrick the device of course..
So going off-topic, why did I kill my phone again? Well, it all has to do with the LG Keyboard (onscreen) failing. With the ROM I have posted, it's "Unfortunately, LG Keyboard has stopped" over and over again. Yesterday, I made a version of the ROM with the AOSP Keyboard APK replacing the Lucky Goldstar version. Same problem, except this time it's "Unfortunately, AOSP Keyboard has stopped" over and over again. Okay, so I finished the setup wizard, turned on developer mode, fired up ADB, deleted the AOSP Keyboard from the /system/app folder and installed it as a userapp. No problem. So I thought, hmmm, would this APK work if I fire it in the /system/apps/bootup folder and let it install as a userapp when the ROM first boots?
I was going to test that theory, but when I rebooted into recovery (with the debloated ROM without any keyboard apps), wiped userdata and cache, I mispelled recovery when I issued the adb shell command "reboot recovery". That made it reboot into system, and things went downhill once I could not get past the LG Setup Wizard that was continually crashing.
So, LG tool'ed back to stock, rooted, recoveried and I thought, before I restore my precious backup I should try the ROM I created, answer that question once and for all. I wiped userdata and cache, rebooted back into recovery (spelling correct this time), flashed it, rebooted, and....
AOSP Keyboard crashed once (or more), in between all the LG Setup Wizard force closes. So I backed out and restored everything (again). I now have two pieces of homework:
Find a way to have developer mode on by default, so I can make (potentially) changes to the ROM if I am in this situation again.
Investigate if LG Setup Wizard is even needed, as it is really annoying me right now. If it's not, consider it gone!
Solve these two, and I should have something a lot closer to beta.
Click to expand...
Click to collapse
In order to turn on the usb debugger mode: within your ROM zip file modify this file "/system/build.prop"
Code:
persist.service.adb.enable=1
Optionally:
if you want to do root commands over adb I/you could modify in the "default.prop" file which is within the kernel's initrd:
Code:
ADD: ro.secure=0
REMOVE (if exist): ro.debuggable=0
Regarding your keyboard FCs:
I remember that I had the same issues within my Captivate ROM I build. There I tried to add the Kii Keyboard to the stock ROM image and that resulting in the same FC's you describing. My solution was to use another keyboard (in my case it was a samsung one) so I would suggest that you could try around with another keyboard instead of the AOSP one...
Good luck
xdajog said:
hm... yea download mode should work always as this is totally independent from that. But the main difference in the latest sediKERNEL is that it completely ignores the bootloader arguments.
I thought always that the "Factory Hard Reset" screen was/is hardcoded within the bootloader but your tests showing that this can not be (fully) true. You should at least SEE the screen where you need to confirm the factory reset then. Well that could mean it either checks for the existence of kernel or this screen IS from the kernel itself! At least the last one could be tracked I will investigate that theory because if that is the case then there would be a hook where we could load TWRP instead e.g...
...
Update: Ok search is over. There is no trace found withing the kernel sources or the end result which contains the factory hard reset strings.
That said I think the LG factory reset needs a working kernel available...
That is my theory but could be "easy" verified/declined by following those steps. Maybe if you get into that situation again you could try?
deleting partition "boot" (dd /dev/zero..). If factory reset is still showing fine (it could be enough to still have a kernel in recovery). If not well then we need a working kernel/boot image to reach factory reset and you can ABORT HERE..
Then flash sediKERNEL to the boot partition and verify that it is booting.
from there delete the recovery partition (dd /dev/zero..).
Try to get into the factory reset again. If the screen "Factory Hard Reset" is displayed fine (it could be enough to either have a kernel in recovery or in boot). If not then we need a working kernel/recovery image to reach factory reset and you can ABORT HERE..
boot into system again
Now the wicked part: delete recovery partition and boot partition (dd ..) --> THIS MEANS: SOFT-BRICKING! but it is the only way to say it for absolutely sure (if the above both tries still showing the factory reset)..
turn out the battery. try to open the factory reset.
If the screen "Factory Hard Reset" is displayed that would be a clear decline of my theory!
If you do not see the screen "Factory Hard Reset" then it means we need a working kernel / boot / recovery partition in order to reach the factory reset screen!
well and now you need to use the download mode again to unbrick the device of course..
Click to expand...
Click to collapse
Hopefully I don't end up in that situation again. However if I do, I still wouldn't be able to complete the test anyway because I would have no way of issuing (root) console commands. If I did, I could just execute my backup (I dd my partitions for this reason) restore plan (and get out of the mess easily).
Then I re-familiarized myself with this:
Code:
Enhancements:
Will ignore crappy LG bootloader args
Will not do a factory reset when kernel panics occur
Click to expand...
Click to collapse
What if the strings are in aboot, but the kernel flags merely throw the kernel into aboot if triggered by the hot-keys?
xdajog said:
In order to turn on the usb debugger mode: within your ROM zip file modify this file "/system/build.prop"
Code:
persist.service.adb.enable=1
Optionally:
if you want to do root commands over adb I/you could modify in the "default.prop" file which is within the kernel's initrd:
Code:
ADD: ro.secure=0
REMOVE (if exist): ro.debuggable=0
Regarding your keyboard FCs:
I remember that I had the same issues within my Captivate ROM I build. There I tried to add the Kii Keyboard to the stock ROM image and that resulting in the same FC's you describing. My solution was to use another keyboard (in my case it was a samsung one) so I would suggest that you could try around with another keyboard instead of the AOSP one...
Good luck
Click to expand...
Click to collapse
I will try the build.prop suggestion. It won't give me superuser (maybe you could do the default.prop modification?), but I could still install apks, which would have gotten me out of at least one mess. Although su would be nice. Could you integrate the modified default.prop into your kernel? :fingers-crossed:
As for the keyboards, I wonder if it's a permission thing. I will have to look at that when I get home. To be honest, I didn't look at what the permissions are set to (should be rw-r--r--), and I could/should rename the file to LatinIME.apk. There may also be a old library that is getting in the way. I also have a line on a different keyboard. Looks nice, just in the process of asking permission to use it first (based off of Google Keyboard).
sediKERNEL v1.5 released
Maybe the last version I release because no testing device anymore from now on:
sediKERNEL v1.5
Enhancements:
removed all kexec patches and kexec support because we do not need it atm (I want to avoid issues)
added version string to kernel (uname -a)
Fixes:
may fixes kernel crash in rare situations (kexec related)
Download:
see OP !
cheers
xdajog
i have LG Optimus L5 last year for 3 month. and some developed on him.
Not good phone the L3-L5-L7 phones LCD Quality is very low
rooted kernel hiding bootloader unlock
with working sony stock fw fota updates
for Sony Xperia XZ1 Compact
Firmware Over the Air system updates have been disabled/not working with sony xperia phones with unlocked bootloader.
Also many sony drm functions are disabled if fw detects unlocked bootloader even if device master key was recovered.
I've implemented a kernel patch for xperia XZ1 Compact / XZ1 / XZ Premium phones that properly masks bootloader unlock status so it appears as still locked for sony stock firmwares.
This allows FOTA updates to be installed if running completely unmodified stock firmware. This is possible if this kernel is just booted from usb via fastboot instead of flashing it.
The kernel is pre-rooted, so you can have root as usual with magisk when running this kernel (you can use magisk system less patching to make changes to system/vendor partitions without actually modifying them).
For oreo fw the boot process is patched to hide magisk from sony ric daemon that stops the boot in case it thinks the bootloader is still locked. This special patch allows to pass safetynet including cts while having properly working magisk.
This kernel may be used (flashed) just to properly enable sony drm features, like video image enhancements, if device master key was recovered via locked state TA restore.
The bellow described way to install FOTA system update works with both - phone with TA restored and phone with drm keys lost. Both variants have been tested with xz1c.
How to use this kernel while planning to do FOTA system update eventually
Update: please see here for the latest usage instructions for kernels in flashable zip archive.
Please see screenshots bellow for this kernel in action doing fota system update from oreo to pie and from pie to next pie version. There is also a video documenting this here. Few longer waiting parts have been cut out to fit the video under 15 minutes of youtube limit for not verified accounts.
if your bootloader is still locked
Use renoroot exploit to backup your TA, unlock your bootloader and restore TA-locked to recover device master key as described in
[XZ1c/XZ1/XZp] temp root exploit to backup drm keys implemented thread.
select one of the prepared kernels and download it
make sure you are running unmodified stock firmware
You need the version corresponding to the selected kernel - reflash the firmware to make sure it is unmodified.
Please note: any mount of /system or /vendor partitions in write mode would result with modifications even if nothing is copied there.
Be aware that some zip packages flashed from twrp may mount the partitions for write access even when that is not needed.
reboot the phone to fastboot mode
Use either "adb reboot bootloader" or
enter fastboot by holding powered off phone's volume up key while connecting it to PC via usb cable and use 'fastboot reboot bootloader' command.
boot the downloaded kernel via fastboot
For example:
Code:
fastboot boot boot-G8441-47.1.A.16.20-hideunlock-rooted.img
enjoy your rooted phone which thinks it is still locked
Sony apps will be offered to install/update. System FOTA update may come.
Magisk will provide your root when magisk manager app is installed (offered on the first boot).
if you need to use a custom recovery, like TWRP
Do not flash it. If you do, FOTA update verification will fail.
Instead use 'fastboot boot' the same way as with the kernel above, but instead of the kernel, boot the twrp image without flashing it.
to install a FOTA system update
just start the update as usual
let it run until it finishes the installation
try to catch the restart then and hold volume up that time to enter fastboot
you need to use following command to make next boot working
Code:
fastboot reboot bootloader
use 'fastboot boot' to boot kernel for fw to which fota updating to,
for example:
Code:
fastboot boot boot-G8441-47.2.A.4.45-hideunlock-rooted.img
if you miss the restart (or do not have the right kernel version),
it does not matter, the installation will finish even when bootloader unlock is detected with the last reboot to updated system,
so just 'fastboot boot' the corresponding 'hideunlock-rooted' kernel then
Alternative use of this kernel
If you do not like booting from usb via fastboot to startup your phone, you can flash the kernel and boot normally.
But if you like to install FOTA system update then, you would need to flash the stock kernel first in order to make the fw untouched again (assuming no other changes to the fw, like system or vendor partitions, have been done) and boot the patched kernel via 'fastboot boot' as described above.
You can backup stock kernel (and recovery) to avoid need to download full stock fw when you need to restore stock kernel & recovery when you decide to install fota system update - see here and following post for more details please.
If you do not care about FOTA, just do not install it.
And use this kernel just to enable all sony drm features that are available on a locked phone (assuming locked state TA has been restored).
In case you like to make some modifications to system or vendor partitions (as you do not care about fota), you would need to disable verity in the kernel - please see post#3 for noverity variants of oreo kernels and linked post describing howto switch verity off via magisk in all pie kernels.
Downloads
See the post#2 please.
Source code
patched kernel sources to hide bootloader unlock (my-bluhide/* branches)
https://github.com/j4nn/sonyxperiadev-kernel-copyleft
patched magisk sources to hide magisk from sony ric daemon on early boot phase (v19.1-manager-v7.1.2-ric branch)
https://github.com/j4nn/Magisk/tree/v19.1-manager-v7.1.2-ric
The patches are provided under GPL (that means you may include them in your builds, but you need to provide buildable source of released binaries /true for any kernel change btw/).
Credits
Thanks to @tonsofquestions for lot of initial testing of this concept when I did not have a phone with unlocked bootloader and for discovering the need to reboot to fastboot by a command to make the 'fastboot boot' command properly boot the supplied kernel image.
Thanks to @topjohnwu for his excelent magisk tool.
If you find my work useful, consider donating here please:
https://j4nn.github.io/donate/
Thank you.
XDA:DevDB Information
kernel_bluhide_lilac, Kernel for the Sony Xperia XZ1 Compact
Contributors
j4nn
Source Code: https://github.com/j4nn/sonyxperiadev-kernel-copyleft
Kernel Special Features: proper hiding of bootloader unlock, sony ric with magisk hack
Version Information
Status: Stable
Stable Release Date: 2019-02-10
Created 2019-02-10
Last Updated 2019-08-07
Downloads
This is for alternative use only - please see post#10 of XZ1 thread for more details.
boot-G8441-47.1.A.16.20-hideunlock-magisk-19.1-noverity.img
Screenshots of FOTA system update from pie 47.2.A.4.45 to pie 47.2.A.6.30 version
(video available here since 08:10 time)
Downloads
- hideunlock kernel pre-rooted boot images:
boot-G8441-47.1.A.8.49-hideunlock-magisk-19.1.img
boot-G8441-47.1.A.12.34-hideunlock-magisk-19.1.img
boot-G8441-47.1.A.16.20-hideunlock-magisk-19.1.img
boot-G8441-47.2.A.4.45-hideunlock-rooted.img
boot-G8441-47.2.A.6.30-hideunlock-rooted.img
boot-G8441-47.2.A.8.24-hideunlock-rooted.img
boot-G8441-47.2.A.10.28-hideunlock-rooted.img
boot-G8441-47.2.A.10.45-hideunlock-rooted.img
boot-G8441-47.2.A.10.62-hideunlock-magisk-19.3.img
- hideunlock kernels flashable to multi fw versions (see here for usage howto):
kernel-G8441-47.1.A.16.20-hideunlock.zip
kernel-G8441-47.2.A.10.62-hideunlock.zip
kernel-G8441-47.2.A.10.80-hideunlock.zip
kernel-G8441-47.2.A.10.107-hideunlock.zip
kernel-G8441-47.2.A.11.228-hideunlock.zip
Screenshots of FOTA system update from oreo 47.1.A.16.20 to pie 47.2.A.4.45
(video available here)
Hey j4. Can I use this? Haven't changed anything since we did the TA work
Hi @tramtrist, good to hear you again... sure, you can use this. If you want to try FOTA, just be sure, you have full fw flashed without any changes.
Or just use the kernel to enable all drm features having device master key recovered by TA-locked restore.
The FOTA update from oreo to pie 4.45, followed by fota update to pie 6.30 was done using DE customization. You need to flash oem partition too, to get the expected fota update.
@j4nn hey I am on Oreo .20 and my boot loader is unlocked and I didn't make any backups can I use the kernel
@danish0175, if you mean you have not backed up & restored TA - you might use the above howto with the kernel to possibly test a FOTA system update.
But if you like to stay on oreo with here posted kernel, you can, but camera would not work - if I remember correctly - it does not produce solid green pictures, it kind of hangs instead.
It cannot be quit with back button, you can switch to other app or kill camera via the square button though.
It seems I'm on 47.2.A.4.41 which there is no kernel for... And I'm pretty sure /system would have been modified by installing magisk/adaway ... Can't find an FTF for G8441-47.2.A.4.45 to do the test so...... Maybe I should just flash the latest FTF
j4nn said:
But if you like to stay on oreo with here posted kernel, you can, but camera would not work - if I remember correctly - it does not produce solid green pictures, it kind of hangs instead.
Click to expand...
Click to collapse
If I remember correctly, I observed this behavior running the last Oreo firmware (TA restored) with the default kernel. Should it be this way?! At startup, the user interface of the camera app looked normal, but when I tried to take a photo, some GUI elements were lost and no photo was saved.
wow..awesome!!
tramtrist said:
Maybe I should just flash the latest FTF
Click to expand...
Click to collapse
Just do it!
Didgesteve said:
You should be able to flash almost any firmware version, I don't think there are different modem drivers for each region any more. I have tried several regions of firmware here in the UK and none have effected signal reception or strength.
Start with Xperiafirm and download the most recent firmware build.
Download newflasher and unpack it into the same folder as the firmware.
Delete userdataXXX.sin. Deleting this file from the folder preserves your data patition in the rebuild.
Turn off phone, completely, plug it in while holding the volume down, you should see a green light come on the phone, start newflasher, type 'n' to the first two questions.
This should get you the latest build phone with your data intact
Edit: If you have issues with the Sony ADB driver, apparently answering 'y' to the first question on newflasher, gets you a zip file with the drivers you need and you just unpack them.
Click to expand...
Click to collapse
vofferz said:
I used the TA backup and restore tools by @j4nn (Thank you!), updated to Pie with newflasher by flashing all but persist.sin and .ta-files. This of course resets data, but I had a new, empty phone anyway.
[...] downloaded the new firmware with Xperifirm. Deleted persist*.sin, userdata*.sin, cache*.sin and all .ta files [but do not delete the one located in 'boot' sub folder] and flashed with newflasher. [...] Everything still works, data, apps and settings from previous Pie version remain [...]
Click to expand...
Click to collapse
tramtrist said:
It seems I'm on 47.2.A.4.41 which there is no kernel for... And I'm pretty sure /system would have been modified by installing magisk/adaway ... Can't find an FTF for G8441-47.2.A.4.45 to do the test so...... Maybe I should just flash the latest FTF
Click to expand...
Click to collapse
You can download Customized DE 47.2.A.4.45 for G8441 here:
https://www.xperiasite.pl/topic/28560-g8441-472a445-germany/
or even the oreo 47.1.A.16.20 here:
https://www.xperiasite.pl/topic/27985-g8441-471a1620-germany/
(but that would obviously involve a downgrade erasing all data in your case)
The DE customization offers fota system update from 47.1.A.16.20 right to 47.2.A.4.45 with next one being 47.2.A.6.30.
Concerning AdAway and changes to /system - it may not be the case.
Magisk contains support to simulate write access to system hosts file.
Magisk itself is flashed to kernel partition (i.e. partition named 'boot').
So your setup (if no other changes) may need to reflash just stock kernel (and recovery aka fotakernel.sin if flashed twrp) to make it untouched.
But surely if you used twrp to flash many things, most likely /system or /vendor got modified, so you would need to reflash them to make them original stock, if wanted to test fota.
This is awesome, j4nn! Fantastic work.
I'm glad to have had the small part I did in enabling this to move forward.
This almost makes me consider going back to stock, but if I end up needing more security upgrades, maybe I'll switch over....
Successfully updated 47.2.A.4.45 -> 47.2.A.6.30 via OTA with this (on unlocked bootloader + restored TA), and things are working well, including video enhancement. Not sure how reboot catching is supposed to be done as the OTA involves at least 3 reboots (I think?), it seems to be much simpler to just let it finish and after it's back in the OS "adb reboot bootloader" to load the patched kernel. Anyway thanks again for you work.
@notaz, thank you for the test.
Concerning reboot catching - it has been proved it does not matter if it is finished with stock kernel (so that updated fw detects unlocked state on it's first boot) - installation has been finished anyway.
But it is not that difficult to "catch the right reboot" - when fota progress says "Installing system update", that is there for quite a long time with progress bar moving to the right, then the "Restarting" is the one which boots back to main system, so that is the moment to catch and make it boot to fastboot.
The videos I've posted show all the reboots and what is displayed before them, so one may check how it looks in advance to be prepared...
Updated post#3 - for alternative use only - please see post#10 of XZ1 thread for more details.
How to backup the original boot.img
I successfully update my xz1c from 4.45 to 6.30.Thank you for your great job.:good:
But I want to flash your boot.img, rather than boot via the usb.
So, I use 'fastboot boot recovery.img' to go to recovery, and backup the boot Partition(64M).
Am I wrong?Is there any else method?
terrible english
You can take kernel.sin from your ftf firmware, use unsin tool and you will have stock kernel.img
@outline941, or flash simply kernel.sin via newflasher directly in flash mode.
Hello @j4nn!
Could you please patch a new released kernel 47.2.A.8.24 for G8441?
Thx.
Hi,
Just wanted to know, are there any custom Kernels for MIUI ?
I can see there are now some custom roms but couldn't find any custom kernels, specifically any that work with MIUI ?
Thanks
I haven't seen any. I'm not sure there's any freestanding kernel for any ROM atm. From my experience, it is not trivial getting a working one for this phone (but I'm not really a phone dev, so YMMV).
If anyone tries building and booting a kernel for this phone, here are some things I've discovered on my own:
1) DTBO
a) official dtbo + non-official kernel = brick and requires SPFT
b) lineage dtbo + official kernel doesn't work (can't remember if it bricks or not)
c) lineage dtbo + custom kernels = ok
I've tried building a device tree manually, including the voodoo public key appends from HyperTeam's tree, but couldn't get one working.
It should be noted that any kind of broken dtbo results in a brick. Which seems weird, because fastboot should be implemented in lk...
2) Boot image
a) When building the image from the kernel, the offsets must be set correctly, especially kernel + ramdisk. For me this is complicated by a bug in the mkbootimg binary which needs a ramdisk with non-zero size to accept the offset.
b) The image must be signed with avbtool. Interestingly, partition name and size don't matter too much.
3) Charging light
When keeping the phone connected by usb, the charging/notification light is on while the phone is in preloader & lk. When the kernel boots successfully, it gets turned off. Checked it by comparing with pstore logs.
Also, there are some proprietary bits in the vendor partition interacting with some interfaces in the kernel which resulted in kernel oopses for me when trying to boot lineage (I'm seeing some page fault in nl80211_vendor_cmd). I'm expecting MIUI to be even worse.