yashsingh1/xdaforums huggingface dataset:
[Android Software Development] bloommax:
I have successfully unpacked the ramdisk of the stock recovery. I still don't have a clue which files are useful. I found the recovery.fstab and init.rc that are mentioned in the tutorial. But there's no information about the bootloader board name. Thanks!
[Android Software Development] MasterAwesome:
Board name is not really required for the build. Although if you're particular use the app CPU-Z
[Android Software Development] ne0zone75:
About build flags (Transfomer Pad series)

Good evening,

I am currently offering TWRP for several devices AND since a few time now, i am getting graphical distorsion in TWRP (no TeamWin logo, colors are not as usual, everything in gui is distorded and unusable).

I am using the same build flags for a while now, maybe i need to add some in order to follow some changes into TWRP upstream source code...

EDIT

: TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 is the build flag which was responsible of the broken display, since i removed it, everything is working great again !

My kindest regards
[Android Software Development] BENETNATH:
Hi,

our device (HP maya)has a dock with sd card port, we have then 3 external and 1 internal :

sdcard (internal)

sdcard1 (external, tablet port)

sdcard2 (dock sd card port)

usb (usb host) (not sure about how to catch it..)

what is the best way to get twrp working with all of them, in terms of flags i mean ?

Currently, we have internal sdcard working, storage links to internal sd (/data/media/0)

i currently have this recovery.fstab :

# mount point	fstype	device

/recovery emmc /dev/block/platform/sdhci-tegra.3/by-name/SOS

/boot emmc /dev/block/platform/sdhci-tegra.3/by-name/LNX

/system ext4 /dev/block/platform/sdhci-tegra.3/by-name/APP

/cache ext4 /dev/block/platform/sdhci-tegra.3/by-name/CAC

/misc emmc /dev/block/platform/sdhci-tegra.3/by-name/MSC

/staging emmc /dev/block/platform/sdhci-tegra.3/by-name/USP

/metadata emmc /dev/block/platform/sdhci-tegra.3/by-name/MDA

/data ext4 /dev/block/platform/sdhci-tegra.3/by-name/UDA

/sdcard vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1

/sdcard2 vfat /dev/block/sda1 /dev/block/sda

/sdcard3 vfat /dev/block/sdb1 /dev/block/sdb

other partitions details are listed here

Thanks
[Android Software Development] BENETNATH:
TWRP released, no more questions ;)
[Android Software Development] Android-Andi:
We reached TWRP 2.8.0.0 now :)

Send from OnePlus One using Tapatalk
[Android Software Development] katinatez:
Yes have been looking for changelog, but cant find it, already compiled for bacon too!
[Android Software Development] ne0zone75:
About crypto build flags...

Good evening,

My crypto build flags for S4 mini series are like this :

TW_INCLUDE_CRYPTO := true
TW_CRYPTO_FS_TYPE := "ext4"
TW_CRYPTO_REAL_BLKDEV := "/dev/block/mmcblk0p24"
TW_CRYPTO_MNT_POINT := "/data"
TW_CRYPTO_FS_OPTIONS := "nosuid,nodev,noatime,noauto_da_alloc,journal_async_commit,errors=panic wait,check,encryptable=footer"
TW_CRYPTO_FS_FLAGS := "0x00000406"
TW_CRYPTO_KEY_LOC := "footer"
TW_INCLUDE_CRYPTO_SAMSUNG := true

... and my questions are about decrypting /data :

-> if ROM is AOSP based then when TWRP ask for /data password, entering it will decrypt /data as intended BUT...

-> if ROM is stock then when entering the correct password, TWRP rejects it and does not decrypt /data...

=> how to decrypt /data of stock ROM (which build flag(s) to set ?)

=> is it possible for a TWRP build to be able to decypt /data of stock ROM AND also of AOSP based one (in case of ROM switching)

Thank you a lot for your assistance,

My best regards

PS

:

Are 'TW_CRYPTO_SD_REAL_BLKDEV' AND 'TW_CRYPTO_SD_FS_TYPE' build flags mandatory in order to have crypto support for stock

