[RECOVERY] (Un-)tethered TWRP 2.8.7.0 for Asus ZenFone 2 (x86) - ZenFone 2 Android Development

Hi folks,
finally we compiled a(n un-)tethered TWRP package for our ZenFone 2 (confirmed on ZE551ML and ZE500ML)!
!!! NOTE: If you want to apply a new OTA update, please flash stock recovery first !!!
Also, if you encounter any errors with the official recovery by TeamWin, please don't ask for support here as this is an unofficial build (done with the hard work of many people collaborating in a great manner!)​
If you don't want to unlock your Bootloader, you can use the tethered recovery.
Tethered (=after a reboot everything is back to normal)​
Features:
- Compiled with CM12 sources (although CM12 and TWRP are not liking each other very much :silly: )
- Optimized for x86 (smooth UI now)
- internal and external storages are mounted correctly
- Backup of boot, system, cache and data possible
- Full Crypto and SELINUX support
Bugs:
- Sometimes Backup and Restore hang. Fortunately it doesn't begin these operations so you don't brick your device (any hints on this are welcome!)
- USB Storage mount doesn't appear to work at all (pretty sure I took the correct path to the LUN file)
How to use:
- Download the tethered CWM package from here (method 2): http://forum.xda-developers.com/zenfone2/general/root-newbie-root-instructions-zenfone-2-t3114063
- replace the recovery.zip in "CWM_Zenfone_2_IntelFB_RecoveryLauncher" with the one you can find in the download section
- start the procedure by using cai_dat_CWM.bat
- type ACCEPT (case sensitive!) and enter
- type T4 and enter
- Set your timezone when booting the first time into the Recovery, maybe this fixes the backup and restore bug (needs to be done just once)
- Unplug your USB cable from the device, too, before flashing, backing up and/or restoring
Untethered (=permanent recovery)​
Features:
- Compiled with CM12 sources
- Optimized for x86 (smooth UI now)
- internal and external storages are mounted correctly
- Backup of boot, system, cache and data possible
- Full Crypto and SELINUX support
- kernel compiled dynamically (thanks to @crpalmer and @jrior001 and all involved for their fantastic work) with permissive Selinux
- USB-OTG support added (Beta supports NTFS file systems)
- Splashscreen can be backed up (to fiddle around and create your own)
- img files flashable now via recovery (thanks to @cangcan, @yakub234go and @vampirefo)
- F2FS support on kernel side
Drawbacks:
- MTP doesn't work
How to use:
Method 1
Get root rights
Unlock your bootloader
Download twrp.img from the download section and put on sd card (or pick the beta version for NTFS support)
Fire up adb or install a terminal emulator and type:
Code:
su
dd if=/sdcard/twrp.img of=/dev/block/by-name/recovery
reboot recovery
Method 2
Download twrp.img from the download section and put in your adb/fastboot directory
Unlock your bootloader
Boot into bootloader (turn off, keep Vol+ pressed and press the power button until it vibrates - then release ONLY the power button and keep volume up pressed until you see the fastboot GUI
Open up fastboot on your PC and type:
Code:
fastboot flash recovery twrp.img
Then press vol down 2 times until "Reboot recovery" shows up and press power 1 time to boot into recovery
Method 3 (if you have an older version of TWRP already installed)
Place img on your internal sdcard, then reboot to recovery, click install zip, then select "Images..." in bottom right, then you see the img. Tick "Recovery" afterwards and then on OK.
Download folder:
Gone
Cheers!
Credits
@social-design-concepts for the great tethering method and the brilliant support and guidance :good:
@vampirefo also his support and guidance :good:
@updateing for the link to the commit for x86 pixelflinger
@jrior001 and @crpalmer for the great work on the kernel source
etc. etc.
Special thanks:
@Drew442 Thanks for the contribution!
Amir J. - thank you too!
TeamWin for their great recovery
XDA:DevDB Information
[RECOVERY][LOLLIPOP ONLY] (Un-)tethered TWRP 2.8.7.0 for Asus ZenFone 2 (x86), Tool/Utility for the Asus ZenFone 2
Contributors
TheSSJ, social-design-concepts, vampirefo, updateing, crpalmer, jrior001, knoneNull, etc etc
Source Code: https://github.com/TheSSJ/device_asus_zenfone2
Version Information
Status: Stable
Current Stable Version: 21_f2fs
Stable Release Date: 2015-07-02
Created 2015-06-04
Last Updated 2016-09-24

Update 07-02-2015
ADB sideload works now (thanks @jrior001 & @crpalmer)! Make sure to download the latest ADB version: http://forum.xda-developers.com/showthread.php?p=42407269, credits for this to @shimp208
Update 06-30-2015
NTFS Support tested extensively and proved to be stable (not elegant, but functional)
Added recovery partition back to recovery.fstab to make it flashable via recovery itself
Update 06-28-2015
Moved to stable state
Added Beta version for NTFS support (twrp_ntfs.img)
Update 06-23-2015b
Upgraded source to TWRP 2.8.7.0
Update 06-23-2015
Functional TWRP with fast wipe/restore (-DNO_SECURE_DISCARD, thanks crpalmer)
ADB works
Just have fun in fiddleing around with the recovery
If no bugs will be reported we can declare this recovery stable
Update 06-10-2015
Boardconfig parameters changed, seems to back up, restore and flash even with USB cable attached
Update 06-04-2015b
Rolled back to 2.8.5.0 as restoring threw out the error that system was not being able to mount rw
Everything works now!
Update 06-04-2015
Built a version optimized for x86, fixes UI lags
Added Crypto Support again
Update 06-02-2015b
Removed TW_INCLUDE_CRYPTO flag as it caused backup operation to freeze
Update 06-02-2015
Moved to Beta stage
Fixed mounting of external SD
Update 06-01-2015
Completely reworked BoardConfig.mk
Removed all modules
Added @vampirefo 's adbd and adbd-recovery binaries from his TWRP builds (dunno why, but there aren't any binaries in my builds?) - thanks!
Graphics work now (still slow, need to fine tune with the correct boardconfig flags), no double backups, no flickering!
Update 05-31-2015
Included USES_ION flag into boardconfig.mk
Removed cpu temperature to reduce redraws
a little more stable now!

Nice I can't wait for the BL to be fully unlocked so we van get native TWRP.

Hello recovery or rest and it just temporary? thank you

jejemc said:
Hello recovery or rest and it just temporary? thank you
Click to expand...
Click to collapse
Hi,
yes, after rebooting no trace of TWRP is left
I have updated the zip now. It is a little stabler after I removed the CPU temperature, but still I have the feeling there are 2 GUIs sharing the same screen. Weird - I have to do more research - maybe I have to write my own UI updater...
Cheers

the gears are slowly moving! i hope BL gets unlocked by the time my ZF2 arrives..
is this for any ZF2 variant or just 551ML (4gb ram/2gb ram versions)?
thanks for taking the time with this (hopefully) awesome device!

This is awesome..thanks for your contribution! I am hoping for some custom roms..the stock ZenUI isn't the greatest :/

TheSSJ said:
Hi folks,
I managed to compile a tethered TWRP package for our ZenFone 2!
Click to expand...
Click to collapse
Do you have a link to your device repo?
Are there specific instructions for using it to build a tethered recovery (I'm familiar with building twrp, including within CM, but I haven't looked much into what the tethered exploit does to boot the recovery).

It seems I have successfully completed a Backup! As mentioned, the interface is painfully slow at times, but this is serious progress. Has anybody tried restoring a backup yet?

Could you please develop twrp or cwm for asus 450cg

NOTE:
1 backup successfully
2 Use Very lag
3 flash zip not work

crpalmer said:
Do you have a link to your device repo?
Are there specific instructions for using it to build a tethered recovery (I'm familiar with building twrp, including within CM, but I haven't looked much into what the tethered exploit does to boot the recovery).
Click to expand...
Click to collapse
Hi,
unfortunately I don't have any. Basically I wrote a BoardConfig.mk based on the data provided by the Nexus Player (Asus Fugu, which is also Intel based). Then I took 2 modules (one for the display and one for the support of exfat partitions) and compiled a normal TWRP. The output folder holds the compiled img as well as the ramdisk in a simple folder. I put the ramdisk content into a simple zip file and included an update-script to have it unpacked properly. What the recovery-trigger exactly does is not clear to me. It seems it temporarily overwrites the logcat binary with itself and then gets executed at a reboot directly. The recovery trigger just unpacks the zip and executes the recovery binary if I understood correctly.
If you want I can upload my device configuration, it's better if there are more ppl looking at this
29y6145 said:
NOTE:
1 backup successfully
2 Use Very lag
3 flash zip not work
Click to expand...
Click to collapse
Thanks for the feedback!
2. Yeah, the lags are a pain, also because it seems to execute every touch twice and I don't know how to fix this at the moment (maybe it is sufficient to increase the time to determine when a longpress is executed and when a normal touch is done, but this is strongly theoretical.
3. I tested flashing a zip and it does work, which error message do you get?
Anyways, today is a new day, so I will get to work on this (I am on vacation right now fortunately).
Cheers!

TheSSJ said:
Hi,
unfortunately I don't have any. Basically I wrote a BoardConfig.mk based on the data provided by the Nexus Player (Asus Fugu, which is also Intel based). Then I took 2 modules (one for the display and one for the support of exfat partitions) and compiled a normal TWRP. The output folder holds the compiled img as well as the ramdisk in a simple folder. I put the ramdisk content into a simple zip file and included an update-script to have it unpacked properly. What the recovery-trigger exactly does is not clear to me. It seems it temporarily overwrites the logcat binary with itself and then gets executed at a reboot directly. The recovery trigger just unpacks the zip and executes the recovery binary if I understood correctly.
If you want I can upload my device configuration, it's better if there are more ppl looking at this
Thanks for the feedback!
2. Yeah, the lags are a pain, also because it seems to execute every touch twice and I don't know how to fix this at the moment (maybe it is sufficient to increase the time to determine when a longpress is executed and when a normal touch is done, but this is strongly theoretical.
3. I tested flashing a zip and it does work, which error message do you get?
Anyways, today is a new day, so I will get to work on this (I am on vacation right now fortunately).
Cheers!
Click to expand...
Click to collapse
If you can upload the device config to github I can try to take a look tonight or tomorrow and see if I can see anything wrong that would explain your "double ui".
Either way, it is good to upload it as you'll have a history saved of when it last worked if you screw it all up!

