yashsingh1/xdaforums huggingface dataset:
[Android Software Development] WhiteWolf:
Sdcard problem exists on all devices I tested....and data was fixed by formatting and using kernel with no encryption....this recovery is pretty much done only sdcard doesnt mount....I have tried doing it like other samsung devices..but they mount sdcard straightforward...
[Android Software Development] ashyx:
Using the same card?

Which was advised a good few posts back.

I have built countless Samsung recoveries and the mount for the sdcard has always been the same.

Can you post the output of

cat /proc/partitions
[Android Software Development] WhiteWolf:
u0_a168@on7xelte:/ $ cat /proc/partitions

major minor #blocks name

7 0 98304 loop0

7 1 118028 loop1

7 2 2092 loop2

179 0 15388672 mmcblk0

179 1 4096 mmcblk0p1

179 2 4096 mmcblk0p2

179 3 20480 mmcblk0p3

179 4 8192 mmcblk0p4

179 5 4096 mmcblk0p5

179 6 4096 mmcblk0p6

179 7 4096 mmcblk0p7

259 0 1024 mmcblk0p8

259 1 8192 mmcblk0p9

259 2 32768 mmcblk0p10

259 3 38912 mmcblk0p11

259 4 8192 mmcblk0p12

259 5 4096 mmcblk0p13

259 6 90112 mmcblk0p14

259 7 1024 mmcblk0p15

259 8 1024 mmcblk0p16

259 9 512 mmcblk0p17

259 10 12288 mmcblk0p18

259 11 1024 mmcblk0p19

259 12 1536 mmcblk0p20

259 13 3072000 mmcblk0p21

259 14 204800 mmcblk0p22

259 15 61440 mmcblk0p23

259 16 5120 mmcblk0p24

259 17 11784192 mmcblk0p25

179 24 4096 mmcblk0rpmb

179 16 4096 mmcblk0boot1

179 8 4096 mmcblk0boot0

253 0 1048576 vnswap0

179 32 15558144 mmcblk1

179 33 15557120 mmcblk1p1

254 0 118028 dm-0

254 1 2092 dm-1

u0_a168@on7xelte:/ $
[Android Software Development] Captain_Throwback:
Have you tried mounting it manually while in recovery? Just to confirm it's actually working? Because the block device is there.
[Android Software Development] ashyx:
Partitions look like any other Samsung device.

I take it you have a 16gb sdcard? This is listed as partition

179 32 15558144 mmcblk1

179 33 15557120 mmcblk1p1

Have you actually tried a different card formatted to FAT?

---------- Post added at 01:39 PM ---------- Previous post was at 01:37 PM ----------

Whoops, sorry didn't mean to repeat, hadn't seen your reply before posting.
[Android Software Development] WhiteWolf:
yes
[Android Software Development] Captain_Throwback:
And? Does it work, or not? You have to help us out here. We're trying to help, but you're not giving us much to go on.

Can you please post the latest links to your device files, latest recovery log, and summarize what you've done/tried in a single post? I'm not really sure where we started at this point. I helped you fix touch in your kernel on IRC, right?
[Android Software Development] WhiteWolf:
u mean fat32 ? YES...

---------- Post added at 08:34 PM ---------- Previous post was at 08:32 PM ----------

sir yes u did helped and it worked.... and i have tried mounting but it doesnt mount at all....

and when i look at the card in diskinfo app...it shows it as sdfat format...whats that ?

EDIT: I have identified the issue..the default kernel of my device uses sdfat which combines both vfat and exfat format..i will patch it and retry
[Android Software Development] Captain_Throwback:
So if mounting it manually doesn't work, it tells us that the fstab isn't the issue. The issue is the card. Try reformatting the card in recovery directly using the TWRP terminal or adb shell:

mkfs.fat /dev/block/mmcblk1p1
[Android Software Development] matshias:
TWRP for new device (Lenovo YT-X703F and YT-X703L)

