yashsingh1/xdaforums huggingface dataset:
[Android Software Development] svendsvin:
I managed to boot to recovery so far, but how do I extract the boot.img from my current rom.zip?

Edit: I booted to a recent backup instead. It seems to work fine so far.
[Android Software Development] Sudarshankakoty:
MTK device . . . What about kernel sources ? You used prebuilt kernel ? Mine is more worse. SC7731 chipset. :laugh:
[Android Software Development] vampirefo:
Intel makes your device look like a toy, build a working Intel recovery if you can.

I am betting you can't even unpack the recovery.img on my Intel.

Kernel isn't required to build TWRP.
[Android Software Development] Sudarshankakoty:
I didn't know about that buddy. Intel is protected. I know the pain of not having a TWRP. I am still struggling to compile a TWRP but I get random errors. ( X needed by y type )
[Android Software Development] Guizão BR:
I`ve compiled the TWRP on AICP 11 with branch on omni 6.0 sucefull but when i tried compile the TWRP on AICP 11 with branch of omni 7.1 my TWRP dosn't boot, i need do this with one nougat ROM?
[Android Software Development] _that:
TWRP from the android-7.1 branch is supposed to build (and work) with CM and Omni (and reasonably similar ROM trees) from Android versions 4.4 and up. Only your kernel must understand the SELinux policy version used by your Android tree. Are you sure you built both recoveries in the same ROM tree?
[Android Software Development] AlxMAX:
I am perplex that even the official recovery is built on top of the Lollipop sources. What's the point of setting the android-7.1 tag then. Eventually, I've been able to build the recovery using the cm-14.1 sources by setting more dependencies on the other projects, but now the recovery asks for a decryption password on a phone where no explicit unlock pin or pattern has been set.
[Android Software Development] _that:
It contains changes required for supporting Android 7.1. That doesn't mean that the 200 other devices (most of which shipped with much older versions) can be built with 7.1.
[Android Software Development] Ibuprophen:
[MENTION=912474]Dees_Troy[/MENTION], I have a quick question to ask...

I'll explain an abridged version of what i do first, then get to the question at the end.

First of all, i have the latest version of TWRP 3.0.2-0 for the d2vzw.

Now, after performing a clean wipe, restart right to the recovery, customize TWRP settings again (ie... The time zone, etc...), then install my Cyanogenmod system, wipe Dalvik, then restart the system and all is well...

Now my question is that why when I reboot back into recovery (after i customize my ROM as norm), i have to repeat the customization process of TWRP (ie... Time Zone, etc...) again. Then after that, i don't have to repeat it again (unless i do a clean install again).

How can I tweak TWRP to always keep the customization?

I hope i had explained it okay..

Thanks a Bunch!

Sent from my D2VZW on the Bridge of the U.S.S. Enterprise.
[Android Software Development] _that:
One of the partitions, usually /data, is marked as "settings storage". Look in /tmp/recovery.log and search the partition info dump for Is_Settings_Storage. As long as that partition is not wiped, your settings should survive.

You can also search the log for "Attempt to load settings from settings file...", which happens in data.cpp (DataManager::ReadSettingsFile). It should be followed by a log message from InfoManager.
[Android Software Development] czarsuperstar@gmail.com:
I am going to get blasted but I did Google it and found other things but when ask to

(OK, if you) submit a markdown for the device I can make it official.

What is a markdown?
[Android Software Development] Matt07211:
If you mean markdown as in formatting then this (https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) may be useful for you. If it's something else then just ignore this ;)
[Android Software Development] _that:
Take a look at the source for the web site:

https://github.com/TeamWin/twrpme

You're asked to add a file for your device in _devices and submit the patch to gerrit.twrp.me.
[Android Software Development] czarsuperstar@gmail.com:
I appreciate your help.
[Android Software Development] czarsuperstar@gmail.com:
I added the file but it was forked how am I too add it to the gerrit.twrp.me?I'm not using the terminal to add the commit I'm using web browsers.
[Android Software Development] AlxMAX:
I have to agree with you. :) Last summer, I was able to build the TWRP recovery 3.0.2 using the omnirom sources from the android-6.0 branch. I guess I will stick with them for the 3.0.3 release.
[Android Software Development] GreenneeG:
last 2 months I bought CM-A810F and i couldn't find its custom recovery,root ,etc. that pushed me to learn how to build custom recovery .last week i created my device tree and i did repo sync for cm14.1 and the download size was 60 giga but unfortunately i lost it by acciden. my quistion : Is it necessary to download the whole any branch source code to compile TWRP ? I want to compile only TWRP
[Android Software Development] vampirefo:
Just read 1st post, you don't need anywhere near that size to build twrp, if you want to compile entire ROM you need the works.
[Android Software Development] GreenneeG:
it wasn't clear enough for me because the link of limited manifest for lj50036 :o

does lj50036 a code of device brand ?
[Android Software Development] ajithanbu:
i compiled the recovery now but none of the partitions mounting are anyone can help me please:( I can't even take logs
[Android Software Development] _that:
Fix your fstab.

If you honestly expected more detailed help, provide the necessary information.
[Android Software Development] ajithanbu:
Thanks [MENTION=4878287]_that[/MENTION] fixed fstab recovery is working now :)
[Android Software Development] mauronofrio:
Is possible to add a button in reboot menu that launch a command in android terminal? I would to add a button to reboot in edl mode
[Android Software Development] hyperterminal:
[MENTION=912474]Dees_Troy[/MENTION], please make a more simpler thread because I don't know the linux and aosp commands as you said please help me. Will be waiting for a reply
[Android Software Development] ashyx:
Then modify the source to do what you need.
[Android Software Development] _that:
TWRP can't run commands in an Android terminal. But apparently you don't want that anyway if you just want to reboot. You can run shell commands from the theme however, using the "cmd" action.

Not sure if trolling... start reading here -> http://source.android.com/source/index.html
[Android Software Development] mauronofrio:
There is a terminal in twrp recovery, i dont know how i can name it but all reboot command use that terminal to reboot in varius mode. So i want to add a button that send a simple string ("reboot edl") in that terminal.

I saw various parts of the code, but I could not understand the part about the UI and in particular how to change the graphics. I asked here hoping to have some help, even if only to know what files I have to modify.
[Android Software Development] _that:
I know that there's a terminal in TWRP - I wrote it. :) But the terminal is just a way to display and enter text - the commands themselves are executed by the shell. And I already told you what you need - you need to modify the theme to add your button and use the "cmd" action.
[Android Software Development] mauronofrio:
Ok , how i can modify the theme to add my button? What file i must modify to do it? This is my question
[Android Software Development] vampirefo:
Is there a flag in new source to disable or not check asking to install TWRP app?

By default I would rather it be unchecked, if user wants app they could then check a box.

Edit

I think I found it, won't know for sure til I compile recovery.

The prompt is 1, changing that to 0 should prevent the prompt.
[Android Software Development] mauronofrio:
Where are you found that string?
[Android Software Development] vampirefo:
data.cpp
[Android Software Development] Guizão BR:
Yes
[Android Software Development] oF2pks:
p880 twrp f2fs cold_boot only missing

1000xThx to twrp & p880-dev teams, I can successfully compile and run twrp3.0.3 with hybrid ext4/f2fs support on p880 (and compatible with multirom/trampoline for hidden 2nd, settled on an twrpMR2.8.6).

It works fine (with screen flickering a bit).

But on cold boot to twrp = [power&vol-] keys, I always loose f2fs :

-etc/fstab return data & cache to ext4

-recovery log shows "recreating /cache/recovery folder" (after "processing..." twrp.bak and partitions list process).

To keep f2fs on, I need to follow (with/without power_off or multirom between):

recovery_boot_recovery

recovery_boot_system

CM11/12rom_reboot_recovery

adb shell setup-recovery + adb reboot recovery

(etc/fstab keeps f2fs, and no "recreating /cache/recovery folder" in log)

I tried unsuccessful:

TW_NEVER_UNMOUNT_SYSTEM := true

TARGET_RECOVERY_PRE_COMMAND := "/system/bin/setup-recovery"

[MENTION=4878287]_that[/MENTION] [MENTION=6552280]MSF Jarvis[/MENTION] Thx for any clue...

BTW it would be great if twrp could give boot_info (CMDLINE...) on the active boot.img, followed by a zImage' selection to repack/inject (anykernel1).
[Android Software Development] jacoghi:
Guys, good morning. I'm trying to build TWRP and also OMNI android-7.1 for my device (both get stuck at the same point), which is an atom x86. I have CM14.1 and Slim7 successfully compiled for it, but I can't get OMNI working because it crashes when building the recovery. The following error shows up

FAILED: /bin/bash -c "(/home/coghi/android/omni/out/host/linux-x86/bin/acp -fp /home/coghi/android/omni/out/target/product/Z00D/obj/RECOVERY_EXECUTABLES/orscmd_intermediates/LINKED/twrp /home/coghi/android/omni/out/target/product/Z00D/obj/RECOVERY_EXECUTABLES/orscmd_intermediates/PACKED/twrp ) && (prebuilts/misc/linux-x86/relocation_packer/relocation_packer /home/coghi/android/omni/out/target/product/Z00D/obj/RECOVERY_EXECUTABLES/orscmd_intermediates/PACKED/twrp )"
ERROR: Missing or empty .rel.dyn or .rela.dyn section
ERROR: Failed to load as ELF
ERROR: /home/coghi/android/omni/out/target/product/Z00D/obj/RECOVERY_EXECUTABLES/orscmd_intermediates/PACKED/twrp: failed to pack/unpack file

Any ideas? Or is there anyway to build omni without twrp? Cause I already have a TWRP build with CM sources (no problems at all). I tried with both OMNI's and CM's bionic, to no luck.

Thanks
[Android Software Development] gr8nole:
Try this...

TW_EXTERNAL_STORAGE_PATH := "/external_sd"

TW_EXTERNAL_STORAGE_MOUNT_POINT := "external_sd"

Sent from my DROID RAZR MAXX HD
[Android Software Development] Android-Andi:
trying right now.

---------- Post added at 07:53 PM ---------- Previous post was at 07:42 PM ----------

you safed my day again :) it´s working :)

only thing i don´t understood is the twrp.fstab - how to place it there :p i replace recovery.fstab by hand after compileing :D

can you have a look on my recovery.fstab posted here: http://xdaforums.com/showpost.php?p=47906441

and can you tell me how to change the name from data to "Internal Storage" ?

/data ext4 /dev/block/mmcblk0p10 length=-16384

changeing to

/data ext4 /dev/block/mmcblk0p10 length=-16384 flags=display="Internal Storage"

???
[Android Software Development] gr8nole:
Not sure about that. The /data partition isn't really your Internal Storage. Your Internal Storage is only part of that partition at /data/media.

Sent from my DROID RAZR MAXX HD
[Android Software Development] Android-Andi:
I will only to show this name (or "sdcard") if i will flash a *.zip to make a "visible sign" to choose from Micro SDcard or the Device.

---------- Post added at 08:10 PM ---------- Previous post was at 08:09 PM ----------

if i understood right "flags=display="Internal Storage"" will only change how it´s displayed in the recovery - nothing else or not?
[Android Software Development] gr8nole:
Yes, only in recovery.

Sent from my DROID RAZR MAXX HD
[Android Software Development] Android-Andi:
there is still something wrong *crying*

TW_INTERNAL_STORAGE_PATH := "/data/media"
TW_INTERNAL_STORAGE_MOUNT_POINT := "data"

It´s not working... don´t shows internal storage again :(

This will make it work (but only shows the root of the whole partition!)

TW_INTERNAL_STORAGE_PATH := "/data"
TW_INTERNAL_STORAGE_MOUNT_POINT := "data"[code]

something´s wrong in nit.rc ?
[code](...)on init
[B] export PATH /sbin
export LD_LIBRARY_PATH .:/sbin
export ANDROID_ROOT /system
export ANDROID_DATA /data
export EXTERNAL_STORAGE /sdcard[/B]

mkdir /boot
mkdir /recovery
mkdir /system
mkdir /data
mkdir /cache
mount /tmp /tmp tmpfs

? do i have to add a symlink or what ever?
[Android Software Development] gr8nole:
From the OP...

RECOVERY_SDCARD_ON_DATA := true

Sent from my DROID RAZR MAXX HD
[Android Software Development] Android-Andi:
Building it right now... let's see if it works... i really hope... my nervs are down... only for the tab 2 community :D because they want a kitkat supported TWRP instead of CWM or Advanced CWM :p

Edit:

Got it working right now :) Thanks a lot for your help!
[Android Software Development] detcup4evr:
Troubleshooting TWRP

I am trying to get TWRP compiled and working on my Insignia Flex Tablet. I have created a recovery.img and got it installed with dd (can't use flash image as boot loader is locked). When I reboot into recovery TWRP never loads it just sits at the start up logo. I can boot twrp up on a virtual device. I noticed today that the BoardConfig.mk has the following include line:

-include vendor/matsunichi/oracle/BoardConfigVendor.mk

The Problem is that the file doesn't exist, I am wondering if that could be the problem. Does anyone knows what should be in the BoardConfigVendor.mk?

I am following this guide to create the vendor sub directories, but it doesn't include the file in question, http://www.kandroid.org/online-pdk/guide/build_new_device.html

Do you guys have any thoughts on other things to check to try to figure out why twrp won't load on the device?

My device also doesn't have the TARGET_RECOVERY_INITRC property in the BoardConfig.mk, is that a problem?. If I do need to define that how would I go about it since I don't have a script to modify.

This is the first time trying to port a recovery.

Thanks,
[Android Software Development] Android-Andi:
[MENTION=3034891]gr8nole[/MENTION] and [MENTION=912474]Dees_Troy[/MENTION]

i got it compiled working for P3100 and P311X for flashing Android 4.4 Roms ... :)

but if i try to flashing Roms, Kernels etc. from Android 4.3, 4.2 etc. i always got

[U]assert failed:[/U] getprop ...... etc ....
(...)
[B][U]E:Error executiong updater binary in zip[/U][/B] (...)

Any idea? :(

Edit:

I got this error using CM 11 (unofficial) & https://github.com/omnirom/android_bootable_recovery/tree/android-4.4

I tried again using source from: https://github.com/TeamWin/Team-Win-Recovery-Project & CM 10.2 as base and got it working.

Would be great if i can use latest source using CM11 ... please tell me if you have any idea....
[Android Software Development] jeffsf:
TWRP for ICS -- retouch_binaries() in updater script

If you are compiling TWRP for use with ICS, it is quite possible that the toolchain creates an updater script with references to retouch_binaries(). Trying to flash a ROM or other package with that function call using TWRP from the current "ics" or "twrp2.5" branches (identical at this time) will result in an error.

Apparently the "retouch" methods were removed from the AOSP build in early 2012, for JellyBean and later, and merged into the TWRP code base.

If you wish to use TWRP to flash ICS ROMs, you may need to locally revert the change.

Edit: You may also need to revert the change in format() to take 4 or 5 arguments, rather than the 5-argument form only

git revert 35a35a
git revert 516e4e23721e4e5aa0a349ab8f27c22a81665880

commit 35a35a67663127e42c8048ca0dc7465068a5606f
Author: Doug Zongker <dougz@android.com>
Date: Tue Feb 28 12:30:13 2012 -0800

remove retouching code from updater

Removes the retouch_binaries and undo_retouch_binaries from updater;
newly generated OTA packages should not call them any more.

Note that applypatch retains the ability to unretouch a file as it
reads it. This will be needed as long as we want to support OTAs from
devices that were installed with retouching.

Change-Id: Ib3f6baeae90c84ba85983f626d821ab7e436ceb2

commit 516e4e23721e4e5aa0a349ab8f27c22a81665880
Author: Stephen Smalley <sds@tycho.nsa.gov>
Date: Tue Apr 3 13:35:11 2012 -0400

Change the format command to always take the mount point as an argument.

Requires I5a63fd61a7e74d386d0803946d06bcf2fa8a857e

Change-Id: Ica5fb73d6f2ffb981b74d1896538988dbc4d9b24
[Android Software Development] mukulsoni:
Hi, we all LG-P500 community (http://xdaforums.com/showthread.php?t=2432968&page=37) want to flash CM 11.0 (http://jenkins.androidarmv6.org/job/android-experimental/396/) on our device but the current TWRP 2.3.6.0 showing error SET_METADATA_RECURSIVE. Request you to kindly make the CM 11.0 compatible TWRP for our device. LG P500 screen resolution is 320x480 pixel, 512 MB RAM, 200MB internal storage, 5MB recovery partion, also attaching herewith the build.prop file. Thank you so much in advance.
[Android Software Development] Skywalker.00:
[MENTION=912474]Dees_Troy[/MENTION] have you any idea why twrp won't mount for my msm8660 device? Im not the only one having trouble with this device, Samsung galaxy s blaze (t769) It builds and flashes properly, but only cache, SD and sd1 mount. If you or anyone else has any insight it would be greatly appreciated? I've followed the instructions properly, I'm positive. As I've said I am not the only one with this problem.

Thank you for your time.
[Android Software Development] Android-Andi:
[MENTION=5438592]Skywalker.00[/MENTION]

Can you post a recovery.log ? You can use pastebin.com to share it ;)

Is there any CWM for it? If yes can you please link me to it?
[Android Software Development] Eskuero:
Could somebody help me porting TWRP to my device, Galaxy S4 Mini.

Somebody in the past already made it, but the image is still too outdated, so I wanted to merge latest fixes in order to make 4.4 flashing possible, but now recovery simply does not boot.

This is /proc/last_kmsg:

http://pastebin.com/H5gpHne8

It gets stuck on samsung bootlogo and then crashes and reboot onto Android system.

I'm sure kernel is the problem because if I use prebuilt from the old TWRP port it works and boot well, but without the security labels support, so I won't take it:

http://xdaforums.com/showthread.php?t=2449107

I already tried to contact this guy, but his last activity is more than a half month ago... :(

If I take the prebuilt one on latest cwm builds by arco it also doesn't boot:

http://xdaforums.com/showthread.php?t=2364980

I suppose he's building the recovery from his kernel source, which is the same I'm trying to use:

https://github.com/OliverG96/android_kernel_samsung_serranoltexx/

Trying to build it from stock kernel source bricks device until I flash a working recovery.

And I'm getting crazy :silly:
[Android Software Development] yuweng:
Try hang out here mentioned by the OP, thats where all the Master Shifu's are, got mine solved, thanks to Tassadar & Dees_Troy...

They are all very nice DEVs & to catch hold of particularly Master Shifu Dees_Troy then you'll have to hang out during 9 to 5 KC MO time but its Christmas day... :laugh:

Merry Christmas everyone...
[Android Software Development] Android-Andi:
Hey together!

I still face a problem with TWRP compiled on Omni 4.4 / CM 11 source as base. I can not flash an older Rom or file (e.g. CM10.1 or any other Android 4.2.2 or 4.3.1 Roms or files). i am getting

"assert failed: getprop (....) E:Error executiong updater binary in zip"

. Any idea how to fix it? TWRP compiled on CM10.2 Source as base doesn´t have this Problem.

I got the same error in CWM and Advanced CWM compiled on CM 11...

maybe [MENTION=912474]Dees_Troy[/MENTION] or [MENTION=617884]Koush[/MENTION] have any idea?
[Android Software Development] Pons:
I'd like to get TWRP officially supported for the HTC One (Verizon model) aka m7vzw.

This has already been ported by Flyhalf205 at [RECOVERY] TWRP 2.6.3.4 touch recovery, I'm just trying to get official support so it shows up in Goo Manager, ROM Manager Pro, and other places.

1. m7-common: TWRP-ify all variants of M7 in a central place and the m7vzw uses the android_device_htc_m7-common / configs / twrp.fstab.

2. From Omnirom-4.4, attached.

3. Go ahead when you're ready.
[Android Software Development] _that:
My guess is that you need to disable relocation packing for recovery executables. Edit build/core/dynamic_binary.mk, search for "http://b/20665974", add below another block similar to the existing one:

# Likewise for recovery and utility executables
ifeq ($(LOCAL_MODULE_CLASS),RECOVERY_EXECUTABLES)
my_pack_module_relocations := false
endif
[Android Software Development] kadett 1:
Hello guys, i want to ask someone can build a TWRP for my new device Doogee Y6 Max. I can't do this by myself, i am only normal user. Pm would be great.

Thank you.
[Android Software Development] jacoghi:
That did the trick, thank you so much for sharing your knowledge, :good:
[Android Software Development] NepoRood:
Most likely not, pretty much everyone around here either build their own or at least try to do it their selves.

You want TWRP, do like the rest of us and learn, you might surprise yourself
[Android Software Development] TimSchumi:
I want to submit TWRP for the Samsung Galaxy Core Plus, but there are a few points I'm not sure about.

1) I also have some CM trees in my GitHub repository. Is it possible to just copy over a specific branch? (It's also ok if its not an "official" fork)

2) My device needs a kernel built with arm-eabi-4.7 (or older) to boot. Is this ok?

3) I need to patch the Omnirom sources first so that the recovery will boot, but I can't test if those patches are compatible with other devices. Should I submit them to gerrit and wait for the reviews? And if I should, to which branch should I submit the changes?

4) The recovery does not support SELinux and "real" formatting (Force rm -rf is needed at the moment, because it would prevent the recovery from mounting anything after wiping), but I will try to fix that both. Can I submit my device tree anyways?

I'll link my device and kernel tree for review:

My device tree: https://github.com/SiniTurk/android_device_samsung_cs02/tree/twrp-6.0

My kernel tree: https://github.com/SiniTurk/android_kernel_samsung_cs02/tree/twrp-6.0

The device tree curently contains a patch folder, where the needed patch is stored. Are those patches ok? The first part which is adding TARGET_KERNEL_CUSTOM_TOOLCHAIN can be omitted (although it makes life easier), but the second part which patches icu4c is mandatory.
[Android Software Development] muralivijay:
How to this framebuffer swap active fail
[Android Software Development] _that:
What do you need the icu patches for? What in recovery depends on icu?
[Android Software Development] TimSchumi:
Nevermind, seems like the icu patch isn't needed anymore. Earlier it was needed to get Graphics output working. So the only patch that remains is the patch which enables TARGET_KERNEL_CUSTOM_TOOLCHAIN, but this can be omitted.
[Android Software Development] muralivijay:
any one help to build working twrp for my device xolo era 4g .. iam tried all version twrp still iam getting " fb swap active fail : invaild arguments" my device not released kernel source .... here is my device tree https://github.com/muralivijay/xolo_era_4g

twrp log http://pastebin.com/7B3GHk3a
[Android Software Development] MSF Jarvis:
Most TWRP device trees just end up shipping a prebuilt kernel, maybe you might wanna explore that avenue :)
[Android Software Development] Ibuprophen:
I have 2 questions regarding the TWRP Recovery...

1) A little birdie told me that there were hidden menu items within TWRP. Is this true? Or do I need to go bird hunting?

2) Isn't there a way to customize TWRP to add optional menu items (like radio buttons, etc...) to do things like performing custom actions or a group of actions?

Sent from my Communicator (SCH-I535) on the Bridge of the U.S.S. Enterprise (N.C.C. 1701).