yashsingh1/xdaforums huggingface dataset:
[Android Software Development] _that:
The line was wrong because it referenced an undefined variable, but the fix is not to delete it - apparently Dees_Troy hasn't tested this before merging. The correct fix is to copy the line from one of the other themes.

Support for devices with no TTF support is essentially deprecated because TWRP's scaling works badly with no TTF support. You need to modify the theme manually to use a smaller raster font.
[Android Software Development] yuweng:
Me donno much coding & i thought it was the scaling coding problem though my other newer 480x800 & 480x854 devices, user reported feedbacks 540x960, all doesn't have this problem, all using TW_DISABLE_TTF... :o

Updates

Even [WIP] gui: stock theme rework have this problem so i don't really know if its really my device problem... :o

View attachment 3409056

Final Conclusion

You are absolutely right, my Master Shifu _that... :good: :laugh:

Had to use Roboto-Condensed-12 & manual edit the ui.xml accordingly... :o

<resource name="font" type="font" filename="RobotoCondensed-Regular.ttf" size="20" fallback="[COLOR="Blue"]Roboto-Condensed-12[/COLOR]" />
<resource name="mediumfont" type="font" filename="RobotoCondensed-Regular.ttf" size="20" fallback="[COLOR="blue"]Roboto-Condensed-12[/COLOR]" />
<resource name="filelist" type="font" filename="RobotoCondensed-Regular.ttf" size="20" fallback="[COLOR="blue"]Roboto-Condensed-12[/COLOR]" />
[Android Software Development] Android-Andi:
I tried BOARD_HAS_FLIPPED_SCREEN and used a portrait theme, but recovery still boots landscape.

Edit:

"

3. Why there is no Portrait Recovery?

ketut.kumajaya:

"(...) Samsung used the easiest way to rotate a landscape framebuffer device as a portrait device: rotate the touchscreen driver and then leave the surfaceflinger to rotate Android graphics. A framebuffer application (recovery, AROMA) still detect the framebuffer orientation as landscape. Back rotate the touchscreen orientation is much easier than rotate the framebuffer and LCD driver.""
[Android Software Development] yuweng:
i donno man, its been quite awhile, though i just built it again for my portrait device with BOARD_HAS_FLIPPED_SCREEN : true, RECOVERY_TOUCHSCREEN_FLIP_X := true, RECOVERY_TOUCHSCREEN_FLIP_Y := true, everything works except its flipped... :laugh:

View attachment 3409198

i don't have any high res cam ATM... :p

Hmm, now that i recall, they had a 1280x800 landscape device & they use 800x1280 portrait or something like that & they use touchscreen swap XY, flip Y & got it working... :cowboy:
[Android Software Development] Android-Andi:
Touch isn't the issue, the screen doesn't rotate - with our without the flipped screen flag and independent from the ui - even the portrait hdpi theme boots in landscape. It's like ketut said, it would need a hughe change in kernel source or someone needs to modify the landscape theme to look like a portrait theme (rotate all png 90° and a lot of other changes) - but imo it's to much work as it has no big benefit.
[Android Software Development] _that:
Rotating the images is easy. But you'd also need to rotate everything else - text output, orientation of list boxes, input widgets, keyboard, etc. The only reasonable solution is to rotate the final bitmap when it's drawn to the framebuffer, but that will be slow since we can't use the GPU.
[Android Software Development] :
Yea, I saw that a day or so ago. Still, if you diff the ui.xml (480x800) with ui.xml (1080x1920) you will see there are a few other lines missing as well. I ported 1080x1920 to 480x800 and replaced the old with the new in the source. Made a build using portrait_mdpi and it worked like it was suppose to at that point. Not sure how or when 480x800 got jacked up like that lol. Before the TW_THEME flag was introduced that resolution never gave me an issue and before I put two and two together I had decided to use portrait_hdpi since TWRP would just scale it and it wouldn't affect the final build size too much. Appreciate your feedback though.

