Development [ROM][11.0][OFFICIAL] LineageOS Modded 18.1 [DISCONTINUED] - Moto E (2020)

Code:
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this ROM
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
LineageOS Modded is a free, community built, aftermarket firmware distribution of Android 11 (R), which is designed to increase performance and reliability over stock Android for your device.
LineageOS Modded is based on the Android Open Source Project and LineageOS with extra contributions from many people within the Android community.
All the source code for LineageOS Modded is available in the LineageOS Modded Github repo.
What's working?
Everything as far as I can tell...
Installation
1. Boot into twrp
2. Advanced -> ADB Sideload -> Swipe
3. adb sideload copy-partitions.zip
4. Go back into sideload mode
5. adb sideload lineage.zip
6. Wipe Data
7. Reboot to bootloader
8. fastboot flash --disable-verity --disable-verification vbmeta vbmeta.img
Downloads: http://1pwn.ixmoe.com/android/ginna/los-18.1/lineage-18.1-20210621-HOMEMADE-ginna.zip
Notes
This ROM comes with Google Apps!
This ROM comes with Customizations that are not apart of LineageOS
Sources: https://github.com/motoe7
Credits: @electimon, @RohanHasabe8, betaxab
Jan 27 2021: Fix Safetynet, fix touch issues, fix some other issues
Jan 28 2021: Fix PIP mode
Jan 30 2021: Fix Hotspot
June 2 2021: Fix touch for ginna models with the new panel
June 15 2021: Fix touch for focaltech panels
June 20 2021: June Patch, fix safetynet and other little stuff

