yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Ibuprophen:
The Google's (as well as XDA's) Database uses the Metadata system.

So, when you perform searches, always remember to use key words and try leaving out words like "and", "the", "if", "or", etc... because the search will also look for and provide results with those words separately too. Also, try variations to the key words.

For example, looking up something like...

"Unlocking the bootloader for the Verizon Samsung Galaxy S3 SCH-I535 d2vzw"

Would get results but, you'll get better results by using something like...

"Unlock bootloader I535 S3"

And also use variations for different results like...

"Unlock bootloader d2vzw"

There's a ton of other methods and caveats to it (like using the OP OR AND for Metadata) but that's kind of an abridged system.

It's a challenge to explain via text but, i hope i had explained it okay.

I had mentioned, while in a chat with an XDA Admin about, sometime, posting a forum of How-To style thread about how to optimize searches within a Metadata system and he really was supportive and wondered why it wasn't done before. LMAO!!!

I hope i had helped and Keep On Searching!

Sent on my Communicator [SCH-I535] from the Bridge of the U.S.S. Enterprise...

***PLZ THANK ME WITH A THUMBS UP***
[Android Software Development] pvineeth97:
Is there a way I can change the splash screen and menu options in TWRP before compiling it? :D
[Android Software Development] _that:
Yes. Look in gui/theme.
[Android Software Development] pvineeth97:
What if I change the files in gui/theme and I want the original files back when I did "repo sync" for the first time. What to do?
[Android Software Development] ashyx:
Just make a copy before modifying.
[Android Software Development] pix106:
Or you can copy theme files in your device tree, and use TW_THEME flag
[Android Software Development] pvineeth97:
TW_THEME is something different from what I asked.
[Android Software Development] pix106:
My bad : the flag i wanted to mention is TW_CUSTOM_THEME
[Android Software Development] _that:
Not really a TWRP-specific question:

cd bootable/recovery
git reset --hard HEAD
[Android Software Development] Matt07211:
Just gonna mention this, Google has recently been improving on this fact, so now you can ask more humanlike questions with stuff like "the", "when" etc.

So it's not as a pressing problem as it use to be.
[Android Software Development] morfikov:
What is needed in order to add support for partitioning SD card? It looks like the TWRP recovery is missing sgdisk:

I:operation_start: 'Partition SD Card'
Partitioning SD Card...
I:sending message to remove 65538
I:[MTP] mtppipe remove storage 65538
I:Message sent, remove storage ID: 65538
I:sd card mount point /sdcard1 block device is '/dev/block/mmcblk1', sdcard size is: 1882MB, fat size: 1882MB, ext size: 0MB, ext system: 'ext4', swap size: 0MB
Removing partition table...
I:Command is: 'sgdisk --zap-all /dev/block/mmcblk1'
sh: sgdisk: not found
sgdisk --zap-all /dev/block/mmcblk1 process ended with ERROR: 127
Unable to remove partition table.
Updating partition details...

---------- Post added at 03:54 PM ---------- Previous post was at 03:34 PM ----------

I have another question.

How to reduce the screen lag, for example when I scroll pages in the terminal? The same problem is when I wanted to use a mouse to test the OTG feature. It lags as hell, and without fixing this issue, the mouse is simply useless.
[Android Software Development] ashyx:
[MENTION=4878287]_that[/MENTION]

Quick question, does Omni 6.0 branch have support for building twrp with Android 7.0 kernels or am I going to run in to version issues?
[Android Software Development] Captain_Throwback:
If your device kernel ships with Android 7.x, then you're better off building in the 7.1 tree.

EDIT: Well, maybe, lol. I have a device that initially shipped with 6.0, was updated to 7.0 and needed a kernel update to boot on updated devices, but works better when built in the 6.0 tree. So it really depends. Sometimes it's better to stick with an older tree, if the device initially came with that version of Android. But if it comes/ships with the newer version, trying to build in an older tree likely will have issues.
[Android Software Development] ashyx:
I get what you're saying and I may just have to suck it and see. I'm trying to avoid downloading a shed load of source code just to compile for 1 device that ships with nougat.
[Android Software Development] hell_lock:
By resolution I mean the value which I have set in the boardconfig. But still that bug is there.
[Android Software Development] AbduL_PT:
And i meant choose another supported resolucion, but smaller than your device resolucion.