---------- Post added at 10:54 AM ---------- Previous post was at 10:46 AM ----------

But I can confirm that the reworked theme on gerrit for 480x800 works right out of the box and is awesome lol
[Android Software Development] Android-Andi:
[MENTION=4878287]_that[/MENTION] can't we rotate the buffer here to 90° instead 180° ?

https://github.com/omnirom/android_bootable_recovery/blob/android-5.1/minuitwrp/graphics.c#L361
[Android Software Development] :
Have you tried it?
[Android Software Development] Android-Andi:
Don't know how to make it rotate 90° there instead 180...
[Android Software Development] :
I think that would work honestly. Create a new flag using similar code. Apply the flag in the BoardConfig.mk and instead of using portrait for TW_THEME, just use landscape. When it rotates 90 degrees and is scaled it should work in theory.
[Android Software Development] Android-Andi:
The problem: idk how to modify it on mentioned lines to rotate the buffer 90°... Only using a portrait theme doesn't work, it needs a modified graphics.c
[Android Software Development] :
You wouldn't use a portrait theme if you aim to rotate it at 90 degrees. You would use landscape. If you use landscape for your portrait device it would show TWRP going across your device from left to right. I have done this before just to be curious lol. Then, define new flag to have it be rotated at 90 degrees and voila. I really do think it would work. And it would be an AWESOME addition to see welcomed to TWRP :D
[Android Software Development] Android-Andi:
[MENTION=6367467]SHM[/MENTION] i am on a landscape device, so if i rotate the fb 90° i would need a portrait theme, correct me if i am wrong.

So how to rotate the buffer in graphics.c?
[Android Software Development] :
Yea, you are correct ;). I assumed your device was on portrait initially haha. My bad.

---------- Post added at 12:06 PM ---------- Previous post was at 12:04 PM ----------

But instead of rewriting the current flag that flips it 180 degrees. I would logically suggest defining a new flag that would rotate it 90 degrees instead and then define that flag in BoardConfig.mk. Man, just thinking about this has me excited hahahaha.

---------- Post added at 12:16 PM ---------- Previous post was at 12:06 PM ----------

I'm busting out my computer :D and am going to try this!!!
[Android Software Development] Android-Andi:
Wonder, if this will be enough:

From 2b5261ab9851bd8d7d6901ddd3c1be54bc77c3b6 Mon Sep 17 00:00:00 2001
From: Andreas Blaesius <skate4life@gmx.de>
Date: Sat, 18 Jul 2015 14:11:49 +0200
Subject: [PATCH] add flag to rotate the framebuffer 90 degrees

Change-Id: I513260b4297f3e2f1a66e18f45fb7d29183332d1
---

diff --git a/minuitwrp/Android.mk b/minuitwrp/Android.mk
index 188de9d..0618030 100644
--- a/minuitwrp/Android.mk
+++ b/minuitwrp/Android.mk
@@ -89,6 +89,10 @@
LOCAL_CFLAGS += -DBOARD_HAS_FLIPPED_SCREEN
endif

+ifeq ($(BOARD_ROTATE_ORIENTATION_90), true)
+LOCAL_CFLAGS += -DBOARD_ROTATE_ORIENTATION_90
+endif
+
ifeq ($(TW_IGNORE_MAJOR_AXIS_0), true)
LOCAL_CFLAGS += -DTW_IGNORE_MAJOR_AXIS_0
endif
diff --git a/minuitwrp/graphics.c b/minuitwrp/graphics.c
index 04c41fb..c1eba45 100644
--- a/minuitwrp/graphics.c
+++ b/minuitwrp/graphics.c
@@ -279,8 +279,13 @@
#endif

