yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Frankbrazillian:
Hi [MENTION=912474]Dees_Troy[/MENTION] . First, i like to thank you for the guide and for share the Source code of this beautyfull custom recovery.

I successfully compiled the Twrp recovery with the latest omni version 8.1, with prebuilt kernel and dtb.

Apparently everything is working correctly!

The device in question is an Galaxy S6 Edge, model 404SC.

I know already have some recoveries for this device, but no one work for this "japanese model".

So, i like to know, what i need to do from now...

I like to create an thread an share this recovery with the users, but i have some questions related. Can i send you an PM or do you prefer another way to be contacted?

Thank's again! Regards.....

Frank!
[Android Software Development] Herald Jose:
I need TWRP

Help will be appreciated:good:

Plz someone provide me with a working version of TWRP for my device: a2010-a

I tried a TWRP from Lenovo Russian forum

But it didn't work...I got 'no command' screen when I opened recovery after I flashed it using So flash tool:crying:[IMG="this screen"]https://drfone.wondershare.com/images/article/2017/04/14928760754449.jpg[/IMG]
[Android Software Development] NepoRood:
This thread is for building your own version of TWRP, not for requesting a build for your device. To build your own, follow the direction in the first post, or take a look at This Guide
[Android Software Development] ashyx:
That's because you booted to stock recovery.

I would consult the thread you downloaded TWRP from.

You must follow the correct procedure to successfully boot to TWRP after flashing.
[Android Software Development] dorianpb:
Sorry for taking so long to reply, my computer crapped out for a week (which i spent fixing it!). I was depending on the mkbootimg.mk because i dont have my boot img on hand. By any chance, do you know where i could obtain one (my device is sm-s727vl, NOT rooted)?
[Android Software Development] ashyx:
You can grab it from the firmware from one of the download sites such as updato.com.

However as I've already stated no matter what it's not going to boot or even install on your bootloader locked device.

TBH it's probably just looking for anything called boot.img so even a dummy would probably be enough.
[Android Software Development] dorianpb:
Thank you! My device is oem unlocked, if that isnt bootloader unlocked, could you tell me how to booloader unlock it?
[Android Software Development] ashyx:
See my edit above.

Unfortunately Samsung bootloaders are not unlockable.

