FORUMS
Remove All Ads from XDA

[MULTIBOOT] [BETA] EFIDroid for Nexus 5

343 posts
Thanks Meter: 373
 
By lukss12, Senior Member on 28th March 2017, 04:58 PM
Post Reply Email Thread
I have ported EFIDroid (developed by @m11kkaa) for the Nexus 5.
@m11kkaa's original EFIDroid thread here: https://forum.xda-developers.com/and...droid-t3447466.



This is an unofficial port of beta software. I am not responsible for anything that may happen to your device. Use at your own risk.



NOTE: This has been tested with last LineageOS Build (21/03/2017) and TWRP 3.1.0-0. All other configurations are untested by me, but should work.

Working ROMs
[Here I will post the ROM's that are working for multiboot (Of course I will need people's feedback to fullfill this list)]
  • LineageOS 14.1 (As primary, as secondary with SELinux permissive option)
  • DU 11.2 (As primary, as secondary with SELinux permissive option) tested by @AndresOrue
  • PureNexus 7.1.1 (Should work as primary but not tested, as secondary with SELinux permissive option) tested by @AndresOrue
  • Lineage OS DarkRom by Dark_Eyes (As primary, not tested as secondary-should work with SELinux permissive option) tested by @willyinpr4u
  • AlmostVanillaAOSP Marshmallow (As primary, not tested as secondary-should work with SELinux permissive option) tested by @alessio89g
  • AOSP Nougat (Should work as primary but not tested, as secondary with SELinux permissive option) tested by @alessio89g
  • UntouchedAOSP 6.0.1 tested by @BreckZeBoulay
  • MiUI 8 tested by @sa4ni
  • Euclidean OS tested by @willyinpr4u
  • Xenon HD AOSP tested by @willyinpr4u
  • AICP 12.1 7.1.2 tested by @phpbb3
  • Elixr-hammerhead-V1.1-20140420 tested by @playerkirk1
  • Plasma-Mobile tested by me

Installation
  1. Install the attached EFIDroid Manager apk. Since this is an unofficial port, the EFIDroid Manager app from the Play Store won't work. (This is modified to use my unofficial server)
  2. Open the EFIDroid Manager app, open the menu (at the top left), and click "Install/Update".
  3. Click the big orange Install button.
And voila, you're done in 3 easy steps! Reboot to see your new 2nd-stage bootloader!
Post below with your installed ROM if you have success.

To update EFIDroid, just repeat step 2, and the click the big orange Update button.
The app won't automatically check for updates, so I'll post an announcement on this thread whenever an important update is available.

Migrating from MultiROM
TWRP Backups should work fine but as /sdcard gets mocked on TWRP for secondary ROMs to prevent an "accidental" wipe there is some steps to follow
1-Create a new slot
2-Go to /data/media/0/multiboot/your_new_slot/data
3-Create folder media/0/TWRP/BACKUPS
4-Move/copy your backup to the created folder -remember the backup folder is the one that look like a hash (like "'03480ffg04395g234")
5-Boot TWRP from EFIDroid for the new slot
6-Format System
7-Flash your backup

Multibooting

You can use EFIDroid as a multiboot manager. To add a multiboot ROM, do the following:
  1. Open the EFIDroid Manager app. Press the plus button at the bottom right side of the screen to start adding a multiboot slot.
  2. Under "Location", there should be a couple paths. Select the one containing "/data/media/0".
  3. You can give the slot a name/description by using the appropriate fields.
  4. Press the checkmark at the top right side of the screen to create the multiboot slot.
  5. Reboot. When EFIDroid comes up, select TWRP, then select the newly created slot.
  6. Go to the "Wipe > Advanced Wipe" menu. Select "System", then swipe to wipe.
  7. Install all the zips you want on that slot.
    NOTE: To prevent accidentall data loss when booting in recovery the real /sdcard gets mocked so you are not going to find your .zips as usual under TWRP's /sdcard. To acces the "real" /sdcard go to /multiboot/data/media/0
  8. Reboot, and when EFIDroid comes up, your new slot should automatically be selected. Press the power button to boot, and enjoy!
    IMPORTANT:your main ROM should boot without changing any configuration on EFIDroid but secondary ROM's are used to fail because of selinux denials. I strongly reccomend you to enable Force SELinux to permissive under EFIDroid options (the Gear icon in the main screen placed at the top right) - Once you kwon your secondary ROM is working you can try to boot without this option disabled - If you end up in a bootloop logcat and dmesg are welcome.

Troubleshooting

If you are unable to boot the OS/recovery from EFIDroid, do the following (you do have a working boot.img (from your main OS) and recovery.img (TWRP 3.1.0-0 recommended), right?)
This assumes you have fastboot properly setup. (Ubuntu: sudo apt-get install android-tools-fastboot - Windows: just google for the binaries)

