yashsingh1/xdaforums huggingface dataset:
[Android Software Development] powermetza:
I compiled TWRP 2.8.7.0 for Galaxy TAB 3 8.0 - T310 and a I have two problems:

1. I can't modify the brightness. I define in BoardConfig.mk the next lines for brightness:

TW_BRIGHTNESS_PATH := "sys/devices/platform/i2c-gpio.24/i2c-24/24-002c/backlight/lcd-backlight/brightness"
TW_MAX_BRIGHTNESS := 255

From recovery.log I have this:

I:TW_BRIGHTNESS_PATH := sys/devices/platform/i2c-gpio.24/i2c-24/24-002c/backlight/lcd-backlight/brightness
I:Found brightness file at 'sys/devices/platform/i2c-gpio.24/i2c-24/24-002c/backlight/lcd-backlight/brightness'
I:TWFunc::Set_Brightness: Setting brightness control to 255
Starting the UI...Pixel format: 800x1280 @ 32bpp
Pixel format: BGRA_8888
Not using qualcomm overlay, 's3cfb'
...
I:Set page: 'action_complete'
I:operation_end - status=0
I:TWFunc::Set_Brightness: Setting brightness control to 5
I:TWFunc::Set_Brightness: Setting brightness control to 0
I:TWFunc::Set_Brightness: Setting brightness control to 132
I:Set overlay: ''
I:Set page: 'clear_vars'
I:Set page: 'advanced'
I:Set page: 'main'
I:Set page: 'clear_vars'
I:Set page: 'main2'
I:Set page: 'settings'
I:Set page: 'screen'
I:TWFunc::Set_Brightness: Setting brightness control to 48
I:TWFunc::Set_Brightness: Setting brightness control to 71
I:TWFunc::Set_Brightness: Setting brightness control to 99
I:TWFunc::Set_Brightness: Setting brightness control to 135
I:TWFunc::Set_Brightness: Setting brightness control to 170
I:TWFunc::Set_Brightness: Setting brightness control to 214
I:TWFunc::Set_Brightness: Setting brightness control to 237
I:TWFunc::Set_Brightness: Setting brightness control to 201
I:TWFunc::Set_Brightness: Setting brightness control to 163
I:TWFunc::Set_Brightness: Setting brightness control to 117
I:TWFunc::Set_Brightness: Setting brightness control to 71
I:TWFunc::Set_Brightness: Setting brightness control to 35

2. The second problem is the screen timeout setting. It works, but instead of screen off I get the Boot Screen - Samsung GALAXY Tab 3 ( the tablet is not restarting, if I touch the screen or press a button the TWRP Swipe to Unlock is appear).

If someone know or have an idea about how to fix the screen brightness please help me.
[Android Software Development] yuweng:
Too many data, my brain hurts... :laugh: Actually, i don't have the skill to merge so many of it... :o

Try while at TWRP, that should change the brightness & if it doesn't then i think something is wrong with your device

adb shell
echo 0 > sys/devices/platform/i2c-gpio.24/i2c-24/24-002c/backlight/lcd-backlight/brightness
echo 255 > sys/devices/platform/i2c-gpio.24/i2c-24/24-002c/backlight/lcd-backlight/brightness

As for your 2nd question, hmm, thats something new but at least it works so nothing to complain... :laugh: May be its a screen saver... :cowboy:
[Android Software Development] :
Here is a screenshot of my first attempt to getting landscape to work on my portrait device. Screenshot was taken in portrait mode for some reason though so it unfortunately doesn't show all of it lol.
[Android Software Development] powermetza:
[MENTION=4478781]yuweng[/MENTION]

Thanks for the help. With echo "0 > /sys....." command I found the correct address for brightness:

/sys/devices/platform/samsung-pd.2/mdnie/mdnie/mdnie/panel/brightness

And because of this brightness fix, the second problem was also fix. Now after X seconds (set in Settings - Screen -Screen timeout in seconds) the screen is turning off.
[Android Software Development] Araca:
Problem solved i have edited the partition.cpp to mount data/share as media folder :D

and it works :D

but cpu temp is a problem ... when i compile twrp with the

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

it boots up and then shut down, but this is the file where the temp is stored i checkt these...

only one bug left ^^
[Android Software Development] :
Does /sys/class/thermal/thermal_zone0/temp exist on your device?
[Android Software Development] Araca:
no only this :

./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
[Android Software Development] :
The custom path you are using; is that a symlinked path? Would be odd but could be the issue if it is.