?! Thanks !
[Android Software Development] Android-Andi:
Fuse exFAT updated, some changes and bugfixes for MTP.

Send from OnePlus One using Tapatalk
[Android Software Development] desalesouche:
twrp 2.8.0.0 for huawei u8860 and u8800pro

compiled in 2 version: UMS and MTP...

thanks to bigbiff
[Android Software Development] ne0zone75:
About MTP...

Good morning,

With 2.8.0.0, MTP (or something else...) seem to prevent TWRP to boot properly on one of my target device each time it is launched ! When it has booted on a S4 mini, the recovery log does not show any issue BUT sometimes, TWRP boot process does not finish and the device reboots. I noticed that cold TWRP boot is always OK but hot boot (like booting TWRP after having selected 'reboot to recovery' from a custom ROM) is sometimes problematic.

Any ideas about this behaviour ?! My case does not seem to be isolated... Furthermore my latest 'Transformer series' TWRP builds are not affected by this issue...

Thanks

PS : I am thinking about MTP because this feature is a brand new one that comes with v2.8.0.0, isn't it ?! Disabling MTP from inside TWRP make things really better...
[Android Software Development] bigsupersquid:
I get this too, I thought it was my derp somewhere.

I build twrp for thunderc and thunderg, msm7627 and msm7227. the thunderc runs 2.8 just fine, but the thunderg goes into a bootloop and won't boot rom or recovery.

before the last source update with 2.8 the thunderg had no problems at all.

I can't get any kind of log, it reboots too fast to be recognized by adb, or phone service tools even.

//edit: 5 day old sync. still 2.8 but missing current commits that might fix it.
[Android Software Development] katinatez:
I built 2.8 for my device, and had same symptoms. No boot in recovery or bootloop. I fixed by going to kernel defconfig and disabled the cpuquiet.
[Android Software Development] rhyang:
Custom MTP device

I'd managed to build TWRP 2.7.1.0 for ovation without issue, even added F2FS support. Thanks !

I just built 2.8.0.0. It booted and seemed to work, except for MTP. This is probably because I need to set up some ovation-specific ID's (?) I did notice TW_MTP_DEVICE in the commit history.

When I have the tablet booted up and connected via MTP in linux (Ubuntu 14.04) I get the following output from lsusb :

Bus 002 Device 007: ID 2080:0005 Barnes & Noble

I have a feeling I simply need to put TW_MTP_DEVICE in my device tree BoardConfig.mk with the rest of the TW variables .. something like this ?

TW_MTP_DEVICE := ???

Thanks for any assistance !
[Android Software Development] rhyang:
Very much appreciated ! Now linux recognizes the tablet, but it seems cannot connect to it -

mtp-detect
Unable to open ~/.mtpz-data for reading, MTPZ disabled.libmtp version: 1.1.6

Listing raw device(s)
Device 0 (VID=2080 and PID=0005) is a Barnes&Noble Nook HD+.
Found 1 device(s):
Barnes&Noble: Nook HD+ (2080:0005) @ bus 2, dev 62
Attempting to connect device(s)
PTP_ERROR_IO: failed to open session, trying again after resetting USB interface
LIBMTP libusb: Attempt to reset device
LIBMTP PANIC: failed to open session on second attempt
Unable to open raw device 0
OK.

I've attached my recovery init.rc and the init.ovation.usb.rc from a working booted system. Hoping someone knows what I am doing wrong :o
[Android Software Development] blastagator:
Is the 2.8.0.1 source posted somewhere? I built and it came out as 2.8.0.0
[Android Software Development] DoxMAZz:
Guys i need some help, i compiled TWRP and flashed to my device and it boots also but when select install > no partition in recovery, even i can't change my recovery also.
[Android Software Development] Shaky156:
removed
[Android Software Development] desalesouche:
hi all

it seem that with recent twrp update from october that my twrp is broken.

missing folders in recovery ramdisk=no license and no super su folder