OEM_UNLOCK simply disables FRP.
[Android Software Development] dorianpb:
Thank you! That seems to be the last of my problems.
[Android Software Development] Herald Jose:
But that thread is no longer active :(

And thanks for the reply
[Android Software Development] Eurofighter_ty:
I have an issue when I build TWRP for my Huawei P10 Lite using minimal TWRP manifest..I get this:

E: failed to mount /data (Invalid argument)

failed to mount /system (valid argument)

etc...

And I get this for every partition declared in the fstab and I tried to change it with different layouts like FS before names or after etc.. I tried with the stock Huawei fstab from the recovery, same problem.

The device tree can be found here:

https://github.com/maxhartung/android_device_huawei_hi6250/

If you take a look at the commits you can see the differents formats I tried.

They are a few TWRP made for P10 Lite but I want to do it myself and also add decryption support but this issue is blocking me to do it so.

Thanks for your time !
[Android Software Development] SacredDeviL666:
Thread cleaned.

This is not a thread to request for TWRP for your devices.

Read the OP and post relevant questions to this thread.

Thanks

SacredDeviL666

Forum Moderator
[Android Software Development] dorianpb:
If it helps, i downloaded the source from the minimal manifest branch twrp-7.0.
[Android Software Development] vicky karthi:
Bro how to get kernel,device tree and vendor for unknown phones!!!!!!!!!

Any one in XDA clear me?????????????
[Android Software Development] Qiangong2:
You'll have to either contact the manufacturer, or build the trees yourself
[Android Software Development] DiamondJohn:
re-read the OP https://xdaforums.com/chef-central/android/guide-android-rom-development-t2814763

and/or maybe try a web search https://duckduckgo.com/?q=android+create+device+tree&t=hy&ia=web

For me personally, I would search XDA and Github "creatively" for a pre-built device/vendor/kernel.
[Android Software Development] Gary90210:
Please advice me as I gonna give up by some odd issue which I facing while flashing latest versions of TWRP starting from 3.1.* or 3.2.* to different kind of android devices.

Once I've sent "adb reboot recovery" to the device it has switched from System to the TWRP in a right way from user perspective, but from a log of some script which shows current state of connected device I see the following:

<Deviceid> device

No devices // Just sent a command 'adb reboot recovery'

<Deviceid> offline

<Deviceid> recovery // I can see TWRP splashcreen and so on

No devices // While the UI of TWRP still showing its main menu in the background the TWRP has decided to disconnect and connect to PC/Linux/Mac again?

<Deviceid> offline // ???

<Deviceid> recovery // ???

So from what I see new version of TWRP starting 3.2 (or 3.1.*) for some reason disconnect device from PC twice, while previous versions didn't do that. Is there is any solution on how I can prevent this odd thing by editing any of settings in existing official images of TWRP which are designed for my devices? I've tried to reproduce it with previous TWRP images and they're work pretty good - once I sent 'adb reboot recovery" I can see in the log "offline / recovery" only once without additional disconnect.

For me it's clear that this double disconnect is not related to OS version or Desktop, as I see it on Mac Os as well as on Linux and Windows 7/10 among with different vendors like Samsung, Huawei, Xiaomi, Asus, etc.

Thank you a lot in advance!
[Android Software Development] rajatgupta1998:
Hello, I am building TWRP for my moto g4 plus using Omni 8.1 sources. Here's the error:

https://del.dog/idobacujef.coffeescript

The device tree I am using:

https://github.com/rajatgupta1998/android_device_motorola_athene/tree/twrp-8.1-arm64

I see on omni gerrit that they moved adbd to /system/bin instead of / sbin but I don't understand where in the device tree should I be making changes. These are the commits:

https://gerrit.omnirom.org/#/c/27588/

https://github.com/omnirom/android_system_core/commit/93defc17f376041437e5157a7c4d9e0344441811

Don't want to revert them
[Android Software Development] ioanvlad67:
I have a problem when I try to decrypt Data partition on Huawei P9 Lite Mini.

Can someone help me?

Logcat link:

https://gist.github.com/ingerul93/8d...923d76d175f2f3

TWRP Config:

https://github.com/ingerul93/android...i_p9/tree/twrp

Thank you!
[Android Software Development] peterzorro:
TWRP 3.1.2. password

Hello together,

I have a OP3 with formerly TWRP 3.1. Today I installed TWRP 3.2.1. and now it asks me for password to decrypt data.

No passwort is is working, even when i remove every password for screenlock.

I also changed screenlock to password 1234 and tried this in TWRP but still there is an error.

Also "standard_password" does not work.

How can I decrypt my data in TWRP without formating files?

Thank you so much
[Android Software Development] Sands207:
Is it possible to compile twrp with the latest Ubuntu Budgie 18.04?
[Android Software Development] simonsmh:
Yes, with Python 2.

---------- Post added at 04:17 AM ---------- Previous post was at 04:11 AM ----------

What exactly should I do when the TWRP stuck on the logo screen and I can't fetch log because I can't access to my phone and adb probably doesn't run? I'm curious about that.

BTW my TWRP build is showing up a weird yellow-ish screen, different from the original color. Is there any chance to fix it?

Here is my device tree. I'm building TWRP for Mi Mix 2s and kernel from Xiaomi OSS. https://github.com/simonsmh/android_device_xiaomi_polaris
[Android Software Development] pix106:
Do a "eng" build so adbd starts sooner.

For the yellow color, it may be a wrong TARGET_RECOVERY_PIXEL_FORMAT
[Android Software Development] kfilippenok:
Hi guys. How to make archives and files have different icons? (I already have ready icons)
[Android Software Development] _that:
You need to modify gui/fileselector.cpp (and objects.hpp) for that. You need another member variable for the image resource, load the icon in the constructor, and select the right icon depending on the file name inside RenderItem. Of course you also need to add the image resource to the theme xml.
[Android Software Development] MasterPalmPro:
Im trying to restore a TWRP backup in Android Studio's emulator on my PC. Looking for an up-to-date version of the instructions below. Thanks.
[Android Software Development] zainifame:
how do i request update build official twrp, my device is support official and have much change on device tree with treble support.., how to request that? thanks
[Android Software Development] kfilippenok:
And where is Renderitem?
[Android Software Development] CosmicDan:
Hope someone can help me here, I don't know where else to ask (posting an issue on GitHub seems wrong).

In my theme files I want to run an external command which presents it's own GUI. This works fine so far, but as it runs the TWRP process in the background is still updating the display/framebuffer and responding to touch events. This results in a flicker between TWRP and the GUI process I want in the foreground.

How would I put TWRP into a "paused" state so it doesn't happen?

I've dug around the source code to no avail. The only case where I know this *doesn't* happen is if you e.g. install an Aroma Installer ZIP, but tracing back through the whole ZIP update logic doesn't present any insight.

I think it may be because the ProgressThreadLoop (screen_ui.cpp) is running? But I don't see a way to cancel the redraw right now, despite the update ZIP process being able to do so.

If I have to modify the source in a fork then I am fine with that. I've already done that actually, but I can't figure out what I need to do in my new "cmdforeground" GUI action to solve this problem.

Thanks in advance.
[Android Software Development] _that:
Aroma does it the hard way, by sending a SIGSTOP signal to recovery.
[Android Software Development] CosmicDan:
Mmm I managed to edit TWRP to make it pipe and send the recovery input file descriptor to my process when forking (as taken from calling update binary code) but I still couldn't get it to behave how I wanted. I gave up, I'd rather just use TWRP theme files to make custom pages and a series of short scripts to do what I want, I discovered it's actually quite powerful.

Thanks!
[Android Software Development] vronp:
Hi All,

I suppose there is a better forum in which to post this question and I welcome any suggestions.

Is the "RECOVERY IS NOT SEANDROID ENFORCING" error important if TWRP can be run? I have been able to create a backup with TWRP to the sdcard. (Samsung SM-T900)

There seems to be conflicting information as to the best version of TWRP to use for this tablet. I am using twrp-2.8.7.0-v2wifixx.

thanks,
[Android Software Development] ashyx:
Nope, makes no difference whatsoever.
[Android Software Development] blakegriplingph:
Also, in regards to custom themes, how are you guys able to compress them PNG sprites without mangling them? I tried using PNGOUT (via the PNG Gauntlet frontend) with default settings, and it ended up seemingly fine on Windows and Linux, but not when you feed it in TWRP; it appears garbled instead.
[Android Software Development] DKzVeNgEnS:
Does anyone know if twrp will be compatible with Samsung Galaxy A6+ 2018?:)
[Android Software Development] NepoRood:
TWRP is device specific, it's not an App, so, if someone builds it for the A6, it should work as expected...
[Android Software Development] spawnlives:
From the teamwin web site a list for Samsung devices.

