Lets collaborate and port TWRP recovery & any custom ROM/GSI for M40 - Samsung Galaxy M40 Questions & Answers

I know there are none to very few tech users who use Galaxy M40, and that is the reason we do not have any custom recovery or ROM. But we can change that, I can see there are some active tech users who are interested in building/porting.
If we all collaborate and discuss our plan, then one day we can have custom TWRP and GSI working on our device.
As an initial step, what I have tried so far:
1. Extracted recovery.img from stock firmware (downloaded firmware, not from the device) with Android 11.
2. Tried to port TWRP using Samsung Auto TWRP recovery porter by Team Hovatek but it does not work and gives error at the end.
If anyone want stock recovery.img or any other file, reply.
What all have you tried so far...? Please share.

Kernel source is available at https://opensource.samsung.com/uploadSearch?searchValue=m40

We got first TWRP recovery, please verify if its working for you [Recovery] TWRP for Samsung M40 (SM-M405F)

rohitrss said:
I know there are none to very few tech users who use Galaxy M40, and that is the reason we do not have any custom recovery or ROM. But we can change that, I can see there are some active tech users who are interested in building/porting.
If we all collaborate and discuss our plan, then one day we can have custom TWRP and GSI working on our device.
As an initial step, what I have tried so far:
1. Extracted recovery.img from stock firmware (downloaded firmware, not from the device) with Android 11.
2. Tried to port TWRP using Samsung Auto TWRP recovery porter by Team Hovatek but it does not work and gives error at the end.
If anyone want stock recovery.img or any other file, reply.
What all have you tried so far...? Please share.
Click to expand...
Click to collapse
i have the same problem with Samsung Galaxy A7 Lite, here is twrp recovery tree:https://github.com/Skorpion96/gta7lite_recovery

Related

(TWRP Recovery) For Spreadtrum SC7731C Android 5.1 Lollipop

