[Suggestion/Guide] How make Magisk works with TWRP encryption - Magisk

I don't know about other users, but when I installed magisk on asus zc554kl, I have to format data, coz system can not be loaded. Then, TWRP lost access to /data partition too.
I think I have solution for this problem. It allows TWRPs decrypt data and transfer them from original system.
The problem is Magisk patchs kernel in boot.img, so new boot image can not decrypt data and you need format data.
BUT I Suggest those steps (it worked for me):
1. Magisk should create 2 new images : boot and recovery
Firstly it unpack boot, patches kernel and build boot, as usual.
But Magisk also should use same patched kernel for repacking TWRP/recovery. In this case decrypt from TWRP will be supported.

Dreamject said:
I don't know about other users, but when I installed magisk on asus zc554kl, I have to format data, coz system can not be loaded. Then, TWRP lost access to /data partition too.
I think I have solution for this problem. It allows TWRPs decrypt data and transfer them from original system.
The problem is Magisk patchs kernel in boot.img, so new boot image can not decrypt data and you need format data.
BUT I Suggest those steps (it worked for me):
1. Magisk should create 2 new images : boot and recovery
Firstly it unpack boot, patches kernel and build boot, as usual.
But Magisk also should use same patched kernel for repacking TWRP/recovery. In this case decrypt from TWRP will be supported.
Click to expand...
Click to collapse
well that only works in the boot to system, once boot to other partition access is lost

Related

Are there 2 copies of /system on the phone?

