yashsingh1/xdaforums huggingface dataset:
[Android Software Development] Spaceminer:
I've managed to build twrp for my device, however it's unfortunately not booting. Upon closer inspection, the recovery image that got built doesn't have a ramdisk and I don't know why. It has a ramdisk.lzma but it contains nothing. (0kb) Our stock recovery uses gz. Does anyone know what's going with this or how I can fix it?
[Android Software Development] munchy_cool:
[MENTION=3660325]bassbounce[/MENTION] [MENTION=6031898]MartinX3[/MENTION]

did you ever figure out how to create a twrp installer zip for a/b devices?
[Android Software Development] MartinX3:
Yes, but twrp installer zips are now deprecated.

https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/33287/
[Android Software Development] MKUltraBlack:
Where does twrp get the positioning for the keyboard keys, I can see all the keys in ui.xml etc but where can I change the placement for a key ?
[Android Software Development] _that:
Key positions are relative - one key comes after the other, with spacing defined by <keymargin>. The regular key size is in the <keysize> element, and if the single key definition is prefixed with a number followed by a colon, that is its horizontal size.
[Android Software Development] MKUltraBlack:
Thank you that did the trick (pic 1&2). I was having problems with the spacing because I am using a background pic template for each page that displays the keyboard (pic3)

I then made the white bits transparent so the top navbar and bottom navbar are visible (pic 4)

Many thanks for your help bud ?
[Android Software Development] skoar:
Hey I've compiled twrp for my device but it asks for password in order to decrypt (which I haven't set) and even if I set one and reboot to twrp and enter it, it shows wrong password. It leads me to believe that encryption password is different from the lock screen password.

When I opened by device the first time it asked to set lockscreen security and I chose 'not now' but when I checked the device state under security it showed up as encrypted.

I've been reading up about file-based encryption and full-disk encryption. Is it related to my problem ? How do I check if my device has it ?

I believe there is a twrp flag for fbe. Will enabling it help ?

P. S. All of this is on stock rom

Edit - ro crypt state returned block so I take it has full-disk encryption
[Android Software Development] _that:
Looks nice! :good: Keep on theming!
[Android Software Development] _that:
If it's not booting, then why are you including an ancient and totally unrelated log instead of actually useful information?
[Android Software Development] Rortiz2:
EDIT: Let me attacth the current log

There's nothing useful in last_kmsg.
[Android Software Development] k4y0z:
That looks like a successful boot, why do you say it isn't booting?

Does the screen stay dark?

Did you try connecting with ADB?
[Android Software Development] Rortiz2:
That's an old log, sorry..

I flashed the img with fastboot, then rebooted to recovery. It showed BQ Logo 3 secs, then rebooted.

Let me search a good log..
[Android Software Development] Rortiz2:
ok [MENTION=7104332]k4y0z[/MENTION]. That's what says the last_kmsg:

ram console header, hw_status: 0, fiq step 0.
header may be corrupted, dump the raw buffer for reference only
DBGC@ Ç └ @

Seems like kernel headers are corrupted??
[Android Software Development] k4y0z:
Looks like your kernel doesn't even boot...

Also if it's an Android 6.0+ device look in /sys/fs/pstore/console-ramoops
[Android Software Development] Rortiz2:
Yeah there's a problem.. It's Android 7.1.2 but no ramoops.

There are any other logs?

Enviado desde mi Mi A2 mediante Tapatalk
[Android Software Development] RebelLion_:
You need to add pstore support to your recovery kernel source and rebuild and flash again. Then you should have that console-ramoops, and without that its impossible to help
[Android Software Development] k4y0z:
/proc/last_kmsg and ramoops are essentially the same thing, so if there is is /proc/last_kmsg that should be enough.
[Android Software Development] rINanDO:
I currently have a weird /data partition corruption. After I flash LOS16.0 and not booting, the data-partition is still there. But when I unmount and mount data again, it fails! I just lost my encrypted partition. Do I miss something in twrp build flags? Device is i9100 with emulated storage.

Edit: never mind.... I got a corrupted PIT. Overlapping system and data...
[Android Software Development] RebelLion_:
IIRC last_kmsg was phased after Lollipop or MM so i dont think you will find that log in any recent devices
[Android Software Development] k4y0z:
Yes, as I have mentioned earlier Android 6.0+ devices should have ramoops, but apparently there are some Android 6.0+ devices that still use a kernel with last_kmsg.

So if ramoops doesn't exist always also check for last_kmsg.
[Android Software Development] ashyx:
Pretty much all Samsung devices still use last_kmsg.
[Android Software Development] RebelLion_:
Ahh wasn't aware of that
[Android Software Development] palmbeach05:
I have built twrp 3.3.1 and I'm having issues getting OTA packages to flash properly. Any ideas on where i should be looking to try to troubleshoot and fix? I have samsung j5 (2015)/(2016)
[Android Software Development] _that:
read /tmp/recovery.log.
[Android Software Development] palmbeach05:
I did, i see what its saying but can't figure out what i'm missing.

https://pastebin.com/EVEgqNjy
[Android Software Development] palmbeach05:
To provide a translation, the error is this:

'@/cache/recovery/block.map' cannot be assigned

I cannot find anything to fix this.
[Android Software Development] k4y0z:
I would assume it has something to do with encryption.

What is the content of /cache/recovery/block.map?
[Android Software Development] palmbeach05:
It contains a custom rom ota file. I don't believe my tester is using encryption, as both twrp and ofox recovery options are experiencing issues with encrypted roms. Both have the same issue with ota, but i can check on that encryption of his device.

---------- Post added at 03:06 PM ---------- Previous post was at 02:49 PM ----------

Device is not encrypted, my tester just got back to me with that
[Android Software Development] k4y0z:
As far as I understand it /cache/recovery/block.map is used, when the actual OTA-file is stored on /data.

So I don't think it contains the file itself, but rather (as the name suggests) a mapping of the blocks on the data-partition containing that file.

If /data is encrypted this gets even more complicated, hence my suggestion.

See https://github.com/omnirom/android_bootable_recovery/blob/android-9.0/uncrypt/uncrypt.cpp for more info.
[Android Software Development] palmbeach05:
Using what i know, what you said does make sense.

My trees are all 8.1 branches, as i have been unsuccessful at a 9.0 build. But i see you pointed to 9.0 branch on that file. Could that be the issue and the fix? Use 9.0 for that instead of 8.1?
[Android Software Development] k4y0z:
I pointed to it, since that is the most recent branch, and probably the one you should be using.

Hard to tell if that will fix the issue, only one way to find out.
[Android Software Development] palmbeach05:
I don't have the logs, but using minimal manifest 9.0 branch looks to be what triggers the fail on building. I know 8.1 works so thats why i stayed with it. Using what you pointed to, i can try that out and see what happens.
[Android Software Development] palmbeach05:
I'm in the middle of compiling twrp based on 9.0 sources. I have encountered an error which i cannot fix and am unable to locate how to fix it. It deals with a linker command that failed. Atteched is the log.

https://del.dog/dayupimuhu.makefile
[Android Software Development] ashyx:
All I see is a failure at line 444, however the kernel build seems to complete.

I suggest compiling the kernel first. If that is successful then you can use it as a prebuilt binary for the twrp build.

If that fails then it will be easier to debug.

I'd also suggest compiling as a single thread if it does fail. Will make it easier to debug.
[Android Software Development] palmbeach05:
Yes, this is the issue that i was referring to. That combined with the next few lines right after that is where i'm zeroed in at.

So if i understand what you're saying, the build process is two parts, the kernel and twrp. Drop the twrp side of the process and only get the kernel to build, that way i can debug and troubleshoot what the error is on that side of things.
[Android Software Development] k4y0z:
It looks like you're bulding in PIE-tree. Is your kernel PIE-compatible? Why aren't you building in the same tree you used before?

Also build with "-j 1" as suggested to identify errors more easily.
[Android Software Development] palmbeach05:
Yes i am, and yes it is. I'm happy with my build using 8.1 sources, but i'm seeing if i can build it using 9.0 sources. It is pie compatible, as we do have pie roms being run off the same code.

I have also discovered that by decompiling the recovery.img and swappig zImage out with a pie based zImage, my 8.1 build still boots and is operational.

I can give -j1 that a shot later on today, i've already left the house for the day for work and stuff.
[Android Software Development] k4y0z:
I am talking about building twrp-9.0 in omni-8.1 tree or the like.

I am building twrp-9.0 in omni-5.1 tree just fine.
[Android Software Development] palmbeach05:
Ah, i get it now. The main build files are 5.1, but the twrp files are 9.0. Idk, i didn't think to do that tbh
[Android Software Development] palmbeach05:
Executed a build with j1. The error at line 444 is the issue that appears as the trigger for the failure.
[Android Software Development] k4y0z:
Have you tried building in another tree?

Also check if you have TARGET_INIT_VENDOR_LIB properly set or remove it.
[Android Software Development] palmbeach05:
I can check for that in a few. I haven't yet.
[Android Software Development] palmbeach05:
So i finally got time to take your advice. I copied my 9.0 kernel directory to my 8.1 build directory, compiled, no issues. I then did the same with the device directory. Guess what annoying error just popped back up?

Guess i now know that my 9.0 build issue lies within the device directory.
[Android Software Development] palmbeach05:
Ultimately the line that you're referring to is what was holding it back. 9.0 source did finish compiling.

I noticed that i had touchscreen issues when i flashed it (i can touch the screen but it does nothing). I also noticed that it defaulted to armeabi-v8-a instead of armeabi-v7-a-neon. Would that have caused a problem?
[Android Software Development] palmbeach05:
Yes my kernel is pie compatible. I tested out my kernel with an existing lineage build, everything is operational. From what i can tell and from discussions within my device community, its a compatibility with twrp pie sources. I'll keep digging
[Android Software Development] shady_gun:
Hi Devs,

Started to create new twrp recovery but I am stuck, After flashing new recovery and rebooting it just goes back to bootloader, before posting here I have tried to mix and match all the flags but it always boots back to bootloader. Went through logcat and there is just a message saying new recovery was successfully installed and nothing more. Any help would be appreciated.

Details are,

Omni 9.0 twrp,SOC is 855 Snapdragon, Device is Red Magic 3 global version. I have tried copying the similar twrp from oneplus 7/asus 6z and modifying but the same problem occurs .

Device Tree: https://github.com/sheshadri/twrp_nx629j_device_tree/tree/master

Note: There is a Chinese version twrp which does not work for global version, I have unpacked the recovery img from this and tried to update the flags but the same problem persists.

Regards,
[Android Software Development] The_Walking_Playground:
Hi,

Does your device use FBE or FDE?

TWP
[Android Software Development] shady_gun:
[ro.crypto.state]: [encrypted]
[ro.crypto.type]: [file]
[ro.crypto.volume.filenames_mode]: [aes-256-cts]

It uses FBE ,

Regards,
[Android Software Development] Rortiz2:
Hi all. I compiled TWRP for the BQ Aquaris M10 4G (mt6753). The TWRP boots and all it's ok except the touch.

Is inverted. There's any flag to rotate the touch 180 degrees?

Thanks.

PS My device tree: https://github.com/R0rt1z2/android_device_bq_freezerlte
[Android Software Development] palmbeach05:
Try adding this to boardconfig

TW_ROTATION := 180
[Android Software Development] Rortiz2:
Thanks! I will give it a try!
[Android Software Development] k4y0z:
There are a few flags related to touch you can try:

RECOVERY_TOUCHSCREEN_SWAP_XY := true
RECOVERY_TOUCHSCREEN_FLIP_Y := true
RECOVERY_TOUCHSCREEN_FLIP_X := true
BOARD_HAS_FLIPPED_SCREEN := true

You may also try to change the theme to landscape instead of portrait

TW_THEME := landscape_hdpi
[Android Software Development] Rortiz2:
Thanks. But landscape looks like this:

I will try the other flags as well.
[Android Software Development] Rortiz2:
Ok, tried the one and it's the most "correct". The touch is OK "but" changed sides, I mean, to "INSTALL ZIP" you have to click on "WIPE".
[Android Software Development] palmbeach05:
Which one is the most correct?
[Android Software Development] ashyx:
You will probably need:

RECOVERY_TOUCHSCREEN_SWAP_XY := true

RECOVERY_TOUCHSCREEN_FLIP_Y := true
[Android Software Development] k4y0z:
Yeah, I didn't mean you should use all of these.
[Android Software Development] Rortiz2:
Thanks to all!! Worked perfectly with this flags:

RECOVERY_TOUCHSCREEN_SWAP_XY := true

RECOVERY_TOUCHSCREEN_FLIP_X := true

Now i'm trying to give it official support as the Aquaris M8!
[Android Software Development] milox_x:
Hi devs,

I'm trying to build an updated twrp for my ZTE Kis 3 but I don't have any luck with it. I'm getting following error when I try to build from newest (android 9.0) omni repo :