https://twrp.me/Devices/Samsung/
[Android Software Development] mauronofrio:
Someone can help me?

Can you say me where will be placed the openrecoveryscript on Devices that support porject treble? On oneplus 6 i've tried to put the openrecoveryscript in /cache/recovery/ but the twrp doesn't recognize it.

I opened also a issue on github: https://github.com/omnirom/android_bootable_recovery/issues/221
[Android Software Development] x1haimx:
Someone can help me?

i wan to create my TWRP for Huawei Y50-L01

and i don't know what do i need , please i need quicly?
[Android Software Development] pix106:
First post of this thread
[Android Software Development] x1haimx:
i don't have linux , it's necesary?
[Android Software Development] ashyx:
Of course.
[Android Software Development] x1haimx:
i understand , with virtual box can work?
[Android Software Development] ashyx:
Sure. Go to osboxes.org and download a pre made image.
[Android Software Development] x1haimx:
i've been install it but him tell me error boot , and is look like free DOS , it's necesary an another hard disk?
[Android Software Development] ashyx:
Nope, just open the image with Virtualbox and start it.

https://www.osboxes.org/ubuntu/
[Android Software Development] x1haimx:
finaly i did it , and now do i need some software?
[Android Software Development] ashyx:
You need to go to the beginning of this thread and follow the instructions to set up your build environment.

---------- Post added at 09:00 AM ---------- Previous post was at 08:40 AM ----------

Tbh this is no longer applicable and hasn't been for years. Pretty much all Samsung devices released for the last few years have separate recovery and boot partitions.

The standard 'make recoveryimage' should be used to build.
[Android Software Development] x1haimx:
it's my first time when i use linux , and i don't know anythink from it , do you have an video tutorial or somethink
[Android Software Development] ashyx:
Everything you need to know is in this thread.

Follow the guide in the OP.

If you come across something you get stuck on search it in this thread, it will have been asked before.

Also Google can answer many questions.

Your first thing to do is to download the OMNIROM github sources. Use the link in the OP to the minimal manifest.

The sources are quite large you will need a fair amount of space. At least 50gb in your virtual drive to be safe.
[Android Software Development] st_voss:
This guide still recommends older branches like OmniROM-7.1 as build environment.

The main TWRP development however is in more recent branches like android-8.1.

So is it ok to do something like this:

repo init -u [url]https://github.com/omnirom/android.git[/url] -b android-7.1
repo sync

and then clone the recent android-8.1 TWRP branch into bootable/recovery?

cd bootable
rm -rf recovery
git clone [url]https://github.com/omnirom/android_bootable_recovery.git[/url] -b android-8.1 recovery

