[Resolved] [Q] How to set max brightness on z1 - General Questions and Answers

Hello, I'm working on my own XPeria Z1 (c6943) porting and all is working except for the display brightness.
The brightness is supposed to range from 0..4095 as far as I know, but its max_brightness is set to 255. The result is the backlight is darker than it should be.
I tried tweaking thermanager.xml and init.rhine.rc (rhine board) with no avail. Seems like I'm unable to write to /sys/class/leds/wled:backlight/max_brightness. I can chown, chmod, but can't echo into it, nor by means of the init*.rc files. I can even echo to max_current, changing from 20 to 25.
Now I'm trying to fiddle with the kernel, but I'm still lost on how do I go there.
Any help on this?
My apologies if I am posting on the wrong forum, but I'm still out of privileges and new to xda (as a writer).

So I managed to resolve the problem. I had to tweak the kernel leds.h header file for this specific device.
$KERNEL/include/linux/leds.h
Code:
enum led_brightness {
LED_OFF = 0,
LED_HALF = 2047,
LED_FULL = 4095,
};
Thereafter, compiling, copying the newly-generated zImage as kernel into the proper dirs and we are good again.
Hope this helps anyone lost on the same issue.
laramaki said:
Hello, I'm working on my own XPeria Z1 (c6943) porting and all is working except for the display brightness.
The brightness is supposed to range from 0..4095 as far as I know, but its max_brightness is set to 255. The result is the backlight is darker than it should be.
I tried tweaking thermanager.xml and init.rhine.rc (rhine board) with no avail. Seems like I'm unable to write to /sys/class/leds/wled:backlight/max_brightness. I can chown, chmod, but can't echo into it, nor by means of the init*.rc files. I can even echo to max_current, changing from 20 to 25.
Now I'm trying to fiddle with the kernel, but I'm still lost on how do I go there.
Any help on this?
My apologies if I am posting on the wrong forum, but I'm still out of privileges and new to xda (as a writer).
Click to expand...
Click to collapse

Related

Htc Touch Pro (Raphael 500) Running Android , How to overclock?