My phone (3T) has an unlocked bootloader, is encrypted, not rooted, and running stock OOS 5.0.
I flashed TWRP and discovered that stock OOS restores the stock recovery in boot.
I saw the Oreo dm-verity thread by xenet, had a look at the zip file, noticed that it just modified fstab to prevent force encrypt, so I flashed it to see what happens.
And nothing happens. After the system had booted, fstab is unchanged from the original stock copy.
So I'm wondering whether this file is also restored when booting up on stock.
I get aggressive and go back to TWRP and delete /system/etc and /system/bin and modify build.prop.
Surely now the phone won't boot!
Wrong! It boots up and everything is back to normal in /system.
I go back to TWRP and have a look at /system and it shows me one without the etc and bin folders and has the modified build.prop.
What's going on? How can I see one version of /system in TWRP but a different version (ie, stock) when the phone has booted?
By the way I've been an Android user for many years and have rooted and flashed custom ROMs on a variety of phones and I've never seen anything like what's happening on my 3T. I'm sure that dm-verity is somehow involved in this.
Happened to me on my earlier OOS 5.0 attempts...
But i suspected Magisk is involved in my case.
I downloaded Magisk Module "System Terminal Debloater,"
remove some apps like Duo, Chrome, and Google Play Movies.
Some restarts, they magically re-appear again on Apps Drawer...
Haven't touch them yet again after....
nicknacknuke said:
Happened to me on my earlier OOS 5.0 attempts...
But i suspected Magisk is involved in my case.
I downloaded Magisk Module "System Terminal Debloater,"
remove some apps like Duo, Chrome, and Google Play Movies.
Some restarts, they magically re-appear again on Apps Drawer...
Haven't touch them yet again after....
Click to expand...
Click to collapse
Thanks.
I should have mentioned that I'm also not rooted. So stock OOS 5.0.
Sent from my OnePlus 3T using XDA Labs
When you boot TWRP for the first time, it should ask you if you want to put the /system in read/write mode or if you want to leave it unchanged, did you choose the right option?
Jackhass said:
When you boot TWRP for the first time, it should ask you if you want to put the /system in read/write mode or if you want to leave it unchanged, did you choose the right option?
Click to expand...
Click to collapse
No, I don't get that message because my phone is encrypted with a password. So the first thing I see in TWRP is the request for the password and then I'm presented with the menus.
However, in the Mounted menu, system isn't mounted and I have the option of mounting it in read-only mode.
Sent from my OnePlus 3T using XDA Labs
BillGoss said:
No, I don't get that message because my phone is encrypted with a password. So the first thing I see in TWRP is the request for the password and then I'm presented with the menus.
However, in the Mounted menu, system isn't mounted and I have the option of mounting it in read-only mode.
Click to expand...
Click to collapse
After first time flashing TWRP a folder gets created on your internal storage, with a hidden file called .twrps, go delete it and reboot recovery to trigger the message "allowing system modifications" on TWRP's first boot...
It's not about encryption, it's just that TWRP remember the decision you made due to the file I pointed out...
Sent from my OnePlus 3T using XDA Labs
Sam Nakamura said:
After first time flashing TWRP a folder gets created on your internal storage, with a hidden file called .twrps, go delete it and reboot recovery to trigger the message "allowing system modifications" on TWRP's first boot...
It's not about encryption, it's just that TWRP remember the decision you made due to the file I pointed out...
Click to expand...
Click to collapse
Somehow the attachment strikes on previous post
Edit: still not working, check your TWRP Folder on storage to find the file
Sent from my OnePlus 3T using XDA Labs
Sam Nakamura said:
Somehow the attachment strikes on previous post
Edit: still not working, check your TWRP Folder on storage to find the file
Click to expand...
Click to collapse
Thanks, you are correct. I'd forgotten that that TWRP remembers. Deleting .twrps does bring up the RO prompt after decrypting storage.
Jackhass said:
When you boot TWRP for the first time, it should ask you if you want to put the /system in read/write mode or if you want to leave it unchanged, did you choose the right option?
Click to expand...
Click to collapse
I had allowed changes to the system otherwise I couldn't have made changes to it, which includes the ability to restore the system partition.
But I'm still unclear why if I make changes to the system partition and boot with the stock kernel, then after the boot none of the changes are present in the system partition, but if I boot back into TWRP then the changes are all there.
I recall someone in another OOS 5 thread saying that the stock kernal replaces TWRP with stock recovery if you don't flash root (magisk/superSU). Is it possible that the kernel re-flashes system on boot? Another possibility is that TWRP thinks it's making changes to system but it's not actually? Not quite sure, I've never heard of anything like this before either, just throwing other ideas out there.
I've never read anything about the OP3T or any oneplus phones for that matter having A/B system partitions like the pixels. *shrug*
@nhshah7, something's like what you suggest must be going on to account for what I'm seeing. I'm hoping that someone can confirm my observations and provide a definite answer.
@BillGoss
My thread has been updated relating to all your queries...
Thank you...
https://forum.xda-developers.com/oneplus-3t/how-to/disable-dm-verity-force-encryption-op3t-t3688748
Xennet said:
@BillGoss
My thread has been updated relating to all your queries...
Thank you...
https://forum.xda-developers.com/oneplus-3t/how-to/disable-dm-verity-force-encryption-op3t-t3688748
Click to expand...
Click to collapse
Actually it doesn't explain how TWRP can make changes to system yet the phone boots up on an unmodified system if using the stock kernel. And then, when you boot back into TWRP and look at system, the changes are still there.
Where does the unmodified system come from?
Where does the modified system live?
Why doesn't modifying system result in a failed boot due to dm-verity, while restoring a backup of system does result in a failed boot?
So many questions with no answers.
BillGoss said:
....So many questions with no answers.
Click to expand...
Click to collapse
Not sure if this is applicable in your case but the following possibilities may be worth considering for you:
1. Are you sure that the system image is actually getting modified? If the system partition is not mounted before flashing the zip and the zip being flashed does not mount the system partition in read / write, then no changes to system partitions will actually be written.
2. If dm-verity is enabled, then restoring system could result in an error as this is different from restoring a system-image (nandroid copy of the whole partition and not just the files in the system partition). DM-verity can be triggered if the files are all the same but the dm-verity signature computed by hashing the system partition has changed.
3. For boot partitions, strange behaviour can occur if remnants of the previous boot.img are still in the partition (...e.g. if the previous boot.img was of larger size and a new boot.img of a smaller is flashed, then there will be some bytes after the new boot.img that are from the previous boot.img). To verify this, format the boot partition from fastboot and see if you notice anything different with the new boot.img.
4. In Oreo / 8.0, dm-verity flags are stored in dtb (device tree blobs) inside the kernel and not in the fstab file. Only data encryption can be changed from the fstab file and dm-verity needs to be changed from changing the dtb (...Magisk beta v1456 and SuperSu 2.82 SR4 do this, I think).
rk2612 said:
Not sure if this is applicable in your case but the following possibilities may be worth considering for you:
1. Are you sure that the system image is actually getting modified? If the system partition is not mounted before flashing the zip and the zip being flashed does not mount the system partition in read / write, then no changes to system partitions will actually be written.
2. If dm-verity is enabled, then restoring system could result in an error as this is different from restoring a system-image (nandroid copy of the whole partition and not just the files in the system partition). DM-verity can be triggered if the files are all the same but the dm-verity signature computed by hashing the system partition has changed.
3. For boot partitions, strange behaviour can occur if remnants of the previous boot.img are still in the partition (...e.g. if the previous boot.img was of larger size and a new boot.img of a smaller is flashed, then there will be some bytes after the new boot.img that are from the previous boot.img). To verify this, format the boot partition from fastboot and see if you notice anything different with the new boot.img.
4. In Oreo / 8.0, dm-verity flags are stored in dtb (device tree blobs) inside the kernel and not in the fstab file. Only data encryption can be changed from the fstab file and dm-verity needs to be changed from changing the dtb (...Magisk beta v1456 and SuperSu 2.82 SR4 do this, I think).
Click to expand...
Click to collapse
I'll come back to 1.
2. That makes sense and accounts for why a restore of the system partition with the stock boot image causes me to get dumped back in fastboot mode. If I flash the stock system zip file then the system boots properly.
3. I've not had any issues with strange boot behaviour. I'm always starting with stock or flashing kernels that modify the stock boot image, like Blu Spark.
4. I gathered this from my reading of various threads. If I want to make changes to the system partition and get them to stick and not fail dm-verity then I have to flash a custom kernel. I've proven this in my testing. (A rooting solution would also work, but I've not done this).
Back to 1:
Here's what I've done:
Starting with pure stock image (flash OOS 5.0).
Boot into fastboot and flash TWRP.
Boot into recovery.
Mount system as rw. (In ro mode the next step fails)
Delete the bin, etc, and lib folders in system using the TWRP file manager. (Screenshot a)
Reboot system.
... First interesting fact ...
System boots ok, deleted folders are present in file manager. (Screenshot b)
Boot into fastboot and flash TWRP. (Booting with stock restores stock recovery)
Mount system.
... Second interesting fact ...
TWRP file manager shows that deleted folders are missing. (Screenshot c)
Flash custom kernel or patched boot image
Reboot system
... Third interesting fact ...
System fails to boot. Hangs on splash screen.
So TWRP made the changes (otherwise how could they be visible between reboots, including a replacement of recovery) and I only did them once.
Yet they don't actually take effect until I replace the stock boot image.
So, where are the changes hiding? What did TWRP actually change?
Screenshots (note that TWRP has the wrong timezone set so the time shown is wrong):
BillGoss said:
....
Back to 1:
Here's what I've done:
Starting with pure stock image (flash OOS 5.0).
Boot into fastboot and flash TWRP.
Boot into recovery.
Mount system as rw. (In ro mode the next step fails)
Delete the bin, etc, and lib folders in system using the TWRP file manager. (Screenshot a)
Reboot system.
... First interesting fact ...
System boots ok, deleted folders are present in file manager. (Screenshot b)
Boot into fastboot and flash TWRP. (Booting with stock restores stock recovery)
Mount system.
... Second interesting fact ...
TWRP file manager shows that deleted folders are missing. (Screenshot c)
Flash custom kernel or patched boot image
Reboot system
... Third interesting fact ...
System fails to boot. Hangs on splash screen.
So TWRP made the changes (otherwise how could they be visible between reboots, including a replacement of recovery) and I only did them once.
Yet they don't actually take effect until I replace the stock boot image.
So, where are the changes hiding? What did TWRP actually change?
Screenshots (note that TWRP has the wrong timezone set so the time shown is wrong):
Click to expand...
Click to collapse
Some more thoughts for you to consider:
1. Have you tried this with the official TWRP recovery version 3.2.0-0?
2. Is there anything inside the folders that you see using the file manager after a regular boot? Folders of same name may exist in the boot ramdisk and these are merged with system folders after boot.
3. Try wiping cache between reboots and see if that changes any of your observations.
rk2612 said:
Some more thoughts for you to consider:
1. Have you tried this with the official TWRP recovery version 3.2.0-0?
2. Is there anything inside the folders that you see using the file manager after a regular boot? Folders of same name may exist in the boot ramdisk and these are merged with system folders after boot.
3. Try wiping cache between reboots and see if that changes any of your observations.
Click to expand...
Click to collapse
Good questions. They got me thinking more about how this could possibly work.
I had a look at the cache and there's definitely no copy of the system hiding there.
I also unpacked the ramdisk in the boot image and it had nothing in system. Furthermore, the boot position is only 64 MB, no where near enough to hold the system.
Then I installed Magisk so that I could browse around the phone's partitions and take copies.
I learnt two things from this:
1. If there's a second copy of the system there are only three partitions large enough to hold it (/proc/partitions shows the sizes in 1 kB blocks). The system is about 1 GB. There is space in the system partition (sde20) for 3 GB. There's also space in the data partition (sca15). And there's space in the major partition holding the modems (sdf).
I could eliminate the data partition by formatting it but restoring the internal storage (sdcard) is such a a pain.
So I'll just accept that there is space for a copy, but I'm unlikely to find out exactly where.
2. When I had Magisk installed installed and the system boot, I added a folder and file to /system/priv-app using a file manager (so not using TWRP). I then booted into recovery, flashed the stock boot image, and rebooted. I was expecting it to fail dm-verity (modified system) but it didn't. After booting up there's no evidence of the folder I added to priv-app.
And if I restore the Magisk boot image then the additions show up again.
I'm actually very impressed with how the stock system (kernel, recovery, system) protects itself from modification. Very cool!

