yashsingh1/xdaforums huggingface dataset:
[Android Software Development] flash713:
I've been around some years and the best way to get help doing anything development wise is to research and read read read and if you run in to some sort of hang up and aren't sure exactly what to do and you search about whatever it is and can't seem to locate a solution.. I mean like REALLY REALLY SEARCHED good, then if you come to the community explaining exactly what you've done on your project "in fine detail" and what's got you stumped , then you stand a MUCH BETTER chance of someone possibly helping you. I'm just sharing my own experience here since Nexus S days & that's what I've found that works. Most things about android development are already here on xda somewhere it's just a matter of searching and finding them and following directions and trying different things.. Also depends how much time you have to spend doing it (it can be time consuming lol.) and how quick you learn. Hope this helps.

Sorry for the off topic post op and or mods. I can delete it if needed please just shoot me a msg.
[Android Software Development] mathew2214:
this guide doesnt work

i keep getting

FAILED: out/soong/build.ninja

out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -globFile out/soong/.bootstrap/build-globs.ninja -o out/soong/build.ninja Android.bp

***************************************************************************

Could not find ui.xml for TW_THEME: not set

Set TARGET_SCREEN_WIDTH and TARGET_SCREEN_HEIGHT to automatically select

an appropriate theme, or set TW_THEME to one of the following:

landscape_hdpi landscape_mdpi portrait_hdpi portrait_mdpi watch_mdpi

****************************************************************************

(theme selection failed; exiting)

16:15:40 soong bootstrap failed with: exit status 1

even though i have declared TW_THEME in my device's boardconfig.mk

please update the guide to one that works
[Android Software Development] PattasuBalu:
Try deleting your repo and syncing it again using repo sync -j5 --current-branch --no-clone-bundle --no-tags. I was too getting this error and this is what worked for me.
[Android Software Development] mathew2214:
that worked! thank you
[Android Software Development] makrodus:
How to build twrp for Xiaomi 12 lite. There is no recovery.img file in the firmware itself. Therefore, I can't even do cloning. Can someone tell me how to extract recovery.img from the firmware or assemble twrp for Xiaomi 12 Lite?
[Android Software Development] mathew2214:
without an open-source device tree, i think you're screwed here.
[Android Software Development] PattasuBalu:
If there is no recovery in firmware then the device has recovery partition in boot.img.
[Android Software Development] desalesouche:
i have charging animation working good since twrp 2.6 to twrp 2.8.1.0.

with 2.8.2.0 i lost charging animation and when device is off , it reboots in recovery if plugged with charger or usb.
[Android Software Development] blastagator:
So basically sync omni 4.4 branch and replace bootable/recovery with the 5.0 version? And use 4.4 device tree?
[Android Software Development] desalesouche:
will try. thanks, will feed back.
[Android Software Development] :
QUOTE=desalesouche;57207756]i have charging animation working good since twrp 2.6 to twrp 2.8.1.0.

with 2.8.2.0 i lost charging animation and when device is off , it reboots in recovery if plugged with charger or usb.[/QUOTE]

That issue has to do with/current samsung bootloaders and kernel sources.

a lead to managing it may be with xda user [MENTION=3034891]gr8nole[/MENTION] 's fix for the issue with the galaxy tab 3 7.0

as best as i know gr8nole doesn't accept pm's so maybe head over to that forum/thread and ask him about

how he does it.

the issue he addresses has more to do with the recovery loop issue but, he may be able to help you with

finding out how to suss out what commands are being issued in/by the bootloader and how to adjust for them.

http://xdaforums.com/galaxy-tab-3/general/information-t210r-custom-recovery-t2884616

also hit github and find out what changes/commits may be contributing to this and experiment.

also you settings in one of your ramdisks' .rc's may be at fault

m
[Android Software Development] desalesouche:
That issue has to do with/current samsung bootloaders and kernel sources.

a lead to managing it may be with xda user [MENTION=3034891]gr8nole[/MENTION] 's fix for the issue with the galaxy tab 3 7.0

as best as i know gr8nole doesn't accept pm's so maybe head over to that forum/thread and ask him about

how he does it.

the issue he addresses has more to do with the recovery loop issue but, he may be able to help you with

finding out how to suss out what commands are being issued in/by the bootloader and how to adjust for them.

http://xdaforums.com/galaxy-tab-3/general/information-t210r-custom-recovery-t2884616

also hit github and find out what changes/commits may be contributing to this and experiment.

also you settings in one of your ramdisks' .rc's may be at fault