in etc folder no mke2fs.conf/

in res folder =missing fonts folder

etc etc....

i did no change in my twrp device tree and i compiled as usual... i would really like to compile it as i recently could get my kernel ok with f2fs.

so now i need f2fs twrp

thanks.

edit: fixed thanks to [MENTION=912474]Dees_Troy[/MENTION] who pointed me reverting that commit...

https://github.com/CyanogenMod/android_build/commit/71f0b849800995322c4752d5919761a278680d64
[Android Software Development] morfikov:
I wanted to update the TWRP image for my phone, but it returned the following error:

[ 0% 3/3220] Install: /media/Android/omni-twrp-7.1/out/target/product/tp903a/fake_packages/file_contexts_text-timestamp
FAILED: /bin/bash -c "(/media/Android/omni-twrp-7.1/out/host/linux-x86/bin/acp -fp /media/Android/omni-twrp-7.1/out/target/product/tp903a/obj/FAKE/file_contexts_text_intermediates/file_contexts_text-timestamp /media/Android/omni-twrp-7.1/out/target/product/tp903a/fake_packages/file_contexts_text-timestamp ) && (cp -f /media/Android/omni-twrp-7.1/out/target/product/tp903a/obj/ETC/file_contexts.bin_intermediates/file_contexts.concat.tmp /media/Android/omni-twrp-7.1/out/target/product/tp903a/recovery/root/file_contexts )"
cp: cannot create regular file '/media/Android/omni-twrp-7.1/out/target/product/tp903a/recovery/root/file_contexts': No such file or directory
[ 0% 3/3220] target C: libselinux <= external/libselinux/src/setenforce.c
ninja: build stopped: subcommand failed.
make: *** [build/core/ninja.mk:158: ninja_wrapper] Error 1

The path simply ends at /media/Android/omni-twrp-7.1/out/target/product/tp903a/ and there's no recovery/ subdir.

I created a temporary recovery/root/file_contexts dir (I know it should be probably a file, but I now nothing about it) to just see if the build process will continue, and it finished well. The image works fine (it boots), but I don't really know what to think about this situation. I was able to build the image before, but after I updated the OMNI minimal source, it won't build anymore, so how to handle this error? Should I add something somewhere?
[Android Software Development] MKUltraBlack:
I already have twrp for s7 edge exynos, I can decompile, theme etc with android image kitchen. What I need to do is change the screenshot so it's not inverted colours ie blue is orange etc and dim the splash brightness from 100% on startup. Can someone tell me how, will I need to rebuild twrp from source or can I modify my current image from twrp website. Many thanks in advance
[Android Software Development] morfikov:
I have a question: can TWRP be built from omni 8.1 minimal source for devices that have 16M recovery partition? I tried to build it, and I got slightly to big image ~500. The only way to make it fit in the 16M is to set TW_INCLUDE_CRYPTO := false , but the device is forceencrypted and I need it. Is there a way to make the image smaller?
[Android Software Development] Android-Andi:
Could you add lzma compression to kernel?

https://github.com/omnirom/android_...mmit/a846308383c75723aaa09560fa66717f70e90a40

---------- Post added at 11:03 AM ---------- Previous post was at 10:53 AM ----------

Guess the problem is here:

https://github.com/omnirom/android_bootable_recovery/blob/android-9.0/Android.mk#L508

It's checking previously for it depending on Android version

https://github.com/omnirom/android_bootable_recovery/blob/android-9.0/Android.mk#L498

The LOCAL_POST_INSTALL_CMD seems to be executed anyway.

Just a guess
[Android Software Development] ashyx:
As said see if your device supports lzma compressed ramdisks/kernel

Also add the Flag:

BOARD_HAS_NO_REAL_SDCARD := true
[Android Software Development] morfikov:
I've built the recovery image compressed with lzma, but my phone doesn't boot into recovery mode, so I think my device doesn't support this.

I forgot about this. Maybe that will do the job.

---------- Post added at 01:29 PM ---------- Previous post was at 01:03 PM ----------