fb->version = sizeof(*fb);
+#ifdef BOARD_ROTATE_ORIENTATION_90
+ fb->width = vi.yres;
+ fb->height = vi.xres;
+#else
fb->width = vi.xres;
fb->height = vi.yres;
+#endif
#ifdef BOARD_HAS_JANKY_BACKBUFFER
printf("setting JANKY BACKBUFFER\n");
fb->stride = fi.line_length/2;
[Android Software Development] :
It probably would but then it would mess up the BOARD_HAS_FLIPPED_SCREEN flag.
[Android Software Development] Android-Andi:
Needs testing, doing a img right now. I don't need the flip flag ;) default touch orientation is portrait in recovery here, but i can change it through sys interface to landscape
[Android Software Development] _that:
You can try to resurrect this patch:

https://gerrit.omnirom.org/#/c/8703/
[Android Software Development] Android-Andi:
The changes i made didn't work :(

yeah, dees troy told me that this commit isn't working, and bad to say, but it's ahead my knowledge to fix this :(
[Android Software Development] :
I am not overly surprised. Since all you did was just flip x and y. You have to consider the math portion as well. I'm looking at it now. I looked at that abandoned commit on gerrit and to be honest I believe it was done in a overly complicated way. Should be as simple as defining the resolution flag for landscape if device is portrait and touching up the code for the board flipped screen flag to rotate 90 instead of 180 and then defining that change with a new flag. The rest is already handled in the source.
[Android Software Development] _that:
This is the core part. Unlike 180° rotation, the orientation of the temporary buffer and the real framebuffer differs. So you have to be careful where to swap x and y coordinates.
[Android Software Development] :
Agreed
[Android Software Development] :
Merging Tasssadar's TW_HAS_LANDSCAPE flag and all that pertains to it over to the TWRP source.

Edit: yea, don't see that happening. It's just way too much data for me and not enough time after making a fair attempt today.
[Android Software Development] Araca:
I have managed to fix the 3 Bugs that i have say before :highfive:

But now i have only 2 last bugs.

1. When i select backup , it shows under DATA 8200mb .. but i think it will backup the whole internal sdcard .. because i don't have that mush data ... (normal 1200mb):confused:

i found out that have i both paths : data/share/ and data/media and on both the sdcard is linked....

so when i set in my boardconfig that data/media is internal storage twrp will backup data/share... also and this is my problem but how to fix this?

2 CPU Temp is not showing

thx in advance
[Android Software Development] yuweng:
Cherry pick this with few remarks here & there, TW_ROTATION := 180 works but not 90... :cowboy:

Touch screen actually do work here.. :cowboy:

Hmm, typically this should be /data/media/0, i don't use that flag at all, its obsolete, mentioned at OP, just add a mkdir /external_sd at init.rc & external_sd at recovery.fstab & TWRP will take care of it... :cool:

# mount point	fstype	device	[device2] fstype2

/boot	emmc	/dev/block/platform/hi_mci.0/by-name/boot
/misc	emmc	/dev/block/platform/hi_mci.0/by-name/misc
/system	ext4	/dev/block/platform/hi_mci.0/by-name/system
/cache	ext4	/dev/block/platform/hi_mci.0/by-name/cache
/recovery	emmc	/dev/block/platform/hi_mci.0/by-name/recovery
/data	ext4	/dev/block/platform/hi_mci.0/by-name/userdata	length=-16384
/cust	vfat	/dev/block/platform/hi_mci.0/by-name/cust	flags=display="Custom Storage";storage;wipeingui;backup=1
/[COLOR="blue"]external_sd[/COLOR]	vfat	/dev/block/platform/hi_mci.1/mmcblk1p1	/dev/block/mmcblk1 flags=display="External Storage";storage;wipeingui;removable
/otg	vfat	/devices/hisik3-usb-otg/usb1	flags=display="USB-OTG";storage;wipeingui;removable

As for the CPU TEMP, use adb command -> adb shell su -c "ls -R" > myp7.txt that will give you some hint for all the require lun, brightness, temp & battery path. Rule of thumb, if it ain't broken don't fix it... :laugh: Ref here & here & here & here
[Android Software Development] Araca:
i have forgotten to update files on github .. :rolleyes:

the paths are already changed to external sd and i also tried with /data/media/0 ... but always he will backup the whole sdcard...

github is now up to date ;)
[Android Software Development] yuweng:
Try building without these flags, i have fellow XDA member feedback that it works for their MTK Huawei... :cowboy: Ref here