Sent from my mobile
[Android Software Development] AGONTUK:
[MENTION=912474]Dees_Troy[/MENTION], many thanks for this guide bro.

I'm trying to compile twrp 2.6.3.0 for Xperia U from SlimKat source. I used mka bootimage since U don't have separate recovery partition. It builds without any problems, but I can't access recovery. Device just hangs in bootsplash. I tried to check recovery.log but I can't use shell commands. Whenever I type adb shell, it says "exec '/system/bin/sh' failed: No such file or directory (2)". Also I tried with adb pull which shows "remote object does not exist". Since I can't see the recovery.log file, I can't debug the problems. What should I do ?

BTW: I'm using the recovery as a second ramdisk inside the bootimage. It'll be unpacked and replace the ramdisk if user enters recovery.

I've used these flags :

TARGET_RECOVERY_INITRC := device/sony/kumquat/recovery/init.rc
DEVICE_RESOLUTION := 480x854
TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565"
RECOVERY_GRAPHICS_USE_LINELENGTH := true
BOARD_HAS_NO_REAL_SDCARD := true
HAVE_SELINUX := true
TW_INCLUDE_INJECTTWRP := true

My twrp.fstab file is :

/boot	emmc	/dev/block/mmcblk0p9
/system	ext4	/dev/block/mmcblk0p10
/cache	ext4	/dev/block/mmcblk0p12
/data	ext4	/dev/block/mmcblk0p11
/sdcard	vfat	/dev/block/mmcblk0p14
[Android Software Development] aniket.lamba:
Well for this issue,you can seek some help from percy_g2.He'll help you for sure.
[Android Software Development] Bhargav97:
No LDPI resources in source. i want 240x320 resources. Is it possible?
[Android Software Development] Dees_Troy:
LD_LIBRARY_PATH isn't set correctly in your recovery init.rc file. This is covered in the OP.
[Android Software Development] Dees_Troy:
I don't have any 240x320 devices. The 240x240 theme would work, just won't take up the entire screen, or you can build your own 240x320 theme. No one has submitted a 240x320 theme yet.
[Android Software Development] Pons:
I figure after almost two months this got buried, and it's ok to bump it.
[Android Software Development] AGONTUK:
No bro, I edited it too

on init
export PATH /sbin
export LD_LIBRARY_PATH .:/sbin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard

I'm compiling it from SlimKat tree. Is this a problem? You mentioned earlier that you found other people who're facing this issue and suggested to try with CM tree.
[Android Software Development] Dees_Troy:
It could very well be a problem with the SlimKat tree. I've never used their tree. There's a number of changes that have to be made to the build folder to properly build TWRP recovery and not all trees have those changes. I suggest you try the build folder from Omni and/or CM. If that doesn't work, build in Omni.
[Android Software Development] dams161:
[MENTION=912474]Dees_Troy[/MENTION]

hello can you help me I do not understand too much to build TWRP

my phone is the idol s alcatel

I have the stock recovery boot and cwm recovery

thank you for helping me
[Android Software Development] AGONTUK:
Bro, I've compiled twrp again with omni tree, now adb shell gives me this output

CANNOT LINK EXECUTABLE: could not load library "libc.so" needed by "/sbin/sh"; caused by library "libc.so" not found

I still can't access the /tmp/recovery.log. What should I do ?

BTW, I still have the export LD_LIBRARY_PATH .:/sbin line in my init.rc.
[Android Software Development] Bhargav97:
I've compiled twrp 2.6.3.0 for galaxy 5 and everything is working but only mounting is horrible. Even the names of the partitions are not shown. Checked fstab but it's correct. What can be done now?
[Android Software Development] ne0zone75:
How to disable vibration support ?

[MENTION=912474]Dees_Troy[/MENTION],

Hello, i was just wondering which TWRP build flag completely disable vibration support present in latest TWRP OmniROM tree ?

