Need help compiling twrp - Android Q&A, Help & Troubleshooting

Hi everyone.
I just need help getting ported or compiling a TWRP for a Motorola One Macro it uses Android 9 with an Mediatek helio P70 processor, I have tried but I couldn't due the device has A/B partition system. can someone help me?
My boot.img if needed https://mega.nz/file/2aRUlYqY#GFeIbb1TYPg8x8Lq_fBiNu9UFenUgvFH1-eVjIm4uqE

TWRP patches device's boot.img, has nothing to do with whether device is an A/B system or an A-only system. On both systems only 1 boot.img exists.

jwoegerbauer said:
TWRP patches device's boot.img, has nothing to do with whether device is an A/B system or an A-only system. On both systems only 1 boot.img exists.
Click to expand...
Click to collapse
Got it, just the only thing is that i am a little confused due actually the boot and recovery are together on the same image that I uploaded, I previusly worked on A systems they have an specific recovery partition which this device doesnt do, so i just dont know how to work on it due always I try it ends on bootloop

@Kratos574
A-only systems have a dedicated /recovery partition, whereas A/B-systems don't have it: there boot.img contains recovery mode ramdisk
With regards to your bootloop problem: might be AVB ( read: Android Verified Boot ) didn't get disabled.
Also take note that TWRP won't install if AVB is enabled.

jwoegerbauer said:
@Kratos574
A-only systems have a dedicated /recovery partition, whereas A/B-systems don't have it: there boot.img contains recovery mode ramdisk
With regards to your bootloop problem: might be AVB ( read: Android Verified Boot ) didn't get disabled.
Also take note that TWRP won't install if AVB is enabled.
Click to expand...
Click to collapse
Well my AVB is already disabled, but its happenning the same thing the device just bootloops forever I have no experience on this kinda devices I stopped developing when android 6.0 came out haha

@Kratos574
Re-flash Stock ROM.

Related

How to create a custom signed image or check system integrity manually

Hi, I'm going to unlock my bootloader. Install Xiaomi EU Rom and Root with Magisk.
After unlocking bootloader, i know my device will vulnerable. Anyone can flash a custom recovery and install a backdoor or whatever. So, I have two Idea to eliminate this threat.
1) Is there any way to sign the image manually with custom key and lock the bootloader again? and then i can unlock it from PC whenever I want with my own key.
I don't know if such thing is possible, there is a post related to it.
How to create a custom signed vbmeta.img for Unisoc using AVBtool
2) If first option is not possible, is there any way to generate the hash of /system partition, keep the key inside phone (/data maybe? as it will be encrypted), and then every time system boot up, it will generate a new hash and check with original one, to confirm system integrity. (someone mentioned such thing in this forum, but he didn't tell the procedure). I know it will take a long time to check, but I don't mind.
Another way could be, check it manually inside OS or from PC (adb maybe?) whenever I give my phone to someone and suspect something.
I know my post is messed up. I would appreciate any help.
OSX.Nobody said:
1) Is there any way to sign the image manually with custom key and lock the bootloader again? and then i can unlock it from PC whenever I want with my own key.
I don't know if such thing is possible, there is a post related to it.
How to create a custom signed vbmeta.img for Unisoc using AVBtool
Click to expand...
Click to collapse
Only Android 8.0 and higher ROMs with AVB implemented have 1 or more VerifiedBoot image(s) - read: vbmeta.img .
How to sign an image with a custom key is explained here.
jwoegerbauer said:
Only Android 8.0 and higher ROMs with AVB implemented have 1 or more VerifiedBoot image(s) - read: vbmeta.img .
How to sign an image with a custom key is explained here.
Click to expand...
Click to collapse
I have read that post, but it's 3 years old. Also he mentioned about Pixel Phone.
My ROM is Android 10 (MIUI 12 EU Rom), Redmi K30i 5G device. Will it work for me? Also what about 2nd option, any Idea?
Thanks.
@OSX.Nobody
The vbmeta.img on Android ROMs with AVB implemented is nothing else than a database. It actually contains the hashes/keys for the boot, system, and vendor partitions, that does mean that every such ROM build will need a unique vbmeta.img used by AVB to verify successfully.
A vbmeta.img is ROM related, it's completely independent of Android device's hardware.
jwoegerbauer said:
@OSX.Nobody
The vbmeta.img on Android ROMs with AVB implemented is nothing else than a database. It actually contains the hashes/keys for the boot, system, and vendor partitions, that does mean that every such ROM build will need a unique vbmeta.img used by AVB to verify successfully.
A vbmeta.img is ROM related, it's completely independent of Android device's hardware.
Click to expand...
Click to collapse
Thanks for your help, I will follow that post.