No, it didn't work either -- need ~300K (drop from 500K).

I have a question: How to remove the charger file from the image? It's almost 1M. Do I really need it?
[Android Software Development] ashyx:
If your kernel already supports it then maybe you could add:

TW_NO_EXFAT_FUSE := true

Also note that compiling in previous branches such as android 6 will yield a smaller image size.
[Android Software Development] Android-Andi:
Could you please test

https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/33485/
[Android Software Development] morfikov:
I was building using 7.1, and it was fine, at least till now, because after "repo sync" I git the error I mentioned earlier. That's why I try to build using 8.1, and here it builds fine, though the image is too big...

---------- Post added at 03:18 PM ---------- Previous post was at 03:14 PM ----------

I'll check that in a minute.

---------- Post added at 03:42 PM ---------- Previous post was at 03:18 PM ----------

@Android-Andi -- yes that fixed the issue, now it builds just fine using 7.1.
[Android Software Development] optimumpro:
Can someone point me to a commit that has to do with 'cancel' button that appears when data is encrypted, and you are presented with a password prompt. I would like to compile a version that has that 'cancel' button hidden. Reason? I have a self signed TWRP and self-signed kernel, and my device boots with locked bootloader. My custom rom has 'oem unlock not allowed' hard-coded. So, no one can flash anything via adb, not even stock kernel or recovery. You can't sideload or push anything until data is decrypted. The phone does not even show on PC. In this setup, the only vulnerability is, if someone (not me) boots into TWRP, they can press cancel button and erase everything or mess with system partition. That's why I want to have 'cancel' button hidden.

Thanks in advance.
[Android Software Development] The_Walking_Playground:
Hi,

You should be able to just remove the button from the theme, I would think. I'm not sure what kind of commit you would be looking for.

TWP
[Android Software Development] Android-Andi:
Besides my commit I've seen https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/32918/ which looks like fixing the issue too
[Android Software Development] morfikov:
It says that "Some devices do not declare BOARD_CACHEIMAGE_PARTITION_SIZE..." -- my device has this declared.
[Android Software Development] Android-Andi:
Mine has it too, but can't test myself ATM. But the := vs += looks more or less like a "reason".

SDK is set properly so it's not a reason it skips it.

Edit:

Ok, doesn't fix the issue, a friend tested for me.

Sadly my commit also isn't a proper fix ATM, file_contexts doesn't exist in recovery ramdisk as it should...

Going to look into it further if I have some time.
[Android Software Development] morfikov:
I have a question. When I booted into TWRP recovery mode for the first time after I updated the image to the v.3.2.3, everything was working fine. When I reboot the the phone to the recovery mode again, it also works fine, but when I boot the system and then I reboot to recovery, the screen doesn't respond to any touches. ADB and buttons work fine. I can turn the screen off/on but I can't type and swipe to unlock.

I wanted to revert to the previous version of the TWRP (3.2.1), which was working fine all the time, but it also stopped working (it has the same issue).

I don't know what's wrong with it, but I found out that this can be fixed by flashing the stock recovery and then flashing TWRP again. When I flashed the older version of the TWRP, everything is working well again.

Worth noting: when I flashed the older TWRP version over the newer TWRP and booted into the recovery mode, the splash screen was saying that I still use the newer version. Should that happen? I'm flashing using SP Flash Tools.

Also, when I leave the phone in that "screen doesn't respond" state when booted into TWRP, the phone reboots in about 5 min automatically.

Does anyone experience such behavior and maybe know what can be wrong?
[Android Software Development] $_Vladislav:
Help how to build TWRP. From my tree for Samsung Galaxy J2 Core (2018) SM-J260F TWRP is being built via jenkins.twrp.me but this error occurs

[100% 1020/1020] /builds/out/soong/.bo...ng_build /builds/out/soong/build.ninja open : no such file or directory [ 0% 0/2] glob external/*/Android.bp [ 50% 1/2] glob external/*/Android.bp ninja: error: '/builds/out/target/product/j2corelte/dt.img', needed by '/builds/out/target/product/j2corelte/recovery.img', missing and no known rule to make it 03:30:39 ninja failed with: exit status 1 #### failed to build some targets (01:02 (mm:ss)) ####