Hi. I just want to ask about TWRP recovery that is Compatible with my Phone :
Starmabile PLAY Click
Android 5.1 Lollipop
Spreadtrum SC7731
4.5"
Quadcore
Anyone with a Phone with same specs as mine that is using A TWRP ?
Please help. I wanna try yours.
Cant find on google with the same specs with my phone with twrp working.
I have tried those TWRP on google but none of them works. All of them take me Only to the Bootlogo. Only thing i know as of now is i have to port twrp to my stock recovery or to my phone.
Anyone please help.
maucerezo said:
Hi. I just want to ask about TWRP recovery that is Compatible with my Phone :
Starmabile PLAY Click
Android 5.1 Lollipop
Spreadtrum SC7731
4.5"
Quadcore
Anyone with a Phone with same specs as mine that is using A TWRP ?
Please help. I wanna try yours.
Cant find on google with the same specs with my phone with twrp working.
I have tried those TWRP on google but none of them works. All of them take me Only to the Bootlogo. Only thing i know as of now is i have to port twrp to my stock recovery or to my phone.
Anyone please help.
Click to expand...
Click to collapse
Hi Bro,
i have sc7731c (karbonn titanium 3D Plex ) device too. and i have tried many available img but none of them worked this would be because these devices are new and there no suitable recovery available simply because people have not made any till now..
There is many programs that allows u to create a new custom recovery if there is no recovery is available for your device try to goggle it.
On windows, philz magic touch recovery tool, android kitchen recovery image unpacker and so on.
Can i make you custom recovery using your stock image if you're too lazy
as i said above i have been trying to flash online available recoveries and accidentally flashed my stock u could help me out this
can u provide me you stock recovery image file ?
@Maucurezo
Hey dude! Im a pinoy. Im running with my STARMOBILE PLAY CLICK. As same as yours. Im running on the same Spreadtrum SC7731C and I flashed a Custom Recovery but it would only bring me to bootload. I kept finding solutions to get my Stock recovery but failed. We have the same Problem. I need the Custom recovery too. Help us admins
You can try and do it yourself. Porting TWRP and CWM to a new device. You'll need the stock rom for your device or simply make an image "dump" of the system files (boot.img, etc) via adb. Goodluck.
TWRP for sc7731c hope it helps
hi all a have a sc7731c phone on android 6.0 and i was able to install twrp on my device
it all started when i found a stock rom on the web (Google your device for stock - rom or - firmware)
once i had the rom i started searching for a way to extract the stock recovery from the rom
and i found this tool SPD_Upgrade_Tool_R4.0.0001 using this tool i extracted my stock
recovery from the ROM ( recovery.img ) , first stage complete i had a stock recovery
taken from a rom for my phone - brand and model must be right on the stock
firmware/rom or you risk damaging you phone (DO NOT CHEAT PLZ)
ps:wen you unpack the firmware/rom you should get a .pac file
ps:finding my stock rom took me several days of search.
now for STAGE 2 i had a stock recovery a needed to change it
for twrp another few days of search i came across a site
called hovatek here i found a tool to port (change) the
stock recovery to boot the twrp recovery the tool name is
[Hovatek] Spreadtrum (SPD) Auto TWRP Recovery Porter V1.0 by Team Hovatek (x86)
i run my stock recovery with this tool the tool creates a modified recovery on the
output folder( a few kb bigger ) stage 2 done.
STAGE 3
1- a fully working ADB, for this your best option is android-studio
2-turn on USB debuging and OEM unlock in DEV options
3-name the new recovery file recovery.img
4-your device has to be in USB MTP mode
5-if ADB is properly installed and Windows has the correct android device
driver you should be able to use these commands using android-studio's ADB
command-adb devices
-if the device is detected a serial number apears
command-adb reboot bootloader
-the device reboots to a black screen with small white letters saying FASTBOOT mode
command-fastboot devices
-the device displays the serial number again
command-fastboot flash recovery recovery.img
- if all went well it will say successful
command-fastboot reboot
-dont remenber if it booted straight to twrp or if i had to use power + volume up
-by the way on my phone to get in the default recover its 1 second hold power
and then with the power pressed for 1 sec add volume up 3 sec and let go of both
any way it worked i hope it helps ppl with these sc7731c phones
i have twrp 3.0.0 fully working
tips: youtube vídeos on how to use SPD_Upgrade_Tool_R4.0.0001
the hovatek site has a great tutorial on how to use the recovery porter tool
the last part the ADB commands was a ***** as Windows did not install my device
correctly and this is crucial -install phone driver manualy/Google device/Google android device. good luck
ps: all merit goes to the developers of these tool, a great ty to them :highfive:
ps: at the start i did NOT have root, the success flashing the ported twrp recovery
was followed bi the installation of the magisk15.3.zip and voila twrp+root
any one help me i port twrp using adb but after i flash my twrp upside down on sc7731ceb it works fine but the twrp upside down any help me
pauljack2 said:
any one help me i port twrp using adb but after i flash my twrp upside down on sc7731ceb it works fine but the twrp upside down any help me
Click to expand...
Click to collapse
humm,.. as far as i now adb does not port recovery image´s you mean you found an image for sc7731?? phone and there are at least 4 or 5 variations of the sc7731 board and you
flashed it on your phone, by shear luck you did not soft-brick or brick your phone and it actualy Works, :cyclops:
you need to search Google/xda/hovatek site for your brand and model´s stock recovery or even better your custom recovery
or as an alternative your stock ROM/FIRMWARE and then extract the stock recovery from ROM/FIRM port it and flash it
im prety shure someone out there has a phone like your´s and you can , when you find it download the stock recovery - the custom recovery - or the ROM/FIRMWARE file
the hovatek site has a great auto port tool all you need is your stock recovery follow the vídeo simple steps and flash it now that you have root just use
twrp oficial app to flash it ,se my tutorial above it will be easy once you have the stock recovery or rom/firmware
i have a 50 buck cheap phone wierd brand,it took me several days to find the stock rom/firmware once i did all worked just fine no strange stuff
hovetek site also has a lot of rom´s/firmware files for many brands and model´s , again search Google/xda/hovatek for your model + stock recovery or recovery.img, custom recovery.
good luck
i have stock recovery so i copy the recovery from my stock and i use carlivimg so i can unpack my recovery.img but i have really problem on upside down but i work fine i flash supersu on it now i have rooted my phone. my phone by the way is ding ding defi go SC7731ceb i use TWRP 3.0.2.0 it works fine but if you update the latest twrp you have problem on failed mount and .etc
ANY can help that upside down ??? thats my problem now on my recovery
but you can port recovery using fastboot
i commend
c:/adb>adb devices
adb>adb reboot bootleader
adb>fastboot flash recovery recovery.img
thats i port my recovery on sc7731ceb
using pc
pauljack2 said:
i have stock recovery so i copy the recovery from my stock and i use carlivimg so i can unpack my recovery.img but i have really problem on upside down but i work fine i flash supersu on it now i have rooted my phone. my phone by the way is ding ding defi go SC7731ceb i use TWRP 3.0.2.0 it works fine but if you update the latest twrp you have problem on failed mount and .etc
ANY can help that upside down ??? thats my problem now on my recovery
but you can port recovery using fastboot
i commend
c:/adb>adb devices
adb>adb reboot bootleader
adb>fastboot flash recovery recovery.img
thats i port my recovery on sc7731ceb
using pc
Click to expand...
Click to collapse
Go here https://forum.hovatek.com/thread-21669.html try and port again with this tool it worked fine for me.

