Trying to modify files in sys/kernel/fast_charge (emo ker r26) - Galaxy Note 4 Q&A, Help & Troubleshooting

Hello!
I've just recently upgraded from a Note 2 to the Note 4 and after a couple of tries I've found a a good rom (DevBase 3.8) and I've flashed the Emotion Kernel r26 on it and it works fine.
On my Note to I changed the charge value to 2000ma which worked flawlessly and didn't caused overheating with the screen on or off (I've used Adams kernel with the included app) and I wanted to do the same with the emotion kernel which doesn't natively allow to change the values.
After looking around with root explorer I've found the fast charge files in the /sys/kernel/fast_charge/ folder and there is even an info file explaining a few things. I personally judt want to change the ac charge file values to 2000 2100 and the file "screen_on_current_limit" to 0 so it charges in full speed even if the screen is on.
But the problem is changing the values don't really safe them, they get changed back after a reboot and even a manually created flashable zip didn't permanently override the values.
I've tried it a couple of times with different file explorers and changed the permissions regularly without success.
Here's the zip with the modified values if you wanna check it out.
https://drive.google.com/file/d/0BzhcK4DLVxsNRVZ2STFWZXJJejg/view?usp=drivesdk
Any idea how to do this?
Edit:
I've found out that I can change and "safe" those values in most of the files and the info file actually picks it up and shows if it's applied but a reboot later those are the same.
But I can't protect the files getting rewritten even if I heavily restrict the permissions.

Related

New ROM :: 407 OFFICIAL GB ROM - OLLEH - Remove default APNs

since my carrier uses a lot of different apn addresses depending on which contract you have, I always must manually edit the preset ones to my needs. I noticed that in this ROM by default you cannot edit, delete or even just view said default APNs (you still can add them to your liking though, so no real harm done).
while fiddling through the build.prop file in this new gingerbread rom I happened to stumble upon these two lines:
ro.build.OEM_PRESET_APN_LOCK=1
ro.build.OEM_PRESET_APN_HIDE=1
I changed the values to 0 and now the APN entries are fully editable and removable. just a quick reminder of the correct procedure:
- have a rooted streak
- install a root-enabled file explorer (root explorer works fine)
- mount system as R/W
- goto /system and edit file build.prop
- search for the above lines and change 1 to 0 (duh!)
- save, exit, reboot, enjoy
note: I found multiple instances of those two lines throughout the file. check thoroughly and change them all!
Awesome. I'm finding it.
Gonna give a try....
Btw, how to show up sim toolkit on apps drawer.
Thanks
Sent from my PC36100 using xda premium

[Q] TiBu not writeable, editing Profile.xml breaks things