I've ported TWRP to a new device (or better yet 2 devices). It's the Lenovo Yoga Tab 3 Plus (Wifi and LTE version).

Here is the device tree:

https://github.com/Matshias/android_twrp_lenovo_yt_x703f

XDA support thread:

https://xdaforums.com/thinkpad-tablet/general/beta-twrp-root-disable-encryption-yoga-t3538017

I'd kindly ask for official support :o
[Android Software Development] MSF Jarvis:
Email bigbiff@teamw.in with this info, the thread is not monitored for maintainers seeking official support.
[Android Software Development] matshias:
Thanks. Will do so.
[Android Software Development] WhiteWolf:
I tried this in TWRP terminal...It said device not found....

Then I tried cd to /dev/block and did a LS

Didn't find this partition...

But when system boots this partition corresponds to external card... So system doesn't mount a sdcard when it boots ?
[Android Software Development] vampirefo:
I have a puzzle, I have been compiling TWRP recoveries for a while on many different devices.

Anyway today I ran into an odd problem, well it's odd or new to me.

The recovery compiled just fine, fastboot boot recovery all is well.

However flashing to phone disabled touch, even with flashed to phone fastboot boot recovery works just fine, but as soon as I boot into flashed TWRP no touch.

The kernel has no external modules.

Unpacking repacking same story TWRP touch works just fine fastboot boot recovery. But no touch no error on installed version.

Just wondering if anyone else noticed this before, and if so is there a fix?
[Android Software Development] NepoRood:
While using the TWRP that's loaded to the device, did you hook it up to your PC and in the shell do: lsmod?

I had a similar issue, and it turned out, my touch screen module was loading at the wrong time in init.rc :confused:

Moved it from "on init" to "on boot" and it solved my touch screen issue, may be worth looking into...

(Or, may have absolutely nothing to do with your case, lol)
[Android Software Development] vampirefo:
My kernel has no external modules, lsmod only list external modules.

Thanks anyway.
[Android Software Development] _that:
Compare the output of dmesg when booted via "fastboot boot" or from the recovery partition, especially the kernel command line. Also compare the output of

grep . /sys/class/input/event*/device/name

in both cases. Maybe your kernel is disabling touch in recovery.
[Android Software Development] vampirefo:
Thanks will give a try, when I get home, I think the kernel or bootloader or something is intentional disabling touch
[Android Software Development] ciko84xp:
Hi guys..

After porting TWRP on my smartwatch, i've the flipped screen issue. No problem with touchscreen X/Y.. only flipped screen.

There is a way to fix the issue adding "BOARD_HAS_FLIPPED_SCREEN := true" command line? But without make new build. I'm not so expert!

Can i add manually this command line somewhere in unpacked recovery folder of my kitchen? Or make a zip to flash via TWRP?
[Android Software Development] Captain_Throwback:
No. It's a build-time flag.
[Android Software Development] ciko84xp:
Oh no! Damn!

The problem isn't build new TWRP, but ubuntu repo sync etc... i've not understand the mechanism. :crying:

With "git clone" i've downloaded android_bootable_recovery folder....... but after this..................... WHAT?

Where i can set all my boardconfig.mk specs and TWRP specs (like "BOARD_HAS_FLIPPED_SCREEN := true")?

Help please!
[Android Software Development] kirito9:
See here How to compile TWRP from source step by step , it's pretty simple once you understand the basics and do a few compiles.
[Android Software Development] ciko84xp:
Thanx man.... i try.... pray for me! :laugh:
[Android Software Development] kirito9:
No problem, if you need any help with a specific step just post here.
[Android Software Development] opticyclic:
How do we add extra menus?

For instance I saw a Chinese unofficial build that had an extra menu in the "Advanced" menu that had options to root/unroot etc.
[Android Software Development] _that:
Edit the XML files in gui/theme.
[Android Software Development] opticyclic:
What should our make files be called?

device.mk?

device_<codename>.mk?