Awesome, been waiting for this, thanks very much! Had some errors while loading copy-partitions.zip but the image flashed and seems to be working well. Look forward to future versions with SELinux enforcing and also without gapps (but maybe that's not likely with no opengapps for 11?)
Would be great if there was a way to remove the obtrusive "device can't be trusted" message at boot. It can be just as trusted as my desktop PC ffs. At least moto allows the bootloader unlock without much trouble.

anthony.d said:
Awesome, been waiting for this, thanks very much! Had some errors while loading copy-partitions.zip but the image flashed and seems to be working well. Look forward to future versions with SELinux enforcing and also without gapps (but maybe that's not likely with no opengapps for 11?)
Would be great if there was a way to remove the obtrusive "device can't be trusted" message at boot. It can be just as trusted as my desktop PC ffs. At least moto allows the bootloader unlock without much trouble.
Click to expand...
Click to collapse
hi, selinux is enforcing also there will be no version without gapps sorry

Electimon said:
hi, selinux is enforcing also there will be no version without gapps sorry
Click to expand...
Click to collapse
No worries about the gapps, i'm grateful to have a lineage rom for this device.
I tried flashing again. Pardon if the details below are excessive, I don't fully understand the process, and the dual-slice device config. Here's what happened:
copy-partitions gets to 47%, then fails with the following error:
Partition vendor_a
dd: /dev/block/dm-4: write error: No space left on device
installed lineage again, this time went to slot B. rebooted back into TWRP and tried copy-partitions again (to see if it was different after lineage had been installed in both slots) and this time it succeeded. Installed lineage again, this time to slot A. Wiped the device, rebooted, and I still get the selinux error. If it's relevant, the device model is XT2052-1.
Also want to add: I applied disable-verity both times, and cmd line output indicated writing to vbmeta_a and vbmeta_b.

weird, how are you checking for enforcing?
android_device_motorola_ginna/BoardConfig.mk at efea8269c9a6a232d8ba38b0629a61eb590b2db5 · motoe7/android_device_motorola_ginna
Contribute to motoe7/android_device_motorola_ginna development by creating an account on GitHub.
github.com
you can see here that permissive is commented out, the rom is enforcing.

I installed the rom mainly as a reference against the no speaker (except in calls) issue I'm having with 17.1. Also I'll note there the issue isn't jacksensing as I had guessed. A soundfile playback autopauses on headphone removal. With 18.1 here I do get speaker output, however one bug I noticed for me (boostmobile-sku:mot20526anb/xt2052-6) (also present in 0206 17.1) is that in-call volume adjust doesn't work. The indicator moves, but the actual volume does not. I'll send some logcats. Seems to be stuck at what is probably supposed to be max volume.

Electimon said:
there will be no version without gapps sorry
Click to expand...
Click to collapse
Is there a standard/safe way to uninstall gapps via scripted adb commands immediately after install? I experimented with a crude attempted pm uninstall/disable/disable-user of all com.google.* packages but was not too surprised when the result failed to boot past the lineageos boot animation.

Cyb3rSl4v3 said:
Is there a standard/safe way to uninstall gapps via scripted adb commands immediately after install? I experimented with a crude attempted pm uninstall/disable/disable-user of all com.google.* packages but was not too surprised when the result failed to boot past the lineageos boot animation.
Click to expand...
Click to collapse
I'm unsure of that

I finally figured out how to build 18.1 on my 8g-ram system such that I don't have to worry about uninstalling gapps (amongst other motivations). I'll post details once I've done another less manual build. The trickiest part was that the 17.1 workaround of setting JAVA_TOOL_OPTIONS/_JAVA_OPTIONS to -Xmx6g wasn't getting used by metalava in 18.1. I ended up editing the last line of out/soong/host/linux-x86/bin/metalava and putting it in there which finally worked. Perhaps tools/metalava/gradle.properties is the right place. My first pass doesn't have carrier data/call service working, but that may be because I did something with TimeService to get it to compile. In any event, I think the 16g minimum warning from the build system is more than a bit confusing combined with the metalava java heap issues. I may try a 4g-ram build sometime just for amusement... It just seemed inconceivable that there really was a 16g-ram requirement. I know even phones come with 16g these days, but still. Of course my hope is to see a cheap phone of mine self-hosting one of these days. Perhaps with some high end microsd card or an otg drive for swap partition and build tree...

Cyb3rSl4v3 said:
I finally figured out how to build 18.1 on my 8g-ram system [...] The trickiest part was that the 17.1 workaround of setting JAVA_TOOL_OPTIONS/_JAVA_OPTIONS to -Xmx6g wasn't getting used by metalava in 18.1. I ended up editing the last line of out/soong/host/linux-x86/bin/metalava and putting it in there which finally worked. Perhaps tools/metalava/gradle.properties is the right place.
Click to expand...
Click to collapse
I haven't quite done a fully automated build yet, but tools/metalava/gradle.properties didn't work for me. Then I found that the metalava (wrapper) script was build/soong/scripts/jar-wrapper.sh, and adding a next to last line of-- javaOpts+=("-Xmx6g") --seems to work. I also now better understand device/motorola/ginna/lineage.dependencies and seem to be able to reproduce this image sans gapps (though an selinux issue i haven't looked too much at yet). I may focus more on 17.1 until 18.1 becomes more generally official. I also seem to be getting occasional sigsegvs with jre/metalava dumping hs_err_pid*.logs. However thus far a simple rerun of brunch/ginna has never reproduced the problem.

Camera apps have quite a lag related to camera apiv2. Haven't had time to debug, but Open Camera works perfect as it defaults to the old api.

Do we have system read/write on these builds and does magisk work?

Idk about system r/w, but Magisk works fine. This is also a really good rom. Stable and nearly everything works.

fddm said:
Idk about system r/w, but Magisk works fine. This is also a really good rom. Stable and nearly everything works.
Click to expand...
Click to collapse
I checked, it has system rw. I can't believe how fast my LTE speeds are too. 7-10MBs vs 50kbs on stock. The only thing holding me back is no full screen toggle for apps, and the in call volume is stuck at the maximum at all times. Soon as those get fixed I'm running this 24/7.

2+ months now with 18.1 on my daily driver.
No hardware issues.
Ofox recovery.
Magisk 21.4 thru the latest canary build have worked as far as I can tell.
No volume troubles.
Can mount system RW.
My only setback is that I don't have access to around 9Gb on /data and /sdcard, including /sdcard/Android/obb
I can set perms any way in terminal and in recovery terminal 0777, 0655, etc., but upon reboot, I cannot read or write.
Can read and write to /system and /system_root, no problem.
This is possibly due to me forgetting to wipe encrypted /data after first flash? I wiped after first boot, no change.
Then, started the flash process from scratch and wiped before first boot, but must have missed something.
The file and folder names are not random characters.
One of those things I thought will work out when I get around to it, but now just found my pics are being saved to a folder in the mystery space, and I need to place a .zip in *./obb.
Im learning, A/B is new to me.
Maybe my mistake will help someone when I find a solution.
I am open to suggestions, lessons, and any other info, even if I should already know it.
I will report when something changes.

RaceyMcRacerson said:
2+ months now with 18.1 on my daily driver.
No hardware issues.
Ofox recovery.
Magisk 21.4 thru the latest canary build have worked as far as I can tell.
No volume troubles.
Can mount system RW.
My only setback is that I don't have access to around 9Gb on /data and /sdcard, including /sdcard/Android/obb
I can set perms any way in terminal and in recovery terminal 0777, 0655, etc., but upon reboot, I cannot read or write.
Can read and write to /system and /system_root, no problem.
This is possibly due to me forgetting to wipe encrypted /data after first flash? I wiped after first boot, no change.
Then, started the flash process from scratch and wiped before first boot, but must have missed something.
The file and folder names are not random characters.
One of those things I thought will work out when I get around to it, but now just found my pics are being saved to a folder in the mystery space, and I need to place a .zip in *./obb.
Im learning, A/B is new to me.
Maybe my mistake will help someone when I find a solution.
I am open to suggestions, lessons, and any other info, even if I should already know it.
I will report when something changes.
Click to expand...
Click to collapse
I never had this issue so I'm guessing it's something to do with encryption. I would try clean flashing LOS to both slots then formatting data using the type "yes" option to remove encryption. Are you using adoptable storage by chance?

How can I install this rom via recovery, I have never used side load. Why is it not booting? What is wrong. I flashed rom in slot B with twrp in slot A sorry still a little new with this device. But regardless it is not booting whatsoever and I am confused as to why

Mr.Conkel said:
How can I install this rom via recovery, I have never used side load. Why is it not booting? What is wrong. I flashed rom in slot B with twrp in slot A sorry still a little new with this device. But regardless it is not booting whatsoever and I am confused as to why
Click to expand...
Click to collapse
Flash it to both slots and format data before booting up.

Spaceminer said:
Flash it to both slots and format data before booting up.
Click to expand...
Click to collapse
Is there any benefit of having it flashed to both? Cause I did get it working. There's not currently anything on slotB

Mr.Conkel said:
Is there any benefit of having it flashed to both? Cause I did get it working. There's not currently anything on slotB
Click to expand...
Click to collapse
Not that I'm aware of. I've never got it to boot without flashing to both slots though. Did you use the zip, or fastbootd images?

Related

[FIX] FED-Patcher v7 (ForceEncrypt Disable Patcher)

Hello everybody,
I created a tool for the nexus 9 that gets rid of the ForceEncrypt flag in a generic way (meaning it should work no matter what rom you are on). It does that by patching the currently installed boot.img.
Background
The Android CDD (Compatibility Definition Document) suggests that all devices SHOULD enable full disk-encryption (FDE) by default. Even though I support every step towards more security I have to criticize this approach. FDE comes at a price. Encryption takes time because some component has to de- and encrypt the stuff on the disk at some point and in the case of the nexus 9 (aka flounder) it's the CPU's task. Even though the nexus 9's CPU has 2 pretty fast cores you can still easily feel the difference between FDE in the on- or off-state. The I/O is faster and boot-times take only half as long. (I did not do any measurements)
There is an ongoing discussion about this topic in cyanogenmod's gerrit. Although it's a fun read it is pretty clear that this exchange of views is not going anywhere near a useful outcome.
Because performance is important to me and my tablet does not need the extra security I created the FED-Patcher (ForceEncrypt Disable Patcher)
How does it work?
FED-Patcher is a simple flashable ZIP that is supposed to be run in a recovery that has busybox integrated (like TWRP or CWM). This is what it does:
Checks if your device is compatible
Dumps the currently installed boot.img.
Unpacks the dump of your currently installed boot.img. The unpacking process is done via a self-compiled, statically linked version of unmkbootimg.
It patches the filesystem tables which include the force-encrypt flags. This process will change "forceencrypt" to "encryptable".
Then it patches the filesystem tables to not use dm-verity. This is done by removing the "verify" mount-parameter.
Creates a new boot.img. The unpacking process is done via a self-compiled, statically linked version of mkbootimg.
Flashes the modified boot.img
Supported devices
HTC Nexus 9 WiFi (flounder)
HTC Nexus 9 LTE (flounder_lte)
Motorola Nexus 6 (shamu)
Version History
v1 - Initial version with HTC Nexus 9 WiFi (flounder) support
v2 - Added Motorola Nexus 6 (shamu) support
v3 - Added support for HTC Nexus 9 LTE (flounder_lte)
v4 - Added support for signed boot-images
v5 - Changed error handling to compensate for missing fstab files. Some roms seem not to ship with the complete set of boot-files from AOSP.
v6 - FED-Patcher will enforce the same structure for the patched boot.img that the original boot.img had. Additionally, the kernel commandline will also be taken over. This should fix pretty much every case where devices would not boot after patching.
v7 - FED-Patcher will now disable dm-verity in fstab to get rid of the red error sign on marshmallow roms.
What do I need to make this work?
A supported device (Your nexus 9)
An unlocked bootloader
An already installed ROM with forceencrypt flag. (like cyanogenmod CM12.1)
A recovery that includes busybox (TWRP, CWM)
How do I use it?
Make a thorough, conservative backup of your data if there is any on your device
Go into your recovery (TWRP, CWM)
Flash fed_patcher-signed.zip
If your device is already encrypted (You booted your ROM at least once) you need to do a full wipe to get rid of the encryption. This full wipe will clear all your data on your data-partition (where your apps as well as their settings are stored) as well as on your internal storage so please, do a backup before. If you don't do a backup and want to restore your data... well... Call obama.
How do I know if it worked?
Go into your "Settings"-App. In "Security", if it offers you to encrypt your device it is unencrypted. If it says something like "Device is encrypted" it indeed is encrypted.
IMPORTANT: If you update your ROM you have to run FED-Patcher again because ROM-updates also update the boot-partition which effectively removes my patch. So, if you are on CM12.1 for example and you used my patch and do an update to a newer nightly you have to run FED-Patcher again. If you don't do so Android will encrypt your device at the first boot.
Is it dangerous?
Well, I implemented tons of checks that prevent pretty much anything bad from happening. But, of course, we're dealing with the boot-partition here. Even though I tested FED-Patcher quite a lot there is still room for crap hitting the fan.
Screenshot
Scroll down to the attached thumbnails.
Credits
* pbatard for making (un)mkbootimg (dunno if he is on xda)
* @rovo89 for his xposed framework - I used some of his ideas by reading the source of his xposed installer flashable ZIP for FED-Patcher.
Thanks for creating this! In theory, would this work for the Nexus 6 as well? It would seem like it's a similar process.
itlnstln said:
Thanks for creating this! In theory, would this work for the Nexus 6 as well? It would seem like it's a similar process.
Click to expand...
Click to collapse
Hey there,
yes, it would probably work because the process itself is pretty generic. The only real difference between devices is the device-path for the boot-partition as well as the path(s) for the fstab-file(s) inside the boot.img. Nothing that cannot be done - but I don't have a device for testing. If you feel adventurous I can do a nexus6 (shamu) version for you for testing. I will double check so it should not eff up your device .
EDIT: Not to forget, the nexus 9 is a 64bit device. mkbootimg as well as unmkbootimg are compiled for 64bit. I have to rebuild those two programs for 32bit to make them work for 32bit devices.
If you have time for a N6 build, that would be great. If not, it's not a big deal since there seems to be more support for that device.
itlnstln said:
If you have time for a N6 build, that would be great. If not, it's not a big deal since there seems to be more support for that device.
Click to expand...
Click to collapse
Well, it's pretty much done. Do you want to test a version that does not actually flash anything but do everything else - just to see if it works correctly?
Absolutely!
itlnstln said:
Absolutely!
Click to expand...
Click to collapse
Alright, here you go!
If no error occurs there will be the already modified boot.img file in your temp-directory of your nexus 6. You can send me this file to be completely sure that everything went according to plan. Here is the adb-command:
Code:
adb pull /tmp/fed_patcher/boot-new.img
If all goes well I will upload the new version with nexus 6 (shamu) support tomorrow.
Good night!
gladiac said:
Alright, here you go!
If no error occurs there will be the already modified boot.img file in your temp-directory of your nexus 6. You can send me this file to be completely sure that everything went according to plan. Here is the adb-command:
Code:
adb pull /tmp/fed_patcher/boot-new.img
If all goes well I will upload the new version with nexus 6 (shamu) support tomorrow.
Good night!
Click to expand...
Click to collapse
Thanks! It seemed to work OK. Here's the boot image.
itlnstln said:
Thanks! It seemed to work OK. Here's the boot image.
Click to expand...
Click to collapse
Thanks for your help! I just updated the flashable ZIP in the first post. Enjoy
gladiac said:
Thanks for your help! I just updated the flashable ZIP in the first post. Enjoy
Click to expand...
Click to collapse
You're the best! Thanks!
I noticed in op it says "4 pretty fast cores". This puppy only has 2 cores. Just throwing it out there for readers that don't know. I'm sure it was just a minor oversight.
Sent from my Nexus 9
madbat99 said:
I noticed in op it says "4 pretty fast cores". This puppy only has 2 cores. Just throwing it out there for readers that don't know. I'm sure it was just a minor oversight.
Sent from my Nexus 9
Click to expand...
Click to collapse
Hi,
you are right, thanks. I just fixed the text in the op.
Hey everybody,
I will enable support for the Nexus 9 LTE (flounder_lte) this afternoon in FED-Pather v3. If you want other devices to be supported please tell me. Is there a list of android devices that have forced encryption?
So this works great, leaving device unencrypted. But anyone having issues with apps crashing? Most especially Google Play Services?
femmyade2001 said:
So this works great, leaving device unencrypted. But anyone having issues with apps crashing? Most especially Google Play Services?
Click to expand...
Click to collapse
This problem is new to me. My patch only modifies the boot-image so that it does not enforce encryption. It is merely a flag in fstab that gets changed and should not have anything to do with crashing apps. Anyway, do you have a logcat?
Hey everybody,
v3 is here with HTC Nexus 9 LTE (flounder_lte) support!
Enjoy
I'm getting an error with my N9 (WiFi). When I try flashing in TWRP, it throws this error:
! Unpacking failed
=> unmkbootimg return value: 0
E: Error executing updater binary in zip...
All I did was go into fastboot, flash the updated image for LMY48M, then go into TWRP to flash the fix. I even went back into fastboot to try re-flashing the boot.img.
itlnstln said:
I'm getting an error with my N9 (WiFi). When I try flashing in TWRP, it throws this error:
! Unpacking failed
=> unmkbootimg return value: 0
E: Error executing updater binary in zip...
All I did was go into fastboot, flash the updated image for LMY48M, then go into TWRP to flash the fix. I even went back into fastboot to try re-flashing the boot.img.
Click to expand...
Click to collapse
Hi, sorry to hear that. I will have a look into the boot.img that gets shipped with LMY48M. Not sure what is going on here.
itlnstln said:
I'm getting an error with my N9 (WiFi). When I try flashing in TWRP, it throws this error:
! Unpacking failed
=> unmkbootimg return value: 0
E: Error executing updater binary in zip...
All I did was go into fastboot, flash the updated image for LMY48M, then go into TWRP to flash the fix. I even went back into fastboot to try re-flashing the boot.img.
Click to expand...
Click to collapse
Alright - unmkbootimg fails because the boot.img that google ships has 256 Bytes of extra data (it is probably signed or something) at the beginning. If you strip that off it works correctly:
Code:
dd if=boot.img of=boot-stripped.img bs=256 skip=1
Well, this was unexpected. But nothing that cannot be dealt with. I will make my flashable ZIP search for the offset of the boot.img-signature inside the dumped boot.img and strip of the preceding data. The rest of the process should work as usual.
itlnstln said:
I'm getting an error with my N9 (WiFi). When I try flashing in TWRP, it throws this error:
! Unpacking failed
=> unmkbootimg return value: 0
E: Error executing updater binary in zip...
All I did was go into fastboot, flash the updated image for LMY48M, then go into TWRP to flash the fix. I even went back into fastboot to try re-flashing the boot.img.
Click to expand...
Click to collapse
Hi @itlnstln,
I just made a new version which should do the trick. I tested the new functionality to the best of my knowledge. If the script fails for some reason it wont flash anything - so the probability for actual damage is very low. Do you feel adventurous xD?
Please tell me if it worked for you or not.

[ROM][James][Nora] Unofficial Lineage OS 15.1 for Moto E5 Play (beta v1.01)

LineageOS 15.1 (Beta v1.01) originally for Moto E5 Play (james) working on Moto E5 (Nora)
Very Important!!!!
I've just found the way to boot sucessfully LOS 15.1 on nora_row, the ROM was originally made by @MotoJunkie01, so I'm not taking this ROM as mine, I've mentioned that I'm not a dev, I just love to share what I found, I hope this won't cause any problem and it will be useful for you guys.
Previously I've shared how to root Moto E5 (Nora) because there wasn't any specific info for that variant, TWRP and Root Guide was only for Play/Plus, and then after some attemps, I finally found a way to use TWRP and how to flash LOS 15.1
Disclaimer
I'm not responsible for any dead SD cards/phones
If your phone turns into a nuclear bomb
If your dog/cat complain about you
Advertisment
The ROM is working almost fine but "Keep in mind that I have XT1944-2" also it is a beta ROM and if my previous guide of root didn't work properly, you shouldn't try to install it, because it may result on a brick or something else, as always is mentioned, try by your own risk.
BUGS
Working:
RIL
Bluetooth
WiFi
Not Working:
Camera
You tell me
Requirements
1. The most important and obviously, unlocked bootloader, a computer, and just basic knowldge
2. Stock ROM zip, in case of something is wrong and because you'll need to extract boot.img, here are the links and a guide to recover your phone in case of brick: https://forum.xda-developers.com/moto-e5/how-to/firmware-moto-e5-xt1944-4-dual-sim-t3820901
3. TWRP recovery. You can get it here: https://forum.xda-developers.com/moto-e5/development/recovery-twrp-moto-e-5-play-james-t3796323
4. You may wonder how to install TWRP, I must admit that it's not possible on Nora (causes brick) but searching here in XDA I've found that you can boot into TWRP without installing and also if you make a backup it will work in case of emergency
5. Platform tools folder that contains fastboot and adb drivers (your boot.img must be extracted here): https://www.dropbox.com/s/c3c8rev5e40gy5b/platform-tools-latest-windows.zip?dl=0
6. Remember to put the ROM and Gapps on your SD:
ROM: https://drive.google.com/open?id=1F2rC7zIZPqod3vMC1t22uhNYMQbf56K6
Gapps: https://drive.google.com/drive/folders/1rHf5XIs7XK3kWFFLekjrK0ub_bKnSlUI
Instructions
1. First of all boot into bootloader or fastboot (power & volume down) and connect your phone to your PC
2. At this point it is supposed that you have downloaded platform tools folder and all necessary zips (stock ROM, LOS, gapps), then inside the folder press Shift+Right Click, and select "open CMD window here" for Windows 7, on Windows 8 and up just click "Archive", then when CMD it's open, type: fastboot boot twrp_james.img Your phone automatically will reboot into TWRP.
3. The recovery will delay 1 or 2 minutes to start and it will ask us for our key to decrypt data. Just press cancel, because we don't have that key, and that option is not working and swipe to allow modifications. Don't mount anything, what it is already mounted is fine, only you can mount SD Card, in case that is not mounted, if you don't have a SD Card you wouldn't be able to make a backup
4. Go to backup section, and choose SD Card to put your backup there, remember that the Backup couldn't be saved on Internal Storage because the ROM will wipe Internal Storage and System, then if you choose all the partitions nothing wrong would happen, but if you are not pretty sure, just skip data and cache
5. The time that TWRP will took to backup depends on the things that you have on your system (Ignore red letters that show some errors)
6. Then go to Wipe section and swipe to perform a factory data reset. Now, select Wipe and then Format Data, and follow all prompts to commence formatting and then go to reboot section and choose bootloader because remember that TWRP is not installed and we nned to reboot the recovery, then use again CMD to boot into TWRP
7. Then we are again on TWRP, then press Install, select SD Card and look for the ROM zip and Gapps and swipe to flash, it's very fast the installation, wait until it finish and reboot your device into bootloader, It will be with red letters, but don't be affraid.
8. Another important thing, that ROM, contains boot.img from Moto E5 Play, that's what I told you, that you will need to use boot.img from stock ROM, then go to Platform Tools Folder and again open CMD (Shift+Left Click for W7) and type: fastboot flash boot boot.img Wait until it finish and type fastboot reboot
9. And that's all, first boot will delay, be patience. Additionally I couldn't find a way to skip force encrypt, so the phone will be encrypted and it will reboot, sometimes if you reboot the ROM it would reboot again, it's normal, As this ROM it's unnofficial it will show tha your device is uncertified but you can hide that notifications and use your phone normally.
Magisk, Xposed and Substratum work, but choose carefully what are you going to install because some modules will cause problems or a bootloop, if you need some help write your comments and experiences. YouTube for some reason open but didn't shows anything.
THANKS & MENTIONS:
Thanks to @SuperR. for his awesome Windows Kitchen;
Thanks to @CodyF86 for breaking ground and building TWRP for the james;
Thanks and credits to @phhusson for his Phh-Treble Vanilla GSIs;
Thanks to @Deivid_21 for sharing working gapps
Thanks to the entire LineageOS team;
This is great news. Slowly but surely, development for the entire Moto E5 series is growing. Great work on this OP.
MotoJunkie01 said:
This is great news. Slowly but surely, development for the entire Moto E5 series is growing. Great work on this OP.
Click to expand...
Click to collapse
Yeah thank you, but I was unable to find a no verity kernel for E5, Play and Plus have got it, but this one not, then thanks for sharing a LOS 15.1 it's cool just the only bug was the camera but because of that encryption the ROM became laggy, I wish I could have a good computer to compile but well it seems to hard, anyway i hope more coming ROMS because it's sad that LOS 16 it's already released and we hardly have got just one but it's appreciated the time and effort for this one
Fersho said:
Yeah thank you, but I was unable to find a no verity kernel for E5, Play and Plus have got it, but this one not, then thanks for sharing a LOS 15.1 it's cool just the only bug was the camera but because of that encryption the ROM became laggy, I wish I could have a good computer to compile but well it seems to hard, anyway i hope more coming ROMS because it's sad that LOS 16 it's already released and we hardly have got just one but it's appreciated the time and effort for this one
Click to expand...
Click to collapse
Yeah that's my dilemma as well. I have neither the time nor regular access to a high quality machine to compile. I have a port for Lineage 16.0 for the E5 Play which boots and functions somewhat. When I can smooth some things out and get it a bit more stable, I'll post it as well.
You should post a no-verity kernel for the E5 for others to use. It would be appreciated I'm sure.
MotoJunkie01 said:
Yeah that's my dilemma as well. I have neither the time nor regular access to a high quality machine to compile. I have a port for Lineage 16.0 for the E5 Play which boots and functions somewhat. When I can smooth some things out and get it a bit more stable, I'll post it as well.
You should post a no-verity kernel for the E5 for others to use. It would be appreciated I'm sure.
Click to expand...
Click to collapse
For real? I would really love to test Pie, pls upload it, then I'm trying to post a no-verity kernel but then how am I going to extract the necessary things? I had seen a tutorial to unpack boot.img but then I don't know how to disable dm vrity or where are the files located on Moto E5 Play/Plus kernel
Fersho said:
For real? I would really love to test Pie, pls upload it, then I'm trying to post a no-verity kernel but then how am I going to extract the necessary things? I had seen a tutorial to unpack boot.img but then I don't know how to disable dm vrity or where are the files located on Moto E5 Play/Plus kernel
Click to expand...
Click to collapse
Here is an easier method -- install the stock boot image on your device using either fastboot or TWRP. Then, in TWRP, install this boot image patch script -- https://drive.google.com/file/d/1oLrNL3OYhwlCCLOtLdQEQM4tGsIucsPQ/view?usp=drivesdk
It will unpack, patch, repack and flash the modified boot image back to your boot partition, disabling dm-verity. Then use TWRP to make a backup of your /boot partition. Using a file manager, rename the backup from boot.emmc.win to boot.img and you're done. You'll then have a no-verity kernel in boot.img format. The file can then be installed by other members using fastboot or TWRP.
Once you're done, you can simply use TWRP to reinstall or restore your previous ROM configuration.
MotoJunkie01 said:
Here is an easier method -- install the stock boot image on your device using either fastboot or TWRP. Then, in TWRP, install this boot image patch script -- https://drive.google.com/file/d/1oLrNL3OYhwlCCLOtLdQEQM4tGsIucsPQ/view?usp=drivesdk
It will unpack, patch, repack and flash the modified boot image back to your boot partition, disabling dm-verity. Then use TWRP to make a backup of your /boot partition. Using a file manager, rename the backup from boot.emmc.win to boot.img and you're done. You'll then have a no-verity kernel in boot.img format. The file can then be installed by other members using fastboot or TWRP.
Once you're done, you can simply use TWRP to reinstall or restore your previous ROM configuration.
Click to expand...
Click to collapse
It doesn't works, also using zip on LOS/Stock it doesn't boot
Fersho said:
It doesn't works, also using zip on LOS/Stock it doesn't boot
Click to expand...
Click to collapse
I will patch a boot image to disabled dm-verity for the Moto E5. I'll post soon as I get some free time.
MotoJunkie01 said:
I will patch a boot image to disabled dm-verity for the Moto E5. I'll post soon as I get some free time.
Click to expand...
Click to collapse
Thanks, but finally I removed encryption, but men, it was very hard for me and it took me like 3 or 4 hours, but well the procedure is a llitle bit confusing, and I couldn't create a boot.img just ported the ones already shared for Play/Plus and seemed to work "fine", If I got some time I would make another tutorial but I guess that it will be long
Here is a no-verity kernel for the xt1944-2 Moto E5
From Build No. OPP27.91-25
https://drive.google.com/file/d/1NcyuFRgvvRiS5MT5Jxl3uS3XHCnULBMc/view?usp=drivesdk
In case anybody needs it.
MotoJunkie01 said:
Here is a no-verity kernel for the xt1944-2 Moto E5
From Build No. OPP27.91-25
https://drive.google.com/file/d/1NcyuFRgvvRiS5MT5Jxl3uS3XHCnULBMc/view?usp=drivesdk
In case anybody needs it.
Click to expand...
Click to collapse
Thank You, Do you believe that I don't have XT1944-2 I have XT1944-4 I notice that when I've seen something in settings, then It's only flash the kernel and that's all?
Fersho said:
Thank You, Do you believe that I don't have XT1944-2 I have XT1944-4 I notice that when I've seen something in settings, then It's only flash the kernel and that's all?
Click to expand...
Click to collapse
I'll do a no-verity for xt1944-1 also. In fact, I'll try and cover all variants for which I have firmware access. You can try to boot the kernel for xt1944-2 prior to flashing it, by using:
fastboot boot no-verity_xt1944-2.boot.img
If it boots, you should be safe in flashing it to your /boot partition. In any event, I'll post some no-verity kernels for the Moto E5 variants.
so if i have the xt1944-3 can I use this tutorial? and what twrp recovery should I use..? or should i just wait
SeerePetrova said:
so if i have the xt1944-3 can I use this tutorial? and what twrp recovery should I use..? or should i just wait
Click to expand...
Click to collapse
Well I've only tested on XT1944-2/4 you should try by your own risk, then for TWRP use the one that is made for Moto E5 Play, then boot into TWRP using fastboot boot "twrp-james.img" don't try to install because it wont work
Any plans to get the remaining hardware working? I tried flashing factory Vendor image from the XT1921-1 retail firmware for the hell of it to see if that might change anything with the camera and flash, but it didn't. LOS logs a crash.
01-04 06:43:08.824 F/libc (622): CANNOT LINK EXECUTABLE "/vendor/bin/hw/[email protected]": library "[email protected]" not found
01-04 06:43:08.825 F/libc (622): Fatal signal 6 (SIGABRT), code -6 in tid 622 (motorola.hardwa), pid 622 (motorola.hardwa)
01-04 06:43:09.162 F/DEBUG (712): pid: 622, tid: 622, name: motorola.hardwa >>> /vendor/bin/hw/[email protected] <<<
01-04 06:43:09.162 F/DEBUG (712): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
01-04 06:43:09.180 F/DEBUG (712): Abort message: 'CANNOT LINK EXECUTABLE "/vendor/bin/hw/[email protected]": library "[email protected]" not found'
Click to expand...
Click to collapse
I might not have been looking in the right place but the imgtuner file name in /vendor/lib/hw is: [email protected]
If I had any idea how to fix this I would try.
weakNPCdotCom said:
Any plans to get the remaining hardware working? I tried flashing factory Vendor image from the XT1921-1 retail firmware for the hell of it to see if that might change anything with the camera and flash, but it didn't. LOS logs a crash.
I might not have been looking in the right place but the imgtuner file name in /vendor/lib/hw is: [email protected]
If I had any idea how to fix this I would try.
Click to expand...
Click to collapse
I was hoping the camera commits had been added to the GitHub repositories by now, but they have not as of this date. A manual fix can likely be accomplished by replacing the camlibs in the Lineage build with the camlibs from the stock build. Unfortunately, due to my work schedule, I don't get a lot of spare time for development, but if anybody wants to try, simply copying/replacing the camlibs from stock to Lineage should fix the camera.
MotoJunkie01 said:
I was hoping the camera commits had been added to the GitHub repositories by now, but they have not as of this date. A manual fix can likely be accomplished by replacing the camlibs in the Lineage build with the camlibs from the stock build. Unfortunately, due to my work schedule, I don't get a lot of spare time for development, but if anybody wants to try, simply copying/replacing the camlibs from stock to Lineage should fix the camera.
Click to expand...
Click to collapse
Im new to the android rom/firmware file structure. just want to make sure I understand. are you referring to the .so camera libraries in vendor/lib? or do you mean the actual /core/java/android/hardware framework files in the source?
Res Remix system-180818-arm-aonly-gapps.img
camera works good... flash too
apparently i still have force encrypt though and the phone can definitely get laggy
tbirdguy said:
Res Remix system-180818-arm-aonly-gapps.img
camera works good... flash too
apparently i still have force encrypt though and the phone can definitely get laggy
Click to expand...
Click to collapse
That's right, camera and flashlight are working on RR OS GSI Official, but that lag is horrible, well it's only while scrolling and system ui, but the rest of the apps are working fine, to disable encryption you must flash no verity kernel that it's attached on previous commentaries and also to edit fstab.qcom then you'll skip encryption, but it doesn't affect on performance because even you skipped encryption the device still laggy, also on Pie is the same, but some extra bugs like graphic glitches, anyway I couldn't find a way to fix that lag, even using apps like L Speed
Fersho said:
That's right, camera and flashlight are working on RR OS GSI Official, but that lag is horrible, well it's only while scrolling and system ui, but the rest of the apps are working fine, to disable encryption you must flash no verity kernel that it's attached on previous commentaries and also to edit fstab.qcom then you'll skip encryption, but it doesn't affect on performance because even you skipped encryption the device still laggy, also on Pie is the same, but some extra bugs like graphic glitches
Click to expand...
Click to collapse
Just FYI the no verity kernel results in a bootloop on the TMO XT1921-3

T-Virus - Infect your Nokia 8 with Project Treble (2019-07-02)

Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research about modifying your android system before flashing this!
* YOU are choosing to make these modifications, and if you point the finger at
* me for messing up your device, I will laugh at you. Hard. A lot.
*/
(if you expected the Resident Evil references to stop, you just got gnomed)
What is this?
T-Virus (for treble-virus) is a tool that takes a stock Nokia 8 firmware and "infects" it with various parts from the Nokia 8 Sirocco firmware, generating a firmware bundle that is compilant with Project Treble and that can be flashed to a Nokia 8 using NOST.
Firmware Sources
The base of T-Virus is the stock Nokia 8 firmware image (5150 / April Security patch at the time of writing). When being run, the build script takes those files and replaces the partition table with the one from Nokia 8 Sirocco. This required for creating a vendor partition that the stock Nokia 8 does not have. The vendor image is taken from the Sirocco firmware as well. During the build, the vendor image is mounted as rw, and various files are copied over from the stock Nokia 8 system image, or get patched to properly support the minor hardware differences between the two phones. Those actions are defined through very basic scripts inside of the vendor folder in the repository.
The boot image is a modified version of my umbrella kernel, which has support for early mounting vendor. It also includes a TWRP build with full support for Project Treble.
SELinux Hell
Because Android does some very weird stuff with SELinux contexts, you cannot launch a service file when it has an unknown context. We have to fix that by force-setting the SELinux context manually, but due to how SELinux works, this is only possible on a Linux system without SELinux. This means, that you cannot build this on a distribution with SELinux (Fedora in my case). I fixed the problem by building the images in a Ubuntu VM.
How to build?
First you have to download the latest firmware image from https://tmsp.io/fs/xda/nb1/firmware, and the exdupe tool from https://www.quicklz.com/exdupe
Extract the firmware into a folder and then clone the repository, like this:
Code:
$ mkdir firmware
$ ./exdupe -R ~/Downloads/NB1-5150-0-00WW-B03.qlz firmware/
$ git clone https://github.com/resident-nokia/t-virus
$ cd t-virus
The build script has two options you have to set: a version and the path to the extracted firmware. This means you have to run it like this:
Code:
$ ./build.sh --version v0.1 --firmware ../firmware
Leave it running and when it asks you, enter your sudo password. This is required to mount the Android ext4 partitions and edit the files that are only accessable by the (Android) root user, and retain their permissions.
When the script has finished the flashable firmware image will be inside of the out folder. You can optionally package this as a .qlz file again using exdupe.
What works?
It boots
Data decryption in recovery
Flashing GSIs / OpenGApps in recovery
WiFi
Mobile Data
Bluetooth
Sound
Vibration
Calling
Hardware buttons
Fingerprint
Camera
GPS
NFC
SDCard
Multi SIM
4k Video
What doesn't work, or isn't tested
Haptic feedback for Hardware buttons
Bluetooth headphones don't get registered properly
Nokia OZO audio support is missing
Fingerprint sensor is reported as being on the back of the phone
There might be issues with USB transfer under Windows
VoLTE (untested)
How to install?
WARNING: This might not be useable as a daily driver. Continue only if you are able to troubleshoot things if neccessary (bootloops, bricking the phone, causing the alarm app to declare nuclear war)
You can download the latest release from the releases page on the repository. It is a .qlz firmware, so you will have to flash it through NOST. You will need a completely unlocked bootloader. When flashing, make sure to select the "Erase Userdata" option, not doing this will most certainly bootloop the phone.
After the installation completed, your phone will reboot into phh's AOSP GSI. If you want to use a different GSI (you most likely will), follow these steps:
Download your favorite GSI
Unpack every form of compression, so you end up with a .img file
Boot into recovery
Copy the .img to the internal storage of your phone, or to your SDCard
Select "Install" -> "Install .img", select the image file you copied and flash it to your system partition
Then install OpenGApps or any other modifications you like.
Wipe /data to allow the new system image to boot properly and then reboot
To update to a newer version without having to erase userdata, download the zipped vendor image from the release page, and flash the image inside in TWRP.
If you want to go back to stock, simply download the 5150-revert firmware and flash it with NOST, with the "Erase Userdata" option enabled. It will revert all changes T-Virus made to your phone. Firmwares from https://tmsp.io/fs/xda/nb1 will not work.
Links?
Repository: https://github.com/resident-nokia/t-virus
Download: https://github.com/resident-nokia/t-virus/releases
Reverting to stock: https://github.com/resident-nokia/t-virus/releases/tag/5150-revert
What if I have a bug?
Upload a proper bugreport. This means logcat and dmesg. If you don't know how to get them, google it. Also, describe the issue and provide steps to replicate it. Everything else will be ignored.
I don't daily drive this phone anymore. I am doing this just because it is an interesting technical challenge. I don't have as much motivation to fix bugs than someone who daily drives it.
I want to say thank you!
I usually don't do this, but since this involved a lot of work on my side, I would be grateful if you would want to say thank you by buying me a coffee (or two): https://paypal.me/thmsp
Ok. After the flashing we have a phone "infected" by the Project Treble. But what it gives to end-user? What is profit of this?
kosmatyj said:
Ok. After the flashing we have a phone "infected" by the Project Treble. But what it gives to end-user? What is profit of this?
Click to expand...
Click to collapse
The ability to install GSIs (Generic System Images). Basically everything from here: https://forum.xda-developers.com/project-treble/trebleenabled-device-development
Oh! Sounds pretty good! Thanks. Will think about it. Really expands posiibilities and needs to be tested.
---------- Post added at 10:54 ---------- Previous post was at 10:29 ----------
Q: Should Ihave an Android Pie be installed first or it can be flashed over ony ROM version (I currently have Nougat ROM installerd on my Nokia 8)?
kosmatyj said:
Q: Should Ihave an Android Pie be installed first or it can be flashed over ony ROM version (I currently have Nougat ROM installerd on my Nokia 8)?
Click to expand...
Click to collapse
It could work, since it is a modified firmware for reflashing, but just to be sure, update to Pie through OTA. That's what this has been tested with and you won't update your bootloader in the process which eliminates some possible incompatibilities.
What is password for t-virus-20190703.qlz? Should I flash the TV-20190703-vendor.zip before or t-virus-20190703.qlz is all I need?
kosmatyj said:
What is password for t-virus-20190703.qlz? Should I flash the TV-20190703-vendor.zip before or t-virus-20190703.qlz is all I need?
Click to expand...
Click to collapse
It's all in the instructions. There is no password on the qlz file. You can't extract it, you have to flash it using NOST. The zip is for updating from previous versions and not for the initial installation.
Oh, I understood. No need to unpack, just download and flash over NOST, right? Thanks ones more. It is new for me, that`s why I have so much questions.
kosmatyj said:
Oh, I understood. No need to unpack, just download and flash over NOST, right? Thanks ones more. It is new for me, that`s why I have so much questions.
Click to expand...
Click to collapse
Yes. Just follow the instructions in NOST and select the T-Virus .qlz when it asks you to. Also, make sure you select the "Erase Userdata" option in the drop down menu that appears after selecting the .qlz.
Thank you for this - hope you enjoy the couple of coffee's
Amazing work. Can the current Android Q GSI be used?
comatrices said:
Amazing work. Can the current Android Q GSI be used?
Click to expand...
Click to collapse
When I tried it it didn't boot. Your mileage may vary, but you probably have to wait until the source code for Q has been published and people can build real phh GSIs from it.
Hello! Author, don`t you planning to build the same but for Android 8.1? Your work is great anyway but would be just amazing to have an Oreo in this appearance. Thank you.
kosmatyj said:
Hello! Author, don`t you planning to build the same but for Android 8.1? Your work is great anyway but would be just amazing to have an Oreo in this appearance. Thank you.
Click to expand...
Click to collapse
Just flash an Oreo GSI? I know you can run Pie GSIs on Oreos vendor, so it should work fine the other way around.
Nah! Didn`t work. After "android" logo it drops into download mode. AOSP 32 (last version of A 8.1 GSI).
kosmatyj said:
Nah! Didn`t work. After "android" logo it drops into download mode. AOSP 32 (last version of A 8.1 GSI).
Click to expand...
Click to collapse
I am not exactly sure if I understand you correctly, but Nokia 8 is not an A-only device, it is an AB device. You need to flash the AB image of AOSP, not the A one.
Right, I did exactly like you said. system-arm64-ab-vanilla-nosu - image that I flashed couple minutes ago. Downloaded from here: https://github.com/phhusson/treble_experimentations/releases/tag/v32
I`m sorry about my English. I`m Russian.
kosmatyj said:
Right, I did exactly like you said. system-arm64-ab-vanilla-nosu - image that I flashed couple minutes ago. Downloaded from here: https://github.com/phhusson/treble_experimentations/releases/tag/v32
I`m sorry about my English. I`m Russian.
Click to expand...
Click to collapse
Ok, then it probably doesn't work the other way around (Oreo with Pie vendor). An Oreo-based T-Virus is unlikely to happen though, because Siroccos Oreo vendor has some problems (calls not going through properly), and I dont want to maintain two versions of it because, as said in the OP, I don't use my Nokia 8 anymore. It seems like Pie is all you can get with this for now, sorry.
Hi all. Just to make it clear. The procedure for the Nokia 8 is:
1. Unlock Bootloader
2. Do "critical unlock" (fastboot flashing unlock_critical)
3. Flash "t-virus-20190703.qlz" with NOST?
Did i miss something? Whats with Security Enabled Linux?
just4me12 said:
Hi all. Just to make it clear. The procedure for the Nokia 8 is:
1. Unlock Bootloader
2. Do "critical unlock" (fastboot flashing unlock_critical)
3. Flash "t-virus-20190703.qlz" with NOST?
Did i missed something? Whats with Security Enabled Linux?
Click to expand...
Click to collapse
That's right. Don't forget to add "erase data" option while flashing t virus with NOST otherwise you'll end up in a bootloop.

[RECOVERY][UNOFFICIAL] TWRP HH for Nexus 5 (hammerhead) [DISCONTINUED]

TWRP HH for Nexus 5​
About:
TWRP is an open source, community project. TWRP development is done by roughly 4 people at this point. We also have a large support community with many people who are willing to answer questions and help people with their devices either through our IRC channel or on forums like xda-developers.
Team Win was originally formed to work on porting WiMAX to CM7 for the HTC EVO 4G. After our work on the EVO 4G we wanted to work on a project that would work on more devices than just the EVO 4G and we settled on working on a recovery. Today TWRP is the leading custom recovery for Android phones.
A custom recovery is used for installing custom software on your device. This custom software can include smaller modifications like rooting your device or even replacing the firmware of the device with a completely custom "ROM" like OmniROM
Click to expand...
Click to collapse
Disclaimer:
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this RECOVERY
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/
You can find the source code for TWRP on GitHub. If you would like to contribute to TWRP, please visit Gerrit Code Review.
Features:
HH.S version with stock partitions map. S means stock.
HH.R version with repartition support. R means repartition.
Working decryption on custom roms. Tested on LOS 16.0, LOS 17.1, LOS 18.1, but should work on all Androids since Nougat.
exFAT and NTFS support (read and write) for USB OTG
Requirements:
You need to have an unlocked bootloader to install and use TWRP!
Known bugs:
Everything looks good so far
Downloads:
https://sourceforge.net/projects/hammerhead-twrp/files/beta/
Credits:
TeamWin
@Clamor
@steadfasterX
And all the contributors out there in the community
Contributors:
@z3DD3r
Source Code:
Device tree: https://github.com/z3DD3r/twrp_android_device_lge_hammerhead
Version Information:
Satus: Stable
TWRP version: 3.7.0_9
HH Project versions: HH.S.17 and HH.R.17
Created: 2020-02-08
Last Updated: 2022-02-06
Repartition (HH.R versions)
ALWAYS DO THE BACKUPS!!!
No one is responsible for your actions!
Repartition may potentially brick your device, although risk is reduced to minimum.​
Features:
Increases /system partition to ~1444Mb
Decreases /cache partition to ~255Mb
Doesn't provide /vendor partition
Doesn't touch /data partition
Requirements:
Not modified partitions by any other solutions
How to increase /system partition and change partitions map:
- Flash the HH.R version of TWRP and launch it
- Open terminal (TWRP -> Advanced -> Terminal)
- Type hh_repart -m
- Wait until your phone reboots
- Install your rom
How to revert back to stock /system size and stock partitions map:
- Launch HH.R version of TWRP
- Open terminal (TWRP -> Advanced -> Terminal)
- Type hh_repart -r
- Wait until your phone reboots
- Flash official TWRP or HH.S version of TWRP! Don't ignore this step!
- Install your rom
How to dump partitions map:
- Launch HH.R version of TWRP
- Open terminal (TWRP -> Advanced -> Terminal)
- Type hh_repart -d
- Wait until process finishes
- Look at /sdcard/partitions.log file
reserved
reserved
Some technical notes about the decryption and Android Q support.
Right now the only possible way to decrypt data on our devices is to use system's vold. This logic was added to TWRP some time ago but one required change wasn't in the tree. This change is here: https://gerrit.twrp.me/c/android_bootable_recovery/+/1919. Without this patch system's vold will fail on hammerhead. I don't know why but services in the sbin can't handle decryption. Also using the system's vold means that ROM should be installed to decrypt data. Without installed ROM decryption is not possible!
About SAR and Android Q. Work on SAR support in TWRP is still in progress but some patches are already available on gerrit. These patches are required to properly detect SAR and mount partitions. Also since Android Q one more service should be run before trying to decrypt data. This service is apexd. Android Q runs apexd on early-init stage to provide required runtime libraries. U can see how it launched at https://android.googlesource.com/pl...fs/tags/android-10.0.0_r29/rootdir/init.rc#37. Only after that step all other services like qseecomd, hwservicemanager, servicemanager and keymaster can be run from system or vendor.
The last point is prebuilt vdc. Prebuilt vdc_pie which is shipped with TWRP fails to run because of linker error. I don't remember exactly what was the error but i guess that something is removed in libc. To fix that problem i've built vcd_ten binary with Android Q sources and placed it into device tree for hammerhead as a temporary solution. The source code of that binary is identical to vdc_pie which located at https://github.com/TeamWin/android_...b/android-9.0/crypto/vold_decrypt/vdc_pie.cpp
This is just a quick notes about what was done.
Patched bootable_recovery is located at https://github.com/z3DD3r/twrp_android_bootable_recovery/tree/android-9.0
Device tree for Q located at https://github.com/z3DD3r/twrp_android_device_lge_hammerhead/tree/q-sar
I hope this will be helpful for TWRP Team!
PS: Changes i've made should be improved. Don't treat them as production ready and/or stable!
FYI @Dees_Troy
Hi, thank you very much for this solution.
hh_repart -d - worked but I couldn't read the log file before rebooting, maybe it's obvious
hh_repart -m - worked without any issues
I have also successfully flashed Lineage 17.1 from your other thread, gapps and Magisk.
New versions are up (HH.S.3 and HH.R.3)
Added exFAT and NTFS support (read and write) for USB OTG
Kernel image is compressed with XZ LZMA2 compression algorithm (smaller size of the recovery image)
New versions are up (HH.S.4 and HH.R.4)
Fixed mounting issues of the system partition
Fixed device overheating while in recovery
I highly suggest everyone update to this version!
I have a question, certainly not in any way a complaint.
I have been running HH4 for a few days. Last night I made a TWRP backup of my LineageOS 17.1, which I installed on 20th without Gapps to see how it works without Google - quite well, in fact, with the help of APK Updater.
This morning I stupidly applied the 22nd update with Gapps - I was on autopilot and forgot that this device had no Google.
No problem, I thought, I'll just restore last night's backup. So I did a total wipe and format ("yes"), but no backup will restore. I just get the LOS line-&-circle animation for ages. I've tried earlier backups, and even standard unmodified TWRP, all with the same result. No backup will restore.
It's not a big deal - I can start with a totally new installation - but I'd like to know if anyone has taken a backup and successfully restored it. Or am I just lucky...? If I can't restore, then it sort of defeats the point of TWRP, no?
Edit: Seriously, 85 people have downloaded HH4. Has not a single one of you tried a restore of a backup?
Edit: Tumbleweed...
Edit: Do I take it that nobody has tried to restore a backup? If you haven't, and my experience is normal, then we're risking a two-hour fresh install in case of update problems rather than a two-minute restore.
dahawthorne said:
I have a question, certainly not in any way a complaint.
I have been running HH4 for a few days. Last night I made a TWRP backup of my LineageOS 17.1, which I installed on 20th without Gapps to see how it works without Google - quite well, in fact, with the help of APK Updater.
This morning I stupidly applied the 22nd update with Gapps - I was on autopilot and forgot that this device had no Google.
No problem, I thought, I'll just restore last night's backup. So I did a total wipe and format ("yes"), but no backup will restore. I just get the LOS line-&-circle animation for ages. I've tried earlier backups, and even standard unmodified TWRP, all with the same result. No backup will restore.
It's not a big deal - I can start with a totally new installation - but I'd like to know if anyone has taken a backup and successfully restored it. Or am I just lucky...? If I can't restore, then it sort of defeats the point of TWRP, no?
Edit: Seriously, 85 people have downloaded HH4. Has not a single one of you tried a restore of a backup?
Edit: Tumbleweed...
Edit: Do I take it that nobody has tried to restore a backup? If you haven't, and my experience is normal, then we're risking a two-hour fresh install in case of update problems rather than a two-minute restore.
Click to expand...
Click to collapse
Have u tried to restore backup of other ROMS? I guess it is not TWRP's problem...
dahawthorne said:
I have a question, certainly not in any way a complaint.
I have been running HH4 for a few days. Last night I made a TWRP backup of my LineageOS 17.1, which I installed on 20th without Gapps to see how it works without Google - quite well, in fact, with the help of APK Updater.
This morning I stupidly applied the 22nd update with Gapps - I was on autopilot and forgot that this device had no Google.
No problem, I thought, I'll just restore last night's backup. So I did a total wipe and format ("yes"), but no backup will restore. I just get the LOS line-&-circle animation for ages. I've tried earlier backups, and even standard unmodified TWRP, all with the same result. No backup will restore.
It's not a big deal - I can start with a totally new installation - but I'd like to know if anyone has taken a backup and successfully restored it. Or am I just lucky...? If I can't restore, then it sort of defeats the point of TWRP, no?
Edit: Seriously, 85 people have downloaded HH4. Has not a single one of you tried a restore of a backup?
Edit: Tumbleweed...
Edit: Do I take it that nobody has tried to restore a backup? If you haven't, and my experience is normal, then we're risking a two-hour fresh install in case of update problems rather than a two-minute restore.
Click to expand...
Click to collapse
With TWRP 3.3.1-HH.R.4 nanroid backup and restore in LOS 14.1 with encyption = ok
With TWRP 3.3.1-HH.R.4 nanroid backup and restore in LOS 17.1 with encyption = ok
sant514 said:
With TWRP 3.3.1-HH.R.4 nanroid backup and restore in LOS 14.1 with encyption = ok
With TWRP 3.3.1-HH.R.4 nanroid backup and restore in LOS 17.1 with encyption = ok
Click to expand...
Click to collapse
Can u tell me which build of LOS 17.1 have u used for these tests?
Los 17.1 28-02-2020
sant514 said:
Los 17.1 28-02-2020
Click to expand...
Click to collapse
Thanks! U just confirmed that LOS 17.1 could not be restored due to selinux denials. Some days ago i've updated sepolicies and now everything works.
@dahawthorne, FYI
Excellent news - thank you.
And also a relief to find that I wasn't just being an idiot...
I see "E:Unable to decrypt FBE device" when flashing in TWRP.
Should I just disregard this message?
smsmasters said:
I see "E:Unable to decrypt FBE device" when flashing in TWRP.
Should I just disregard this message?
Click to expand...
Click to collapse
Just ignore it.
Our device doesn't support FBE (file based encryption). So this error doesn't affect our device at all.
Since I was the one to mention my problem with restoring a TWRP image, I think I should report that, as z3DD3r stated above, TWRP HH 4 does indeed work fine in making and restoring backups. I took a backup yesterday and restored it this morning; no wipe, just a straight recovery, and it all went through in less than two minutes.
Thanks for all your work, z3DD3r. It's great to have bleeding-edge software on such an old device.
Hello @z3DD3r , I've been working on a ship for the last couple of months, so missed some things.
I'm using the first original twrp-3.3.1-HH-hammerhead version you shared in the telegram group, but now I found this thread with newer versions.
Just wanted to double check if it's okay to update straight from that original HH version (ALREADY REPARTED) to the lates HH.R.4 without any problems.
z3DD3r said:
How to revert back to stock /system size and stock partitions map:
- Launch HH.R version of TWRP
- Open terminal (TWRP -> Advanced -> Terminal)
- Type hh_repart -r
- Wait until your phone reboots
- Flash official TWRP or HH.S version of TWRP! Don't ignore this step!
Click to expand...
Click to collapse
And just out of curiosity, cause I'm not planning on reverting to stock partitions. Why is it so important to flash official or HH.S version after reverting?
What is the difference between stock and HH.S.4 then?
Thanks for putting your time and efforts in to keeping this device alive!
TomiLynch said:
Hello @z3DD3r , I've been working on a ship for the last couple of months, so missed some things.
I'm using the first original twrp-3.3.1-HH-hammerhead version you shared in the telegram group, but now I found this thread with newer versions.
Just wanted to double check if it's okay to update straight from that original HH version (ALREADY REPARTED) to the lates HH.R.4 without any problems.
Click to expand...
Click to collapse
twrp-3.3.1-HH-hammerhead and TWRP HH.R uses the same script for repartition. So, yes, it is okay to flash HH.R over the twrp-3.3.1-HH-hammerhead.
TomiLynch said:
And just out of curiosity, cause I'm not planning on reverting to stock partitions. Why is it so important to flash official or HH.S version after reverting?
What is the difference between stock and HH.S.4 then?
Thanks for putting your time and efforts in to keeping this device alive!
Click to expand...
Click to collapse
Because TWRP includes size of system partition. This size should match the size of system partition on device. Otherwise bad things can happen...

[ROM][OFFICIAL][Pie][Dipper][PORT]Ubuntu Touch port for Xiaomi Mi 8

View attachment 5376913
What is it? What is Ubuntu Touch?
Ubuntu Touch, as comes from naming, is Ubuntu managed to run on phone.
Well, Canonical abandoned it, so community organization, UBports, now develops, maintains, and ports UT to new devices.
And this is what the thread is about. The amount of devices able to run UT was 63(as written on website at the time of writing this post). But now it is 64 devices.
The 64th port to Xiaomi Mi 8.​So, lets talk now what works, and what is not(you will also be able to see that on website, as soon as merge request will be accepted).
​What works:
Actors​
Manual brightness(auto seems not supported by UT, idk)​
Notification LED​
Vibration​
Torchlight​
Camera​
Flashlight​
Photo​
Video​
Switch between front and rear cameras​
Cellular​
Carrier info​
Calls​
SMS​
Audio routings (switching between main speaker, and phone speakers)​
Volume control​
Misc
Battery percentage
Online charging(while phone is on, or in sleep/standby state)
UBports recovery
Network
WiFi(2.4GHz, 5GHz)
Bluetooth
Hotspot(partially, seems that 5G is not supported)
Flight Mode
Sensors
Fingerpring
GPS
Rotation
Touchscreen(ofc, otherwise I would write this post)
Sound
Microphone
Earphones
Loudspeaker
Volume Control
USB
ADB
MTP
Several things, are not tested, such as Wireless Display, NFC, SIM PIN Unlock, MMS, Dual SIM.
Non working features are Offline Charging, Auto-brightness, Proximity Sensor(you need to click the Power Button, that won't stop the call).
Big thanks to TheKit who helped me with the port.
TheKit's Gitlab and UBports forum profile.
Right now, config for UBports Installer is waiting approval of pull request, and merge request for devices.ubuntu-touch.io is still not approved, you will have to do everything manually. UBports Installer config PR finally merged, but only Global versions are supported, since firmware files that are flashed by Installer are for Global. If you do install, be sure to flash vendor and firmware packages for your variant after.
WARNING! YOU MUST HAVE UNLOCKED BOOTLOADER! EVERY THING YOU DO, YOU DO ON YOUR RISK, IF YOU BRICKED DEVICE, THATS YOUR FAULT, NOT MY! I DO NOT TAKE ANY RESPONSIBILITY FOR YOUR BRICKED DEVICE!
Preparations before installation.
Flash TWRP recovery
You need to download and flash stock firmware and vendor from Android 9, MIUI V11.0.6.0.PEAMIXM(be aware that this Vendor+Fw is for Global, if your Device is Chinese or Russian variant, or any other, flash vendor package according your phone variant). It is compressed into ZIP file, so you will have to flash it though TWRP. Do not use adb sideload, push file to any directory you want, and install it from phone.
Download boot.img, system.img, recovery.img from here.
In TWRP go to "Wipe" ==> "Format Data" ==> Type "yes" ==> Enter. Then go to Reboot ==> Recovery. After restarted. Again go to Wipe ==> Advanced Wipe, and select all partition except USB-OTG
Now we have two ways of installation, from TWRP, and from Fastboot.
TWRP
On PC:
Code:
$ adb push system.img /tmp
$ adb push boot.img /tmp/
Now go to "Install"
Get to /tmp/ directory
"Install Image"
Flash boot.img to Boot partition, system.img to System.
Then reboot to system.
If system works, reboot to TWRP again and push recovery.img to /tmp/, then flash it to Recovery partition.
Fastboot method:
Code:
#Simple as that
$ fastboot flash boot boot.img
$ fastboot flash system system.img
$ fastboot flash recovery recovery.img
#Flash recovery only after you are sure system works.
Or you can just install a installable zip archive I've recently made. All my builds will be hosted on GitHub Releases on my repo. New builds will come by every new official OTA release. UBports recovery is not included, installation goes proceeds from TWRP, install just as simple as custom ROM installation. Btw, do you want me to add notch patches to system image, so it doesn't look awkward?
Note: this zip is not signed, so disable signature verification before installing, or installation will fail.
Optionally you can adjust your panel so it doesn't look weird. Rn idk how to move panel below the notch(display cutout, I hate Apple for that). It moves buttons in Panel below, and adjusts height of the panel. This repo will do everything for you. Just download it to device. And run apply-notch-hax.sh. It will automatically find device name, apply patches, and restart Unity.
Note: run the script as standard user, not root.
Note2: if you get bootloop, wipe system, format data, restart bootloader, flash everything again, but before rebooting to system try flashing SELinux permissiver. And don't flash Magisk, it's useless, and may destroy your system.
Device source: Gitlab
Kernel source: Gitlab
Gitlab CI build artifacts: Gitlab
Join Telegram support group if you need any help.
See all supported devices at official website.
P.S. Since you have to use fastboot, and UBports Installer uses fastboot, there may be some difficulties for Ryzen CPU users. I attached zip file with executable (.bat file). It will allow you use fastboot with USB 3.x + Ryzen. Unpack it. And run .bat file as admin. Reboot. Voila, fastboot works as should.
Linux users should either use another laptop with Intel CPU, or flash from Windows, or use USB 2.0 hub.
P.S.S. Ok, I managed to get GitHub CI to work, so now if any of you want to test fixes and new features, head to this GitHub repo, and download artifacts from "Make OTA images"(in Actions tab), and flash them using fastboot.
Amazing work! I've always wanted to port UBTouch to Mi 8 but I couldn't get WiFi and mobile data to work on my attempts. As my primary phone, I needed it to be online as much as possible. Really happy to be able to use it on our devices
I've noticed an issue (I haven't managed to recreate this however):
- The OS can't switch between audio outputs, for example I need to restart my phone to hear sounds from loudspeaker after making a phone call. Please let me know if there's a workaround for this issue.
I'll be looking out for more issues to report. Once again, thanks for this port it's amazing
someone plz port Ubuntu to poco f1 too
gamerlucky said:
someone plz port Ubuntu to poco f1 too
Click to expand...
Click to collapse
It is already ported, a long before Mi 8
@itagizade have you tried waydroid on this?
nSKN3i said:
@itagizade have you tried waydroid on this?
Click to expand...
Click to collapse
No still not.
this amazing work. i have ran some x11 app on my phone,jt works. now i can say hava a pc in my pocket . one problem i found is system partion size too small (only 3g), this not enough if i want install more linux package lije chrome firefox
I updated download link, so if you have already flashed everything, I suggest you to flash a new recovery, as previous one, identified device as Mi MIX 3.
it is still complex for my level of knowledge to install this rom on my Mi 8 and it is with great joy that we have a port like this from Ubuntu Touch and that in the future it will be easier to install and maybe other ports as well as SailfishOS in the menu. Mi 8 great job Dev.
itagizade said:
It is already ported, a long before Mi 8
Click to expand...
Click to collapse
link please
gamerlucky said:
link please
Click to expand...
Click to collapse
See on devices.ubuntu-touch.io.
tried it out and worked great, glad to see something different, keep up the excellent work bro!
hey i was wondering about file system can we use f2fs ?
I tried installing apk files but getting error
Also notch fix gives me this error in terminal
EDIT: nevermind the apk i forgot to run anbox-tool install
EDIT2: nevermind notch fix i just pushed the file to downloads and run sh command
Amazing work! It is the fastest rom I have ever installed! The SIM PIN unlock works well and the offline charging partially (approximately, five minutes after connecting the charger). I hope NFC works, too. In the future, it would be nice if apply-notch-hax.sh was fixed (error, line 57). Anyway, thank you for porting and providing this rom!
For Waydroid support, there are some instructions here. To start the container service, use the following command:
Code:
sudo waydroid container start
Advanced Gears said:
Amazing work! It is the fastest rom I have ever installed! The SIM PIN unlock works well and the offline charging partially (approximately, five minutes after connecting the charger). I hope NFC works, too. In the future, it would be nice if apply-notch-hax.sh was fixed (error, line 57). Anyway, thank you for porting and providing this rom!
For Waydroid support, there are some instructions here. To start the container service, use the following command:
Code:
sudo waydroid container start
Click to expand...
Click to collapse
Glad you enjoy it. Right now I'm a little busy, but asap I will continue the work on this. Gotta make it daily-driver ready.
About error with `apply-notch-hax.sh`, other people have successfully used that script. Could you please specify the error?
The touch has been dead since I flash This rom
MilkywayOpenSource said:
The touch has been dead since I flash This rom
Click to expand...
Click to collapse
You mean Touchscreen is not working? Did you change you stock panel?
No,
MilkywayOpenSource said:
No,
Click to expand...
Click to collapse
Is your device Chinese version, or any other that Global?
It is global and after I install Ubuntu touch the screen never response to touch even in twrp

Categories

Resources