General GSIs on N200

The process of flashing alone is conventional, shouldn't even need a thread to detail, but still leaving a thread here for search indexing.
With an unlocked BL, flash an ARM64 AB GSI within fastbootd, reboot to recovery, format userdata, reboot, profit. vbmeta isn't even needed in my case.
EDIT: One thing that's unconventional and I forgot to mention is, for many GSIs, you gotta delete product_a to make room prior to flashing:
Code:
fastboot delete-logical-partition product_a
EDIT2: Magisk doesn't like to see product_a go. Instead, just flash a blank one (from #15) to it:
Code:
fastboot flash product product_gsi.img
Thanks to @Whoareyou for the original finding and @darkghost568 for additional ideas.
Are we getting closer?
Winnower Amber said:
Are we getting closer?
Click to expand...
Click to collapse
To proper custom ROMs? Dunno, I don't do bringups. I'll at least make/refine/submit the device overlay so GSIs would look proper.
Note that Magisk seems incompatible and prevents booting, at least when paired with my GSI - need to restore to stock boot image. Mine comes with PHH-SU so I'm not keen on getting Magisk working anyway.
OK I'll ask since I have no clue. What's a GSI?
alarmdude9 said:
OK I'll ask since I have no clue. What's a GSI?
Click to expand...
Click to collapse
Home
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
AndyYan said:
Not sure why the GSI front is so quiet even after TMO variant got its unbrick tools...
Click to expand...
Click to collapse
I'm personally waiting until TWRP is more stable for this device before jumping into GSI.
Android 12 boots unsurprisingly as well, not as usable as 11 ofc.
A Generic System Image, is a universal version of android, which is available since project Treble separated the O/S into a "HAL" (Hardware Abstraction Layer) driver layer interface and the core operating system.
boot contains the kernel.
vendor, vendor_dlkm, odm, odm_dlkm are the drivers.
system, system_ext are the O/S core.
product is device specific O/S customizations.
Overview | Android Open Source Project
source.android.com
Project Treble is a good thing, making strides for Android to become a standardized operating system.
GSI install Guide:
Using information from:
Generic system images | Android Open Source Project
source.android.com
We find that we are supposed to flash vbmeta.img with "--disable-verification" because GSIs don't "include a verify boot solution". However, this step is not required on our particular device, due to OnePlus specific changes of verification being automatically disabled upon bootloader unlock.
Prerequisites: unlocked bootloader, up to date fastboot installed on a computer
1. Boot the phone into fastbootd mode by:
booting into recovery mode, by holding power and volume down during boot, then
rebooting into fastboot (only) mode, using touch menus: advanced, reboot into fastboot, then
connecting usb-c to a computer and using the poorly named command:
fastboot reboot fastboot.
Now we can use fastbootd commands.
2. We must erase the system partition:
fastboot erase system
3. next we need to obtain a GSI. I used phhusson's GSI build.
Releases · phhusson/treble_experimentations
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Choose arm64-ab for our phone's architechture
floss for open source apps but no GAPPS or vanilla for no GAPPS,
don't choose vndklite (Vendor Native Development Kit Lite) as it is a compatibility version for older versions of android's "HAL" layers.
"system-roar-arm64-ab-floss.img.xz"
decompress it to .img (and rename to GSI.img for brevity)
4. If we attempt to flash our GSI into the system partition:
fastboot flash system GSI.img
It will inevitably fail due to "not enough space to resize partiion"
The tool isn't smart enough to handle this task of resizing a "full" dynamic partition.
So we have to delete virtual partitions out of super to make room.
5. We must remove any present -COW partitions, which are Copy On Write partitions, which seem to be made by an A-Only virtual dyamic upgrade system. Their purpose is to host temporary changes to a partition, so the original partition is preserved for an emergency rollback, using associated interfaces to the original partition and the COW partition for access.
check your "fastboot getvar all" for any COW partitions, and delete them.
fastboot delete-logical-partition system_b-cow
6. In the official documentation, they admit that we have to delete the product partition(s) manually to make room.
fastboot delete-logical-partition product_a
fastboot delete-logical-partition product_b
7. With that done, we can reattempt to flash the GSI.
fastboot flash system GSI.img
8. The official instructions then require a fastboot -w in order to clear user data and "system partitions" data, but this is optional.
Are (A11 based) GSI's daily-drivable on the N200?
Also, do they allow for safetynet for banking apps, etc?
oCAPTCHA said:
Unofficial lineageOS 18.x by AndyYan is a Phhusson GSI derivative that claimed partial Magisk compatibility, but it also would not boot when Magisk patched. microG signature spoofing was not supported.
Click to expand...
Click to collapse
That Magisk compatibility does work on most other devices, even including an OPPO device which N200 is a rebadge of. Not sure why it is. Install PHH's Superuser and you get root for apps at least.
MicroG support is limited to priv-app for safety, as shown here.
BTW, long writeup, might wanna cut it down and/or add some emphasis?
lzgmc said:
Are (A11 based) GSI's daily-drivable on the N200?
Click to expand...
Click to collapse
VoLTE is one major hardware feature I can't verify; basic functionalities should be good. Heck, I daily-drive GSI on a device that has way more bugs than this.
mthous01 said:
Also, do they allow for safetynet for banking apps, etc?
Click to expand...
Click to collapse
PHH's "securize" option might allow you to do so for now (and unroot). I don't use GAPPS at all.
Rooting GSI Android 11
@AndyYan
AndyYan said:
That Magisk compatibility does work on most other devices, even including an OPPO device which N200 is a rebadge of. Not sure why it is. Install PHH's Superuser and you get root for apps at least.
MicroG support is limited to priv-app for safety, as shown here.
BTW, long writeup, might wanna cut it down and/or add some emphasis?
VoLTE is one major hardware feature I can't verify; basic functionalities should be good. Heck, I daily-drive GSI on a device that has way more bugs than this.
PHH's "securize" option might allow you to do so for now (and unroot). I don't use GAPPS at all.
Click to expand...
Click to collapse
Rooting GSI Android 11
Have you tried this yet, to get Magisk to work? I'm still on the bubble on wiping my phone and trying this, as it's my only daily driver right now.
mthous01 said:
Have you tried this yet, to get Magisk to work?
Click to expand...
Click to collapse
The /sbin hack is already integrated, but that doesn't seem enough here.
To root y'all need to do:
fastboot create-partition-primary 512 product
Then flash the attached product.
Then flash your rooted img, it'll boot successfully.
This GSI also works beautifuly, even has 90hz, if only there was an overlay for fingerprint scanning.
http://[STRIKE]https://jmirror.ml/0:/Jarvis-Mirror/Pixel5-Beta5-CB-GSI-Tutorials.7z[/STRIKE]
https://sourceforge.net/projects/gsitutorials-sgsi/files/SGSI/A12Beta/Pixel5-SP1A-A12-SGSI-GSI-Tutorials.7z/download
Whoareyou said:
To root y'all need to do:
fastboot create-partition-primary 512 product
Then flash the attached product.
Click to expand...
Click to collapse
OPlus devices really like to throw files (overlays, fstab, etc.) everywhere... TIL, thanks.
I tried out WhoAreYou's product image using
fastboot create-logical-partition product 512
(His syntax gave an error.)
While It did allow me to boot with a Magisk 23 patched boot.img along with Phhusson's vanilla GSI, Magisk did not work. The Magisk 23 app gave a strange error "Unsupported Magisk Version, This version of the app does not support Magisk version lower than v20.4". I downgraded to Magisk Manager 7.3.2 and the system hung whenever Magisk ran instead. Perhaps it is a conflict with the SU system in the GSI. I tried the "securize" option in the Phh treble menu, which caused a reboot, but did not remove root / su . I do not know how to remove the SU modifications present in the GSI, if that is required.
I attempted to use his product image along with his linked pixel 5 beta Android 12 GSI, but the system would not boot with a Magisk 23 patched boot.img.
I attempted to use his product image along with AndyYan's Unofficial Lineage 18.1, but the system would not boot with a Magisk 23 patched boot.img.
oCAPTCHA said:
I tried out WhoAreYou's product image using
fastboot create-logical-partition product 512
(His syntax gave an error.)
While It did allow me to boot with a Magisk 23 patched boot.img along with Phhusson's vanilla GSI, Magisk did not work. The Magisk 23 app gave a strange error "Unsupported Magisk Version, This version of the app does not support Magisk version lower than v20.4". I downgraded to Magisk Manager 7.3.2 and the system hung whenever Magisk ran instead. Perhaps it is a conflict with the SU system in the GSI. I tried the "securize" option in the Phh treble menu, which caused a reboot, but did not remove root / su . I do not know how to remove the SU modifications present in the GSI, if that is required.
I attempted to use his product image along with his linked pixel 5 beta Android 12 GSI, but the system would not boot with a Magisk 23 patched boot.img.
I attempted to use his product image along with AndyYan's Unofficial Lineage 18.1, but the system would not boot with a Magisk 23 patched boot.img.
Click to expand...
Click to collapse
oCAPTCHA said:
Could you flash a stock kernel on top of a GSI, then reroot with Magisk?
Click to expand...
Click to collapse
Try this updated GSI from the stable release, I just flashed it and it's definitely working:
https://sourceforge.net/projects/gsitutorials-sgsi/files/SGSI/A12Beta/Pixel5-SP1A-A12-SGSI-GSI-Tutorials.7z/download
Am using the same product I linked and magisk canary patched stock boot.img, Literally works perfectly aside from the fingerprint scanner.
oCAPTCHA said:
I tried out WhoAreYou's product image using
fastboot create-logical-partition product 512
(His syntax gave an error.)
While It did allow me to boot with a Magisk 23 patched boot.img along with Phhusson's vanilla GSI, Magisk did not work. The Magisk 23 app gave a strange error "Unsupported Magisk Version, This version of the app does not support Magisk version lower than v20.4". I downgraded to Magisk Manager 7.3.2 and the system hung whenever Magisk ran instead. Perhaps it is a conflict with the SU system in the GSI. I tried the "securize" option in the Phh treble menu, which caused a reboot, but did not remove root / su . I do not know how to remove the SU modifications present in the GSI, if that is required.
I attempted to use his product image along with his linked pixel 5 beta Android 12 GSI, but the system would not boot with a Magisk 23 patched boot.img.
I attempted to use his product image along with AndyYan's Unofficial Lineage 18.1, but the system would not boot with a Magisk 23 patched boot.img.
Click to expand...
Click to collapse
^