omni_<codename>.mk?

A combination?

What is the significance of each of the names?
[Android Software Development] opticyclic:
How are the twrp.fstab files being created?

Does the mkvendor.sh script creates a recovery.fstab file in the right format?

# mount point	fstype device	[device2]

/boot mtd boot
/cache yaffs2 cache
/data yaffs2 userdata
/misc mtd misc
/recovery mtd recovery
/sdcard vfat /dev/block/mmcblk0p1 /dev/block/mmcblk0
/system yaffs2 system
/sd-ext ext4 /dev/block/mmcblk0p2

It certainly doesn't look right as /system is listed as yaff2 instead of ext4.

Is there a separate script that creates it correctly?

Or do you have to take values from the mount command and create it by hand?

Is there a minimum set of partitions that you need to list?

Or do you need to add everything under /dev/block?
[Android Software Development] kirito9:
Mkvendor.sh is no longer updated. You can either create by hand or fork a similar tree and modify to fit your tree. Extract your recovery.img and check the mount points under /etc/recovery.fstab. Or use the diskinfo app to find the mount points.
[Android Software Development] opticyclic:
I'd rather not fork a similar tree as I want to understand how the file is created.

I am having trouble mounting the recovery.img and can't look at the contents right now.

If I create the fstab by hand by looking at mount, how do I know which mount points are required?
[Android Software Development] kirito9:
Just use any kitchen to unpack it, like Carliv Image Kitchen or osmosis's kitchen. You can choose to include all or just the basics , recovery, boot and system. Then if you have any custom partitions that's not on regular devices (custpack, cust, custom etc) then add those. Looking at that similar device tree really wouldn't hurt.
[Android Software Development] opticyclic:
Thanks.

I was already using https://github.com/xiaolu/mkbootimg_tools to get the dt.img. (Info about dtb is glossed over in guides too).

It seems to output the same as Carlivs Kitchen. I didn't realise that there was a recovery.fstab in there too though!

I ended up with this

/system ext4 /dev/block/bootdevice/by-name/system
/cache ext4 /dev/block/bootdevice/by-name/cache
/data ext4 /dev/block/bootdevice/by-name/userdata
/boot emmc /dev/block/bootdevice/by-name/boot
/recovery emmc /dev/block/bootdevice/by-name/recovery
/recovery2 emmc /dev/block/bootdevice/by-name/recovery2
/misc emmc /dev/block/bootdevice/by-name/misc
/persist ext4 /dev/block/bootdevice/by-name/persist

I removed these because the mount points were duplicated and it confused me.

/dev/block/mmcblk1p1 /sdcard fat nosuid,nodev,barrier=1,data=ordered,nodelalloc wait
/dev/block/mmcblk1p1 /storage/sdcard1 fat nosuid,nodev,barrier=1,data=ordered,nodelalloc wait
/dev/block/mmcblk1p1 /ext_sdcard fat nosuid,nodev,barrier=1,data=ordered,nodelalloc wait
/dev/block/sda1 /storage/usba fat nosuid,nodev,barrier=1,data=ordered,nodelalloc wait
/dev/block/sda1 /storage/usba fat nosuid,nodev,barrier=1,data=ordered,nodelalloc wait
/dev/block/sda1 /usba_sdcard fat nosuid,nodev,barrier=1,data=ordered,nodelalloc wait

Also, ls -l /dev/block/mmcblk1p1 and ls -l /dev/block/sda1 return no such file, which is also confusing.

Will excluding them prevent me writing to the sdcard?

Should fat be vfat?
[Android Software Development] Gaboros:
How can I build recovery smaller? My device recovery partition size is about 6144 kb large. The smallest build I could achieve was around 6,9 MB. I know it's possible because my device has a 5,4 mb large recovery. Unfortunately it's not my build I only used it for making the device tree.
[Android Software Development] _that:
Enable LZMA or XZ compression for the kernel and the ramdisk in the kernel config. You also need a custom mkbootimg.mk to do the lzma compression, similar to https://github.com/multirom-htc/and...ob/android-6.0-prebuilt/recovery/mkbootimg.mk
[Android Software Development] Gaboros:
Thank you I will check this out! Already have custom bootimg.mk for MTK header, I will try to add the compression into it.