Attach your -> adb shell su -c "ls -R" > myp7.txt so that i can help you identify the CPU TEMP, if you don't mind, there are quite alot of private info there or you have already found it... :cowboy:
[Android Software Development] Araca:
thx but it don't worked for me it always says that when choose backup that data partion has 8200mb.... hmm

EDIT : i find this can this help?

here is the myp7.txt :)
[Android Software Development] yuweng:
According to your myp7.txt internal sd is indeed at /data/share/0... :eek: May be the Master Shifu's here can advice you further... :o

TW_CUSTOM_BATTERY_PATH := "sys/devices/platform/bq_bci_battery.1/power_supply/Battery/capacity"
TARGET_USE_CUSTOM_LUN_FILE_PATH := "/sys/devices/hisik3-usb-otg/gadget/lun0/file"
TW_BRIGHTNESS_PATH := "sys/devices/platform/k3_fb.1/leds/lcd_backlight0/brightness"
TW_CUSTOM_CPU_TEMP_PATH :=

Can't find the CPU TEMP, there are too many of them... :o

./sys/class/thermal:
temp:batt_id
temp:battery
temp:camera0_id
temp:camera1_id
temp:dcxo_0
temp:dcxo_0_low
temp:dcxo_1
temp:dcxo_1_low
temp:flash
temp:lcd
temp:pa0
temp:pa1
temp:scamera
temp:sim_card1
temp:systemh
temp:systeml

Updates

You can try that, as Master Shifu codeworkx says here... :laugh:
[Android Software Development] #define:
So far so good...
[Android Software Development] wzhy:
can only compile with eng lunch?

my device only has userdebug lunch.
[Android Software Development] yuweng:
Building for Mediatek SoC

All Master Shifu here,

i'm stuck at...

Obviously, unpackbootimg doesn't work on MTK SoC, is it possible to manually copy those unpack files over but to where & which folder...

i'm building for MT6577 & use the data.cpp & partition.cpp taken from here...

TIA... :o
[Android Software Development] #define:
I compile for my device with brunch...

Lunch isn't compulsory... :thumbup:
[Android Software Development] nikhil16242:
Could some one please help me with this issue :) ?

So the problem is that , the buttons in the reboot menu like System,Recovery, Boot-loader seem to have delayed response when i press on them.

It does perform the desired function but only after about 8-10sec. Also the power off button doesn't seem to work at all . The recovery just freezes when i press power off button.(Is there any way to get a recovery log to identify the cause of these problems?)
[Android Software Development] #define:
What device are you compiling for and what changes did you make in boardconfig.mk??

Sent from my Nexus 7
[Android Software Development] nikhil16242:
Thank you for the quick reply :) .I have compiled it for the Desire C .boardconfig.mk has the usual stuff like partition sizes etc. And the following TWRP flags

DEVICE_RESOLUTION := 320x480

TW_INTERNAL_STORAGE_PATH := "/emmc"

TW_INTERNAL_STORAGE_MOUNT_POINT := "emmc"

TW_EXTERNAL_STORAGE_PATH := "/sdcard"

TW_EXTERNAL_STORAGE_MOUNT_POINT := "sdcard"

TW_NO_REBOOT_POWEROFF := true

TW_DEFAULT_EXTERNAL_STORAGE := true

TARGET_RECOVERY_PIXEL_FORMAT := "RGB_565"
[Android Software Development] #define:
Try without the no_reboot_poweroff flag...

See if that helps...