How to switch from Cofface TWRP to another recovery

Hello guys, I'm Leonardo and I'm new on XDA. I own this device since July 2016, and throughout 1 year and a half I tried a lot of roms. I've seen a few roms based on Oreo and I'd like to try them, but every time i flash one of those roms, the device bootloops. I think the cause might be the Cofface TWRP I have installed on the but I haven't found a guide on how to switch from a recovery to another. Can you please link me a guide or, if someone already switched recovery, tell me the way to do that?
Thanks in advance
Leo
Just select install from twrp menu select image and choose the file of recovery then select the recovery partition
leoalbore said:
Hello guys, I'm Leonardo and I'm new on XDA. I own this device since July 2016, and throughout 1 year and a half I tried a lot of roms. I've seen a few roms based on Oreo and I'd like to try them, but every time i flash one of those roms, the device bootloops. I think the cause might be the Cofface TWRP I have installed on the but I haven't found a guide on how to switch from a recovery to another. Can you please link me a guide or, if someone already switched recovery, tell me the way to do that?
Thanks in advance
Leo
Click to expand...
Click to collapse
download Redworlf recovery (check if you have 2GB or 3GB variant) Select install from twrp menu select image and choose the file of recovery, then select the recovery partition and swipe bar.
I don't suggest using Red Wolf recovery since it is closed source and the code hasn't been properly audited, the same goes for ZCX, comes from some unknown china user (but so far it has been safe), it's up to you if you want to risk your phone and/or data, you have to ask why they are hiding the source code and for what reason, it could just be they are bad coders and don't want people to see messy code....who knows.
anyways I suggest using the official twrp, you might have to use the lazyflasher thing but at least you know you are getting a safe recovery and its great our device is getting official twrps we really don't need to use hacked ones.
if you want to use the OTA update feature I suggest just sticking with ZCX, or if you need access to additional partitions.

What is actually involved in porting a ROM