---------- Post added at 10:30 PM ---------- Previous post was at 09:38 PM ----------

Didn't worked, it's already compressed, it won't get smaller. I just don't understand that the unpacked recovery ramdisk size is 2 mb while mine is 4. The sbin folder is a lot bigger. Can I throw out some feature to make it smaller?
[Android Software Development] _that:
4 MB doesn't sound that big. Encryption uses a big library, removing that will save a lot. To save more space, you can build a smaller kernel (you don't need networking or sound drivers in recovery, for example).
[Android Software Development] ashyx:
You can also remove parted from sbin if it's there.

I assume supersu isn't included.

It's also possible to use the lower res images.
[Android Software Development] opticyclic:
What's Up With 64bit?

I don't think I understand how the architecture flags work properly.

I am using the minimal manifest and branch twrp-5.1 as my kernel is 5.1.

repo init -u git://github.com/lj50036/platform_manifest_twrp_omni.git --depth=1 -b twrp-5.1 --config-name

Originally I had this and it compiled fine.

# Architecture
TARGET_ARCH := arm
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := msm8952
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_VARIANT := cortex-a7
TARGET_CPU_SMP := true

I then looked at the original build.prop and it had this

ro.product.cpu.abi=arm64-v8a
ro.product.cpu.abilist=arm64-v8a,armeabi-v7a,armeabi

So I changed the board flags to this, did clean and make and it failed to compile

# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
TARGET_CPU_SMP := true

I then added the TARGET_2ND_ARCH section and after clean and make it compiled again fine!

# Architecture
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
TARGET_CPU_SMP := true

TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := generic

Error:

Import includes file: /home/buildbot/android/twrp/out/target/product/NX529J/obj/SHARED_LIBRARIES/libsparse_intermediates/import_includes
make: *** No rule to make target '/home/buildbot/android/twrp/out/target/product/NX529J/system/bin/linker', needed by '/home/buildbot/android/twrp/out/target/product/NX529J/obj/SHARED_LIBRARIES/libbmlutils_intermediates/teamwin'. Stop.
make: *** Waiting for unfinished jobs....

Why is it not compiling with just the 64 bit flag but it is compiling with the TARGET_2ND flags?

When I have both is it still failing on the 64bit one and falling back to the TARGET_2ND arch?

If so, what is the point of that? It is confusing. Why would I put in a value that gets ignored?

Am I misunderstanding how these flags work and where to get the correct values for my phone?
[Android Software Development] dhruvsharma0011:
Hiiu dev plz help i can go to recovery mode to take backup but the select button is not workin i want to take buckap i am using micromax bolt a069
[Android Software Development] Captain_Throwback:
Wrong thread.
[Android Software Development] Deltadroid:
Can I build bootable/recovery from the android-7.1.1 branch on the android-6.0 branch?
[Android Software Development] kirito9:
Yessir :).
[Android Software Development] Deltadroid:
thanks, it worked. ;)
[Android Software Development] AndroidUser00110001:
With the Nvidia Shield TV when attached to 4k TV/monitor TWRP is not displayed on monitor. Is it just a theme thing or is there more to it?
[Android Software Development] _that:
I see no reason why it should be a theme thing at all, it should simply be scaled. Does it work with a 2K monitor? adb pull /tmp/recovery.log and dmesg, maybe something is wrong with the framebuffer.
[Android Software Development] AndroidUser00110001:
Works in 1080. I thought it should scale too. I do not have 4K to test with. I updated TWRP for the Shield 2017 models since official 2015 TWRP wasn't working on 2017 and some users have reported back that 4K does not work. Seems to be an issue with the official TWRP 2015 Shield too.
[Android Software Development] panda822:
Hi