If the path you are using is a soft symlink file then use readlink to find the location of the original file and use that as your custom cpu temp path.

readlink -f "/sys/devices/platform/hi6620-tsensor.1/acputemp"

If that new path still fails you then I can only assume it is not the correct path and you must look deeper into your /sys directory.

---------- Post added at 08:43 PM ---------- Previous post was at 07:50 PM ----------

[MENTION=5778445]Araca[/MENTION],

Click here, and here to see what the flag is doing.
[Android Software Development] yuweng:
Based on your findings & SHM suggestion, i had a look at your myp7.txt again, i think it should be either....:fingers-crossed:

/sys/devices/platform/hi6620-tsensor.1/tsensor0_state
[COLOR="Blue"]or[/COLOR]
/sys/devices/platform/hi6620-tsensor.1/tsensor1_state

./sys/devices/platform/hi6620-tsensor.1:
acputemp
driver
gputemp
modalias
power
subsystem
tsensor0_localtemp
tsensor0_remotetemp
tsensor0_state
tsensor1_localtemp
tsensor1_remotetemp
tsensor1_state
uevent

A little bit of OT

Hey, how to gain access to jenkins.twrp.me, been looking for a free build server for the longest time for building TWRP, never use one before, donno how... :o
[Android Software Development] _that:
That's the official build server, and it's already too slow. If you are an official device maintainer, you might be able to trigger test builds for your device(s).
[Android Software Development] yuweng:
i'm not a device maintainer but a SoC maintainer for TWRP for MediaTek devices... Though not officially... :o

Existing porting tool, i have to build all the different images, pack it into the exe & i have to do it on every new releases of TWRP, started from 2.3.2.3 though i stop doing that since 2.8.2.0... :cowboy:

Fyi, my PhilZ Touch porting tool tooks about 12 hours, just to build all the different BoardConfig.mk, for armv6, v7, v8, where it will auto download the needed images, unpack, repack & push to the device accordingly... :cool:

Getting lazy & trying to figure out ways to automate it for TWRP where it can download every new releases from a jenkins server instead of me building it... :laugh:
[Android Software Development] :
Yea, I do not fully understand how that Jenkins site works. It is my understanding that we can use it to send patches or updates to the device tree to help make it easier on those that are maintainers and to insure future TWRP builds are stable, but I have yet to figure out how that is even remotely possible lol. The Device Tree for K2_CL needs to be updated and I have it but looking at that site I see no doors to open up.
[Android Software Development] _that:
For submitting device tree patches you use https://gerrit.twrp.me - Jenkins is only the build server.
[Android Software Development] :
A huge thank you for that information man.
[Android Software Development] Electry:
minuitwrp

Alright, I just built a TWRP for my device (Lenovo K920/msm8974 soc), but after trying to fastboot boot recovery.img the phone just freezes immediately.

I replaced libminuitwrp.so library in ramdisk of the recovery.img with another one from working twrp recovery image (built by other guy), and everything worked fine then. Both libs are about the same size, although different.

Anyone has an idea what could possibly be wrong with my source / how to debug it ? I am using cm12.1 for building.
[Android Software Development] :
Interesting. Hope you get an answer worthy. Got the same issue on my end as well and with no explanation. Just always assumed it was an issue with the bootloader/fastboot.
[Android Software Development] Electry:
i just added these flags to BoardConfig.mk

TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888" # Changed from BGRA_8888
TW_INCLUDE_FB2PNG := true
TW_MAX_BRIGHTNESS := 255
TW_BRIGHTNESS_PATH := /sys/class/leds/lcd-backlight/brightness

not sure which one did the trick, but it works now. lol.
[Android Software Development] :
I use those already except for fb2png. Will have to look at the source and see what that flag does and it's purpose.
[Android Software Development] someone755:
For some reason my TWRP build will not allow me to format any partition to F2FS. The kernel I'm using supports it, and that dame kernel is used to build TWRP. The ROM (CM 12.1) also supposedly has support for that fs.

Do I need to set some special flags to get F2FS running?
[Android Software Development] Android-Andi:
No issues here on tab 2 for f2fs.

Maybe compare the device commits https://review.slimroms.eu/#/q/topic:espresso10-f2fs
[Android Software Development] Hikari no Tenshi:
Hi all.

I have compiled TWRP v2.8.7.0 for my Lenovo S650 ROW. But I have some issues while restoring backup of Data partition.