How to? MAGISK for Oreo Exynos

I failed similar times to root my phone with twrp 3.2.xx and 3.1.xx. I used Odin 3 v3.13.1.
Any ideas or thread links for the young padawan?
I appreciate your advice masters :good:
Using Odin Flash TWRP latest from the note 8 TWRP thread here on XDA, one on their site is not latest.
Install magisk manager app from play store.
Download magisk from the app.
Reboot to TWRP and flash the magisk file just downloaded.
Reboot and check magisk manager for root and hide.
Should be good.
Nope. Not working and still ends in a bootloop and it's unable to mount the internal storage.
Something went wrong, so.. my phone is unable to boot the system after that!
The issue is the version of TWRP and Oreo, its not yet compatible on this device, it needs porting over
If you want MAGISK you need to do it all in one hit.
Flash TWRP
Select Read Only Option.
Format Data
Reboot Recovery
Flash the DM Verify Encrypt file
Reboot Recovery, You could be able to flash files wihtout a Data mount error.
Now flash the files you want, i..e MAGISK
Once you have booted the ROM and return back to TWRP you are unable to mount Data.
This can cause various issue when flashing files
Funny you.. How can I format if the internal storage isn't able to mount?
"Select Read Only Option.
Format Data" <-- seems like a contradiction to format a missing
partition.
I think we need to wait until someone will port the twrp for Oreo. cheerio!
Because it needs to be done when you first flash it.
Once you have flash Oreo, Then TWRP, You boot into TWRP and format. You then Flash the DM Verify.
Data is accessible, its empty but accessible, Flashing any files like MAGISK work without any errors.
I have it all working on mine without any issues, I do know if i need to flash any additional files it wont work properly due to Data no longer mountable.
There is a updated version of TWRP that fixes this, but its not been ported over.

