LG G4 add custom screen timeout values (20, 22.5, 25 sec) - G4 Q&A, Help & Troubleshooting

I use H815 with rooted 5.1 rom (BL is not open).
I would like to use about 20 seconds screen timeout value, but in the rom there are only 15 or 30 seconds options, no value between them.
I know the screen timeout values are definied in the LGSettings.apk (res/values/arrays.xml).
With AndroidMultitool I can decompile (with lots of error messages) LGSettings.apk and with Notepad++ I can succesfully edit the values/arrays.xml file.
Unfortunately I can’t complie the LGSettings.apk with AndroidMultitool or apktool.
My question is: is it possible to make an update.zip only with the modified arrays.xml inside, and flash it to system/priv-app/LGSettings/res/values?

Related

Customizing the 18 Buttons Action Screen by Wedge

This thread is about how to create your own action screen icons based on the Wedge Action Screen.
What you need to customize your action screen
- a set of icons you wanna use ;
- Paint.net for preparing your custom icons (you can use any tool but then you'll need to convert the templates first, PDN has the advantage of layers) ;
- BRN Convert to convert BRN to BMP and vice versa ;
- a PDN file with all the icons at a glance (Background_empty.pdn, see ZIP file);
- a PDN file with one icon (button_small_empty.pdn, see ZIP file);
- a file to edit your registry entries (action.reg, see ZIP file).
The basic steps fast explained
1. Prepare your preferred items so that they have a max.size of 102x102 pixels;
2. For each icon: open the button template and place the icon over it, save it under the appropriate name (e.g. 00P) and file format (BMP, keep a native format copy as well, you'll never know why);
2a. A little side note: the numbering starts top left with 00 and ends bottom right with 17, e.g. the second icon in the 2nd top row is icon number 4;
3. Do the same for the background screen: place each item into its place, attention do not use the buttons created under step 2, otherwise you'll loose the "animation" effect when pushing a button, save the file under the name "background.bmp" (+native format);
4. Convert your BMP files into BRN format;
5. Copy your BRN files over the files in the folder \Windows\ActionScreen\ - before you can copy background.brn, you should rename it, otherwise you get an error message à la "not enough memory" or similar;
6. Customize the registry entries - you can edit the attached action.reg file with a text editor, later I usually convert it with SK Tools into a cab file and install it. Naturally, you can do this manually using a registry editor, if you want.
Finished!
This process will take 1-2 hours depending on your motivation, skills and expectations.
reserved for future use

[MOD] Change Glass-Lockscreen to Android with a script

Hello!
So, some guys tested my bat-script and they reported that it works! So i create a new thread..
All you need is a java installation (i think jdk, becuase you need the jar binary) and adb! You have to edit the bat file and
set the 2 variables to the directory.
The other variables (sed, smali, baksmali, dexopt-wrapper) are in the package, so you shouldnt change it.
If anything necessary is not found, the script will not start!!
Attention: If you run the bat file, be sure your mobile is NOT IN STANDBY!! You have to be in normal mode (not recovery or sth) and the screen turned on!
So not in lockscreen/standby mode, because otherwhise SuperUser does not popup and ask for root-rights.
When you dont allow root-rights you will see a permission error during the script and this is bad (it will ask you 2-3 times for root rights).
I made this script, so everyone can look at the commands (not hiding inside an exe file which could do anything).
Here is the link: http://rapidshare.com/files/420586328/install_lockscreen.zip
Windows verion needs to be on rapidshare/filehoster, because i have put the sed binary + dll into it (you need it for windows and autopatching the .smali file)
Just download the bat script and edit it with an editor (notepad++ or jedit or just notepad) and set the ADB variable to adb.exe and JAVA_DIR to the JDK-directory (not including \bin - just the main-directory).
Tested successfully on my JM5 and some other user with JM8 and someone with JH2!
4 things todo (not for running the script, just for the future ):
1. create script for linux/mac os usage (shouldnt be so hard, but i have not so much time currently..)
2. auto-create an update.zip with the original android.policy.odex/.jar file for errors (because you cannot change this file if the phone cannot boot - su segmentation fault)
3. if /system/xbin/dd is not here or if it is missing the "conv=notrunc" option, the script should abort
4. create a version for deodexed mobiles/firmwares.
I dont have a clue, how to create an update.zip, so if anyone of you could give me a little help, i would be very happy
And i dont have a deodexed mobile, so someone should tell me the difference, so i can make a different script or the script should autodetect it.
Big thanx to Ateisti for found this solution: http://forum.xda-developers.com/showthread.php?t=779803
If you like my work you can buy me a beer (but you dont have to ): Beer via paypal
menu button fix included or not?
When someone would tell me what this is, then i can insert it in the script
Ateisti talk about it at the end of the first post of his thread
Found it
- By default, the menu button will also unlock the screen. To disable this behavior, you have to modify /res/values-hdpi-v4/bools.xml in /system/framework/framework-res.apk, and change the value of <bool name="config_disableMenuKeyInLockScreen">false</bool> to true. Can also be done by modifying code.
But, i have disabled WidgetLocker and just the AndroidLockscreen now..
I can hit so many times i want the menu button, the lockscreen will never be released..
I have JM5 (2.1). Maybe this is there different?
I will make on the weekend a linux version of the script and then i will also enable this feature..
thE_29 said:
When someone would tell me what this is, then i can insert it in the script
Click to expand...
Click to collapse
There is also a way to do this from the android.policy smali files. I did it on my UGJH2.
go into "android.policy\com\android\internal\policy\impl\LockScreen.smali"...
Do a search for "return v4" and change it to "return v6" (this should be within the method ".method private shouldEnableMenuKey()Z", closer to the ".end method" line.)
To add it to your script, have it change this at the same time as the other file you edit and bingo, no more menu button unlock....
didn't work here.
thank god you made a backup folder
JHJP8, not de-odexed.

[MOD] Lower or Higher Screen Brightness

I got this mod from the galaxy S2 thread and tried it on the GN running stock gsm 4.0.2. It kinda worked i got it to boot everything but something went wrong. it changed my lockscreen so that the time is not showing properly and the settings menu was messed up(kinda looked like the honeycomb setting menu). The brightness mod did work though. i was able to get it to work on Gingermod rom on the atrix without any side effects but it didnt work on the Wetdream rom. it is also reported to be working for the GS2. So hopefully it will work on the GN with a different build or rom.
Basically what you have to do is decompile the framework-res.apk and change the values is arrays.xml and recompile and push it back using adb. here's the instructions from that GS2 thread
1. Download APK manager
2. Grab framework-res.apk from your phone under \system\framework\ (you can use root explorer or adb push) and place it in the "place-apk-here-for-modding" folder
3. Run Script.bat and select option 9
4. go to projects\framework-res.apk\res\values\arrays.xml and edit your values with the ones roger posted in my link above
5. Once edited, compile the apk using option 11
6. Is this a system apk. Ans: y
7. Qn: Aside from the signatures...least. Ans: y
8. Prompt: In the apk manager folder u'll find a keep folder..... done then press enter on this script. Press any key to continue . . . go to "keep" folder and delete resources.arsc and then press any key
9. Choose option 22 to set project to unsignedframework-res.apk
10. Choose option 5 to zipalign the new apk.
11. rename the unsignedframework-res.apk to framework-res.apk and push it to system/framework with these commands in adb.
Code:
Mount System in recovery
adb push framework-res.apk /system/framework/framework-res.apk
reboot
here are the values in arrays.xml to be changed.
Code:
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>16</item>
<item>40</item>
<item>60</item>
<item>70</item>
<item>70</item>
<item>250</item>
</integer-array>
here's what i had the new values at
Code:
<integer-array name="config_autoBrightnessLcdBacklightValues">
<item>5</item>
<item>20</item>
<item>50</item>
<item>70</item>
<item>150</item>
<item>250</item>
</integer-array>
What i was looking to change since i've noticed that sometimes the screen is not bright enough if its at the second last level(70) and i wanted to change the 16 to 5. When i did this with my atrix i had the lowest setting at 2 and it was perfect at night. You can play around with the numbers to see what suits you. Just make sure you do a nandroid backup before attempting this mod.
So what this will allow you to have a higher screen brightness than normal and a lower price rightness that normal, so basically increasing the range of brightness
Sent from my Galaxy Nexus using XDA App
yes thats right the first value 16 is the lowest brightness, you can set this to 1 and the highest is 250. You can set anything you want in between. i was also wondering if i can put a few more levels in there as the GN only has 6. My atrix has 16 levels. i tried to make it 10 levels on one of my attempts and i got a bunch of force closes. tomorrow i will flash a different build and try again.
it's already writed on he_steone64 3ad how to set the brightness with all the files to change...but thanks ayway fotr this tuto..
sert00 said:
it's already writed on he_steone64 3ad how to set the brightness with all the files to change...but thanks ayway fotr this tuto..
Click to expand...
Click to collapse
ahh i didnt see his thread when i was trying this mod for the GN

How to add on screen button at framework for ICS

I'm using Xperia arc s at stock rom 4.1.B.0.587 and locked bootloader.
I'm using few mods, and also custom systemui *Colored icons systemui
Few days ago I am starting curious how to add on screen button at my own, and I still cannot do it successfully (got bootloop after xperia title).
After trial and error I found the solution, I don't add original META-INF framework.apk to my modified framework.apk.
Now I'm only curious how to add crt off animation. *I found out that original framework.apk already has the setting to show crt animation. Anyone has an idea what to do??
How I successfully add on screen button:
What I do: (following the tutorial from http://forum.xda-developers.com/showthread.php?t=1364757, and http://forum.xda-developers.com/showpost.php?p=9126643#post9126643 to mod the apk)
1. extract framework-res.apk from my system [framework-res.apk]
2. decompile it with 1.4.10 apktool by this command: java -jar apktool.jar d framework-res.apk framework-res
3. edit bools.xml to change show navigation bar to true
4. edit dimens.xml to change navigation bar height to (21.0dip)
5. rebuild the apk with this command: java -jar apktool.jar b framework-res out\framework-res.apk
6. <from this part I dont really understand> From the output apk [The name is outframework-res.apk] from apktool 1.4.10 (At first I use 1.4.3 and it always failed to compile, but It compiled successfully with 1.4.10), I add the extension to 7z [outframework-res.apk.7z], and unpack it. (i.e: it become outframework-res folder)
7. With 7zip app (actually I use total commander, with zero compression), I replace all files from outframework folder back to outframework.apk.7z
8. I also add resources.arsc from the outframework-res folder and also add it to the outframework-res.apk.7z. *The file size is the same before and after I put the resources.arsc.
9. I downloaded ics_sysbar.zip, then with total commander (7zip like program), I add those files to SystemUI.apk (/res/drawable-hdpi/) using 7-zip or other program. (replace original PNGs to these files).
10. I rename the outframework-res.apk.7z to framework-res.apk then push it to my device along with the SystemUI.apk.
Click to expand...
Click to collapse
Adding "qemu.hw.mainkeys=0" to build.prop enables soft-keys in AOSP/CM10.. I don't use stock ICS so can't confirm this. Wait for few more replies from other users.
soumya_digi said:
Adding "qemu.hw.mainkeys=0" to build.prop enables soft-keys in AOSP/CM10.. I don't use stock ICS so can't confirm this. Wait for few more replies from other users.
Click to expand...
Click to collapse
Thanks for your reply.
By the way, I actually found what is my problem, from analyze other working on screen button.
It turns out the compiled framework don't add META-INF.
After I add that folder to my compiled framework, *with total commander, It works.
And editing the SystemUI turns out unnecessary.
What I still wonder is how to add menu button (the right key, beside back and home button), and also make holding home button show the ics style recent app (the one that you can swipe to remove it from recent app).

mixre_path edit not happening!

Hello. I have been trying to edit some values in the mixer_path.xml file, but every time I edit the values, they return to default after phone restart.
I am on 10.0.9.0 rooted with magisk.

Categories

Resources