system/sepolicy/Android.mk:79: warning: BOARD_SEPOLICY_VERS not specified, assuming current platform version
[155/156] including vendor/omni/Android.mk ...
vendor/omni/charger/Android.mk:41: error: FindEmulator: find: `vendor/omni/charger/images/hdpi': No such file or directory
22:04:26 ckati failed with: exit status 1

My twrp tree : https://github.com/miloxx/android_device_zte_kis3/tree/twrp
[Android Software Development] ashyx:
Looks like you're trying to build using a config intended for building with Lineage.

There's a lot of stuff there just not required for compiling TWRP.

Try adding the following to your BoardConfig.mk

ALLOW_MISSING_DEPENDENCIES=TRUE
[Android Software Development] milox_x:
Thanks for that. I now cleaned my twrp tree and added ALLOW_MISSING_DEPENDENCIES as env variable to my linux vm and now I'm getting following error :

[76/76] /home/los/android/twrp/out/soong/.bootstrap/bin/soong_build /home/los/android/twrp/out/soong/build.ninja
/home/los/android/twrp/out/build-omni_kis3-cleanspec.ninja is missing, regenerating...
/home/los/android/twrp/out/soong/make_vars-omni_kis3.mk:428: warning: TARGET_GLOBAL_CFLAGS does not match between Make and Soong:
/home/los/android/twrp/out/soong/make_vars-omni_kis3.mk:428: warning: Make : -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=softfp
/home/los/android/twrp/out/soong/make_vars-omni_kis3.mk:428: warning: Soong: -fomit-frame-pointer -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -fno-canonical-system-headers -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -fdebug-prefix-map=/proc/self/cwd= -fdiagnostics-color -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -Werror=format-security -mthumb-interwork -msoft-float -march=armv7-a -mfloat-abi=softfp -mfpu=neon -mcpu=cortex-a7 -mfpu=neon-vfpv4 -D__ARM_FEATURE_LPAE=1
/home/los/android/twrp/out/soong/make_vars-omni_kis3.mk:434: warning: TARGET_GLOBAL_CPPFLAGS does not match between Make and Soong:
/home/los/android/twrp/out/soong/make_vars-omni_kis3.mk:434: warning: Make : -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=softfp
/home/los/android/twrp/out/soong/make_vars-omni_kis3.mk:434: warning: Soong: -Wsign-promo -fvisibility-inlines-hidden
/home/los/android/twrp/out/soong/make_vars-omni_kis3.mk:870: error: Soong variable check failed.
15:26:48 ckati failed with: exit status 1
[Android Software Development] ashyx:
Comment out the flags they are not supported any more.

TARGET_GLOBAL_CFLAGS

TARGET_GLOBAL_CPPFLAGS
[Android Software Development] Rortiz2:
When I'm trying to push a markdown for add support to the Aquaris M10 4G i get the following error:

remote: Permission to TeamWin/twrpme.git denied to R0rt1z2.
fatal: unable to access 'https://github.com/TeamWin/twrpme.git/': The requested URL returned error: 403

I searched in a lot of sites but still getting the same error.
[Android Software Development] palmbeach05:
Did you go through the proper channels to gain authorization?
[Android Software Development] Rortiz2:
Of course. I sent an email to bigbiff and he asked if I could create the markdown for the device (I already did that with Aquaris M8 without problems):

https://gerrit.twrp.me/c/twrpme/+/1263

But now seems that I have no access :rolleyes:.

Here's exactly what I'm doing:

I clone the twrpme site

I create the markdown file, in this case in _bq named bqaquarism10lte.markdown

I add the file with git add _bq/bqaquarism10lte.markdown (OK)

I commit it and I add the message: git commit (OK)

I try to push it, it asks my GitHub username and my password, I put it and it's OK but it tells that I don't have access for do that.

Regards!
[Android Software Development] meddabeast:
i need help

hi guys, i'm asking kindly for someone to make twrp recovery for my phone. i really tried multiple times and all of them end by my recovery not working

these are my phone details :

FRIMWARE VERSUS V550 M5 Plus Lte

PRELOADER

version: MTK_BLOADER_INFO_v20

name: preloader_f5c62w_leagoo2_versus.bin

CPU: MT6752

CUSTOM NAME: CUST

Flash style: EMMC

Flash definitions in preloader: 4

[1]Type: Discrete DDR3 CID: 000000000000000000

[2]Type: Discrete DDR3 CID: 000000000000000000

[3]Type: Discrete DDR3 CID: 000000000000000000

[4]Type: Discrete DDR3 CID: 000000000000000000

load adress: 0x200d00

PRELOADER END

Android Info

Build ID: MRA58K

Display ID: VERSUS_M5_Plus_Lte_FreemeOS_20170417

Version: 6.0

Build Date: Mon Apr 17 21:17:10 CST 2017

Model: M5 Plus Lte

Brand: VERSUS

Device: M5_Plus_Lte

Manufacturer: VERSUS

Mediatek Version Release: alps-mp-m0.mp1-V2.84_droi6737t.35g.m0_P78

Android Info END

this is the link of the stock android : https**://**mega.nz**/#!G0UHTDpC!NAXnNzlictkh-48UdvC6mp3Wz3okDZgIBqVunoVID_0 (remove * from url)
[Android Software Development] Rortiz2:
I will try to compile it.

Enviado desde mi Mi A2 mediante Tapatalk
[Android Software Development] meddabeast:
thank you ^^. that's really nice from you!
[Android Software Development] meddabeast:
i need help

i'm stuck. i want to make my device board settings and i don't know how. it's not a common device so i couldn't find them online. any help would be appreciated !
[Android Software Development] _that:
So first you tried multiple times to compile TWRP but got a non-working recovery, and now you're saying that you don't even know how to create your BoardConfig. Find the contradiction. You need to research about porting Android (at least the recovery part) - expect to spend at least 10 hours, maybe more. Remember that you are in a development subforum and this is not a "request a recovery for your device" thread.

State the Android tree and version that you've used to build your non-working recoveries, show your local manifest and the parts of the device tree that you already have and then ask specific questions. Use http://www.catb.org/~esr/faqs/smart-questions.html as a guideline.
[Android Software Development] meddabeast:
need help

i made my own device tree after watching tutorials on the internet and anfter flashing the recovery to my device i got an error.

when i go to recovery mode the device gets stack on the logo and twrp recovery don't open. what might be the causes of this problem ? and thanks <3 <3
[Android Software Development] ashyx:
Looks like its looping possibly due to Selinux issues.

Make sure your kernel is compiled Selinux permissive.
[Android Software Development] k4y0z:
Looks like it's already permissive:

Also hard to tell, what exactly is going on, without a full log and not just dmesg | grep recovery
[Android Software Development] DiamondJohn:
could people paste logs on a text host such as del.dog or hastebin.com etc etc etc
[Android Software Development] carcardon:
I got one xiaomi device soon, and I want to root

Many device can't root now..because need unlock first

Last time I try install twrp is and roid 4.2

And now I need try it again and thank for hepful
[Android Software Development] Henry123456:
Ha
[Android Software Development] meddabeast:
i finally did it. everything is now working fine !!!!! thanks for everyone that tried to help me love you all !!! it's time to port lineageos
[Android Software Development] ashyx:
No point in just posting your glory. Explain what the issue was and what solved it so others can benefit. It's your turn to return the favour.
[Android Software Development] meddabeast:
i emailed the phone manufacturer and they gave me the source code of the kernel. so i used it instead of the prebuilt kernel version. and the problem was solved. i actually don't no why it did not work at first
[Android Software Development] ShantMcGant:
Does anyone want to try their luck at compiling TWRP

For the new Nokia 2.2? Thanks in advance
[Android Software Development] DiamondJohn:
Please read the thread title. This thread is for building TWRP yourself, NOT a request thread, If you had read the OP and posts on the last few pages (part of the rules of using XDA) that would of been clear.

Also, a simple search would of found the thread https://xdaforums.com/android/general/unofficial-twrps-devices-source-code-t
[Android Software Development] igigiberia:
HTC U12 Life

Can anyone be so kind to build it for HTC U12 Life and share it with U12 Life users, who don't feel confident with building it by themselves?
[Android Software Development] palmbeach05:
Can anyone read the post above yours? You can't read! Stop being lazy and build it yourself!
[Android Software Development] Clark Joseph Kent:
Allow me to assist you both, you can read the quote below, hits it on the nail. And luck is on your side, you try compiling and testing and let us know...

And confidence is built on trying and testing and learning, this thread is the "How to" thread not build for me, XDA is just that, for all to LEARN, not be handed and done for, so many just come here to take and take, and not provide or attempt to give back. You do no need a title or status to be a Developer, or even to develope for your self.

Now Again as pointed out below, read the title and the OP. Good to Go!