Sent from my Nexus 7
[Android Software Development] nikhil16242:
I have already tried without that flag :(. Same result. I am not sure if no_reboot_poweroff is even a real flag . I just wanted to remove power off button since it results in a recovery freeze.
[Android Software Development] #define:
Hmmm.. I compiled for HTC explorer, and it gives me a bug that after a few boots into the recovery, the partitions becomes corrupt...

Now i've found that the kernel is responsible for it...

I have yet to compile with a stabler kernel, but try it...

Try a different kernel source(or a prebuilt kernel) and/or a different rom source...

Sent from my Nexus 7
[Android Software Development] BleedingIris:
Corrupt means unsalvageable?

I get corrupt partitions notifications (I assume ), whenever I use flash_image binary.

cm10 htc a310e k2.6 w /smooth of butter & broke Cam/corder
[Android Software Development] #define:
Not unsalvageable...

You can flash another recovery and come back to twrp and it'll continue working for another few days.. I'm investigating this...

Better take pico discussion to our thread..

Sent from my Nexus 7
[Android Software Development] Dees_Troy:
Some kernels are very slow to reboot. You can try to find a different kernel or just live with it.
[Android Software Development] ygorigor:
Try this http://xdaforums.com/showpost.php?p=30040093
[Android Software Development] yuweng:
Yeoh man, you have re-directed me back to my own thread...

That KANG is for porting TWRP V2.3.2.3 to hundreds if not thousands of different MT6575/ 77 be it mtd or emmc partition, Credits to Russian Master Shifu's Javum for V2.3.2.3 & Michfood for the repack utils... :good:

Since MT6575/ 77 is already merged here i'm trying to compile the latest V2.4.1.1 out of it.... :fingers-crossed:
[Android Software Development] hell_lock:
I am getting this error:

Notice file: bionic/libc/NOTICE -- out/target/product/totoro/obj/NOTICE_FILES/src//system/lib/libc_nomalloc.a.txt
make: *** No rule to make target `out/target/product/totoro/system/lib/libexfat.so', needed by `out/target/product/totoro/recovery/root/sbin/exfat-fuse'. Stop.
make: *** Waiting for unfinished jobs....
Notice file: system/extras/ext4_utils/NOTICE -- out/target/product/totoro/obj/NOTICE_FILES/src//system/lib/libext4_utils.so.txt
hell-lock@helllock-VirtualBox:~/android/system$

I tried to debug the issue by adding

TW_NO_EXFAT_FUSE := true

in boardconfig but still no luck.. I tried compiling after doing make clobber but no improvement.. previously this error was not there in compiling cm7
[Android Software Development] championswimmer:
@Dees_Troy

please add the inclusion of TW_HAS_NO_BOOT_PARTITION in the OP too ;)

http://review.teamw.in/#/c/466/

I still get lots of PM's every week inquiring how I solved the problem of "/boot partiton not found" :D

===================================================

also another notable thing to mention is that if you are having AOKP/PA or some similar build envirenment up and running, you should replace the build directory with that of CM10/10.1 too... AOKP's build dir cannot spew out TWRP images
[Android Software Development] hell_lock:
Fixed previous bug but now there is new one!

