[Recovery][P20][Unofficial]TWRP 3.2.1-0 [16/04/2018] - Huawei P20 ROMs, Kernels, Recoveries, & Other Deve

Disclaimer​This software comes with no warranty,XDA staff ,myself or TeamWin stuff can't be hold responsible for any damage it may cause to your device.
Note: Currently Oreo 8.1 custom roms are not supported,only stock EMUI 8.x .
Download and Installation​
* Download twrp recovery
* Start your device in fastboot mode
* Install the recovery using the following command:
Code:
fastboot flash recovery_ramdisk [name of the file].img --> ex: fastboot flash recovery_ramdisk twrp_p20_0.1.img
* Restart with this command:
Code:
fastboot reboot
* As soon as you execute the restart command,remove the USB cable and keep pressing Volume UP,so the device will boot to TWRP.This is to avoid that the device boot to OS,overwritting TWRP recovery.
Features​
Internal storage decryption = working (If decryption with pin/password fails, remove the security (pin, pass, fingerprint) before booting to TWRP and it should decrypt just fine )
MTP and OTG connection = working
Backup&Restore = working
Note: This was tested only by few P20 owners,so if you test it,please report back!There are no sources for this yet,because is based on the work of @zxz0O0 ,from Honor 9 forum.
Credits
**** @zxz0O0 - This wouldn't be possible without this guy,so big big thank to him.I used his base to make this recovery work ,so in sign of respect his nick will also be on the TWRP boot screen.Thank again buddy!
**** TeamWin project ,obviously.
Download links
twrp_p20_0.1.img - Decryption support (you can use the same password/pin/pattern to decrypt in TWRP), /recovery_ramdisk not available for backup./vendor not available for backup (use /vendor_image instead)

Reserved

Works like a charm! Even decryptin! Thanks so much for your work! P20.

Amazing Work
Works without hiccups on my EML-L29 with demo fw. Thank you so much!

Works perfectly on EML L29! Thank you very much! Now let's try phh AOSP, :fingers-crossed:

ectoplasma22 said:
Works perfectly on EML L29! Thank you very much! Now let's try phh AOSP, :fingers-crossed:
Click to expand...
Click to collapse
I don't know if it will work on that, is tested only on EMUI.

Work perfectly on P20 Normal and i am on pphusson rom
Big thanks

Pretoriano80 said:
Reserved
Click to expand...
Click to collapse
What is the chance of this work on P20 Pro ? :fingers-crossed:

otonieru said:
What is the chance of this work on P20 Pro ? :fingers-crossed:
Click to expand...
Click to collapse
It's working already, but i didn't created a thread yet, i was waiting for more feedback from testers.

Dumb question - Does the bootloader need unlocking first?

CurtisAndroid5 said:
Dumb question - Does the bootloader need unlocking first?
Click to expand...
Click to collapse
yes

Works fine on P20 Pro (CLT-L09)
Thank you!

Yes you need to unlock the bootloader to flash

should i try on a p20 lite ?

Beantje said:
should i try on a p20 lite ?
Click to expand...
Click to collapse
It won't work, i guess!

Pretoriano80 said:
It won't work, i guess!
Click to expand...
Click to collapse
im gona try

Seems to work fine on my P20, thank you.

Re-uploaded 0.1 with some small fixes. More partitions are available to install as image (check Install - > Install image).

I'm running into trouble when trying to resize the system partition.
Failed to unmount '/system' (Device or resource busy)
...
Repairing System before resizing.
Repairing System using e2fsck...
/sbin/e2fsck -fp /dev/block/sdd59 process ended with
ERROR: 8
Unable to repair System.
I guess the inability to unmount causes this. Does anyone have suggestions as to why it's happening and how to fix it?
Tried searching, but couldn't find anything useful so far.
Found some TWRP bug reports for different devices about this, maybe that's a possible direction to look into.

After some more investigation it seems that the the aptouch_daemon for TWRP is running from the system partition.
395 root 18092 S /system/vendor/bin/aptouch_daemon
When i kill the process, the command: e2fsck -fp /dev/block/sdd59 during resizing seems to work. The touch interface goes dead at that point, so can't test if the resize would work as i can't select it. The openrecoveryscripts only allow wiping of partitions it seems.
I did find multiple locations where the aptouch_deamon executable is stored:
/system/vendor/bin
/vendor/bin
I checked if it were links, but they don't appear to be.
There are some aptouch_daemon.rc files, that say to start from /system/vendor/bin/aptouch_deamon. I have changed the ones i found to remove the system directory, but on rebooting it stills loads the executable from /system/...
That's the stuff i figured out, which seems the main cause for the issue with the system partition. I'm not familiar with the code or build mechanism, so hopefully this gives you some information and an idea to fix it @Pretoriano80
If there is a git specific for this build, i'm willing to check if i can help with fixing this. Just not sure if i'm able to figure the system out quickly.

