[G3 Android Development] Zirila:
Guide: Install Fulmics 7.0, magisk root, Xposed framework & encryption on d855 phone

Guide: Install Fulmics 7.0 rooted with magisk and Xposed framework on a d855 with internal data/sdcard encryption:

A few things to know first:

- it is assumed your phone is already rooted and the latest TWRP is installed!

- encryption does not work out of the box if the phone is rooted (either with SuperSU or Magisk - doesn't matter, see previous post here: https://xdaforums.com/lg-g3/develop...b-ota-v30b-t3304556/post68808960#post68808960 if interested)

- to make encryption possible you need to unroot your phone first (remove Magisk / SuperSU)

- Encryption will work if you start it on the unrooted phone

- Re-Root takes place after phone encryption finished successfully.

- it helps a lot to have an external sdcard in your phone with all the necessary files for installation. otherwise you might have to work with sideload after encryption, because TWRP cannot access /data partitions and internal sdcard after encryption.

If you install Fulmics 7.0 from scratch it is recommended to wait with the installation of backupped apps/data and xposed framework until the phone is successfully encrypted. Otherwise you will have to do it twice, so save your time and wait.

Here's a short but verbose how-to:

1. Install Fulmics 7.0 from TWRP, choose Magisk as Root option (or leave it un-rooted if this is possible - i don't know right now) and start it once to setup all the basic stuff. Then you're done.

2. un-root your phone.

in case of magisk, the things you need are in: FulmicsROM-7.0.zip\additions\magisk (fulmics_helper.zip, magisk.zip, magisk_uninstaller.zip). Best way is to copy these on your external sdcard. Boot to Recovery and in TWRP flash magisk_uninstaller.zip to un-root the phone.

3. Before you start it is good to have a logcat running to see what happens. To do so:

- enable USB Debugging in Developer Options in the Settings (no developer settings? -> goto settings/about phone/software-information tap Build-Number about 7x times, then it should be there)

- install adb.exe on your pc (google for something like "Minimal ADB and Fastboot")

- connect your phone with your pc, acceppt fingerprints for connection.

- in a command prompt type "adb.exe logcat". Then you'll see what happens on your phone live, e.g. encryption on boot.

4. Now you're ready to encrypt the phone.

Select the full disk enryption option in settings/security (all internal /data and internal sdcard should be encrypted, but not the external SD (<- this could be done at a later time)). Choose a password/key/whatever and let it start.

The phone will restart and you should see what happens on the phone in your adb logcat console windows, while only the boot logo is shown.

After a while there should come up the white screen with a green android logo and it shows the encryption process. It might take an hour or two so be patient. After that you should be able to start up your phone normally with the encryption key.

5. Re-Rooting the phone.

Go back into Recovery and install Magisk again by flashing the magisk.zip (see above). Right after that flash fulmics_helper.zip. You can start up your phone to see if it worked and if it is rooted again by opening the magisk app.

6. Install xposed Framework.

In case of root by magisk we need a special version of the xposed framework to work.

You find all the details and files in these threads:

https://xdaforums.com/xposed/unofficial-systemless-xposed-t3388268

https://xdaforums.com/xposed/material-design-xposed-installer-t3137758

You should end up having files like these three:

XposedInstaller_by_dvdandroid_29_04_17.apk

xposed-uninstaller-topjohnwu-20160820.zip (for troubleshooting to be able to uninstall it)

xposed-v87.0-sdk23-topjohnwu.zip

While your phone is still running, install the XposedInstaller_by_dvdandroid_29_04_17.apk app first.

Then boot back to recovery TWRP and install xposed-v87.0-sdk23-topjohnwu.zip. Reboot the phone.

It should take a while because the dalvik cache is being rebuild.

After that, check the xposed installer app if the framework is correctly running. If so, you can now install or activate all the other xposed modules you want.

6. Now that the phone is 1) encrypted, 2) rooted, 3) xposed framework enabled you can safely continue to install all your other apps and data or use the backups/backup-apps of your liking. You can even restore the data of system-apps if you have backups (oandbackup/titanium backup/etc) to get back to the point where you were before upgrading the phone.

Hope I could help the ones who try to have the same setup.

cheers