TheSSJ said:
Hi,
unfortunately I don't have any. Basically I wrote a BoardConfig.mk based on the data provided by the Nexus Player (Asus Fugu, which is also Intel based). Then I took 2 modules (one for the display and one for the support of exfat partitions) and compiled a normal TWRP. The output folder holds the compiled img as well as the ramdisk in a simple folder. I put the ramdisk content into a simple zip file and included an update-script to have it unpacked properly. What the recovery-trigger exactly does is not clear to me. It seems it temporarily overwrites the logcat binary with itself and then gets executed at a reboot directly. The recovery trigger just unpacks the zip and executes the recovery binary if I understood correctly.
If you want I can upload my device configuration, it's better if there are more ppl looking at this
Thanks for the feedback!
2. Yeah, the lags are a pain, also because it seems to execute every touch twice and I don't know how to fix this at the moment (maybe it is sufficient to increase the time to determine when a longpress is executed and when a normal touch is done, but this is strongly theoretical.
3. I tested flashing a zip and it does work, which error message do you get?
Anyways, today is a new day, so I will get to work on this (I am on vacation right now fortunately).
Cheers!
Click to expand...
Click to collapse
Is your problems due to recovery or modules you added? My tethered twrp doesn't have the problems yours does, so I wonder if it's the modules, your packaging perhaps and not the recovery?
Sent from my T1 using Tapatalk

TheSSJ said:
- Slow graphics, according to @Dees_Troy: "The graphics are a bit laggy because pixelflinger is not very well optimized for x86"
Click to expand...
Click to collapse
Dees_Troy is lying. TWRP graphic engine isn't optimized for any architecture. Even on my SGS4 (ARM) it's slow as snail. Higher resolution - more slower. I see, they've added some code for Qualcomm overlay support. I didn't try it yet, but support only for one CPU manufacturer is nothing. Especially, there is another way to accelerate at around 1000% by SIMD instuctions. Although i've liked TWRP originally, i see developers have no intentions to improve graphics which is the key feature. So, i've decided to throw away TWRP and look at Aroma File Manager.
It has very fast graphics engine with ARM NEON optimization (and with some effort it become SSE4.2 optimized). The only feature missing is backup/restore, but i'm working on that. Actually, Backup/Restore works now. Just thinking about better backup format.

sorg said:
Dees_Troy is lying. TWRP graphic engine isn't optimized for any architecture. Even on my SGS4 (ARM) it's slow as snail. Higher resolution - more slower. I see, they've added some code for Qualcomm overlay support. I didn't try it yet, but support only for one CPU manufacturer is nothing. Especially, there is another way to accelerate at around 1000% by SIMD instuctions. Although i've liked TWRP originally, i see developers have no intentions to improve graphics which is the key feature. So, i've decided to throw away TWRP and look at Aroma File Manager.
It has very fast graphics engine with ARM NEON optimization (and with some effort it become SSE4.2 optimized). The only feature missing is backup/restore, but i'm working on that. Actually, Backup/Restore works now. Just thinking about better backup format.
Click to expand...
Click to collapse
tar is the best.
Sent from my T1 using Tapatalk

vampirefo said:
tar is the best.
Sent from my T1 using Tapatalk
Click to expand...
Click to collapse
I know. The problem is how to split the archive. Currently i split by size. In this case you cannot use parts independently. For example, if you want to extract some file, you have to concatenate whole backup first and then extract.
The better way is to split tar at header boundary but so far in many decades of years nobody created such split tool. Also, if there is a file bigger than desired part size, it won't be split and may even produce error if target disk (where backup is saving to) is FAT and file size is bigger than 4GB (extreme case).

sorg said:
Dees_Troy is lying. TWRP graphic engine isn't optimized for any architecture. Even on my SGS4 (ARM) it's slow as snail. Higher resolution - more slower. I see, they've added some code for Qualcomm overlay support. I didn't try it yet, but support only for one CPU manufacturer is nothing. Especially, there is another way to accelerate at around 1000% by SIMD instuctions. Although i've liked TWRP originally, i see developers have no intentions to improve graphics which is the key feature. So, i've decided to throw away TWRP and look at Aroma File Manager.
It has very fast graphics engine with ARM NEON optimization (and with some effort it become SSE4.2 optimized). The only feature missing is backup/restore, but i'm working on that. Actually, Backup/Restore works now. Just thinking about better backup format.
Click to expand...
Click to collapse
@Dees_Troy actually is not lying pixelflinger_static isn't optimize for x86 and Intel used to add libenc to speed up pixelflinger a little, intel later decided to use the more recent version of libminui cause it doesn't use pixelflinger_static and from what i read it a whole lot faster. i imagine @Dees_Troy and team-win are looking into moving away from pixelflinger because of it's draw backs but that is a very big task.
i plan to build against the windriver android-5.0.0_r2.0.1 source this evening cause it includes the icc tool chain when i built the new recovery.launcher against it , it was much much much much much faster hope it has the same affect on twrp

vampirefo said:
Is your problems due to recovery or modules you added? My tethered twrp doesn't have the problems yours does, so I wonder if it's the modules, your packaging perhaps and not the recovery?
Sent from my T1 using Tapatalk
Click to expand...
Click to collapse
I assume maybe I am missing some modules. There is a .ko file named fps_throttle...this led me to the conclusion that maybe the framerate is awefully high (or awefully low ), which could explain this flickering text maybe...
I will include all of the modules in my next build to see if it works better, thanks for the tip!

social-design-concepts said:
@Dees_Troy actually is not lying pixelflinger_static isn't optimize for x86
Click to expand...
Click to collapse
I think, you've missed the point. I've said current TWRP graphics isn't optimized for ALL platforms (besides very specific Qualcomm overlay which i had no chance to try). Nothing to do with x86. Even on ARM device it's very slow. In several years of TWRP existence, i didn't see any progress in GUI, so i don't hope it will be changed anytime soon.
From other side, Aroma File Manager uses NEON(which can be translated to SSE) optimization making interface very fast. Thus, you don't need any special compiler. But due to very different internal GUI engines, it's hard to port TWRP to Aroma GUI. Using 3rd party compiler give you other problems if you try to compile something requiring Android NDK.
Anyway, let me know if your approach with different compiler will make rocket from snail TWRP GUI

Related

[RECOVERY] TWRP 2.6.3.0 touch recovery [2013-09-16]