target thumb C: libminadbd <= bootable/recovery/minadbd/adb.c
make: *** [out/target/product/totoro/obj/EXECUTABLES/recovery_intermediates/twrp-functions.o] Error 1
make: *** Waiting for unfinished jobs....
target StaticLib: libc_nomalloc (out/target/product/totoro/obj/STATIC_LIBRARIES/libc_nomalloc_intermediates/libc_nomalloc.a)
[Android Software Development] Dees_Troy:
Your build problem should now be fixed. Make sure you pull the latest from our github.
[Android Software Development] hell_lock:
target thumb C: cryptsettings <= bootable/recovery/crypto/cryptsettings/cryptsettings.c
make: *** No rule to make target `out/target/product/totoro/obj/STATIC_LIBRARIES/libfs_mgrtwrp_intermediates/libfs_mgrtwrp.a', needed by `out/target/product/totoro/obj/UTILITY_EXECUTABLES/cryptsettings_intermediates/LINKED/cryptsettings'. Stop.
make: *** Waiting for unfinished jobs....
bootable/recovery/crypto/cryptsettings/cryptsettings.c:8:45: error: ../crypto/fs_mgr/include/fs_mgr.h: No such file or directory
bootable/recovery/crypto/cryptsettings/cryptsettings.c: In function 'main':
bootable/recovery/crypto/cryptsettings/cryptsettings.c:47: warning: implicit declaration of function 'fs_mgr_get_crypt_info'
make: *** [out/target/product/totoro/obj/UTILITY_EXECUTABLES/cryptsettings_intermediates/cryptsettings.o] Error 1
bootable/recovery/crypto/cryptfs/cryptfs.c: In function 'cryptfs_check_passwd':
bootable/recovery/crypto/cryptfs/cryptfs.c:42: warning: 'main' is normally a non-static function
bootable/recovery/crypto/cryptfs/cryptfs.c:74: error: expected declaration or statement at end of input
make: *** [out/target/product/totoro/obj/UTILITY_EXECUTABLES/cryptfs_intermediates/cryptfs.o] Error 1
Note: sdk/draw9patch/src/com/android/draw9patch/ui/ImageTransferHandler.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
hell-lock@helllock-VirtualBox:~/android/system$

Really pissed off with so much errors!! I have already debugged 4 more errors but still ..
[Android Software Development] Araca:
I found the cpu temp :highfive:

TW_CUSTOM_CPU_TEMP_PATH := "/sys/devices/platform/hi6620-tsensor.1/acputemp"

when i look with a fileexplorer in my system/data it shows that /media/0 is symlinked to internal_sdcard but also /share/0 but medias font is orange ( I'm using FX )

can it be that the share/0 is an old symlink from 4.4.4 ? and when yes can i remove this ?
[Android Software Development] :
Something isn't right on your phone. You should not have /data/share and /data/media as storage locations. See about resolving this issue first, then in your BoardConfig.mk file, remove any flags which tell TWRP it's internal storage path as well as external storage path. It is not needed. TWRP will handle them automatically. You can look at partition.cpp to see for yourself.

Instead, all you have to do is open up your twrp.fstab file and look for your external mount point. Name the mount point either, external_sd, sdcard, or external_sdcard and TWRP will literally handle the rest when booted. Same goes with /data/media. TWRP will automatically attempt to find /data/media. If it exists it will symlink it to be your internal storage while in TWRP. As for /data/share, since this location should not exist for you then you must determine the cause as to why it is there and make it properly go away.

---------- Post added at 12:35 PM ---------- Previous post was at 12:31 PM ----------

In the BoardConfig.mk file make sure you have the flag, RECOVERY_SDCARD_ON_DATA := true

---------- Post added at 01:00 PM ---------- Previous post was at 12:35 PM ----------

Yes, 90 won't work because it has to redirect the x and y values accordingly. That commit on gerrit is missing a lot of those factors after reviewing the direct source from tasssadars TWRP repo. What I did was, I found the first commit that tasssadar made which introduced theme rotation. You can find that commit here. I made a patch for just that commit using the following git command.

git format-patch -M -C 418fa7cd8aa74f7adbfe55be822869384a0f5a8b~1..418fa7cd8aa74f7adbfe55be822869384a0f5a8b

Then I ran a git check of that patch against the actual TWRP source to see what files would be conflicted.

git apply --check "path_to_the_patch_file"

When it gave me the list of files I began diffing his files from his repo with the most recent commit pulled to my computer against the actual files from the official TWRP source and started merging everything that pertained to theme rotation. However, it is a lot of codes and I kept getting pulled away from my computer by the wife and kids which caused me to keep forgetting where I was at in my progress. This was a pretty clear sign that I didn't have the proper adequate time to sit down and make it possible. So I ran the following git command to remove my changes and take me back to the last known commit.

git reset --hard

Maybe you can give it a go if your time is more available.