Full console output: https://jenkins.twrp.me/job/j2corelte-test/19/consoleFull

TWRP Device Tree: https://github.com/VladAndroidGamer/android_device_samsung_j2corelte
[Android Software Development] ashyx:
Looks like it cannot find the dt.img.

Probably because you have this defined in your j2corelte.mk

ifeq ($(TARGET_PREBUILT_KERNEL),)

LOCAL_KERNEL := $(LOCAL_PATH)/kernel

else

Not sure why that's required. I'd remove it.
[Android Software Development] $_Vladislav:
I tried to build without that code. Still the same mistake
[Android Software Development] ashyx:
Did you do make clean first?

Put this in your make file omni_j2corelte.mk:

PRODUCT_COPY_FILES += \

device/samsung/j2corelte/dt.img:dt.img
[Android Software Development] $_Vladislav:
Now this:

[ 0% 0/2] glob external/*/Android.bp [ 50% 1/2] glob external/*/Android.bp ninja: error: '/builds/out/target/product/j2corelte/boot.img', needed by '/builds/out/target/product/j2corelte/ramdisk-recovery.cpio', missing and no known rule to make it 17:56:40 ninja failed with: exit status 1 #### failed to build some targets (01:00 (mm:ss)) ####

I understand, it is necessary ramdisk-recovery.cpio to copy?
[Android Software Development] ashyx:
Do the same with the stock boot.img. Put the boot.img in the same place as the dt.img.

Dont worry it won't get used, it just needs to be there.
[Android Software Development] $_Vladislav:
Strange, boot.img added but still the same error

[100% 1020/1020] /builds/out/soong/.bo...ng_build /builds/out/soong/build.ninja open : no such file or directory [ 0% 0/2] glob external/*/Android.bp [ 50% 1/2] glob external/*/Android.bp ninja: error: '/builds/out/target/product/j2corelte/boot.img', needed by '/builds/out/target/product/j2corelte/ramdisk-recovery.cpio', missing and no known rule to make it 06:57:47 ninja failed with: exit status 1 #### failed to build some targets (11:19 (mm:ss)) #### real	11m20.107s user	2m10.652s sys	0m27.641s src: /builds/out/target/product/j2corelte/recovery.img dst: /builds/twrp/twrp-3.2.3-0-j2corelte.img Traceback (most recent call last): File "/builds/jenkins/scripts/buildtwrp.py", line 410, in <module> if __name__ == "__main__" : main() File "/builds/jenkins/scripts/buildtwrp.py", line 356, in main shutil.copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/builds/out/target/product/j2corelte/recovery.img' Build step 'Execute shell' marked build as failure Finished: FAILURE
[Android Software Development] ashyx:
Are you ensuring to make clean before rebuilding?

You also have the following defined in your config:

TARGET_KERNEL_CONFIG := j2corelte_01_defconfig

TARGET_KERNEL_SOURCE := kernel/samsung/j2corelte

This is not required with prebuilt binaries.
[Android Software Development] $_Vladislav:
TARGET_KERNEL_CONFIG and TARGET_KERNEL_SOURCE removed from BoardConfig.mk, make clean did not help.

Sorry for the first time I building TWRP.
[Android Software Development] ashyx:
Are you still getting this error?

fatal: duplicate path kernel/samsung/j2corelte in /builds/min-omni-8.1/.repo/manifest.xml

Is it also in your local manifest?
[Android Software Development] $_Vladislav:
From default branch: android-8.1
[Android Software Development] ashyx:
Just realised that, see my edit.

Also regarding the boot.img error.

Even though it shouldn't really matter, put it on a separate line.

PRODUCT_COPY_FILES += \

device/samsung/j2corelte/boot.img:boot.img
[Android Software Development] $_Vladislav:
Yes indeed. boot.img was found and again an error!