m[/QUOTE] compiling twrp2.8.2.0 in omni kk sources instead omni 5.0, fixed all problems
[Android Software Development] hell_lock:
Can you tell me what extra is there in an injected ramdisk?
[Android Software Development] :
IS,

hi you would have to ask gr8nole about the specifics,

or download his fixed boot.img and analyze it.

i don't upgrade the bootloaders on my devices but my issues with the galaxy tab 3 10.1

are similar when running a kitkat rom so i'm sure something can be done in the kernel source

to remedy things.

m
[Android Software Development] hell_lock:
I'll definitely look into it when I get time.

If anyone can answer my question here itself then it will be well and good. My question is, can I use stock ramdisk for injecting twrp in it or do I need to make any changes in it before hand except the ones mentioned in OP? I own a xperia E3. No dedicated partition for recovery. There are alot of scripts inside ramdisk so do I need all of them?
[Android Software Development] adomol:
What tool does twrp use to unpack system.new.dat?
[Android Software Development] _that:
AFAIK the installation is done completely by the update-binary inside your zip file.
[Android Software Development] :
Using CM12 sources.... which branch should I select from https://github.com/omnirom/android_bootable_recovery??? :confused:

What's the last TWRP build on Omni 4.4 source???

Is v2.8.2.0 built on Omni 5.0 sources??? :confused:
[Android Software Development] desalesouche:
i do compile latest twrp on omni kitkat sources and 5.0

i got better result compiling it on omni kitkat sources.

may be 5.0 sources need some commits.
[Android Software Development] :
If you are using CM, you'll need to replace CM/bootable/recovery with this:

https://github.com/omnirom/android_bootable_recovery

Can you please explain this step to me??? :confused:

I've downloaded the CM12 sources successfully...
[Android Software Development] SPSPaWn:
Hi all!

Can you help with Boardconfig.mk for Spreadtrum SC7735S (HTC Desire 700/7060), the kernel sources are available. I want to compile TWRP Recovery.

my config, branch 10.1
# cat BoardConfig.mk
USE_CAMERA_STUB := true

# inherit from the proprietary version
-include vendor/htc/7060/BoardConfigVendor.mk

TARGET_ARCH := arm
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := cp5dug
TARGET_CPU_ABI := armeabi-v7a
TARGET_CPU_ABI2 := armeabi
TARGET_ARCH_VARIANT := armv7-a-neon
TARGET_CPU_VARIANT := generic
TARGET_CPU_SMP := true
ARCH_ARM_HAVE_TLS_REGISTER := true

TARGET_BOOTLOADER_BOARD_NAME := cp5dug_7060

BOARD_KERNEL_CMDLINE := no_console_suspend=1 console=null
BOARD_KERNEL_BASE := 0x03200000
BOARD_KERNEL_PAGESIZE := 2048

# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_FLASH_BLOCK_SIZE := 131072

TARGET_KERNEL_SOURCE := kernel/htc/7060/
TARGET_KERNEL_CONFIG := cp5dug_defconfig

BOARD_HAS_NO_SELECT_BUTTON := true

Help my please
[Android Software Development] whodisname:
Adb devices device offline

Sorry, I'm scatterbrained and ibthought I put that in a search box!
[Android Software Development] :
SPSPaWn,

hi,

there are some flags/settings for twrp you need to add to boardconfig.mk

this is just a general idea from my boardconfig for the matissewifi sm-t530nu

## Recovery
#BOARD_CUSTOM_RECOVERY_KEYMAPPING := $(LOCAL_PATH)/recovery/recovery_keys.c [COLOR="Red"]--> if applicable[/COLOR]
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\"
BOARD_USES_MMCUTILS := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
BOARD_HAS_LARGE_FILESYSTEM := true
BOARD_HAS_NO_MISC_PARTITION := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
BOARD_HAS_NO_SELECT_BUTTON := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
BOARD_RECOVERY_SWIPE := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
TARGET_RECOVERY_PIXEL_FORMAT := "RGBA_8888" or "RGBX_8888" ---> your device's correct setting