Flashing /system not working

Hey guys,
I followed a guide I found to root my G6 (ALI): https://forum.xda-developers.com/moto-g6/how-to/guide-twrp-root-magisk-installation-t3816569 and now have an unlocked bootloader, magisk installed and TWRP as my recovery.
I have flashed TWRP to recovery on my g6. Whenever I try to flash a custom system image I made (I wipe cache and data), or modify /system in TWRP, everything looks fine in the TWRP file manager. However, when I go to boot my phone it takes longer than usual to boot, encrypts my files and all the changes I made are undone.
The only thing that has successfully modified /system was the magisk manager when it patched my boot image.
What is going on?
Thanks.

Magisk Module causing freeze at boot

I have a Moto x4 running android 8.1 Oreo with November security patches and magisk v18. Stock recovery and rom. I tried installing a couple magisk modules and the phone won't boot with magisk patched boot image installed. I have restored the stock boot image backup and the phone will run without magisk. I have erased magisk manager's cache, and even uninstalled magisk manager, but the modules are still installed and if i use fastboot boot patched_boot.img it won't boot. My system is encrypted and when I boot the TWRP bootable, I am unable to flash or delete anything outside of the user data or my SD card. I cannot install any zip including magisk manager for recovery or magisk core mode only module. I have tried everything I know to do and then some. Any input or assistance would be greatly appreciated. I would like to avoid resetting my data if possible.
Basically, I think I need to delete magisk.img from my system, but I cannot find it anywhere in my system partition using twrp's file browser. Also, I no longer have root access so I cannot adb root and adb shell into it.
Magisk image is in /data/adb. If you have access to /cache, create a file there named ".disable_magisk" (without quotation marks and with the leading dot). That'll enable Core Only Mode.
https://www.didgeridoohan.com/magis...agisk_functionality_bootloop_loss_of_root_etc
Didgeridoohan said:
Magisk image is in /data/adb. If you have access to /cache, create a file there named ".disable_magisk" (without quotation marks and with the leading dot). That'll enable Core Only Mode.
https://www.didgeridoohan.com/magis...agisk_functionality_bootloop_loss_of_root_etc
Click to expand...
Click to collapse
unfortunately, both the /data/adb and /cache are encrypted and inaccessible without root.
That is great to know for the future though, thanks
I got it to work. I needed to use the newest twrp bootable image in order to decrypt the data in recovery. Once this was done, I was able to erase magisk.img with no issues at all. Thanks for all the help.