My device has Internal Storage as folder /data/media on Data partition.

My issue:

1. Make backup of current ROM

2. Make Factory Reset or Wipe Data, Cache, Dalvik

3. Install other ROM

4. Try to restore backup

5. Restore of Data will fail with error: E:extractTarFork() process ended with ERROR=255

Can someone explain me how to properly handle Data partition in my case?

My device tree: https://github.com/Serhij/android_device_lenovo_s650_row

Thanks in advance.
[Android Software Development] someone755:
Does the recovery log provide more information? Usually when "ERROR=#" is displayed, the log will help you determine what the cause of the error is.

There's an option under "Advanced" to copy it to the SD card, or you could pull it via ADB from /temp/recovery.log.

Now for my own question:

I've successfully gotten TWRP to build and boot on my Xperia Z3 Compact, and I'd like to submit my device trees for review, to be considered for official support. Who can I contact regarding this?

And before I do, are there any limitations or general rules to be applied to the trees? At the moment, I'm building TWRP alongside Paranoid Android, so my dependencies file's prefix is "pa" instead of the usual "cm". Is that something I should change?

Also, are custom kernels or init file edits allowed? The kernel sources I'm using are modified to include intelli-thermal (among other things), and the modified init.qcom.rc file is used to enable that module. Without these edits, the device's temperature quickly increases because of a bug in the stock thermal management on Xperia devices.
[Android Software Development] Hikari no Tenshi:
==> extracting: /data//backup/ (mode 40700, directory)
mkdir(): Read-only file system
FAILED RESTORE OF FILE i: /data//backup/
E:Unable to extract tar archive '/external_sd/TWRP/BACKUPS/Lenovo_S650/2015-07-31--19-10-11_ALPS.KK1.MP3.V1.11/data.ext4.win'
E:extractTarFork() process ended with ERROR=255
[Android Software Development] :
gerrit.twrp.me

Use either cm or omnirom. I recommend Omnirom. For your device tree on your github, specify the branch accordingly. For example, if using Omnirom branch android-5.1, then name your branch for your device tree as such and if you have multiple branches then make it show as default.

Yes that is fine. Just insure they are included in the device tree and that the device tree points to their paths during the build process.

---------- Post added at 05:11 PM ---------- Previous post was at 04:59 PM ----------

Two things stand out just by looking at this. One is the path for data. Between the directory data and the directory backup there is nothing specified inbetween. No media directory or anything.

Two, it's reporting back that the current data directory is mounted as read only and so will not be able to modify anything without write permissions.
[Android Software Development] Hikari no Tenshi:
According to log, TWRP restores Data partially.

For example:

tar_extract_all(): calling th_get_pathname()
tar_extract_all(): calling tar_extract_file(t, "/data//app/com.skype.raider-1.apk")
item name: '/app/com.skype.raider-1.apk'
reg
==> tar_extract_regfile(t=0x40f72e50, realname="/data//app/com.skype.raider-1.apk")
==> extracting: /data//app/com.skype.raider-1.apk (file size 29301466 bytes)
### done extracting /data//app/com.skype.raider-1.apk
==> setting perms: /data//app/com.skype.raider-1.apk (mode 100644, uid 1000, gid 1000)

If I boot to ROM, I will see some of my restored apps.

But why Data partition suddenly goes read only?
[Android Software Development] _that:
Usually due to filesystem corruption - in this case you'll get a message in the kernel log (dmesg). To fix, run fsck or reformat the partition.
[Android Software Development] Hikari no Tenshi:
How this will be indicated in dmesg?

e2fsck -n /dev/block/mmcblk0p8 tells that file system has errors.

But why Data getting corrupted after Wipe or Factory reset and how to solve this?
[Android Software Development] _that:
similar to this:

EXT4-fs (mmcblk0p8): Remounting filesystem read-only

preceded by some error messages.

Wipe and Factory Reset just delete specific directories from the data partition. To solve, let fsck repair the filesystem or reformat it.
[Android Software Development] :
[MENTION=4878287]_that[/MENTION], trying to submit a change to a device tree on gerrit.twrp.me. I cloned the current device tree from there and have made a new branch and applied the changes. In the terminal I am trying to push those changes back. It asks me for my gerrit.twrp.me username and password. After entering both it fails to authenticate? I looked at the site and it appears I am listed as an anonymous user but must be listed as a registered user? Gerrit.twrp.me has me logged in via my github account. How to resolve this so I can submit the patch? Not too familiar with using gerrit.
[Android Software Development] Hikari no Tenshi:
e2fsck repairs file system, but Data restore fails and file system getting corrupted again.

