yashsingh1/xdaforums huggingface dataset:
[Android Software Development] chinajjb:
Hi,Dees_Troy

thank you for your reply ,I think that I have got my tablet work well now,that I can not use external sdcard is because of my tablet defect ,even it runs in to android system ,the external sdcard sometimes can not be found somehow!but I have a solution for this issue,click mount-mount sdcard-use external sdcard ,and all what you do is waiting for 15-30 second,(be patient,let the tablet mount sdcard completely),and should operate twrp with no freezing issue,that's all!

cheers,I really made a working twrp recovery for my unsupported by cm tablet ,wow!!

but there's a little issue that it may freeze the screen sometimes (maybe something is related with external sdcard and that can not work well,I think),I will post recovery.log here if I encounter this issue next time!and I found a bug when I was compiling twrp ,just put it here or send you private message?

thank you everyone here,especially to Dees_Troy!

you are really someone , Dees_Troy :good:
[Android Software Development] ktempleton:
right at the end od compile i get this error any help would be awesome thanks

$mpath; fi

target Prebuilt: (/home/ken/android/4.2/aokp/out/target/product/d710/kernel)

----- Making recovery filesystem ------

Copying baseline ramdisk...

Modifying ramdisk contents...

cp: cannot stat `/home/ken/android/4.2/aokp/out/target/product/d710/root/init.recovery.*.rc': No such file or directory

make: [/home/ken/android/4.2/aokp/out/target/product/d710/recovery/root.ts] Error 1 (ignored)

rm -f /home/ken/android/4.2/aokp/out/target/product/d710/recovery/root/init.*.rc

mkdir -p /home/ken/android/4.2/aokp/out/target/product/d710/recovery/root/system/bin

cp: cannot stat `bootable/recovery/res': No such file or directory

make: *** [/home/ken/android/4.2/aokp/out/target/product/d710/recovery/root.ts] Error 1
[Android Software Development] chinajjb:
yes ,it's the end of compiling exactly,now you got an erroe of packaging recovery.img

if I were you,I would change my work directory as simple as possible ,just like" /home/ken/android/aokp",I don't know whether the "4.2" caused this problem,if you fix the problem ,please tell me!

"init.*.rc",that looks a liitle strange,I think it should be "init.rc"

any way ,what command did you use ,"make -j4 recoveryimage" ?

if that so ,you can try this command ". build/tools/device/makerecoveries.sh full_d710-eng",sometimes I also could not use "make -j4 recoveryimage" to compile recovery ,but use "". build/tools/device/makerecoveries.sh " ,I got the recovery.img in my out directory!

if you did not use "lunch full_d710-eng" to setup your compile environment ,you should change ". build/tools/device/makerecoveries.sh full_d710-eng" as well!

hope it can help you!
[Android Software Development] ktempleton:
Still having this same error .. The other commands didn't work any other ideas:confused:
[Android Software Development] chinajjb:
I checked your wrong message again and found this,"cp: cannot stat `bootable/recovery/res': No such file or directory".it could not be!

so the first of all ,check your bootable/recovery/res whether it exist or not!it should be existed and there's "dummyfileforgit" file under this directory,if not ,something must be wrong!

confirm this first!
[Android Software Development] ktempleton:
It is there with that file in there
[Android Software Development] chinajjb:
please send your recovry source to me ,let me compile the twrp recovery for you!

if I get the same problem,I think that there's something wrong in your recovery source ,otherwise it's your cm source problem!

because I am still a noob on linux system and don't know how to check the environment of compiling ,so it's the only way I can help you!
[Android Software Development] lj50036:
Looks like to me there is no kernel that is needed by the boot.img....

make: *** No rule to make target '/home/slimegod/android/omni/out/target/product/klte/kernel', needed by '/home/slimegod/android/omni/out/target/product/klte/boot.img'. Stop.

Are you building the kernel from source ?

Do you have a link to the device tree ?

Thx Josh
[Android Software Development] Slimegod:
Yeah its a prebuilt kernel. I didn't git clone it. I download it, made a kernel directory, and placed it in there.
[Android Software Development] cezer kiran:
any help developers??

In file included from bootable/recovery/minuitwrp/events.c:19:0:
bionic/libc/include/fcntl.h:43:8: error: redefinition of 'struct flock64'
struct flock64 {
^
In file included from /home/kiran/source/out/target/product/ferrari/obj/KERNEL_OBJ/usr/include/asm/fcntl.h:27:0,
from /home/kiran/source/out/target/product/ferrari/obj/KERNEL_OBJ/usr/include/linux/fcntl.h:4,
from bionic/libc/include/fcntl.h:35,
from bootable/recovery/minuitwrp/events.c:19:
/home/kiran/source/out/target/product/ferrari/obj/KERNEL_OBJ/usr/include/asm-generic/fcntl.h:188:8: note: originally defined here
struct flock64 {
^
[Android Software Development] S-trace:
Add

TARGET_USERIMAGES_USE_F2FS := true

into device/BRAND/CODENAME/BoardConfig.mk (near TARGET_USERIMAGES_USE_EXT4 := true - EXT4 should be already there).
[Android Software Development] Hacker432:
I've repo synced omni sources to build twrp from that but I have to do an unofficial port because my device in not in the sources, so where I can obtain the BoardConfig and other files of my device, and after I've obtained that files, I have to create a folder into Source/devices folder of omni sources?

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] cezer kiran:
yes u have to create in source/device/vendor name/device name

for boardconfig.mk which device you are using?
[Android Software Development] Hacker432:
Huawei Y550

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] cezer kiran:
so u have compiled already the kernel from kernel source ? if yes then check

whether you have TARGET PREBUILT KERNEL flag in make file

---------- Post added at 06:52 PM ---------- Previous post was at 06:42 PM ----------

search for the devices with same soc and alter the make files u have to concentrate on kernel cmd lines ,fstab files mainly
[Android Software Development] Hacker432:
I've found the files on this github:

https://github.com/hecaex/android_vendor_huawei_y550?files=1

Are there all files that I need?

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] cezer kiran:
this is vendor tree search the same user for device tree and device common
[Android Software Development] Hacker432:
https://github.com/hecaex?tab=repositories

There are device tree, vendor tree and kernel

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] S-trace:
No. It's vendor/ repo, but you need device/ repo (not vendor/!) to build TWRP.
[Android Software Development] Hacker432:
https://github.com/hecaex/android_device_huawei_y550

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] cezer kiran:
:good:

then go ahead happy compiling :):good:
[Android Software Development] Hacker432:
Just another question ^^

Adding the flag for f2fs in the BoardConfig of /device/repo

Where the compiler takes the files needed for the f2fs?

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] Slimegod:
I had something interesting happen after flashing a OMNIROM I built for my Sprint s5. So i did the normal thing your suppose to do when flashing. So after flashing it booted to the samsung screen then quickly went into Odin mode. From what I've been reading and been told this is kernel related. So i found a rom that had the same kernel that was used with my OMNI build, cm-11, and just swapped it with the build that was built with the rom. I didn't get the same result but it just hung on the samsung screen. So just for kicks I flashed that same rom where I got that cm-11 kernel from and it booted. Was my OMNI build just a bad build because it seems it wasn't kernel related?
[Android Software Development] S-trace:
In android source tree (projects in external/*) - use most recent sources to build TWRP.
[Android Software Development] Hacker432:
[MENTION=4727726]S-trace[/MENTION] [MENTION=6732583]cezer kiran[/MENTION]

Thank you very much guys :)

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] cezer kiran:
so nobody knows how to resolve these errors ??:rolleyes:
[Android Software Development] T-Macgnolia:
Compare the file in bionic with the same fike in CM and you should be able to fimd where you multiple definition is. I had a simmiliar error in bionic.

T-Macgnolia on Tapatalk
[Android Software Development] cezer kiran:
sorry i dint get you could you elaborate it please i have tried with bionic of cm 12.1 it gives me the same errror
[Android Software Development] T-Macgnolia:
Look at the error message. It gives you two file directories to look in and the line number in the file that is causing issue.

The first time it gives .

bootable/recovery/miniuitwrp/events.c line #19

And

bionic/libc/include/fcntl.h line #43

The second time it gives you niinic/libc/include/fcntl.h line #35

And

bootable/recovery/miniuitwrp/event.c line#19

The error is redifinition of 'struct flock64' so you need to compare the fcntl.h with CM to see if 'steuct flock64' is in it and how CM handles it as I have found the bionic for Omni is not up to date. You may allso want to search for 'struct flock64' in bitg files ti see how it is redifined from the first definition. The error message tells you were it was difined first.

T-Macgnolia on Tapatalk
[Android Software Development] Slimegod:
I'm getting this build error http://pastebin.com/0mvXQABv. Now when I delete the rootdir file from my device directory i get a "no rule to make target rootdir" error. Never seen this.
[Android Software Development] vampirefo:
Has branch android-6 speed up factory reset? I am still compiling with branch android-5.1 everything is fine, but factory reset takes several minutes.

---------- Post added at 07:18 AM ---------- Previous post was at 07:16 AM ----------

Thanks I will try this next build, I seen this in several of my logs, didn't effect anything, so I just ignored it.
[Android Software Development] T-Macgnolia:
Remove the fstab from your common folder and then look in the BoardConfigCommon.mk of your common folder and see if you have TARGET_RECOVERY_FSTAB defined there. If so remove it and then define it in your device folder BoardConfig.mk

T-Macgnolia on Tapatalk
[Android Software Development] MSF Jarvis:
That's a wrong fstab messing things up. You'll have to ensure that whatever locations the fstab points to actually exist.
[Android Software Development] Slimegod:
Faced with this Bluetooth error https://pastebin.com/pZQ7Xx5A
[Android Software Development] lj50036:
This file is being called......

No rule to make target 'device/samsung/klte/bluetooth/vnd_klte.txt'

But is not is the device tree ?

So a quick google resulted in this ......

https://github.com/VRToxin-Devices/android_device_samsung_klte-common/blob/M/bluetooth/vnd_klte.txt

Also if you only intend to build TWRP, is there a reason to include bluetooth ?

Thx Josh
[Android Software Development] Slimegod:
Yeah that's within the Bluetooth file. Just gonna bring that file over to my device tree thanks and thanks Josh :thumbup:

Edit: why should i build without it? Not to familiar with building TWRP.
[Android Software Development] vampirefo:
Twrp is a recovery, doesnt need or use bluetooth.
[Android Software Development] Slimegod:
Ok. So how will bluetooth be part of my final build then?
[Android Software Development] vampirefo:
It won't.
[Android Software Development] lj50036:
There is a .mk file....

Its calling that file somewhere in the device tree....

Thx Josh
[Android Software Development] SlimShady's:
Anyone here? :(

EDIT: I fixed that error by adding all necessary files from another ROM source to mine (They are the same) but I have this error now:

I think that I must include this prebuilt static library into .mk file.. But I don't know how to write it and also in which makefile..Any help? :/
[Android Software Development] vampirefo:
I really have no ideal why you guys add wireless or Bluetooth stuff to your recoveries, I can't help you all, cause I will never in a billion years get those errors.

Maybe someone else that does that, will come along and help you all.

Good Luck.
[Android Software Development] Mr. root1234:
I have a question. I downloaded the twrp source for a phone similar to mine and edited and changed everything so it should work for my phone. Still new to this android stuff and need some help. Like where do I put the files at? Here's the source I used: https://github.com/TeamWin/android_device_samsung_coreprimelte Thanks!

Here's the link to the edited files if it helps: https://www.dropbox.com/sh/su62e2v0a66qmp6/AABZuaJ0v1x_TyyXxisLUlRAa?dl=0
[Android Software Development] vampirefo:
You put in device folder of twrp source, if all you downloaded was a device tree you are wasting your time, you need twrp source.
[Android Software Development] Slimegod:
I thank you all for the help. I really hate posting errors every other post but google is real limited on info with errors at times. https://pastebin.com/S7KZHvRy is the new error i get. Now fstab.com is in my device/rootdir/etc directory along with TARGET_RECOVERY_FSTAB in my BoardConfig.mk. what's this error from?
[Android Software Development] vampirefo:
You can copy it to place error is asking for then run make recovery command again and should continue building.

What does line TARGET_RECOVERY_FSTAB show
[Android Software Development] Slimegod:
It shows device/samsung/klte/rootdir/etc/fstab.qcom
[Android Software Development] vampirefo:
Doesn't seem right, post *BoardConfig.mk
[Android Software Development] Slimegod:
So how is it suppose to look?

Edit: here is the config https://github.com/Gigoo25/android_device_samsung_klte/blob/master/BoardConfig.mk
[Android Software Development] vampirefo:
Just as I thought it's not right, now comment that line out, you have the same line listed twice, first time is correct, second time is not.

This is correct. And it's already listed.

TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/rootdir/etc/fstab.qcom

Get rid of the one you posted, just comment it out.

Leave this one one

TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/rootdir/etc/fstab.qcom
[Android Software Development] Slimegod:
Actually it's not listed twice unless you see something i don't. I just inputted the LOCAL_PATH as what i stated in the pervious post. But i also switched it back to $ (LOCAL_PATH) and still ran into that error.
[Android Software Development] vampirefo:
Dude it's listed twice. Once correctly the second time the way you posted.

---------- Post added at 11:18 PM ---------- Previous post was at 11:13 PM ----------

Your boardconfig is so messed up, you are using two recovery section, come on man!!!.

I know you see TARGET_RECOVERY_FSTAB listed twice, you need to clean your boardconfig up.

# RecoveryBOARD_USE_CUSTOM_RECOVERY_FONT := "roboto_23x41.h"

BOARD_USES_MMCUTILS := true

BOARD_HAS_LARGE_FILESYSTEM := true

BOARD_HAS_NO_MISC_PARTITION := true

BOARD_HAS_NO_SELECT_BUTTON := true

BOARD_RECOVERY_SWIPE := true

TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/rootdir/etc/fstab.qcom

# TWRP specific build flagsTW_THEME := landscape_hdpi

TARGET_RECOVERY_FSTAB := device/samsung/klte/rootdir/etc/fstab.qcom
[Android Software Development] Mr. root1234:
Is this the source I need?

https://github.com/TeamWin/Team-Win-Recovery-Project/tree/android-5.1
[Android Software Development] magdeoz:
no, you need to synchronize omnirom sources that are almost 20GB, or you can use this that are almost 8gb https://github.com/notyal/twrp_recovery_manifest
[Android Software Development] Android-Andi:
Looks like an fstab issue. You use default fstab? Or did you created one for twrp?

You can take a look at the device trees here how the fstab be

https://github.com/TeamWin?tab=repositories
[Android Software Development] Mr. root1234:
Alright I have the omnirom source synced up now what do I do? Again really sorry for the noobish questions. I'm just trying to get into the dev world!
[Android Software Development] magdeoz:
reads the steps of the link to let you ...
[Android Software Development] Mr. root1234:
Alright so I have to make an xml file to point to the files I have? It's been awhile since I've done anything with xml.
[Android Software Development] Slimegod:
Cool i didn't see it thanks :thumbup:
[Android Software Development] SlimShady's:
Can anyone answer #1216th post? :(

Inviato dal mio LG-D405n utilizzando Tapatalk
[Android Software Development] vampirefo:
[MENTION=4478781]yuweng[/MENTION] looks interesting, I have twrp and cwm built for other intels, but have never seen Intel X3.

anyway good luck

---------- Post added at 01:26 PM ---------- Previous post was at 01:20 PM ----------

Link to your device tree.
[Android Software Development] SlimShady's:
https://github.com/SlimShadys/device_lge_w7

mm6.0 branch.

Inviato dal mio LG-D405n utilizzando Tapatalk
[Android Software Development] vampirefo:
Ok, wow, I see you have a lot of problems you have rom setup not twrp setup, you are trying to build a rom that explain your errors, this thread is just for recovery not rom. I would look at it, see if I can get rid of the junk you put into this to at least make something that could compile, what you have will never compile.
[Android Software Development] SlimShady's:
Obviously I locally changed the .mk in order to build Omni.. And yes. I'm trying to build Omni, not TWRP.. I saw that TWRP it's related to Omni, so..

Inviato dal mio LG-D405n utilizzando Tapatalk
[Android Software Development] _that:
I found no question in your post and I don't understand what your problem is. The weird colors? That would be a pixel format issue.
[Android Software Development] yuweng:
Whoops, my bad, i was merely laying out the whole procedures so that others can also have some ideas on using your proposed gdb technique to debug their TWRP that doesn't boot, may be i didn't state my question clearly... :o

My TWRP build doesn't boot & from my understanding from what the gdb says...

__ppoll () at bionic/libc/arch-x86/syscalls/__ppoll.S:28
28	bionic/libc/arch-x86/syscalls/__ppoll.S: No such file or directory.

and back trace from gdb...

#0 __ppoll () at [URL="https://github.com/omnirom/android_bionic/blob/android-5.0/libc/arch-x86/syscalls/__ppoll.S#l28"]bionic/libc/arch-x86/syscalls/__ppoll.S:28[/URL]
#1 0x775d4d65 in poll (fds=fds@entry=0x772e5e60 <ev_fds>, fd_count=2,
ms=ms@entry=1000) at [URL="https://github.com/omnirom/android_bionic/blob/android-5.0/libc/bionic/poll.cpp#l45"]bionic/libc/bionic/poll.cpp:45[/URL]

is causing it not to boot... :confused: :cowboy: :o
[Android Software Development] _that:
First let's get the terminology clear: what you boot is an operating system (which can be the recovery) - if the kernel comes up and you get as far as being able to run adb, your operating system is booted successfully.

Second, your stack trace shows you stopped TWRP at the point where it is waiting for input events from the kernel (the poll syscall), so it did clearly start successfully.

Third, you did attach screenshots of a running TWRP, so what do you mean with "doesn't boot"?
[Android Software Development] vampirefo:
This thread is only to build the TWRP recovery not the OS eg Omni, I doubt anyone in this thread can help you.
[Android Software Development] yuweng:
Ok, here is the story, my TWRP build doesn't boot, when rebooting to TWRP, i can only see like the LCD back-light sort like lighted up then off then right away rebooted back to Android... So i use your gdb techniques to debug & you say those back trace is normal, hmm, then i wonder what is causing it not to boot up.... :cowboy:

The photos you see TWRP booted up is when i manually push it to stock 3e recovery & manually started it to use gdb for back trace... :cowboy:
[Android Software Development] _that:
OK, now I understand your problem. Using gdb won't help you here, you need to get the recovery kernel and adbd running - that's both outside the scope of TWRP. Try obtaining /proc/last_kmsg (or /sys/fs/pstore/console-ramoops) after such a reboot to Android.
[Android Software Development] vampirefo:
Can you upload the recovery, I would like to compare it to my ares 8 intel twrp recovery.

http://xdaforums.com/android/development/root-nextbook-ares-8-twrp-recovery-t3133165

---------- Post added at 04:49 PM ---------- Previous post was at 04:45 PM ----------

@_that is there anything that could be modified in twrp source to speed of factory reset, mainly formatting cache takes time.

Just curios if nothing can't be done then nothing can't be done.
[Android Software Development] _that:
There are build flags for ext4_utils (the Android library that's used by TWRP for formatting ext4):

BOARD_SUPPRESS_SECURE_ERASE := true

or even

BOARD_SUPPRESS_EMMC_WIPE := true

that affect how the device is wiped before writing the filesystem.
[Android Software Development] vampirefo:
LMAO , I spent several hours today downloading cm13, just so I could build twrp 6 on it, well that was a bust, they don't include busybox, and busybox from 12.1 doesn't work correctly, so twrp errors out, I then put twrp 6 in cm12.1 and yep build completely no problems, LMAO.

CM12.1/CM12/out/target/product/E030U/recovery.img
/media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/CM12.1/CM12/out/target/product/E030U/recovery.img maxsize=17128320 blocksize=2112 total=7493632 reserve=173184
Made recovery image: /media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/CM12.1/CM12/out/target/product/E030U/recovery.img

#### make completed successfully (07:50 (mm:ss)) ####

oh well got it fixed to build with cm13, couple of busybox warnings but nothing to worry about.

Checking build tools versions...

build/core/base_rules.mk:559: warning: overriding commands for target `/media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/target/product/E030U/system/xbin/bzip2'

external/busybox/Android.mk:171: warning: ignoring old commands for target `/media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/target/product/E030U/system/xbin/bzip2'

"ebtables is disabled on this build"

build/core/base_rules.mk:559: warning: overriding commands for target `/media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/target/product/E030U/system/xbin/unzip'

external/busybox/Android.mk:171: warning: ignoring old commands for target `/media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/target/product/E030U/system/xbin/unzip'

----- Making recovery image ------
/media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/host/linux-x86/bin/mkbootimg --kernel /media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/target/product/E030U/recovery_kernel.mtk --ramdisk /media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/target/product/E030U/ramdisk-recovery.img.mtk \
--output /media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/target/product/E030U/recovery.img
/media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/target/product/E030U/recovery.img maxsize=17128320 blocksize=2112 total=7352320 reserve=173184
Made recovery image: /media/vampirefo/05f64de9-2a44-478e-a67a-8c2261d9e88b/cm13/out/target/product/E030U/recovery.img

#### make completed successfully (05:35 (mm:ss)) ####

Just download busybox from here.

https://github.com/CyanogenMod/android_external_busybox/tree/cm-13.0
[Android Software Development] vampirefo:
Twrp 6 looks really nice by the way, thanks for the recovery.
[Android Software Development] vampirefo:
added below to BoardConfig.mk fixed slow formatting cache problem.

COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD

BOARD_SUPPRESS_EMMC_WIPE := true

added tzdata to /system/usr/share/zoneinfo fixed __bionic_open_tzdata: couldn't find any tzdata in recovery log.
[Android Software Development] lj50036:
Both the above flags are not needed.....

If you are building from CM sources using this flag

COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD

If building from OMNI sources

BOARD_SUPPRESS_EMMC_WIPE := true

Thx Josh