I am really pissed about this one.. tried to make a Titanium Backup of my stuff before I unrooted and wiped the phone to ODIN the ANE update (it refused to update after being towelrooted).. So that was my first introduction to the bug that prevents TiBu from writing to the extSD.. I found several threads pointing to adding a line to the profiles.xml file in system/etc/permissions. Well I added the line using ES3 note editor (copied the original file to .bak first), saved and rebooted, and as soon as I unlocked the phone, the toasts started popping up that nearly everything was crashing - repeatedly. I went and deleted the modified file and changed the .bak back to normal, but it did not fix it. No apps would open, and I had no data connection (neither Wifi or 3G). The only thing that fixed it was booting into recovery and wiping it.
And then it happened AGAIN when I tried it again (after the ANE update was flashed via ODIN, so I know it was clean). So WTF is happening, and why does restoring the original file not fix it??
At this point I can't even get TiBu to back up to the internal storage.
Taz420nj said:
I am really pissed about this one..
Click to expand...
Click to collapse
There is no obvious reason why it shouldn't work of you reverted the changes. But of course that is the ultimate value of a tested backup method.. that ability to roll the clock back and revert accidental or inexplicable changes.
If you are certain that you reverted the edits.. no typos or line feed errors e.g.you used a linux aware file editor.. not notepad on a PC or something similar - then it's likely a permissions error.
What permissions does the file currently have? And what app did you edit the .xml with?
.
fffft said:
There is no obvious reason why it shouldn't work of you reverted the changes. But of course that is the ultimate value of a tested backup method.. that ability to roll the clock back and revert accidental or inexplicable changes.
If you are certain that you reverted the edits.. no typos or line feed errors e.g.you used a linux aware file editor.. not notepad on a PC or something similar - then it's likely a permissions error.
What permissions does the file currently have? And what app did you edit the .xml with?
.
Click to expand...
Click to collapse
As I said, I made a copy of the file and edited it with ES3 Note Editor right on the phone. Then I renamed the original file to platform.xml.bak, and copy/pasted the new platform.xml file into system/etc/permissions. When everything went haywire, I didn't try editing the file back (I couldn't - the toasts were popping up almost faster than I could clear them and Note Editor kept crashing), I just deleted the modified file and renamed platform.xml.bak back to platform.xml. I never edited the original file at all, so that's how I am 100% positive there are no errors in it - and that's why I can't figure out why renaming it back doesn't fix the mayhem.
Now I am a total weenie when it comes to Linux - I know OF the -rw-r--r-- permissions and what they mean, but I don't know how to make the phone tell me.. But in ES3 Explorer under file properties it simply says Readable: Yes Writable: Yes Hidden: No.
What sucks is I've had to go through and set the phone back up twice now, and lost all my settings/data in the meantime over this.. And I STILL don't have a working backup method, so if it borks again I'll be doing it all over again.. I am unwilling to blow the Knox fuse, hence not having a custom ROM at this point.. But I'm fine using Towelroot just so I can unbloat and install some things.
No one wishes for things to go awry. But of course they do sometimes and it would be imprudent not to plan for that eventuality. You didn't, nor do you seem to realize just how risky the changes you have been making are to your basic system stability. You are modifying critical, system level files and properties. The expected result if there is a typo or permissions error is chaos and corruption. If I was unable to have a working backup method (from refusing to increment Knox), I wouldn't risk the changes you are making.
It's all well and nice to customize features when things turn out smoothly. But all along you have been working without a safety net, so it's not reasonable to complain about the onerous amount of work it is to reinstall the firmware when fate bites you. You can't have it two ways at once. Either you incremement Knox, allowing inclusive backups and a way to recover. Or you accept that that you are taking crazy risks and having to start over the price for doing so.
You'd be in a better position if you had some basic tools to delineate what is going on. But you haven't taken the time to learn how to read file permissions. You are working deep within a linux filesystem, so this is a very basic and useful skill.
You don't use the same file manager as me, with mine (fx), you would long press and view details. Or even easier, use the ls command e.g. ls -la. There are a dozen ways you could check permissions and a simple forum search would elaborate on many of them. It sounds like you have permissions errors, i.e the system can't access the restored .xml sheet thereby causing numerous apps to crash.
.
Uhhh, except in order to implement the safety net I have to make this simple change to this one critical system file. It's no different than not having a means to backup before rooting/flashing (since TiBu requires root and you can't do a nandroid from stock recovery) and something goes wrong.
Adding the <group gid="media_rw" /> line to the profile.xml is posted in MANY locations as a "this is all you have to do" solution to this rather stupid quirk in 4.4, with no mention whatsoever of checking/verifying permissions or any other cautions, and other people are not having this issue.
I installed FX, and it lists the permissions of all the files (including the copies of platform.xml and platform.xml.bak that I had saved on the SD card, and the virgin file currently in use) as 0644.
Taz420nj said:
Uhhh, except in order to implement the safety net I have to make this simple change to this one critical system file
Click to expand...
Click to collapse
It's your phone so you can do as you like. But risks don't go away because you ignore them. There is nothing wrong with accepting a risk that you may have to start over if things go sideways. But plunging ahead recklessly then complaining about the work to recover is patently unreasonable
I had no problem effecting the changes you are attempting. Nor have many others. Perhaps you made a typo or followed a thread with erroneous advice. You may well have a permissions error because you didn't explicitly set it or check to see if it was correct.
It's all about attention to detail e.g. checking permissions and being prepared to deal with fallout when things go astray.
.

Unbricked devices split screen (potential) fix - Fixed QDCM Calibration XML Files

