Related
Ccurrently trying to get the SkyGO app working on the HD2.
One of the devs has suggested that for the app to work properly we need a Kernel with "ro.secure=1" set in it.
Currently I am bouncing between Typhoon 3.7.6 (which uses tytung's r14 kernel) and NexusHD2-ICS-4.0.3 (tytungs ICSr1 Kernel I believe)
Can anyone tell me how to find out if the kernel has this parameter set. If not how easy would it be for me to add it and recompile the kernel (pointers to kernel de/recompilation threads appreciated!
I'm not to worried about doing it myself if I have to.
TIA
mods - if this is in the wrong forum I apologise in advance, could you move it for me if it is
bobjbain said:
Ccurrently trying to get the SkyGO app working on the HD2.
One of the devs has suggested that for the app to work properly we need a Kernel with "ro.secure=1" set in it.
Currently I am bouncing between Typhoon 3.7.6 (which uses tytung's r14 kernel) and NexusHD2-ICS-4.0.3 (tytungs ICSr1 Kernel I believe)
Can anyone tell me how to find out if the kernel has this parameter set. If not how easy would it be for me to add it and recompile the kernel (pointers to kernel de/recompilation threads appreciated!
I'm not to worried about doing it myself if I have to.
TIA
mods - if this is in the wrong forum I apologise in advance, could you move it for me if it is
Click to expand...
Click to collapse
This is a question. [Q&A]
yz.hd said:
This is a question. [Q&A]
Click to expand...
Click to collapse
Thanks for the useful and insightful response
FYI - I realised that it might be after I submitted it! Which is why I caveated the post at the end.
this parameter is in the initrd.gz in the kernel in the boot folder of the ROM.
You should extract it and inside there is a file called default.prop
extract
mkdir initdir
cd initdir
zcat ../initrd.gz | cpio -i -d
compress
cd initdir
find . | cpio -o -H newc | gzip -9 > ../initrd.gz
Each line in the file default.prop is an attribute assignment. There we need to
Note the two properties: ro.secure, and ro.debuggable. . If ro.secure = 0 is allowed us to run the adb root command.
Usually we put the core ROOT refers to the ro.secure = 0. ROOT permission to refer to the general said on the phone
A license management program (Superuser.apk) procedures for the root user can grant permission.
bobjbain said:
Ccurrently trying to get the SkyGO app working on the HD2.
One of the devs has suggested that for the app to work properly we need a Kernel with "ro.secure=1" set in it.
Currently I am bouncing between Typhoon 3.7.6 (which uses tytung's r14 kernel) and NexusHD2-ICS-4.0.3 (tytungs ICSr1 Kernel I believe)
Can anyone tell me how to find out if the kernel has this parameter set. If not how easy would it be for me to add it and recompile the kernel (pointers to kernel de/recompilation threads appreciated!
I'm not to worried about doing it myself if I have to.
TIA
mods - if this is in the wrong forum I apologise in advance, could you move it for me if it is
Click to expand...
Click to collapse
look here this great kernel should have ro.secure set to 1
Bologna said:
look here this great kernel should have ro.secure set to 1
Click to expand...
Click to collapse
it doesn't, it's based on Tytung's Kernel, Tytung's doesn't so I'm not suprised that dorimnax's "greatest ever" (sic) doesn't teither
big thanks to magnus48, have decompressed the kernel, changed ro.secure to 1, recompressed, copied to /boot
Phone booted (which suprised me) and my SkyGo App now works.
Yay
magnus48 said:
The easy way is use root explorer and edit /default.prop on your device but is not free.
ro. means read only you can't change it's value after rom is loaded
Click to expand...
Click to collapse
So, I can either change the value in my kernel OR I can edit default.prop and reboot??
Won't the values in default.prop get overwritten on boot??
bobjbain said:
it doesn't, it's based on Tytung's Kernel, Tytung's doesn't so I'm not suprised that dorimnax's "greatest ever" (sic) doesn't teither
Click to expand...
Click to collapse
First question : Why of this sarcastic reply?
Second question : Can you please share your skygo working app, telling us what's the kernel you're using to have it working?
Thanks in advance
bobjbain said:
So, I can either change the value in my kernel OR I can edit default.prop and reboot??
Won't the values in default.prop get overwritten on boot??
Click to expand...
Click to collapse
forget this way. It did not work when rebooting the kernel overwrites the deafult.prop file.
The change should be done inside initrd.gz
magnus48 said:
forget this way. It did not work when rebooting the kernel overwrites the deafult.prop file.
The shange should be done inside initrd.gz
Click to expand...
Click to collapse
You should be able to pull it, make changes and push it back to phone via adb. Useful if you don't want to reflash
Sent from my HD2 using XDA
jwchips said:
You should be able to pull it, make changes and push it back to phone via adb. Useful if you don't want to reflash
Sent from my HD2 using XDA
Click to expand...
Click to collapse
default.prop is in the initrd.gz, this is extracted when the phone boots, so any changes you make to default.prop WILL be overwritten when the phone boots.
You have to make the changes inside the initrd.gz file.
Bologna said:
First question : Why of this sarcastic reply?
Click to expand...
Click to collapse
I don't quite hold dorimanx in quite the high esteem that others do, his work is good but it can be rushed as shown by his 5.x series of Kernels.
Bologna said:
Second question : Can you please share your skygo working app, telling us what's the kernel you're using to have it working?
Thanks in advance
Click to expand...
Click to collapse
Here although this is an app for UK Sky only and won't work for non-UK subscribers.
bobjbain said:
default.prop is in the initrd.gz, this is extracted when the phone boots, so any changes you make to default.prop WILL be overwritten when the phone boots.
You have to make the changes inside the initrd.gz file.
Click to expand...
Click to collapse
Any chance you could post the modified kernel? I am running R14 on GB3.2a so it would drop right in
CR5N said:
Any chance you could post the modified kernel? I am running R14 on GB3.2a so it would drop right in
Click to expand...
Click to collapse
yertiz.
Take a backup of your current initrd.gz first though to be on the safe side.
bobjbain said:
yertiz.
Take a backup of your current initrd.gz first though to be on the safe side.
Click to expand...
Click to collapse
Thankyou. This works on Tytung GB3.2a. F1 channel now working on this old HD2
What about SD builds?
magnus48 said:
forget this way. It did not work when rebooting the kernel overwrites the deafult.prop file.
The change should be done inside initrd.gz
Click to expand...
Click to collapse
I can access and edit default.prop on my SD build after the phone has booted. This seems to give me access to Sky News at least. But I still can't get premium channels. Do you think I still need to edit initrd.gz as well or is that now redundant?
johnkst said:
I can access and edit default.prop on my SD build after the phone has booted. This seems to give me access to Sky News at least. But I still can't get premium channels. Do you think I still need to edit initrd.gz as well or is that now redundant?
Click to expand...
Click to collapse
No, you will need to edit your initrd.gz
Before I did I could access Sky News only, afterwards the Sky world was my Oyster!!
bobjbain said:
No, you will need to edit your initrd.gz
Before I did I could access Sky News only, afterwards the Sky world was my Oyster!!
Click to expand...
Click to collapse
Thanks Bob. Is there anything else I should edit while I'm at it?
Currently after booting, my default.prop contains the following attributes:
ro.secure=0 (need to change this to 1)
ro.allow.mock.location=1
ro.debuggable=1
persist.service.adb.enable=1
I'm particularly suspicious of the last one!
Also... what should I use to edit default.prop within initrd.gz? I tried unzipping it with 7zip, editing the initrd file with a hex editor and re-zipping but it created a significantly smaller file...
johnkst said:
Thanks Bob. Is there anything else I should edit while I'm at it?
Currently after booting, my default.prop contains the following attributes:
ro.secure=0 (need to change this to 1)
ro.allow.mock.location=1
ro.debuggable=1
persist.service.adb.enable=1
I'm particularly suspicious of the last one!
Also... what should I use to edit default.prop within initrd.gz? I tried unzipping it with 7zip, editing the initrd file with a hex editor and re-zipping but it created a significantly smaller file...
Click to expand...
Click to collapse
I only ever changed ro.secure, don't have the phone any more so can't check the other values.
To edit the default.prop you need to uncompress the initrd.gz then recompress it using the following linux commands
Code:
extract
mkdir initdir
cd initdir
zcat ../initrd.gz | cpio -i -d
compress
cd initdir
find . | cpio -o -H newc | gzip -9 > ../initrd.gz
As I run windows I downloaded and installed cygwin and used that to uncompress and recompress the kernel.
I edited the default.prop in windows but you can use vi within cygwin if you want.
If you're uncomfortable doing this then attach your kernel to a post and I can do it for you.
I was looking for this and I just found it. It just disables the USB Debugging notification without disabling USB Debugging.
I put it here just in case someone needs it:
root phone
backup /system/build.prop to your sdcard
edit & add the line below to /system/build.prop
Code:
persist.adb.notify=0
source
carlosmg2 said:
I was looking for this and I just found it. It just disables the USB Debugging notification without disabling USB Debugging.
I put it here just in case someone needs it:
root phone
backup /system/build.prop to your sdcard
edit & add the line below to /system/build.prop
Code:
persist.adb.notify=0
source
Click to expand...
Click to collapse
Nice!
You should put this in the Android development section of this forum.
You should just link to this thread, it has them all there (I've used this for years when needed)
http://forum.xda-developers.com/showthread.php?t=1246748
Thank you so much!!!!
Thanks man was looking for this :good:
After editing my build.prop and adding this line, the device no longer boots. Soft brick... (Nexus 5)
eladnava,you must edit that line,not add it.
Any non-rooted solution? You can (on Lollipop and above) longpress the notification and hide all from Android System, but that seems like a VERY bad idea.
thanks!!
good code ,thenks man
Modern method that works with Magisk (root):
Connect over adb, then do:
su
resetprop persist.adb.notify 0
I downloaded the source from opensource.samsung.com, and seem to be able to get a zImage. But I am not sure if I am doing everything correctly. Here have a couple of questions as follows:
Question 1- I don't see a system.img and / or a ramdisk in .../out/target/product/generic/ folder. Shouldn't I see a system.img and or a ramdisk.img there? I know I can get a ramdisk from a stock firmware. I like to know why I see some tutorials where the person has their own ram disk generated. Further is initramfs and ramdisk.img the same file? I am sure I'll find this out very soon, but if you can clear it up for me, I would certainly appreciate it.
Question 2- Also when I issue the command:
Code:
make VARIANT_DEFCONFIG=msm8974_sec_hlte_spr_defconfig msm8974_sec_defconfig SELINUX_DEFCONFIG=selinux_defconfig modules
I get the following error ( Error 1) :
The present kernel configuration has modules disabled.
Type 'make config' and enable loadable module support.
Then build a kernel with module support enabled.
Click to expand...
Click to collapse
I just dread going through make config so I use this command:
Code:
make VARIANT_DEFCONFIG=msm8974_sec_hlte_spr_defconfig msm8974_sec_defconfig SELINUX_DEFCONFIG=selinux_defconfig menuconfig
But it seems like the changes I make are not saved since I get the same error l labeled as error 1 above. I am sure I saved my config when I exit the menuconfig option. Does anyone know what I am doing wrong. Is there some way to quickly activate the loadable modules option?
This is for the H812 only, however I am sure much can be used on any device. I decided to make one post of all my settings instead of individual posts in different threads as a way to avoid off topic etc. This is a wip and I will update as required.
*** Use anything I say at your own risk, I will not be held responsible for bricking or otherwise screwing up your device in any way. No whining about this doesn't work or that it doesn't make any sense etc I say again USE AT YOUR OWN RISK ***
Ok so first thing is to backup then backup and copy backup to multiple locations, backup again (lol)!!!
Backup then Unlock with UsU (SALT) by @steadfasterX here: https://forum.xda-developers.com/g4/general/unlock-unlock-lg-g4-device-usu-t3760451 Make sure to install TWRP and make backups.
Figure it out yourself by reading the OP several times and post as necessary in that thread.
Install the Nougat v29a mentioned in the above thread under FAQ #16.
Install Titan kernel (H811 stock Nougat) by @kessaras here: https://forum.xda-developers.com/g4/development/g4-t3667878
I use 1.7 with the following settings:
EDIT:I have since changed these settings although the following is still good.
Big cores at 1632 max 384 min.
Little cores at 1440 max 384 min
CPU gov intelliactive for both.
Disable CPU boost.
GPU using cpufreq gov.
FIOPS for both internal and external set to 1024kb.
Low memory killer set to light.
Misc settings, enable fsync with Westwood TCP.
Install Magisk with Dolby Atmos (LeEco Le Pro3), Enable Doze for GMS (huge savings for battery) and Unified Hosts Adblock modules.
NOTE: I use Adaway beta 4.09 now instead of unified hosts module. Google framework module for Google apps like Phone. Single user mod and force fast charge are also good!
For now that should be enough to get a bunch of users messed up, I have other tweaks like bloat removal, useful apps etc to add later if people want them.
Feel free to post questions about the above for further explanation/clearification.
Do not ask for help fixing things you break, that's what backups are for!
Cheers!
Edit: Great post for H812 consider thanking that user
https://forum.xda-developers.com/g4/general/unlock-unlock-lg-g4-device-usu-t3760451/page110
List of useful apps that I use:
Kernel Adiutor
https://play.google.com/store/apps/details?id=com.grarak.kerneladiutor
Magisk
https://forum.xda-developers.com/apps/magisk/beta-magisk-v13-0-0980cb6-t3618589/page577
Build prop editor
https://play.google.com/store/apps/details?id=com.jrummy.apps.build.prop.editor
BusyBox
https://play.google.com/store/apps/details?id=ru.meefik.busybox
Catlog
https://play.google.com/store/apps/details?id=com.nolanlawson.logcat
Devcheck
https://play.google.com/store/apps/details?id=flar2.devcheck
ES File Explorer
https://play.google.com/store/apps/details?id=com.estrongs.android.pop.pro
Official TWRP
https://play.google.com/store/apps/details?id=me.twrp.twrpapp
Quick Reboot
https://play.google.com/store/apps/details?id=com.antaresone.quickrebootpro
Titanium Backup
https://play.google.com/store/apps/details?id=com.keramidas.TitaniumBackup
Wifi analyzer
https://play.google.com/store/apps/details?id=info.wifianalyzer.pro
Build.prop edits that may help;
ro.build.fingerprint
lge/p1_rgs_ca/p1:6.0/MRA58K/1619418088183:user/release-keys
(Passes safety net check for me, use the entry from your original MM built.prop)
ro.product.model
LG-H812
(Helps apps show correct model)
ro.gps.agps_provider
1
(From original build.prop)
ro.ril.def.preferred.network
9
ro.telephony.default_network
9
telephony.lteOnCdmaDevice
1
telephony.lteOnGsmDevice
1
(Networking to use LTE 4g etc)
ro.factorytest
0
(Removes an error in log)
*** I soft bricked my device changing too many entries in build.prop so be cautious.
Here's a list of all the apps I have frozen in Titanium Backup.
com.android.cellbroadcastreceiver
com.android.LGSetupWizard
com.google.android.apps.books
com.google.android.apps.docs.editors.sheets
com.google.android.apps.docs.editors.slides
com.google.android.apps.magazines
com.google.android.play.games
com.google.android.talk
com.google.android.videos
com.google.android.webview
com.lge.appbox.client
com.lge.bnr
com.lge.bnr.launcher
com.lge.cloudhub
com.lge.concierge
com.lge.easyhome
com.lge.email
com.lge.exchange
com.lge.fmradio
com.lge.gcuv
com.lge.gestureanswering
com.lge.homeselector
com.lge.ia.task.smartsetting
com.lge.iftttmanager
com.lge.launcher2
com.lge.lgaccount
com.lge.lgdmsclient
com.lge.lgmapui
com.lge.mtalk.sf
com.lge.myplace
com.lge.myplace.engine
com.lge.qvoiceplus
com.lge.remote.setting
com.lge.sizechangable.favoritecontacts
com.lge.sizechangable.weather.platform
com.lge.sizechangable.weather.theme.optimus
com.lge.smartcover
com.lge.smartsharepush
com.lge.sync
com.lge.updatecenter
com.lge.wernicke
com.lge.wernicke.nlp
com.maluuba.android.qvoice
com.rsupport.rs.activity.lge
com.sika524.android.quickshortcut
com.ti.server
One of the easiest and most effective ways to increase the perceived speed and snappiness of your device!
Developer Options > Drawing
Window animation scale [Off or .5]
Transition animation scale [Off or .5]
Animator duration scale [1x]
Here are the settings I use for the stock Titan kernel (1.7 I been having issues with 1.8) including Kernel Adiutor profile:
Code:
version 1
profile
commands
path /sys/module/msm_performance/parameters/cpu_max_freq4
command echo '4:1440000' > /sys/module/msm_performance/parameters/cpu_max_freq
path /sys/module/msm_performance/parameters/cpu_max_freq5
command echo '5:1440000' > /sys/module/msm_performance/parameters/cpu_max_freq
path /sys/devices/system/cpu/cpu%d/cpufreq/scaling_max_freq4
command #{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_max_freq","value":"1440000","min":4,"max":5,"bigCpus":[4,5],"LITTLECpus":[0,1,2,3],"corectlmin":2}
path /sys/devices/system/cpu/cpu%d/cpufreq/scaling_governor0
command #{"path":"\/sys\/devices\/system\/cpu\/cpu%d\/cpufreq\/scaling_governor","value":"intelliactive","min":0,"max":3,"bigCpus":[4,5],"LITTLECpus":[0,1,2,3],"corectlmin":2}
path /sys/module/cpu_boost/parameters/input_boost_enabled
command echo '0' > /sys/module/cpu_boost/parameters/input_boost_enabled
path /sys/module/cpu_boost/parameters/boost_ms
command echo '0' > /sys/module/cpu_boost/parameters/boost_ms
path /sys/module/cpu_boost/parameters/input_boost_freq0
command echo '0:0' > /sys/module/cpu_boost/parameters/input_boost_freq
path /sys/module/cpu_boost/parameters/input_boost_freq4
command echo '4:0' > /sys/module/cpu_boost/parameters/input_boost_freq
path /sys/class/kgsl/kgsl-3d0/devfreq/governor
command echo 'cpufreq' > /sys/class/kgsl/kgsl-3d0/devfreq/governor
path /sys/block/mmcblk0/queue/scheduler
command echo 'fiops' > /sys/block/mmcblk0/queue/scheduler
path /sys/block/mmcblk0/queue/read_ahead_kb
command echo '1024' > /sys/block/mmcblk0/queue/read_ahead_kb
path /sys/block/mmcblk0/queue/iostats
command echo '0' > /sys/block/mmcblk0/queue/iostats
path /sys/block/mmcblk1/queue/scheduler
command echo 'deadline' > /sys/block/mmcblk1/queue/scheduler
path /sys/block/mmcblk1/queue/read_ahead_kb
command echo '2048' > /sys/block/mmcblk1/queue/read_ahead_kb
path /sys/block/mmcblk1/queue/iostats
command echo '0' > /sys/block/mmcblk1/queue/iostats
path /sys/module/lowmemorykiller/parameters/minfreechmod
command chmod 666 /sys/module/lowmemorykiller/parameters/minfree
path /sys/module/lowmemorykiller/parameters/minfreechown
command chown root /sys/module/lowmemorykiller/parameters/minfree
path /sys/module/lowmemorykiller/parameters/minfree
command echo '21780,29040,36300,43560,50820,65340' > /sys/module/lowmemorykiller/parameters/minfree
path /proc/sys/vm/swappiness
command echo '60' > /proc/sys/vm/swappiness
path /sys/module/msm_thermal/parameters/enabled
command echo 'N' > /sys/module/msm_thermal/parameters/enabled
path /sys/module/msm_thermal/core_control/enabled
command echo '1' > /sys/module/msm_thermal/core_control/enabled
path /sys/module/cpu_boost/parameters/input_boost_ms
command echo '0' > /sys/module/cpu_boost/parameters/input_boost_ms
Have fun!
EDIT: Added a Kernel Adiutor profile json zipped file as per suggestion.
https://drive.google.com/file/d/1mOdzGOI0f25NEQJLCS81nwqa-FCBq1sX/view?usp=drivesdk
Latest profile I am using with excellent results:
https://drive.google.com/file/d/13JFYnbjc7zxZed2Pgsp0KtdyiyOMICCO/view?usp=drivesdk
Turn off dt2w and pocket detection. I use my phone at work and it keeps coming on and randomly running apps, pocket dialing and opening the camera app. Very annoying for me.
Use Shortcut Master: https://play.google.com/store/apps/details?id=org.vndnguyen.shortcutmaster.lite
Select 3 dot menu > search for knock. Find the hidden menu in the list. Select launch and it will open a menu to allow disabling of this feature. (It also disables dt2sleep.
Select 3 dot menu > search for pocket. Same procedure as above.
This has probably been posted already but I wanted to post here. (Credit to reddit user spring45 https://www.google.ca/amp/s/amp.red...to_disable_double_tap_to_wake/#ampf=undefined)
Mmmm....
grantdb said:
Here are the settings I use for the stock Titan kernel (1.8):
Have fun!
Click to expand...
Click to collapse
Hi, not everyone can interpret the code. How'bout you just state the settings you choose instead. Thanks for sharing.
fi5z.x9 said:
Hi, not everyone can interpret the code. How'bout you just state the settings you choose instead. Thanks for sharing.
Click to expand...
Click to collapse
Will try if I get time.
Well I personally would prefer kernel Adiutor profiles.. You can export that and a user can import it.. That way you could even share several ones easily..
Jm5c
Sent from my LG-H815 using XDA Labs
Hi. Come to this post from Titan kernel one. I saw that this is about stock firmware v29a plus Titan kernel 1.7 for H812.
My question is, Can I use the Kernel Adiutor profile in my H815?
kinuris said:
Hi. Come to this post from Titan kernel one. I saw that this is about stock firmware v29a plus Titan kernel 1.7 for H812.
My question is, Can I use the Kernel Adiutor profile in my H815?
Click to expand...
Click to collapse
I don't see why not. They have the same options. Make sure you create your own profile in case something doesn't work. No matter what you can always flash the kernel again.
Hello, when you using phh's GSIs, you may found bugs on auto brightness, battery usage data, etc (e.g: Xiaomi, Huawei, etc.). For this, you can make an overlay files for your mobiles.
Requirements:
framework-res.apk on your stock rom. (It may on /system/framework/framework-res.apk)
apktool (to extract framework-res.apk)
git (to clone repo)
Linux (to build overlay files)
Steps:
1. Fork phhusson/vendor_hardware_overlay on GitHub.
2. Clone Repository which you forked, and make a new branch for your works.
3. Copy a device which similar for your device, and rename it to your own device.
4. Edit <Your device>/Android.mk (Just modify the contents of the brackets, same as below)
Code:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_PACKAGE_NAME := treble-overlay-[Manufacturer of your device]-[Name of your device]
LOCAL_MODULE_PATH := $(TARGET_OUT)/overlay
LOCAL_IS_RUNTIME_RESOURCE_OVERLAY := true
LOCAL_PRIVATE_PLATFORM_APIS := true
include $(BUILD_PACKAGE)
5. Edit <Your device>/AndroidManifest.xml
Code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.phh.treble.overlay.[Manufacturer of your device].[Name of your device]"
android:versionCode="1"
android:versionName="1.0">
<overlay android:targetPackage="android"
android:requiredSystemPropertyName="ro.vendor.build.fingerprint"
android:requiredSystemPropertyValue="+[write as similar format]*"
android:priority="[Take next number of last used]"
android:isStatic="true" />
</manifest>
If you don't know how to take androidriority, you can execute this commands to list priority which used already:
Code:
cd [Path of repository]
find -name AndroidManifest.xml |while read manifest;do packagename="$(xmlstarlet sel -t -m '//manifest' -v @package -n $manifest)";priority="$(xmlstarlet sel -t -m '//overlay' -v @android:priority -n $manifest)";echo -e "$priority\t$packagename";done|more
(the single line command split here, just for viewing or making a shell script):
Code:
find -name AndroidManifest.xml |while read manifest;do
packagename="$(xmlstarlet sel -t -m '//manifest' -v @package -n $manifest)";
priority="$(xmlstarlet sel -t -m '//overlay' -v @android:priority -n $manifest)";
echo -e "$priority\t$packagename";
done
It will print a list for you (unsorted), and you just take an unused priority.
You can find device fingerprint on /vendor/build.prop, or execute following commands (on your device or adb shell):
Code:
getprop ro.vendor.build.fingerprint
If you can't find ro.vendor.build.fingerprint, you can find ro.vendor.product.name or ro.product.vendor.device, then change android:requiredSystemPropertyName and android:requiredSystemPropertyValue what you found.
Huawei seems to use ro.hw.oemName to detect phone, and others manufacturer maybe have their own detection, too. But it should be unique for other phones with same manufacturer.
(It's NOT recommended unless your device don't have ro.vendor.build.fingerprint.)
6. Extract framework-res.apk with apktool on another side. (to avoid commited by mistake)
7. Replace <Your device>/res/xml/power_profile.xml to which power_profile.xml for your device.
It will on <Extracted framework-res.apk>/res/xml/power_profile.xml.
Or you can find whoever's device tree, it may have this file, too.
8. Edit <Your device>/res/values/config.xml
Find each key on following files what for your device:
Code:
[Extracted framework-res.apk]/res/values/arrays.xml
[Extracted framework-res.apk]/res/values/bools.xml
[Extracted framework-res.apk]/res/values/fractions.xml
[Extracted framework-res.apk]/res/values/integers.xml
And then replace values into <Your device>/res/values/config.xml
9. Add your device into <Path of repository>/overlay.mk
Just write like other lines.
10. Build overlays
Just execute following commands:
Code:
chmod u+x [Path of repository]/build/build.sh
[Path of repository]/build/build.sh
If You get this, Do what it said:
Code:
Please install aapt (apt install aapt should do)
Or if you get this:
Code:
OpenJDK Server VM warning: You have loaded library /root/overlay/vendor_hardware_overlay/build/signapk/libconscrypt_openjdk_jni.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.UnsatisfiedLinkError: org.conscrypt.NativeCrypto.get_cipher_names(Ljava/lang/String;)[Ljava/lang/String;
at org.conscrypt.NativeCrypto.get_cipher_names(Native Method)
at org.conscrypt.NativeCrypto.<clinit>(NativeCrypto.java:764)
at org.conscrypt.OpenSSLProvider.<init>(OpenSSLProvider.java:56)
at org.conscrypt.OpenSSLProvider.<init>(OpenSSLProvider.java:49)
at com.android.signapk.SignApk.main(SignApk.java:942)
I have no solution, either. Try to build on another computer.
11. Test overlay with tests.sh and yourself
For general checks (symtax, etc.), just execute following command:
Code:
chmod u+x [Path of repository]/tests/tests.sh
[Path of repository]/tests/tests.sh
You should fix errors what reported for your device, and then restart from step 10.
If it reported errors but not for your device, just ignore it.
When check passed, you can find overlay file on <Path of repository>/build/treble-overlay-<Manufacturer of your device>-<Name of your device>.apk, just copy it into your phone's /system/overlay/, and set permission to rw-r--r-- / 0644.
And then reboot your phone to test your overlay.
12. If it works for your device, don't forget to perform a pull request for phhusson/vendor_hardware_overlay, to support his awesome works.
Thanks for the guide @minadzuki
but i'm getting this error after step 10:
(core dumped) aapt package -f -F ${name}-unsigned.apk -M $path/AndroidManifest.xml -S $path/res -I android.jar
even when i try to build for existing devices I got the same error
king1990 said:
Thanks for the guide @minadzuki
but i'm getting this error after step 10:
(core dumped) aapt package -f -F ${name}-unsigned.apk -M $path/AndroidManifest.xml -S $path/res -I android.jar
even when i try to build for existing devices I got the same error
Click to expand...
Click to collapse
Oh...I forgot this, sorry.
Because I haven't encountered this error, so I don't have a way to solve it, either. (I tried to built it on three remote servers only)
And...is it cause segment fault?
Or you can try to install google-android-build-tools instead of aapt. (because I can't find aapt on archlinux but found this)
Very nice guide, thanks!
I'll link it as part of a "how to contribute"
For aapt, there is an aapt included in the git. If it doesn't work for you (like @king1990's segfault), know that the one included in the git has the lowest priority. It will pick up aapt from the system first.
(but then you'll need to have a system-wide aapt).
Or if you have an Android SDK somewhere, you can set your PATH to include it.
Edit: I just realized that what I just described might actually be the issue. If there is a system-wide aapt, it will use the libc++ in the git, which would explain the crash.
I fixed this case in my current git.
If there is a system-wide aapt it will use it.
If for some reason, system-wide aapt isn't suitable, you can run build.sh with --local-aapt to force the use of the in-git aapt (i.e. it will have higher priority than system's so no conflict should happen)
king1990 said:
Thanks for the guide @minadzuki
but i'm getting this error after step 10:
(core dumped) aapt package -f -F ${name}-unsigned.apk -M $path/AndroidManifest.xml -S $path/res -I android.jar
even when i try to build for existing devices I got the same error
Click to expand...
Click to collapse
Could you check again with latest git?
If it still doesn't work, can you try to call build.sh --local-aapt ?
@phhusson Thanks now it working fine and building without faults
I have few questions regarding the AndroidManifest.xml :
1- for android:requiredSystemPropertyValue how do I know which name to use ? is it trial and error ?
2- for androidriority does matter which number I choose ?
3- some vendors have this overlay (framework-res__auto_generated_rro.apk) under "vendor/overlay". Does is affect the device overlay in system/overlay ?
4- to install the overlay is it just as @minadzuki says ?
and thanks again for your great work
king1990 said:
@phhusson Thanks now it working fine and building without faults
I have few questions regarding the AndroidManifest.xml :
1- for android:requiredSystemPropertyValue how do I know which name to use ? is it trial and error ?
2- for androidriority does matter which number I choose ?
3- some vendors have this overlay (framework-res__auto_generated_rro.apk) under "vendor/overlay". Does is affect the device overlay in system/overlay ?
4- to install the overlay is it just as @minadzuki says ?
and thanks again for your great work
Click to expand...
Click to collapse
1. For example, Xiaomi Mi 6X has this fingerprint:
xiaomi/wayne/wayne:8.1.0/OPM1.171019.011/8.7.12:user/release-keys/
So you can take xiaomi/wayne to use, and android:requiredSystemPropertyValue will be: +xiaomi/wayne*
2. it will affect to build images, or affect the detection on System. If you got this:
Code:
F: .xxx/AndroidManifest.xml: priority xx conflicts with another manifest
You just take next number and try again, until now priority 53 has been taken (without pull request), you can take priority since 54.
3. Sorry, I don't know for this.
4. Yes, just simply copy and permission change.
king1990 said:
@phhusson Thanks now it working fine and building without faults
Click to expand...
Click to collapse
Cool
3- some vendors have this overlay (framework-res__auto_generated_rro.apk) under "vendor/overlay". Does is affect the device overlay in system/overlay ?
Click to expand...
Click to collapse
overlays in /system/overlay and /vendor/overlay are the same thing, and on my GSI both are loaded, so yes it affects it.
But if your vendor has a framework-res__auto_generated_rro.apk, you probably don't need an overlay file for your phone, because it's already there.
(Please note that /system/overlay doesn't exist in AOSP, that's a change specific to my ROM, and custom ROMs based on it. AOSP only has /vendor/overlay)
@minadzuki Thanks for answering my questions. @phhusson its clear now , I don't know if this is related to your treble approach or not but some GSI ROMs refuse to go the minimum value in the brightness curve no mater what value I set in the curve, it never achieved.
is this treble or ROM related ?
king1990 said:
@minadzuki Thanks for answering my questions. @phhusson its clear now , I don't know if this is related to your treble approach or not but some GSI ROMs refuse to go the minimum value in the brightness curve no mater what value I set in the curve, it never achieved.
is this treble or ROM related ?
Click to expand...
Click to collapse
Brightness is a bit complex on Android Pie... (well it already was before, but it got even worse)
Do you have a link to your current overlay, so I can take a look at which code path you'd go to?
What's the lowest backlight value you get in /sys/class/backlight/panel0-backlight/brightness or /sys/class/leds/lcd-backlight/brightness?
Also what's your device? Does it have extended brightness range? (what's the value of getprop persist.sys.qcom-brightness // is it a samsung device?)
phhusson said:
Brightness is a bit complex on Android Pie... (well it already was before, but it got even worse)
Do you have a link to your current overlay, so I can take a look at which code path you'd go to?
What's the lowest backlight value you get in /sys/class/backlight/panel0-backlight/brightness or /sys/class/leds/lcd-backlight/brightness?
Also what's your device? Does it have extended brightness range? (what's the value of getprop persist.sys.qcom-brightness // is it a samsung device?)
Click to expand...
Click to collapse
for overlay this the extracted files from the overlay apk (my device is Axon7)
The lowest backlight is 10 (once manually edit it to 1 it goes to really dim brightness)
what I don't understand that I already built two GSI ROMs one is DU13 & other Liquid pie both report the same backlight light value at 10 at minimum value but in DU its very dim and in liquid its still bright ?!
The command did not give back any information so I assume we don't extended brightness range.
Thanks
Edit : it was overlay problem , fixed after modifying it
I tried to create an overlay for my Honor View 10 (Berkeley)
Is there a list of recommended settings to copy over from the stock ROM? I started with copying everything listed in tests/knownKeys and it seems to work
There's a power_profile.xml in the framework-res.apk I dumped from my stock ROM but the battery capacity is set to 1000 instead of 3750. Is that right?
There's also a power_profile_test.xml in there with a much more sane value of 3000 mAh. Should I use this one instead?
Copperhead100 said:
I tried to create an overlay for my Honor View 10 (Berkeley)
Is there a list of recommended settings to copy over from the stock ROM? I started with copying everything listed in tests/knownKeys and it seems to work
There's a power_profile.xml in the framework-res.apk I dumped from my stock ROM but the battery capacity is set to 1000 instead of 3750. Is that right?
There's also a power_profile_test.xml in there with a much more sane value of 3000 mAh. Should I use this one instead?
Click to expand...
Click to collapse
I don't have any Huawei phones, sorry.
Maybe you can referrer /Huawei/kirin970/CLT or /Huawei/kirin970/EML, Honor V10 maybe have its OEM name and called "BKL"
Copperhead100 said:
I tried to create an overlay for my Honor View 10 (Berkeley)
Is there a list of recommended settings to copy over from the stock ROM? I started with copying everything listed in tests/knownKeys and it seems to work
There's a power_profile.xml in the framework-res.apk I dumped from my stock ROM but the battery capacity is set to 1000 instead of 3750. Is that right?
There's also a power_profile_test.xml in there with a much more sane value of 3000 mAh. Should I use this one instead?
Click to expand...
Click to collapse
On Huawei, you'll find real power_profile.xml somewhere in /odm or /product. I'd say /product/etc/power_profile.xml
phhusson said:
On Huawei, you'll find real power_profile.xml somewhere in /odm or /product. I'd say /product/etc/power_profile.xml
Click to expand...
Click to collapse
Thanks. It's actually /product/etc/xml/power_profile.xml
There's a new pull request incoming
is it possible to create an overlay in Widows usingGIT for Windows?
JEANRIVERA said:
is it possible to create an overlay in Widows usingGIT for Windows?
Click to expand...
Click to collapse
Yes, you can write source code everywhere (don't forget to replace CRLF to LF), but maybe you should build it on Linux, or you have a way to build it on Windows (e.g.: WSL, Mingw, etc.)
@minadzuki I can't find a config.xml in my framework-res.apk, am I missing something? or that gets created somehow in the process?
another question
on step 5 you say to edit AndroidManifext.xml, does that means delete everything in it and copy paste what you put on the code box? or just add that at the end of the xml file?
JEANRIVERA said:
@minadzuki I can't find a config.xml in my framework-res.apk, am I missing something? or that gets created somehow in the process?
another question
on step 5 you say to edit AndroidManifext.xml, does that means delete everything in it and copy paste what you put on the code box? or just add that at the end of the xml file?
Click to expand...
Click to collapse
framework-res.apk doesn't contain config.xml, it split into several files: arrays.xml, bools.xml, fraction.xml, integers.xml. just create config.xml or copy from other devices and find values on these files (to replace it).
and step 5, just replace values which for your device, like what other devices wrote.
minadzuki said:
framework-res.apk doesn't contain config.xml, it split into several files: arrays.xml, bools.xml, fraction.xml, integers.xml. just create config.xml or copy from other devices and find values on these files (to replace it).
and step 5, just replace values which for your device, like what other devices wrote.
Click to expand...
Click to collapse
thanks for the response but I am really lost here those 4 xml has way to much data in it, should I just copy everything to config.xml?
to be honest what I am trying to fix are 2 things the battery stats not showing and the auto brightness and brightness slider and if the led light is fixable by an overlay that too, I can provide you all the files needed could you build it for me please? my device is an HTC U12+
JEANRIVERA said:
thanks for the response but I am really lost here those 4 xml has way to much data in it, should I just copy everything to config.xml?
to be honest what I am trying to fix are 2 things the battery stats not showing and the auto brightness and brightness slider and if the led light is fixable by an overlay that too, I can provide you all the files needed could you build it for me please? my device is an HTC U12+
Click to expand...
Click to collapse
you can check like this:
https://github.com/phhusson/vendor_hardware_overlay/blob/master/Xiaomi/Mi8/res/values/config.xml
then take values from those 4 xmls.