OPTION 1:
  1. In EFIDroid, use the volume keys to navigate to "Fastboot", the press the power key to select it.
  2. There should only be one entry in the Fastboot menu. Press the power key to select it.
  3. Connect your phone to your computer with a USB cable. Run the following (on the computer), one line at a time:
    Code:
    fastboot flash boot <path/to/boot.img>
    fastboot flash recovery <path/to/recovery.img>
    fastboot oem exit
  4. In EFIDroid, use the volume keys to navigate to the back button at the top of the screen. Press the power key to select.
  5. Use the volume keys to navigate to "Reboot", then press the power key to select.

OPTION 2:
  1. Enter LG's Fastboot Mode (Volume Down + Power Off)
  2. Connect your phone to your computer with a USB cable. Run the following (on the computer), one line at a time:
    Code:
    fastboot flash boot <path/to/boot.img>
    fastboot flash recovery <path/to/recovery.img>
    fastboot reboot-bootloader
  3. Use the volume keys to navigate and select "Start" or "Recovery", then press the power key to select.
You should be able to boot the installed OS/recovery now. If this doesn't work, you can always enter Fastboot Mode (Volume Down + Power Off) and then flash your recovery and boot from there.

Clarifications
  • When Installing EFIDroid boot and recovery partitions are flashed so you only can enter recovery through EFIDroid to prevent any confusion
  • To enter Recovery just select your recovery on EFIDroid and then select the ROM you want the recovery to apply the .zip you are going to flash (EFIDroid properly patches TWRP ramdisk to affect the desire slot/ROM)