[ 2% 325/13706] Notice file: bootable...ackages/busybox_symlinks-timestamp.txt [ 2% 326/13706] build /builds/out/tar...IBRARIES/libguitwrp_intermediates/twrp [ 2% 327/13706] build /builds/out/tar...y_intermediates/sepolicy.recovery.conf ninja: build stopped: subcommand failed. 11:49:43 ninja failed with: exit status 1 #### failed to build some targets (09:02 (mm:ss)) #### real	9m3.044s user	2m13.151s sys	0m26.719s src: /builds/out/target/product/j2corelte/recovery.img dst: /builds/twrp/twrp-3.2.3-0-j2corelte.img Traceback (most recent call last): File "/builds/jenkins/scripts/buildtwrp.py", line 410, in <module> if __name__ == "__main__" : main() File "/builds/jenkins/scripts/buildtwrp.py", line 356, in main shutil.copyfile(src, dst) File "/usr/lib/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/builds/out/target/product/j2corelte/recovery.img' Build step 'Execute shell' marked build as failure Finished: FAILURE
[Android Software Development] ashyx:
If you can wait until a while later I wlll try and compile locally and see which compiler errors get thrown up.
[Android Software Development] MKUltraBlack:
I have made 10 or so twrp themed images for 8 Samsung models all looking nice by decompiling with android image kitchen and replacing images etc. But i would like a little nudge in the right direction to change the positions of the buttons to a vertical list style on main screen. I know its in the ui.xml and possibly the portrait.xml but don't quite know what ones to change. I have put new x y coordinates for the 6 main_button in ui.xml but it comes out a mess and works fine on another person's theme. Could anyone give me a nudge please. I know this is for building from source but who better to ask than the pro's that know it inside out. Or is there a specific xda group for theming twrp ? Any help gratefully accepted and thank you for your time ??
[Android Software Development] ashyx:
Did you get this fixed yet. I seem to get a different error regarding busybox.

Gonna have to look at the device tree and modify it to make it work.
[Android Software Development] ashyx:
Were these errors from a local build or Jenkins?

It shouldn't be a problem building a working device tree that will compile locally.

If I get time I'll post it.
[Android Software Development] The_Walking_Playground:
Hi,

Did you use the command in the README on the minimal manifest site so that all dependencies aren't necessary?

https://github.com/minimal-manifest-twrp/platform_manifest_twrp_omni/blob/twrp-8.1/README.md (see under "Then to build")

Most importantly:

export ALLOW_MISSING_DEPENDENCIES=true

TWP
[Android Software Development] $_Vladislav:
Yes. This command in jenkins is used

---------- Post added at 07:12 AM ---------- Previous post was at 07:07 AM ----------

In local build. Maybe I didn’t add a command about which I wrote above
[Android Software Development] ashyx:
Don't worry I always build with this flag and still got busy box errors.

Haven't had chance to debug the issue yet.

Maybe if I get chance I will compile a new working device tree later.

If it works locally it should compile with jenkins.
[Android Software Development] The_Walking_Playground:
Hi,

Maybe building with TW_USE_TOOLBOX would help? I've seen it mentioned that busybox can be sketchy on the newer trees.

TWP
[Android Software Development] ashyx:
I may try it if I cannot fix it. I think the issue is the device tree, none of my own device trees exhibit this failure.
[Android Software Development] ashyx:
OK I have managed to compile the image successfully.

However the image is slightly too big.

According to your partition sizes the recovery partition is 20mb. Not sure if this is correct as it seems a bit small.

As for what the issue is, it seems the compiler does not like the device name. I have only ever experienced this once before and the only way to get it to build was to change the name.

The busybox error was misdirection as the error was actually earlier in the build regarding the missing kernel in the output directory. For some reason it's gets deleted as part of the build process and then throws the error, same as you experienced.

To get it to build I changed the device name to j2coreltedd. This is the device name for the J260G.

When I get chance I will push the changed device tree to my github.