Hi all,
So i am no developer and never will be but I do like to understand what i am doing, why i am doing it when I see instructions on the internet. I have just been flashing an unofficial custom LineageOS 15.1 ROM on my Samsung Galaxy A3 2017 and suffice it to say that took hours of working out what i need and I am still not entirely sure I was hoping someone could explain it in simple plain english?
I have seen videos on how to create a custom ROM based on ASOP and read a guide about including hardware drivers before you compile. I guess if the vendor (ex. Samsung) they make their drivers for the hardware open source and you can get them that is a big plus, but i guess those drivers is not everything, i can imagine bootloaders, recovery, root etc etc also plays a role?
So when i wanted to flash my Samsung Galaxy A3 (2017) i go on to XDA and look for my phone and scroll through the forum. Only to find out not that many roms for that model. probaly down to popularity
Anyway i was instantly overwhelmed regarding unlocking the OEM bootloader, installing TWRP recovery and then root the device with SuperSu, installing ODIN etc etc.
So i wonder could anyone explain all this in much simpler steps? I mean the process i read was basically this:
Enable developer options
enable OEM unlock
Install TWRP using ODIN but i also needed something named RMM-State_Bypass.zip ?? not sure what this is this needed to go on SDCARD
reboot phone into download mode and using ODIN to flash TWRP recovery
Boot into TWRP recovery and flash that RMM-State Bypass file
Then i had to root using SuperSU (is Magisk not preferred now?). but for this i was asked to download SuperSU and a "no-verify-opt-encrypt-6.0" file. which I am not sure what is. then put them on SDCARD and boot into TWRP recovery
Then i had to format data reboot into recovery and then flash RMM_State again from above, then flash that "no-verify-opt-encrypt-6.0" file followed by flashing the SuperSU zip file.
Now reboot device and I was root.
Now what the heck did i just do with those files and why is root needed when i shortly after had to copy LineageOS 15.1 to the SD card. boot into recovery and wipe "system, data, dalvik, cache" and then flash custom ROM followed by GAPPS.
When you wipe System, data, cache and dalvik. does that not undo the root we did above? I do not understand
I guess those no-opt-verify file and RMM State bypass probably has something to do with bypassing some Samsung stuff on the device. but really i would love for someone to take the time to write something up in plain simple english, or if this has already been done point to it so that i can read it.
Probably completely crazy but i would love to do a personal CUSTOM ROM for Samgung Galaxy A3 (2017) based on AOSP with GAPPS and thats it. obviously drivers from Samsung so the hardware works. I am fairly certain that following guides on the internet i could create my custom rom, provided that i have the samsung drivers. but i have no idea really what i am doing and why in order to install TWRP and root etc
Feel free to PM me if you feel like that instead
anddd use magisk.

TWRP S912 for Android 9 64 BIT

Hello,
I just managed to generate TWRP recovery for S912 Android 9 version, you can install the official TWRP app to flash with in the ROM.
But after reboot the ROM goes back to stock recovery, so for now i am installing everytime i need to use recovery, unless i am able to find a permanent solution.
Link to TWRP
Suggestions welcome if you have for keeping the recovery persistent.
Regards
I was able to keep it persistent but if I go to install all I get for folder names is a mess. Using Superceleron's generic SC normal pie rom. Appeared to install magisk but magisk manager didn't see it and I lost superuser access so I had to reflash rom. I hope you or others can pick up on TWRP for this. Unfortunately I don't have the knowledge so can only test. Liking the Superceleron rom on my T95Z(2/16) much better than poison or stock (so far... still testing...). Glad to see these old devices getting some new love. Hopefully it will continue.
rickpub said:
I was able to keep it persistent but if I go to install all I get for folder names is a mess. Using Superceleron's generic SC normal pie rom. Appeared to install magisk but magisk manager didn't see it and I lost superuser access so I had to reflash rom. I hope you or others can pick up on TWRP for this. Unfortunately I don't have the knowledge so can only test. Liking the Superceleron rom on my T95Z(2/16) much better than poison or stock (so far... still testing...). Glad to see these old devices getting some new love. Hopefully it will continue.
Click to expand...
Click to collapse
Jumbled charcters is because the ROM is encrypted and this recoveery is not able to decrypt it.
Bumping this, going to test this on Aidans rom
Update: could not confirm if it works it looks like the reset button is not mapped on Aidans rom. The weird thing is it works if I use the USB burn tool but not when I do a regular boot.
Doctorbeefy said:
Update: could not confirm if it works it looks like the reset button is not mapped on Aidans rom. The weird thing is it works if I use the USB burn tool but not when I do a regular boot.
Click to expand...
Click to collapse
Do you mean we can flash using amlogic usb burning tool, I am now struggling to install this ROM on khadas 64 android 9 ROM by Highway star
Hi @eagledipesh!
I managed to install your TWRP successfully on Aidan's ROM, thank you very much!
First I unpacked the Aidan' ROM with the Customizatio Tool, then I replaced the original recovery with your TWRP. I repackaged the ROM and flashed it with the AMLogic USB Burning Tool.
With TWRP and I did a full backup and I was also able to restore without errors. However, after restoring and booting the system, it gets stuck on AndroidTV splash screen.
Maybe I need to port the correct TWRP, because when unpacking your recovery with AIK, I saw in one of the files that the model is gxm_q201_2g, but my Android Box is gxm_q200_3g.
1. What base TWRP did you use to create your TWRP?
2. I tried porting TWRP myself from Aidan's ROM recovery, I can even get into recovery, but the letters are all scrambled. Can you help me make my own port?
ulissesemuman said:
Hi @eagledipesh!
I managed to install your TWRP successfully on Aidan's ROM, thank you very much!
First I unpacked the Aidan' ROM with the Customizatio Tool, then I replaced the original recovery with your TWRP. I repackaged the ROM and flashed it with the AMLogic USB Burning Tool.
With TWRP and I did a full backup and I was also able to restore without errors. However, after restoring and booting the system, it gets stuck on AndroidTV splash screen.
Maybe I need to port the correct TWRP, because when unpacking your recovery with AIK, I saw in one of the files that the model is gxm_q201_2g, but my Android Box is gxm_q200_3g.
1. What base TWRP did you use to create your TWRP?
2. I tried porting TWRP myself from Aidan's ROM recovery, I can even get into recovery, but the letters are all scrambled. Can you help me make my own port?
Click to expand...
Click to collapse
I used one of the twrp port guides, twrp was stock one, with stock recovery extracted from initial Android 9 builds by Highway star'
You can use the official twrp as base and then recovery from any of rom for your device
eagledipesh said:
I used one of the twrp port guides, twrp was stock one, with stock recovery extracted from initial Android 9 builds by Highway star'
You can use the official twrp as base and then recovery from any of rom for your device
Click to expand...
Click to collapse
Are you talking about the Wiko Highway Star? Any special reason for using this ROM as a base? How do I know which version of TWRP to use?
i create a twrp for my amlogic T972 but can't boot into it, don't know where to start fix bug
Can you help me build a twrp for this? Or can you teach me do that? Thank you @eagledipesh
Is there now a working TWRP for the Yoka KB2 Pro 3gb on Android 9.0? I would prefer to have an img file, but if there is really no other way, I would also take the zip version.
Thank you and best regards