How does this work?
Well I'm going to explain it a little:
  • Right now you have your ROM kernel (boot.img) custom or stock ( it don't mind) in your boot partition and your recovery.img (I think TWRP) in your recovery partition. UEFIDroid is a kernel but it is not a linux kernel, it's based on Little Kernel aka LK... Qualcom port LK to Snapdragon chipsets and developed their custom bootloader, then the EFIDroid developer take this and implemented UEFI over the Qualcom's LK port.
  • Whe you install EFIDroid this is what happens:
    -EFIDroid Manager backups your boot.img and recovery.img in /data/media/0/UEFIESP folder
    -EFIDroid Manager flash EFIDroid in your boot and your recovery partitions (the recovery is flashed to prevent you using your recovery without booting it from EFIDroid)
  • Then the next time you boot the stock bootloader aka aboot loads UEFIDroid that is flashed in your boot partition, LK kernel boots and execute UEFI. Then the UEFI looks for the original boot.img (for booting your actual ROM aka Internal) and looks for your actual recovery.img, remember both were saved into /data/media/0/UEFIESP.
    And finally it looks for slots/ROMs in /data/media/0/multiboot (of course these are the slots for multibooting a lot of ROMs).
  • A slot for a ROM is composed by a data folder, a system.img(1GB) and a boot.img (these are the ones used/mounted to boot the ROM you select in multiboot menu) -slots are added from EFIDroid Manager app.
  • In the last step it shows you the Menu to select what you want to boot and it applies the propers patchs to ramdisk to use the correct data folder and system.img, then boot the correct boot.img using libboot (the usually used by android bootloaders)

Recoveries
I personally tested EFIDroid with TWRP and TWRP CAF in their 3.1.0.0 versions and they worked great.
As I stated before, your current recovery is backed up to /data/media/0/partition_recovery.img so if you somehow ended having trouble to boot your recovery, you can boot to your main OS and replace /data/media/0/partition_recovery.img with another recovery (ofc change the name of the new recovery to partition_recovery.img) - YOU NEED A ROOT BROWSER -

Custom Kernels
Well custom kernels are known to break things, so to say that a ROM is working I need you to test with the stock kernel that comes with it, then of course if you want to test custom kernels you're welcome and I will update this post with your feedback.
NOT WORKING CUSTOM KERNELS:
  • ElementalX 7.09 (Don't pass EFIDroid boot Splash Screen) tested by @AndresOrue with DU 11.2 (It should not matter because it's not booting the ROM at all) -may be ramdisk patching problem-
WORKING CUSTOM KERNELS:
  • BluSpark r122 tested by @AndresOrue
  • Franco.Kernel r105 tested by @alessio89g
  • ElementalX 8.00 tested by me
Credits
-All credit goes to @m11kkaa for doing all the hard work in developing EFIDroid.
-@abraha2d for the help with porting and giving permission to use his post for Note 4 as the base for this one!

Kernel Special Features: UEFI, MultiBoot

Version Information
Status: Beta
Current Beta Version: 0.1
EFI Specification: 2.60
Beta Release Date: 2017-03-27

Created 2017-03-28
Last Updated 2017-04-17
Attached Thumbnails
Click image for larger version

Name:	screen2.png
Views:	3024
Size:	130.6 KB
ID:	4093697   Click image for larger version

Name:	screen1.png
Views:	2986
Size:	59.5 KB
ID:	4093698   Click image for larger version

Name:	screen3.png
Views:	2920
Size:	60.6 KB
ID:	4093711   Click image for larger version

Name:	screen4.png
Views:	2786
Size:	88.8 KB
ID:	4093712  
Attached Files
File Type: apk EFIDroid-hammerhead-server.apk - [Click for QR Code] (2.71 MB, 1066 views)
The Following 19 Users Say Thank You to lukss12 For This Useful Post: [ View ] Gift lukss12 Ad-Free
 
 
28th March 2017, 05:00 PM |#2  
OP Senior Member
Flag Mar del Plata
Thanks Meter: 373
 
More
-Initial Release 2017-03-27
Bugs:
  • ElementalX 7.09 Kernel not booting (may be ramdisk compression incompatibility)
  • Screen blinks when using AROMA Installers in TWRP (no details) - AROMA Installer is usable but in a very annoying way :/
  • Flashable scripts logs are not shown in TWRP console when flashing in a secondary ROM (no details)
The Following 2 Users Say Thank You to lukss12 For This Useful Post: [ View ] Gift lukss12 Ad-Free
28th March 2017, 05:51 PM |#3  
AndresOrue's Avatar
Senior Member
Flag Rosario
Thanks Meter: 530
 
Donate to Me
More
Thank you mate for it, i will try it as soon as i can and i let you know how it works.

Edited: app installed, works ok so far

Edit2: @lukss12 mate the new boot Menu works but the phone don't boot anymore. I don't try to install new roms only reboot the phone but it only says rebooting android 7.1.1 internal .
I solved the problem, i dirty flash my rom ( du 11.2).

My rom: DU 11.2 android 7.1.1

Anyway at night i will try again
Attached Thumbnails
Click image for larger version

Name:	Screenshot_20170328-140344.png
Views:	914
Size:	74.8 KB
ID:	4092227  
The Following User Says Thank You to AndresOrue For This Useful Post: [ View ] Gift AndresOrue Ad-Free
28th March 2017, 05:58 PM |#4  
Senior Member
Thanks Meter: 43
 
More
The prospect of an alternative to multirom is exciting. The great hammerhead lives on!
The Following User Says Thank You to kmem For This Useful Post: [ View ] Gift kmem Ad-Free
28th March 2017, 07:41 PM |#5  
OP Senior Member
Flag Mar del Plata
Thanks Meter: 373
 
More
Quote:
Originally Posted by AndresOrue

Thank you mate for it, i will try it as soon as i can and i let you know how it works.

Edited: app installed, works ok so far

Edit2: @lukss12 mate the new boot Menu works but the phone don't boot anymore. I don't try to install new roms only reboot the phone but it only says rebooting android 7.1.1 internal .
I solved the problem, i dirty flash my rom ( du 11.2).

My rom: DU 11.2 android 7.1.1

Anyway at night i will try again

Great you could solve ur problem, yes flashing boot.img from your actual ROM will boot the device. Remember EFIDroid is also installed in your recovery partition, you can boot TWRP from there but if you want to revert back to "stock" DU with TWRP you need to flash TWRP to recovery partition.

About your boot problem, mine takes about 7 seconds on "booting" splash before showing bootanimation...

Did you try to set Force Selinux permissive option in Efidroid?

Also for the internal ROM you can try unpatched boot... For this boot efidroid and long press the power button on the Entry for your ROM.
28th March 2017, 07:49 PM |#6  
AndresOrue's Avatar
Senior Member
Flag Rosario
Thanks Meter: 530
 
Donate to Me
More
Quote:
Originally Posted by lukss12

Great you could solve ur problem, yes flashing boot.img from your actual ROM will boot the device. Remember EFIDroid is also installed in your recovery partition, you can boot TWRP from there but if you want to revert back to "stock" DU with TWRP you need to flash TWRP to recovery partition.

About your boot problem, mine takes about 7 seconds on "booting" splash before showing bootanimation...

Did you try to set Force Selinux permissive option in Efidroid?

Also for the internal ROM you can try unpatched boot... For this boot efidroid and long press the power button on the Entry for your ROM.

Did you try to set Force Selinux permissive option in Efidroid?

No i will try it at night.

About your boot problem, mine takes about 7 seconds on "booting" splash before showing bootanimation...

For me 5 min and nothing.

Also i need to read a little more to avoid problems.. and also i think when flash suspersu breaks the boot but i need to confirm it
28th March 2017, 07:54 PM |#7  
OP Senior Member
Flag Mar del Plata
Thanks Meter: 373
 
More
Quote:
Originally Posted by AndresOrue

Did you try to set Force Selinux permissive option in Efidroid?

No i will try it at night.

About your boot problem, mine takes about 7 seconds on "booting" splash before showing bootanimation...

For me 5 min and nothing.

Also i need to read a little more to avoid problems.. and also i think when flash suspersu breaks the boot but i need to confirm it

Yep I recommend reading the full OP once or twice before starting....well is good to see that the app and installation is working... It's weird that you can't boot internal - please if you can try the unpatched boot option-
The Following User Says Thank You to lukss12 For This Useful Post: [ View ] Gift lukss12 Ad-Free
28th March 2017, 10:50 PM |#8  
AndresOrue's Avatar
Senior Member
Flag Rosario
Thanks Meter: 530
 
Donate to Me
More
Quote:
Originally Posted by lukss12

Yep I recommend reading the full OP once or twice before starting....well is good to see that the app and installation is working... It's weird that you can't boot internal - please if you can try the unpatched boot option-

Questions:

What is lf laf recovery?

I flashed twrp from my pc but i still have this new boot, other way to deleted?

How can i deleted this app completely? flashing stock rom is ok or i can flash a custom rom with full wipe?

Anyway now i am doing a backup of my app So I can try it without problems
28th March 2017, 10:56 PM |#9  
OP Senior Member
Flag Mar del Plata
Thanks Meter: 373
 
More
Quote:
Originally Posted by AndresOrue

Questions:

What is lf laf recovery?

I flashed twrp from my pc but i still have this new boot, other way to deleted?

How can i deleted this app completely? flashing stock rom is ok or i can flash a custom rom with full wipe?

Anyway now i am doing a backup of my app So I can try it without problems

Enter fastboot mode (volume down + power off)
fastboot flash recovery twrp.img
fastboot reboot-bootloader
Select recovery
Flash your ROM zip

Or extract boot.img from your ROM zip
Enter fastboot mode
fastboot flash boot boot.img
fastboot flash recovery twrp.img

Both of those options will revert your boot and recovery partition to "stock"
The Following User Says Thank You to lukss12 For This Useful Post: [ View ] Gift lukss12 Ad-Free
28th March 2017, 11:25 PM |#10  
MINECRAFT4PDA's Avatar
Member
Flag Moscow
Thanks Meter: 3
 
More
I apologize for the question, but I did not understand a bit, efidroid will be work if I have installed a custom kernel?
29th March 2017, 01:02 AM |#11  
AndresOrue's Avatar
Senior Member
Flag Rosario
Thanks Meter: 530
 
Donate to Me
More
Quote:
Originally Posted by lukss12

Enter fastboot mode (volume down + power off)
fastboot flash recovery twrp.img
fastboot reboot-bootloader
Select recovery
Flash your ROM zip

Or extract boot.img from your ROM zip
Enter fastboot mode
fastboot flash boot boot.img
fastboot flash recovery twrp.img

Both of those options will revert your boot and recovery partition to "stock"


A few things:

To revert to stock recovery, I had to repeat two times the process of flashing the boot.img and twrp.
Obviously you lose root at this time.


Installed EFIdroid again and now first rom boot ok , no more "booting android internal" for 5 min anymore. I dont know if it because I reflashed the boot image again or maybe was the custom kernel because now i have stock DU kernel.

Now i try to add a second rom:

1) Steps from EFIdroid to create second rom works great.
2) rebooting ok
3) I selected twrp and install DU 11.2
4) installation was ok
5) Rebooting into second rom , bootloop in bootanimation after five minutes it freeze and reboot
6)edited here ( i forgot the part of change selinux to permissive )
7) wipe and installed again the second rom and finally second rom boot ok , using DU 11.2 as second rom.
8) Supersu was intalled and works ok in second rom too.

I can confirm now that the reason that the first and second rom dont boot was elementalX kernel. With the stock DU kernel works perfect. primary and secondary rom.

I hope it helps...


Questions:
how i delete second rom completely ? only with full wipe?



---------- Post added at 09:02 PM ---------- Previous post was at 08:57 PM ----------

Quote:
Originally Posted by MINECRAFT4PDA

I apologize for the question, but I did not understand a bit, efidroid will be work if I have installed a custom kernel?

the first time that i installed EFIdroid i was using elementalx 7.09 and it installed ok but first rom dont boot anymore. The second time, after i reflashed the boot image from DU the rom boot fine

edited: I can confirm now that with elementalX the rom dont boot
The Following User Says Thank You to AndresOrue For This Useful Post: [ View ] Gift AndresOrue Ad-Free
Post Reply Subscribe to Thread

Tags
efidroid, hammerhead, multiboot, multirom, nexus 5

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes