yashsingh1/xdaforums huggingface dataset:
[Android General] Alixbot:
My device is the Revvl V (Newcastle) made by Wingtech under T-Mobiles own brand of phones (REVVL models), ADB Shell shows these partitions:

1|Newcastle:/dev/block/bootdevice/by-name $ ls
boot_a expdb lk_b metadata pad_a proinfo seccfg tee_a vbmeta_system_b
boot_b flashinfo log nvcfg pad_b protect1 spmfw_a tee_b vbmeta_vendor_a
boot_para frp logo nvdata para protect2 spmfw_b userdata vbmeta_vendor_b
dtbo_a gz_a md1img_a nvram persist scp_a sspm_a vbmeta_a vendor_boot_a
dtbo_b gz_b md1img_b oem preloader_a scp_b sspm_b vbmeta_b vendor_boot_b
efuse lk_a md_udc otp preloader_b sec1 super vbmeta_system_a

I am rooted and my device has an unlocked bootloader. I also have a backup I pulled through mtk-client since T-Mobile doesn't provide a stock firmware for this device, I'm trying to create a TWRP for this. I was able to use AndroidImageKitchen to pull apart the boot partitions, and I have a TWRP from the BLU G9 which uses the same chipset. I just don't understand what to adjust to port the TWRP.
[Android General] gnufirmlink067:
Boot partitions do you mean recovery partitions? You have to modify the recovery partition not the boot partitions you could get the recovery image by downloading partitions backup in Google play or search for partitions backup apk

Or in dev/block

Search for recovery

Look through every folder and look for the recovery

But first look in /dev/platform/by-name

And on what to adjust before I say it if some of these file aren't there then don't worry anyway here are the files

first switch the kernel and in the ramdisk it is default.prop and prop.default in etc switch the recovery.fstab any file with the extension .rc now go back to ramdisk and in every folder and in the ramdisk look for fstab.something BTW the something could be anything and if you find these files in other directories or just in the ramdisk still switch them And also depending on your phone the files that i just said may be in different directions fx the etc may be in /system/etc if your on Ubuntu this will be very easy go in the ramdisk and search for all the files that I just said like .rc recovery.fstab etc

and I still recommend using the android_boot_image_editor because on some phones AndroidImageKitchen doesn't extract all the blocks

BTW the BLU G9 twrp is it a 32 bit operation system or 64bit because if your device is a 32 bit and your porting a 64bit this will not work and so if your device is 64bit and porting a 32bit easiest way to check this is by clicking on the twrp recovery and then looking for the size if it's around 64mb then it is for a 64bit operating system if it's around 32 mb then it's for a 32bit operating system also do this on your stock or the recovery.img that is in your phone like the original one

And also to answer why your phone boots normally when booting into recovery it is because your mistakenly changed the files of the boot image and thus it became a boot image and not recovery image like you wanted.
[Android General] Alixbot:
I'll get right on it! This was very very informative.
[Android General] Alixbot:
I don't know if you got a chance to see my partitions I listed I don't seem to have a recovery partition. I keep seeing people say it's included in the boot.

So after I built a twrp like you suggested, I go to flash to recovery, and I got:

Warning: skip copying recovery image avb footer (recovery partition size: 0, recovery image size: 27893760).
Sending 'recovery' (27240 KB) OKAY [ 0.686s]
Writing 'recovery' FAILED (remote: 'This partition doesn't exist')
fastboot: error: Command failed
[Android General] HosamMohamed:
my device cubot x50

i usded twrp cubot x30 as same SOC

and made all changes

but when flash then reboot recovery

a black screen shows until 5 Second then phone reboot to system

how can i solve problem?
[Android General] kevinrivm:
Hello,

I'm trying to port a twrp for a tv stick model x96 s400 but I face an obstacle which I couldn't find any solution in this thread or in internet.

It seems that /system partition don't have mount point because it is in an overlay system, this is the output for the ls -l in /dev/block/by-name/

Reserve0 -> /dev/block/mmcblk0p16

UDISK -> /dev/block/mmcblk0p17

android_expand -> /dev/block/mmcblk1p2

android_meta -> /dev/block/mmcblk1p1

boot -> /dev/block/mmcblk0p3

bootloader -> /dev/block/mmcblk0p1

cache -> /dev/block/mmcblk0p7

empty -> /dev/block/mmcblk0p14

env -> /dev/block/mmcblk0p2

frp -> /dev/block/mmcblk0p13

media_data -> /dev/block/mmcblk0p15

metadata -> /dev/block/mmcblk0p11

misc -> /dev/block/mmcblk0p5

mmcblk0 -> /dev/block/mmcblk0

mmcblk0boot0 -> /dev/block/mmcblk0boot0

mmcblk0boot1 -> /dev/block/mmcblk0boot1

mmcblk0rpmb -> /dev/block/mmcblk0rpmb

mmcblk1 -> /dev/block/mmcblk1

private -> /dev/block/mmcblk0p12

recovery -> /dev/block/mmcblk0p6

super -> /dev/block/mmcblk0p4

vbmeta -> /dev/block/mmcblk0p8

vbmeta_system -> /dev/block/mmcblk0p9

vbmeta_vendor -> /dev/block/mmcblk0p10

I could make the twrp port without specifying the /system partition in twrp.fstab and recovery.fstab but in twrp log it shows the following

Unable to find partition for path /system' E:Bind failed

I also follow the instructions for mediatek devices, trying to search with root explorer the partition symlink for /system and I couldn't find.

Can you help me please @Augustoandro thanks !
[Android General] Augustoandro:
Try installing the Diskinfo app, if it available for this device.

Put whatever value of /system in the fstab that you come to find through the Diskinfo app.
[Android General] sajibrgd:
how to add these partition into twrp.fstab, how to write please give an example
[Android General] Isrgish:
@Augustoandro

First I want to thank you for this great guide. I have used it in the past fo my Lenovo Tab 8 TB-8705F with great success.

Now I want to make a port for my Lenovo Legion Y700 (TB-9707F) and I have a few questions.

I'm using the official TWRP for the Lenovo Yoga Tab 3 Plus Wifi (yt_x703f) since it has the same resolution (1600 x 2560).

I have a few questions.

1. The TWRP img doesn't have twrp.fstab, there is a recovery.fstab should I use this instead of the twrp.fstab?

2. There isn't a uevent.rc in the stock ramdisk folder but there is in the ramdisk/etc folder, should I copy this to the twrp ramdisk folder.

3. In the ramdisk folder of the twrp img there is a file called ramdisk-files.txt that has a list of all the files in ramdisk and it's sub-folders, then there is this file ramdisk-files.sha256sum that I would assume is a checksum for the first file. should I update this files according to the changes I'm making in the ramdisk?

Edit

4. My device has 2 slots how do some of the devices have 2 separate devices one with _a ant the other with _b added to its name. How do I enter it in the fstab file? For example the dtbo device has /dev/block/sde17 for slot a and /dev/block/sde40 for slot b.

5. Some of the devices that are currently in the twrp fstab don't appear in the stock fstab. Should I look for them on my device and add them into the new fstab I'm updating?

I would appreciate any help you can give me.
[Android General] Isrgish:
I finally attempted this with a twrp for the Samsung Galaxy Tab S7+(SM-G978U). I was able to flash and enter into recovery but all I see is a blank screen with first a gray line at the top. Then it turns blue I can see some half letters. See pic 1 & 2. I then toggled the power button I got a blue screen with the line at the top with battery status time etc. but nothing else as in pic 3

I then tried the shamu twrp from post playing with different options butt only get a bootloop.

I'm attaching the recovery.fstab and twrp.fstab I used for the shamu port as well as the recovery.fstab I used for the Galaxy Tab S7 port.

Edit

Added another 2 pictures that are a little clearer.

Please help me with this.
[Android General] Isrgish:
Here are the fstab fikes fir some reason they didn't attach to the previous post

I will also try tomorrow to get better pictures of the recovery screens.
[Android General] golu8:
* Failed

Cannot even use power button to turn off bootloader warning but restored system with old recovery file

Same happended with fastb Patch-recovery https://github.com/Johx22/Patch-Recovery/issues/33

* What was different from tutorial

1. Did not find files in stock ramdisk and i copied these

1) fstab (but found in ramdisk/first_stage_ramdisk/fstab.mt6769t)

2) ueventd.rc (but found in system/etc/ueventd.rc)

2. Copied recovery.fstab content to twrp.fstab

3. Found 5 persist.sys.usb.config=mtp properties (3 were auto generated) and i edited them all

* Device info

Samsung M325F

Android 13
[Android General] golu8:
Retried without fstab and retried without fstab and ueventd.rc but failed again
[Android General] golu8:
I also cannot find uevent file in ramdisk but found in ramdisk/system/etc
[Android General] Disshi:
Can someone help me port TWRP? I will provide stock recovery, I have already tried it my self and I couldn't do it which is the reason i'm asking here, If anything else is needed from me I will provide

Thanks!
[Android General] golu8:
your device's screen resolution
[Android General] Disshi:
720x1440
[Android General] Disshi:
Thanks do you know how to fix one thing tho?

Everything else is mounted other than /system

In /dev/block/platform/bootdevice/by-name/

There is only found these

```

boot
boot_para
cache
dtbo
expdb
flashinfo
frp
gz1
gz2
Ik
Ik2
logo
md1img
md_udc
metadata
nvcfg
nvdata
nvram
otp
para
persist
preloader_a
preloader_b
proinfo
protect1
protect2
recovery
scp1
scp2
sec1
seccfg
spmfw
sspm_1
sspm_2
super
tee1
tee2
userdata
vbmeta
vbmeta_system
vbmeta_vendor

I dont know what location I should use for the system partition
[Android General] Disshi:
any help?
[Android General] jeff_0618:
some phones does not have a stock recovery.img

any ideas how to port this?
[Android General] Apostalus:
Any chance you would be willing to build TWRP for my device? It's the Nubia RedMagic 7 Pro. Pretty Please?!?!?!
[Android General] Fyramiz:
Could aomeone please make a ported recovery for my device:

Name: N-one Npad Air

Code name: NpadAir

Resolution: 1280x800
[Android General] alfanveykov:
Why dont include a reference for us to read ?
[Android General] Fyramiz:
What do you mean i putted a boot.img do you see cuz i putted it if its not available i can repost it
[Android General] Даняxxl_pro:
people, please help me port TWRP recovery to infinix note 12 pro 4g (x676b...v2074)
[Android General] im-izz:
any luck dude?
[Android General] Fyramiz:
Why do people still port while they can use the free hovatek build
[Android General] im-izz:
thank you for the suggestion I will try that tool, and btw if I install this tool can my phone's fastboot, download, recovery modes still get locked on my infinix? cuz my other infinix is locked and i can't access anything to flash anything onto it. I wanna know if I can use that build tool and if it gets build successfully can I install that twrp on my other infinix so even if i corrupt anything I always got myself backed with the twrp so I can flash my stock rom again?
[Android General] Fyramiz:
Well, this tool is a build tool, and it's a web tool, it builds twrp out of somefiles you give it like boot.img and vendor_boot if you have it, then you probide some build configs(optionals) and the resolution for phone, also i would suggest trying the builded image on the corrupted phone, so you won't brick the other device, more informations here: https://www.hovatek.com/twrpbuilder/
[Android General] im-izz:
What android version should I select tho? my current or the one that the phone came with?

and about that phone that is bricked, I already told you that it is locked I can't access download mode / can't run adb commands / can't restart to any mode (fastboot, recovery, etc.) so I can't flash it to that bricked phone.
[Android General] Fyramiz:
The version that the phone came with, also I don't recommend that you do this, this question is kinda a noob one = when you get a harder situation you will not be able to do something
[Android General] im-izz:
and btw I didn't noted that when I installed magisk on that (now bricked) phone I didn't run the abd vbmeta disabling command and I just installed magisk, it wasn't in that tutorial I watched :/ I don't know if this is whats causing the bootloop when I try to boot into recovery and stuck in the logo animation every time i modify something in magisk app.
[Android General] Fyramiz:
Magisk boots = no problem with vbmeta

Magisk doesn't boot = problem with vbmeta

Magisk being able to boot but without any changes in the app meaning that this is a problem with the app or the project at all, consider visiting the magisk github issues page, it will be better and trust they probably will share some valuable info that will further help
[Android General] Danny.69:
hello, I have the guide and I have ported twrp, but I have several problems,

1- touch screen does not work

2- adb does not work from twrp

3- mouse otg works, I can click, but I can not leave pressed, if I leave pressed, it does an intermittent click

I have tried to port devices with soc tegra k1, same as my device.

twrp ports:

twrp shield tablet 2.7

twrp shield tablet 2.8

twrp shield tablet 3.0

twrp shield tablet 3.1

twrp xiaomi my pad 3.1

in all cases, the exact same thing happens.

I must boot twrp with the fastboot boot twrp.img command, since my recovery partition is 8mb, and can not enter twrp, when I have twrp, I will try to enlarge the partition.

adj. recovery. log, and kernel.log, if any expert sees what is wrong.

thanks in advance
[Android General] Alando123:
Ubuntu issues, lol

I am attempting this on Kubuntu 18.10, however when the image is unpacked I end up with 2 encrypted folders from stock recovery.img.. I am not root, and Kubuntu creates a root user with no password upon install, so I can't edit because I am not the owner (according to Kubuntu). Is there a way to work around this?
[Android General] alecxs:
CTRL + ALT + T

(where ~ is folder)

sudo -H -u root xdg-open ~
[Android General] Alando123:
Hi, thanks.. but I actually have Kubuntu installed.. I made an error while typing.. i thought they were the same.
[Android General] Aalesund:
Hello, i've tried to port TWRP for my old Prestigio PMT5487_3G with MT6582 chipset and resolution 800 x 1280. Kernel: 3.4.5 If that matters.

I've used this TWRP 3.1.1 - https://xdaforums.com/lenovo-a3500/development/recovery-twrp-3-11-lenovo-a3500-t3684225 because it is for MT6582 (800x1280) and I think it will be compatible.

But I'm facing some problems with fstab files and partitions.

I have no "fstab" file in ramdisk folder from unpacked TWRP, I'll put my "fstab" from stock ramdisk folder.

Also I have "ueventd.rc" and "ueventd.goldfish.rc" in my stock ramdisk folder. So, I'll put only ueventd.rc to twrp, but waht about my stock ueventd.goldfish.rc? It's needed or not?

But, okay now is the real problem.

In unpacked twrp's folder "ramdisk/etc" I have only "recovery.fstab", there is no file "twrp.fstab".

And my stock recovery.fstab says:

# mount point	fstype	device	[device2]

/boot	emmc	boot
/cache	ext4	/dev/block/mmcblk0p2
/data	ext4	/dev/block/mmcblk0p3
/misc	emmc	misc
/recovery	emmc	recovery
/sdcard	vfat	/dev/block/mmcblk0p4
/system	ext4	/dev/block/mmcblk0p6

But I'm not sure about partitions, because the DiskInfo shows different partitions.

Here is 2 screenshots from DiskInfo - https://imgur.com/a/yW9edrE

Root Explorer screenshot - https://imgur.com/a/L2g4ox9

For example: recovery.fstab says "/dev/block/mmcblk0p6" is system, but Diskinfo says "/dev/block/mmcblk0p5" is the system?!?

And all others partitions are different: "data" is "/dev/block/mmcblk0p3" or "/dev/block/mmcblk0p7" ?

I'm not sure recovery.fstab has show the correct partitions!

Maybe I should changes the entire partition info in my stock recovery.fstab to match with the real partitions in DiskInfo?

What to do?

I hope you can help me.
[Android General] Augustoandro:
The partitions shown by DiskInfo are the correct ones, edit your recovery.fstab accordingly.

If there is some file missing, create it.

I have recommended the TWRP images in the thread because they are suitable for most of the devices, I strongly believe you should use one of those. But if that fails, you are free to use the one you are working with right now.

And put the ueventd.goldfish.rc in the twrp to be ported.

HIT THANKS IF FOUND USEFUL
[Android General] Frost199:
yep
[Android General] MiSSigNNo:
I tried this method with the motorola nexus 6 image for a MTK6797X (Helios x27) device (chuwi hipad) . The problem is that no matter what I put on the twrp.fstab I found this errors in TWRP:

unable to mount storage

unable to mount system

(essentially unable to mount anything)

Then I though: maybe if I do this exact method using the older brother Hi9 Plus (same X27 proc) already functional TWRP, then it may work:

My wrong: I tried to unpack that TWRP and follow the same instructions, but it does not even boot into TWRP, it gets stuck in the boot screen :(

(at least with motorola nexus 6 twrp it did boot into TWRP :( )

There is only one thing strange with all this process: I downloaded DiskInfo and contrarily to all the screenshots I only can see the mount points, but not the sources (I have activated all the advanced options, and I even have the pro version)

Here is a screenshot:

Now I'm in a deadend now with this topic.
[Android General] samsungics1200:
tried porting this on Xiomi redmi go successfully but

/data is not readable

/system size is unaccurate

internal and sd card not detect also

help

tried this on Oreo go
[Android General] bacon612:
Hi i am unclear on this state of your directions as well as this post here.

Which fstab contents are copied over which?

Does recovery.fstab get copied over by twrp.fstab?

At present they are not identical, to make them identical, one has to be copied over the other. This is very unclear to me.

Any help would be appreciated. Thanks for your efforts.
[Android General] I1V1A1N:
Is it possible to make twrp from boot.img? They are very similar.
[Android General] samsungics1200:
finally fixed all bugs but

is this ore treble support twrp i use the asusnexus720123g twrp to port for xiaomi redmi go oreo
[Android General] SachinBorkar:
I think if users cannot able to boot after porting twrp.

They need to find device with same specification as they have with same kernel ( at least same kernel ) and port it to their device.
[Android General] Augustoandro:
Copy the contents of recovery.fstab to twrp.fstab
[Android General] samsungics1200:
is this oreo treble support

can you help me port a twrp treble support i have ported the 720 twrp but i am not able to install a gsi
[Android General] 2001ABHI:
Hello i tried everything but im still stuck in a bootloop
[Android General] SachinBorkar:
What is error 7 and how to solve this?

/* Sorry! if I am off topic */
[Android General] SnowFuhrer:
It means the zip isn't made for your device.
[Android General] Marvin732:
For some reason even though i copied everything over from recovery.fstab to twrp.fstab, it cant find dalvik cache and the phone storage, i sometimes see two internal storages there and also reboot to system via TWRP doesnt work :/
[Android General] NFSP G35:
I was able to get TWRP to boot using this method for an ONN (Walmart) 10" tablet which has a MediaTek MT8163.

I think the fstab still needs tweaking, but that's less of a concern at the moment.

The big issue I'm having is that the touch screen is rotated 90deg compared to the display (display is portrait, touch is landscape)

default.prop had `ro.sf.hwrotation=90` and I tried changing it to 0, 180 and 270 with no effect.

Everything I find online says to build from source and set RECOVERY_TOUCHSCREEN_SWAP_XY, but I can't do that since I'm not building from source.

So I'm kinda lost on how to rotate the touchscreen
[Android General] alecxs:
have a look into ui.xml, portrait.xml, and splash.xml
[Android General] NFSP G35:
I did, and I work with HTML/XML all the time, so I get the idea... But I didn't see anything that looked like it would control rotation (unless I just missed it)

Can you elaborate on anything specific?
[Android General] peshmarga:
great tutorial I ported successfully for my device but i have a problem with it

when i try to enter twrp recovery it works good but it says

Failed to mount '/data' (Invalid argument)

Unable to mount Storage

please help me with this problem

and (Internal Storage shows (0MB) )
[Android General] alecxs:
look in other fstab files how to mount encrypted userdata, or format data
[Android General] eginugraham:
So, i kept getting messages about device has failed verification whenever i tried to boot into my recovery. I am new to this so i dont know whad needs to be done.

Do i need to disable dm verity, by modifying boot.img? If thats the case how do i remove verity from it? Because i tried to search something like that, the tutorial said to remove something like "wait, verify" but there are none of that line in my boot image. Could anyone give insight on what i should do? Would be appreciated thanks.
[Android General] alecxs:
patch with Magisk or Universal DM-Verity ForceEncrypt Disk Quota Disabler
[Android General] eginugraham:
[MENTION=4646731]Alecxs[/MENTION]

Unfortunately i don't have root access

*edit

I see, you can use magisk app to patch it, thanks

Edit**

After i manage to patch boot.img, then i flashed it using sp flash tool, reboot, same result, still can't verify

**

Im not sure if my device bootloader already unlock or not
[Android General] rajeshca911:
Samsung M40 Recovery port issue

Dear Dev

Im using Samsung M405f aka M40 [ soc :Snap Dragon 675 and Res: 1080x2340 px, 409 PPI] same as Xiaomi Redmi Note 7 Pro

Stock-M405F Recovery

Redmi-Note-7-TWRP

I have followed your steps and to my surprise, I did not find fstab.xxx in my stock recovery. I skipped the step 16.B since i did not have any fstab files except recovery.fstab later I repacking my recovery.img and converted into recovery.img.tar using 7zip to make it odin flashable. after Successfully flashing I rebooted into recovery by pressing Vol+ and power button and to my surprise it boot into stock recovery which I have not expected.

I request you to inspect both the official twrp of another device and my stock recovery , so that there would be a clear picture of things to consider while building twrp for my device which would very help for script buddies like me
[Android General] lboriginaltattoo:
Help walmarts onn tablet is frp locked

im kinda fresh to flashing and have not really used twrp to alter any devices OS. I tried following along with this guild in hopes that id find a soulution in getting passed this frp. but to no avail im still looking at a high-tech paper weight. could maybe someone help me. I don't know what version android it is running and when I try to factory reset it I get a menu written in my guess would be maybe Korean. model number is ona19tB007
[Android General] tanjir.h:
Dear [MENTION=8355838]Augustoandro[/MENTION] Sir,

Successfully ported a TWRP from Redmi Note 5 Pro to my MI 8 SE. Everything pretty much works flawlessly but only issue I've got is that my PC detects my device as Redmi Note 5 Pro and not as MI 8 SE when in TWRP recovery mode. Any way to fix that? Thanks.
[Android General] Jjc1492:
Twrp for vivo y15 2019

Can anyone make a flashable twrp(to be installed using sp flashtool) for my device? please...
[Android General] Augustoandro:
This is not a request thread.
[Android General] Augustoandro:
This is not a request thread. Read the first post for the link to request thread or feel free to try out the steps in this guide.

HIT THANKS IF FOUND USEFUL
[Android General] IamTheBRAVE:
I made twrp img for the samsung galaxy A20e with help from this guide. It boots but touchscreen is not working. Any solution to that? Portrait.xml, ui.xml don't have any variable for touchscreen...
[Android General] redymedan:
Brother, could you show us steps by steps how to create the TWRP IMG for Galaxy A20e, thank you
[Android General] IamTheBRAVE:
Sorry, in the end it did not work. It needs to be built from aource. That's why i was asking for help here.