Alright so Yesterday I installed the android os on my touch pro (raph 500)
i orginally have windows mobile 6.5 which is preety fast
but android is really slow!
i turned off all the settings which i would think it used alot of memory but still no help, so i started seeing videos on overclcking?
can someone explain to me on how to do this,
with links to the download
i really need to speed this up ,it would be amazing if it worked.
also if you give me a response that helps me , ill donate 10.00+ to you .
I do not require funds as I enjoy helping out!
From THIS thread and THIS post:
Overclocking
acpuclock.oc_freq_khz=XXXXXX ( suggested 600000-640000 )
but it is very unstable if you try to get higher than 650000-700000
Click to expand...
Click to collapse
Basically, you add that to the startup.txt file somewhere between the parentheses with an added space between the next command. Keeping in mind, with added OC, you may and may not notice a difference in stability. I honestly never use OC and I am using FroYo from THIS thread. Additionally you can try out Gingerbread Alpha from THIS thread. Please leave feedback in their respective threads, thanks!
n-Joie! (Enjoy)
thanks but this is my startup text :
set ramsize 0x10000000
set ramaddr 0x10000000
set mtype 2182
set KERNEL zImage
set initrd initrd.gz
set cmdline "lcd.density=210 msmvkeyb_toggle=off physkeyboard=raph board-htcraphael-navi.wake=0 gsensor_axis=2,-1,3 acpuclock.force_turbo=1"
boot
Click to expand...
Click to collapse
so which am i supposed to edit, sorry im a noob lol
& u said that was the one you used,
is it fast?
Actually, I can't use that one because I have an at&t Fuze. If you have a RAPH500, you might want to use the following:
set ramsize 0x10000000
set ramaddr 0x10000000
set mtype 2182
set KERNEL zImage
set initrd initrd.gz
set cmdline "lcd.density=210 msmvkeyb_toggle=off physkeyboard=raph board-htcraphael-navi.wake=0 gsensor_axis=2,-1,3 pm.sleep_mode=1 acpuclock.oc_freq_khz=XXXXXX"
boot
Click to expand...
Click to collapse
Where XXXXXX is equal to a value between 600000-640000
Additional note: make sure you type something like 600000 or any value up to 640000
lol thanks im trying to see if theres a difference in speed.
but you used froyo?
is that running fast?
It's running fine with sync and a few other apps running in the background. I would be mindful of livewallpaper and HQ video at the moment as this project is currently still under development, at best. At least that is what I have noticed as far as performance is considered. I have also run a stripped Gingerbread alpha build (the one I linked you to earlier) and it is running faster/smoother than FroYo. To be expected without all the bells and whistles...
NOTE: Speed is relative to performance at the moment. Hence why I say it's still under development...
intresting ill test that out in about 15 mins
but does yours take a long time to come out of sleep mode?
Hmmm, that might be the notorious sleep of death SOD. I usually do something that most don't like but I sort of turn off the screen time out by first making the screen time out greater than 10 or 30 minutes. After that it should make things easier as far as disabling the auto back light/screen timeout feature. Keep in mind this is only a work around, I believe there is mention of actually fixing this issue. You'll need to download a free app called batterybooster (use the link if you want to read up on it a little). Once installed, run it and look for the far right icon and tap it. Set the timeout to Never and you'll notice a decent performance enhancement in the screen off and screen on.
NOTE: You will need to manually turn it off from here-on. You can try to play around with the setting but I find it somewhat problematic. Meaning that if you enable the timeout, it might and it might not work.
alright well i tried the gingerbread and that didnt work it lagged .
i tried froyo , it was amazing then i found out wifi didnt work
so now im back to the regular android one i had before ill be trying to see if theres a difference now that i "overclocked" it .
but thanks for all the help.
ill post back if i need something!
Odd, wifi(wap not wep) works for me... Must be a random occurrence? Have you attempted to update any files and are you using OC? Probably best to stick to a stock-like startup till you get a good feel of most of the basic functions, which may or may not include wifi, gps, 3d and camera; these should be on the "to be worked on" list of things for the devs to complete.
R^7Z said:
Odd, wifi(wap not wep) works for me... Must be a random occurrence? Have you attempted to update any files and are you using OC? Probably best to stick to a stock-like startup till you get a good feel of most of the basic functions, which may or may not include wifi, gps, 3d and camera; these should be on the "to be worked on" list of things for the devs to complete.
Click to expand...
Click to collapse
it works for you?
wth!
and i havenet updated any files on the deive.
no im not using overclock on this onr,
but on another android version which is on my sd card i am
& is there a way i can lock my screen so it doesn't touch any buttons in my pocket &kepp it from going into SOD .
ndnmaster096 said:
it works for you?
wth!
and i havenet updated any files on the deive.
no im not using overclock on this onr,
but on another android version which is on my sd card i am
& is there a way i can lock my screen so it doesn't touch any buttons in my pocket &kepp it from going into SOD .
Click to expand...
Click to collapse
NVM I got the wifi to work now .
Glad to hear about the wifi success story I don't know if I could walk you through that as it seems that wifi can be temperamental ( or just mental )
The only way I could get out of the SOD issue was to try for that work around (setting it to never timeout with the app mentioned) and to set a pattern unlock
R^7Z said:
Glad to hear about the wifi success story I don't know if I could walk you through that as it seems that wifi can be temperamental ( or just mental )
The only way I could get out of the SOD issue was to try for that work around (setting it to never timeout with the app mentioned) and to set a pattern unlock
Click to expand...
Click to collapse
well i set it to never timeout and i have a lock pattern
but since it never times out it wont lock .
also now im starting to notice froyo is rebooting for some weird reason automatically .
Calm down, that is kind of "usual behavior" . There are quire a few things going on and the OS is attempting to "handle it". Sometimes it can't and just quits instead of freezing up ( which would be the lesser of two evils ). To get it to lock, you will have to turn it off manually (power button). Unfortunately, I think if the keyboad slides out, it self unlocks (kind of a self defeating purpose, more or less). If you turn the screen off and wait like 10 seconds then turn the screen on (power key), you should see the lock. I can't say for sure but it does work for me. I don't really have much time for troubleshooting today, as I am at work currently but do look over the threads I linked you to earlier if at all possible.
okay so i turned it off using the power button and it booted to windows mobile (odd)
then i tried running haret.exe & got this message:
"The file HARET cannot be opened. Either it is not signed with a trusted certificate, or one of its components cannot be found. IF the problem persists, try reinstalling or restoring the file."
im not sure what to do.
i tryed reformatting the card and installing fresh files, which didnt work so now im left questioned?
When you say you turned it off, did you hold the button or just press it once? If you pressed it once, then, that is definitly not "usual" behavior. I recall having that issue once upon a time but for the life of me, I don't recall what I did to recover from it. However, it sounds like you are attempting to run from a shortcut that references the program(haret) that is no longer there. To resolve this, I need you to confirm that you are running from the microSD and not a shortcut. Also, you aren't formatting under windows, right? If you are formatting from windows, that would be a "no-no"
Find something like the HP tool (can be googled) that everyone else talks of or even something like the free version of partition wizard should work.
i held the button and it gave me options
1) airplane mode
2)shutoff
3)vibrate
i did try to make a shortcut but i deleted it and now when i checked i was running it from the actual application.
lastly, i did format from windows but i downloaded hp format tool
and formated my device in quick format.
reinstalled the programs and it still gave me the same error message,
please help, i really miss android =(
Try deleting data.img and letting it recreate the file. To clarify about the screen off issue, when you press the power button once (not hold), what does it do? Also, which kernel package are you using and have you attempted to download a newer kernel package yet?
Also, try THIS kernel package; I got it from THIS site. It looks like that kernel package is specific to our devices.

[Q] Automatic Date & Time setting not saving

UPDATE: See Post 3 for results. (Tl;dr: disabling a badly!intentionalbad coded broadcastreceiver fixed my issue)
Anyone have an issue with the Automatic Date & Time setting not sticking as it should?
I like keeping my phone 8 minutes ahead. So I uncheck Auto Date & Time, then adjust the time.
Yet every time I reboot or shutdown and restart the phone, the setting won't stick. It will always revert back to Automatic Date and Time.
It's really annoying.
It happen on Stock KD1, and having just odin flashed stock KD2, still happens. Anyone else have this issue?
Checked the logcat while rebooting. Seems the system server makes the setting change right before this thing finishes booting (broadxasts the boot.completed intent). I can add the relevent log entries when i get home. Any ideas?
Code:
V/SettingsProvider( 2731): system <- value=1 name=auto_time
V/SettingsProvider( 2731): property: sys.settings_system_version=6
I/GsmServiceStateTracker( 2819): Auto time state changed
V/SettingsProvider( 2731): notifying: content://settings/system/auto_time
I/DateTimeSettingsBroadcastReceiver( 2878): ipAddress :null :Port : null
E/SettingsIntentReceiver( 2878): USB debugging enabled
E/Setting ( 2878): Intent Action android.intent.action.BOOT_COMPLETED
Mucked around. Being led all sorts of places.
Most importantly, seems like DateTimeSettingsBroadcastReceiver.smali in Setting.apk is set to go as follows:
Code:
onReceive(context, intent)
If (intent == "android.intent.action.BOOT_COMPLETED") {
Log.i("shlim","onReceive: Boot Complete. ")
#shows up on my adb logcat as "I/shlim ( 2878): onReceive: Boot Complete. "
Settings.System.putInt(context.getContentResolver(), Settings.System.auto_time, 1);
updateWifiProxyURL(); #why is this in DateTimeSettingsBroadcastReceiver anyway??
}
return(void);
}
The damn thing is written to ALWAYS change auto_time to on, anytime it receives a Boot Complete intent!!! WTFCRAPCODINGOMFGDIEINABLOODYFIREPLZKTHXZ
No seriously, wtf purpose is that, unless there is some hardware bug or something, and even then, it should be commented. DateTimeSettingsBroadcastReceiver.java is not apart of the kd1 sources samsung has shared.
The Fix? Two options (third being live with it, but well, frak that).
1) Make a change to the decompiled stock Settings.apk DateTimeSettingsBroadcastReceiver.smali to fix this over sight. I am not a android developer or rom hacker. I know enough to find this mess right now, and how/when to change a simple string (did that on my Pandigital Novel to change how the notification bar clock is displayed) or integer value. I don't recall if we can downright change an entire method to pretty much remove an entire if section. (Last I remember was changing a StringBuilder section, which in real code is just stringC = stringA + stringB statement) Note: if you use a web/http proxy, the method would need to be changed so that the auto_time part is not done, while the updateWifiProxyUrl is. Scratch that. There is a WifiSettingsBroadcastReceiver.smali that has the SAME EXACT updateWifiProxyUrl method, that also runs on receiving the Boot_Completed intent... Crap coding.
2) Use some app like AutoStarts, which can change which broadcastreceiver is triggered or not I lucked out. The second "Settings" receiver under the "After Boot" section is the datetimesettingsbroadcastreceiver I needed to get rid of. Disabled it, no other intents were disabled as a result, reboot, and BINGFingBango no more reverting to auto_time = 1, no more Automatic Update of Time, and I am golden.
Time to pass out. Screw you samsung, you win this time.

