[RECOVERY][Android 10/11][Stock/SODP][XZ2/C/P/3] TWRP 3.4.0-0 [UNofficial] - Sony Xperia XZ2 ROMs, Kernels, Recoveries, & Other

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

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..

[TWRP] Ported TWRP Recovery For Moto E4 Mediatek Variant SKU XT1760

Read Carefully Before Doing Anything !
Requirement :
- TWRP Recovery TWRP_XT1760_3.1.1_MTKr1.img
- Minimal adb & fastboot
- Installed adb & fastboot drivers
- Moto E4 mediatek variant :laugh:
- Mediatek variant version SKU XT1760 :highfive:
- USB cable :cyclops:
- Unlocked bootloader
- Backup of whole firmware through Miracle Tool :silly:
Bugs :
- Not found yet
How To Enter Fastboot Mode :
- Press power and volume down button along
- When you see START in device screen leave both buttons
- locate to META MODE window only using vol. down button
- It is next to START window
- When you apply commands in fastboot mode
you will see fastboot command execution in this window
How To Install :
- Unpack the zip file first
- Drop TWRP_XT1760_3.1.1_MTKr1.img in this folder
- C:\Program Files\Minimal ADB and Fastboot\TWRP_XT1760_3.1.1_MTKr1.img
- Close this windows now !
- Open Minimal ADB & Fastboot command window
- Type These Fastboot Commands :
- fastboot devices
- fastboot flash recovery TWRP_XT1760_3.1.1_MTKr1.img
- TWRP Recovery installed now !
How To Boot into TWRP :
- Press power button and volume down button along
- When you see START in device screen leave both buttons
- locate to recovery window using vol. keys
- Press power button once
- Now your device boot in TWRP mode
- Done for now !
How To Disable Verity in Order To Boot into System :
( Follow this step if you were going to install TWRP recovery only
else if you want TWRP installed and a rooted device than follow below step. )​- Place no-dmverity zip file in external SD_CARD
Download link :
http://www.mediafire.com/file/m0w6zu83am6z38i/no-verity-opt-encrypt.zip
- Disable Read-Only Option in TWRP Recovery
- There select allow modifications, swipe, wipe data & cache
- Again boot into TWRP
- Install no-dmverity
- Reboot to system
- Done !
How To Root Moto E4 Mediatek Variant SKU XT1760 :
( Follow this step if you want installed TWRP recovery and a rooted device ! )
Thread link :
https://forum.xda-developers.com/moto-e4/how-to/moto-e4-guide-to-rooting-international-t3657328​- Still unable to Root this device with SuperSU & Magisk
- SuperSU failed to mount "/" Rootfs
- Magisk failed to load image file​
Downloads TWRP Recovery :
http://www.mediafire.com/file/emz8j0smqdsbc8g/TWRP_XT1760_3.1.1_MTKr1.zip
Credits :
@squid2
for original twrp recovery
and ported by me, from qualcomm variant to mtk variant​Original Thread Link :
https://forum.xda-developers.com/moto-e4/development/twrp-twrp-moto-g4-qualcomm-t3655160​
Ok stream of development started...thanks karthi for this effort.
Kartik bro does it have dm-verify issues? Do we need to disable dm-verify on first boot to twrp?
drganbds said:
Ok stream of development started...thanks karthi for this effort.
Kartik bro does it have dm-verify issues? Do we need to disable dm-verify on first boot to twrp?
Click to expand...
Click to collapse
Thread Updated !
Refresh for new content
@drganbds search for no-dmverity.zip you will find one.
at this time my internet connection is slow cannot upload the file right now.
Good to have a TWRP for both variants.
Where did the term "International" come from? Both the Qualcomm and Meditatek versions of the Moto E4 are sold in several countries, so using the term "International" to refer to the MediaTek version seems confusing to me. Users may think "International" works on phones sold in all countries. I think it would be better to name this as TWRP for the MediaTek version rather than "International".
squid2 said:
Good to have a TWRP for both variants.
Where did the term "International" come from? Both the Qualcomm and Meditatek versions of the Moto E4 are sold in several countries, so using the term "International" to refer to the MediaTek version seems confusing to me. Users may think "International" works on phones sold in all countries. I think it would be better to name this as TWRP for the MediaTek version rather than "International".
Click to expand...
Click to collapse
But not all users know what mediatek is so It probably makes sense to put "(mediatek)" in the title
mendelgordon said:
But not all users know what mediatek is so It probably makes sense to put "(mediatek)" in the title
Click to expand...
Click to collapse
Yes, and the model numbers should be specified also. Users just need to know what their model is.
squid2 said:
Good to have a TWRP for both variants.
Where did the term "International" come from? Both the Qualcomm and Meditatek versions of the Moto E4 are sold in several countries, so using the term "International" to refer to the MediaTek version seems confusing to me. Users may think "International" works on phones sold in all countries. I think it would be better to name this as TWRP for the MediaTek version rather than "International".
Click to expand...
Click to collapse
Thanks for the suggestion
amarc78 said:
Yes, and the model numbers should be specified also. Users just need to know what their model is.
Click to expand...
Click to collapse
updated :good:
@squid2 @amarc78 @mendelgordon @drganbds
i have some strange problem with my device boot image. it unable to start any external service which i added after unpacking the boot image.
i write this command in init.rc to change sysinit file permission "chmod 0755 /sbin/sysinit". but no 0755 permission to sysinit. also daemon process start by init such as "service sysinit /sbin/sysinit \n oneshot" unable to start on boot. so no init.d support
Any help from your side
kartik verma said:
@[email protected]@[email protected]
i have some strange problem with my device boot image. it unable to start any external service which i added after unpacking the boot image.
i write this command in init.rc to change sysinit file permission "chmod 0755 /sbin/sysinit". but no 0755 permission to sysinit. also daemon process start by init such as "service sysinit /sbin/sysinit \n oneshot" unable to start on boot. so no init.d support
Any help from your side
Click to expand...
Click to collapse
Sorry dude im eager to help you but I have very very little knowledge on Linux commands...because I'm a doctor
drganbds said:
Sorry dude im eager to help you but I have very very little knowledge on Linux commands...because I'm a doctor
Click to expand...
Click to collapse
isn't a big deal. i also a medical stream student
kartik verma said:
isn't a big deal. i also a medical stream student
Click to expand...
Click to collapse
I was playing with Linux (Ubuntu) on unpacking and packing boot image for cpu governors, tweaks etc, and with Android kitchens for creating so many roms for grand Quattro device but since 4years I haven't done anything and i stopped it...that's y I couldn't help you...
drganbds said:
I was playing with Linux (Ubuntu) on unpacking and packing boot image for cpu governors, tweaks etc, and with Android kitchens for creating so many roms for grand Quattro device but since 4years I haven't done anything and i stopped it...that's y I couldn't help you...
Click to expand...
Click to collapse
ok :crying:
kartik verma said:
@[email protected]@[email protected]
i have some strange problem with my device boot image. it unable to start any external service which i added after unpacking the boot image.
i write this command in init.rc to change sysinit file permission "chmod 0755 /sbin/sysinit". but no 0755 permission to sysinit. also daemon process start by init such as "service sysinit /sbin/sysinit \n oneshot" unable to start on boot. so no init.d support
Any help from your side
Click to expand...
Click to collapse
Isn't kernel adiutor able to add init.d support (not really, but it works)
Edit: Where are you putting those commands? If in TWRP, try in a file explorer like mixplorer. If in a file explorer, try twrp.
mendelgordon said:
Isn't kernel adiutor able to add init.d support (not really, but it works)
Edit: Where are you putting those commands? If in TWRP, try in a file explorer like mixplorer. If in a file explorer, try twrp.
Click to expand...
Click to collapse
seriously very strange problem.
init.rc unable to set file permission.
kartik verma said:
@[email protected]@[email protected]
i have some strange problem with my device boot image. it unable to start any external service which i added after unpacking the boot image.
i write this command in init.rc to change sysinit file permission "chmod 0755 /sbin/sysinit". but no 0755 permission to sysinit. also daemon process start by init such as "service sysinit /sbin/sysinit \n oneshot" unable to start on boot. so no init.d support
Any help from your side
Click to expand...
Click to collapse
Can you upload the unmodified boot.img for me?
Sent from my LGLS755 using XDA Labs
amarc78 said:
Can you upload the unmodified boot.img for me?
Click to expand...
Click to collapse
sure...
kartik verma said:
sure...
Click to expand...
Click to collapse
https://www.mediafire.com/download/u0ex0htrtmutc15
link
kartik verma said:
https://www.mediafire.com/download/u0ex0htrtmutc15
link
Click to expand...
Click to collapse
Try this. Init.d should be enabled. I also removed dm-verity and force encrypt and made it insecure. I wanted to make a flashable zip but I have no device info to do so. You'll have to extract it and flash the img. You might need to add the etc/init.d folder and set it's permissions manually. Let me know if it works ok.

