yashsingh1/xdaforums huggingface dataset:
[Android Software Development] C3C076:
@yuweng

Somewhat I am not able to reply to your PM (I cannot see my reply in Sent Items)... So I am replying here.

I've made 2 patches that help to save some space on ramdisk. These are:

https://github.com/C3C0/Team-Win-Recovery-Project/commit/e2863a6df0ebf2b6f7620cbc8e2479b773599a3f

https://github.com/C3C0/Team-Win-Recovery-Project/commit/0df94e8eb62a0bfa24651e20519b115bd4e32447

I think I'm going to send a pull request to TWRP upstream.

I haven't tested the new recovery, yet. But I suppose you know that the recovery image for MTK has a special format. You need to unpack the recovery that's built from source and repack it using MTK tools:	https://github.com/bgcngm/mtk-tools
[Android Software Development] ankar84:
TWRP 2.5.0.0 cannot open fb0 issue

Now I'm trying to compile TWRP 2.5.0.0 and get error (it is from /cache/recovery/last_log):

Starting TWRP 2.5.0.0 on Wed Apr 17 04:24:46 2013
I:=> product model: 'Full Android on Emulator'
I:=> using device id: 'Full_Android_on_Emulator'
BOARD_HAS_NO_REAL_SDCARD := true
I:Internal path defined: '/sdcard'
I:External path defined: '/external_sd'
I:Backup folder set to '/external_sd/TWRP/BACKUPS/Full_Android_on_Emulator'
TW_DEFAULT_EXTERNAL_STORAGE := true
TW_NO_REBOOT_BOOTLOADER := true
I:Lun file '/sys/devices/platform/usb_mass_storage/lun0/file' does not exist, USB storage mode disabled
Starting the UI...cannot open fb0: No such file or directory
Unable to get framebuffer.
: No such file or directory
=> Linking mtab
=> Processing recovery.fstab
I:Processing '/bootloader'
I:Created '/bootloader' folder.
I:Processing '/env'
I:Processing '/boot'
I:Processing '/system'
I:Processing '/data'
I:Processing '/misc'
I:Processing '/cache'
I:Processing '/sdcard'
I:Created '/and-sec' folder.
I:Creating Android Secure: /sdcard/.android_secure
I:Backup folder set to '/sdcard/TWRP/BACKUPS/Full_Android_on_Emulator'
I:Settings storage is '/sdcard'
I:Processing '/external_sd'
Updating partition details...
I:Unmounting main partitions...

So, it is not working. Starting the UI...cannot open fb0: No such file or directory What is the problem? When I compiled TWRP 2.4.4.0 everything was just fine.

Enybody knows where to look to resolve that issue?
[Android Software Development] ankar84:
I solved that issue. Thx to Talustus from #twrp at freenode.net

He adviced me to try build new TWRP 2.5.0.0 with kernel from stock 1.35 firmware, witch was working fine on TWRP 2.4.4.0 build.

And it's worked fine! I don't know why, but kernel from latest stock 2.0 didn't work.

Anyway, now I have another problem with my default.prop

I always have ro.product.model=Full Android on Emulator in my default.prop

And it's really critical, because backup will make a folder Full Android on Emulator for backups.

And I need my model v972 in ro.product.model instead of Full Android on Emulator

I know that, if I write in system.prop in my /device/onda/v972 forder ro.product.model=v972 I will get default.prop in compiled TWRP with two ro.product.model

First one will be ro.product.model=Full Android on Emulator

And second will be in system.prop for v972 section ro.product.model=v972

Witch will wins?

And how it is good or bad having two different ro.product.model in one default.prop? I think it is really bad.

Someone can help me?

Edit: Oh, Thx again to #twrp at freenode.net and user interloper.

ro.product.model is parsed from the device.mk files

So, he adviced me to add

PRODUCT_BRAND := onda
PRODUCT_MODEL := V972

to my device_v972.mk and it worked great!
[Android Software Development] Dees_Troy:
The sizes in BoardConfig.mk are used by the compiler to ensure that the boot.img, recovery.img, etc that it produces are not too large for the partition on your device. We don't use those sizes in TWRP.

The error you're getting about unable to mount /recovery is due to your recovery.fstab. In the recovery.fstab you have told TWRP that the recovery partition is ext4 which is a file system. It's very rare that the recovery partition is actually a mountable file system so something like emmc or mtd is more appropriate, depending on the type of flash memory that you're using.
[Android Software Development] hazedabeast:
what happened to this?

http://wiki.cyanogenmod.com/wiki/Samsung_Captivate:_Compile_CyanogenMod_(Linux))
[Android Software Development] acestars:
First this is my device

http://wiki.cyanogenmod.org/w/Z71_Info

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.3.7
TARGET_PRODUCT=cyanogen_z71
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv6-vfp
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=GINGERBREAD
============================================

I succeeded build twrp without error with some lines added into "build/core/prelink-linux-arm.map".

The questions are:

1. Inside my device recovery directory no init_recovery.rc, is it okay if i just create it and add it to BoardConfig.mk?

2. How to change directory structure of update.zip because the directory structure of my device is different from twrp. I want to place library file into /system/lib and binary file into /system/bin or /system/xbin.

3. My device's radio has different partition layout so which files i need to edit and which lines, for recovery.img and boot.img?

4. Maybe you can add complete lis of twrp flag.

Thanks.
[Android Software Development] Ryuinferno:
Hi, I tired to add a special partition using the SP1_NAME and etc flags in BoardConfig.mk, it works in 2.4 but in 2.5, I see that there seems to be extra flags required for the special partion to be backed up...from /cache/recovery/last_log, I see that under my special partiton, the flags are only "Can_Be_Mounted Can_Be_Wipe" (Backup_Name, Backup_Path etc although configured but does not apply as configured though), but for other partitons like /system, there are "Can_Be_Mounted Can_Be_Wiped Can_Be_Backed_Up Wipe_Available_In_GUI Is_Present"...may I know how to add those flags? Cause in 2.4, even though the "Can_Be_Backed_Up" flag is not there, there is still an option to back up the special partition...Thank you...
[Android Software Development] #define:
[MENTION=912474]Dees_Troy[/MENTION]..

Hey.. Bhargz16 here..

Any way we can change the fonts of the recovery??

At compile time, or via themes??

ғг๏๓ ҭђє ғเรђ™
[Android Software Development] Dees_Troy:
I need to update the guide for the changes we made for 2.5 one of these days, however, to add custom partitions you need to modify the recovery.fstab. Here are some examples:

/efs ext4 /dev/block/mmcblk0p10 flags=display="EFS";backup=1

/external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1 flags=display="Micro SDcard";storage;wipeingui;removable

/usb-otg vfat /dev/block/sda1 /dev/block/sda flags=display="USB-OTG";storage;wipeingui;removable

Right now TWRP uses its own custom font engine. There's really no good way to generate new fonts. Here's a set of prebuilt fonts that you can easily use:

https://github.com/TeamWin/Team-Win-Recovery-Project/tree/twrp2.5/gui/devices/resources/fonts

For anything else, you can either try to reverse engineer the font engine and come up with a way to create new fonts.

I'm hoping to port FreeType fonts to TWRP but I have to see how much space that is going to gobble up in the recovery image.
[Android Software Development] esc0rtd3w:
good info :D

thanks for the post :thumbup:
[Android Software Development] BeeGee_Tokyo:
Ok, first of all sorry for the noob question, but I really went through the 16 pages of this thread and didn't find the answer.

I am building a ROM for the Samsung Galaxy Tab 10.1 (GT-P7500 aka p4 at CM) based on CM10.1.

Unusual, but for this tablet a prebuild kernel is used in the standard CM sources instead of building the kernel together with the ROM. But I changed this and can build the kernel from the sources. But the recovery is never included. Neither the original CM10.1 recovery nor the TWRP recovery (if I change the repositories to TWRP).

Anybody can give me a tip how to include the recovery into boot.img during building the ROM.

Thanks.
[Android Software Development] hazedabeast:
What happened to this?

http://wiki.cyanogenmod.com/wiki/Samsung_Captivate:_Compile_CyanogenMod_(Linux)

________________________________

Don't Forget To Hit The Thank Button And As Always Happy Flashing:thumbup::cool::thumbup:
[Android Software Development] Dees_Troy:
Most of the Samsung tablets have a separate recovery partition and do not use the recovery in boot setup seen on many Samsung phones older than the SGS3. Use make recoveryimage instead.
[Android Software Development] BeeGee_Tokyo:
Ah, ok, I understand. I will try it this way.
[Android Software Development] Aadi:
Device Resolution

I have LG-Pecan it has a device resolution of 320x240 but you support only 320x480 can you tell me how to resize or can you post one for 320x240. :confused:
[Android Software Development] Aadi:
Recovery Boot Error???

I followed the above steps successfully compiled it and then i made a zip file of recovery i flash it and it redirects me to my old recovery am i doing something wrong.
[Android Software Development] #define:
Dont you need fastboot to flash the recovery, which is an img file?? Or is that only on certain devices?? (Excluding samsung, ofcourse)..
[Android Software Development] Aadi:
We don't really have a fastboot option in our device if we boot into it the phone will be bricked.. :D
[Android Software Development] TheMeddlingMonk:
Okay, I might try that. As far as I can tell the TWRP version included in the OmniROM 4.4 sources is 2.8.1. It does fit with a gzipped kernel, but as I said, nothing boots (so same symptoms as your device). Hence my conclusion that the issue is with the kernel, since I can't get any to work in the emulator, either (yet everything compiles just fine...).
[Android Software Development] yuweng:
i had the same problem on one of my legacy device with TWRP android-4.4 on OmniROM while cm-11.0 with TWRP android-4.4 boots & working fine ! Tried debugging with gdb backtrace doesn't says much except it crash & later on, accidentally found out it works with Materialised Theme & further found out that you can also zip the whole contains of twres folder as ui.zip, copy it to Internal sdcard/theme then delete whole twres folder & this will save you a few kb on device with limited space... :cowboy:

Updates

Whoops, it was actually android-5.1... :o

Once a XDA friend shared with me that he need this then only it'll boot, hopefully it'll work on yours... :fingers-crossed:
[Android Software Development] Android-Andi:
Link to your device tree and kernel source?

You don't mean googles kernel source?

Kernel source must be made for your device, you can't use any kernel source for any device.

Your recovery and bootimage share same partition?

In this case you might need to update the device tree, also it won't boot all roms if you don't have a seperate recovery partition.

I would suggest you compile a working kernel first for your devive, a working kernel is a must have. Once that is done you can play with the recovery.

Gesendet von meinem LG-H815 mit Tapatalk
[Android Software Development] TheMeddlingMonk:
Here you go:

Kernel source

Device tree

Vendor files (haven't put anything in this one yet since that's waiting for a working recovery)

I am building my own device tree so that I better understand how it all works and so that I can be sure I know how it's configured.

Yes, I mean Google's kernel source. When I could not get the kernel source (supplied by Toshiba) to work (even though it compiled properly), I decided to check to see if I had an issue building the kernel. So I downloaded Google's kernel source for 2.6.39 and 3.10 and built them using the config from the emulator (ICS ROM) and tried to boot the emulator with them (not my tablet). This did not work and hence leads me to my current hypothesis that I am unable to build a working kernel for reasons I am not yet aware of.

No, recovery and boot are two separate partitions. Even without a functioning recovery I can successfully boot to the ICS ROM I currently have installed.

Just for reference again, I have a Toshiba AT100 Thrive tablet that currently runs ICS and has a working CWM recovery. I am aiming to build TWRP and port OmniROM 4.4 to it.
[Android Software Development] Android-Andi:
[MENTION=7296370]TheMeddlingMonk[/MENTION] you can't simply use a different kernel tree. It might miss some drivers and device specific changes.

There's a soucre of a kernel for your device from an ICS Rom Project?

Gesendet von meinem LG-H815 mit Tapatalk
[Android Software Development] TheMeddlingMonk:
Yep, I fully understand that. That's why I requested the kernel source from Toshiba (the tablet manufacturer). That is the one you will find in my github repository.

I was not using the Google kernel source with my tablet; it was for testing with the emulator only.
[Android Software Development] clikmum:
i want complie twrp for Note 4 korea variant (SM-N910S for example....) and code name is trelteskt

how can i find BoardConfig.mk for my device?? or how can i make my own BoardConfig.mk?
[Android Software Development] TheMeddlingMonk:
I would start by looking for the device tree for the SM-N910S. I think Samsung makes their source available:

http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=SM-N910S
[Android Software Development] cognitive:
Do you have the link for device tree of LG F310L?
[Android Software Development] clikmum:
thanks.but i can't find this file.let me try find again
[Android Software Development] Hacker432:
I've tried but...I can hear vibrations but the screen remains to bootloader

Here are my sources can you have a look ?

https://github.com/Hacker432-Y550/twrp_omni_y550

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] TheMeddlingMonk:
If Samsung doesn't provide the device tree, you can make your own (takes a bit of work) or see if somebody else has one already on github. BoardConfig.mk is part of the device tree; you need more than just that.

---------- Post added at 10:29 AM ---------- Previous post was at 10:26 AM ----------

Sorry, no.
[Android Software Development] Onlineginger:
can someone help me with my huawei y538 i have it rooted just can figure anything else out
[Android Software Development] EdwinMoq:
Hey guys. I was able to get twrp to boot and it's working fine. The only problem is that the device is registered as _p769, when it should be p769, without the underscore at the front. Because of this nothing can be flashed, and i get the error 'This package is for device p769... this device is _p769', and nothing can be flashed. I have used cm13 to build.

And also if i go to advance wiping and chose 'Repair or change filesystem' to format to f2fs i get the error 'Invalid partition selection'.

Edit: It works if I choose one partition at once.

Thanks for this amazing recovery.
[Android Software Development] MSF Jarvis:
Check your device define inside the device tree.
[Android Software Development] Hacker432:
No, the twrp doesn't boot

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] a1smkshp:
This is probably simple but it didn't work as smoothly as it should have before.

I want to take my twrp backup a save it to my computer so it doesnt have to take up space on my phone/sdcard
[Android Software Development] vampirefo:
Just copy it to your PC.
[Android Software Development] a1smkshp:
I did that. With a old cheap phone to test it before i screw up my good one.

*I copied it to my pc.

*Then erased the backup on my sdcard.

*Then i copied my "pc copy" to my sdcard

It didn't work.
[Android Software Development] vampirefo:
You have to copy entire twrp folder from phone to PC, and then from PC to phone.

Twrp only looks in twrp folder, if twrp folder doesn't exist twrp can't find backups.
[Android Software Development] Hacker432:
[MENTION=2472806]vampirefo[/MENTION]

Finally I've compiled a booting twrp 2.8.7.0

But I've used a custom graphics.c

With twrp 3 it is deprecated so I removed it

With the same device tree I've tried to compile twrp 3 but it doesn't boot

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk
[Android Software Development] a1smkshp:
Im pretty sure i did that but im going to consider that i may just have made a mistake. Its good to double check though so thank you. As of right now my experiment phone is bricked and i dont want to get into detail about that. Ill come back if i have to later. Just one more question.....Is a simple drag and drop of the files good enough or do i have to right click and copy something like that?
[Android Software Development] vampirefo:
I use Linux not windows, I just drag and drop. All my device backups are on my computer.

When I want to restore a device I copy the backup to the device sdcard.

---------- Post added at 11:48 AM ---------- Previous post was at 11:46 AM ----------

Unpack your 2.8.7.0 recovery, and unpack your 3.0 recovery swap out init from 2.8.7.0 repack and flash 3.0 recovery.
[Android Software Development] a1smkshp:
I have linux too but im new at that so i thought right click is still relevant lol. Ok ill have more confidence with that now
[Android Software Development] EdwinMoq:
I checked and I don't see anyhting wrong. This is my cm.mk:

# Inherit some common CM stuff.
$(call inherit-product, vendor/cm/config/common_full_phone.mk)

# Inherit device configuration for LG Optimus L9 P769
$(call inherit-product, device/lge/p769/full_p769.mk)

PRODUCT_NAME := cm_p769
PRODUCT_BRAND := lg
PRODUCT_DEVICE := p769
PRODUCT_MODEL := LG-P769
PRODUCT_MANUFACTURER := LGE
PRODUCT_RELEASE_NAME := Optimus L9
PRODUCT_SFX := T-Mobile

# Release name and versioning
PRODUCT_RELEASE_NAME := p769

-include vendor/cm/config/common_versions.mk

UTC_DATE := $(shell date +%s)

PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=${UTC_DATE}\

# Enable Torch
PRODUCT_PACKAGES += Torch

This is my full_p769.mk:

# Inherit from those products. Most specific first.
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)

# Inherit from P769 device
$(call inherit-product, device/lge/p769/device.mk)

# Inherit from u2-vendor device
$(call inherit-product, vendor/lge/u2/p769-vendor-blobs.mk)

# Set those variables here to overwrite the inherited values.
PRODUCT_NAME := full_p769
PRODUCT_DEVICE := p769
PRODUCT_MANUFACTURER := LGE
PRODUCT_MODEL := Optimus L9

I believe that's how it's supposed to be. And this is the same device tree I use to build CM13. Which define does TWRP use for device identifier?
[Android Software Development] MSF Jarvis:
TWRP uses the existing build.prop from the ROM afaik.
[Android Software Development] vampirefo:
I don't think this is a twrp problem, the package the user is installing is checking his build.prop for p769 but his build.prop is _p769 so the check in the package refuses to install not a twrp problem.

User needs to either change check in package to _p769 or change build.prop to p769.
[Android Software Development] MSF Jarvis:
I was getting to it ;)
[Android Software Development] EdwinMoq:
I'm not sure what's the problem here. Because the updater script compares the device model reported by the recovery and the ones defined at TARGET_OTA_ASSERT_DEVICE to prevent it to being installed on an incompatible phone. Why is twrp reporting my phone as _p769 if it is defined as p769 in the device three and the build.prop? And I'm certain it's not a typo. I have checked everything and nothing its out of place.
[Android Software Development] vampirefo:
Boot into twrp

adb shell

getprop ro.product.device

Post output.

Do same in Android post output.
[Android Software Development] Android-Andi:
Open terminal and cd into your device tree.

git grep -n "_p769".

But i would not wonder if CM broke anything[emoji14]

Gesendet von meinem LG-H815 mit Tapatalk
[Android Software Development] vampirefo:
Why would cm break anything? I use cm 12.1 to compile all my recoveries, the info is pulled from build.prop renamed to default.prop in recovery.
[Android Software Development] Android-Andi:
On CM a lot of people contribute stuff, from time to time things break (sometimes only on some devices), so nothing to wonder about.

Did you used git grep to search for it?

Maybe you like to post your github link?

Gesendet von meinem LG-H815 mit Tapatalk
[Android Software Development] EdwinMoq:
Here:

edwin@edwin-HP-630-Notebook-PC:~/android_device_lge_p769$ git grep -n "_p769"
AndroidProducts.mk:2: $(LOCAL_DIR)/full_p769.mk
BoardConfig.mk:23:TARGET_KERNEL_CONFIG := cyanogenmod_p769_defconfig
cm.mk:5:$(call inherit-product, device/lge/p769/full_p769.mk)
cm.mk:7:PRODUCT_NAME := cm_p769
full_p769.mk:32:PRODUCT_NAME := full_p769

---------- Post added at 04:35 PM ---------- Previous post was at 04:28 PM ----------

From twrp:

edwin@edwin-HP-630-Notebook-PC:~$ adb shell
~ # getprop ro.product.device
_p769

From CM13:

edwin@edwin-HP-630-Notebook-PC:~$ adb shell
shell@p769:/ $ getprop ro.product.device
_p769

So indeed, the problem is in the build.prop. But it still doesn't make sense why CM is putting an underscore in front of the device name. I grep'd the device three and everything it's fine.
[Android Software Development] vampirefo:
Just remove it and repack recovery.
[Android Software Development] EdwinMoq:
This is the device three. I haven't pushed the twrp build flags, but that's exactly how it looks like.

---------- Post added at 04:44 PM ---------- Previous post was at 04:40 PM ----------

That would do.
[Android Software Development] Android-Andi:
[MENTION=6289357]EdwinMoq[/MENTION] could not find the issue in your tree, only some cleanup.

It could be the device get set wrong from android_build repo somehow?

Gesendet von meinem LG-H815 mit Tapatalk
[Android Software Development] EdwinMoq:
I don't know. The only thing I did was apply this commit witch supposedly prevents the build system from wiping /recovery/res. And I doubt that's the issue.
[Android Software Development] Android-Andi:
That won't affect that.

You use your tree for twrp only? Or for CM too?

If you only like to build twrp:

I would suggest you to create a twrp only tree like i did here https://github.com/andi34/device_sa...mmit/1f88423c5ce5405e011d3b67a02a6aab8ae4a513

I moved all important defines from the common trees into the device tree and removed every unused stuff.

Gesendet von meinem LG-H815 mit Tapatalk
[Android Software Development] EdwinMoq:
I used the same device tree I used to build cm. I will try creating a TWRP-only tree. Thanks for the help.
[Android Software Development] diogofd8:
So... I'm trying to get some custom roms for my Vodafone Smart Tab 4G, in order to flash those safely (I am trying to get into development by doing something for this device which doesn't have anything), I should need a working TWRP.

In order to be able to build TWRP I need to have some kind of source from CM or Omni for my device? Or am I confusing things?
[Android Software Development] clikmum:
i find BoardConfig.mk in https://github.com/TeamEOS/device_samsung_treltexx/blob/mm6.0/BoardConfig.mk

but it for N910C Brand and belong to TeamEOS (or not).can i use this file for build recovery? :rolleyes:
[Android Software Development] EdwinMoq:
Do you have any previous knowledge in android development? If you took the time time to read about how the build system works, about make and makefiles and how devices trees are made before attempting to build anything, things would be a lot easier for you, and you'll save yourself a lot of frustation. I'm sure that with some research you'll find everything you need.
[Android Software Development] kimvic2s:
Do I need to have the source of my device(which is a Spreadtrum one :3) for me to compile a twrp for it? Need answers asap. Thanks. Regards.
[Android Software Development] Hacker432:
Yes obviously

Inviato dal mio HUAWEI Y550-L03 utilizzando Tapatalk