Kate - rom 8.1.4 global (official). How to keep twrp after rebooting?

Hello everyone!
I'm new to this. I have a kate and was able to unlock the bootloader. I installed a fastboot rom (8.1.4) that I downloaded from <https://xiaomifirmwareupdater.com>. I also downloaded a twrp from <https://twrp.me/> and installed it successfully via adb. Then there's this:
If I reboot to the system after twrp installation, it boots normally but when I try to enter twrp, it's not there, it enters standard recovery mode. So it seems it's not kept after rebooting.
If from Windows cmd I boot into twrp, there's no decryption process at the start (as I've seen in videos) and I can't install root (the option is not there). And worst of all, when I leave twrp and reboot the phone it wont start.
So because I'm quite limited in technical knowledge, my temporary solution is to reinstall the old rom again (8.1.4) and get the phone reset. I've already done this twice today.
I suppose I need to install some kind of zip file while I'm inside twrp to make it stay after rebooting (I've seen that for other devices). Is that correct? If yes, how can I identify and find this file, since at <https://twrp.me/> there was just the twrp listed for this device. No zip files there for kate/kenzo.
Any patient friend who would shed some light on this, please?
Thank you very much for reading this and for any help you can offer!
Best wishes!
GZ
Although I found it a little overwhelming at first, I found everything I needed here:
[NEWBIE GUIDE v2.0] MIUI ROMs, TWRPs, ZIPs, BACKUP, FLASH, RESTORE
UPDATED NEWBIE GUIDE v2.0 FOR REDMI NOTE 3 SNAPDRAGON (KENZO) (WORKS FOR ALL MIUI / AOSP / CM BASED ROMs) GUIDE SECTIONS : QUICK LINKS#1 : MIUI ROM | TYPES OF MIUI ROM | TWRP | TYPES OF TWRP #2 : TWRP FLASHABLE ZIPs | FULL PARTITION BACKUP |...
forum.xda-developers.com
Thank you!

Categories

Resources