Related

[G4][UNOFFICIAL][ALPHA] EFIdroid for the LG G4

EFIDroid
A UEFI based Android bootloader.
EFIDroid provides an easy Installer, good looking Material Design user interfaces and uses very dynamic code.
Homepage: efidroid.org
Take over control before loading the Operating system.
EFIDroid attempts to make it easy for both users and developers to control their boot experience.
Multiboot
Install and boot any number of operating systems and recovery tools.
Boot plugins
Change the boot behavior without modifying ROM's. Swapping internal/external memory, overclocking or modifying the ramdisk. Live and without any permanent modifications.
UEFI Apps
EFIDroid uses UEFI in the background which means that you can boot other bootloaders like GRUB or rEFInd and even small games
Download
see Installation section
Requirements
The main OS (that one you currently use) must be rooted to use the efidroid app.
You may be able to install magisk later in a secondary ROM (never tried it though)
Hint:
lineageos root add-on works (tested on LOS 15.1) and magisk will NOT work. Use supersu.
TWRP / FlashFire installable ZIP:
Stable: supersu-stable
Beta: supersu-beta
Latest: supersu
At the moment the only TWRP which is working for efidroid is: twrp-3.1.1 - any newer TWRP release will fail with a ramdisk size error which is not due to a missing kernel patch. It's a known issue for efidroid and one of the reasons for the efidroid rewrite
I maybe find a workaround to get newer TWRP versions installed.. we will see..
So if you have a newer version of TWRP installed currently: upgrade/downgrade to that version first.
Installation
A full howto with screenshots can be found here
Unlock your device! This will NOT work with a locked bootloader (you know about UsU?)
Download the EFIDroid Manager from Google Play Store - Has been removed..
Efidroid manager download: main efidroid thread
Download the latest version by opening the "Downloads" tab of this thread (requires to open this thread in a browser)
Activate my efidroid OTA server:
Option 1 (permanent): modify /system/build.prop
Boot to TWRP
Make a backup (including system partition)!
Mount System partition in TWRP
enable the efidroid OTA server:
Code:
adb shell
echo "efidroid.server_url=https://raw.githubusercontent.com/steadfasterX/efidroid_ota_lgg4/master" >> /system/build.prop
reboot
verify that the efidroid server URL has been set properly:
Code:
adb shell getprop efidroid.server_url
Option 2 (will be lost on reboot): using setprop
Set the efidroid OTA server:
Code:
adb shell
setprop efidroid.server_url https://raw.githubusercontent.com/steadfasterX/efidroid_ota_lgg4/master
verify that the efidroid server URL has been set properly:
Code:
adb shell getprop efidroid.server_url
Open EFIDroid Manager
HINT: If you see an error like "cannot load device info, please check your connection : no value for lge/H815" then the above OTA url has not been set or is set wrong.
Go to Install/Update
Click Install --> HINT: THIS WILL MOVE YOUR BOOT AND RECOVERY PARTITION CONTENT
This means
1. from now on EFIDroid will boot each time u power on the device.
2. the recovery partition gets backed up and you will see it in EFIDroid again as (if TWRP): TWRP (internal).
3. you can still boot your main ROM by just choosing it from the list --> your ROM name - (internal)
If you don't like this you can install EFIDroid to either: recovery or boot partition only. But this is a manual process and when you upgrade with EFIDroid Manager it may overwrite your changes.
Install a custom ROM
A full howto with screenshots can be found here
Open EFIDroid Manager
Open the menu "Operating Systems" and click the FAB (Floating Action Button) at the bottom
Choose in the screen /data/media/0/multiboot as location.
Enter a name for the ROM
Optional: Choose another icon for the ROM
You can leave the partitions as they are (Schema LoopSystem + BindOther) Press the tab "PARTITIONS" and choose "LoopAll". You will see that the data partition is quite big (the g4 internal storage is just 23 GB so you choose a smaller size for each ROM to fit all your ROM slots).
Tip "data" and select GB in the drop down. Choose a proper size (i.e. 2 GB) depending on what you wanna do with that ROM and how many you wanna install (each ROM will take 4 GB for system + the data size you choose here)
In the tab "REPLACEMENTS" click the floating plus button and add a new cmdline override:
Code:
Name = androidboot.selinux
Value = permissive
press the tick in the top right corner to finish the setup
Now you can see your newly created ROM slot in the list
Reboot
Once you are in the efidroid, you can navigate around with volume down to go down, volume up to go up and the power button to confirm your selection.
To flash a ROM to the new empty slot, select TWRP (Internal) , press power and select the slot name with power again
At the moment the system partition is just empty and needs to be formatted before you can use it!
In TWRP:
select WIPE -> Advanced Wipe -> select "system" and "cache", then swipe to wipe.
select WIPE -> "Format Data" button
Reboot -> System. When you see efidroid again choose TWRP and select the new ROM slot again to boot TWRP again.
Install your ROM of your choice.
Hint: If you get an error regarding device detection you have to remove the assert line(s) within the ROM zip first
Supported devices
Any LG G4 model which can be unlocked (yea even UsU ones but that still requires some more work to detect them properly)
Known Issues
The Operating System list in the EFIDroid Manager is empty just upgrade to the latest EFIDroid manager app..
after installing a ROM it may bootloop under some circumstances
AROMA installer flickers extremely. Workaround: press power to turn off screen then turn it on again. It still flickers but u can see and use the installer at least.
As we need to use TWRP 3.1.1 (see requirements) UsU devices get not detected correctly!
The state of this project is ALPHA so expect issues and even data loss is possible (so do a TWRP backup often)
Booting a secondary ROM and working in a secondary ROM may feel slower (that's by design)
if a ROM has set selinux to enforcing it will not boot! --> If you setup the ROM slot properly (see above REPLACEMENTS tab) you do not need to care about.
Without that adjustment in the efidroid manager you have to modify the boot.img of every ROM:
change the cmdline from
androidboot.selinux=enforcing
to
androidboot.selinux=permissive
I started a while ago to make selinux policies for efidroid but it's not that easy and so atm no ROM which has selinux set to enforcing will boot.
Credits
@m11kkaa for EFIDroid
@J0SH1X for bringing a first port for the G4
@steadfasterX for being steadfast and optimizing efidroid
XDA:DevDB Information
EFIDroid for the LG G4, Tool/Utility for the LG G4
Contributors
steadfasterX, @m11kkaa, @J0SH1X
Source Code: https://github.com/steadfasterX/efidroid_device_lge_g4
Version Information
Status: Alpha
Created 2017-04-14
Last Updated 2018-12-17
Workarounds for known issues
1) random app crashes, settings do not persist on reboot
The reason is that file permissions get not set correctly on the bind mounted data partition.
So nothing can be stored there (or what get stored will be stored with the wrong perms).
When creating a new ROM slot it is important (atm) that you choose LoopAll .
This would create a data partition image with 23 GB which is way too much so you need to touch the data partition in the partitions tab and set the size to GB and choose e.g. 2 GB.
2) no WiFi
First boot TWRP internal / primary slot
Code:
adb shell cp /data/misc/wifi/config /external_sd/data_misc_wifi_config
Then for each slot you created you must reboot TWRP in its slot and:
Code:
adb shell cp /external_sd/data_misc_wifi_config /data/misc/wifi/config
adb shell chown system.wifi /data/misc/wifi/config
adb shell chattr +i /data/misc/wifi/config
Reserved
I tried to install Efidroid on my LG G4 (H815, bootloader unlocked, ResurrectionRemix 5.8.2). I install the App and modify the build.prop with the efidroid url, but every time i start the app i get the error-massage:
Error. Can't load device info. Please check your connection. No value for lge/h815.
Could you help me fixing this?
jokuu said:
I tried to install Efidroid on my LG G4 (H815, bootloader unlocked, ResurrectionRemix 5.8.2). I install the App and modify the build.prop with the efidroid url, but every time i start the app i get the error-massage:
Error. Can't load device info. Please check your connection. No value for lge/h815.
Could you help me fixing this?
Click to expand...
Click to collapse
Oh damn. I forgot to update the OTA for the other devices..
There is nothing you can do on your site atm.. Sorry I will fix it asap and let you know..
.
Sent from my LG-H815 using XDA Labs
still hard at it heck yea
jokuu said:
I tried to install Efidroid on my LG G4 (H815, bootloader unlocked, ResurrectionRemix 5.8.2). I install the App and modify the build.prop with the efidroid url, but every time i start the app i get the error-massage:
Error. Can't load device info. Please check your connection. No value for lge/h815.
Could you help me fixing this?
Click to expand...
Click to collapse
ok done. please try again
.
steadfasterX said:
ok done. please try again
.
Click to expand...
Click to collapse
Now it works. Thank you! :good:
ok .. im able to boot a LL based ROM now (Imperium ROM).. but only ONCE. lol..
Well I can boot into it again after booting in the TWRP version of that ROM and doing a factory reset from within TWRP...
Cleaning /data, /cache and dalvik cache manually does NOT work.. interesting. <-- I tested with a special (FIsH) TWRP version which does not WIPE but RM only.. Once I switched to a regular TWRP it is still strange but at least behaves the same now: When I wipe /data and /cache I can boot (but only when wiping both).
Update:
Keeping strange:
When I wipe /data only -> no boot
When I wipe /cache only -> no boot
When I wipe both -> boot ok .. wtf.?!
I will look into /misc - maybe the reason can be found here!
.
I just booted a second rom successfully using efi on my h811
My primary rom: lineage nougat
My secondary rom: resurrection remix (mm)
First boot was slow, second a little less slow, third and so on boot at normal speed.
Anyone else with an h811 care to try it coz @steadfasterX thinks mine booted coz i have an h811.
So if anyone else with an h811 can test it, that would help.
Btw, you all jelly? :victory:
Update: i have a complex sort of bootloop.
I decided to flash gapps.
Now when i try to boot the rom, i get the optimizing apps screen, then starting apps, then the boot logo, then again starting apps, and again boot logo and it goes on like that.
If i clear cache and dalvik i get the optimizing apps again, then the circle continues.
Maybe its gapps?
Or maybe its coz you all were too much jelly
tanveer7652 said:
Update: i have a complex sort of bootloop.
I decided to flash gapps.
Now when i try to boot the rom, i get the optimizing apps screen, then starting apps, then the boot logo, then again starting apps, and again boot logo and it goes on like that.
If i clear cache and dalvik i get the optimizing apps again, then the circle continues.
Maybe its gapps?
Or maybe its coz you all were too much jelly
Click to expand...
Click to collapse
heat
kevp75 said:
heat
Click to expand...
Click to collapse
Heat? What do you mean
tanveer7652 said:
Heat? What do you mean
Click to expand...
Click to collapse
I believe he thinks you have the ilapo because he don't know what efidroid is.
have you tried to wipe /data as mentioned (on IRC) ?
.
tanveer7652 said:
Heat? What do you mean
Click to expand...
Click to collapse
steadfasterX said:
I believe he thinks you have the ilapo because he don't know what efidroid is.
have you tried to wipe /data as mentioned (on IRC) ?
.
Click to expand...
Click to collapse
LOL I have a good idea with efidroid is
Everytime you wipe cache/dalvik your device has to rebuild the dalvik.
When your device rebuilds dalvik it has to work.. and work hard... as a result of the device working harder than normal, it generates heat. if it gets too hot, it will reboot.
I sometimes get it on a plain ol' stock rom
@steadfasterX im back to work on it just bought a new g4 today and currently im in unlock progress
J0SH1X said:
@steadfasterX im back to work on it just bought a new g4 today and currently im in unlock progress
Click to expand...
Click to collapse
Congrats. Please remember some of us poor guys when u buy another g4 ?
---------- Post added at 03:31 PM ---------- Previous post was at 03:30 PM ----------
kevp75 said:
LOL I have a good idea with efidroid is
Everytime you wipe cache/dalvik your device has to rebuild the dalvik.
When your device rebuilds dalvik it has to work.. and work hard... as a result of the device working harder than normal, it generates heat. if it gets too hot, it will reboot.
I sometimes get it on a plain ol' stock rom
Click to expand...
Click to collapse
But it doesn't get hot.
kevp75 said:
LOL I have a good idea with efidroid is
Click to expand...
Click to collapse
oh that's good
kevp75 said:
Everytime you wipe cache/dalvik your device has to rebuild the dalvik.
When your device rebuilds dalvik it has to work.. and work hard... as a result of the device working harder than normal, it generates heat. if it gets too hot, it will reboot.
I sometimes get it on a plain ol' stock rom
Click to expand...
Click to collapse
tbh I don't think that this is the case here. We have bootloops when something changes in /data. This is not heat related. It is something efidroid related..
J0SH1X said:
@steadfasterX im back to work on it just bought a new g4 today and currently im in unlock progress
Click to expand...
Click to collapse
u like pain do u ?
steadfasterX said:
oh that's good
tbh I don't think that this is the case here. We have bootloops when something changes in /data. This is not heat related. It is something efidroid related..
Click to expand...
Click to collapse
theres software bootloop and hardware bootloop. i only get software when i install something or say remove gapps. or mess with system . flashing rom fix it..