Team Win Recovery Project 2.x, or twrp2 for short, is a custom recovery built with ease of use and customization in mind. It’s a fully touch driven user interface – no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Phone look:
Tablet look:
CHANGELOG for 2.6.3.0:
-Proper backup and restore of SELinux contexts (thanks to Tassadar)
-Pull in some ROM information for backup name generation
-Merge all recent patches from AOSP bringing TWRP up to date with Android 4.3
-Add 1200x1920 theme (thanks to Tassadar)
-A few other fixes and tweaks
CHANGELOG for 2.6.1.0:
-Initial SELinux support (only a few devices, need testers so come by IRC if your device doesn't have it and needs it)
-Initial support for f2fs file system formatting (Moto X)
-Update SuperSU install for 4.3 ROMs
-Fixed a permissions bug on files created during backup
-Fixed a bug that caused TWRP to not wait for compressed backups to finish causing 0 byte files and md5sums to not match
-Fixed decryption of encrypted data so that both TouchWiz and AOSP decryption are possible
-Ignore lost+found folder during backup and size calculations
-Various other minor bug fixes and tweaks
CHANGELOG for 2.6.0.0:
Special Note: If you are running a custom theme, you will likely need to remove that theme before updating to 2.6.0.0 as your custom theme will likely not have some of the new changes visible (e.g. you won't be able to encrypt a backup)!
-Can encrypt a backup to prevent theft of private data from your backup files
-Updated graphics / icon courtesy of shift
-Updated exFAT to latest commits
-Fixed a problem with Samsung TouchWiz decryption
-Update SuperSU binary
-Fixed saving of backup partitions list
-Fixed saving of last used zip install folder
-Fixed backup of datadata on devices that use a separate partition for datadata
-Fixed some issues with the advanced wipe list (android_secure, can now wipe internal storage on data/media deivces and wipe data on the advanced list no longer formats the entire data partition)
-Fixed some problems with partitioning a SD card
-Various other bug fixes and tweaks
Notes about encrypted backups:
Why encrypt your backups? -- Most people store their backups on the device. Any app that has permission to access storage could potentially read your backup files and try to harvest your data. Encrypted backups also provide an added layer of security if you move your backups to other storage devices or to the cloud. The encryption that we're using is probably not strong enough for enterprise level security, but should be strong enough to make it significantly difficult to get to your data.
Encryption is using OpenAES which uses AES 128-bit cbc encryption. If you happen to use a longer password (over 16 characters) then the encryption strength improves to 192 or 256 bits. Do not forget your password. If you forget your password you will be unable to restore your backup. We don't encrypt the entire backup. Encryption is very CPU intensive and can be fairly slow even when we spread the workload over multiple cores even on the latest high-end devices. To ensure that encrypted backups don't take forever, we don't encrypt any other partitions besides /data and in /data we don't encrypt /data/app (or other app related directories where apks are stored) and we don't encrypt dalvik cache.
DOWNLOAD:
The fastest and easiest way to install TWRP is to use the GooManager app:
Play Store Link
Direct Download
1) Install GooManager from the Play Store
2) Open GooManager and provide root permissions
3) Hit Menu (or the button with the 3 dots on your screen) and then Install OpenRecovery
OR:
You can find more information and download links on our website!
BUGS:
If you have found a bug, please consider posting it to our github issues log. It's pretty much impossible for us to keep up with the more than 40 threads that we have for the devices that we "directly" support. If you have a significant problem that cannot be answered in this thread, your best bet is to PM me directly, contact us via our website, or find us in our IRC channel below. If you see someone that's struggling, feel free to point it out to us. We need your help to help us keep track of all of our devices! Thanks!
SUPPORT:
Live support is available via #twrp on Freenode with your IRC client or just click this link.
Reserved.
Dees_Troy said:
This has been available for a little while, but now I'm adding an official thread for it here on XDA.
Team Win Recovery Project 2.3, or twrp2 for short, is a custom recovery built with ease of use and customization in mind. It’s a fully touch driven user interface – no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Phone look:
Tablet look:
CHANGELOG for 2.3.1.0:
-Unmount system after boot to prevent some status 7 symlink failed errors on zip install
-USB Mass Storage code improvements
-Better handling of mounting storage during boot for some devices
-Fixed a problem with sizes of images (boot & recovery) after resetting defaults
-Fixed size errors during backup for some devices on recovery, etc.
-Fixed a problem with restoring backups when multiple archives were present
CHANGELOG for 2.3.0.0:
-Rebased onto AOSP Jelly Bean source code
-Rewrote backup, restore, wipe, and mount code in C++ classes for easier maintenance going forward
NOTE: backups from prior versions of TWRP are still compatible with 2.3
-ADB sideload functionality from AOSP is included in 2.3, see this link for more info
-Re-wrote fix permissions entirely in C++ and runs in a few seconds instead of a few minutes (thanks to bigbiff)
-Improvements to zip finding in OpenRecoveryScript (should be a lot fewer GooManager automation issues)
-Faster boot times
-Added charging indicator while in recovery (only updates once every 60 seconds)
While this update may not bring a host of new must-have features, this update is a significant re-write of much of the core TWRP code. AOSP Jelly Bean recovery source moved to mostly C++ code and now all of the "TWRP" code is fully rewritten into C++ as well. Now that we've laid this groundwork, we're in a much better position to pull in future AOSP recovery updates as well as implementing more great new features.
Since TWRP 2.3 is based on AOSP jelly bean sources, TWRP now uses recovery API 3 instead of 2. Some zips may no longer work if the developer is using an out-of-date update-binary. This API change should not be a problem on newer devices, but older devices will probably encounter several zips that need to be updated. If needed, you can try using this update-binary that was compiled with current sources. It goes in your zip file in the META-INF/com/google/android folder.
DOWNLOAD:
The fastest and easiest way to install TWRP is to use the GooManager app:
Play Store Link
Direct Download
1) Install GooManager from the Play Store
2) Open GooManager and provide root permissions
3) Hit Menu (or the button with the 3 dots on your screen) and then Install OpenRecovery
OR:
You can find more information and download links on our website!
BUGS:
If you have found a bug, please consider posting it to our github issues log. It's pretty much impossible for us to keep up with the more than 30 threads that we have for the devices that we "directly" support. If you have a significant problem that cannot be answered in this thread, your best bet is to PM me directly, contact us via our website, or find us in our IRC channel below. If you see someone that's struggling, feel free to point it out to us. We need your help to help us keep track of all of our devices! Thanks!
SUPPORT:
Live support is available via #twrp on Freenode with your IRC client or just click this link.
Click to expand...
Click to collapse
Would it work with V28C ?
Thx.
Sent from my LG-P970 using xda premium
florin250 said:
Would it work with V28C ?
Thx.
Sent from my LG-P970 using xda premium
Click to expand...
Click to collapse
i dont think so......
but....we better wait answer from the expert
@OP
wow.....i just dream about this last night and today you give this.....thank you so much....
the latest is 2.3.1.1
http://techerrata.com/file/twrp2/p970/openrecovery-twrp-2.3.1.1-p970.img
Ilko said:
the latest is 2.3.1.1
http://techerrata.com/file/twrp2/p970/openrecovery-twrp-2.3.1.1-p970.img
Click to expand...
Click to collapse
download stuck at 99,99%, why???
edit : downloading without download manager, now it's okay
In ClockworkMod, on Nandroid Backup...(there is no option to save the name as we wish), it defaultly gives a name with date for backup..
So, here in TWRP, is there possibility for giving name for Nandroid Backup ?
And what are the bugs remaining after 2.3.1.0 update ?
Had anyone brick phone or bootloop history with this ?
sekhar13515 said:
In ClockworkMod, on Nandroid Backup...(there is no option to save the name as we wish), it defaultly gives a name with date for backup..
So, here in TWRP, is there possibility for giving name for Nandroid Backup ?
And what are the bugs remaining after 2.3.1.0 update ?
Had anyone brick phone or bootloop history with this ?
Click to expand...
Click to collapse
The old TWRP recoveries never completely worked for OB.Sometimes it was the SD mounting, sometimes you couldn't restore the backup done with the same TWRP version and so on.I will try this because I like TWRP more than CWM but it's the last time if it won't work.
---------- Post added at 10:37 AM ---------- Previous post was at 10:36 AM ----------
Ilko said:
the latest is 2.3.1.1
http://techerrata.com/file/twrp2/p970/openrecovery-twrp-2.3.1.1-p970.img
Click to expand...
Click to collapse
No, it's not but it's 2.3.20(not yet for OB of course).
USB storage not mounting.
Back to the "bomb proof" cwm 5.8.1.3 touch.
great share!Very good job, thank you.
there is a new version 2.3.1.1
timvdhoorn said:
there is a new version 2.3.1.1
Click to expand...
Click to collapse
ilko already said it here http://forum.xda-developers.com/showpost.php?p=34469364&postcount=6 and there is a newer version but it haven't been built to our device yet.
Updated!
Dees_Troy said:
Updated!
Click to expand...
Click to collapse
SDcard mounting as mass storage still not working, please check.
I was writing the same report : )
well, too bad. I like it but it's useless to me since I transfer files very often through recovery. I can't compile a flasher with that
Indeed I prefer twrp rather than cwm.
Dees, what you need to solve the SD card?
Enviado desde mi LG-P970 usando Tapatalk
Every new version always the same problem.
re4lsk said:
Indeed I prefer twrp rather than cwm.
Dees, what you need to solve the SD card?
Enviado desde mi LG-P970 usando Tapatalk
Click to expand...
Click to collapse
I need to know the proper path for the lun file. By default it's in /sys/devices/platform/usb_mass_storage/lun0/file
You'll have to look for it in TWRP, not in Android though if you find it in Android then I can try switching kernels... I'd need a copy of your current kernel or boot image to switch.
A lot of newer devices don't support USB storage mode anymore at all, so bear that in mind when you're getting ready to upgrade to a new device. You'll have to get used to using ADB to push files or use ADB sideload mode.
Dees_Troy said:
I need to know the proper path for the lun file. By default it's in /sys/devices/platform/usb_mass_storage/lun0/file
You'll have to look for it in TWRP, not in Android though if you find it in Android then I can try switching kernels... I'd need a copy of your current kernel or boot image to switch.
A lot of newer devices don't support USB storage mode anymore at all, so bear that in mind when you're getting ready to upgrade to a new device. You'll have to get used to using ADB to push files or use ADB sideload mode.
Click to expand...
Click to collapse
well the black is an old device(2011) so usb storage still works, you need zImage or boot.img to get the kernel? i can point you to the CM kernel source, i'll see if my old linux VM still works to get you the zImage. but in the mean time i'll upload you the boot.img from cm10 from 20-12-2012 nightly.
CM kernel source
re4lsk said:
well the black is an old device(2011) so usb storage still works, you need zImage or boot.img to get the kernel? i can point you to the CM kernel source, i'll see if my old linux VM still works to get you the zImage. but in the mean time i'll upload you the boot.img from cm10 from 20-12-2012 nightly.
CM kernel source
Click to expand...
Click to collapse
It's not that I need a kernel as much as I need the proper path to the lun file for whatever kernel I happen to be using. Since I don't have an Optimus Black I can't boot it up and look for it myself.

Building OnePlusOSS from source