*edit* deleted thread. Unfortunately this doesn't fix it. QFIL then flashing EUI ROM 14s and then upgrading to a newer EUI ROM or device firmware update then custom ROM is the only true fix.
Sadly, it doesn´t work for mine, maybe you can help me?
Greetings.
Iceee44 said:
Sadly, it doesn´t work for mine, maybe you can help me?
Greetings.
Click to expand...
Click to collapse
Heyyo, hmm darn that's unfortunate... Well, I have a test build of LineageOS 15.1 for the Le Max 2 with the calibration fixes in place and same with the upcoming official weekly build of LineageOS 14.1 for the X2 this Saturday. It's up to you which you would want to try. Hopefully one of them will work for you.
If not? I'm unsure what else could be causing the issue then hmm...
Hey thanks for reply!
I don't why, but something worked!
I got the splitscreen bug, then I flashed the recovery to the newest twrp (the blue one, don't know which version, but I will look it up). Then I wiped everything and install your fix. Result = bricked. Another try with one flash 2.0 and no error from flash. Fastboot recovery flash and everything was perfect.
I think it was luck, but my leeco le max 2 is repaired :victory:
Wow that's lucky! Congrats on fixing it!
May I please ask what happened to cause the brick? I've heard of device bricking but haven't seen an exact answer as to what unfortunately caused it.
It was totally my fault... I Format my data...and no image on storage... And one flash did the screen problem, maybe the program doesn't decompress a file finally... I decompressed the qfil data two times... The first time I got an error, after full decompressed everything...
Ah if you format data without any ROM on the device you can always use a PC and USB cable to do this...
adb push NameOfROM.zip /sdcard
Which will copy the zip file to the root of your data storage. Same can be repeated for Gapps or Magisk, etc.
I tried to push a 1,8GB file...
But after 2 hours it wasn't transferred, so I found the software and this is much easier.
Could you explain what exactly the "Unbricked devices split screen" bug is?
So from understanding the changes, does this mean that the 4 profiles in the Display -> Colour mode menu won't actually activate for people with the issue? (So if they do change then you don't have the bug?)
I'm guessing that editing those xml files could help with this problem? https://forum.xda-developers.com/le-max-2/how-to/le-max-2-black-crush-survey-t3744594
Or are there other places where those parameters are set?
ThE_MarD said:
Heyyo, this is a TWRP flashable zip file to replace the broken formatting on the qdcm calibration xml files for the display panels used in the LeEco Le Max 2
Click to expand...
Click to collapse
Which bug your fix is intended to fix? Do you mean this: https://youtu.be/3yXnrkfsJMI - I have never seen it on my device.
Or you mean color calibration, which is currently terrible by default (too much yellowish)
oneNight1 said:
Could you explain what exactly the "Unbricked devices split screen" bug is?
So from understanding the changes, does this mean that the 4 profiles in the Display -> Colour mode menu won't actually activate for people with the issue? (So if they do change then you don't have the bug?)
I'm guessing that editing those xml files could help with this problem? https://forum.xda-developers.com/le-max-2/how-to/le-max-2-black-crush-survey-t3744594
Or are there other places where those parameters are set?
Click to expand...
Click to collapse
For both of these questions the hopes is that the main issue with most people who unbrick their devices having screen issues is due to calibration settings being lost which this in theory should restore as it would have XML files with proper formatting unlike before where stock EUI ROM for the Le Max 2 had broken calibration XML files.
In theory if the black crush issue is also a calibration issue there's a chance this could also fix it... But still, I haven't really looked into that as I was mainly looking for a better solution for those unfortunate people suffering from unbrick device woes. If it fixes it? Cool... If not? Then I'm not too sure. Calibration files could potentially be modified to fix black crush if the issue is in there that LeEco never addressed.
giaur said:
Which bug your fix is intended to fix? Do you mean this:
- I have never seen it on my device.
Or you mean color calibration, which is currently terrible by default (too much yellowish)
Click to expand...
Click to collapse
How do i view the config files and transfer them to my computer to compare them to yours? I enabled usb debugging, thinking that would let me see everything but when i connect to my computer with MTP mode i can only see standard files, not all the linux config files etc.
(edit: I tried using adb shell and i could view the root directory but it wouldn't let me access the config folder - permission denied. Do i need root access? If so, how do i get it temporarily and then remove it once i have transferred the files? I can't just run adb as root because you need root on the phone apparently).
Also i did a search of the available EUI x829 source (http://opensource.le.com/ or http://opensource.le.com/ or https://forum.xda-developers.com/le-max-2/how-to/source-code-available-t3482334 )and i couldn't find those xml files. Are they generated by the OS or something?
To me it seems like the files are probably already formatted correctly on my particular phone as changing the colour mode does appear to function. However they obviously seem to be not calibrated properly (or intentionally calibrated very badly).
I wonder if it only reads these files on boot? Otherwise i guess an application could be made to interactively adjust them.
I wonder if KCAL uses these files.
However from looking at how large the data is and also the mention of LUTs (lookup tables), it would seem that this is actually more advanced than kcal? And could potentially give proper screen calibration if using a colourimeter etc?
Of course, more than one profile would be necessary for different brightness levels though.
But anything is better than nothing.
It is definitely to do with the eui colour mode settings because if you go to google translate and translate the names in for each profile, they match up with colour mode options.
These are part of EUI ROM as I did mention the XML formatting is broken on all the EUI ROM versions I looked at.
You can use an Android ROM extractor like this to open up EUI ROM and see the files yourself if you'd like.
https://forum.xda-developers.com/android/help/extract-dat-marshmallow-lollipop-easily-t3334117
I found this https://usermanual.wiki/Pdf/KBA160907024936QDCMPCToolDebugGuide.968066270 which implies that the xml file is used directly.
Have you considered that <Calib_Data /> just means that the Calib_Data section is empty deliberately and that the colour profile and LUT sections were never intended to be within the calibration data tag?
We do not have the specification of the QDCM xml file that the tool generates.
It would be beneficial if the QDCM tool could be somehow leaked or obtained, then the end user could calibrate their phones. Or at least a specification of the file format of the QDCM xml files so correct data could be generated.
I suggest this should be brought up to the wider android community as it applies to all recent qualcomm phones.
Then we can compare with the QDCM xml files distributed with their handsets. Maybe some handsets even contain the same panels and therefore maybe we could attempt to use their profile / calibration settings. Of course it won't give perfect results because screens should be calibrated on an individual basis but it might be a lot better than the awfullness i currently have.
I wonder, do Le Eco calibrate each handset individually because if they do and then CFW overwrites the calibration with a "random" one then i can understand how that would cause issues. However my display has been bad before i loaded CFW... (unless the seller tampered with the FW but i don't know how you are meant to tell that).
I am not saying you are wrong but you have not given sources for your findings and to me, the individual colour profiles are working it's just that the overall calibration (or all of the profiles themselves) is extremely awful with huge black crush.
That tools seems to be for looking at backup images? But i want to view what is on my phone currently. Do you have to root your phone to do so? If so how can i root and then unroot it after i'm done?
Thanks
oneNight1 said:
I found this https://usermanual.wiki/Pdf/KBA160907024936QDCMPCToolDebugGuide.968066270 which implies that the xml file is used directly.
Have you considered that <Calib_Data /> just means that the Calib_Data section is empty deliberately and that the colour profile and LUT sections were never intended to be within the calibration data tag?
We do not have the specification of the QDCM xml file that the tool generates.
The way the XML formatting is? Calib_Data is supposed to house the entire XML file to let QDCM know where the calibration data starts and ends... So on the broken EUI ROM XML files it only has an end and never loads the calibration data.
It would be beneficial if the QDCM tool could be somehow leaked or obtained, then the end user could calibrate their phones. Or at least a specification of the file format of the QDCM xml files so correct data could be generated.
I suggest this should be brought up to the wider android community as it applies to all recent qualcomm phones.
Then we can compare with the QDCM xml files distributed with their handsets. Maybe some handsets even contain the same panels and therefore maybe we could attempt to use their profile / calibration settings. Of course it won't give perfect results because screens should be calibrated on an individual basis but it might be a lot better than the awfullness i currently have.
I wonder, do Le Eco calibrate each handset individually because if they do and then CFW overwrites the calibration with a "random" one then i can understand how that would cause issues. However my display has been bad before i loaded CFW... (unless the seller tampered with the FW but i don't know how you are meant to tell that).
I am not saying you are wrong but you have not given sources for your findings and to me, the individual colour profiles are working it's just that the overall calibration (or all of the profiles themselves) is extremely awful with huge black crush.
That tools seems to be for looking at backup images? But i want to view what is on my phone currently. Do you have to root your phone to do so? If so how can i root and then unroot it after i'm done?
Thanks
Click to expand...
Click to collapse
Heyyo, it's definitely a formatting error. XML standard has open and close brackets.
For example, the OnePlus 5T
https://github.com/TheMuppets/propr...b_data_samsung_s6e3fc1_cmd_mode_dsi_panel.xml
Or the Xiaomi Mi5 (Gemini)
https://github.com/TheMuppets/propr...calib_data_sharp_fhd_cmd_incell_dsi_panel.xml
As for viewing the files on your phone? Yes you would need root and a root file explorer.
Magisk, SuperSU, KingRoot or such all work for root but some versions of EUI ROM have issues.
For root enabled file browser? Amaze works... Amazing. Just get it from the Play store and then in settings enable root explorer.
For uninstalling root please Google the uninstall method to whichever root method you use as they are all different.
That's not true, XML tags can close themselves. If you don't believe me look here: https://www.w3schools.com/xml/xml_elements.asp (scroll down to empty xml elements)
How they had formatted their tags was valid xml.
Code:
<Calib_Data />
is just an element with nothing in it, the same thing as:
Code:
<Calib_Data> </Calib_Data>
However what you showed me from the other xml files for other phones make it look like it should be the way you have changed it
Okay i will have a look and let you know. I have small eui installed atm. So if you just flash an su to your system and then once you uninstall the app root is completely gone? I never would have thought it would be that simple.
It seems when you have root you can use an adb shell as root so i might try that rather than bothering to install anything on the phone.
Is there a way also to view what it was in the backup of my original fw without restoring it? (i used this guide for backup https://forum.xda-developers.com/le-max-2/how-to/protocol-backup-stock-rom-flash-stock-t3517151 ).
How can i find out which of the 3 display types my device is using? (Preferrably via adb).
I will be really surprised if it's wrong in mine because the colour modes work which will be very weird if that xml file isn't being used - they must do it another way too if that's the case :S
It's also weird how those xml files have been hand tampered with!
Thanks!
oneNight1 said:
That's not true, XML tags can close themselves. If you don't believe me look here: https://www.w3schools.com/xml/xml_elements.asp (scroll down to empty xml elements)
How they had formatted their tags was valid xml.
Code:
<Calib_Data />
is just an element with nothing in it, the same thing as:
Code:
<Calib_Data> </Calib_Data>
However what you showed me from the other xml files for other phones make it look like it should be the way you have changed it
Okay i will have a look and let you know. I have small eui installed atm. So if you just flash an su to your system and then once you uninstall the app root is completely gone? I never would have thought it would be that simple.
It seems when you have root you can use an adb shell as root so i might try that rather than bothering to install anything on the phone.
Is there a way also to view what it was in the backup of my original fw without restoring it? (i used this guide for backup https://forum.xda-developers.com/le-max-2/how-to/protocol-backup-stock-rom-flash-stock-t3517151 ).
How can i find out which of the 3 display types my device is using? (Preferrably via adb).
I will be really surprised if it's wrong in mine because the colour modes work which will be very weird if that xml file isn't being used - they must do it another way too if that's the case :S
It's also weird how those xml files have been hand tampered with!
Thanks!
Click to expand...
Click to collapse
Write this in the terminal.
Code:
cat /sys/devices/virtual/graphics/fb0/msm_fb_panel_info | grep panel_name
Thanks Sergio, so my device is running:
Code:
le_x2_mdss_dsi_truly_qhd_dualdsi_cmd_pvt
Hmm it seems that SmallEUI ( https://forum.xda-developers.com/le-max-2/development/rom-small-eui-5-9-aurel-battery-t3524531 ) wiped the configs folder. It looks the same through both ADB --> shell ---> su ---> cd config as it does through the Amaze app on the phone itself - empty.
I am pretty sure that I have root properly, supersu seems to be installed.
For some reason though, if i try and get ADB to get root, it says:
Code:
adbd cannot run as root in production builds
I don't have a folder named configs, only one called "config" and it is completely empty.
Is there any way to view the files that were in my TWRP backup of my stock X829 FW without reflashing it?
I have lots of data.ext4.win000 files etc. Which archive would it be in? System? Data? EFS? Boot? And how do i browse the archives?
Thanks
oneNight1 said:
Thanks Sergio, so my device is running:
Code:
le_x2_mdss_dsi_truly_qhd_dualdsi_cmd_pvt
Hmm it seems that SmallEUI ( https://forum.xda-developers.com/le-max-2/development/rom-small-eui-5-9-aurel-battery-t3524531 ) wiped the configs folder. It looks the same through both ADB --> shell ---> su ---> cd config as it does through the Amaze app on the phone itself - empty.
I am pretty sure that I have root properly, supersu seems to be installed.
For some reason though, if i try and get ADB to get root, it says:
Code:
adbd cannot run as root in production builds
I don't have a folder named configs, only one called "config" and it is completely empty.
Is there any way to view the files that were in my TWRP backup of my stock X829 FW without reflashing it?
I have lots of data.ext4.win000 files etc. Which archive would it be in? System? Data? EFS? Boot? And how do i browse the archives?
Thanks
Click to expand...
Click to collapse
You should notice this does not work, garbage screen is there even with this fix applied. I have it all the time on latest Lineage 15.1.
Okay I checked in
Code:
system/etc
and I do have the files. They are formatted as
Code:
<Calib_Data />
too.
Why does your github page say that they should be in
Code:
config/qcdm
???
Anyway, I flashed your zip to see if it would make a difference but it didn't help with the black crush sadly.
Although maybe modifying the calibration data would - but of course we would need to understand the format.
I checked my TWRP backup image (you can just browse them with 7zip) and they have the same empty tag too.

Battery charge limiter??

Hi, has anyone succeded to run battery charge limiter (link) or something similar? i'd like to keep my z300c as a smart calendar+spacedesk next to my laptop, but cannot find the proper charger control file.
what i foud out is that there is a file in sys/class/power_supply/ac/device that is called charge_status, and as expected the content of the file is 0 while not plugged and 1 while plugged. i tried to set that as ctrl file but nothing changed, then i noticed that it has only read permissions, tried to set rwxrwxrwx so that the app could edit the file but changing the permissions bugged my system ui and forced me to reboot. after booting the permissions of the file are reset into r--r--r--. Is this the problem?

(SOLVED) Over protective Tablet S6 lite LTE 2022 version

I have a S6 lite 2022 LTE version SM-P619. It's rooted and works great but I tried to change to boot screen qmg and shut down qmg's with ones that have a bit more animation. They work once but next reboot or shut down the original boring qmg's are back and the ones I inserted into the media folder have gone poof. Start up ones are that important but my shutdown one is of a tv shutting down that look really nice on the tablet. once...
edit: after doing a few things on this tablen I begin to wonder, is there some sort of security on the root partion? When I delete a file from the system/app it comes back after rebooting. When I rename that file, it comes back to original after rebooting.
Most puzzled... never seen this happen before.
*Bump* because I would really like to know how to really delete an app without it returning after a reboot. Rooted and using Root Explorer. I go to Root/system/app and delete a file such as DailyBoard. When I reboot the tablet it is back in the app folder like it was never deleted. As well, the issue of overwriting the shutdown.qmg is same, reboot and original is back. Am I only one with this or is anyone else seeing this?
Okay, I finally found out why this happens. Samsung has made all dynamic partitions (odm, product, system, vendor) READ ONLY! So even if you are rooted, you won't be able to debloat or change files on anything in the tablet (S6 Lite LTE 2022 P619)
So after searching around for an answer, I stumble upon a solution that worked for me. But you have to be able re-build the AP-P619XXXXX.tar file. Reason is that you will have a new super.img that is Read Write and allows you to delete files and push files to your tablet without the changes being undone. And rebuilding the ap-tar file is because the tablet doesn't have a working fastboot in it.
Go to: https://forum.xda-developers.com/t/...system-partitions-to-read-write-mode.4521131/ and follow all instructions carefully. You DO need to be rooted and do need Magisk install to be able to use this method. Good Luck

Categories

Resources