Attempting to port TWRP. Need Recovery.img Partition

Hey Guys,
Since it doesnt seem like anybody else is-- im trying to port TWRP to the Duo.
Problem im running into is after extracting all the partitions i dont get a "Recovery.img" partition but i get a Boot_A and Boot_B partitions.
After extracting the Boot_A partition to check for recovery.img (or something relative) theres a recovery.fstab in there.
Does anyone know how I can get the recovery.img partition? or what I might be able to do with Boot_A/B?
none24 said:
Hey Guys,
Since it doesnt seem like anybody else is-- im trying to port TWRP to the Duo.
Problem im running into is after extracting all the partitions i dont get a "Recovery.img" partition but i get a Boot_A and Boot_B partitions.
After extracting the Boot_A partition to check for recovery.img (or something relative) theres a recovery.fstab in there.
Does anyone know how I can get the recovery.img partition? or what I might be able to do with Boot_A/B?
Click to expand...
Click to collapse
Pretty sure that modern A/B devices usually don’t come with a separate recovery partition. In my experience it’s a part of the boot image.
filfat said:
Pretty sure that modern A/B devices usually don’t come with a separate recovery partition. In my experience it’s a part of the boot image.
Click to expand...
Click to collapse
Correct.
Would u know what I could do as next steps given that I only have the a/b partition? I'm not sure where to transfer the files to. Or if there's a twrp porting guide that details A/B partitions
none24 said:
Correct.
Would u know what I could do as next steps given that I only have the a/b partition? I'm not sure where to transfer the files to. Or if there's a twrp porting guide that details A/B partitions
Click to expand...
Click to collapse
Im not 100% about this, but i think TWRP is dead as of the newer hardware specification in android, as it stands. You would have to package a boot image with the recovery programming, making it difficult to match up with existing setups. You would have to package for every kernel available, and hope your users dont pick the wrong one when they go to install, or else they will be stuck in a bootloop, with no way to force into recovery, because there is no recovery. I have been working on TWRP for the Unihertz Titan and have increasingly found information that TWRP if still active, is in its final days. I just bought a Duo, so there is a lot i dont know yet, but on the unihertz devices, there are tools to force your phone into preloader mode that all mediatek devices have, to flash your roms back to stock state. Even in a 100% not bootable state, you can save your device. Super slick. But if you nuke both your boot partitions by accident, there is effectively no way to recover to my knowledge, on the Duo. These tools are Very handy for developers. I am unaware of any tool that exists for the Duo that will do the same, not to say one can't or hasn't been written yet. But without someone with deep (im talking super deep) android experience, a Duo to spare, and the time and effort needed for the project, it might be safe to assume that most custom software will not arrive on the Duo, even with its ease of rooting and unlocking. I will be taking a close look at the kernel and everything else i can find to determine what will be possible for the Duo in the coming months.
Upon further research, there is a bootloader mode that does not seem to be based on boot/recovery partition. In powered off state, hold volume down and plug in to a computer. This will allow you to get into fastboot and flash anything you'd like.