I'm trying to build https://github.com/oneplusoss. I've generated vendor blobs from 3.5.4 full ota zip, because it can't work to access /system via adb pull on user builds (would need a rooted user-debug build in order to fetch all blobs). You can find the final blob collection here: https://github.com/nvertigo/android_vendor_oneplus_oneplus3T
I have massive issues to get device/qcom/hammerhead-kernel (2Mbit with consistent connectionmdrops), so I <remove-project .... /> that one, since that's prebuild kernels for hammerhead. Do I need some dtds from that git?
The build process runs fine (build.sh -c, as well as make, as well as make otaimage). But I can't get it boot far enough (with boot.img-nosecure) to get any logs: it starts with the oneplus-logo (not the three dot animation) the capacitive buttons show their lights, went off again and after about 10 s the device reboots to recovery. Any way I flash the source build rom (fastboot flash or flashing the ota-package via twrp shows the same results.
Sadly neither boot.img nor boot.img-nosecure give me a /proc/last_kmsg...
Any ideas are appriciated. Thanx in advance.
An other question: does the capacitive buttons light indicating extracting ramdisk? That would match my obsevation, that they are switched on longer on twrp boot, then on system boot, since recovery ramdisk is larger.
If someone wonders, why I are trying this: it's not for engancing features, but for two reasons: because the source is there, and because I'm an oldschool gentoo dickhead: what hasn't run through my compiler shouldn't be on my device (also some kind of chain of trust... ).
Been there, done that, have the t-shirt:
finally I got oss to boot: problem was missing f2fs support for data in fstab. It's running fine and srable.
I naivly thought, it's the source of oos - but it's not: it's plain aosp without any custumation (besides it's running on 3t and some codeaurora parts). No file manager, no capacitive buttons, no no-disturb-button-support, really insane AAPT comfiguration (elements and onscreen-buttons [as stated: no capacitive buttons availible]mare that large, that it feels like an htc magic on steroids).
But: it's a working codebase.
For me the most important finding is the camera used on oss: it's codeauroras snapdragon camera. I pulled the apk and 4 libs, and it's working on oos. If anybody is interested, I can make a flashable zip. Since I'm no photographer, I'm not the one to judge the quality and playing with manual options. The snapshots with default settings are as good (or as bad - YMMV) as with oos stock cam.
I Thing they need to put more features in one plus 3 OS cause there is lil bit heavy smartphone so they need to do more additions
harshsharma9619 said:
I Thing they need to put more features in one plus 3 OS cause there is lil bit heavy smartphone so they need to do more additions
Click to expand...
Click to collapse
Watch out to not confuse oos (oxygenos: proprietary closed source with quitemsome features; i.e. capacitive buttons) with oss (OnePlusOpenSourceSoftware: castrated aosp without anything).
For more features: I'm looking very forward to lineageos, when M kernelsources are published by oneplus.
SnapdragonCamera for OxygenOS
Packaged:
https://forum.xda-developers.com/oneplus-3t/themes/apk-snapdragoncamera-codeaurora-build-t3533687
nvertigo67 said:
I've generated vendor blobs from 3.5.4 full ota zip, because it can't work to access /system via adb pull on user builds ...
Click to expand...
Click to collapse
How do you extract the files from the OTA zip? Of course I know how to unzip a file but I mean how to get the actual files out of the image files. Can this be done with basic Linux Tools?
freepenguin84 said:
How do you extract the files from the OTA zip? Of course I know how to unzip a file but I mean how to get the actual files out of the image files. Can this be done with basic Linux Tools?
Click to expand...
Click to collapse
unpack the rom (you need unpackbootimage - either from your dist, or from android sdk); unpack system.new.dat (sdat2img.py - from your dist, or search with google, don't know if this is in sdk); mount system.img somewhere; edit pull_library.sh from adb pull to cp.
This pull_library.sh is for oss from end of february, you have to edit the current one and - of course - have to change the source of the cp command to meet your local paths:
https://github.com/nvertigo/local_manifest/blob/oneplus/oneplus3t_N/pull_library.sh

[RECOVERY][EXPERIMENT/TEST] TWRP 3.2.1.x for TF701T

Hi, I don't post much on here but I wanted to share something with everyone since this is one of my fav tablets (before one of my drives crash and the data is lost, lol).
Disclaimer: I'm providing this AS-IS, I've been using this for about a few weeks now and while there may be bugs, it's been working for me and figure I'd share a newer version of TWRP for the TF701T. This will need some testing, I haven't tried flashing a newer rom - just using a "dirty port" of Remix OS I'm using (SK1WG base).
Hopefully this helps someone who loves this lil tegra transformer as much as I do!
I'll post links to source later on but to build this but if anyone wants to try;
-I used a slightly modded version of the zombi-x device tree
-tweaked the rm-wrapper (from the timduru katkiss device tree) so it references the correct includes (I was building under zombi-x 5.1 using omni twrp 8.x)
-Since the device tree was already using a prebuilt kerenel, I plugged the one from the TWRP 2.8.x kang/area51 by sdbags release
-The "rom base" folder I was building under was "zombi-x" 5.1/LP
-and the TWRP sources were from omnirom's oreo/8.x source
Here's a link to my dropbox tf701t folder, I keep a backup in the recovery folder.
I also built a 3.0.0.0 "area51" version, think I found that in the zombi-x repositories also. Both booted, roms I had installed, backups were made and restored under both however I've used the 3.2.1.x version more exetensively.
DROPBOX TF701T LINK!
Anyways, happy holidays everybody! I'll try and keep up with this post and update things when I get a chance, but for now rock on!
PS. Should be able to
Code:
fastboot boot <recoveryimagefile.img>
to test it before flashing permanently with
Code:
fastboot flash recovery <recoveryimagename.img>
PS2. Added images to post for 3.2.1.0 and the "Area51" 3.0.0.0 builds, Enjoy!
PS3. UPLOADED SOURCES! (finally, lol)
DEVICE TREE
-The device tree is still setup to use the prebuilt kernel (I compiled from source posted below this, with gcc 8.x toolchain). If using the kernel source below, use recovery_tf701t_defconfig - otherwise just make sure whatever config you run is setup to use LZMA for ramdisks here.
-Also this device tree is setup to use F2FS, I left the original ext4 fstab files included with a ext4_* prefix if anyone's curious. I'll fix that eventually and split them into 2 branches (ext4-only and f2fs).
KERNEL SOURCE
-This experimental kernel has some tweaks, F2FS support (no encryption), O/C @ ~2.5Ghz, bunch of extra governors (lionheart works nicely), but in it's base form works great for booting recovery.
Hopefully this stuff helps others bulding for this awesome lil tablet! Back to some more compilations while I got time.
UPDATE: F2FS Test (12/30/17)
-Added a recovery build that I have been running for a bit with F2FS support
-Use this with a ROM that supports F2FS, or repack a boot.img with a F2FS kernel and mod the ramdisk (edit fstab to mount /data /system and /cache with F2FS.).
-It supports the usual ext4 and other filesystems, but defaults to f2fs when using the format data and wipe commands (modded fstab on /system /cache /data).
-Also haven't had any issues formatting /cache, or touch not working with this kernel. I'll get around to a normal ext4 version and upload that as it seems to fix the /cache issues.
Just here to say it all works as before and there aren't any new/strange problems. The issues with not being to format /cache and so on without going back and forth to ext4 still persist, though.
hitmancho said:
Just here to say it all works as before and there aren't any new/strange problems. The issues with not being to format /cache and so on without going back and forth to ext4 still persist, though.
Click to expand...
Click to collapse
Glad it works for you too, I noticed the /cache issue also on the other TWRP 2.8.x version posted for this tablet too. One thing that I do (even on the other TWRP) is wipe the partition I want (or change its fs type) first, and if I need to touch another partition then I reboot the recovery and it works.
It's annoying, I'm currently testing building the kernel inline instead of using the 2.8.x kernel (from that other posted recovery) in the device tree. I'm using sources that I know boot, just playing with the configs to see how it plays with TWRP. I ported over the f2fs stuff from the katkiss kernel to mess around with, boots in the rom fine - so if I can get it to boot recovery then the f2fs formatting stuff should work and mount correctly.
Sidenote - one thing I notice with the 3.2.1-0 version is the screen seems to work better, I haven't had the touchscreen not responsive issue I had with the previous TWRP 2.8.x version.
Going for a coffee, I'll play around with it tonight (and remember to upload stuff to my github eventually to share). Long day of work, time to unwind
Small Update (Progress is good!)
So, took some time to dig around why it wasn't booting the recovery when I built from the same (working) kernel source I'm booting the normal android os with. Turns out, most likely due to space savings, the recovery is set to boot LZMA - turned that on in the config and that kernel now booted up recovery perfectly!
I'm rebuilding the kernel, since in my infinite wisdom, I compiled with my selinux disabled kernel - which also worked, but bombed out on any rom zips that ran anything to do with contexts/perms. Good news was F2FS worked mounting, formatting, etc.. Hopefully tomorrow I'll have a selinux friendly f2fs supporting kernel for recovery that'll work.
Random sidenote: I was eyeing the newer kernel drivers (from 4.x), If everything works as it's currently configured, I'll give try backporting the newer stuff and see how she runs. Just wanted to post a small update with some notes just in case anyone in wants to try building it themselves.
Thanks for your work! If you could manage to fix the format issues with current TWRP, that would be excellent. I've never been able to dirty flash due to this pesky recovery problem, I always have to go back and forth to ext3 -> ext4 and then flash clean and restore my apps .. quite a bit of time waster.
silverchairbg said:
Thanks for your work! If you could manage to fix the format issues with current TWRP, that would be excellent. I've never been able to dirty flash due to this pesky recovery problem, I always have to go back and forth to ext3 -> ext4 and then flash clean and restore my apps .. quite a bit of time waster.
Click to expand...
Click to collapse
I need to reformat /system and /cache only - most times. No need to reinstall apps.
You're lucky then, I always end up with errors on dirty flash and format /data also fails, so I resort to changing FS. Sometimes even this gives errors and I need to do it several times until errors are gone.
I just restart recovery and try formatting again.
AmauryRR great work! Please use the memory card of the docking station
Sorry for offtop, but... I saw on your dropbox remixOS. Where I can find info about how to install it? Main theme on tf701t about remix os is not having this. (or i am blind).
I haven't tried flashing a newer rom - just using a "dirty port" of Remix OS I'm using (SK1WG base)
Click to expand...
Click to collapse
Can you, please, describe how it is working?
---------- Post added at 11:22 AM ---------- Previous post was at 11:20 AM ----------
Sasisco said:
Sorry for offtop, but... I saw on your dropbox remixOS. Where I can find info about how to install it? Main theme on tf701t about remix os is not having this. (or i am blind).
Click to expand...
Click to collapse
Yes, please, more info on that!
Tf701t update
Hi AmauryRR,
Any chance you could break the process down step by step for none-IT people like me? i have tried everything but think i have to accept that this is above my pay grade .
i am especially having a difficult time with the boot loader. Indicates the following: "An unknown error occurs, which may be a network......try again later"
i can email you the screenshots as i can't seem to upload them here.
regards
rob
Can someone get me recovery work in android 4.2.2 ,
10.14.1.47 bootloader please?
"" I searched in google all recovery file can't be downloaded''
Any chance of a flashable version of this?

[RECOVERY][TREBLE] TWRP 3.2.3-0L v1.3 Labs Mod for the ZTE Axon 7

- T W R P 3.2.3-0L [Labs Mod] -
The Swiss Army Knife TWRP Mod for the Axon 7​
INTRODUCTION
This was a long term project that I have been using for a long time. I created some scripts to make it easier and faster to flash new roms and quickly restore the daily driver configuration after a testing session. For easier access I modified the TWRP interface to add direct access to the scripts. They had many problems but they were good to me since I created them and I knew how to used them well, but they were not ready for other users.
But the time has come and I have cleaned up most of the annoyances in the tools and in the UI. I have named it "Labs Mod" since it allows me to have my flashing lab on the go, making it extremely easy to switch to different configurations, or recover the daily driver configuration in a few minutes. I believe it is free of major bugs and now I can concentrate on adding new scripts, and more options to the current scripts.
FEATURES
On top of the latest improvements introduced in the official TWRP 3.2.3-0, this mod offers the following added features:
Full vendor partition support (mount, format, wipe, partition image flash, TWRP backup and restore).
Integrated Bootstack backup and restore.
Modem firmware image flash
Reboot to EDL
Button to enable device mapper verity (DM-Verity) enforcing
Button to disable the eMMC write protection (disemmcwp)
Backup/Restore internal storage to the TWRP Backup folder in the external SD. Ensure you have enough free space, free space check is not yet implemented.
EDL backup zip creation. Dual zip use since the resulting zip can be installed using TWRP from the phone or using MiFlash from the computer. It offers the following package creation options:
OS: Operating system (boot, vendor and system).
GPT: Partition table only.
CONFIG: Device config data (IMEI, SN, MAC, etc).
BOOTSTACK: Boot firmware without modem.
MINIMAL: Includes GPT+bootstack+modem+recovery.
EMERGENCY: Minimal + device config.
FULL: Minimal + OS.
FACTORY: Includes Full + config.​
Integrated Treble PARTY tool for creating and removing the vendor partition. Vendor partition is required for Treble ROMs. Removal is required for flashing old non-treble roms.
Lockscreen security removal. Removes password, pattern, fingerprint, etc... (in case you forget your password or the security descriptor gets corrupted).
Google account binding removal (in case you want to wipe from within recovery and test with different google accounts).
Bootloader unlock message removal.
New! Expand OS partitions (Vendor and System) to fit the whole partition. Useful for expanding the GSI filesystem for having space for adding GApps or moving apps to system.
New! Deep Wipe function performs a low level wipe of the partition data, erasing the remaining the portions of the eMMC that stored the partition information.
REQUIREMENTS
You need an unlocked Axon 7
INSTALLATION
WARNING, THIS SOFTWARE COULD WIPE ALL THE DATA IN YOUR DEVICE, INCLUDING THE INTERNAL STORAGE.
IT REQUIRES TWRP CUSTOM RECOVERY IN AN UNLOCKED DEVICE, OTHERWISE YOUR DEVICE COULD BE BRICKED.
!!! Whatever you do, it is at your own risk !!!​
Follow these steps:
1. Download the TWRP Labs Mod image to your External SD card.
2. Boot to TWRP and select the Install option in the main manu.
3. Tap on the install image button and select your external SD. select the image file you downloaded, select the recovery partition and confirm.
4. Reboot to recovery again to ensure the changes are applied properly.
DOWNLOAD
TWRP_3.2.3-0L_v1.3-Axon7-Labs_Mod.img Flavor of the mod using the official TWRP 3.2.3-0 Kernel binary (Quick boot even when using F2FS, full ADB support, NO B12 Oreo encryption). Use this if you do not plan on using device encryption. Please note that you won't be able to use any tool of this version if your device is encrypted.
TWRP_3.2.3-0L_v1.3.B12-Axon7-Labs_Mod.img Device encryption enabled flavor of the Labs mod. It use the 3.2.1-8 TWRP Kernel binary (Long boot when using F2FS, NO ADB support, B12 Oreo encryption). Use this one if you use device encryption. Please note that this flavor doesn't support adb interface.
NOTES
1. I do not have the time and expertise to dig into kernel hack so this is why I do not provide a unified kernel with fast F2FS boot, ADB and B12 encryption. Probably people developing kernels could help on this issue. It would be nice having a kernel with proper F2FS boot support, B12 encryption and ADB interface. Until then, there is no other way than having 2 flavors depending on the features we require.
SOURCES
C'mon, all of them are scripts!!! the sources are at glance. Use them in your projects but don't forget to give credit to the source !!!
CREDITS
@NFound for the recovery kernel binary supporting Oreo B12 encryption.
@someone755 for the keycheck binary I use in my scripts.
@Chainfire for the TWRP install script hacks.
I hope you enjoy it as much as I did creating and learning throughout the enlightenment journey.
Nice.
Any info on the scripts that are included?
voetbalremco said:
Nice.
Any info on the scripts that are included?
Click to expand...
Click to collapse
Well, all of them are Bourne shell scripts. Some of them are stupidly simple such as those in the Reboot menu, and others in the Advanced > Oki Labs menu are very elaborated, specially:
- PARTY tool: for creating and removing the vendor partition. I released it a few days ago as a separated tool that could well work in other devices.
- EDL backup: for creating EDL flashable backups of a configuration. This tool will probably require a full thread due to the concepts involved. The big feature is that the generated zip can be also flashed using any TWRP.
- Internal Storage Backup/Restore: TWRP doesn't offer a straightforward solution for backing up the internal storage, since it is excluded from the data backup, now it is possible to create a backup and restore the contents of the internal SD in case you want to mess up with the userdata partition. Now this script creates a set of files under the TWRP/backup folder. I am planning to add the possibility of having different backup folders, the same way the GUI treats the data partition.
That is looking very sweet!!!
I'm excited, nice work man!
This is just fantastic!
Well, the non b12 version can't decrypt my device, running los 15.1
also, the lab options did nothing, and when I pressed on PARTY the recovery froze on me.
Hmm.
nfsmw_gr said:
Well, the non b12 version can't decrypt my device, running los 15.1
also, the lab options did nothing, and when I pressed on PARTY the recovery froze on me.
Hmm.
Click to expand...
Click to collapse
Well, that's why in the OP I provide 2 flavors of the mod. If you require decrypt then you have to use the B12. PARTY will not work either if your device is encrypted and you are using the 3.2.3-0L. In your case, using device encryption, you have to use the 3.2.3-0L(B12). You will have all the functions except for ADB. PARTY will work fine too.
Oki said:
Well, that's why in the OP I provide 2 flavors of the mod. If you require decrypt then you have to use the B12. PARTY will not work either if your device is encrypted and you are using the 3.2.3-0L. In your case, using device encryption, you have to use the 3.2.3-0L(B12). You will have all the functions except for ADB. PARTY will work fine too.
Click to expand...
Click to collapse
Got it.
I thought the B12 version was for stock-based ROMs.
Okay I'll flash the other one once I get home, thanks.
nfsmw_gr said:
Got it.
I thought the B12 version was for stock-based ROMs.
Okay I'll flash the other one once I get home, thanks.
Click to expand...
Click to collapse
I'll clarify it a bit more to avoid any misunderstanding. Sorry about that.
Oki said:
I'll clarify it a bit more to avoid any misunderstanding. Sorry about that.
Click to expand...
Click to collapse
Thnx for this tool ! I'll test that this weekend.
It would be great if you'd make a small guide on this with a couple of situations / a possible indepth review with screens / what's possible and what's definitely not possible with this twrp tool.
Anyway seems very promising :good:
Sheesh...i have no external sd card
I have garde flashed your TWRP_3.2.3-0L (B12) -Axon7-Labs_Mod.img but this version says when starting in twrp that my password is wrong. the version 3.2.1.8 of nfound unlocks my password quite normal
Excellent Job! I can't wait to get back my Axon 7 from RMA Services. I'm just going to need sometime to get this running coming from stock MIflavor.
Found bug. Installed the ADB version (thanks Cthulu!), wanted to check the functionality.
Went into the Storage Backup and my phone froze. Rebooting from ADB worked.
EDIT: tried to reproduce the issue - same thing happened 2nd time.
EDIT2: It freezes at any option in Oki Labs
docentore said:
Found bug. Installed the ADB version (thanks Cthulu!), wanted to check the functionality.
Went into the Storage Backup and my phone froze. Rebooting from ADB worked.
EDIT: tried to reproduce the issue - same thing happened 2nd time.
EDIT2: It freezes at any option in Oki Labs
Click to expand...
Click to collapse
I can't duplicate the issue. Are you sure you downloaded it properly? Do you have an SD card? The backup requires an SD card with enough space. Checking for free space is in the todo list for this weekend.
raystef66 said:
Thnx for this tool ! I'll test that this weekend.
Anyway seems very promising :good:
Click to expand...
Click to collapse
Not good enough!
It is downloaded properly. SD card has more than 100gb free space.
As mentioned in edit it is any option that I used in Oki Labs menu that froze my phone
docentore said:
It is downloaded properly. SD card has more than 100gb free space.
As mentioned in edit it is any option that I used in Oki Labs menu that froze my phone
Click to expand...
Click to collapse
What option are you testing? the Storage Backup? What format are you using in your SDCard? Does it happen at the beginning or after a while? Is there any file under TWRP/BACKUPS/STORAGE in your Micro SD after the failure?
@Oki this is amazing. Thank you.
Is it possible to use the recently released kernel sources from los15 to solve the issue of needing two revisions?

[M.O.D. KERNEL Q 1.5] MIUI 11 Mi9/ 9T Pro 835mhz GPU DynFsync LZ4 WLblock *FOD Fix*

[M.O.D. KERNEL Q]
*** NOTE: a dev has posted on TG the FOD fix for beta/ MIUI 12 forked from my code, download there! I asked for GitHub source to comply with XDA and will post once I have it and provide a link to the file link "Mi9/Mi9T Pro Optimization and Overclocking" Telegram has it now: https://t.me/joinchat/NNTe_E9G4ZcZKXCUrajFYQ ***
MIUI 11 Mi9/ 9T Pro MOD 1.5
MOD-Q 1.5 is for stable MIUI 11 variants for Mi9 only - Xiaomi.eu 11.0.5 stable is what it was built for, runs best on, just use it. The Mi9T Pro version supports MIUI 11 variants plus many AOSP builds. If you use an official MIUI 11 Xiaomi version you will get a warning message "Contact device manufacturer." You can ignore that, it means nothing. But I highly suggest using Xiaomi.eu 11.0.5, or another MIUI 11 variant like MiRoom or some use Revolution OS.
***DO NOT USE ANY PERFORMANCE (CPU/GPU/ETC) MAGISK MODULES WITH THIS FOR BEST PERFORMANCE!!! IT INSTALLS IT'S OWN OPTIMIZED MAGISK MODULE AUTOMATICALLY***
FP scanner will only work up to 11.0.5. Xiaomi keeps changing the code and not releasing it to made Dev builds not work. There were "patches" that worked until a few weeks back, but Xiaomi has yet again changed their FP scanner code. So I will not update the FP code, do not ask, it is a complete waste of time. Sorry, but Xiaomi.eu 11.0.5 and MOD 1.5 work very very well together.
Features:
835mhz GPU, Adreno Boost, Dynamic Fsync, Boeffla WL blocker (better battery idle), F2FS optimizations, LZ4 ZRAM. EXFAT USB/SDCard support added. Sultan Boost + PapaSmurf's Op7Pro tweaks, Dynamic Overclocking + Underclocking with frequency boost for smooth, fast, clean performance and fluid scaling. Many thanks to PapaSmurf who greatly influenced this kernel; portions are ported from his Op7 Pro Repo.
Mi9T Pro version also reported to work on AOSP ROMs using the original FOD implementation (Derpfest, MSM, CRDroid, Havoc, LOS).
Just use the Magisk Module it installs for you automatically when you flash the zip from TWRP, likely the best results will be obtained. SmartPack can be installed to choose between profiles under Performance Tweaks - battery / balanced / performance / gaming, although the default installed Magisk module is highly recommended by itself for optimal performance and good battery drain.
Github source has been added for MOD 1.5 here. Please read the Readme that's why it's there.
https://github.com/mrslezak/MODQ1.5
Releases are available here: Download them for your device and follow the instructions there. If you already have TWRP and Magisk, it will be easy. Just read please it will answer your questions.
https://github.com/mrslezak/MODQ1.5/releases/tag/MOD1.5
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[M.O.D. KERNEL PIE] Mi9 Android9 GPU830mhz F2FS data/cache Dynamic Fsync LZ4 WLblocker V2 [STABLE]
MOD Pie notes:
***New features added! Dynamic Fsync replaces the Fsync toggle (credits to author Paul Reioux aka Faux123 <[email protected]>), and Boeffla Wakelock blocker 1.1.0 (credits to author: andip71 <[email protected]>) has been added. The GPU830mhz runs on a higher regulator now so even 3DMark runs without issue, this is as stable as it gets. A battery saving Magisk Module has been added for longer life and scored 422.5K still on AnTuTu! It will throttle and hotplug (idle) cores as needed to save battery ***
Super tweaked kernel for the Mi 9. Best AnTuTu Benchmark 432K thus far, expect 420K-430K in daily operation with good battery life. This will vary based on the ROM selected. Stock AnTuTu is 370K. So you can run your phone faster than any production 855+ at the moment. This kernel is setup on purpose to allow anything from stock to maximum performance, you can set parameters as you like in a kernel manager.
GitHub Source: https://github.com/mrslezak/MODKernel-V2-Cepheus
Releases are available here:
https://github.com/mrslezak/MODKernel-V2-Cepheus/releases/tag/V2
TG Name: MattoftheDead
M.O.D. Kernel (MattoftheDead). This kernel is STABLE, everything works, it runs on any MIUI based ROM (MIUI Global Dev, MIUI China Dev, MiGlobe, Xiaomi.eu, AOSP, etc.). ***If you install this kernel and don't follow the tweak instructions, it runs exactly like stock. There is now a Magisk module that will run with the optimal settings to make this easy! *** So read up. You can apply any tweaks you'd like. These include:
GPU 830mhz overclock - stable and smooth. The GPU will throttle down when not being used to a lower mhz. The Magisk Module will enable the max 830mhz clock for you. Or you can go without if you have a dialcode supported GPU MaxFreq OC mode *#*#8106#*#*
ZRAM LZ4 data encryption enabled - fastest encryption method, smaller ZRAM sizes (512mb is good) work very well [2GB is the stock ZRAM default, LZO is the default kernel compression which is slow]. ZRAM is in-memory swap so it is ultra fast. This allows you to have more free RAM for apps to run.
F2FS data and cache partition support - full ICE AES 256bit encryption. Note only @mauronofrio TWRP 3.3.1-39 + supports F2FS partition mounting so you MUST use this TWRP recovery!!!
F2FS has been tested on MIUI Global Dev 9.6.27 and Xiaomi.eu 9.7.22, 9.8.1, MiGlobe, RevOS, AOSP, Havoc thus far (more added daily) and read/write speeds and app access are definitely fast. Support was enabled by working directly with @mauronofrio on XDA (thanks Mauro) so we originated F2FS support for Mi9 - there are also F2FS kernel tweaks that help the speed in the kernel.
BOEFFLA Wakelock Blocker 1.1.0 - blocks wakelocks and allows you to change what gets blocked that is waking up your phone and preventing deep sleep. There are defaults blocked already in this build that are known to be blockable safely. If you want to add more, use SmartPack Kernel manager under Wakelocks. It will also show you what apps are causing them and the frequency so you can disable the ones that are not needed.
If you want to join in the discussion and see updates in realtime, World MI9 & Mi9T Pro Optimization and Overclocking is a TG group which has many things related to MOD and any other kernels, mods for the phone, Magisk Modules, all types of things for the devices.
Step 1: [KERNEL REQUIRED FILES]
Go to the releases page posted earlier and download everything.
Step 2: [ROM SELECTION]
If you already have a Pie MIUI based DEV ROM installed, you can continue to use it. Global Dev 9.6.27 is recommended. But this supports up to Xiaomi.eu 9.8.1. If you want to use a new MIUI based ROM, download it and setup the device (between these ranges of releases - some like MiRoom, some like stock, some like Xiaomi.eu). If you are clean flashing everything, don't bother restoring all the apps - they will be deleted when you switch to F2FS. Just set it up so you can login and get to the default menu with the default apps displayed. Either way, you will have to setup the device as a new phone. So back up all your user data (photos, downloads, etc), apps, etc. using Google Drive, Xiaomi Cloud, Titanium Backup Pro, or any other app that backs up apps and settings. It's often easiest to put them on your PC since you will be plugged into it during this install process with your USB cable.
Step 3: [MAURO TWRP INSTALLATION FOR F2FS SUPPORT]:
Boot Mi9 holding Power + Volume Down
Hook up to your phone to the PC with the charging cable
Open a command prompt. Go to your Minimal ADB and Fastboot folder.
Type: fastboot devices
And hopefully you see your device ID pop up. If not you don't have the right driver, the cable is bad, or something else is wrong. Search Google.
Next flash Mauro TWRP:
fastboot flash recovery twrp-3.3.1-41-cepheus-mauronofrio.img (or use his latest from the link at the bottom of this thread)
Hopefully you see it flash to the device in a few seconds successfully and it's ready to go.
Booting to TWRP:
Turn off your phone. Now hold down power + volume up. Once the boot Logo appears, let go of the power button but keep holding volume up. TWRP should boot. If not, try again. I usually have to remove the phone case. Now enter your password and proceed to the next section. If it asks you if you want to keep the system read only SAY NO! You will be modifying system components, keep it writable to avoid installation issues.
Step 4: [FLASHING THE M.O.D. KERNEL]
Check the releases page posted above. Just unzip the file there and flash via TWRP as an image to boot. It's patched with Magisk already.
Step 5: [CONVERT EXT4 TO F2FS}:
Converting EXT4 data and cache partitions to F2FS:
Check the releases page posted above for fstab_patch_F2FS_MI9_Cache_NoBarrier.zip required to enable F2FS. You MUST flash this in TWRP or your OS will NOT be able to boot an F2FS data partition!!!! This file has been kanged all over the internet, it was created here. Feel free to use it, everyone already is.
***Note flashing TWRP / Install / fstab_patch_F2FS_MI9_Cache_NoBarrier.zip MUST be repeated any time you change ROMs or you won't have access to your data!!! So back this up!!!!***
Boot back into TWRP. You will need to go to Wipe, Advanced Wipe, Click Data, Repair or Change File System, Change File System, and click F2FS. Swipe to change. It will format and you'll have nothing on your data partition. Next format cache. Go to Wipe, Advanced Wipe, Click Cache, Repair or Change File System, Change File System, now click F2FS. Swipe to change. Again it will format and be wiped.
Step 6: [SETTING UP YOUR "NEW" PHONE]:
Next, reboot to System. The device should boot up and welcome you to your "new" device. It has no data apps so it has to be new. You will have to login to your Xiaomi account if it is associated with the device. Then you can choose to restore from a Google Backup and next from Xiaomi Cloud. You can do either one to get your apps back. I would suggest Xiaomi Cloud after Google completes all its downloads - it will place icons in the right places and install your root apps if you had them. And after setting up your apps, now boot back to TWRP and make a Backup. Now for this Nandroid backup you should backup data, boot, dtbo, and vendor partitions (vendor has the fstab.qcom file that allows your F2FS supported partition to boot now). Even if you save to your internal device initially, be sure to put it on a PC for safe keeping. Then If you accidentally wipe your partition later, you can skip importing, get to the main screen after minimal setup completes, enable file transfer from the connected PC, and then copy the Nandroid backup to your Internal Memory. Boot into TWRP and restore the backup and you're back in business.
Step 7: [INSTALLING MAGISK MANAGER AND KERNEL MANAGER]:
So now you install the MagiskManager-v7.3.2.apk to enable all root functions. If you want Google Pay and anything else setup posts are here in the Mi9 forum that show you how. Generally hide all banking apps, trading apps, Google Pay, GMS, etc. And I suggest installing GMS doze for better battery life and the Mi9 Auto Brightness fix.
In addition, to have the MOD kernel setup for the best performance, go into Magisk Manager, Modules, and flash the (Magisk)MOD-Battery-Saver+_v2.zip from the releases page. It will auto set all the parameters the kernel features, and does a great job with extending battery life at the same time.
This is the best setup for performance. Pictures are included below.
If you would like to change the settings, you need a kernel manager. So next you can install the Smart Pack APK SmartPack_Kernel_Manager_v8.7.apk to enable or disable all the tweaks you desire.
Pictures are attached below to show the TWRP screens for flashing and F2FS partition conversion. Also the settings of best performance using Smart Pack kernel manager are here. If you want to change any of the best settings after flashing the Magisk Module, do it in the kernel manager of your choice and set on boot - where to change those options is in the pictures below for SmartPack.
Enjoy!
Mauro TWRP
https://forum.xda-developers.com/Mi-9/development/recovery-unofficial-twrp-xiaomi-mi-9-t3905825
SmartPack Kernel Manger
https://forum.xda-developers.com/android/apps-games/app-smartpack-kernel-manager-t3854717
FK Kernel Manager CPU Profile
https://play.google.com/store/apps/details?id=com.franco.kernel&hl=en_US
Magisk
https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Minimal ADB and Fastboot
https://forum.xda-developers.com/showthread.php?t=2317790
And one last thing. I have been working with some of the most well known devs out there on XDA on Telegram, Private Messaging, and other channels to get this kernel where it is - but I have no XDA presence. I've helped hundreds of people on Telegram setup their systems or diagnose their issues. If you find this post useful, helpful, innovative, or install my kernel and like it, please click the Thanks button to acknowledge the work that I've done to get the Mi9 to this point. It would be greatly appreciated to get some thank yous for all the hours I've put into this development work for the Mi9, and provides some motivation to keep improving. Other kernels are on the way as well for more Xiaomi / Redmi devices if I feel some love from the community. Much appreciated!
Thanks goes out to @smeroni68 and @mauronofrio for helping fix the fstab.qcom zip that cost several hours of pain yesterday for users and I on Telegram that did not have the Vendor partition mounted when flashing the old fstab.zip file - it will flash now mounted or not from TWRP. And thanks to @ilia1985 for providing a Magisk Module template for the kernel manager settings, now OC setup doesn't even need a kernel manager!
***DISCLAIMER - APPLYING ANY ROOT MODS IS ALWAYS AT YOUR OWN RISK! I AM NOT RESPONSIBLE FOR BRICKED DEVICES, DAMAGE OR OTHER THAT MAY OTHERWISE OCCUR. THIS HAS BEEN TESTED EXTENSIVELY BUT USE AT YOUR OWN RISK***
First.. that's the first time.
Huge thanks to the dev for their contribution!
Awesome work!
What does "miui based rom" mean?
Is Havoc OS miui based?
Troomak said:
Awesome work!
What does "miui based rom" mean?
Is Havoc OS miui based?
Click to expand...
Click to collapse
Nah, it's aosp
Looks like it's base on last one version of android9 MIUI DEV 9.8.1 to modify its kernel, doesn't it ?
So it's not base on linux kernel 4.14.139 to develop ?
Kris
Kris Chen said:
Looks like it's base on last one version of android9 MIUI DEV 9.8.1 to modify its kernel, doesn't it ?
So it's not base on linux kernel 4.14.139 to develop ?
Kris
Click to expand...
Click to collapse
4.14.83 per the hardware device settings. Q is already upstreamed to the latest Linux and CAF so just waiting on a source release so kernels can be made. No need to spend time upstreaming unless another dev wants to (I'm in contact with the other kernel dev here on XDA we're working together now, he may upstream). He upstreamed his to 4.14.139 and will pull my source repo soon to fix bugs in his build so he may just upstream this kernel or fix bugs in his kernel in the process. Collaboration is a good thing. I've been waiting for assistance for a long time and it's good to team up with others devs. We don't get paid we do this as a hobby.
Thanks !
Can I use Ex kernel manager to tune kernel parameters ?
In another one - Will there CPU/GPU frequency table exist to choose which one of frequency combination I want to use base on condition of phone usage - Gaming, multimedia application, and general usage !
mslezak said:
4.14.83 per the hardware device settings. Q is already upstreamed to the latest Linux and CAF so just waiting on a source release so kernels can be made. No need to spend time upstreaming unless another dev wants to (I'm in contact with the other kernel dev here on XDA we're working together now, he may upstream).
Click to expand...
Click to collapse
Kris Chen said:
Thanks !
Can I use Ex kernel manager to tune kernel parameters ?
In another one - Will there CPU/GPU frequency table exist to choose which one of frequency combination I want to use base on condition of phone usage - Gaming, multimedia application, and general usage !
Click to expand...
Click to collapse
Yes EX Kernel Manager is a good one to use. You will have to experiment with if it can lock in frequencies. Follow the guide for CPU settings they are optimal. You could by app adjust if needed and if it is supported by EX. Some support per app some don't. I think SmartPack does. The issue is that the 830gpu clock is an additional clock. The others are all stock clocks. This is for maximum battery life and compatibility. The highest 830GPU is only fully settable via dial code *#*#8106#*#* at this time - try in your ROM to see if it is supported. In some KM you can set max and min to 830mhz and it will lock in the frequency (FK) although this was only tested for 1 day on an unstable build (too hot thermals). More tests are needed, feel free to try and post what you observe.
hiperglyde said:
Nah, it's aosp
Click to expand...
Click to collapse
Many AOSP builds are still on Xiaomi underlying code. The test would be to install the TWRP mentioned and take a backup of boot and dtbo partitions. Stay on EXT4. Then flash the restore TWRP provided and see if it boots. I user has already made it to the logo screen on AOSP using this method. He is using an unencrypted partition though. If you are on an encrypted partition the likelihood of it working is higher. The TWRP is bootable from fastboot as well so you will be able to access recovery. Advise you save the backup to removeable media / computer before flashing. Report back your results please.
Hey There.
I am trying to mount the fsqtab.qcom an do not get how to do it on my Mi9 using these directions?
The fstab.qcom included MUST be placed in /vendor/etc/ OR YOUR PHONE WILL NOT BE ABLE TO MOUNT THE DATA PARTITION!!!! So your next step is to copy the fstab.qcom via a root browser or from Minimal ADB and Fastboot. Boot to Recovery (hold power + volume up, release power button when the boot logo appears), then run from a terminal: adb push fstab.qcom /vendor/etc/fstab.qcom
How do you do whats listed above 'precisely'?
I can make everything else work. I just cannot seem to get this file inserted in Vendor?
Can you help please
(my profile says senior member but I am really not )
Great work!! Thanks for the kernel.
Any chance Kcal will be possible?
Finaly installed it on aosp extended.Thanks for developer
Bryceicle1971 said:
Hey There.
I am trying to mount the fsqtab.qcom an do not get how to do it on my Mi9 using these directions?
The fstab.qcom included MUST be placed in /vendor/etc/ OR YOUR PHONE WILL NOT BE ABLE TO MOUNT THE DATA PARTITION!!!! So your next step is to copy the fstab.qcom via a root browser or from Minimal ADB and Fastboot. Boot to Recovery (hold power + volume up, release power button when the boot logo appears), then run from a terminal: adb push fstab.qcom /vendor/etc/fstab.qcom
How do you do whats listed above 'precisely'?
I can make everything else work. I just cannot seem to get this file inserted in Vendor?
Can you help please
(my profile says senior member but I am really not )
Click to expand...
Click to collapse
Did you turn on the option ADB sideload in twrp? Under advanced?
*justintime* said:
Did you turn on the option ADB sideload in twrp? Under advanced?
Click to expand...
Click to collapse
I just installed it via root browser
Two ways you can do:
1.To use root explorer copy fstab.qcm under /vendor/etc ...
2.Enter TWRP and mount vendor parition, then copy fstab.qcm under /vendor/etc ...
Kris
QUOTE=Bryceicle1971;80122399]Hey There.
I am trying to mount the fsqtab.qcom an do not get how to do it on my Mi9 using these directions?
The fstab.qcom included MUST be placed in /vendor/etc/ OR YOUR PHONE WILL NOT BE ABLE TO MOUNT THE DATA PARTITION!!!! So your next step is to copy the fstab.qcom via a root browser or from Minimal ADB and Fastboot. Boot to Recovery (hold power + volume up, release power button when the boot logo appears), then run from a terminal: adb push fstab.qcom /vendor/etc/fstab.qcom
How do you do whats listed above 'precisely'?
I can make everything else work. I just cannot seem to get this file inserted in Vendor?
Can you help please
(my profile says senior member but I am really not )[/QUOTE]
*justintime* said:
Did you turn on the option ADB sideload in twrp? Under advanced?
Click to expand...
Click to collapse
No. Does that allow the terminal to find the file in your USB?
I've been leaving the extracted files in my c-type USB plugged into the cell
---------- Post added at 10:30 AM ---------- Previous post was at 10:26 AM ----------
Kris Chen said:
Two ways you can do:
1.To use root explorer copy fstab.qcm under /vendor/etc ...
2.Enter TWRP and mount vendor parition, then copy fstab.qcm under /vendor/etc ...
Kris
QUOTE=Bryceicle1971;80122399]Hey There.
I am trying to mount the fsqtab.qcom an do not get how to do it on my Mi9 using these directions?
The fstab.qcom included MUST be placed in /vendor/etc/ OR YOUR PHONE WILL NOT BE ABLE TO MOUNT THE DATA PARTITION!!!! So your next step is to copy the fstab.qcom via a root browser or from Minimal ADB and Fastboot. Boot to Recovery (hold power + volume up, release power button when the boot logo appears), then run from a terminal: adb push fstab.qcom /vendor/etc/fstab.qcom
How do you do whats listed above 'precisely'?
I can make everything else work. I just cannot seem to get this file inserted in Vendor?
Can you help please
(my profile says senior member but I am really not )
Click to expand...
Click to collapse
[/QUOTE]
Thanks. I'll try your an other suggestions
*justintime* said:
Did you turn on the option ADB sideload in twrp? Under advanced?
Click to expand...
Click to collapse
Have tried to turn on ADB side load an it keeps failing after a long wait? What am i missing?
---------- Post added at 12:07 PM ---------- Previous post was at 12:00 PM ----------
mslezak said:
[M.O.D. KERNEL] Mi 9 Android 9 Pie GPU830mhz F2FS data/cache Fsync LZ4 ZRAM [STABLE]
MOD-KERNEL-TOOLS.zip -> kernel and all software to use the features of the kernel: https://mega.nz/#!TopRnIDK!6GbL_8QPToK0oLCSDnJ_d9EUnZ9AflDgf-9pu6JCiKo
GitHub Source: https://github.com/mrslezak/Xiaomi_Kernel_OpenSource branch: cepheus-p-oss
Telegram Group: https://t.me/joinchat/NNTe_E9G4ZcZKXCUrajFYQ
Telegram Name: @MattOftheDead
M.O.D. Kernel (MattoftheDead). This is a kernel project that has been going on for months now behind the scenes. It is STABLE, everything works, it runs on any MIUI based ROM (MIUI Global Dev, MIUI China Dev, MiGlobe, Xiaomi.eu, etc.). Android 9 (Pie) only as Android 10 has not been released and Xiaomi decided to change the kernel components (boot.img and dtbo.img will flash to Q, but no WIFI, no calls, and colors are "off."). If you install it and don't follow the tweak instructions, it runs exactly like stock. You can apply any tweaks you'd like. These include:
GPU 830mhz overclock - stable and smooth - most MIUI Dev based ROMs can enable via dialing *#*#8106#*#* - enable MaxFreq GPU Mode - you can test before installing. The GPU will throttle down when not being used to a lower mhz.
FSync toggle (enable/disable) - disable gives higher speed at the risk of data corruption if a system crash occurs. Note I've used this 4 months with no issues, if you use stable software you are less likely to run into problems. Eventually dynamic Fsync will be added if I ever have time or help (writes to disk when screen is off, safer than just disabling).
ZRAM LZ4 data encryption enabled - fastest encryption method, smaller ZRAM sizes (512mb is good) work very well [2GB is the ZRAM default, LZO is the default kernel compression which is slow]
F2FS data and cache partition support - support with full ICE AES 256bit encryption. Note only @mauronofrio TWRP 3.3.1-39 + supports F2FS partition mounting so you MUST use this recovery!!!
F2FS has been tested on MIUI Global Dev 9.6.27 and Xiaomi.eu 9.7.22 thus far and read/write speeds and app access are definitely fast. Support was enabled by working directly with @mauronofrio on XDA (thanks Mauro) so we originated F2FS support for Mi9 - there are also F2FS kernel tweaks that help the speed.
Now if you want to install this kernel, you can right away and use it on EXT4 (default for all Xiaomi ROMs). To use with F2FS you will need to adb push a modified fstab.qcom file to /vendor/etc/fstab.qcom. Or you can use a root browser and just copy it over if you are currently rooted. It will boot either EXT4 or F2FS with encryption with the same fstab.qcom file. And then you will enter the danger zone once it is time to enable F2FS! You will have to backup all your apps. This means MiCloud (for root apps this is good, saves APKs and settings), Google backup (the backup frequency seems random to me, although if a backup is recent you'll get all your PlayStore apps back), Titanium Backup Pro ($ PAID, you can't use the free version as the internal data will be wiped when the partition is formatted), or search for another backup solution online. Nandroid backups won't work after conversion either as they include the partition format (EXT4, F2FS, etc.) so don't bother. More on this later in the thread.
To save everyone time and space (I don't have a good way to upload files), join my Telegram channel. Read the instructions and you will be up and running in no time. They are outlined in great detail there along with tons of other discussions around optimizations and benchmarks. However, I will attempt to summarize installation on XDA as best as I can. Telegram Link: https://t.me/joinchat/NNTe_E9G4ZcZKXCUrajFYQ -> XDA MI9 Optimization and Overclocking
I have also provided a Mega.nz zip file with a bunch of tools you can use to get up and running. It comes with the modified kernel (boot.img GPU830_F2FS_Fsync_CRC_LZ4_boot.img and dtbo.img GPU830_F2FS_Fsync_CRC_LZ4_dtbo.img), the modified fstab.qcom file for encrypted F2FS support, the Mauronofrio TWRP version required twrp-3.3.1-39-cepheus-mauronofrio.img, Magisk-v19.4.zip Canary, MagiskManager-v7.3.2.apk, SmartPack Kernel Manager com.smartpack.kernelmanager-v8.7-20190815-release.apk to set tweaks along with a file SmartPack_init.d.txt that can be copied and pasted directly into SmartPack (in the menu, Init.d, enable Init.d, add new, copy and paste the text in, save it, and everything will be setup optimally) - NOTE init.d does not work on all ROMs (even with it enabled on boot in the software), so you may need to click on the profile under Init.d manually to execute after boot. A Franco Kernel Manager CPU Profile is included Maxfreq-CPUs-FK_Kernel_Manager_Profile if you use FK since it won't let you set CPU frequencies in the software (included just for people who have FK or prefer it over SmartPack - it won't setup ZRAM to LZ4 or 512mb for you, or toggle FSync, so you will have to manually do it if you use FK). Also the latest Windows Minimal ADB and Fastboot minimal_adb_fastboot_v1.4.3_setup.exe is included, although you probably already have it since you have a bootloader unlocked phone
Now some very basic steps to the more complicated, much you should already know since you clicked on a custom kernel post!!!!
Flashing Mauro TWRP:
Boot Mi9 holding Power + Volume Down
Hook up to your phone to the PC with the charging cable
Open a command prompt. Go to your Minimal ADB and Fastboot folder.
Type: fastboot devices
And hopefully you see your device ID pop up. If not you don't have the right driver, the cable is bad, or something else is wrong. Search Goggle.
Next flash Mauro TWRP:
fastboot flash recovery twrp-3.3.1-39-cepheus-mauronofrio.img
Hopefully you see it flash to the device in a few seconds sucessfully and it's ready to go.
Booting to TWRP:
Turn off your phone. Now hold down power + volume up. Once the boot Logo appears, let go of the power button but keep holding volume up. TWRP should boot. If not, try again. I usually have to remove the phone case.
Flashing boot.img, dtbo.img, and Magisk19.4.zip:
You can do this manually or from a TWRP backup. In the MOD-KERNEL-TOOLS zip file, you can unzip [TWRP-Restore-Backup] MODKernel-Magisk19.4 to internal storage or OTA SD card / USB drive, click Restore, and restore boot and dtbo. Then it is already patched with Magisk 19.4 (you have root access). Then reboot. Now for the more manual method. You can select Install. Then select Flash Image. Select GPU830_F2FS_Fsync_CRC_LZ4_boot.img and flash to the boot partition. After flashing, go back in TWRP and flash GPU830_F2FS_Fsync_CRC_LZ4_dtbo.img to the dtbo partition. Now go back in TWRP again and click on Flash Zip. Select Magisk19.4.zip and flash. After this completes, reboot.
Setting up F2FS data and cache partitions:
The process to setup F2FS is to first download a compatible ROM if you don't already have one installed (MIUI based, Android 9 (Pie), this includes MIUI Dev, Xiaomi.eu, MiGlobe, Revolution OS, etc.) ENSURE ANDROID 9 PIE: 9.8.1 variants are usually the last Android Pie build. After downloading, you can install it as a new phone after following the guide below so don't bother setting anything up other than a Xiaomi account login if prompted; don't restore apps yet either. You can setup with defaults now and not import apps. You should make it to the home screen though. All apps will be deleted after formatting.
You will be setting up a new phone and will have to login to all your apps over again. So to reiterate, MAKE COPIES OF ALL YOUR PROGRAMS BEFORE DOING THIS! Xiaomi Cloud, Google Backup, Titanium Backup, etc. - use something not on your phone, NOT a Nandroid backup! NOT in internal storage! (it will be wiped)!
The fstab.qcom included MUST be placed in /vendor/etc/ OR YOUR PHONE WILL NOT BE ABLE TO MOUNT THE DATA PARTITION!!!! So your next step is to copy the fstab.qcom via a root browser or from Minimal ADB and Fastboot. Boot to Recovery (hold power + volume up, release power button when the boot logo appears), then run from a terminal: adb push fstab.qcom /vendor/etc/fstab.qcom
Now in TWRP, you will need to go to Wipe, Advanced Wipe, Click Data, Repair or Change File System, Change File System, now click F2FS. Swipe to change. It will format and you'll have nothing on your data partition. Next format cache. Go to Wipe, Advanced Wipe, Click Cache, Repair or Change File System, Change File System, now click F2FS. Swipe to change. Again it will format and be wiped.
Next, reboot to System. The device should boot up and welcome you to your "new" device. You will have to login to your Xiaomi account if it is associated with the device. Then you can choose to restore from a Google Backup and next from Xiaomi Cloud. You can do either one to get your apps back. I would suggest Xiaomi Cloud after Google completes all its downloads - it will place icons in the right places and install your root apps if you had them. If you accidentally wipe your partition later (as I just did while making this tutorial, ouch), you can skip importing, get to the main screen, enable file transfer from the connected PC, then copy the Nandroid backup you absolutely should make and transfer to a PC right after setting all your apps up (logging in etc.). Now for this Nandroid backup you should backup data, boot, dtbo, and vendor partitions (don't forget that fstab.qcom we put here!). Even if you save to your internal device initially, be sure you later put it on a PC for safe keeping. I am just now copying back my TWRP directory to restore my phone this moment as I type...
Pictures are attached below to show the TWRP screens. Also the settings for the best performance using Smart Pack kernel manager included in the ZIP file download (will add after I restore). And a picture of the dial code + GPU Max Freq screen where you turn on the 830mhz GPU clock. Enjoy!
Links to XDA files included in the MOD-KERNEL-TOOLS.zip:
Mauro TWRP
https://forum.xda-developers.com/Mi-9/development/recovery-unofficial-twrp-xiaomi-mi-9-t3905825
SmartPack Kernel Manger
https://forum.xda-developers.com/android/apps-games/app-smartpack-kernel-manager-t3854717
FK Kernel Manager CPU Profile
https://play.google.com/store/apps/details?id=com.franco.kernel&hl=en_US
Magisk
https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Minimal ADB and Fastboot
https://forum.xda-developers.com/showthread.php?t=2317790
Click to expand...
Click to collapse
No system no boot an a bootloop. This enhancement is a bit complex an I'm kind of confused?
Bryceicle1971 said:
Have tried to turn on ADB side load an it keeps failing after a long wait? What am i missing?
---------- Post added at 12:07 PM ---------- Previous post was at 12:00 PM ----------
No system no boot an a bootloop. This enhancement is a bit complex an I'm kind of confused?
Click to expand...
Click to collapse
Witch rom are you using?
Inviato dal mio MI 9 utilizzando Tapatalk
smeroni68 said:
Witch rom are you using?
Inviato dal mio MI 9 utilizzando Tapatalk
Click to expand...
Click to collapse
Xiaomi.eu for Mi9 9.7.22 v10-9
Bryceicle1971 said:
Have tried to turn on ADB side load an it keeps failing after a long wait? What am i missing?
---------- Post added at 12:07 PM ---------- Previous post was at 12:00 PM ----------
No system no boot an a bootloop. This enhancement is a bit complex an I'm kind of confused?
Click to expand...
Click to collapse
You copied fstab.qcom to /vendor/etc/? Boot into recovery, attached to your PC. Then from a command prompt in Minimal ADB and Fastboot,copy fstab.qcom there. Then type: adb devices. It should show a device ID. Then type adb push fstab.qcom /vendor/etc/. It should say succeeded. Then reboot. This only makes a difference if you are on F2FS.
If you aren't booting to system go ahead and try the TWRP recovery version - unzip and flash that package to boot and dtbo from TWRP Restore. It's already patched with Magisk 19.4 and several people are on it that had issues flashing the files separately.

Categories

Resources