Thank you,

Have a nice day ;)
[Android Software Development] Dees_Troy:
I didn't and probably never will make a build flag to turn it off. You can slide the sliders all the way to the left under Settings -> Vibration to turn it off. The settings save across reboots too.
[Android Software Development] Dees_Troy:
You should probably come by the IRC channel sometime so we can provide better assistance in real-time.

Probably still an invalid fstab. Maybe you're trying to use a v2 fstab.
[Android Software Development] Bhargav97:
If I provide you with my recovery.fstab, will you be able to check it for any known problems?

Thanks...
[Android Software Development] chraso:
fstab

We are using the fstab from stock cwm.

The same works for PhilZ advanced CWM.

And I also gone through the first post but didn't find how to use the older fstab.

Is there a tag/flag for that?

What I found was RECOVERY_FSTAB_VERSION := 2 in Android.mk file.

Should I change value to 1?

And btw I my device is Samsung GT-I5500 aka galaxy5, which is low resolution.

So already did the graphics resizing for it.

With your permission I may commit it to git.
[Android Software Development] kasper_h:
You should change your fstab itself, changing the number in Android.mk will not change the layout of the fstab file.
[Android Software Development] chraso:
I can see some descritption on the 1st post but if you have more indetail post/link then pls forward it to me.

thank you.
[Android Software Development] _that:
According to the makefiles, sgdisk should be included as long as BOARD_HAS_NO_REAL_SDCARD is not set.

TWRP can only use the CPU to render its GUI, but it should achieve reasonable frame rates (30 fps on most devices unless big transparent overlays exist). What graphics backend do you use? fbdev, adf, drm, overlay? Check if your CPU is running at a reduced speed (somewhere in sysfs), maybe you need to configure your kernel governor.