Bundle TWRP without recovery.img

I'm on a quest to root my Hisense A9 e-ink phone. There isn't a stock ROM available online, and my attempts at extracting the recovery.img or boot.img with an EDL client or through ABD have failed. So the next thing I can think of trying is bundling a TWRP build, or possibly borrowing the TWRP from a similarly architected device and seeing if I can boot into it (without flashing).
So is there a way to build TWRP for an unsupported device, when there's no recovery.img available?
Also, is it safe to ./fastboot boot recovery.img without risk of bricking the phone (ie., booting instead of flashing)? If so, then I can try existing TWRP builds for similar devices.
Alternatively, are there any other avenues for rooting a new device which has no available stock ROM? Or other possible workarounds to get Google Services working correctly? I've tried MicroG, but the Hisense A9's ROM doesn't support signature spoofing, and to enable support I need TWRP.
Here's a thread which details some of my failed attempts at getting the boot.img via the EDL client.
And some more details about the phone:
Hisense A9 / HLTE556N
Processor: Qualcomm Snapdragon 662
Android 11
Software version: L2037.6.03.11.00
Kernel: 4.19.157
A/B partitions
Thanks everyone!
Did you tried those experiments…..
I have same question…kinda….
As their is no twrp recovery for my device (vivo 1802 mtk device) I was thinking of booting into twrp recovery not made for my device specifically Without flashing it.
To get the job done maybe some backups or flashing using twrp. But I don’t know what will be the consequences of it…… If anyone got idea or hands on experience on it, I would like to know