## TWRP
DEVICE_RESOLUTION := 1280x800 --> replace with you device resolution, bigger# X smaller# = landscape, reverse = portrait
RECOVERY_SDCARD_ON_DATA := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
RECOVERY_GRAPHICS_USE_LINELENGTH := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
BOARD_HAS_NO_REAL_SDCARD := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
#TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/twrp.fstab [COLOR="Red"]-->uncomment to choose[/COLOR]
#TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/cwm.fstab [COLOR="Red"]-->uncomment to choose[/COLOR]
TWRP_EVENT_LOGGING := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
TW_EXTERNAL_STORAGE_PATH := "[COLOR="Red"]<path-goes-here>[/COLOR]"
TW_EXTERNAL_STORAGE_MOUNT_POINT := "[COLOR="Red"]<path-label-goes-here>[/COLOR]"
TW_DEFAULT_EXTERNAL_STORAGE := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
TWHAVE_SELINUX := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
TW_NO_REBOOT_BOOTLOADER := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
TW_NO_SCREEN_BLANK := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
TW_NO_SCREEN_TIMEOUT := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
TWRP_EVENT_LOGGING := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
TW_FLASH_FROM_STORAGE := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]
RECOVERY_SDCARD_ON_DATA := [COLOR="Red"]<true or comment line with # or omit for false>[/COLOR]

m
[Android Software Development] hjmodi:
Please help!!

Hey you are reaally good developer and i'm new here i'm using cwm recovery(made by some guy i dont him much but he made somehow) but i love TWRP and i'm very new to it can you please make one for my HTC desire U?

i will try my best to provide my device information as much as i could \

Huge thanks :)
[Android Software Development] Lysergic Acid:
Help on CM12

I've tried twice to build TWRP on CM12 for the i9100, using omni 5.0 branch for recovery.

