[G4][UNOFFICIAL][ALPHA] EFIdroid for the LG G4 - G4 Android Development

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

Related

[Tools/Recovery] TWRP for LG Optimus F3Q

TWRP Recovery for the LG F3Q (codenames: fx3q, d520)
Background story (who ever wants to know):
As I'm currently testing around with flashing etc I hated it to re-flash the stock ROM again and again. It is sooo time consuming..
In that kind of ROM compiling learning process I also was able to build a working TWRP recovery for the LG F3Q so that was such a good feeling But as said the caveat was that because of the locked bootloader we can reach TWRP (or CWM) only when executing "adb reboot recovery" from the running system. That was not really satisfying me though..
Some day I've done a factory reset and well I saw that this is starting my TWRP recovery when executing it! Well it isn't such a surprise as TWRP sits on the recovery partition and will be triggered by the factory reset script but... well do you think what I think? When it would be possible to start TWRP fully and not that factory reset part of TWRP than we would have a workaround to reach the recovery mode without booting the system (which is in fact not possible anymore when flashing of system.img/boot.img fails)
That said.. I was in touch with the TWRP developers bigbiff and Dees_Troy and many thanks for the hint they gave me! I have build a new TWRP version based on that information I got and well the idea of that is:
Vol Down + Power -> LG Factory Reset screen appears
Confirming with power 2 times as asked
Voila: No factory reset anymore but TWRP is here!
Well that will have a caveat - READ CAREFULLY:
As you may think of the factory reset in the boot-up process and within the ROM will not working anymore until you flash another recovery!
But if you know that it is not such a caveat because you can choose the wipe options within TWRP to do a "manual" factory reset.
v2.8.1.0 build 5
USE THAT ON YOUR OWN RISK! BACKUP BEFORE!
Working (quickly tested):
Install (to flash a custom Kernel)
Mounting partitions
Reboot Recovery | System
adb shell (also see known issues)
Backup (compressed | uncompressed | encrypted (!) | unencrypted)
Restore (unencrypted | encypted (!) | compressed | uncompressed)
Internal storage /data/media
MTP which mounts the external storage!
File Manager
Terminal Command
Power charging while in TWRP
Displaying CPU temp
Totally untested:
WIPE (should work)
decrypting /data (but should work as it do so for encrypted backups already)
Every option which is not stated as "Known issue" or "Working"
Known issues (with workarounds):
ADB works only when screen "timed out" (manual locking does not help it must time out) therefore ADB can take up to 1 minute after boot until it becomes available (because screen need to be timed out first)
Workaround: set the time limit in the screen menu to e.g. 10 sec (that is the default value for now)
Timezone is not set correctly (that seems to be a well known bug in several devices using TWRP.... )
Workaround: set a timezone which displays the most accurate timezone
Known issues (without workarounds):
When you use the "Power Off" option in the "Reboot" menu the device will reboot instead of powering off
Wiping /data not possible after "factory reset buttons" used. You need to choose "wipe" and then "format data" manually (or use mke2fs on CLI).
Vibration is not working (I will not fix that atm because I like it that way)
Hardware keys at bottom doesn't work
If you use the factory reset button /data partition will be inaccessible and need to be re-flashed (means you will LOOSE your app and system configs when you use factore reset)
Download:
Attached you will find the TWRP v2.8.1.0 version ready to use even with locked bootloader:
BACKUP EVERYTHING BEFORE USING THIS. USE AT YOUR OWN RISK!
DD Image file:twrp_v2.8.1.0_build5_fx3q_FR-OFF.img.zip = FactoryReset is disabled / TWRP will be loaded instead (also see known issues)
Read the Installation & Usage instructions in this thread on how to install that file.
Installation & Usage instructions
Pre-Requirements
Read the FAQ
YOU NEED ROOT! (check FAQ)
YOU SHOULD do a NANDroid BACKUP! (check FAQ)
You need to boot up, enable USB debugging and then connect USB cable.(check FAQ get ROOT - the link contains a guide on that)
You better doing a NANDroid backup right? (I mentioned that before - but DO it! NOW!)
For the best usage experience install the sediKERNEL or use joel's debloated stock ROM which includes it already
Bulletproof Method 1: "the average user"
Use this guide if you simply want to install & use TWRP like it should be. If you're unsure use this guide!
Install:
Download the TWRP recovery file and unzip it
copy it to your device (e.g. adb push or simply copy & paste by your file browser)
Download the loki_tool (https://github.com/djrbliss/loki/raw/master/bin/loki_tool)
copy loki_tool to your device (e.g. adb push or simply copy & paste by your file browser)
execute:
adb shell
su (you may need to grant permission)
mount -oremount,rw /system
cp /PATH-WHERE-YOU-COPIED/loki_tool /system/bin/ && chmod 755 /system/bin/loki_tool
loki_tool flash recovery /PATH-WHERE-YOU-COPIED/twrp_X.X.X.X_recovery_FRoff/off.img
reboot recovery --> you should see the TWRP screen
Usage (sediKERNEL v2.0 or higher installed):
Power on the device
when you see the LG logo the first time do NOTHING!!
When the screen goes black THEN press Volume UP + Volume DOWN. Both the same time and hold them pressed.
Release the buttons when the screen goes black again
Wait. You will see the LG logo a third time and then you will see the recovery screen!
If you see a kernel crash then you have pressed the magic keys too early! Read and follow the above steps carefully and you should be fine.
Usage (without sediKERNEL v2.0 or higher):
boot into your ROM
execute "adb reboot recovery" from your PC or open a Terminal on your device and execute "su" then "reboot recovery"
Bulletproof Method 2: "developers only"
This is the developers preferred way of installing TWRP. It ensures that even when your ROM or Kernel gets damaged that you still be able to boot into recovery. This is to the developers or heavy testers who are knowing what they do ONLY!
But even when you think this is for you: Read the important hint at the end before deciding if you want to choose this method.
Install:
flash recovery image to your RECOVERY partition:
adb shell su -c dd if=/storage/external_SD/twrp_vXXXXX_fx3q_FR-OFF.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
adb reboot recovery
A user reports the the by-name does not worked for him but this one:
adb shell su -c dd if=/storage/external_SD/twrp_vXXXXX_fx3q_FR-OFF.img of=/dev/block/mmcblk0p17
-> If you can see TWRP now everything is fine - Otherwise DO NOT continue!
BACKUP YOUR WHOLE DEVICE NOW! I highly recommend to backup everything except /data from within TWRP because it is easy and works (from TWRP v2.8build5 or higher)
BACKUP /data is recommended to be done NOW and this way:
adb shell su -c dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/external_sd/userdata_backup_stock.img
--> This can take a long while but it contains also the backup for the internal storage not only /data and that internal part is not backupable over TWRP
while in TWRP flash the same recovery image to your BOOT partition now (do not think that this is dangerous. The boot partition is not a magic thing or so it is only the partition which will be started from the bootloader thats all about it. So yes you can install a recovery image on the boot partition without any harm.):
adb shell su -c dd if=/external_sd/twrp_vXXXXX_fx3q_FR-OFF.img.loki of=/dev/block/platform/msm_sdcc.1/by-name/boot
watch carefully that the process ended without errors and that the size is exactly the same as it should be (about 1,3GB)
adb shell sync
power off the device by taken out the battery (do not use reboot or something we want to be sure that the next step is absolutely really the normal boot up)
Boot up normally --> you should see TWRP !! You're NOT in recovery mode you're booting the normal boot mode!
Go on with flashing the sediKERNEL into your RECOVERY partition:
Download the sediKERNEL from here (the stock one could work, too but never tested ...)
push it to your device with adb or MTP (since v2.8build5)
Flash the sediKERNEL to your RECOVERY partition:
adb shell su -c dd if=/external_sd/sediKERNEL_JB-vXXXX.img of=/dev/block/platform/msm_sdcc.1/by-name/recovery
Reboot into Recovery by using TWRP GUI or by executing "adb reboot recovery"
Your ROM will boot.
Usage:
From now on every time your device booting up you will see the TWRP screen and need to choose Reboot-->Recovery to boot your ROM.
This is the absolute best way to use TWRP if you want to be sure that you will reach the recovery even when your ROM gets damaged and is confirmed to work very well (as always guarantees are not available )
Important hint:
Be sure that you keep in mind that from now on your recovery and boot partition are not the same anymore (you can always revert back to the normal behaviour, of course!). So if you want to flash a kernel image you need to ensure that it goes to the RECOVERY partition instead of the normal BOOT partition (because on boot partition is TWRP now).
If I got my ROM working I will definitively add an option to the installer where this will be ensured and I asked @joel.maxuel for his stock ROM to add that, too. As for now we are the only ones who are developing for the F3Q so you should be save enough atm but you will need to keep that always in mind when you want to replace the kernel and/or ROM.
What would happen if you forget about that? Well nothing really bad because when you install a kernel or ROM the boot image partition simply gets overwritten and that means only that your TWRP is not there anymore but the system will boot (if the new kernel/ROM is not buggy or damaged). You then could install TWRP by method 1 or using method 2 by using the boot image/Kernel you want to install.
Damage your device - booting (NOT RECOMMENDED will loose /data ):
You probably NEVER want to use this method. It is here for reference only.
I highly recommend to choose one of the above bulletproof versions instead of this one because it WILL damage /data and you need to restore that whole partition afterwards.
All my tests has shown that this comes not from TWRP (in one of my tests I disabled everything in the sourcecode of TWRP which wipes /data) but coming from LG itself. The factory reset button/option do something with the /data partition sturucture and afterwards you cannot use that anymore. I also tried to restore the partition info by trying all backup superblocks but that doesn't worked. No backup superblock is accessible.
Restoring them by mke2fs and e2fsck does not work unfortunately.. (mke2fs -S /dev/block/platform/msm_sdcc.1/by-name/userdata && e2fsck -yf /dev/block/platform/msm_sdcc.1/by-name/userdata)
So if you have loosed your /data and/or internal storage you need to have a DD imaged backup near.
Install:
same as for "Bulletproof Method 1" above
Usage:
When you choosen FR-OFF then TWRP will be able to start without booting up the whole system (also see known issues):
Power Off the device (remove battery)
Vol Down + Power --> Then put the battery back --> LG Factory Reset screen appears
Confirming with power button 2 times as asked - if you downloaded and flashed the FRoff version of TWRP it will NOT open the normal reset procedure but /data and the internal storage are not accessible afterwards (read above about the details). That means your app configs and systems configs get lost that way. You have been warned!
Voila: No (full) factory reset anymore but TWRP is here when you have damaged your ROM or for some dev approach
If you want the factory reset back simply choose the file twrp_2.7.1.0_recovery_FRon.img.lok and follow the above instructions. Afterwards you will have TWRP but it will be reachable only when you execute "adb reboot recovery" from the running system.
XDA:DevDB Information
sediTWRP for LG Optimus F3Q, Tool/Utility for the General Discussion
Contributors
xdajog
Source Code: https://github.com/xdajog/bootable_recovery_twrp_fx3q
Version Information
Status: Stable
Current Stable Version: v2.8.1.0 build 5
Stable Release Date: 2014-11-18
Created 2015-05-19
Last Updated 2015-07-20
FAQ
Frequently Asked Questions (FAQ)
What is that "adb" thing?
adb stands for: Android Debug Bridge and can help a lot when it comes to work with your device. It is not for developers only but they use it a lot of course.
But a normal user can use this to exchange files without the need of mounting, backing up the device, reboot the device and use it as a very comfortable way of having a terminal emulator.
Normally adb itself is not available as a standalone application - it comes with the Android SDK which is very big and heavy if you want to use adb and/or fastboot (another great tool) only.
But we live in a great world with many people wanting to make things easy so here you go when you want/need only adb and fastboot:
download & install adb at lifehacker
(Direct link for Windows users: Go to easy ADB install thread)
How to get root for the F3Q?
Here is the tool and guide: Saferoot
[*]What is a "nandroid" backup?
nandroid means essentially: "a full image of all your partitions" so it is a full snapshot of your ROM including all your apps and contents.
The name NANDroid is a portmanteau of "NAND" (as in Flash memory - NAND flash) and "Android." (Source)
[*]How to create a "nandroid" backup?
(See above for the meaning of "nandroid backup")
You have several options on how to do that.
The normal and absolutely recommended way is to do that "offline" (from within recovery mode) but you can also do it "online" (while Android is running).
.
Offline nandroid backup by using TWRP recovery: Guide
If you have no custom recovery installed read on.
.
Online nandroid backup:
by using an app:
There is 1 (known to me) "online" nandroid backup tool available which will backup from within your running Android: PlayStore.
I tested it and still using it since a while and I really like it but I would not fully resist on it.
I had no problems backing up but sometimes an app is lost when restoring. This may have been fixed but well it is like imaging a running Windows or Linux system:
Do not do it online if you can - it may/will work but there could be problems/inconsistencies later!!
If you never made a nandroid before doing it online will not harm anything and should be your first start. So install the Online Nandroid backup tool and begin.
Check out this guide for some hints: Guide
(If you like the Android app do not hesitate to buy the unlock key to support the developer!)
by using commandline tools:
First of all you need "adb" installed (check out the FAQ answer number 1 above).
Then you need someone who is telling you the device partition table and you need a big sized SD card to hold the images.
The reason is that you will use a special command named "dd" which images the whole partition (not the content only!).
dd is a VERY dangerous tool because if you use it wrong your device may get bricked so it is essential that you are using the
correct command and check that twice!
Check out the next FAQ on how to do this for the F3Q.
[*]How to create a "nandroid" backup for the F3Q - WITHOUT having a custom recovery?
The whole process will take a big amount of time but it is worth to follow each step including the md5sum checks at the end.
Please read the previous FAQ first because there you will find more information about background and other options you may have.
Ensure you have a SD card inserted which is big enough and having enough free space available (4GB at least! I recommend at least 8 GB but this depends on the size of your current data partition. A completely stock ROM with nothing installed and unused will need 3 GB space).
.
Install "adb" on your pc (check out the FAQ #1 above).
root your device (check out FAQ #2 above)
connect with adb to your (running) F3Q:
adb shell
(you should see a prompt)
su
(you need to grant permission if you haven't yet)
Then backup your current ROM and data:
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/external_SD/system.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/boot.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/storage/external_SD/userdata.2015-07-20.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/recovery of=/storage/external_SD/recovery.2015-07-20.img
# If you never backed up your EFS you really should do that once:
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst1 of=/storage/external_SD/modemst1.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/modemst2 of=/storage/external_SD/modemst2.img
Click to expand...
Click to collapse
Just to be sure you can do an online backup now, too ( Guide ) Online Nandroid backup App
.
copy the backup(s) to your device (connect USB cable - open your external storage and drag&drop) <--- DO NOT SKIP THIS STEP!!!! It is absolutely essential!
Check your copy on your device:
md5sum /storage/external_SD/system.2015-07-20.img
md5sum /storage/external_SD/boot.2015-07-20.img
md5sum /storage/external_SD/userdata.2015-07-20.img
md5sum /storage/external_SD/recovery.2015-07-20.img
md5sum /storage/external_SD/modemst1.img
md5sum /storage/external_SD/modemst2.img
Click to expand...
Click to collapse
Download a md5sum checker like this one Windows MD5 and load each file you copied to it (on Linux the "md5sum" command can be used of course).
compare the md5sums from the above output and ensure that they are all matching.
[*]Why is factory reset not working when installing TWRP? (or: AAAAaaaah my /data is inaccessible after doing a factory reset!!!!)
All my tests has shown that this comes not from TWRP (in one of my tests I disabled everything in the sourcecode of TWRP which wipes /data) but coming from LG itself. The factory reset button/option do something with the /data partition sturucture and afterwards you cannot use that anymore. I also tried to restore the partition info by trying all backup superblocks but that doesn't worked. No backup superblock is accessible.
Restoring them by mke2fs and e2fsck does not work unfortunately.. (mke2fs -S /dev/block/platform/msm_sdcc.1/by-name/userdata && e2fsck -yf /dev/block/platform/msm_sdcc.1/by-name/userdata)
So if you have loosed your /data and/or internal storage you need to have a DD imaged backup near. Sorry but you have been warned (known issues) before.
.
if you want the factory reset back simply choose the file twrp_2.7.1.0_recovery_FRon.img.lok and follow the above instructions. Afterwards you will have TWRP but it will be reachable only when you execute "adb reboot recovery" from the running system. v2.7. is not recommended to use but atm the only option if you really want that. Instead I would better try the wipe options from within TWRP and re-installing your ROM of choice or simply using the official LG flashing tool to get your F3Q fully reset.
.
History / Changelog
Previous development (v2.7.1.0)
I HIGHLY RECOMMEND USING v2.8 instead of this version!
You have been warned.. If you still want that buggy version go on here:
USE THAT ON YOUR OWN RISK! I STRONGLY RECOMMEND TO BACKUP EVERYTHING BEFORE PROCEEDING.
Working:
Install (to flash a custom Kernel)
Mounting partitions (see known issues for the internal one)
Reboot Recovery | System
adb shell
File Manager
Terminal Command
Totally untested:
WIPE (may work)
Known issues:
If the device becomes locked and then unlocked by the user adb will restart on the device (or crash and start again. haven't had looked into that yet)
When you use the "Power Off" option in the "Reboot" menu the device will reboot instead of powering off
RESTORE (will NOT work!)
BACKUP (will NOT work!)
You cannot mount the external sd via USB or MTP
Vibration is not working (I will not fix that atm because I like it that way)
Timezone is not set correctly (that seems to be a well known bug in several devices using TWRP....
Internal storage is missing (/data/media)
Hardware keys at bottom doesn't work
If you use the factory reset button /data partition will be inaccessible and need to be re-flashed (means you will LOOSE your app and system configs when you use factore reset)
Download:
Attached you will find the loki'ed TWRP version (v2.7.1.0):
AGAIN: THIS IS A PROOF-OF-CONCEPT only. It definitively WILL have bugs and problems! I want to proof that it will be possible to have TWRP on this device and also have a way to boot up into TWRP without booting the whole system.
twrp_2.7.1.0_recovery_FRoff.img.lok = FactoryReset is disabled / TWRP will be loaded instead
twrp_2.7.1.0_recovery_FRon.img.lok = FactoryReset is enabled / TWRP can be reached with "adb reboot recovery" only
Read the Installation & Usage instructions in the OP on how to install that file.
Awesome work! Saves having to risk modifying the bootloader (for now). :laugh: :highfive: Thanks!
xdajog said:
TWRP Recovery for the LG F3Q / D520
...
Click to expand...
Click to collapse
I'm unable to get logs from TWRP, it does crash reliably when messing about in settings and such.
Timezone fix is needed. (Devices time is set to the correct local time, but TWRPs timezones arent correct.)
Device does not show internal storage.
Wipe menu does not differentiate from internal storage and /data
there's no /mnt, /storage or /sdcard present while in TWRP.
Uhm, I'm sure there's some more I've missed, but that's all I've got for now.
eriklion said:
I'm unable to get logs from TWRP, it does crash reliably when messing about in settings and such.
Click to expand...
Click to collapse
Uhm what do you mean? adb shell and then open /tmp/recovery.log? Clicking on the small mini icon at middle bottom of the screen? Both working for me. Have you tested the above attached version or the one I gave you at dropbox? The above is a more current one!
Timezone fix is needed. (Devices time is set to the correct local time, but TWRPs timezones arent correct.)
Click to expand...
Click to collapse
hm I will look into that
Device does not show internal storage.
Click to expand...
Click to collapse
yeah forgot to mention that. Is that shown in CWM btw?
Wipe menu does not differentiate from internal storage and /data
Click to expand...
Click to collapse
Could you explain what does that means?
there's no /mnt, /storage or /sdcard present while in TWRP.
Click to expand...
Click to collapse
/mnt and /storage are not needed or am I wrong? /sdcard would point to the internal storage I think but I decided to use /external_sd instead which is accessible in the latest version.
Finally got around to test. Looks great, I love having TWRP over CWM!
Unfortunately the backup function is not working. TWRP errors out and reloads itself. I have a pastebin, sorry it's so long but I wanted to try a couple different backup options before I gave up and produced a log file:
http://pastebin.com/QUfNw6Rk
The portions of interest are:
Code:
Backing up Cache...
I:Creating backup...
I:Creating tar file '/external_sd/TWRP/BACKUPS/1db9cba/1970-01-24--22-43-59 JZO54K//cache.ext4.win'
I:addFile '/cache/recovery' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/cache/recovery/log' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
...
Code:
Backing up Data...
I:Creating backup...
I:Creating tar file '/external_sd/TWRP/BACKUPS/1db9cba/1970-01-24--22-43-59 JZO54K//data.ext4.win'
I:addFile '/data/dontpanic' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg0' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/next_count' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg1' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg2' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg3' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg4' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg5' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg6' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
I:addFile '/data/dontpanic/last_kmsg7' including root: 0
Failed to get selinux context: Operation not supported on transport endpoint
__bionic_open_tzdata: couldn't find any tzdata when looking for localtime!
__bionic_open_tzdata: couldn't find any tzdata when looking for GMT!
__bionic_open_tzdata: couldn't find any tzdata when looking for posixrules!
Starting TWRP 2.7.1.0 on Sun Jan 25 03:44:01 1970
I:Single storage only.
I:No internal storage defined.
I:No storage defined, defaulting to /sdcard.
I:Lun file '/sys/devices/platform/usb_mass_storage/lun0/file' does not exist, USB storage mode disabled
I:Found brightness file at '/sys/class/leds/lcd-backlight/brightness'
I:TWFunc::Set_Brightness: Setting brightness control to 255
Starting the UI...Pixel format: 480x800 @ 32bpp
Pixel format: RGBX_8888
Not using qualcomm overlay, 'msmfb43_80201'
framebuffer: fd 4 (480 x 800)
=> Linking mtab
=> Processing recovery.fstab
I:Processing '/boot'
I:Processing '/cache'
I:Processing '/data'
I:Processing '/misc'
I:Processing '/recovery'
I:Processing '/external_sd'
I:Processing '/system'
I:Creating Android Secure: /external_sd/.android_secure
I:Backup folder set to '/external_sd/TWRP/BACKUPS/1db9cba'
I:Settings storage is '/external_sd'
Updating partition details...
I:Unmounting main partitions...
E:Unable to unmount '/data'
I have a stock based ROM to test, and I want to make sure I can enter recovery through the bootloader should things go sour. If TWRP can backup and restore, that allows me to go back to my true stock after the test. Any ideas?
joel.maxuel said:
Finally got around to test. Looks great, I love having TWRP over CWM!
Unfortunately the backup function is not working. TWRP errors out and reloads itself. [.....] Any ideas?
Click to expand...
Click to collapse
Yes.
There are several things coming in place when it comes to backing up out of TWRP atm...
You hopefully have read the big fat red warning ? What I mean is the part regarding /data gets lost when you do a factory-reset
That said if you have entered TWRP by pressing the physical keys your /data partition will be wiped (really bad thing but that it is made for and I haven't had the time to look into that further)
The result is a cleaned /data which is not mountable until you format it with mke2fs.
(e.g.: "adb shell mke2fs -T ext4 /dev/block/mmcblk0p15")
If you do not do that what MAY happens is that TWRP failing because of missing /data (and if not then you should ensure that /data was really backed up)
But as your log told me it seems to be not the problem here 'cause the /data partition is detected by TWRP. so it could be 2)
Mounting points.
As stated the mount points are not fully working in TWRP atm. That means when it comes to /sdcard which is the internal device storage it will fail, too because it cannot be found. The reason for this is that LG mounts /sdcard by the sdcard service but that is somehow tricky thats why it is not working atm.
And on top: the internal storage normally needs to be mounted to "/data/media" especially when we want to use MultiROM later.
So +1 for /sdcard or/and internal storage related
background info: http://teamw.in/DataMedia
The last one I could imagine is "something else" which could be catched by "/proc/last_kmsg"
The important thing is that this file gets written only after a crash and when the battery was not removed. So if the device reboots to TWRP again try to adb shell to the device and then paste the last_kmsg again. Maybe we can find something here.
When I will continue on TWRP I think of upgrading to v2.8 because they enable MTP here which could be good for copying data between device and pc..
BTW:
I have no idea what CWM port which is also be available would do in case of starting a backup especially what will REALLY gets backed up!!!!
IMHO the best way on doing a nandroid backup atm is "adb shell dd ...." Takes a long time but then you can be sure. I can give you all the mountpoints if you need them.
As I currently have not such much success with porting the ROM I will now come back here to TWRP and will finish it to have a hopefully fully working recovery. I cannot say the timeline for this but it will definitively be the next what I want to do because when this is done I can better match the rest for the ROM.
xdajog said:
<SNIP>
IMHO the best way on doing a nandroid backup atm is "adb shell dd ...." Takes a long time but then you can be sure. I can give you all the mountpoints if you need them.
As I currently have not such much success with porting the ROM I will now come back here to TWRP and will finish it to have a hopefully fully working recovery. I cannot say the timeline for this but it will definitively be the next what I want to do because when this is done I can better match the rest for the ROM.
Click to expand...
Click to collapse
This should work (I've done it before for eriklion):
Code:
adb shell
dd if=/dev/block/platform/msm_sdcc.1/by-name/system of=/storage/external_SD/system.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/boot of=/storage/external_SD/boot.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/cache of=/storage/external_SD/cache.2014-11-12.img
dd if=/dev/block/platform/msm_sdcc.1/by-name/userdata of=/storage/external_SD/userdata.2014-11-12.img
Now, is there a recommended adb command to wipe data and cache, since factory reset function is not the best choice? I see a few with the following process...
Code:
adb shell
su
format DATA
format CACHE
...but not much commentary on it.
I appreciate the second (third, whatever you are on) crack at TWRP. Hopefully the next version will squash the bugs. Btw, I will see if I can provide a /proc/last_kmsg tonight have posted a last_kmsg here.
joel.maxuel said:
This should work (I've done it before for eriklion):
Code:
adb shell
dd /dev/block/platform/msm_sdcc.1/by-name/system /storage/external_SD/system.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/boot /storage/external_SD/boot.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/cache /storage/external_SD/cache.2014-11-12.img
dd /dev/block/platform/msm_sdcc.1/by-name/userdata /storage/external_SD/userdata.2014-11-12.img
Click to expand...
Click to collapse
yes thats all you need to backup & restore
joel.maxuel said:
Now, is there a recommended adb command to wipe data and cache, since factory reset function is not the best choice? I see a few with the following process...
Code:
adb shell
su
format DATA
format CACHE
...but not much commentary on it.
I appreciate the second (third, whatever you are on) crack at TWRP. Hopefully the next version will squash the bugs. Btw, I will see if I can provide a /proc/last_kmsg tonight.
Click to expand...
Click to collapse
I always do it that way:
Code:
Starting TWRP
adb shell
("su" in TWRP not needed normally)
mke2fs -T ext4 /dev/block/mmcblk0p15 (for userdata)
mke2fs -T ext4 /dev/block/mmcblk0p14 (for cache)
Then you can be sure it is clean and well formatted. ext4 is for both cache and userdata and works fine for me.
twrp v2.8 with many enhancements and fixes is on its way
Stay tuned ....
if you get bored in the meanwhile ... click thanks
Is someone here with running the stock ROM (or absolutely not modified means formatted! /data partition) who is willing to give me a quick help? It must be stock or placed back to stock by using a backuped image dump if you have one.
The following need to be done in recovery so you need to have CWM or TWRP installed. Boot into recovery (adb reboot recovery) and then use "adb shell" to connect.
I need your output of this command:
Code:
mke2fs -n /dev/block/platform/msm_sdcc.1/by-name/userdata
This will not do/destroy/modify anything.
It should display some information about that partition. Read the details here http://linux.die.net/man/8/mke2fs
The reason is that LG factory reset seems to wipe superblocks (wanted by LG or not - fact is that they are thrown) and THEN forwarding to the recovery tool like TWRP but to be sure I need the above output from 1 or 2 people to be sure enough on how to proceed.
Thanks in advance
As Joel investigated that may destroy /data cause of a buggy version of mke2fs!! Oh man..
-----
Sent from my SGH-I927 using XDA Android mobile app
Ok thx to joel I'm able to investigate the LG facotry reset further.
In parallel I will try another way which will be (if I get it working) absolutely smooth and will not have such workaround character like the current idea (hijacking factory reset).
Give me some time but if that works it would be a great solution for accessing recovery..
Stay tuned some good things may happen...
-----
Sent from my SGH-I927 using XDA Android mobile app
Finally v2.8 for F3Q has arrived !!! I think a very good approach now!
Have fun and as usual any thx click.... and so on
Check out the OP for Download and details:
http://forum.xda-developers.com/showpost.php?p=55239027&postcount=1
UPDATE:
I have completely reworked the "Installation & Usage instructions" section in the OP. PLEASE READ and be happy
xdajog said:
Finally v2.8 for F3Q has arrived !!! I think a very good approach now!
Have fun and as usual any thx click.... and so on
Check out the OP for Download and details:
http://forum.xda-developers.com/showpost.php?p=55239027&postcount=1
UPDATE:
I have completely reworked the "Installation & Usage instructions" section in the OP. PLEASE READ and be happy
Click to expand...
Click to collapse
Great work.
Am looking at method two. If I was to install a ROM, wouldn't the boot partition (thus my new recovery) be overwritten by the ROM package's boot.img? And when I was cooking with the Kitchen, the ROM required a specific mount point for the boot partition. If it is supposed to point to recovery, seems to me that neither would boot (overwritten recovery, ROM pointing in the wrong location).
So, what is this solution getting around? So we have an option to load TWRP before a system we don't necessarily trust will boot? Thus avoiding the bootloader fallback even more? Or is it a broken boot.img breaks TWRP as well so even if we try to go in through the bootloader, TWRP fails to load as well?
Sorry for my confusion, still trying to grasp all this new information.
joel.maxuel said:
Great work.
Click to expand...
Click to collapse
Thanks
Am looking at method two. If I was to install a ROM, wouldn't the boot partition (thus my new recovery) be overwritten by the ROM package's boot.img?
Click to expand...
Click to collapse
Method 2 will suggest that if you install a custom ROM that you are be able to use/choose the boot.img partition (I hoped that the "hint" at the was clear enough but better to ask of course!)
And when I was cooking with the Kitchen, the ROM required a specific mount point for the boot partition. If it is supposed to point to recovery, seems to me that neither would boot (overwritten recovery, ROM pointing in the wrong location).
Click to expand...
Click to collapse
Well yes you either need to point to the recovery partition or (and that would be what I recommend) you let the user choose what he wanted to do.
So, what is this solution getting around?
Click to expand...
Click to collapse
The best we can do here (and that is what I will do for my custom ROM if I get it done some day) to use AROMA installer and ask the user if he has a recovery installed in the boot partition or not. Then you can choose what to do in the updater script.
I uploaded an example of my AROMA installation setup for the "sediROM for Samsung Captivate Glide" in this post. This one is VERY complex but you will get the idea and many input on how to do things.
So we have an option to load TWRP before a system we don't necessarily trust will boot? Thus avoiding the bootloader fallback even more?
Click to expand...
Click to collapse
Yes using method 2 we have always coming TWRP up when powering on the device. We then can choose to do things in there or to boot to "recovery" which will be the ROM. What do you meant with "bootloader fallback"?
Or is it a broken boot.img breaks TWRP as well so even if we try to go in through the bootloader, TWRP fails to load as well?
Click to expand...
Click to collapse
Not sure If I got you. When the boot partition gets overwritten TWRP and any possibility to get into TWRP will be lost because it sits only in the boot partition when using method 2. If you choose to do a factory reset when powering on the device or from within the ROM I have no idea what happens then unfortunately. That is untested but if you willing to test..
Sorry for my confusion, still trying to grasp all this new information.
Click to expand...
Click to collapse
No worry about that happy if that is useful for someone
xdajog said:
I uploaded an example of my AROMA installation setup for the "sediROM for Samsung Captivate Glide" in this post. This one is VERY complex but you will get the idea and many input on how to do things.
Click to expand...
Click to collapse
Thanks! I will take a look at this in the next few days.
xdajog said:
Yes using method 2 we have always coming TWRP up when powering on the device. We then can choose to do things in there or to boot to "recovery" which will be the ROM. What do you meant with "bootloader fallback"?
Click to expand...
Click to collapse
Bootloader fallback as in having to access TWRP via the bootloader. Our regular method is to access form the ROM, but if the ROM is bricked for whatever reason, the fallback is through the bootloader.
xdajog said:
Not sure If I got you. When the boot partition gets overwritten TWRP and any possibility to get into TWRP will be lost because it sits only in the boot partition when using method 2. If you choose to do a factory reset when powering on the device or from within the ROM I have no idea what happens then unfortunately. That is untested but if you willing to test..
Click to expand...
Click to collapse
I was alluding to the scenario if one was to choose method one, installed a ROM, and things got busted badly... Would you even be able to access TWRP with a bad boot partition? I think so, because recovery partition should be self sufficient (I think you proved it by swapping their places by way of method two), it is just getting into recovery by way of bootloader) I don't particularly like.
Had to face that fear last night, and ultimately, TWRP started up fast enough from the bootloader that it seemed like nothing happened, but when i went to dump the log, it could not recognize the sdcard. DD'ing my userdata partition back fixed that issue.
joel.maxuel said:
Bootloader fallback as in having to access TWRP via the bootloader. Our regular method is to access form the ROM, but if the ROM is bricked for whatever reason, the fallback is through the bootloader.
Click to expand...
Click to collapse
You mean "factory-reset" right? By either pressing the factory reset buttons (or by choosing from within the ROM) correct?
I was alluding to the scenario if one was to choose method one, installed a ROM, and things got busted badly... Would you even be able to access TWRP with a bad boot partition? I think so, because recovery partition should be self sufficient (I think you proved it by swapping their places by way of method two), it is just getting into recovery by way of bootloader) I don't particularly like.
Click to expand...
Click to collapse
If you install TWRP with method 1 and your boot partition gets corrupt you still be able to reach TWRP by using the factory-reset buttons. But you will loose /data then.
If you install TWRP with method 2 and your boot partition has gone you can not start TWRP anymore because it sits on there.
So you're more bulletproof by choosing method 1 because you would reach TWRP even when the boot partition gets damaged but you will loose /data then! Mentioned in the known issues in the OP.
Had to face that fear last night, and ultimately, TWRP started up fast enough from the bootloader that it seemed like nothing happened, but when i went to dump the log, it could not recognize the sdcard. DD'ing my userdata partition back fixed that issue.
Click to expand...
Click to collapse
When you have TWRP installed with method 1 you will reach TWRP by factory reset buttons and it will DO NOTHING ! Really! It simply starts TWRP because I patched TWRP that way that it will not wipe anything when triggered by the factory-reset command / button!
I can say that for double sure since today because:
1) In one of my tests I had disabled REALLY EVERY wipe option within TWRP - compiled it - installed it and even then /data gets lost!
2) I have installed the BOOT image means KERNEL on the RECOVERY partition today again and then used the factory-reset buttons again (after I restored /data of course)... and /data gets lost AGAIN--?!!
That means even when there is absolutely no custom recovery in place (like TWRP) which would normally handle wiping /data then nevertheless /data gets corrupted! I have tested that twice so I can say now for sure that this has nothing to do with TWRP but it comes from the LG bootloader instead! That bootloader is CRAP. sorry.
I had tested one approach which is build in boot image RAM disk which catches the keys which are pressed and then reboot into recovery. That would work but only as long as you have a working boot image partition. So that is the same good/bad as having TWRP sitting within the boot partition which is much easier to do so I decided to go this way for now.
One last word about the crappy factory-reset by LG: I have tried a lot to find out what really happens to the partition or partition table of /data when those keys are pressed but the only thing I can say is that the superblocks are inaccessible and the same for the backup superblocks. doing a "mke2fs -S" does not work (and wouldn't fix the root cause of the issue) and I have no idea what LG do here. Therefore cannot fix that ..
so I believe we will need to live with one of the 3 methods described in the OP....
Hope that answered some of your questions...
Bad news..
The Desire Z of my wife is completely broken now.
That means I cannot develop anymore..
- I ported and released the latest TWRP version to the F3Q
- I'm able to build AOSP JellyBean (not booting yet though),
- I compiled and released a custom AOSP Kernel (named sediKERNEL)
.... and a lot more..
I have everything I need to continue here in place...
I have the will and the ability to continue...
But no device anymore..
If someone has a F3Q to give away.. then I will continue but I'm not willing to buy a F3Q for developing only. So if you have an idea how we could continue let me know.
Update:
Check out the following link if you want to help http://forum.xda-developers.com/showthread.php?t=2952919
Otherwise that will end here for me unfortunately...
Hopefully not.
Yours
Xdajog.
-----
Sent from my SGH-I927 using XDA Android mobile app
I will update the installation instructions soon!
Because of the new sediKERNEL v2.0 the instructions will be made bullet proof only .. and i try to do it more detailed @Kediil
-----
Sent from my SGH-I927 using XDA Android mobile app

[UPDATED v1.1] zROM+ Custom ROM for Z3+ E6553 - 28.0.A.8.251, Android 5.0.2

zROM+ 28.0.A.8.251 Android 5.0.2 - V1.1​Sony Xperia Z3+ E6553​
​
ROM Features
Based on Sony firmware 28.0.A.8.251 Generic Hong Kong
Aroma installer
Deodexed and zipaligned
Rooted with SuperSU preinstalled
Dual boot/ TWRP recovery environment
Custom kernel with runtime control of SELinux enforcing status and RIC disabled
Google apps updated and with customizable graphical installer for Gapps
Writeable external SD card
Xposed framework functional (in SELinux permissive mode)
Bloatware removed
The following apps and bloatware have been removed and can be installed directly from the Play store if desired. The first two are installable by selecting the appropriate option in the ROM installer
What's New
Xperia lounge
AVG Antivirus
AAStocks
Anonymous Data Collection
Facebook
Lifelog
Mobisystems File Commander
Mobisystems Office
MyXperia
Playstation App
Playstation Network Portal
Privilege Movies
Sketch
Socialife
Sony Movie Creator
Spotify
Trackid
Please hit the Thanks button if you use this ROM. Many downloads but few thanks....
Installation instructions
NOTE: You must perform a factory reset before install by wiping cache and data.
Click to expand...
Click to collapse
Step 1
Download the TWRP image for the Z3+ and unpack it
Download zROM+ and the zROM+ md5 file
Run a command shell
Code:
c:>adb reboot bootloader
c:>fastboot boot recovery.img
c:>adb push zrom-v1.1.zip /sdcard/zrom-v1.1.zip
c:>adb push zrom-v1.1.zip.md5 /sdcard/zrom-v1.1.zip.md5
The file is big, so it will take 5 or more minutes to complete the upload. If you're impatient put your external SD in a card reader and load it that way.
Step 2
In the interface for TWRP, navigate to Wipe and perform a factory reset
In the interface for TWRP, navigate to Install
Click install, select zrom-v1.1.zip from the internal storage
Swipe to flash
Read and follow the instructions
Reboot when complete
Click to expand...
Click to collapse
The first boot is painfully slow. It takes about 10 minutes, so just be patient. It will stay in the blue booting screen for a long time. This is normal. Do not reboot your phone. Just wait and it will eventually boot up. You can always rerun the installer to flash additional Google Apps. If you do so, be sure to deselect the install ROM option and do not do a factory reset.
Notes
This ROM has a kernel that supports runtime SELinux mode changes. The mode change is accomplished through a script /system/su.d/permissive.sh, which sets SELinux to permissive mode at boot time. If you wish to run Xposed, you must run SELinux in permissive mode. Failure to do so results in multiple system applications force closing at startup and a device that is locked up.
If you don't run Xposed I recommend that you keep SELinux in enforcing mode. To do so, go to Settings-->About and click multiple times on the Build number until it tells you that Developer mode is activated. When developer mode is activated, back out and select the Developer option and enable USB debugging. Now run an adb shell and remove the permissive mode script. Grant permission for USB debugging when the prompt comes up
Code:
c:>adb shell
[email protected]:/ $ su
Wait for the SuperSU prompt and grant permission to adb
Code:
[email protected]:/ # mount -o rw,remount /system
[email protected]:/ # rm -f /system/su.d/permissive.sh
[email protected]:/ # reboot
If you choose not to install any of the Google apps, a minimum core Google framework will be installed anyway. This includes Google framework, GmsCore, Google Play, Google Login Services, Google Contacts and Backup Sync, SteupWizard and OneTimeInitializer that runs after first boot. Apart from the Play store app and the first time setup apps, the rest of these apps are not visible in your app drawer.
While I have made every effort to test this ROM in a variety of different install scenarios, it is a beta ROM and you may experience some bugs. I make no warranty as to its fitness for purpose or its performance and you use it at your own risk.
PLEASE SEE NOTE BBELOW IN POST TWO ON USING XPOSED FRAMEWORK
This ROM now supports booting directly into TWRP recovery mode. To access recovery mode, power on the phone and when you see the yellow LED illuminate press the down volume button once or twice.
Downloads
TWRP v2.8.7.0 for Z3+
zROM+ v1.1 for Z3+ (md5: 999452b5ac29f92473b964af819a3cd6)
zROM+ v1.1 for Z3+ MD5
for GPL purposes, the kernel and associated dowloads
Changelog
Current changelog: -- 01 October 2015
01 October - Release v1.1
Add dual boot/recovery environment
Remove Android Pay due to Google restrictions on root
Update Google apps
19 September - Release v1 beta
Thanks To/Credits
amarullz for the Aroma graphical installer
The OpenGapps team at www.opengapps.org for the Gapps binaries for aarch64
osm0sis for some of the functions used in the installer script
XDA:DevDB Information
zROM+, ROM for the Sony Xperia Z4
Contributors
dl12345
ROM OS Version: 5.0.x Lollipop
Based On: 28.0.A.8.251
Version Information
Status: Beta
Current Beta Version: v1.1 beta
Beta Release Date: 2015-10-01
Created 2015-09-20
Last Updated 2015-09-19
Xposed framework v74 bootloops on Xperia Z3+. The reason for this is discussed in this post
To use Xposed on zROM+, please download the [UNOFFICIAL] xposed-v74-sdk21-arm64-dl12345-UNOFFICIAL-20150929 for Xperia Z3+
You MUST do a wipe cache and dalvik after installation otherwise you will get errors including one that claims your storage space is full and another 504 error when installing anything from the Play Store
Please read the instructions in the referenced post
Have been waiting for this with baited breath. So far so good! Thanks for the great work!
Do need unlockbootloader to install rom?
manhhung1420 said:
Do need unlockbootloader to install rom?
Click to expand...
Click to collapse
Yes.
Thank you for your efforts.
Any chance that this ROM can work for E6533 (dual SIM) variant? Or can you plan to support?
Rookie123 said:
Thank you for your efforts.
Any chance that this ROM can work for E6533 (dual SIM) variant? Or can you plan to support?
Click to expand...
Click to collapse
Offhand, I'd say it's unlikely. Sony has a different firmware for this phone.
I'm unlikely to support a device I don't have access to. Apologies.
Works great thanks. Is there any way to make a sound mod to increase headphones volume?
pikeylfc said:
Works great thanks. Is there any way to make a sound mod to increase headphones volume?
Click to expand...
Click to collapse
There's probably something in the xposed repository for that....
Am so sorry to heard that I wanted to install a fresh rom on my hot phone
lilloscar said:
Am so sorry to heard that I wanted to install a fresh rom on my hot phone
Click to expand...
Click to collapse
Sorry to hear what?
dl12345 said:
Sorry to hear what?
Click to expand...
Click to collapse
That this rom wont support the dual version
Great work! finally working recovery...but please..cant access my external sd card! fix this please!
chrisss5000 said:
Great work! finally working recovery...but please..cant access my external sd card! fix this please!
Click to expand...
Click to collapse
No problem here accessing my external SD card in recovery mode and when booted in the ROM. Have you formatted your external card? In recovery mode, the path to the external SD card is /external_sd...
so weird...try to enable it..but it dosent work...and the rom cant start...stock at bot sony xperia logo...
chrisss5000 said:
so weird...try to enable it..but it dosent work...and the rom cant start...stock at bot sony xperia logo...
Click to expand...
Click to collapse
You likely didn't do a wipe. Go to advanced wipe. Wipe dalvik cache, system, data, cache. Reinstall the rom.
dl12345 said:
You likely didn't do a wipe. Go to advanced wipe. Wipe dalvik cache, system, data, cache. Reinstall the rom.
Click to expand...
Click to collapse
I have installed roms like hundrad times...I did a factory reset and I did advanced wipe etc...dosent work..so weird..
I guess something is wrong..something with premissions? Because every time I have wiped my phones it takes a while..But when I wiped now with this recovery it was done in a heart beat...
chrisss5000 said:
I have installed roms like hundrad times...I did a factory reset and I did advanced wipe etc...dosent work..so weird..
I guess something is wrong..something with premissions? Because every time I have wiped my phones it takes a while..But when I wiped now with this recovery it was done in a heart beat...
Click to expand...
Click to collapse
You're installing on a Z3+ e6553 single sim version, right? My wipes are pretty quick too....once the wipe is done, go to the mount option in recovery, mount the filesystems and make sure they're empty (well, they will contain a lost+found folder for the ext4 filesystems and your sdcard contents for the /data filesystem).
Permissions are unlikely to be the problem. The ROM is untarred from an ext4 filesystem copy, so original filesystem permissions are preserved. It also installs an updated file_contexts and does a selinux restorecon to make sure selinux contexts are correct...
dl12345 said:
You're installing on a Z3+ e6553 single sim version, right? My wipes are pretty quick too....once the wipe is done, go to the mount option in recovery, mount the filesystems and make sure they're empty (well, they will contain a lost+found folder for the ext4 filesystems and your sdcard contents for the /data filesystem).
Permissions are unlikely to be the problem. The ROM is untarred from an ext4 filesystem copy, so original filesystem permissions are preserved. It also installs an updated file_contexts and does a selinux restorecon to make sure selinux contexts are correct...
Click to expand...
Click to collapse
Incidentally, on first boot, it takes a few minutes to get past the Sony logo. then once you hit the blue screen be prepared for a 10 minute wait...
dl12345 said:
Incidentally, on first boot, it takes a few minutes to get past the Sony logo. then once you hit the blue screen be prepared for a 10 minute wait...
Click to expand...
Click to collapse
Yes it is Xpera Z3+ E6553
Okay I will test it now! I will come back with results
big thanks!!
---------- Post added at 08:05 PM ---------- Previous post was at 08:00 PM ----------
dl12345 said:
Incidentally, on first boot, it takes a few minutes to get past the Sony logo. then once you hit the blue screen be prepared for a 10 minute wait...
Click to expand...
Click to collapse
Uhm should the installing just take 15 sec? I nearly drop my finger from the screen and it is wiped....something is wrong...
---------- Post added at 08:07 PM ---------- Previous post was at 08:05 PM ----------
dl12345 said:
Incidentally, on first boot, it takes a few minutes to get past the Sony logo. then once you hit the blue screen be prepared for a 10 minute wait...
Click to expand...
Click to collapse
it dosent work...it only get stuck at sony loggo

[TWRP][any G4][BL LOCKED] TWRP-in-FIsH for all LOCKED G4 devices

TWRP on locked devices is impossible right?
Oh no wait there are hacks up to KK which work but I couldn't find anything for LL (sorry if I missed something) and so nothing for the G4
Here is where the FIsH steps in
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
FIsH: [F]luffy [i]ncredible [s]teadfasterX [H]ijack​
FIsH is different from Safestrap or other hijacks because it should be understood as a kind of framework for any boot image you want to boot.
FIsH will not harm the Android boot chain!
It is NOT multirom
It is NOT efidroid
It is NOT Safestrap
It is NOT twrp.
.... but FIsH can boot any of the above. U got it? FIsH is the hack to boot whatever you want.
Will FIsH void your warranty? Not more or less then rooting your device.
Will FIsH unlock your bootloader? No read again.
Is there a risk with FIsH? For example could it soft-brick my device? Well.. absolutely! Safe is the death only. There are always risks especially for untested devices. I do all I can to keep this risk as low as possible and I provided a way to get out of bootloops but again you will get no guarantees here and elsewhere.
.. and it is more then just a hack for the G4 (any model) it is a hack for ALL devices of ANY vendor! wtf? yes.
Sure you have to met the pre-requirements and there has to be done some things to get it ported but those are straight forward.
Go to IRC channel #androidfish if u can't wait but I will publish a public porting guide when it is ready.
Are there plans to make more out of it for the G4? Absolutely. I'm currently working on an "efidroid in FIsH" version which will let you flash & boot (hopefully) any custom ROM u like.
ALL DETAILS ABOUT HOW FIsH WORKS HAVE BEEN RELEASED IN ANOTHER THREAD (check my signature).
So going back to topic. This is:
TWRP in FIsH for the LG G4 (any model) - Bootloader LOCKED
Do you have a bootloader unlocked device?
If the answer is YES: you don't need it
Do you have a bootloader locked device and want TWRP?
If the answer to BOTH is YES. you need it. you can't install TWRP on a locked device.. up to now. FIsH allows you to do so.
If your question is: Can this ENABLE root for my device?
NO! you actually NEED root to activate TWRP for your device with this method.
Important: Here are the pre-requirements you have to met!
If you can't get them:
Close this page and FORGET it (until the day you may met those reqs)!
Requirements!
root by SuperSU >=v2.76 (greater or equal v2.76) (atm this means you have to downgrade/install LL. It also means that you have to upgrade your SuperSU to this version by e.g. FlashFire if you have a lower version installed!)
you have to be able to disable SELinux in your booted Android (which should be the case when you have a full rooted device)
Those above are hard facts so it may never work with MM. That also means if MM can get fully rooted by SuperSU and you can use "setenforce 0" the method should work there as well!
Before you think about downgrading to LL read about ANTI-ROLLBACK protection some LG devices and MM versions may have!
Anti-Rollback means you CAN NOT downgrade - it would brick your device.
I will NOT provide downgrading guides there are plenty of them so search and read.
If you can not meet ALL of the above 2 requirements lay down and cry. For the others: calm down and read on!
You can test requirement 2 (disable SELinux) by:
adb shell
su
setenforce 0
getenforce
-> you should see "Permissive" as a result. If you see "Enforcing" or error messages you may doing something wrong or it just do not work for you.
Limitations!
Keep in mind what I said above: FIsH does NOT unlock your bootloader.
That means with TWRPinFIsH you can NOT:
Install a custom ROM like CM/Lineage (this will modify boot = soft brick. for this u need "efidroid in FIsH" - coming soon)
Install a custom Kernel (this will modify boot = soft brick)
Install a custom recovery (this will modify recovery = may soft brick)
In short: nothing which modifies boot or recovery partitions.
You can of course flash everything which is modifying /system /data only (e.g. xposed,...)
That means you could install even a custom ROM which works with the stock kernel so with unmodified boot image. Let's say the creator of imperium or genisys provide a release without the containing boot image. You could flash it..
State / Roadmap
FULL takeover/hijack of boot -> DONE (the modifications required are not voiding the Android boot signing chain!)
replace RAM disk -> DONE
boot own RAM disk (TWRP!) -> DONE (atm TWRP 2.8.7-0) <-- TWRP-in-FIsH v1.0 private BETA
Upgrade bundled TWRP to latest version -> DONE (TWRP 3.1.0-0) <-- TWRP-in-FIsH v1.0 final release
Download
READ THE REQUIREMENTS above before proceeding!
Then UNDERSTAND the requirements before proceeding! <-- omg this is crucial important!!!! Ensure that you really do not skip this step!
READ THE LIMITATIONS above before proceeding!
Then UNDERSTAND the limitations before proceeding! <-- omg this is crucial important!!!! Ensure that you really do not skip this step!
... and NEVER ask for ETA's!
if you can say:
Yes! I have read and totally understood the limitations AND the requirements!
then proceed. Otherwise read again until you got it.
Keep in mind that this is a HACK. It may soft-brick your device. you have been warned!
The concept is the same for all models but again no guarantees here for anything.
There is ALWAYS a risk and you should better backup what you do not want to loose before starting downloading this.
Go to the DOWNLOADS tab in this thread.
TWRP-in-FIsH is now integrated into my TWRP build server and so whenever a new change happens in TWRP you will get the same automatically on next build. This way it is much easier to release new TWRP versions made for FIsH.
From now on you will find nightlies (untested automatic builds) here:
Jenkins build status
Nightlies download server
Installation (Linux)
You can just install any newer version over an old one.
boot Android and connect USB cable
download the newest version to your PC and open a terminal in that directory
tar xzf TWRPinFIsH*.tgz (tar xzf TWRP-in-FIsH*.tgz since v2.0)
cd openFIsH (cd android_FIsH since v2.0)
./install.sh
check the output of that script. you should not see any errors there (hopefully)
Installation (Android / no PC)
Requirements:
TWRP-in-FIsH v4.2 or higher!
BusyBox pre-installed (e.g.: with this app )
You can just install any newer version over an old one.
Thanks to @ReeS86 starting from v4.2 on TWRP-in-FIsH has an enhanced installer which can run without any PC - directly on your Android device!
It would be nice if you could give him a thx click (here) for his contribution !
Bring TWRP-in-FIsH to your Android device
Example-1 with any PC (windows, linux, ...): adb push TWRP-in-FIsH.tgz /sdcard (replace TWRP-in-FIsH.tgz this with the real file name)
Example-2 within an Android Terminal:
cd /sdcard
wget http://full-URL-to-file (replace full-URL-to-file with the real direct download link)
Example-3 with just a browser: well just download it.. but remember where it gets saved!
extract it
Example from within Android Terminal:
cd /sdcard (or the folder where you have downloaded TWRP-in-FIsH)
tar xzf TWRP-in-FIsH.tgz (replace TWRP-in-FIsH.tgz this with the real file name)
run the installer (but do it correctly)
Example from within Android Terminal:
su
cd /sdcard/android_FIsH
sh ./install.sh (using sh is absolutely important otherwise it will fail)
done
Installation (Windows)
If none of the above methods is working for you: use FWUL
First run (no PC required)
This FIsH gets installed PERMANENTLY! That means:
You can boot up TWRP the same way as described here again without re-installing.
If you re-install your STOCK image you have to re-install TWRPinFIsH as well.
reboot Android
you should now see: LED goes from blue to GREEN
NOW directly when u see this GREEN LED press VOLUME DOWN and do NOT release
wait until the device vibrates and the LED changed to RED. Then release the Volume Down button.
Wait until FIsH completed and TWRP should be shown --> This means FIsH has done it's job well!
This is a good time to do a full backup isn't it ? Manually mount the SYSTEM partition as it gets not auto mounted atm and do a full backup
reboot from here (safely ignore the msg "no OS installed" and reboot anyways) and you should see Android booting (hopefully ... if not see bottom)
Daily Usage (no PC required)
reboot Android
you should now see: LED goes from blue to GREEN
NOW directly when u see this GREEN LED press VOLUME DOWN and do NOT release
wait until the device vibrates and the LED changed to RED. Then release the Volume Down button.
Wait until FIsH completed and TWRP should be shown --> This means FIsH is doing it's job still very well
AGAIN: keep your mind up! You HAVE to ensure that whatever you do and whatever you flash -> NEVER TOUCH BOOT/RECOVERY! If you flash a ZIP ensure first that it do not modify them! Otherwise you WILL softbrick. You have been warned (several times now)
FIsH helpers
If you just want to reboot directly from within Android check out these:
Thanks to @sdembiske who has onboarded the developer @AntaresOne we have an option to reboot into FIsH very comfortable now!
Check it out here: QuickReboot App
Trouble / Bootloop fix
if you encounter a bootloop (should never happen but who knows) you have 3 choices at least:
Option 1a: (TWRP-Bootloop) Within TWRP open Advanced -> File Manager -> Goto: /system/su.d and click "select" button -> Delete
Option 1b: (TWRP-Bootloop) From your PC: adb shell rm -rf /system/su.d/
Important: Catch the fish log (see next topic)
Option 2 (this works also for a bootloop without twrp): boot into download mode and use LGLaf to get a shell
then:
setenforce 0 <-- if that doesn't work you may have to do a FULL restore to stock
mount -oremount,rw /system
rm -rf /system/su.d/
reboot. You are out of the bootloop.
Important: Catch the fish log (see next topic)
Option 3: Last resort: Reflash STOCK. sorry.. there is always a risk..
Catch the FIsH logs
reboot back to Android and catch the fish log (IMPORTANT!):
adb shell "su -c cat /cache/fish/fish.log"
adb shell "su -c cat /cache/fish/fish.log.old"
Upload it to https://paste.omnirom.org and paste the link in the IRC channel (see next topic)
Support / IRC Channel
IRC means Internet Relay Chat and you will get best support there only.
Choose how to get in:
PC (HexChat and Pidgin are only 2 of them! This list is not complete!)
Android (Yaaic, AndChat, HoloIRC, AndroIRC are only a few of them! This list is not complete!)
Web (KiwiIRC-Web,FreenodeWebchat])
When you have to choose a channel it is: #Carbon-user
When you be asked for a server network choose: freenode
Known issues (may never get fixed)
Due to the fact that TWRPinFIsH is a brutal hijack of the booting process several things may not work as expected.
This will normally not harm anything but you have to know about.
System IMAGE backup:
Using this new option is a bulletproof method to backup and restore in TWRP-in-FIsH because you have to keep in mind that FIsH is a giant and brutal hack and even when a usual backup & restore is proven to work fine I would recommend to use both backup methods - if you can.
HINT: This method requires an ext4 or exfat partition on your external SD card otherwise image backups will fail due to the file size.
@sdembiske reports success using the internal storage as target for the backup but if you do this keep in mind that you have to move that backup to your PC manually to ensure you have it by hand for the worst case.
ZIP / ROM flashing:
omg really you wanna hear that again? OK: DON'T TOUCH BOOT / RECOVERY. And you be safe.
When you try to install a ROM it will modify at least BOOT. That means soft-brick!
When you try to install a custom Kernel.. omg really? It will definitively SOFT-BRICK! Maybe you should read the limitations again??
When you try to install a ZIP like xposed, supersu, Vipermod and others ensure that those are not modifying BOOT or RECOVERY partitions. For those mentioned it would be very unlikely but who knows.
When you find a stock based ROM which is not modifying boot you can flash it. But ensure that it does not modify anything on boot!!! You could ask the devs of imperium etc if they can provide such a zip..
SYSTEM partition (since v2.0: may be not a restriction on your device model!):
when you boot into TWRPinFIsH you may see an error message regarding the fact that /system cannot be mounted.
you can mount /system manually without a problem - BUT - it will work only if you do NOT select "mount system read-only". It has to be unchecked to work.
after you have mounted /system manually and you want to take a backup you may see "0 bytes". Just press refresh and the size will be updated. If not: Do you have mounted it correctly (see above).
FIRMWARE partition (since v2.0: may be not a restriction on your device model!):
cannot be mounted - even not manually. You have to live with it.
Double Tap to wakeup (in TWRP):
You may heave seen/heard that this works in the official / usual TWRP for the G4 for unlocked devices. Unfortunately this cannot work in TWRP-in-FIsH due to the nature of this hijack. You have to live with it.
Installing more than 1 ZIP at a time (may be not a restriction on your device model!):
It is not possible to install more than 1 ZIP at the same time. TWRP gives you the option to install multiple ZIP files but the problem is you have to re-mount /system after each ZIP flashing. This is due to a problem with mounting /system readonly and most ZIPs will exactly try to do this when they finished their work - leaving you with an unmounted /system.
This will be not the case for every ZIP combination - so it is possible that you can flash some ZIPs at the same time while others not.
atm I believe you have to live with it.
Credits (without them - no TWRP-in-FIsH!!!)
If you feel that someone / you is missing on this list lemme know!
Chainfire for SuperSU! This is the main part of FIsH!
TeamWin for TWRP of course!
@cray_Doze, @dssmex and @KeiranFTW for their hijack implementations which given me many input (e.g. https://forum.xda-developers.com/showthread.php?t=2608408)
@Aaahh for his great first steps to a G4 hijack -> His work had given me the motivation back to continue when I was about to stop all this
@dibbled for creating the android FIsH logo
steadfasterX for being steadfast!
@jasonlindholm for your donation it was highly appreciated!
XDA:DevDB Information
TWRP-in-FIsH_LGG4, Tool/Utility for the LG G4
Contributors
steadfasterX, Aaahh, TheMadScientist420, KeiranFTW, cray_Doze, dssmex, TeamWin, ChainFire, the_naxhoo, SimoxTav, Rees86, uio88, sdembiske, jasonlindholm, ... and all new other contributors who gave me feedback for this!
Source Code: https://github.com/Carbon-Fusion/android_FIsH
Version Information
Status: Stable
Current Stable Version: 4.2
Stable Release Date: 2017-06-21
Current Beta Version: 5.0
Beta Release Date: 2017-12-19
Created 2017-03-14
Last Updated 2017-12-19
List of confirmed devices (as of 2017-06-04)
If you own a device missing on this list - let me know and I will add it here.
F500L Korean variant - locked (Thanks @Syntist)
H810 - locked (Thanks @shane87)
H812 - locked (Thanks @ReeS86)
H815 International - unlocked (Thanks @steadfasterX yea its mine and i have no locked device to test with That's why i needed ur help. but i test with PURE stock and without touching the boot chain so its similar to locked devices.)
H815 EUR - locked (Thanks @uio88)
H815P - locked (Thanks @KnightOdin)
H815T - locked (Thanks @the_naxhoo)
H815L - locked (Thanks @foxyfoxyblah)
H818P - locked (Thanks @SimoxTav, @alitavas)
LS991 Sprint - locked (Thanks @TheMadScientist420)
VS986 - locked (Thanks @g_ding84)
List of confirmed flashing experiences (as of 2017-05-19)
If you tested a ZIP missing or unknown on this list - let me know and I will add/update it here. Write the exact version tested would be helpful as well.
Xposed - confirmed to work (tested: Xposed version 87 (SDK 21). THANKS for your report @g_ding84, @the_naxhoo, @KnightOdin, @shane87)
Viper4Android - confirmed to work (tested: Viper4Android 5.4 stock zip with Dolby Atmos. THANKS for your report @g_ding84 , @the_naxhoo, @SimoxTav)
SuperSU - confirmed to work (tested: v2.79. Thanks for reporting @g_ding84)
A.R.I.S.E - confirmed to work (tested: v.2.94 -> Am3d Eq, Viper4arise, Viper4Android Xhifi, Esira. Thanks for your report @alitavas
Android O emoji package - confirmed to work (thanks for your report @alitavas)
Editing system/build.prop - confirmed to work --> read carefully HOW (thanks for the howto & report @sdembiske )
Xtreme music 9.2 - confirmed to work (thanks for your report @jason_l367)
ANY OTHER ZIP - unknown ----> Please report back if you have flashed one missing here
Releases
TWRP-in-FIsH v5 (5.0)
Released: 2017-12-19
Download: Go to the Downloads tab
Changelog for FIsH: previously used version <---> this version
Changelog for TWRP-in-FIsH device tree: previously used version <---> this version
Changelog for:
- TWRP v3.2.0-0
- TWRP v3.2.1-0
Summary changelog (read the above FULL changelogs for details!):
new TWRP version
all important fixes from the main TWRP releases like corrected time and EFS backup, added Bootloader backups etc.
Many enhancements and fixes in FIsH, e.g. enhanced and fixes issues in the installer and qseecomd (device encryption) added to the brand new exclude service option
Everything is better now
Old releases:
TWRP-in-FIsH v4 (4.2)
Released: 2017-06-21
Download: Go to the Downloads tab
Changelog for FIsH: previously used version <---> this version
Changelog for TWRP-in-FIsH device tree: previously used version <---> this version
Changelog for TWRP: v3.1.1-0
Summary changelog (read the above FULL changelogs for details!):
Installer is now able to detect and run from within Android* (read the NOTES in the OP - topic "Installation (Android / no PC)"!)
Added the option to backup /system as an IMAGE* (read the following HINT!)
Using this new option is a bulletproof method to backup and restore in TWRP-in-FIsH because you have to keep in mind that FIsH is a giant and brutal hack and even when a usual backup & restore is proven to work fine I would recommend to use both backup methods - if you can.
HINT: This method requires an ext4 or exfat partition on your external SD card otherwise image backups will fail due to the file size.
@sdembiske reports success using the internal storage as target for the backup but keep in mind that if you do this you have to move that backup to your PC manually to ensure you have it by hand for the worst case.
Everything is better now
(.... TWRP updated, many FIsH improvements, added an option to backup /system as image,... read ALL the above changelogs!)
TWRP-in-FIsH-v3_LGG4_LL
Released: 2017-04-16
Download: here
Changelog: on github
Summary:
Big speed improvements
adding model detection as property (ro.product.detection -> should be "success")
fixing unify detection
adding all known devices to unification
- these both above will fix issues where your device was not detected correctly in TWRP and fails to install a ZIP which requires this!
Installer:
./install.sh --check will give you the option to check if TWRP-in-FIsH works for your or not - without changing anything on your device.
TWRP-in-FIsH-v2.0_LGG4_LL
(as far as im able to remember.. i have changed so many things inside..)
Released: 2017-03-24
Changelog: on github
Summary:
TWRP-in-FIsH now has a meaningful package name (TWRP-in-FIsH-v2.0-BETA1_LGG4_LL.tgz) which reflects all required information
The installer is checking for the SDK level now instead of the Android release version! This means ANY Lollipop version will work without modifications of the installer
new: completely overworked WIDE parts of FIsH
In order to be more easy portable all variables users may need to adjust are moved to FIsH.porting
while FIsH.me contains global variables for FIsH a user/dev normally would NOT change.
The log has been enriched with some more useful information
The stopping of android services is now more aggressive
Apropos aggressive: now we use fuser to kill ALL processes before trying to unmount a disk (excluding init and ourself)
Another porting stuff was added: we extract the FISHFOOD but WITHOUT a possibly existing file </init>. When you prepare your own ramdisk it may or may not contain a file /init but we do not want to overwrite the current running /init by just cpio yet.
The reason is: it makes a difference in the Linux world to use cp or mv or cpio > to overwrite!
The short version: using mv is the best choice here. So we extract first without /init (if there is one) and then extract /init ONLY but to a different directory. Afterwards we use mv to overwrite the current /init with either an extracted /init or your own init name configured by the new FOODBIN variable.
Unfortunately this has not that positive effect I hoped but I leave it there because it is the way it should be done nevertheless.
Now FIsH also:
- checks the exec bit before it tries to start it! Im still thinking of adding a reboot if not.. but this could cause bootloops.. on the other hand doing nothing will leave the device in a unusuable state.. well it should more or less never happen though but..
- save the current SELinux mode
- trying to restore the saved SELinux mode when something goes wrong (at the end this will make no sense but it doesnt hurt)
- umounts when a mount point is mounted ONLY
Besides that FIsH now comes with callmeFIsH - a caller script which gets executed at very first.
The only task callmeFIsH has is to prepare the whole FIsH to get started out of /system and then starting FIsH from /res. After this it immediately exists to not keep open tasks on /system.
Also new are some parts of the installer e.g. starting adb server first and then wait for a connected device before continue the installation.
The installer is keeping track of an older FIsH install and removes the previous one before as well
The installer also now giving a hint that you may have to change to PTP mode on your G4 to get detected
For completeness: Same TWRP version inside so nothing changed here..
During these changes I have renamed the package folder from openFIsH to android_FIsH. Please keep this in mind when you extract the FIsH
So after you extract the BETA package you have to do
"cd android_FIsH"
instead.
TWRPinFIsH_v1.0
Released: 2017-03-18
Changelog:
first public release
.
As current. To further op. When released remeber bl is still locked do not modify recovery and or boot partitions. Will throw secure boot errors done tried and found out. Was able to restore orig boot and recovery images.
On ls991.
So lets get our flash on. I wanna see some good clean flashing and no hits below the bootloader
TheMadScientist420 said:
As current. To further op. When released remeber bl is still locked do not modify recovery and or boot partitions. Will throw secure boot errors done tried and found out. Was able to restore orig boot and recovery images.
On ls991.
So lets get our flash on. I wanna see some good clean flashing and no hits below the bootloader
Click to expand...
Click to collapse
Well .. Correct. For me it is totally clear but this will be not for the average user maybe.. I will add it to the OP. Thx
Sent from my LG-H815 using XDA Labs
Thanks for all your effort with this development. So, i understand that we can boot into TWRP and we can backup and restore our system, right? But we can also flash roms, mods or kernels without unlock BL?
Again, thanks for your time on this project, this are really big news for our device!
Jkmoran said:
Thanks for all your effort with this development. So, i understand that we can boot into TWRP and we can backup and restore our system, right? But we can also flash roms, mods or kernels without unlock BL?
Again, thanks for your time on this project, this are really big news for our device!
Click to expand...
Click to collapse
2 posts up.
---------- Post added at 07:12 PM ---------- Previous post was at 07:10 PM ----------
Jkmoran said:
Thanks for all your effort with this development. So, i understand that we can boot into TWRP and we can backup and restore our system, right? But we can also flash roms, mods or kernels without unlock BL?
Again, thanks for your time on this project, this are really big news for our device!
Click to expand...
Click to collapse
Yes and no. I flashed viper 4 android. But because of signed bl. Any recovery or modified boot image will not work just yet. Still a wip.
Reserved. I hope to install this in my H815p soon...
TheMadScientist420 said:
2 posts up.
---------- Post added at 07:12 PM ---------- Previous post was at 07:10 PM ----------
Yes and no. I flashed viper 4 android. But because of signed bl. Any recovery or modified boot image will not work just yet. Still a wip.
Click to expand...
Click to collapse
Hey i just want to say thanks for acknowledging thqt i helped you more than what happens in the sprint thread. I have a post 2400 views where i tore my g4 down 3 days after purchase to show a thermal paste mod. 2400 views and 1 thanks. Id thank u properly but unfort ive hit my 8 thanks a day limit
---------- Post added at 07:25 PM ---------- Previous post was at 07:22 PM ----------
Newmak said:
Reserved. I hope to install this in my H815p soon...
Click to expand...
Click to collapse
It will come in due time. The third release was sent out in one day. Progress is moving rite along my friend.
Some of us have been waiting since day one. I have about 15 months. Or nov 15 we are all anxious for offic release. And please make sure to give the man his cr3dit where due. Took time out of his day to do a team view session to test on mine at like 5 am this mornin. Some of the greatest minds have not been able to do this. And now look. Lol all the nay sayers
---------- Post added at 07:30 PM ---------- Previous post was at 07:25 PM ----------
Newmak said:
Reserved. I hope to install this in my H815p soon...
Click to expand...
Click to collapse
sorry i didnt actually answer ure ?
this should work on all g4s and possibly many other lgs and or devices
I have only one question. Will this TWRP be able to modify boot partition as well? Isn't that the whole point of the locked bootloader? If it will be able to modify any partition, it is a big, big win for us.
tmihai20 said:
I have only one question. Will this TWRP be able to modify boot partition as well? Isn't that the whole point of the locked bootloader? If it will be able to modify any partition, it is a big, big win for us.
Click to expand...
Click to collapse
No read the OP again (wait for efidroid-in-FIsH).
tmihai20 said:
I have only one question. Will this TWRP be able to modify boot partition as well? Isn't that the whole point of the locked bootloader? If it will be able to modify any partition, it is a big, big win for us.
Click to expand...
Click to collapse
Lol op and about 4 or 5 posts up. Same ? Just asked.
Either was locked bl or not this is a majpr victory for the g4. They said it couldnt be done and
Hopefully You could port this also to G Flex 2?
dadaa1 said:
Hopefully You could port this also to G Flex 2?
Click to expand...
Click to collapse
he has stated should work on any android device running loli as long as u meet the prequisites
root and kernal set to permissive if he doesnt some one probly could adapt it from here no prob once its offic released
---------- Post added at 06:36 AM ---------- Previous post was at 06:04 AM ----------
dont know how much feed back uve been gettin but figured id chime in again
so after all night playing lol still sick as a dog cant sleep about 4 hours on 2 days feel high and drunk lol
ive do have to mount system everytime i load twrp to backup restore or flash but i flashed viper flashed xposed again just to check it out
bricked about 10 times and have restored perfectly everytime.
bricks my own fault trying and testing most def incompatible mods and fixes but so far through every brick recovery is holding strong and steady havnt installed the beta 3 yet
should i is much changed from there?
TheMadScientist420 said:
he has stated should work on any android device running loli as long as u meet the prequisites
root and kernal set to permissive if he doesnt some one probly could adapt it from here no prob once its offic released
---------- Post added at 06:36 AM ---------- Previous post was at 06:04 AM ----------
dont know how much feed back uve been gettin but figured id chime in again
so after all night playing lol still sick as a dog cant sleep about 4 hours on 2 days feel high and drunk lol
ive do have to mount system everytime i load twrp to backup restore or flash but i flashed viper flashed xposed again just to check it out
bricked about 10 times and have restored perfectly everytime.
bricks my own fault trying and testing most def incompatible mods and fixes but so far through every brick recovery is holding strong and steady havnt installed the beta 3 yet
should i is much changed from there?
Click to expand...
Click to collapse
Thanks for ur ongoing support here. please always go to IRC if possible:
PC (HexChat and Pidgin are only 2 of them! This list is not complete!)
Android (Yaaic, AndChat, HoloIRC, AndroIRC are only a few of them! This list is not complete!)
Web (KiwiIRC-Web,http://webchat.freenode.net/?channels=androidfish)
Whenever you have to choose a channel it is: #androidfish
When you be asked for a server network choose: freenode
.
Just wanted to let you know the current device list.
If you own a device missing in this list send me a PM with subject FIsH !
Please do not write me if your device is shown here already!
List of confirmed devices (as of 2017-03-15)
H815 International - unlocked (Thanks @steadfasterX yea its mine and i have no locked device to test with That's why i needed ur help. but i test without touching the boot chain so its similar to locked devices.)
LS991 Sprint - locked (Thanks @TheMadScientist420)
H815T - locked (Thanks @the_naxhoo)
H818P - locked (Thanks @SimoxTav)
H812 - locked (Thanks @ReeS86)
steadfasterX said:
Just wanted to let you know the current device list.
If you own a device missing in this list send me a PM with subject FIsH !
Please do not write me if your device is shown here already!
List of confirmed devices (as of 2017-03-15)
H815 International - unlocked (Thanks @steadfasterX yea its mine and i have no locked device to test with That's why i needed ur help. but i test without touching the boot chain so its similar to locked devices.)
LS991 Sprint - locked (Thanks @TheMadScientist420)
H815T - locked (Thanks @the_naxhoo)
H818P - locked (Thanks @SimoxTav)
H812 - locked (Thanks @ReeS86)
Click to expand...
Click to collapse
Nice work Waiting my Flex 2 LGH955 to arrive from warranty, I hope this can be ported to "LG Damed" locked flex 2 also
With efidroid in FIsH, will we able to install any custom rom such as android 7.0 based roms?
nikomedes said:
With efidroid in FIsH, will we able to install any custom rom such as android 7.0 based roms?
Click to expand...
Click to collapse
Limitations!
Keep in mind what I said above: FIsH does NOT unlock your bootloader.
That means with TWRPinFIsH you can NOT:
Install a custom ROM like CM/Lineage (this will modify boot = soft brick. for this u need "efidroid in FIsH" - coming soon)
Install a custom Kernel (this will modify boot = soft brick)
Install a custom recovery (this will modify recovery = may soft brick)
In short: nothing which modifies boot or recovery partitions.
You can of course flash everything which is modifying /system /data only (e.g. xposed,...)
nikomedes said:
With efidroid in FIsH, will we able to install any custom rom such as android 7.0 based roms?
Click to expand...
Click to collapse
Yes, with Efidroid you should be able to flash Custom ROM.
You can search about efidroid if you want to know more.
and thank you very much @steadfasterX , Good job bro ! :good:

[DEBLOAT] Wileyfox Debloater - Quickly clean your Nougat-based Wileyfox device!

Hey all!
As you all know, Wileyfox has started rolling out Nougat for their devices, starting with the codenamed marmite family (Swift 2, 2 Plus and 2X models). With this new update, Wileyfox has also included a bunch of BLOATWARE I personally NEVER expected from them. I mean, I didn't request ads in my launcher, and why do I need to forcefully use Truecaller dialer instead of the cleaner, AOSP-based one? That's why I've created this Wileyfox Debloater tool, to keep the system apps as clean and stockish as possible.
App removals included:
- AndroidPay
- BasicDreams
- BookmarkProvider
- Google Books
- Chrome
- CMFileManager
- Drive
- Duo
- Gmail
- GooglePrintRecommendationService
- GoogleTTS
- Hangouts
- Keep
- Maps
- Google Music
- News and Weather
- PhotoTable
- talkback
- Google Videos
- WFChromeCustomization
- Youtube
- Contacts
- FoxHole
- Mms
- SnapdragonGallery
- TrueCaller
- All bundled-apps from /system/vendor/bundled-app
- Possibly more in the future.
(Note: All the moved Google Apps were removed for the sole reason that they can also be downloaded from the Play Store.)
App additons / other features included:
- Google Contacts, in replacement of the half-dummy, prebundled Contacts app (which was missing link with the Dialer).
- Google Dialer, in replacement of TrueCaller.
- Google Messages, in replacement of Wileyfox Mms app.
- AOSP's Launcher3, in replacement of FoxHole (Wileyfox's Launcher).
- Framework and permission files for Google Dialer to work.
- Small tweaks in the build.prop, including drop of min processors to work from 2 to 1, and rise of maximum processors to work from 4 to 8, as well as increasing the Android compiler default amount of processors from 4 to 6.
- Possibly more in the future, too.
Warning:
Code:
Your device's system partition [B]IS NOW [COLOR="Red"]TAMPERED[/COLOR][/B]. This implies two things:
1. You WILL NOT BE ABLE TO INSTALL ANY NEWER OTAs ON IT.
(To learn how to properly upgrade your device, kindly check post [URL="https://forum.xda-developers.com/swift-2/development/debloat-wileyfox-debloater-quickly-t3587536/post72258926#post72258926"]#25[/URL])
2. Your device MAY NOT BE ABLE TO BOOT UNLESS YOU DISABLE DM-VERITY.
(And to do so, the quickest way is to [B]install[/B] [B][URL="https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445"]Magisk[/URL][/B].)
Downloads:
- For the latest Wileyfox Swift 2, Swift 2 Plus and Swift 2X firmware: Wileyfox-TOS118C-Debloater--11-05-17.zip
(For version TOS089 check Wileyfox-TOS089-Debloater--10-04-17.zip)
- For more Wileyfox devices, coming soon
Installation instructions:
1. Update your device to Nougat
2. Unlock your bootloader and flash TWRP
3. Download the latest version zip
4. Boot into TWRP, make a backup if you wish (although is highly recommended), choose Install and locate and flash the ZIP.
5. Reboot and enjoy!
6. Are you missing missed calls notifications? Is the caller ID always showed as a number instead of a contact name during phone calls? Check post #16!
Uninstall instructions:
Check post #6
Enjoy, and don't forget to leave a Thanks if you loved it!
I'm also dissapointed that the OS is far from the pure AOSP.
But it is possible to tweak it without losing the future OTAs:
1. Install google launcher, google messenger
2. Install google phone from apk mirror - this version is working on my phone - http://www.apkmirror.com/apk/google...-7-0-140861421-nonnexus-android-apk-download/
3. Deactivate truecaller, duo, news, ... - but be careful, some apps are needed for the system and remember to activate all apps before the OTA update...
rivierakid said:
I'm also dissapointed that the OS is far from the pure AOSP.
But it is possible to tweak it without losing the future OTAs:
1. Install google launcher, google messenger
2. Install google phone from apk mirror - this version is working on my phone - http://www.apkmirror.com/apk/google...-7-0-140861421-nonnexus-android-apk-download/
3. Deactivate truecaller, duo, news, ... - but be careful, some apps are needed for the system and remember to activate all apps before the OTA update...
Click to expand...
Click to collapse
That is also a possibility but:
1. Launcher3 conflicts with the already installed launcher, so it's impossible to get that out of the way
2. I got latest version working here using the required libraries (extracted from a Pixel), so yeah, probably both possibilities are just fine
And for the third one, just wanted to say there's no need to reactivate them (if you manage to deactivate them, ofc), and, all of the packages the script moves are stored in a safe place (/system/__bloat), so they can be restored from there
I don't remember if I had a problem with a previous OTA update for Wileyfox, but I was not able to install an update without reactivation a disabled app.
I'm not sure...
You could select a default launcher and the phone has really enough RAM, so I think it is not necessary to remove the FoxHole from the system.
But anyway, nice work! You could provide an uninstall instructions - if it is really possible. I hope that there can be an OTA update in the future...
The final solution for this is LineageOS, if they provide the source
Excellent! Thanks for providing this...such a stupid shame that Wileyfox decided to do this. I'm just hoping that they now release their sources so that we can start working on a proper release of Lineage!
*Edit: Nice! https://bitbucket.org/wileyfox/kernel-wileyfox-msm8937/commits/all*
JT
rivierakid said:
But anyway, nice work! You could provide an uninstall instructions - if it is really possible. I hope that there can be an OTA update in the future...
Click to expand...
Click to collapse
Of course. The debloater doesn't delete any of your system apps, but move them to /system/__bloat. There you'll find 3 folders, the app, the priv-app and the vendor one, just cut and paste them back to /system and the deleted apps will come back. Also, don't forget to remove the framework files and permissions the debloater installs, such as /system/framework/com.google.android.dialer.support.jar and /system/etc/permissions/com.google.android.dialer.support.xml. You can also remove the the GoogleContacts, GoogleDialer, GoogleMessages and Launcher3 folders from /system/priv-app, and revert the build.prop tweaks (lines 164 and 165, change values from 1 and 8 to 2 and 4, line 196, change value from 6 to 4).
Reverting all of that, your system will go back as it came with the Nougat OTA.
Hello,
thanks for your effort to the community.
I have a question.
How do I install this? I've tried it with twrp but everytime I install twrp my device won't boot.
To repair this I flashed the newest "system.img".
But I can't replace my stock recovery.
linuxct said:
Of course. The debloater doesn't delete any of your system apps, but move them to /system/__bloat. There you'll find 3 folders, the app, the priv-app and the vendor one, just cut and paste them back to /system and the deleted apps will come back. Also, don't forget to remove the framework files and permissions the debloater installs, such as /system/framework/com.google.android.dialer.support.jar and /system/etc/permissions/com.google.android.dialer.support.xml. You can also remove the the GoogleContacts, GoogleDialer, GoogleMessages and Launcher3 folders from /system/priv-app, and revert the build.prop tweaks (lines 164 and 165, change values from 1 and 8 to 2 and 4, line 196, change value from 6 to 4).
Reverting all of that, your system will go back as it came with the Nougat OTA.
Click to expand...
Click to collapse
Any chance of updating debloater to change the UI colour scheme from orange back to blue?
JT
MCPoppa said:
I have a question.
How do I install this? I've tried it with twrp but everytime I install twrp my device won't boot.
To repair this I flashed the newest "system.img".
But I can't replace my stock recovery.
Click to expand...
Click to collapse
Try downloading version 3.0.2-0 from TWRP download website, and flash it via the command
Code:
fastboot flash recovery <name-of-the-file>.IMG
Replacing name of the file for the actual filename of it. To enter fastboot mode, you should see a warning when you boot up your device. Hit any volume keys, and, using them, choose the fastboot mode and select it with the power key. Now you should be able to use the fastboot commands.
jdtanner said:
Any chance of updating debloater to change the UI colour scheme from orange back to blue?
JT
Click to expand...
Click to collapse
I'm already working on it... But it'll surely require substratum, which probably won't work out of the box just by flashing it from the recovery. I'm looking for solutions
linuxct said:
Try downloading version 3.0.2-0 from TWRP download website, and flash it via the command
Code:
fastboot flash recovery <name-of-the-file>.IMG
Replacing name of the file for the actual filename of it. To enter fastboot mode, you should see a warning when you boot up your device. Hit any volume keys, and, using them, choose the fastboot mode and select it with the power key. Now you should be able to use the fastboot commands.
I'm already working on it... But it'll surely require substratum, which probably won't work out of the box just by flashing it from the recovery. I'm looking for solutions
Click to expand...
Click to collapse
Everytime i installed twrp i got stuck in a bootloop :/
MCPoppa said:
Everytime i installed twrp i got stuck in a bootloop :/
Click to expand...
Click to collapse
Okay, can you try doing "fastboot boot" and the name of the image instead of flashing it? It will avoid bootloops, since it just boots to the image. Keep me posted, please.
linuxct said:
Okay, can you try doing "fastboot boot" and the name of the image instead of flashing it? It will avoid bootloops, since it just boots to the image. Keep me posted, please.
Click to expand...
Click to collapse
Still doesnt let me boot up after I installed your debloat zip.
Everytime I install or boot to twrp 3.1.0 or 3.0.2 for marmite i get a boot loop and a "dm-verity .." screen.
I've tried different versions of twrp and different methods like "fastboot flash" and "fastboot boot" but everytime I flash something it gets stuck on booting up.
When I was on Marshmello I had this "dm-verity" message too but I could modify my system as I wanted and it booted up everytime, i had TWRP, your Speakermod, Magisk Mask etc installed no problem.
I think it has something todo with the update to Nougat.
How did you bring it run on your device?
MCPoppa said:
Still doesnt let me boot up after I installed your debloat zip.
Everytime I install or boot to twrp 3.1.0 or 3.0.2 for marmite i get a boot loop and a "dm-verity .." screen.
I've tried different versions of twrp and different methods like "fastboot flash" and "fastboot boot" but everytime I flash something it gets stuck on booting up.
When I was on Marshmello I had this "dm-verity" message too but I could modify my system as I wanted and it booted up everytime, i had TWRP, your Speakermod, Magisk Mask etc installed no problem.
I think it has something todo with the update to Nougat.
How did you bring it run on your device?
Click to expand...
Click to collapse
I explained it last night here, but I also stated it in the OP:
linuxct said:
Warning:
Code:
Your device's system partition [B]IS NOW [COLOR="Red"]TAMPERED[/COLOR][/B]. This implies two things:
1. You WILL NOT BE ABLE TO INSTALL ANY NEWER OTAs ON IT.
[B]2. Your device MAY NOT BE ABLE TO BOOT UNLESS YOU DISABLE DM-VERITY.[/B]
(And to do so, the quickest way is to [B]install[/B] [B][URL="https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445"]Magisk[/URL][/B].)
Click to expand...
Click to collapse
linuxct said:
I explained it last night here, but I also stated it in the OP:
Click to expand...
Click to collapse
Thanks, i've installed magisk mask again and the message didn't appeared.
I've also flashed your debloater and everything works fine.
Can I now flash TWRP or do I have to boot it up via fastboot everytime?
MCPoppa said:
Thanks, i've installed magisk mask again and the message didn't appeared.
I've also flashed your debloater and everything works fine.
Can I now flash TWRP or do I have to boot it up via fastboot everytime?
Click to expand...
Click to collapse
Try flashing it to your recovery partition, my guess is that now that DM-verity is disabled everything should work fine
Cheers!
Quick update post after two days of usage, yesterday I noticed I didn't receive any notifications on missed calls, and that the caller ID always showed as a number although I had it added as a contact.
I realised that I didn't have any "Phone" app chosen as default in Android settings, so I was missing those notifications until I opened the Google Dialer app.
In case it happens to you, to sort it out go into Settings > Apps, then hit the gear in the top right corner and make sure you've a config similar to this one (Launcher3, Google's "Phone" and Google's "Messages" chosen as default Home, Phone and Messaging apps).
I hope this is clear for everyone, since it's not something I can fix on my side/requires the user to do the change
I have TWRP, SuperSU, and Magisk. Marshmallow boots with no problem, but I get the dm-verity screen on boot with the message "dm-verity is not started in enforcing mode".
Does this mean dm-verity is disabled because it is not enforcing, or do I need to do something to stop the whole dm-verity screen appearing before I can successfully upgrade, debloater, and boot Nougat?
Ianharding said:
I have TWRP, SuperSU, and Magisk. Marshmallow boots with no problem, but I get the dm-verity screen on boot with the message "dm-verity is not started in enforcing mode".
Does this mean dm-verity is disabled because it is not enforcing, or do I need to do something to stop the whole dm-verity screen appearing before I can successfully upgrade, debloater, and boot Nougat?
Click to expand...
Click to collapse
Firsts things first: After heavily modding the system like you did on Marshmallow, make sure not to update your device through the regular OTA but using a recovery image like the ones posted in this device's forum.
For magisk: are you sure you flashed it correctly? Magisk disables that dmverity message you are mentioning, so maybe you installed an old version or wasn't properly flashed.
My advice is: download everything: the recovery image, the debloater and Magisk. Boot into TWRP, wipe EVERYTHING if possible, including Data cache dalvik cache and system partitions. Once done, flash the recovery image zip, and right after that, without rebooting, flash the debloater and magisk. Reboot and everything should work perfectly
If I use this to debloat my WileyFox does it mean I won't be able to use Android Pay?
digidude512 said:
If I use this to debloat my WileyFox does it mean I won't be able to use Android Pay?
Click to expand...
Click to collapse
As soon as you root any Marshmallow/Nougat phone Android Pay will not work, according to this article
I have never used Android Pay so it doesn't make any difference to me. My phone is much better now that I have debloated it. I also installed Evie Launcher and Halo Browser, both small minimalist apps and everything is really smooth.
Instead of a Debloater, could the Stock ROM not be debloated and rezipped as a custom 'Lite' version?

[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

Categories

Resources