[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][Android 10/11][Stock/SODP][XZ2/C/P/3] TWRP 3.4.0-0 [UNofficial]

The Sony Open Devices Project is always happy about volunteers (coding, testing, etc)
Also mainlining your favorite snapdragon powered xperia device into the mainline kernel is possible and we will be glad to help you!
Official site
Unofficial site
Code:
#include <std_disclaimer.h>
/*
*
* 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 ROM
* 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.
*
*/
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
FAQ:
Just wiping your phone in TWRP lead into an encrypted & not readable userdata in the stock system.
You need to open advanced wiping and check the entries data and internal storage.
Of course clear the dalvik, too.
If you backed up system and/or vendor partitions and you want to restore them, make sure that TWRP setting "Use rm -rf instead of formatting" is set!.
If after the usage of NewFlasher or the OTA Updater or something else, which installs stock firmware parts you get stuck into the TWRP or SONY Logo, you need again to disable the verification with the vbmeta.img file and its parameters in fastboot.
fastboot & adb
https://developer.sony.com/develop/open-devices/get-started/flash-tool/useful-key-combinations/
https://wiki.lineageos.org/adb_fastboot_guide.html
https://developer.android.com/studio/releases/platform-tools
Weird problems not easily to reproduce by other users require that you make sure, that you
Use the newest platform tools (adb & fastboot)
Downloaded the newest firmware via Xperifirm from XDA and installed the newest firmware via Newflasher from XDA
Newflasher from XDA
Xperifirm from XDA
Removing the stock bloat apps via titanium backup may result in a boot loop. Use a file explorer to remove them, disable them or try to use my unfinished bloat removal script at github.
Your phone reboots into recovery, instead of system? Maybe it crashed too often due to a wrong installation or whatever?
In TWRP:
Code:
cat /dev/block/bootdevice/by-name/misc
shows you the reason.
TWRP -> [WIPE] -> [Advanced Wipe] -> Tick only the misc -> [Swipe to Wipe]
Known Bugs:
The "fastboot boot twrp.img" doesn't work, if you use the hardware buttons to open the blue fastboot bootloader mode. Only use adb, twrp or the android system to reboot into blue fastboot bootloader mode or flash the twrp.img, boot the device, reboot into bootloader and flash the original boot.img back, before booting into twrp.
You can also "fastboot reboot bootloader" in the blue fastboot mode.
This is a bootloader bug, maybe it gets fixed with the stock Q bootloader.
If "fastboot boot twrp.img" results into a blackscreen and reboot of the phone, take a look if you modified the DTBO partition.
It requires a special TWRP for every modified kernel/dtbo until I find some way to unify the twrp kernel with the DTBO (if the bootloader supports it).
Bugtracker:
TWRP Bugtracker -> If you think the problem is in TWRP
My Bugtracker -> If you think the problem is in my implementation
Bugreport:
A bugreport needs your device name, dmesg, the /tmp/recovery.log and a way to reproduce the issue.
If possible use
Code:
logcat -b all
instead of just a dmesg.
If ADB is not working to provide logs
VOLUP+POWER for 1 Seconds -> Forced crash to create a pstore
Boot the normal system.
Give me the files in
Code:
/sys/fs/pstore/
If the TWRP is stuck at the TWRP logo, the chances are high, that the decryption didn't succeed.
To rescue a not responding phone:
VOLUP+POWER for 3 Seconds -> RESTART with one Vibration.
VOLUP+POWER for 20 Seconds -> SHUTDOWN with 3 Vibrations.
VOLUP+POWER+CAMERA for 30 Seconds -> HARDWARE SHUTDOWN by discharging a capacitor.
Thank you very much for your help, code contribution & testing! (Random order):
@dees_troy and his team of volunteers for the TWRP code
@dhacke thank your for providing a download server
Shame on me if I forgot someone after searching through the thread and my PM's!
And many thanks to the few donators!
A telegram group for technical SODP stuff:
https://t.me/xda_tv
XDA:DevDB Information
TWRP, ROM for the Xperia XZ2
Contributors
MartinX3, Sony
Source Code: https://github.com/MartinX3-AndroidDevelopment
ROM OS Version: Android 10
ROM Kernel: Linux 4.x
ROM Firmware Required: Newest recommended
Based On: AOSP
Version Information
Status: Stable
Current Stable Version: 3.4.0-0
Stable Release Date: 2020-06-13
Created 2020-03-29
Last Updated 2020-06-20
Download & Installation
Download:
https://androidfilehost.com/?w=devices&uid=11410963190603893035
https://www.dhsfileserver.de/ftp/martinx3/ Thank you @dhacke for the second download server
Installation:
Update to newest stock firmware before unlocking!!!
Unzip the *.gz files with https://7-zip.org/ or Linux.
Enter fastboot via software, not hardware buttons. See "Known Bugs".
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
fastboot boot twrp.img
Advanced menu -> "Install recovery ramdisk" -> Choose twrp.img
Reboot into installed TWRP
Want Root? -> Magisk
(Only if your phone doesn't boot to system anymore) Advanced menu -> "Fix recovery bootloop"
(Optional; Security degradation; Only if you know what you're doing) Switch SELinux to permissive (with my permissive.zip)
News
02.03.2021
Reuploaded the SODP TWRP with a workaround for Android 11 compatibility.
Click to expand...
Click to collapse
15.06.2020
reuploaded the stock twrp for the xz2 premium with a completely fixed touch.
Click to expand...
Click to collapse
14.06.2020
reuploaded the stock twrp with a later touch kernel modules initialization.
Hopefully fixing the randomly happening not working touch.
Click to expand...
Click to collapse
13.06.2020
thanks to the fixes in 3.4.0 we got now a twrp with the following enhancements for stock and sodp:
- this twrp will work with future 10.0 roms, you don't need a new build matching the security patch level of your rom.
- you can install this twrp again with the buildin ramdisk patcher. Please follow the installation instructions.
Click to expand...
Click to collapse
11.06.2020
switch to twrp 3.4.0
sodp twrp 2020-06 security patch level
stock twrp 2020-05 security patch level for firmware 52.1.a.2.1
now both twrp should work without a rom being installed (empty system/vendor/oem partitions) and still be able to decrypt your userdata.
Also the stock twrp touch should now always work instead of playing russian roulette.
Click to expand...
Click to collapse
11.05.2020
reuploaded sodp twrp for 2020-05 security patch level.
It didn't boot with the newest aosp.
Click to expand...
Click to collapse
07.05.2020
sodp twrp for 2020-05 security patch level.
Click to expand...
Click to collapse
14.04.2020
removed stock twrp for firmware 52.1.a.0.672 until sony releases the kernel sources of the new security patch level.
Otherwise the keymaster won't decrypt the userdata for twrp and twrp gets stuck on the twrp logo.
Click to expand...
Click to collapse
13.04.2020
stock twrp for firmware 52.1.a.0.672
sodp twrp for 2020-04 security patch level
hopefully fixed the touch problems of the stock twrp
fixed the forced read only partition mountings of system, vendor, odm
Click to expand...
Click to collapse
31.03.2020
stock twrp for firmware 52.1.a.0.618
Click to expand...
Click to collapse
30.03.2020
sodp twrp for 2020-03 security patch level
installing in ramdisk (to make it persistent) is impossible at the moment, because it is a 9.0 twrp which makes its ramdisk incompatible to the rom.
Of course monthly twrp releases in sync with the current patch level need to be released or i would need to remove the userdata decryption completely.
The stock twrp will follow, after it became ready.
Click to expand...
Click to collapse
30.03.2020
SODP TWRP for 2020-03 security patch level
Installing in Ramdisk (to make it persistent) is impossible at the moment, because it is a 9.0 TWRP which makes its ramdisk incompatible to the ROM.
Of course monthly TWRP releases in sync with the current patch level need to be released or I would need to remove the userdata decryption completely.
The Stock TWRP will follow, after it became ready.
Click to expand...
Click to collapse
PS: AndroidFileHost blocked me for doing too many actions at the same time.
Maybe I can upload it there tomorrow.
Done
can't wait for possibility to install in ramdisk
but now there is a working recovery :highfive:
31.03.2020
Stock TWRP for firmware 52.1.A.0.618
Click to expand...
Click to collapse
xz3 twrp
MartinX3 said:
31.03.2020
Click to expand...
Click to collapse
xz3 twrp won't boot, sodp version is good but there's no install on ramdisk?
hafiidh said:
xz3 twrp won't boot, sodp version is good but there's no install on ramdisk?
Click to expand...
Click to collapse
You mean SODP TWRP works, but not the stock TWRP on your XZ3?
You are stuck on sony logo?
Or on TWRP logo?
I need a bugreport with "logcat -b all" via adb.
Install ramdisk doesn't work at the moment, because it is a TWRP 9.0 hack, since TWRP 10.0 is ready.
But I wrote it in the news
Edit:
Reworked the thread a bit for more clarification
First! Wonderful job!
---EDIT------
Everything works fine! So nice!
@MartinX3 Great job as always bro! :good:
I ran it on my XZ2 (stock 52.1.A.0.618).
Phone has booted to the twrp screen (till the unlock pattern), but the touch is not working (log).
I didn't start from scratch (fresh install), for the record.
Tia!
serajr said:
@MartinX3 Great job as always bro! :good:
I ran it on my XZ2 (stock 52.1.A.0.618).
Phone has booted to the twrp screen (till the unlock pattern), but the touch is not working (log).
I didn't start from scratch (fresh install), for the record.
Tia!
Click to expand...
Click to collapse
Thank you
Are you sure the touch doesn't work?
I tested this release on the same firmware on my XZ2 in stock.
This confuses me now.
You booted stock .618 before and you tried to deactivate & activate the display?
Here it worked right out of the box.
And if it happens again, could you execute "start preptouch"
And if that not works, could you execute "/sbin/preptouch.sh"?
Sjll said:
First! Wonderful job!
---EDIT------
Everything works fine! So nice!
Click to expand...
Click to collapse
Thank you
MartinX3 said:
[...] Are you sure the touch doesn't work?
And if it happens again, could you execute "start preptouch"
And if that not works, could you execute "/sbin/preptouch.sh"?
Click to expand...
Click to collapse
I am. I have tried at least three times so far. Tried turning off and on the screen, but the slide to unlock didn't work, too.
"start preptouch", no response, no working touch
"/sbin/preptouch.sh"...
Code:
insmod: failed to load /sbin/clearpad_rmi_dev.ko: File exists
insmod: failed to load /sbin/clearpad_core.ko: File exists
insmod: failed to load /sbin/clearpad_i2c.ko: File exists
akari:/sbin # ls -l
Tia again
serajr said:
I am. I have tried at least three times so far. Tried turning off and on the screen, but the slide to unlock didn't work, too.
"start preptouch", no response, no working touch
"/sbin/preptouch.sh"...
Code:
insmod: failed to load /sbin/clearpad_rmi_dev.ko: File exists
insmod: failed to load /sbin/clearpad_core.ko: File exists
insmod: failed to load /sbin/clearpad_i2c.ko: File exists
akari:/sbin # ls -l
Tia again
Click to expand...
Click to collapse
And the service menu of android should also say that you use the clearpad driver.
And I assume the 9.0 stock twrp did always touch fine?
The script say that the kernel modules for the touch driver got loaded and I assume the sys path in the script file got executed too, after loading the .ko files.
And you have a normal European firmware?
That's now a mystery for me why it works for me and others, but not in your phone
Especially if you have the clearpad touch hardware
MartinX3 said:
And the service menu of android should also say that you use the clearpad driver.
And I assume the 9.0 stock twrp did always touch fine?
The script say that the kernel modules for the touch driver got loaded and I assume the sys path in the script file got executed too, after loading the .ko files.
And you have a normal European firmware?
That's now a mystery for me why it works for me and others, but not in your phone
Especially if you have the clearpad touch hardware
Click to expand...
Click to collapse
I got the touch working after copying the three .ko libs to the ramdisk /sbin folder, and a small editing (below) in the permissive.sh (also removed "$touch_id" == "3" from preptouch.sh).
Code:
setenforce 0
insmod /sbin/clearpad_rmi_dev.ko
insmod /sbin/clearpad_core.ko
insmod /sbin/clearpad_i2c.ko
echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start
I know this is an awful workaround, but maybe this give you some hint (or sets you more confusing yet )
I'm with the sony stock customized_br fw, as always!
serajr said:
I got the touch working after copying the three .ko libs to the ramdisk /sbin folder, and a small editing (below) in the permissive.sh (also removed "$touch_id" == "3" from preptouch.sh).
Code:
setenforce 0
insmod /sbin/clearpad_rmi_dev.ko
insmod /sbin/clearpad_core.ko
insmod /sbin/clearpad_i2c.ko
echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start
I know this is an awful workaround, but maybe this give you some hint (or sets you more confusing yet )
I'm with the sony stock customized_br fw, as always!
Click to expand...
Click to collapse
Ah you have a XZ2C, not a XZ2?
Because the removed ID 3 is for the XZ2 with clearpad touch.
But the script did already copy the .ko files into your /sbin before and executed the same code, you did now manually.
And according to your logs the setenforce 0 was already executed earlier.
So you just did the same the script did.
Well, yes you confuse me more
Could you try to just execute "echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start" if the touch doesn't work again?
I wonder if the initialization is too early on your device.
Then I could try to delay the preptouch service to a later stage of the device boot.
MartinX3 said:
Ah you have a XZ2C, not a XZ2?
Because the removed ID 3 is for the XZ2 with clearpad touch.
But the script did already copy the .ko files into your /sbin before and executed the same code, you did now manually.
And according to your logs the setenforce 0 was already executed earlier.
So you just did the same the script did.
Well, yes you confuse me more
Could you try to just execute "echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start" if the touch doesn't work again?
I wonder if the initialization is too early on your device.
Then I could try to delay the preptouch service to a later stage of the device boot.
Click to expand...
Click to collapse
I have a regular XZ2 (H8216), and its touch_id is 3 (customized_br fw), so I removed the Id 3.
"Could you try to just execute..." I've already tried that, with no success.
"Then I could try to delay the preptouch..." Cool... As you could notice, it worked here with that awful way I did it, so why not?
:good:
serajr said:
I have a regular XZ2 (H8216), and its touch_id is 3 (customized_br fw), so I removed the Id 3.
"Could you try to just execute..." I've already tried that, with no success.
"Then I could try to delay the preptouch..." Cool... As you could notice, it worked here with that awful way I did it, so why not?
:good:
Click to expand...
Click to collapse
But you tried it also yourself later.
You executed the script again without success at a later stage.
And adding it to the permissive.sh is like executing the script, just earlier.
I assume `cat /sys/devices/dsi_panel_driver/panel_id` gives you the "3" as result?
MartinX3 said:
But you tried it also yourself later.
You executed the script again without success at a later stage.
And adding it to the permissive.sh is like executing the script, just earlier.
I assume `cat /sys/devices/dsi_panel_driver/panel_id` gives you the "3" as result?
Click to expand...
Click to collapse
I ran the scripts/codes manually in the trwp root shell (with the no working touch screen).
Yep, running the script earlier (permissive.sh) did the trick (*.ko files in the ramdisk).
And 3 is the output of the panel_id (that's why I removed the 3 from the preptouch.sh).
Edit: I've noticed this...
The permissions of the libs copied from vendor to sbin (preptouch), as you could see here
Code:
-rw------- 1 root root 1070630 1972-01-22 17:46 clearpad_core.ko
-rw------- 1 root root 251702 1972-01-22 17:46 clearpad_i2c.ko
-rw------- 1 root root 296934 1972-01-22 17:46 clearpad_rmi_dev.ko
Patched twrp
Code:
-rwxrwxrwx 1 root root 1070902 2020-04-02 21:48 clearpad_core.ko
-rwxrwxrwx 1 root root 251830 2020-04-02 21:48 clearpad_i2c.ko
-rwxrwxrwx 1 root root 297054 2020-04-02 21:48 clearpad_rmi_dev.ko
Edit 2: chmod on copied files did the trick (preptouch.sh) - but sometimes still not working (need to boot twice, three times...):
Code:
#XZ2 "3" XZ2C "4" Clearpad
if [[ "$touch_id" == "3" ]] || [[ "$touch_id" == "4" ]]; then
cp /v/lib/modules/clearpad_rmi_dev.ko /sbin/
cp /v/lib/modules/clearpad_core.ko /sbin/
cp /v/lib/modules/clearpad_i2c.ko /sbin/
[B]chmod 777 /sbin/clearpad_rmi_dev.ko
chmod 777 /sbin/clearpad_core.ko
chmod 777 /sbin/clearpad_i2c.ko[/B]
insmod /sbin/clearpad_rmi_dev.ko
insmod /sbin/clearpad_core.ko
insmod /sbin/clearpad_i2c.ko
echo 1 > /sys/devices/virtual/input/clearpad/post_probe_start
fi
Maybe you find out a more elegant way to handle with that!
Edit 3:
I also got it permanently installed on kernel (combo keys does work, too), it's a bit tricky I gotta say, but it works.
You know, twrp's ramdisk.cpio kernel hack (old install procedure).
Hi Martin,
just wanted to let you know that your latest version for Sony stock (0.618 fw) does also not work for me (touch does not respond). Even 'fastboot reboot bootloader' before 'fastboot boot twrp-xz2.img' doesn't change anything.
Device:
Xperia XZ2 (H8216) running Android 10 stock (52.1.A.0.618)
Customized CH
Clearpad Touch version: 3

[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