The recovery do not boot when I try to enter on it and it automatically reboots to the system after that. Is there something new we need to do on CM12? I have already made a twrp.fstab to copy into system and added the resolution into boardconfig.mk. The boardconfig does not have a custom path to recovery. The compilations goes fine but I cannot boot into recovery, is there any clue on this already? I've not found on the last pages of this thread...
[Android Software Development] moritz31:
same for Sony Honami here :(
[Android Software Development] :
Thread update?

[MENTION=912474]Dees_Troy[/MENTION] Maybe time to update the thread with Lollipop source changes?
[Android Software Development] makrodus:
andybones EDIT:

boot-gki.img? Or do I need to extract recovery.img from boot.img? But how to extract recovery.img from boot.img?

boot-gki.img? Или мне нужно извлечь из boot.img recovery.img? Но как извлечь из boot.img recovery.img?
[Android Software Development] makrodus:
andybones EDIT:

But there is a kernel source code from Xiaomi Civi 1S. It is almost identical in performance with xiaomi 12 lite. Can this kernel be used for porting?

Но есть исходный код ядра от Xiaomi Civi 1S. Он практически идентичен по характеристикам с xiaomi 12 lite. Можно ли использовать это ядро для портирования?
[Android Software Development] PattasuBalu:
You cant extract it from boot.img. Most probably your device is a/b partition device. You probably need to add this two things while building

TARGET_NO_RECOVERY := true
BOARD_USES_RECOVERY_AS_BOOT := true

for example look at this device tree

GitHub - sanjay-29-29/android_device_oneplus_karen-twrp

Contribute to sanjay-29-29/android_device_oneplus_karen-twrp development by creating an account on GitHub.

github.com
[Android Software Development] PattasuBalu:
You can use prebuilt kernel instead of building a new one from scratch.
[Android Software Development] makrodus:
This device has an mtk processor, and xiaomi 12 lite has a Qualcomm chip. I just don't know which files to add to the configuration tree. The main thing for me is to build a configuration tree, but I can't do it myself.
[Android Software Development] PattasuBalu:
Every device is different. You have to do some research or search for similar devices. If a similar device has a twrp build working you can easily port that to your device with some modification.
[Android Software Development] makrodus:
xiaomi 11 lite 5g en has the same chip and display size. Also the same RAM and physical memory. Tell me what exactly needs to be modified in recovery, except default.prop. what would recovery earn on xiaomi 12 lite?
[Android Software Development] PattasuBalu:
Check for differences in partition and partition size.
[Android Software Development] masdaster:
Hello,

at the moment I try to integrate TWRP into my LineageOS 19.1 build. I followed the instructions mentioned in the first post. Unfortunately I always get an error stating that TW_THEME is not set. In this thread there are a few posts with the same message. Of course I have set the theme in my BoardConfig.mk file. If I am using the minimal repo, I can compile it successfully. Can anyone point me to the right direction?

Up to now I have not uploaded my own device tree. But besides the changes to BoardConfig.mk and the recovery.fstab in rootdir/etc/ (both in common repo) it is the same as here:

GitHub - awesometic/android_device_samsung_gts3llte

Contribute to awesometic/android_device_samsung_gts3llte development by creating an account on GitHub.

github.com

GitHub - awesometic/android_device_samsung_gts3l-common

Contribute to awesometic/android_device_samsung_gts3l-common development by creating an account on GitHub.

github.com
[Android Software Development] masdaster:
Thank you for your reply. I cleaned my entire workspace (including .repo), reinitialized the repo and tried synchronizing with your command. It failed because the remote repositories could not handle the request without using bundles. After that I cleaned everything again and synced the repo without TWRP sources. After that I added them and synced them with your command. Unfortunately the build error is the same...

Just to be sure:

- I place a separate manifest in local_manifests with a reference to the TeamWin project android_bootable_recovery using branch android-12.1.

- Syncing sources creates the directory "bootable/recovery-twrp" in my workspace.

- I add the mentioned flags/variables (including TW_THEME to BoardConfig.mk in the common repo "gts3l-common". It is included in BoardConfig.mk of the device repo "gts3llte".

- I execute "breakfast gts3llte".

- Afterwards I execute "mka -j4 recoveryimage".

Is this the right procedure?

One more thing:

In BoardConfig.mk TARGET_SCREEN_WIDTH and TARGET_SCREEN_HEIGHT are set too. So even if TW_THEME would not be set, it should build successfully, shouldn't it? This leads me to the conclusion that the entire BoardConfig.mk file is not processed before TWRP stuff is executed. What do you think about this?

I would really appreciate every single hint that helps me to fix this. I've been trying to build this for hours now...
[Android Software Development] SR_72_Blackbird:
I am currently in the process of building TWRP for a new device, the Hot Pepper Ghost (HPP-GS1) and can't seem to solve this error when I run the "lunch" command.

jack@jack-PC:~/hpp-gs1-twrp$ lunch omni_HPP-GS1-eng
build/make/core/version_defaults.mk:57: warning: Invalid TARGET_PLATFORM_VERSION 'eng', must be one of
build/make/core/version_defaults.mk:58: error: PPR1.
11:04:49 dumpvars failed with: exit status 1
Your device can't be found in device sources..
Traceback (most recent call last):
File "vendor/omni/build/tools/roomservice.py", line 405, in <module>
fetch_device(device)
File "vendor/omni/build/tools/roomservice.py", line 373, in fetch_device
git_data = search_gerrit_for_device(device)
File "vendor/omni/build/tools/roomservice.py", line 81, in search_gerrit_for_device
device_data = check_repo_exists(git_data, device)
File "vendor/omni/build/tools/roomservice.py", line 58, in check_repo_exists
"exiting roomservice".format(device=device))
Exception: HPP not found,exiting roomservice
build/make/core/product_config.mk:234: error: Can not locate config makefile for product "omni_HPP".
11:04:51 dumpvars failed with: exit status 1

** Don't have a product spec for: 'omni_HPP'
** Do you have the right repo manifest?

It would be greatly appreciated if anyone could help me fix this error.
[Android Software Development] jvasanth1984:
I have a firmware file which is in bin format and I don't know how to extract boot.img and system.img from them. Any help please
[Android Software Development] foxhackerr:
can anyone make custom twrp if i send my device tree here?

because i have no linux vps to do it :(
[Android Software Development] PattasuBalu:
yes send it
[Android Software Development] foxhackerr:
https://xdaforums.com/attachments/xiaomi-zip.5815589/

custom twrp xiaomi mi 11 lite 5g ne codename:lisa android 13​
[Android Software Development] foxhackerr:
its my phone recovery boot.img

https://xdaforums.com/attachments/boot-zip.5816069/

can anyone make custom twrp?
[Android Software Development] trarater:
I don't have programming skills. My phone does not have TWRP. For this reason, I want to try to create it myself. But I don't know where to start. I'm looking for a beginner's guide that will walk you through the process of choosing an Omni, finding the device tree, choosing the right sources, and other preparatory steps. The only thing I understood is one thing. Linux is needed.
[Android Software Development] trarater:
I also wanted to ask a question at https://webchat.freenode.net/?channels=twrp, but one of the users told me that the link was outdated and now the support chat is at https://web.libera.chat/?c=#twrp

I was also asked to update the link to the current chat. If I'm wrong, please write.
[Android Software Development] Isrgish:
This is probably way too late to help you but I'm writing this answer to help someone coming here with the same problem.

I found that the dash (-) in the name causes this problem. "omni_HPP-GS1-eng" It looks like it stops reading the name at the first dash. You can change the name by taking out the dash but then you need to change all files and reverences to the name as well.

I ran grep to find all reverences in the files as well as find to find all file names with the device name in it.
[Android Software Development] Young540:
[ 12% 1933/15605] Generated: (/home/yo.../target/product/mlv5/android-info.txt)

FAILED: /home/youngs/android/twrp9/out/target/product/mlv5/android-info.txt

/bin/bash -c "(build/make/tools/check_radio_versions.py ) && (echo \"board=mt6755\" > /home/youngs/android/twrp9/out/target/product/mlv5/android-info.txt )"

File "/home/youngs/android/twrp9/build/make/tools/check_radio_versions.py", line 56

print "*** Error opening \"%s.sha1\"; can't verify %s" % (fn, key)

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?

[ 12% 1942/15605] target C++: recover...h <= bootable/recovery/rotate_logs.cpp

ninja: build stopped: subcommand failed.

18:51:24 ninja failed with: exit status 1

#### failed to build some targets (01:13 (mm:ss)) ####

what's wrong here ?
[Android Software Development] DiamondJohn:
it does not REPORT root user, but have you tried if you can actually perform any root actions, as the # prompt implies you are root.
[Android Software Development] DiamondJohn:
probably stating the obvious here, but in the first case, did you enter su;
[Android Software Development] travelbug:
@Young540

I had the same issue today and resolved that by updating the symlink for python to python2 not 3. Otherwise you will run into issues with print statements.

Do you have python2 installed? If not, do that first.

Check your current 'active' python version "python --version"

=> should be '3'

Symlink python2 "sudo ln -sf python2 /usr/bin/python" (at least this worked for me)

Check your current 'active' python version "python --version"

=> should be '2' now
[Android Software Development] Young540:
Ok thanks, I will do so
[Android Software Development] Young540:
Thanks, It worked.
[Android Software Development] Rajarshi Khatua:
i am in windows how i do it
[Android Software Development] DiamondJohn:
I am on windows 11. I Use Oracle VBVox to create Linux boxes for ROM builds, and in the past, for building TWRP.
[Android Software Development] Isrgish:
You can use WSL. Take a loom at How to install Linux on Windows with WSL.
[Android Software Development] DiamondJohn:
I had never heard of people building Android from source using WSL. Vaguely new about WSL. Did a search and found this XDA link

How to build LineageOS on Windows 10 using WSL 2

XDA Senior Member Uldiniad has published a guide on how to compile Android 10-based LineageOS 17.1 on a Windows 10 PC using WSL 2.

www.xda-developers.com

Although, personally I like the separation besewn my windows & linux boxes; room for error and restart/reattempt. And that I can blow away my linux environment & start again or have multiple different Linux env on my one windows box (or even try out deferent versions of windows (or even other os's) without breaking my current windows box). I share drives between my linux boxes and even have virtual partitions (ie drives) on usb devices,
[Android Software Development] Rajnish@17:
Use python2 instead of python3. i was having same problem because omni build only supports python2
[Android Software Development] Young540:
Yh I fixed it
[Android Software Development] Google2021:
Anyone help building twrp, device tree:

GitHub - corot-scrapyard/android_device_xiaomi_corot: Device tree for Redmi K60 Ultra (corot)

Device tree for Redmi K60 Ultra (corot). Contribute to corot-scrapyard/android_device_xiaomi_corot development by creating an account on GitHub.

github.com
[Android Software Development] ARDV:
i'm using manjaro linux

i/m trying to compile TWRP for Huawei p10 vtr-l09

i'm using this repo:

GitHub - minimal-manifest-twrp/platform_manifest_twrp_omni: Minimal manifest for building TWRP for devices shipped with Android 5.1 through Android 9.0 ​

Minimal manifest for building TWRP for devices shipped with Android 5.1 through Android 9.0 - minimal-manifest-twrp/platform_manifest_twrp_omni

github.com

and this is the device tree:

GitHub - josip-k/android_device_huawei_vtr: Device Tree for Huawei Phones ​

Device Tree for Huawei Phones. Contribute to josip-k/android_device_huawei_vtr development by creating an account on GitHub.

github.com

after:

cd twrp

export ALLOW_MISSING_DEPENDENCIES=true

i get:

Code:

./build/envsetup.sh

zsh: permission denied: ./build/envsetup.sh

when i try with root previllages i get:

Code:

sudo ./build/envsetup.sh

sudo: ./build/envsetup.sh: command not found