I don't find any twrp for my phone Allview P7 Pro but I see twrp for Allview X2 Soul Xtreme (x2xtreme).

Someone told me that it will work any All view twrp because its the same functionality. Is it true? Is it safe to install this twrp for Allview X2 Soul Xtreme (x2xtreme) on my phone Allview P7 Pro?

Thanks!
[Android Software Development] STORMING BLOOD17:
What is the size of the source code.

I live in Libya and it has **** internet and its really limited.

Download speed (Max) :- 125 kilobytes ps

---------- Post added at 04:22 PM ---------- Previous post was at 04:21 PM ----------

Installing wrong TWRP will brick device
[Android Software Development] Matt07211:
I believe for the limited Mainfest it's at around 9 GBs. If internet is a problem take up Google's free cloud trial and build on it. You'll save a lot of data :)
[Android Software Development] STORMING BLOOD17:
Thx but one more question:-

Does google cloud require Uploading and wasting internet or no.
[Android Software Development] kirito9:
No. You connect to the cloud with your slow connection and use their speedy internet :).
[Android Software Development] sconnyuk:
Can anyone give me any pointers in here please?

Over at the XDA Fire TV threads Rbox has made a TWRP custom recovery for the Amazon Fire stick, as the Fire stick has no 'out of the box support' for OTG and obviously no touch interface, the recovery uses a countdown interface to wait for a connection through USB ADB then to select the recovery button with ADB commands. It USB ADB commands to navigate the menu, meaning having to plug the Fire stick into a computer everytime recovery is needed.

Im wondering what I would need to add a line of code to TWRP, preferably half way through the countdown, or even to have the code put in and do away with ADB.

End result for what I'd need it for is because I'm using a powered OTG I'd rather use a keyboard/mouse connected rather than unplugging fire stick and lobbing a laptop about.

Any help or pointers would be most appreciated, even if it's programs I need to open TWRP up to put the code in.

Thanks guys.
[Android Software Development] Demicro:
I have the kernel source code

twrp source code and the minimal manifest the three folders

so now what I have to do and where is the boardxxxx.mk :eek:
[Android Software Development] kirito9:
Create your device folder and build TWRP. What chipset is your device? Qualcomm? Mediatek?

Or use this autoscript by yuweng https://xdaforums.com/showpost.php?p=66030554&postcount=11.
[Android Software Development] Demicro:
Is J5 2016 Qualcomm
[Android Software Development] Matt07211:
No it will be bare minimal data usage as you'll be using there speedy internet
[Android Software Development] morfikov:
I have some problems with decrypting/wiping the /data/ partition using TWRP recovery. Basically I ported TWRP from a similar device, and it works well on my device,. I can't simply build the image from source for now, that's why I ported it, but I have a question concerning the /etc/fstab inside of the TWRP.

When I encrypted the /data/ partition, TWRP is unable to mount it or wipe it. I don't really know why. Everything works just fine when the partition isn't encrypted, but when I encrypt it, strange things happen.

Here's the data entry taken from the recovery.fstab file:

/data ext4 /dev/block/bootdevice/by-name/userdata flags=display="Data";backup=1;wipeingui;wipeduringfactoryreset;encryptable=footer;length=-16384;

When I look at the /etc/fstab file inside TWRP (using its terminal), it shows this:

Is the data entry normal compared to what I put in the recovery.fstab file? Maybe something was missing in the recovery image that I ported? Are there any specific encryption option that have to be use in order to just decrypt/mount/wipe the /data/ partition?
[Android Software Development] pushkar2gr8:
hello guyz i'm trying to build twrp for lava_a59 from scratch, i've kernel image and all necessary info for boardconfig.mk from device. recovery is building successfully but not booting up, and not event boot logo is displayed

before successful build "/bin/bash: / 2048 * (2048+64): syntax error: operand expected (error token is "/ 2048 * (2048+64)") " this error come up