Only the android-7.1 branch of TWRP is maintained, and it should build with any Android version from 4.4 to 7.1. The kernel version doesn't matter much, it just needs to work on your device.
[Android Software Development] ashyx:
Thanks, I'm aware I can build the latest TWRP with any branch, but I'm referring to using Nougat kernels with Omni 6 branch.
[Android Software Development] pvineeth97:
:D
[Android Software Development] Captain_Throwback:
I'd just try it and see what happens. If it doesn't boot, then you'll have to sync the 7.1 tree.
[Android Software Development] pvineeth97:
Making the TWRP build official means we get TWRP updates automatically whenever newer version of TWRP is released or do we need to build it from source again?
[Android Software Development] Captain_Throwback:
Yes once your device is made official it will receive updated builds automatically with every new release (assuming there aren't any changes in the recovery source that break the build for your device).
[Android Software Development] ashyx:
I have, just waiting for my tester to confirm success or not.

If not it looks like I'm downloading gigallobs of data. :good:
[Android Software Development] ashyx:
Just to confirm the device booted fine using the nougat kernel in android 6 branch.
[Android Software Development] morfikov:
That's weird. I had explicitly set BOARD_HAS_NO_REAL_SDCARD to false, and that didn't included sgdisk. I checked whether true will include, but also sgdisk wasn't included. When I commented the option out, it worked. So what's wrong with it?

I can see that only two of all four cores work at their full speed when I scroll the terminal output:

# cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_cur_freq

1300000

1300000

I changed the governor temporarily from "interactive" to "performance" to see whether this reduce some lag, but I think it's the same as it was before.

So how to check the graphics backend that is used and how to specify one?
[Android Software Development] TimSchumi:
Keep it commented out. Maybe the Value 'false' gets misinterpreted as not-null which would equal to true?
[Android Software Development] _that:
The TWRP GUI is single-threaded, so it will load only one core, that's OK. The default graphics backend is fbdev, you should know it you're using anything else - when in doubt check /tmp/recovery.log.

Other things that can make the GUI slower:

- BOARD_HAS_FLIPPED_SCREEN

- x86 devices may lack optimizations in PixelFlinger

Yes, that's exactly what is happening in the makefiles, so keeping it commented out is good advice.
[Android Software Development] morfikov:
Yes, it uses fbdev:

Starting the UI...
setting DRM_FORMAT_RGB565 and GGL_PIXEL_FORMAT_RGB_565
Skipping drm graphics -- not present in build tree
fb0 reports (possibly inaccurate):
vi.bits_per_pixel = 32
vi.red.offset = 0 .length = 8
vi.green.offset = 8 .length = 8
vi.blue.offset = 16 .length = 8
setting GGL_PIXEL_FORMAT_RGBA_8888
double buffered
framebuffer: 0 (1080 x 1920)
ioctl(): blank: Invalid argument
ioctl(): blank: Invalid argument
Using fbdev graphics.

The model of the phone is TP-LINK Neffos C5 MAX (ARM64):

MTK MT6753 8x Cortex-A53 1.3GHz

GPU: ARM Mali-T720 MP3

And I don't have BOARD_HAS_FLIPPED_SCREEN set.

This wasn't actually the first option that had some problems with setting to "false". So how do I know which options can be "false" and which can't? Is there a way to see somehow all of the options and the values before or after a build?
[Android Software Development] _that:
This should not be slow then. Edit gui/gui.cpp line 57 and uncomment #define PRINT_RENDER_TIME 1, then build and run it and post some of the frame timings in /tmp/recovery.log.

You can read the makefiles and see if they do ifneq($(TW_SOMETHING),) (not empty, actual value ignored) or ifeq($(TW_SOMETHING),true) (explicitly "true") or maybe ifneq($(TW_SOMETHING),false) (not "false").
[Android Software Development] morfikov:
I got this:

I:Render(): 112 ms, flip(): 18 ms, total: 130 ms
I:Render(): 114 ms, flip(): 20 ms, total: 134 ms
I:Render(): 115 ms, flip(): 8 ms, total: 123 ms
I:Render(): 113 ms, flip(): 8 ms, total: 121 ms
I:Render(): 113 ms, flip(): 33 ms, total: 146 ms
I:Render(): 113 ms, flip(): 11 ms, total: 124 ms
I:Render(): 112 ms, flip(): 17 ms, total: 129 ms
I:Render(): 112 ms, flip(): 23 ms, total: 135 ms
I:Render(): 126 ms, flip(): 23 ms, total: 149 ms
I:Render(): 112 ms, flip(): 23 ms, total: 135 ms
I:Render(): 112 ms, flip(): 16 ms, total: 128 ms
I:Render(): 112 ms, flip(): 19 ms, total: 131 ms
I:Render(): 114 ms, flip(): 15 ms, total: 129 ms

What values should be here?
[Android Software Development] kirito9:
Do you know what version of TWRP CM10 source can build? I want to compile 2.3 version for someone who has too big a kernel to fit 2.6 version. I'm not expecting help with such an old source but would be nice to know.
[Android Software Development] vampirefo:
2.6, I haven't seen any beyond that built on CM10.

Usually 2.4 though.
[Android Software Development] kirito9:
Thanks, I'll try it.
[Android Software Development] _that:
Wow, that's really slow. Normal would be total times around 20 to 30 ms. This was on the main menu screen? Unfortunately I have no idea why it is slow.

Alternatively you can build a smaller kernel - TWRP doesn't need sound, network drivers, etc.
[Android Software Development] morfikov:
Loot at this (the first values are from the main menu screen):

I:Render(): 119 ms, flip(): 18 ms, total: 137 ms
I:Render(): 107 ms, flip(): 13 ms, total: 120 ms
I:Render(): 127 ms, flip(): 24 ms, total: 151 ms
I:Render(): 116 ms, flip(): 23 ms, total: 139 ms
I:Set page: 'advanced'
I:Render(): 109 ms, flip(): 6 ms, total: 115 ms
I:Set page: 'copylog'
I:Render(): 53 ms, flip(): 19 ms, total: 72 ms
I:Render(): 43 ms, flip(): 8 ms, total: 51 ms
I:Render(): 44 ms, flip(): 7 ms, total: 51 ms
I:Render(): 45 ms, flip(): 24 ms, total: 69 ms
I:Render(): 46 ms, flip(): 22 ms, total: 68 ms
I:Render(): 46 ms, flip(): 22 ms, total: 68 ms
I:Render(): 48 ms, flip(): 20 ms, total: 68 ms
I:Render(): 48 ms, flip(): 20 ms, total: 68 ms
I:Render(): 49 ms, flip(): 19 ms, total: 68 ms
I:Render(): 48 ms, flip(): 20 ms, total: 68 ms
I:Set page: 'mount'
I:Render(): 59 ms, flip(): 15 ms, total: 74 ms
I:Render(): 81 ms, flip(): 21 ms, total: 102 ms
I:Set overlay: 'select_storage'
I:Render(): 321 ms, flip(): 14 ms, total: 335 ms
I:Render(): 326 ms, flip(): 11 ms, total: 337 ms
I:Backup folder set to '/sdcard1/TWRP/BACKUPS/Neffos_C5_Max'
I:DataManager::SetBackupFolder zip path was /usb-otg changing to /sdcard1, /usb-otg
I:Render(): 321 ms, flip(): 20 ms, total: 341 ms
I:Render(): 351 ms, flip(): 14 ms, total: 365 ms
I:Set overlay: ''
I:Set page: 'clear_vars'
I:Set page: 'mount'
I:Render(): 58 ms, flip(): 16 ms, total: 74 ms
I:Render(): 81 ms, flip(): 10 ms, total: 91 ms
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Render(): 142 ms, flip(): 17 ms, total: 159 ms
I:Set page: 'advanced'
I:Render(): 107 ms, flip(): 8 ms, total: 115 ms
I:Set page: 'copylog'
I:Render(): 68 ms, flip(): 12 ms, total: 80 ms
I:Render(): 42 ms, flip(): 9 ms, total: 51 ms
I:Render(): 45 ms, flip(): 24 ms, total: 69 ms
I:Render(): 47 ms, flip(): 21 ms, total: 68 ms
I:Render(): 50 ms, flip(): 18 ms, total: 68 ms
I:Render(): 52 ms, flip(): 16 ms, total: 68 ms
I:Render(): 51 ms, flip(): 17 ms, total: 68 ms
I:Set page: 'action_page'
I:operation_start: 'Copy Log'

So the lag changes. In some places of the menu you don't even feel it. But look what happens when I entered the mount page.

I'm using the stock kernel, around 6 MiB in size. Is that bad?

Maybe some other graphic backend would fix this?
[Android Software Development] _that:
Yes, semitransparent overlays make everything much slower (each pixel must be read from the underlying bitmap, multiplied with the Alpha value, and written back). On most devices it's not that bad though and the frame rate maybe goes down from 30 to 15, but in your case you're at 3 fps which is almost unusable.

Seems to be some issue with Pixelflinger maybe hitting a slow path, but I haven't heard any reports about other devices with a Cortex-A53 being slow.

Switching to a different backend likely won't help since it only affects how the rendered bitmap of each frame is moved to the actual display framebuffer, but in your case the rendering itself is so slow.

To debug this you can probably add more timing printfs into the functions in minuitwrp to see what is slow - is it text rendering, filling areas, blitting images, ....
[Android Software Development] kirito9:
I did that with my KK kernel and got it to around 2.9MB from 3.65MB. Other TWRP versions work except 3.1 because it's still to big so reverted to my 2.7MB JB kernel that's patched with Selinux support. That's mediatek for ya :rolleyes:. I'll see if I can get it even smaller by removing more stuff.

Also because Mediatek is involved, he doesn't have a kernel source for his tablet. I could try and use my kernel source as base (same chipset) and port one that's just for TWRP (only LCM and touch would be needed) but I haven't the knowledge about porting let alone, I don't have his device to test out the kernel. Should I just give him CTR/CWM/Philz and be done with it? That's more than enough right? He doesn't like those recoveries that use the hardware keys because his physical tablet buttons are hard to press :rolleyes:.
[Android Software Development] morfikov:
I have a similar device (TP-LINK Neffos C5):

MTK MT6735 4x Cortex-A53 1.3GHz

GPU: ARM Mali-T720 MP2 450Mhz

And it looks like that everything works just fine here. I mean, it's a way better than in the case of C5 MAX.

I:Set overlay: ''
I:Render(): 80 ms, flip(): 13 ms, total: 93 ms
I:Set page: 'mount'
I:Render(): 26 ms, flip(): 19 ms, total: 45 ms
I:Render(): 31 ms, flip(): 19 ms, total: 50 ms
I:Render(): 26 ms, flip(): 19 ms, total: 45 ms
I:Render(): 26 ms, flip(): 18 ms, total: 44 ms
I:Render(): 26 ms, flip(): 19 ms, total: 45 ms
I:Render(): 32 ms, flip(): 13 ms, total: 45 ms
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Render(): 47 ms, flip(): 11 ms, total: 58 ms
I:Render(): 76 ms, flip(): 7 ms, total: 83 ms
I:Set page: 'advanced'
I:Render(): 49 ms, flip(): 20 ms, total: 69 ms
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Render(): 58 ms, flip(): 7 ms, total: 65 ms
I:Set page: 'advanced'
I:Render(): 74 ms, flip(): 19 ms, total: 93 ms
I:Set page: 'terminalcommand'
I:Render(): 25 ms, flip(): 6 ms, total: 31 ms
I:Render(): 25 ms, flip(): 8 ms, total: 33 ms
I:Render(): 41 ms, flip(): 30 ms, total: 71 ms
I:Render(): 26 ms, flip(): 7 ms, total: 33 ms
I:Render(): 25 ms, flip(): 7 ms, total: 32 ms
I:Render(): 25 ms, flip(): 9 ms, total: 34 ms
I:Render(): 51 ms, flip(): 19 ms, total: 70 ms
I:Set page: 'advanced'
I:Render(): 51 ms, flip(): 8 ms, total: 59 ms
I:Set page: 'copylog'
I:Render(): 19 ms, flip(): 19 ms, total: 38 ms
I:Render(): 19 ms, flip(): 14 ms, total: 33 ms
I:Render(): 20 ms, flip(): 13 ms, total: 33 ms
I:Render(): 21 ms, flip(): 29 ms, total: 50 ms
I:Render(): 21 ms, flip(): 12 ms, total: 33 ms
I:Render(): 22 ms, flip(): 11 ms, total: 33 ms
I:Render(): 22 ms, flip(): 11 ms, total: 33 ms

Configs for TWRP are similar: C5, C5 MAX.

I'll check what I can do. What exactly should I change? :D
[Android Software Development] Ipsis:
Hello. How can I implement ramdisk compression in lzma for the mtk processor? When compiling, the size is too large. Thank you in advance. Sorry for my english.
[Android Software Development] vampirefo:
The kernel must support it, I have never seen a stock MTK kernel that supported lzma.

What MTK you have? I build TWRP for Blu MTK phones.
[Android Software Development] Matt07211:
I've made some changes to my device tree recently (https://github.com/Matt07211/android_device_samsung_xcover3lte), it use to compiled before (but not boot twrp properly), now it's not even able to compile, and there is no obvious errors that pop out to me in the log file attached (log.txt).

I've add this line "RECOVERY_GRAPHICS_USE_LINELENGTH := true" to my BoardConfig.mk in the hope that the device can boot up and actually display an image (it currently can't becuse it's unable to load xml files into a buffer. See last_log.txt for full error.

So;

- log.txt is a compile error I need help fixing (nothing obvious to me that I can seee is wrong, so I need expert eyes on this...)

- last_log.txt is the most recent twrp boot.log from the most recent completed compile (The one before my current one know ), I am trying to figure out why nothing gets displays on the screen (The xml files arent being loaded into a buffer) and how to fix that (Get the xml files to be loaded into buffer)

Any help I'm tackling these to separate problems wouldn't greatly appreciated.
[Android Software Development] _that:
make clean
lunch $YOURDEVICE-eng

and retry the build. Your build log shows relatively few makefiles being included, maybe you're missing a needed repo.

TWRP not being able to load the XML file is most certainly because the file isn't there - check after the build the contents in out/target/product/$YOURDEVICE/recovery/root/twres.