Must be something wrong with my build of TWRP, but I can't figure out what exactly.
[Android Software Development] Android-Andi:
Login, now on top right go into your account settings.

Enter your contact information.

(See screenshots)

:)
[Android Software Development] _that:
"Trying to push those changes back" - what did you do? Paste your terminal contents - exact commands you typed and exact error messages you're getting.
[Android Software Development] :
git clone http://gerrit.twrp.me/android_device_htc_k2_cl

Current branch is CM-11 so I created a new branch:

git checkout -b android-5.1

Then I made the new branch default:

git symbolic-ref HEAD refs/heads/android-5.1

Then I applied my changes to the branch and added those changes then commited the changes.

After all of this I simply entered:

git push

I entered my gerrit.twrp.me password and username and the following is what was returned back to me:

I have also tried using SHM as my username and the results were the same.

---------- Post added at 09:31 PM ---------- Previous post was at 09:27 PM ----------

That is already taken care of, but I do appreciate the feedback. :good:

---------- Post added at 09:53 PM ---------- Previous post was at 09:31 PM ----------

http://gerrit.twrp.me/gitweb?p=android_device_htc_k2_cl.git;a=shortlog;h=refs/heads/cm-11.0

Any reason why this says, not found?
[Android Software Development] Android-Andi:
[MENTION=6367467]SHM[/MENTION] you can only commit to an existing branch if i am not wrong
[Android Software Development] Android-Andi:
[MENTION=6367467]SHM[/MENTION] please login,

Open http://gerrit.twrp.me/#/c/999/

Click on download, make sure ssh set (see screenshot)

git fetch ssh://andi34@gerrit.twrp.me:29418/android_device_motorola_thea refs/changes/99/999/1 && git cherry-pick FETCH_HEAD

That's how it looks for me.

To push a change for that device the command would be:

git push ssh://andi34@gerrit.twrp.me:29418/android_device_motorola_thea HEAD:refs/for/android-5.1
[Android Software Development] :
I seriously hope that is wrong lol. [MENTION=4878287]_that[/MENTION], could you verify if this is true? It would be retarded for me to push changes to a device tree branch that is called, cm-11.0, when the changes in the device tree are more so targeting android-5.1 lol.

---------- Post added at 10:03 PM ---------- Previous post was at 09:59 PM ----------

Yea, unfortunately the results are the same for me. Gerrit is beginning to test my patience haha. I have no issues using git for github whether pushing, cloning, creating branches, etc etc via the terminal, but gerrit wants to make this mess complicated for me lol.
[Android Software Development] Android-Andi:
[MENTION=6367467]SHM[/MENTION] gerrit isn't easy to use at the beginning, but once you know how it works there's no problem :)

Check your ssh cherry-pick command on a different device and it will tell you the half of the push line ;) see my example. Also make sure only pushing to an existing branch - maybe tell [MENTION=702506]dees[/MENTION]troy to add a new branch ;)
[Android Software Development] :
Will give it another go when I return from the store based on your simple instruction. Thanks for the help.

Also, I think it would be a bit annoying to have to contact another Dev just to add a branch when I should be able to do so in the terminal and then push the changes to be reviewed. After all, it's a device tree and not the TWRP source we are talking about. I believe this issue should be taken into consideration since maintainers prefer to keep branches aligned with the current TWRP branches. Hence why I wish to create a new branch and default it away from cm-11.0. I do not use CM.
[Android Software Development] :
Eh, screw it. I cannot get gerrit to cooperate so I am abandoning it. Will just continue building TWRP myself and providing it as I have been. Gerrit has pushed my patience to the limit lol.

---------- Post added at 02:25 AM ---------- Previous post was at 02:12 AM ----------

Ok, I figured out the issue. Because I have made a new branch and only the changes apply to that new branch and not the original branch then gerrit rejects it. Changes must be made to the current known branch in order for it to be accepted for review.

---------- Post added at 02:42 AM ---------- Previous post was at 02:25 AM ----------

The branch doesn't yet exist on Gerrit. *To prevent typos, Gerrit

requires that the branch exist when you upload a change to it for

review.

Just so other readers know the user must have Push Branch +2 permission, they can first create the

branch by pushing a commit to it, then pushing the review commit. *For

example:

* $ git push origin origin/master:refs/heads/hari_spec-live