will you help me

device specs:

processor: SC7731

Ram:512

rom:4gb
[Android Software Development] mustang_ssc:
After many weeks I've "successfully" built a twrp recovery for my Huawei T1 10 A-21W (codename: hwt1a21l and msm8916 chipset) but it keeps bootlooping everytime.

My TWRP device tree: https://github.com/Mustang-ssc/android_device_huawei_hwt1a21l/tree/twrp

ported from this one: https://github.com/dianlujitao/android_device_huawei_cherry/tree/twrp

My main question: Is there any compatibility problem if i use the kernel and dt.img files (located in the TWRP device tree) extracted from my Kit Kat stock kernel to compile it alongside the cm14-1 twrp source? I don't use the kernel source of my device because i'm completely unable to make it work, it's giving me errors everytime.

I'm starting to think that this could be the reason it doesn't boot up but didn't find any information about it.

Another question: Is the BOARD_KERNEL_CMDLINE parameter important to make the recovery work? I've saw on the /proc/cmdline file of my device this

console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom user_debug=31 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci androidboot.emmc=true androidboot.serialno=710bd621 androidboot.huawei_swtype=normal androidboot.huawei_bootmode=boot androidboot.localproppath=channel/de usb.serial=66Y6R15520001420 androidboot.baseband=msm mdss_mdp.panel=1:dsi:0:qcom,mdss_dsi_boe_nt51017_10_800p_video huawei,lcd_panel_id = 0

but on the one from my twrp device tree (BOARD_KERNEL_CMDLINE) i have this line from the original twrp device tree which i didn't change

console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 androidboot.selinux=permissive

so i don't know if i should edit that parameter or keep it like that.

Appreciate your help guys.
[Android Software Development] morfikov:
I've managed to fix the decryption issue by copying some files from the /system/vendor/ directory of my phone's stock firmware.

$ tree /media/Kabi/Android/omni-twrp-6.0/device/tp-link/tp802a/recovery
/media/Kabi/Android/omni-twrp-6.0/device/tp-link/tp802a/recovery
└── root
├── init.recovery.qcom.rc
├── sbin
│** ├── libQSEEComAPI.so
│** ├── libdiag.so
│** ├── libdrmfs.so
│** ├── libdrmtime.so
│** ├── librpmb.so
│** ├── libssd.so
│** └── qseecomd
├── ueventd.qcom.rc
└── vendor
├── firmware
│** ├── cmnlib.b00
│** ├── cmnlib.b01
│** ├── cmnlib.b02
│** ├── cmnlib.b03
│** ├── cmnlib.mdt
│** └── keymaster
│** ├── keymaste.b00
│** ├── keymaste.b01
│** ├── keymaste.b02
│** ├── keymaste.b03
│** └── keymaste.mdt
└── lib
├── hw
│** └── keystore.msm8909.so
├── libQSEEComAPI.so -> ../../sbin/libQSEEComAPI.so
├── libdiag.so -> ../../sbin/libdiag.so
├── libdrmfs.so -> ../../sbin/libdrmfs.so
├── libdrmtime.so -> ../../sbin/libdrmtime.so
├── librpmb.so -> ../../sbin/librpmb.so
└── libssd.so -> ../../sbin/libssd.so

7 directories, 26 files

And I have a question about these files. Is there a way to build them from source somehow, or do I have to include them in the device tree?
[Android Software Development] Captain_Throwback:
They are blobs. You just have to include them.
[Android Software Development] morfikov:
OK.

It looks like that the decrypted /data/ also fixes the wrong time issue.
[Android Software Development] morfikov:
I think I've found a better way to decrypt the /data/ partition. In the OMNI source there's a directory hardware/qcom/keymaster/ . How to build this keymaster so it could be included in the recovery image?
[Android Software Development] Surge1223:
No these are all proprietary.
[Android Software Development] morfikov:
What about this one?