Or should the development environment and the TWRP sources come from the same branch?
[Android Software Development] _that:
You can (and usually should) use the latest branch of TWRP with all supported ROM trees, it doesn't have to be the same branch. Using a local manifest to replace TWRP would be a cleaner way than your brute force approach though - not sure if the latter survives future "repo sync"s.

That said, the most recommended version of the Android tree to use for building TWRP is the one that your device tree is compatible with.
[Android Software Development] hetor99:
hi guys, there is one attribute t specify a custom battery percentage path??
[Android Software Development] pix106:
you can try TW_CUSTOM_BATTERY_PATH

got it from this useful thread
[Android Software Development] Lyuu:
Hello. I'm trying to build TWRP for my device and I get this error:

ninja: error: '/home/vc60-server/twrp/out/target/product/athene/system/lib/libcryptfs_hw.so', needed by '/home/vc60-server/twrp/out/target/product/athene/obj/SHARED_LIBRARIES/libbmlutils_intermediates/teamwin', missing and no known rule to make it

Here's my device repo.
[Android Software Development] The_Walking_Playground:
Hi,

Your problem is this: https://github.com/Lyudmila17/android_device_motorola_athene/blob/twrp-treble/BoardConfig.mk#L69

Because you're specifying that flag, TWRP expects libcryptfs_hw.so to be output to a specific location, which may not be the case with your device tree.

You can use this patch on Gerrit: https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/31272/ to specify the expected output path, so that the build system knows where to find it.

Or you can change the Android.mk in your cryptfs_hw folder to output to the folder that TWRP expects: https://github.com/omnirom/android_bootable_recovery/blob/android-8.1/prebuilt/Android.mk#L176-L180

TWP
[Android Software Development] iambrunoben:
Excellent Guide. Thank you:)
[Android Software Development] Lyuu:
Now a new error comes:

device/motorola/athene/cryptfs_hw/cryptfs_hw.c:115: error: undefined reference to '__android_log_buf_print'
device/motorola/athene/cryptfs_hw/cryptfs_hw.c:204: error: undefined reference to '__android_log_buf_print'
device/motorola/athene/cryptfs_hw/cryptfs_hw.c:297: error: undefined reference to '__android_log_buf_print'
device/motorola/athene/cryptfs_hw/cryptfs_hw.c:0: error: undefined reference to '__android_log_buf_print'
[Android Software Development] The_Walking_Playground:
Hi,

I would assume you're missing this: https://github.com/TeamWin/android_device_qcom_common/blob/android-8.0/cryptfs_hw/Android.mk#L15

Is there any reason you're just not using the TeamWin/android_device_qcom_common rather than including cryptfs_hw locally? The TeamWin repo is setup to work properly with the minimal device trees.

TWP
[Android Software Development] Lyuu:
Thanks, it compiled now. The tree came as-is with no instructions and cryptfs_hw inside.

Now I got in the recovery, it cannot mount any partition for some reason (I though compiling with crypto it would work but it doesn't)
[Android Software Development] edzamber:
Hi

I'm facing an issue.

As far i use reboot command in updater script as

run_program("/sbin/reboot") ;

Or

code]run_program("/sbin/reboot", "fota_bl) ;

TWRP is freezing and i need to force reboot by long press volume down+Power.

Any idea how to fix this ?

Its very anoying as i need this command especially to flash bl.

I'm on Samsung S9 G960F.

Many thanks :)
[Android Software Development] lehmancurtis:
I am trying to compile for an unsupported device and keep receiving an error regarding external/busybox and could use some advice.

My device is Coolpad catalyst cp3622a

Here is the link to my device tree

https://github.com/lehmancurtis147/android_device_coolpad_cp3622a.git

Any help would be greatly appreciated.
[Android Software Development] Shedaim:
I am trying to build TWRP for my Samsung Galaxy Tab Active 2 (gtactive2lte).

I managed to build recovery.img out of my "invented" device tree and Samsung's source kernel. Although, after flashing TWRP and trying to boot to recovery I get "Installing System Update", then a broken android with "no command" message and then it automatically boots into stock recovery (Just to be clear, I did not "auto-reboot" after flashing. I took off battery and immediately tried to boot into recovery).

Device tree: https://github.com/Shedaim/gtactive2lte.git

Used repo sources for Omni-TWRP: https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni.git

EDIT: I have noticed that my build always build for Android 7.1.2, while my device has 7.1.1. May this be the cause?
[Android Software Development] _that:
You're expecting help with an error, but don't post the actual error message?