Development TWRP - Need Devs! {Already in quasifunctional state} TEST build posted. Need someone to pick this up and finish

** UNOFFICIAL A-TEAM RELEASE**
*******Testing ONLY*******
**testing has only been done on GN2200 July patch device but should atleast boot into twrp on other sec patch on GN2200 devices***
***Let us know if not***
*****HEED THE WARNING OF IMPENDING APOCALYPSE, DOOM, BOOTLOOPS , BRIMSTONE AND FIRE, AND ALSO TWRP ******
***NOBODY IS RESPONSIBLE FOR WHAT YOU DO WITH THIS EXCEPT YOU***
***DO NOT BUILD AND FLASH THIS UNLESS YOU KNOW EXACTLY WHAT YOUR DOING***
****DONT DO ANYTHING I SAY, I CANT BE HELD RESPONSIBLE FOR WHAT I SAY OR DO*****
**THIS IS AN ** UNOFICIAL RELEASE ** SO DONT GO CRYING TO ANYONE THAT YOU MADE YOURSELF AN EXPENSIVE PAPERWEIGHT IF YOU USE ANYTHING IN THIS POST***
********* THE RESPNSIBILITY LIES SOLELY UPON YOU***
***FLASHING IN CURRENT STATE DOES NOT BOOT INTO SYSTEM****
****READ EVERYTHING BEFORE YOU DO ANYTHING******
******ONLY POSTING THIS FOR DEV PURPOSES*******
******Huge THANKS to PizzaG for this!!!******
***Thanks to Eduardo as well for his contributions, he may still be working on his own release***
Am posting this with a copy/paste i posted in telegram group..
We need people with the knowledge/skills and experience to help get this TWRP finished AND/OR work out the bugs.
GitHub - PizzaG/recovery_device_oneplus_OP515AL1
Contribute to PizzaG/recovery_device_oneplus_OP515AL1 development by creating an account on GitHub.
github.com
*this is not ready for release but the source is here for anyone who can build upon it*
touch is not working
you cant fastboot boot on this device so DO NOT flash this to your device without a backup of your stock/current boot image
issues we are having is no touch, can't mount /data, and so far cant boot into system with the recovery installed so if you want to use it youll need to flash this to boot, use it for whatever and then flash stock boot back, if your magisk patched youll need to flash the backup of that patched boot image you made before flashing this in order to get back into your system....... i have sort of found a slight work around for having to keep flashing the boot partitions until someone can get this to boot by placing my current boot image on an sdcard along with the twrp, flash the twrp to the active boot partition, boot into twrp, install image and install your backed up boot image to the current slot, then go back to advanced and install twrp to ramdisk and select and install the twrp image to the ramdisk, if your magisk patched you need to flash magisk zip right now, you can adb shell into twrp to pull a copy of this boot image if you want and i have flashed my "twrp-ramdisk installed boot image" on the Slot that my system is on and stock/backup boot image to inactive slot because its the only way to boot back to system for now without reflashing the stock(backed up) boot image back to the slot. and reboot into bootloader, change active and reboot and your back into your system.... when you need twrp you can set active to the other slot, it will bootloop once into bootloader and choose recovery to get back to twrp... when done reboot to bootloader and set active back to the other slot and reboot into system.............otg mouse works, adb works, mtp works, some work has been done on the touch but thats still not working yet, everything seems to be mounting except data............. big shout out to PizzaG for this
***this is a very round-about way to get a currently buggy twrp on the device but if you have a usb-c adapter and mouse you can navigate twrp....***
PizzaG doesnt have the device and has spent more time than anyone could possibly ask someone to spend on this for free... I dont have the skills required yet to really work on this. I have tested as much as possible and here it is for those who can build and work on it. i dont recommend releasing in its current form because im sure alot of people will be complaining and bricking their devices. if you can build it im sure you can work on it and should have the skills to atleast recover and have the sense to make backups first.......
Thanks again to everyone who has already donated the valuable time working on this for us and to everyone who will follow and build upon this!
You can find the telegram group for our device here:
You can find the A-Team in telegram
Also FYI in case you missed the post about our kernel source, it can be found here:
GitHub - OnePlusOSS/android_kernel_msm-5.4_oneplus_sm6375 at oneplus/sm6375_r_12.0.1_oneplus_nord_n20_5g
Contribute to OnePlusOSS/android_kernel_msm-5.4_oneplus_sm6375 development by creating an account on GitHub.
github.com
If anyone with experience building twrp and especially for OnePlus devices needs a tester or any files from the device hit me up on telegram @PsYk0n4uT2 and I will do my best to provide whatever you need and test builds along with providing logs.
heres a compiled boot image from the above tree as of 10/02/2022.
**remeber it DOES NOT boot to system, this is twrp only, not installed into recovery ramdisk yet. so BACKUP YOUR STOCK(current) boot image FIRST**** you will have to flash your stock(current) boot image back to boot back into your system. you can sort of get around this by above mentioned method BUT here it is for the GN2200 anyways. working on my July patched device and my May patched device so it should work for other GN2200 sec patches too...
***BACKUP BACKUP BACKUP*****
also cant change active slot from twrp, must reboot to bootloader to change active slot
Heres TWRP installed to ramdisk on a july patched boot image. does not boot to system but since it doesnt you should still be able to use this on any patch for testing purposes.....
You can backup your boot image and flash your current boot image to inactive slot and flash this to active slot by selecting recovery from bootloader after it loops once.... use twrp then go back to bootloader and change active and reboot to get back into your system.
**BACKUP YOUR CURRENT BOOT IMAGE****
***DOES NOT BOOT TO SYSTEM**
***YOU WILL NEED YOUR CURRENT BOOT IMAGE TO BOOT YOUR SYSTEM< YOU SHOULD ALREADY HAVE A BACKUP OF YOUR STOCK IMAGE IN THE CASE THAT YOU ARE MAGISK PATCHED ALREADY< KEEP A COPY OF BOTH IN CASE YOU DECIDE TO WIPE DATA< YOU WILL NOT BOOT BACK INTO YOUR SYSTEM WITH A MAGISK PATCHED BOOT IMAGE IF YOU WIPE DATA*******
if someone can get their system to boot after installing the TWRP from post 4 or their own build after personal edits please post here how you were able to achieve the install and maintain booting into system..
currently twrp indicates that path to /mnt could not be found and cant mount /data .. i think if someone could fix this maybe some progress could be made
ScarletWizard said:
I wonder if TWRP will work for devices with a serial number defeicy
Click to expand...
Click to collapse
halfway working on mine, just isnt finished yet, we need someone who knows alot more about this than i do. another dev is working on twrp but needs a device. the serial wont affect anything else other than the oneplus care app and getting the unlock token..... other than that u have full functionality.... the one posted above needs ALOT of work to finish. no touch yet but it could work for SOME things....
I know C/C++ at a decent level, however; I don't have much experience with low level stuff (especially dealing with bootloaders and other specific proprietary android kernel stuff). If there is anything that needs testing, I am down for it since this is just a secondary phone for me and I won't be too upset if it explodes.
I'm going to attempt this
[ SOLUTION ] [ MTK ] to Fix Touch not Working on TWRP / Philz Due to Kernel Disabled Touch.
In this tutorial, i'm going to show how i managed to patch kernel to enable touch in recovery TWRP / Philz. WARNING : This worked fo...
factopea.blogspot.com
It's written for mtk device but might have similar enough instructions to port for qcom kernel,
But I believe this is what is needed to get the TWRP touch going
Is the trwp.fstab using the right version? Both have different
Code:
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,inlinecrypt,reserve_root=32768,resgid=1065,fsync_mode=nobarrier latemount,wait,resize,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,metadata_encryption=aes-256-xts:wrappedkey_v0,quota,reservedsize=128M,checkpoint=fs
Try this instead in twrp.fstab
Code:
/data f2fs /dev/block/bootdevice/by-name/userdata flags=fileencryption=ice:aes-256-cts;wrappedkey;keydirectory=/metadata/vold/metadata_encryption
Techted89 said:
Is the trwp.fstab using the right version? Both have different
Code:
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,inlinecrypt,reserve_root=32768,resgid=1065,fsync_mode=nobarrier latemount,wait,resize,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,metadata_encryption=aes-256-xts:wrappedkey_v0,quota,reservedsize=128M,checkpoint=fs
Try this instead in twrp.fstab
Code:
/data f2fs /dev/block/bootdevice/by-name/userdata flags=fileencryption=ice:aes-256-cts;wrappedkey;keydirectory=/metadata/vold/metadata_encryption
Click to expand...
Click to collapse
i just unpacked the twrp image with AIK and made the suggested edits and repacked, reflashed, same...... another person is working on twrp and has gotten much of the fstab corrected in their build but their keeping their source closed til they get it ready for release and is still very far from being finished with it and doesnt have much time to work on it right now so we are just kinda stuck waiting on someone that knows what their doing to help get this going. the other person has touch working on theirs so i know its possible i just dont know how long it will be before we see a beta even
Techted89 said:
Is the trwp.fstab using the right version? Both have different
Code:
/dev/block/bootdevice/by-name/userdata /data f2fs noatime,nosuid,nodev,discard,inlinecrypt,reserve_root=32768,resgid=1065,fsync_mode=nobarrier latemount,wait,resize,check,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized+wrappedkey_v0,keydirectory=/metadata/vold/metadata_encryption,metadata_encryption=aes-256-xts:wrappedkey_v0,quota,reservedsize=128M,checkpoint=fs
Try this instead in twrp.fstab
Code:
/data f2fs /dev/block/bootdevice/by-name/userdata flags=fileencryption=ice:aes-256-cts;wrappedkey;keydirectory=/metadata/vold/metadata_encryption
Click to expand...
Click to collapse
also i see a recovery.fstab instead of twrp.fstab in /system/etc. is this what your referring to?
You need both from what iv read ,. TWRP.flags is a module that rewrites the stab at a certain point which may be the reason it's not compiling but I will post. Recovery.fstab is supposed to be a copy paste from the boot.img and gives the general mount partitions locations,. TWRP.fstab is mounted using the same partitions but different format/flag structure to be available to TWRP .
Techted89 said:
You need both from what iv read ,. TWRP.flags is a module that rewrites the stab at a certain point which may be the reason it's not compiling but I will post. Recovery.fstab is supposed to be a copy paste from the boot.img and gives the general mount partitions locations,. TWRP.fstab is mounted using the same partitions but different format/flag structure to be available to TWRP .
Click to expand...
Click to collapse
Interesting article above. Were you able to get that to work? I know it says MTK but seems like mechanism should be the same, or atleast I would assume anyways that the function would be very similar in the case of a flag. Was told you needed to use original kernel but then I couldn't get that to boot period. I'm out of my area of knowledge at this point but always willing to learn.
Also I tried messing around a little with the f stab and TWRP flags I was told that TWRP flags is pretty much the same as the twrp.fstab... also this build needs to have something added to the drivers I do believe that this is somehow related to USB touch it is a goodix gt9886 touch panel using the Samsung 9886 drivers. Maybe the init's need some help here as well.
I have the programming knowwledge that TWRP would require, but have not as of yet created one as my devices were typically readily complete before-hand. Once my device is back up, and running I am going to boot into Ubuntu and give it a go.
I need some excuse to have learned assembly x86, c, c++, Java, Python, and rust and have been eyeing learning scripting so it could be a fun side project assuming it is still incomplete as of the moment?
Is it normal for manufacturers to use components from other's in their builds? The kernel posted seemed to indicate at least a couple Samsung files included.
Well C is a guarantee possibly some C++ as well and definitely some sh scripting if you know rust and know how to attach it to C well enough that could add more possibilities I would imagine. The recovery is from my understanding in the boot image Android Image Kitchen would help you see it unmodified if that is the case.
I found a unofficial TWRP that flashes to the boot partition, and works pretty damn well, id have to say! I am not an experienced developer, I just like to flash around on my phone in my spare time.. Anyways here y'all go:
I am down while I got partitions backed up to the cloud.

Categories

Resources