[Q] aplogd is eating up the battery. how to fix?

Well, as for me, battery life of Photon Q with CM never was good enough. But after a day ago I've got my phone from 100% to 1% in 6 (yes, six) hours, I've understood, that I have to do something. BetterBatteryStats was excellent, it pointed me at the culprit in just a few taps. Beside turning phone into some heating appliance it also stored gigs of logs onto internal memory (/data/logger). Next question was: how to deal with it. Tries to simply kill it failed, as it respawned right away. After some searching I've come to build.prop tuning. I've changed
Code:
persist.log.aplogd.enable=1
to
Code:
persist.log.aplogd.enable=0
and added
Code:
persist.service.aplogd.enable=0
, rebooted to recovery, wiped cache and davlik cache, rebooted again and... aplogd is still here and its still can't be killed. So, I welcome any hints on how to fix it.
To disable aplogd, you don't have to do silly things like editing build.prop or such.
It's controlled by persistent property (physically stored in /data/property), so your setting of this property will stick as long as you don't wipe your data.
build.prop just specifies the default behaviour - what's set in /data/property (usually set by setprop command) always wins over the persistent property value indicated in build.prop.
In terminal emulator:
Code:
su
setprop persist.log.aplogd.enable 0
This will make the init process to stop the aplogd process and it won't be started again even after subsequent reboots (till the wipe of data, as mentioned above).
But, what exact output from BetterBatteryStats makes you think that aplogd is the actual cause of your battery issues?
It's behaving pretty harmless regarding the battery here by all accounts as far as I was able to check.
I've enabled aplogd on xt897 CM by default to help users to be able to deliver the logs to developers. As you probably understand: no log provided, no issue exists (from the dev point of view). Bugs can't be fixed when the developer is blindfolded, same as a disease can't be cured over mute phone line to a doctor....
Also, the size and number of files created by aplogd in /data/logger is strictly limited, so when you say
it also stored gigs of logs onto internal memory
Click to expand...
Click to collapse
what exact size of /data/logger folder content have you seen in your case?
(I ask about this because there may be a bug in the aplogd log file size/number limiting code, so I'd like to know if I should look into it or not...).
kabaldan said:
To disable aplogd, you don't have to do silly things like editing build.prop or such.
Click to expand...
Click to collapse
Learning is not about avoid to do silly things its about not to repeat them. I found the forums (http://4pda.ru/forum/index.php?showtopic=386024&view=findpost&p=16243763 for example) where people advised to add "persist.service.aplogd.enable=0" to build.prop and swear it's working.
kabaldan said:
It's controlled by persistent property (physically stored in /data/property), so your setting of this property will stick as long as you don't wipe your data.
build.prop just specifies the default behaviour - what's set in /data/property (usually set by setprop command) always wins over the persistent property value indicated in build.prop.
In terminal emulator:
Code:
su
setprop persist.log.aplogd.enable 0
This will make the init process to stop the aplogd process and it won't be started again even after subsequent reboots (till the wipe of data, as mentioned above).
Click to expand...
Click to collapse
Thanx!
kabaldan said:
But, what exact output from BetterBatteryStats makes you think that aplogd is the actual cause of your battery issues?
It's behaving pretty harmless regarding the battery here by all accounts as far as I was able to check.
Click to expand...
Click to collapse
Process section showed aplogd as eating times more CPU time than any other. Also CPU States section showed that processor was almost all the time runing at 1,5Ghz.
kabaldan said:
I've enabled aplogd on xt897 CM by default to help users to be able to deliver the logs to developers. As you probably understand: no log provided, no issue exists (from the dev point of view). Bugs can't be fixed when the developer is blindfolded, same as a disease can't be cured over mute phone line to a doctor....
Click to expand...
Click to collapse
Of course. I suspect it was kind of "exclusive" to me. I don't argue about enabling it by default, just asked about issue.
kabaldan said:
Also, the size and number of files created by aplogd in /data/logger is strictly limited, so when you say
what exact size of /data/logger folder content have you seen in your case?
(I ask about this because there may be a bug in the aplogd log file size/number limiting code, so I'd like to know if I should look into it or not...).
Click to expand...
Click to collapse
I've cleared all files in /data/logger about same time as posted this topic . Now there is 5086 files. Size according to 'du -sk' is 99820 - almost 100M. So maybe I exaggerated a bit about "gigs", but there was definitely hundreds of "megs" of backup* files.

mediapad t5 dpi settings

Hi,
i´m a little confused. I tried to change the dpi settings on my new mediapad t5 under system -> developer options -> smallest width to 800 (and i tried 700,that was changed to 702) but when i reboot it is resetted to 566.
I also tried to chage it with the tool "minimal_adb_fastboot_1.4.3_portable" and used the command adb shell wm density 800 && adb reboot the device does a reboot but the value is not changed. i dont want to root the device right now. how can i change the dpi without rooting, what did i wrong?
That's "normal" I can't keep it when I reboot too.
for my end I'm ok rooting but I didn't found a way to make it stay after a reboot.
I'm really waiting for custom rom... Really good tablet but not-so-good EMUI8...
is it possible to have a start script that will set the dpi to 700 on every boot? does someone know how to implement a startscript without root?
Also trying to achieve this now. But get the same problem.
It's set to normall again after rebooting.
From the other side, USB debugging is also not holding it's settings. So don't know if it's related to each other somehow.
I also noticed that the left side icons in the settings menu dissapear when changing dpi setting above 640?
So far rebooting is the only way to get them back (resetting dpi) for me.
Annyone found a sollution already for this? Or can someone confirm rooting will help (keeping the stock ROM)?
I am also looking for solution but no clue !
The only solution is Polished Custom Rom and it's not available yet!
I am using this tab for Netflix and Prime only. So, right now I am happy with EMUI 8.
Sent from my ELE-AL00 using Tapatalk
Hey guys, this has already been asked in this forum somewhere.. I've changed my dpi to a usable setting although I'm not sure what it's actually set to!
Use Quickshortcutmaker, grab it from play store. You can create a home screen icon to open vision settings. Open the settings and set everything to small.
I've done this and it persists through a reboot. I can't tell you if it's 700 but it's way better than the insane huge stock settings

Themes / Apps / Mods Quick tip on adjusting screen saturation on rooted pixel

I always found stock pixel color saturation to be a bit washed out. I prefer the look of more saturated color palette. Even choosing "adaptive" color on display options is still not good enough for me.
If you're rooted and want to increase color saturation do the following:
Open any Android terminal with root capabilities, I personally use Termux.
Type "su" and hit enter to grant root privileges. I don't know if it's a necessary step, but I change the directory to the root of the phone by typing "CD /". Then I copy and paste the below code into the terminal. I personally set my "x.x" to 1.25. hit enter and it will automatically take effect. You can change the values at anytime afterwards to go higher or lower. Values will go back to stock after a reboot using this method, so if you don't like it, just reboot to go back to stock values.
"service call SurfaceFlinger 1022 f X.X" (x.x sets saturation up to 2.0)
I HAVE NOT TESTED THIS, but in the past I have used this code to permanently set the saturation level on boot:
Setprop persist.sys.sf.color_saturation X.X
using this, the saturation level will remain to the chosen value on boot. Again, I have not tested this on the pixel 7 Pro.
That's interesting as I also find the "adaptive" setting too washed out on Pixels.
I wonder if this could be used through a root app with more control over colors and such?
works - thank you!
Ghisy said:
That's interesting as I also find the "adaptive" setting too washed out on Pixels.
I wonder if this could be used through a root app with more control over colors and such?
Click to expand...
Click to collapse
I'm sure it could but that's beyond my capabilities lol l
Gotta wonder what effect this might have on...everything? Battery life...screen life...brightness level adjustments when on auto? YMMV
But what can we use after
"service call SurfaceFlinger 1022 f X.X" to disable if needed ?
Attinderkahlon said:
But what can we use after
"service call SurfaceFlinger 1022 f X.X" to disable if needed ?
Click to expand...
Click to collapse
I believe 1.0 is the stock value. So you can either enter the line again and replace whatever previous value you used with 1.0, or you could just reboot the device and it'll go back to the stock saturation settings.
jaseman said:
Gotta wonder what effect this might have on...everything? Battery life...screen life...brightness level adjustments when on auto? YMMV
Click to expand...
Click to collapse
It could have a negative effect on battery life....but I would guess its minimal. Been using a custom saturation value for 2 days now, no known issues.
I haven't checked yet but going by previous devices, there is probably a way to access other color modes using tasker. "boosted" has been taken away from the menu, my guess is its still there and can be accessed with tasker. I'll check it if i keep the phone.
Thank you for this, legit the only thing driving me crazy was the dull colors now it looks more like I wanted. You da man.
Glad I could help!
Dope. Going to give this a shot whenever I decide to root.
Now, has this always been a thing? If so, I wish I knew about it so I didn't have to use apps the entire time to tweak it to my liking.
Curiousn00b said:
Dope. Going to give this a shot whenever I decide to root.
Now, has this always been a thing? If so, I wish I knew about it so I didn't have to use apps the entire time to tweak it to my liking.
Click to expand...
Click to collapse
I've been using this mod since the OnePlus 6T....so it's been a thing for a while at least for me.
Has anyone tried this? Getting a Parcel Null error when I enter the code. Rooted. That "CD /" comes back as inaccessible too. It's probably me, but not able to get this to work as of now.
Unable to set up after boot, i get the setprop inaccessible
System is read-only for now. There's no rw mount mod so can't really edit build prop to set it on boot. We'll just have to wait for twrp or any system rw mount mod
xgerryx said:
Has anyone tried this? Getting a Parcel Null error when I enter the code. Rooted. That "CD /" comes back as inaccessible too. It's probably me, but not able to get this to work as of now.
Click to expand...
Click to collapse
I get parcell null response as well but it still works.
Also, I just tested changing directory in not necessary so you can skip the "CD /" part.
Trust me on this, run the script with a value of 0.5 and hit enter. Go to your home screen, open apps and scroll through your phone. Then open your emulator again, run the script with a value of 3.0 and hit enter. Then look about your phone it will look completely different. From there, just keep messing around with different values until you get one you like.
Pain-N-Panic said:
I get parcell null response as well but it still works.
Also, I just tested changing directory in not necessary so you can skip the "CD /" part.
Trust me on this, run the script with a value of 0.5 and hit enter. Go to your home screen, open apps and scroll through your phone. Then open your emulator again, run the script with a value of 3.0 and hit enter. Then look about your phone it will look completely different. From there, just keep messing around with different values until you get one you like.
Click to expand...
Click to collapse
Ok yes I'm seeing it now. Thanks for following up. It does change exactly what we're looking for. I bet you someone can make this into a little app or a magisk module.
xgerryx said:
Ok yes I'm seeing it now. Thanks for following up. It does change exactly what we're looking for. I bet you someone can make this into a little app or a magisk module.
Click to expand...
Click to collapse
Glad ya got it working! Yeah I'm sure it's possible, having to run the script everytime you boot is kind of annoying
I wish we could adjust the white balance. This screen is so yellow looking

Categories

Resources