Look like whatever method you used for flashing TWRP didn't work. I have no experience with Samsung devices, so I can't help you with any details here.
[Android Software Development] lehmancurtis:
Sorry, this is the error I'm getting.

No private recovery resources for TARGET_DEVICE cp3622a
build/core/tasks/kernel.mk:132: **********************************************************
build/core/tasks/kernel.mk:133: * Kernel source found, but no configuration was defined *
build/core/tasks/kernel.mk:134: * Please add the TARGET_KERNEL_CONFIG variable to your *
build/core/tasks/kernel.mk:135: * BoardConfig.mk file *
build/core/tasks/kernel.mk:136: **********************************************************
target Prebuilt: (/home/curtis/android/omni/out/target/product/cp3622a/kernel)
host Executable: checkpolicy (/home/curtis/android/omni/out/host/linux-x86/obj/EXECUTABLES/checkpolicy_intermediates/checkpolicy)
acp: missing destination file
build/core/tasks/kernel.mk:284: recipe for target '/home/curtis/android/omni/out/target/product/cp3622a/kernel' failed
make: *** [/home/curtis/android/omni/out/target/product/cp3622a/kernel] Error 2
make: *** Waiting for unfinished jobs....
preparing StaticLib: libselinux [including /home/curtis/android/omni/out/host/linux-x86/obj/STATIC_LIBRARIES/libpcre_intermediates/libpcre.a]
host StaticLib: libselinux (/home/curtis/android/omni/out/host/linux-x86/obj/STATIC_LIBRARIES/libselinux_intermediates/libselinux.a)

#### make failed to build some targets (02:36 (mm:ss)) ####
[Android Software Development] Shedaim:
Didn't understand if you are building from prebuilt kernel or source.

Can you show your BoardConfig.mk?
[Android Software Development] Shedaim:
Tbh, I'm not sure it has anything to do with your error, but I noticed that your partitions in BoardConfig.mk are written as number of blocks. You should multiply them by the block size of your device (check with your device in adb).

Only thing I can suggest is that you manually build the output dir "out/target/product/#your_device/obj/KERNEL_OBJ/usr/" I had issues with prebuilt kernel without first creating that output dir.
[Android Software Development] ashyx:
That is one mess of a config! :eek:

Why all the unnecessary comments and flags?

I'd simplify your device tree if this is purely for building twrp.
[Android Software Development] NepoRood:
If you're going to use a prebuilt kernel, delete or move your kernel to a different directory (ie, out of the build environment)

Otherwise, you need to set your defconfig location

# Location in source:
kernel/YOUR_DEVICE/arch/arm/configs/NAME_OF_DEFCONFIG

# Example line in BoardConfig.mk:
TARGET_KERNEL_CONFIG := NAME_OF_DEFCONFIG
[Android Software Development] ashyx:
Prebuilt kernel has been defined but the path is incorrect.

Local path has been defined as

LOCAL_PATH := device/coolpad/cp3622a

the kernel path is defined as (LOCAL_PATH)/kernel

Should be (LOCAL_PATH)/prebuilt/kernel
[Android Software Development] ashyx:
Looks a lot better, not sure if all those flags are required though. I like to keep flags to a minimum, no point in just bungling stuff in there for the sake of it.

Does it build?
[Android Software Development] NepoRood:
In my "TWRP Only" trees, that path would work. Because the prebuilt kernel is right there with the BoardConfig, lol
[Android Software Development] lehmancurtis:
I will know soon. I'm syncing sources now.
[Android Software Development] ashyx:
Didn't I previously ask if this was for building TWRP only? :rolleyes:
[Android Software Development] lehmancurtis:
Now I'm getting this error.

ninja: no work to do.
[1/1] /home/curtis/android/system/out/soong/.bootstrap/bin/soong_build /home/curtis/android/system/out/soong/build.ninja
open : no such file or directory
/home/curtis/android/system/out/build-omni_cp3622a.ninja is missing, regenerating...
[641/960] including ./system/sepolicy/Android.mk ...
./system/sepolicy/Android.mk:111: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[960/960] including ./vendor/omni/Android.mk ...
vendor/omni/charger/Android.mk:26: error: FindEmulator: find: `vendor/omni/charger/images/hdpi': No such file or directory
01:02:36 ckati failed with: exit status 1

#### failed to build some targets (12:08 (mm:ss)) ####

---------- Post added at 07:23 AM ---------- Previous post was at 07:09 AM ----------

The img files all begin with an x in that directory but my TWRP theme is hdpi. Not sure what to do about it.