* $ git push origin HEAD:refs/for/hari_spec-live

Otherwise, you must contact someone who does have those permissions to do it for you and then push your changes to the newly created branch.
[Android Software Development] _that:
It's not your repository, so why do you think you should be able to create branches?

For some reason, all of the other Omni contributors have no problem asking lead developers for branches. But it's hard to work with someone who thinks that playing by the rules is "retarded" and "ignorant", so this is my last comment on this topic.
[Android Software Development] someone755:
I'd ask of you one more comment on that topic;

Earlier, when asked where to submit my device trees, I was given the link to the TWRP gerrit. But as I understand, unless you're an admin, you cannot create new projects. So how do I go about actually getting my device trees to somebody (into review or whatever it's called)?

This is all just for (near) future reference as I still have one more bug to iron out, but it's always nice to be prepared.
[Android Software Development] _that:
Have the device tree(s) ready on your github and contact Dees_Troy via IRC (#twrp on freenode). If he's sleeping, working or otherwise busy (he's in UTC-5), you may get an answer only a few hours later, so best is to idle for a while. You may also try sending a PM or e-mail. New device maintainers are welcome, especially if they continue testing, maintaining and supporting TWRP for their device after the initial port and are frequently present on #twrp.

Note that the OP is outdated - the preferred Android tree for building TWRP is now Omni 5.1, but Omni 4.4 and some CM versions are still supported.
[Android Software Development] yuweng:
And i thought who the hack is this Andreas Blaesius that give a Code-Review -1... :laugh: You need this as well, Master Shifu _that never make mistake... :D i follow gerrit review here, that way i see all submission... :o

Looks like we're gonna have the new stock theme soon since Master Shifu _that has also completed the last todo watch theme ... :cool:
[Android Software Development] _that:
The themes are done by z31s1g - I just moved the files around. He said he didn't even start with the XML for the new watch theme yet, but spent already 50+ hours on mock-ups :eek:. Don't hold your breath yet for the new themes, they are being prepared for a TWRP 3.0 release later this year which should have more exciting features besides the new theme.
[Android Software Development] Android-Andi:
[MENTION=4478781]yuweng[/MENTION] have seen it in dependencies this morning, you know: android development steels a lot of sleep... Maybe sometimes something get missed [emoji14]
[Android Software Development] yuweng:
WoW, thats great news, Thanks for the update... :good: its been awhile never hang out at #twrp... :o

Completely agree... :laugh: i remember myself one time suddenly waken up at 5am morning, got an idea then straight away start up the PC & start building & that whole day at work was terrible... :o
[Android Software Development] :
It is my repo, so forgive me if I think I should be able to change the branch name of my own device tree that I have been maintaining for a very long time now, and last night I discovered that there was a conflict with the emails being different so even by pushing to the known branch it still failed. I contacted Dees_Troy and informed him of the email conflict I was having and requested that he replace the repo with my new repo so that this wouldn't be an issue in the future. He said he was fine with that. :)

https://github.com/ModdingMyMind/android_device_htc_k2_cl
[Android Software Development] shadowcliffs:
Can anyone help me to compile a twrp for my device, SM-G925X, a S6 Edge Live Demo Unit running 5.0.1? I have tried all twrp for other G925 models (I, F, T, P) but none works on this device.
[Android Software Development] :
I would suggest grabbing the device tree closest to your device and modify it accordingly to best suit your device. Make a fresh TWRP build. Then run, fastboot boot twrprecovery.img, to see how it works out and go from there. Do you have any experience with building TWRP? If not, then this may get you up and going for your environment. I believe there may even be some YouTube videos on the process but not sure. Just assuming since you can practically find anything on YouTube nowadays.

---------- Post added at 05:36 PM ---------- Previous post was at 05:33 PM ----------

This also may or may not be useful to you as well. Some need it some don't. It's merely personal preference. Comes in real handy for me though.
[Android Software Development] shadowcliffs:
Thanks so much for the reply! Unfortunately I don't have any experience compiling twrp. I just read that twrp helped people to unlock their Samsung S6 Demo Unit, but I haven't found a working twrp for S6 Edge demo unit. I also have the stock firmware for it.
[Android Software Development] :
I see, well, looks like it's time that you take a stab at it and learn something new :D. It isn't as hard or as intimidating as it may seem believe it or not.

---------- Post added at 06:55 PM ---------- Previous post was at 06:54 PM ----------

I wouldn't mind walking you through it but I do not own that device.