how downgrade sm-a605fn from android 10 to 9

Hello, I have a Samsung Galaxy A6+ with latest fw installed.
(italian version)
A605FNXXU7CUD4
The phone is totally useless after the update to android 10, it takes AGES to perform any action, even open the Camera or open a Message.
Already tried to wipe everything, hard reset, reinstall fw. Still useless.
Since I’d like to downgrade to Android 9 to have back a useful phone, I tried to install the latest Android 9 fw with Odin.
A605FNXXS5BTB1
But it fails, saying SW REV CHECK FAIL : [aboot] Fused 7 > Binary 5
What can I do?
Is there any chance to downgrade this phone?
Thank you
1. Unlock your bootloader.
2. Flash custom recovery for your device.
3. Go to custom recovery (TWRP) and flash any downloaded custom rom (for your device), GSI or save stock firmware as flashable zip with tool like ClassyKitchen.
4. Flash Magisk or RMM-bypass-v3 in TWRP to protect your bootloader from getting locked again.
Backup your personal data at first, of course.
nqnxev said:
1. Unlock your bootloader.
2. Flash custom recovery for your device.
3. Go to custom recovery (TWRP) and flash any downloaded custom rom (for your device), GSI or save stock firmware as flashable zip with tool like ClassyKitchen.
4. Flash Magisk or RMM-bypass-v3 in TWRP to protect your bootloader from getting locked again.
Backup your personal data at first, of course.
Click to expand...
Click to collapse
Almost done, but I can't find any custom rom available for download. Can someone help? Since wwith twrp I cannot install a stock rom. Thanks in advance.
I managed to flash a so called Ari's rom, but I think the phone is now bricked. It is on bootloop on the first screen of Samsung (with phone name and so on) and with SET WARRANTY BIT : KERNEL at top left. I think it is time to trash it or does someone have any hint? Thanks
Ecto1000 said:
I managed to flash a so called Ari's rom, but I think the phone is now bricked. It is on bootloop on the first screen of Samsung (with phone name and so on) and with SET WARRANTY BIT : KERNEL at top left. I think it is time to trash it or does someone have any hint? Thanks
Click to expand...
Click to collapse
I proposed three different options: custom rom, GSI (generic system image) or conversion stock firmware to flashable form. If there's no good custom rom for A6+, then don't worry - you can still try another options. Try playing with Generic System Images:
1. Flash your current stock firmware as usual in Odin.
2. Unlock bootloader and flash TWRP.
3. Go to TWRP.
4. Wipe partitions cache, dalvik, data, system (don't wipe vendor partition - it's needed).
5. Flash GSI image (recommended will be at first phhusson's AOSP (Android 9 or 10)) as "system image". You always need to choose and download "arm32_binder64" variant of img file.
6. Reboot to your new system.
Second option is to convert stock Android 9 firmware into flashable form.
1. Download ClassyKitchen tool.
2. Import downloaded Android 9 stock firmware (for your phone) into it and save it as flashable zip.
3. Go to TWRP.
4. Wipe cache, dalvik, data, system and vendor.
5. Flash your previously done zip with Android 9 as any other flashable zip in TWRP.
6. Flash Magisk or RMM-state-bypass-v3 in TWRP to prevent your bootloader from getting locked again.
7. Reboot.
I went for the second option, in Classykitchen I loaded the stock android 9 rom and selected
BUILD ZIP ROM (for recovery).
Then installed with TWRP following your wipe indications.
Success.
But when I went to install RMM-state-bypass-v3 I got the error impossile to mount /system.
So I rebooted twrp and before anything I manually mounted SYSTEM in twrp in the dedicated MOUNT menu, and I did everything again from wipe to install.
Is this procedure correct?
Success, success also for RMM-state-bypass-v3.
I rebooted but I'm again stuck in the same loop described in my previous reply.
When I selecr REBOOT in twrp, do I have to flag anything? For example System?
Regarding the first option, if I go there:
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
exactly which file do I have to download among ASSETS of any release?
Thank you very much
Ecto1000 said:
I went for the second option, in Classykitchen I loaded the stock android 9 rom and selected
BUILD ZIP ROM (for recovery).
Then installed with TWRP following your wipe indications.
Success.
But when I went to install RMM-state-bypass-v3 I got the error impossile to mount /system.
So I rebooted twrp and before anything I manually mounted SYSTEM in twrp in the dedicated MOUNT menu, and I did everything again from wipe to install.
Is this procedure correct?
Click to expand...
Click to collapse
Yes, it's correct. If RMM bypass or Magisk.zip was flashed without any errors in TWRP then everything is okay. Just reboot to system in TWRP after that - there is option to reboot directly to system. First boot always can take a bit longer than next boots.
Ecto1000 said:
exactly which file do I have to download among ASSETS of any release
Click to expand...
Click to collapse
You always need to get any "arm32_binder64" (always AB) image. Gapps or vanilla is just your choice. Just get Android 9 or 10 image and flash it as "system image" (but wipe at first partitions specified in my previous post - don't wipe only Vendor partition, because it contains important things). Android 12 GSI still aren't stable. Android 11 - maybe will work properly. Android 9 and 10 should work fine. There is even short article about GSI on Galaxy A6+ with some fixes for that device attached:
Samsung Galaxy A6 Plus (2018)
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
You can try of course other GSI's as well:
Generic System Image (GSI) list
Notes about tinkering with Android Project Treble. Contribute to phhusson/treble_experimentations development by creating an account on GitHub.
github.com
Thank you very much, appreciated.
But something weird happens: I install the ROM with success. If then I try to install Magisk (or Rmm) it fails with error 7.
And twrp says No Os installed if I reboot.
But if I try to install Magisk after rebooting into twrp after installing the ROM it goes without errors.
But anyway I have the issues of No Os installed.
Ecto1000 said:
Thank you very much, appreciated.
But something weird happens: I install the ROM with success. If then I try to install Magisk (or Rmm) it fails with error 7.
And twrp says No Os installed if I reboot.
But if I try to install Magisk after rebooting into twrp after installing the ROM it goes without errors.
But anyway I have the issues of No Os installed.
Click to expand...
Click to collapse
You need to reboot to recovery after flashing new system, because just after flashing TWRP doesn't recognize it - that is why you see that "no OS installed". Just reboot your phone to recovery again (you have such option in TWRP). In case of GSI (except maybe CAOS, LineageOS Q/R mod) Magisk or RMM bypass is not needed.
Btw, in case of any problems with hardware support on GSI flash also that patch in TWRP (it may be needed to mount "Vendor" partition in TWRP before flashing that fixes):
Fixes.zip
drive.google.com
Thank you again for your help.
I already rebooted to recovery and twrp keeps saying NO OS.
I'm using twrp 3.5.2_10-0.
I'm starting to suspect that this behaviour is due to the fact that this version of twrp could be too much new and unstable for my phone.
So I'd like to install an older version of twrp with Odin, as explained here:
TWRP for SM-A605FN Samsung Galaxy A6+
How to Install TWRP 3.2.3-1 on Galaxy A6+ SM-A605FN Android 8.0.0 Oreo. Once you installed TWRP recovery on your Samsung Galaxy A6+ SM-A605FN, you can customize it, Rooting or installing custom ROM
www.recovery-mode.com
But I cannot manage to go into download mode again, even from REBOOT menu of twrp it doesn't work, I keep staying in the loop explained before.
Moreover your first option of GSI need me to go into download mode to install the latest stock ROM with Odin.
I just manage to get into the attached screen.
Any idea?
Thank you again
It's not possible to ignore that message and just flash latest stock firmware via Odin? Odin refuses flashing latest stock firmware?
Other builds of TWRP for your devices you'll find here:
Releases · roynatech2544/TWRP_device_samsung_a6plte
Contribute to roynatech2544/TWRP_device_samsung_a6plte development by creating an account on GitHub.
github.com
But don't use TWRP older than 3.4.0, because it doesn't have support for "Vendor" partition.
Yes, I managed to ignore that screen and go in download mode again.
I tried to follow your first option since the second one was not successful.
Installed latest stock and then twrp 3.5.0-1.
Wipe as you explained, I flash the Gsi
system-quack-arm32_binder64-ab-gapps.img
The flash is very fast, but no errors, is it normal?
After that I reboot to recovery in order to flash
Disable_DM-Verity_ForceEncrypt_11.02.2020
it goes but just at the end it gives the error
failed to mount /odm no such file or directory.
And if I reboot to system the phone loops as always.
I'm losing all hope...
Ecto1000 said:
system-quack-arm32_binder64-ab-gapps.img
Click to expand...
Click to collapse
It's okay, but it's possible that you'll always need "vndklite" images for working camera.
Ecto1000 said:
The flash is very fast, but no errors, is it normal?
Click to expand...
Click to collapse
If you flashed it as "System Image" and it was successful then yes - should be fine. DM-Verity isn't needed for GSI - only RMM bypass v3 is sometimes needed (on CAOS, Lineage Q/R mod and maybe in case of some other images). On usual A600FN RMM bypass is not needed on phhusson AOSP. Just format "Data" partition (format, not only wipe) - it will remove encryption for you.
Procedure of flashing should be like that:
1. Wipe: cache, dalvik, data, system ("Vendor" partition leave untouched, because it's important for GSI - that is why you needed to flash stock firmware at first, because it adds vendor files for your phone, but it's needed only once, just don't wipe "Vendor").
2. Flash your GSI as "System Image".
3. Reboot phone (to recovery again).
4. Mount your "data", "vendor" and "system" partition.
5. Flash your zips: RMM bypass v3 (optionally Magisk).
5. Reboot to your new system now.
In case of any hardware support problems, reboot to TWRP again, mount "Vendor" partition and flash that fixes:
Fixes.zip
drive.google.com
Try to boot Android 10 or Android 9 images. If it will succeed, then you can try flashing Android 11 images and check what works, and what not. According to that article
nqnxev said:
It's okay, but it's possible that you'll always need "vndklite" images for working camera.
Click to expand...
Click to collapse
I don't know what are those images. Can you explain better?
When I proceed with RMM bypass V3 I see the errors in the attached image. It seems like there is a problem in writing to /system.
Can this be related to the hardware support problems you mentioned?
I tried with different versions of Twrp already and with Havoc Os too.
Should I try with flashing a different ROM ?
Thanks again
Ecto1000 said:
I don't know what are those images. Can you explain better?
Click to expand...
Click to collapse
Just look at filename of system images. But as I see, it's apparently important on Android 11 and newer. For now, try to boot Android 10 or 9. Let's try with that image:
https://github.com/phhusson/treble_experimentations/releases/download/v222/system-quack-arm32_binder64-ab-vanilla.img.xz
1. Decompress that image.
2. Copy to SD card or to internal storage.
3. Wipe cache, dalvik, data, system.
4. Format data partition (it's needed only once).
5. Flash downloaded and extracted file as "System Image".
6. Reboot phone to recovery (again).
7. Select in TWRP: Mount -> system, data, vendor.
8. Flash RMM bypass v3 (or Magisk).
9. Reboot now to system.
10. In case of some things not working, go back to TWRP and mount vendor partition (Mount -> tick "Vendor" -> go back to flashing zips) and flash that:
Fixes.zip
drive.google.com
11. Reboot to system again and check if now everything works properly.
Ecto1000 said:
When I proceed with RMM bypass V3 I see the errors in the attached image. It seems like there is a problem in writing to /system.
Click to expand...
Click to collapse
Yes, because you need to mount that partitions in TWRP:
Mount -> tick "system", "vendor" and "data" - and now flash whatever you want.
The only "receipt" which isn't giving installation errors is following your last instructions but avoiding to reboot to recovery after ROM flash (used Vanilla), and using Magisk v22 with unticked the line called "skip digest check" . See attached images.
Anyway, still no success to get into android.
Also tried fixes.zip.
Maybe I have to try with sideload ?
Ecto1000 said:
The only "receipt" which isn't giving installation errors is following your last instructions but avoiding to reboot to recovery after ROM flash (used Vanilla), and using Magisk v22 with unticked the line called "skip digest check" . See attached images.
Anyway, still no success to get into android.
Also tried fixes.zip.
Click to expand...
Click to collapse
Everything seems to be okay in your photos. What happens when you press "Reboot System"?
nqnxev said:
Everything seems to be okay in your photos. What happens when you press "Reboot System"?
Click to expand...
Click to collapse
The phone goes into loop with the attached screen and black screen alternatively.
On the top you can see SET WARRANTY BIT: KERNEL, it should be normal right?
Do I have to set something inside MOUNT of twrp before rebooting to system?
Ecto1000 said:
The phone goes into loop with the attached screen and black screen alternatively.
On the top you can see SET WARRANTY BIT: KERNEL, it should be normal right?
Do I have to set something inside MOUNT of twrp before rebooting to system?
Click to expand...
Click to collapse
I've never had such problem, but according to that thread it seems that it's a fault of modified kernel (so don't flash Magisk with GSI, because it patches kernel).
Try to flash stock firmware, unlock bootloader, flash TWRP, format "data" partition, wipe partitions (cache, dalvik, system, data) and flash GSI image as "system image". And reboot to system.
Don't flash RMM and Magisk for now - and check if system will run properly.

Categories

Resources