[Recovery][P20][Unofficial]TWRP 3.2.1-0 [16/04/2018]

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.

Armor 7 (Ulefone) TWRP and ROMs

Hola! There's little information or resources for this phone so far so I'm gonna give a summary of the ways to get root and install ROMs on the phone with a lot of links.
First you can install Magisk on the stock ROM using the Armor 6 method as described in this thread (via this post).
Secondly I built latest TWRP, download it here. I included my sloppy build for the Armor 7, and also the more proper Oppo RenoZ build that I slimmed down to fit into the 32MB recovery partition and confirmed it works. I don't know who made the Oppo ReonZ build, it's more complete but you have to switch from Chinese to English on init. I had to remove the SuperSU and unroot zips to slim it down. You might be able to remove some unused flash partitions and load bigger recovery images.
Via TWRP you can sideload magisk, SuperSU, gapps and whatever you wish on custom ROMs.
Thirdly you can load Phhusson's Quack Treble ROM (AOSP) or LineageOS, possibly many other custom GSIs too. Here's a list of known GSIs assembled by user phusson. These all come with the su binary pre-installed. The Android 9 (Pie) versions seem to work out of the box. The Android 10 (R) versions currently require that you run the following command from a PC during boot, otherwise bootup never finishes:
Code:
adb shell setprop debug.stagefright.ccodec 0
I'm told this has been fixed in the upstream code but it's not in the R releases yet. Additionally there are some screen artefacts on those builds which can be worked around by disabling the HW compositing feature in:
System -> Developer -> HW Accelerated Rendering -> Disable HW overlays
You may also want to disable the annoying "Wake-on-lift" feature in Display settings.
Pretty much everything works in those ROMs, battery life seems good, but the Armor 7 Camera features are not enabled in the stock Camera apps. I'm going to try to get the Camera app from the stock ROM copied and update this post with instructions.
The default firmware has the downside that it runs a service that basically kills all background processes and there are reports that it's hard to disable -- there's no such problem in the custom ROMs.
For the record, the official stock ROM is downloadable here (click EU or non-EU), for whenever you want to go back to the factory system or factory recovery (to remove TWRP). Remember you need to enable or disable dm-verity in the vbmeta partition, depending on which firmware you want to run. This is done by extracting the vbmeta.img file from the stock ROM linked above, rebooting into fastboot and running one of the following commands:
Code:
fastboot --disable-verity --disable-verification flash vbmeta vbmeta.img
or
Code:
fastboot --disable-verification flash vbmeta vbmeta.img
Also remember after flashing LineageOS (fastboot flash system lineage-17.1-20200607-UNOFFICIAL-treble_arm64_bvN.img), if you want GApps on the system, you should boot into TWRP and use ADB sideload to load the .zip downloaded from opengapps.org before doing the setup wizard on LineageOS for the first time.
Post here aboue whatever new ROMs and solutions you find for this phone.
Also quick info on how to modify the boot logo partition from Linux, there are already Windows tools for that (probably works for the Armor 7) but no info on how to do this from under Linux so here's how I flashed my own logo from my Ubuntu pc. Requires mono and Imagemagick installed.
1. Download and unzip that same Windows LogoBuilder utility for mediatek phones,
Code:
$ unzip ~/Downloads/LogoBuilder_v1.6.1.zip
$ cd LogoBuilder_v1.6
2. Extract the logo partition image from the phone or from the Armor 7 stock ROM package, in my case:
Code:
$ unzip ~/Downloads/GQ3083TF1_KSX90T_ulefone_EEA_20200327_V02\(EU\).zip X90T88C.GQU.Ulefone.EEA.HB.FHD.AYAZ.1225.V3.02/logo-verified.bin
3. Unpack the 40+ individual images from the logo partition using Windows/C# utility under mono:
Code:
$ mkdir unpacked
$ mono logo.exe unpack X90T88C.GQU.Ulefone.EEA.HB.FHD.AYAZ.1225.V3.02/logo-verified.bin unpacked
3. The bootloader splashscreen/bootlogo is now in unpacked/block1.dat and we need to convert it to a format that you can edit in Gimp or any other editor:
Code:
$ cp unpacked/block1.dat logo.rgba
$ convert -size 1080x2340 -depth 8 logo.rgba logo.png
4. Edit logo.png or replace it with a new PNG file. The file *must* be 1080x2340px in size and be a 24-bit RGB colors with alpha (transparency.)
5. Convert new logo back to .rgba. Use the command below and then check the size of the resulting new logo.rgba -- it must be exactly 10108800 bytes which is 1080 * 2340 * 4. If it's 7581600, or 1080 * 2340 * 3, that will mean you forgot to add the alpha channel to your png file (in Gimp, it's in Layer -> Transparency -> Add Alpha Channel).
Code:
$ convert logo.png logo.rgba
If the new file size is 10109312 instead, strip the 512 header using dd:
Code:
$ dd if=logo.rgba of=logo2.rgba bs=512 skip=1 # only if the file size was 10109312 instead of 10108800
6. re-pack the logo partition image:
Code:
$ cp logo.rgba unpacked/block1.dat # or logo2.rgba...
$ mono logo.exe pack unpacked logo-new.bin
The new img size is not exactly as the original img but it works nevertheless.
7. flash it over the logo partition, as root:
Code:
# fastboot flash logo logo-new.bin
A big thanks to you. I successfully installed LineageOS on my Ulenfone Armor 7
The biggest problem is this line to type on each reboot
Code:
adb shell setprop debug.stagefright.ccodec 0
atricault said:
A big thanks to you. I successfully installed LineageOS on my Ulenfone Armor 7
The biggest problem is this line to type on each reboot
Click to expand...
Click to collapse
Couldn't this be added to build.prop?
clewis.it said:
Couldn't this be added to build.prop?
Click to expand...
Click to collapse
Yeah, I think I added it to default.prop eventually, I'm back to the stock ROM for now so can't check. Try:
Code:
adb shell
su
mount -o remount,rw /
echo debug.stagefright.ccodec=0 >> /default.prop
I'm back to the stock ROM because I can't get the Camera app working on lineageos, I managed to extract the stock app and fix some missing class errors but I think it depends on all those mediatek services. Maybe there's an Android 10 stock ROM from some other device from which those could be copied...
balrog-kun said:
Yeah, I think I added it to default.prop eventually, I'm back to the stock ROM for now so can't check. Try:
Code:
adb shell
su
echo debug.stagefright.ccodec=0 >> /default.prop
I'm back to the stock ROM because I can't get the Camera app working on lineageos, I managed to extract the stock app and fix some missing class errors but I think it depends on all those mediatek services. Maybe there's an Android 10 stock ROM from some other device from which those could be copied...
Click to expand...
Click to collapse
I got this error :
/system/bin/sh: can't create /default.prop: Read-only file system
But I'll go back to stock ROM too, because of Camera and I don't have enought knowledges to try to solve the problem
Oh right I forgot, for future reference you need to remount the filesystem read-write before that last command:
mount -o remount,rw /
Adding this to the previous post.
balrog-kun said:
Oh right I forgot, for future reference you need to remount the filesystem read-write before that last command:
mount -o remount,rw /
Adding this to the previous post.
Click to expand...
Click to collapse
Sorry I'm back to stock ROM.
But before that I tried this line
Code:
mount -o rw, remount /
And got this error
Code:
mount: 'remount'->'/': No such file or directory
Do you fix the background process killer on stock ROM?
atricault said:
Code:
mount -o rw, remount /
And got this error
Code:
mount: 'remount'->'/': No such file or directory
Click to expand...
Click to collapse
That's gonna be because of the space between rw, and remount.
atricault said:
Do you fix the background process killer on stock ROM?
Click to expand...
Click to collapse
Honestly I haven't had this problem so far. I have Don't keep activities disabled in System->Developer Options->Apps but I think it was off by default. Maybe Standby apps also affects this?
I was recording a hike track in Strava today for a few hours, and I took pictures, made calls, googled, etc. while Strava was running.
balrog-kun said:
Secondly I built latest TWRP
Click to expand...
Click to collapse
Do you have any instructions on how to build TWRP for the armor phones? I would like try building one for the Armor 3W.
Camera works well in daylight (but not in the dark) on the latest Havoc-OS 3.6 20200613 arm64-ab. Screen artefacts still there though unless HW overlays is disabled.
clewis.it said:
Do you have any instructions on how to build TWRP for the armor phones? I would like try building one for the Armor 3W.
Click to expand...
Click to collapse
Not really, I roughly followed https://forum.xda-developers.com/showthread.php?t=1943625 and one or two other places. I used the omni "minimal" manifest which includes TWRP:
Code:
repo init -u git://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git -b twrp-9.0
(the branch "twrp-9.0" is because the stock kernel is for Android 9, if Armor 3 comes with Android 8, use twrp-8.0)
Then I needed to create the "device tree" (apparently not related to Linux device trees...), I started with https://github.com/TeamWin/android_device_ulefone_Armor_6 and went about renaming files and updating all the values in all the files based on the values in build.prop / default.prop in the stock system.img. Also replaced prebuilt/kernel with the kernel from stock boot.img. Apparently using a prebuilt kernel is deprecated but it worked and I guess the build is faster.
I also replaced the init.*.rc files with the ones from the stock recovery.img but honestly I can't tell you exactly which files to use. I didn't exactly know what needs to go in which init.*.rc file and when they're called, and I didn't bother looking for documentation for that, but I did have to move some fragment between files to make adb work.
Another caveat was making sure the build system uses python 2 because apparently most scripts are not python 3-compatible.
CodeParadise said:
Camera works well in daylight (but not in the dark) on the latest Havoc-OS 3.6 20200613 arm64-ab. Screen artefacts still there though unless HW overlays is disabled.
Click to expand...
Click to collapse
Do you never get the "can't connect to camera" errors?
The main thing about the stock camera app is that you can be almost sure that you're getting the max available performance from the camera in terms of zoom, color, etc. I.e. it probably automatically switches to the 2x camera when you zoom in (no idea), there's the fast HDR mode, UHD mode, slow motion, etc.
With any 3rd party app my guess it's only using one of the rear cameras. With the stock app honestly I can't know for sure if/when it ever uses the aux rear cameras, I hope it does though. Honestly the 3-camera setup on this phone doesn't seem very useful but hopefully there's some logic behind it...
And BTW even on the stock ROM I'm unable to record in more than 30fps using HedgeCam 2 (OpenCamera). It looks like it detects the frame rates supported by the hardware (30, 60, 120) but it crashes when I start recording.
balrog-kun said:
Do you never get the "can't connect to camera" errors?
The main thing about the stock camera app is that you can be almost sure that you're getting the max available performance from the camera in terms of zoom, color, etc. I.e. it probably automatically switches to the 2x camera when you zoom in (no idea), there's the fast HDR mode, UHD mode, slow motion, etc.
With any 3rd party app my guess it's only using one of the rear cameras. With the stock app honestly I can't know for sure if/when it ever uses the aux rear cameras, I hope it does though. Honestly the 3-camera setup on this phone doesn't seem very useful but hopefully there's some logic behind it...
And BTW even on the stock ROM I'm unable to record in more than 30fps using HedgeCam 2 (OpenCamera). It looks like it detects the frame rates supported by the hardware (30, 60, 120) but it crashes when I start recording.
Click to expand...
Click to collapse
I do get those errors, more so after trying different camera apps. The GSI camera implementation on this phone certainly needs more work. I notified the phh GSI group on Telegram and hopeful newer GSI versions will begin to fix the issue but as you say, getting the full camera functions equivalent to the stock ROM camera may be a long stretch.
this version of twrp does not work with the armor 7 made my phone bootloop and I had to reflash stock recovery.
grenskul said:
this version of twrp does not work with the armor 7 made my phone bootloop and I had to reflash stock recovery.
Click to expand...
Click to collapse
Could be wrong vbmeta image, they work for me.
Anyone tired this with the Armor 7E ?
Hi,
I'm stuck in a pickle here and would much appreciate any guidance.
Firstly, I'm a bit of a noob. So please bear with me.
I managed to unlock my Armor 7 and I'm able to fastboot into it (I see the device appearing through the shell after typing 'fastboot devices').
I followed balrog-kun guidance and downloaded his/her modified TWRP, and even Oppo's one, and flashed firstly balrog's TWRP onto the phone, but that made my phone keep booting, get a message of 'Orange State - Your device has been unlocked and cannot be trusted. Your device will restart in 5 seconds', takes about 10 seconds, restarts, and the same thing keeps happening.
I then tried flashing Oppo's. The same thing keeps happening.
When I flash them, I use the following:
fastboot flash recovery recovery.img
EDIT: If I may add, I also tried:
fastboot boot recovery.img
and the same thing happens.
Update: I managed to get the stock recovery flashed back into the phone and it is back up and running. Now, how do I flash barlog's TWRP successfully without running into a boot loop?
Any guidance would be much appreciated.
Thank you.
grenskul said:
this version of twrp does not work with the armor 7 made my phone bootloop and I had to reflash stock recovery.
Click to expand...
Click to collapse
Hey grenskul, I think I'm facing the same issue. Can you please share where you got the stock recovery? Thanks.
Update: I managed to find it from Ulefone's website, flahsed it and the phone is back up. Thanks.
Further update: after reading towards the end of Balrog's first post, I got the vbmeta.img from the stock and flashed it using the first command from the same post. That made flashing balrog and Oppo's TWRPs smoothly - the phone doesn't get stuck in a bootloop anymore.
BUT, when I go into recovery, I still get the stock recovery and not TWRP....?
Any thoughts?
UPDATE: For some reason, I had to reflash the recovery a couple of times (!) - used the TWRP supplied by balrog and now I got TWRP working (thank you!).
By the way: In my journey I'm following this post to upgrading my Amror 7 from Android 9 to Android 10 using the supplied Lineage version (17.1), but I also found 18.1 from the same contributor (Andy).

[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