Question How to get decoded power_profile.xml? - Moto G Power (2021)

[GUIDE] How to make GSIs overlay file for your phone
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...
forum.xda-developers.com
Hello I was following the above guide and ran into the issue of not being able to extract the necessary power_profile.xml values from the framework-res.apk.

Related

[TOOL] [SHARE] Tickle My Android 7.1 - The Greatest Ever Theming Tool..

Note : I'm just sharing the work of the XDA member Ticklefish.The world-famous Tickle My Android, or TMA for short, is a command line tool for Windows that uses apktool to help you pull and decompile files from your Android phone or tablet.
​
Features : change the battery icon,
change the WiFi icon,
change the signal icon,
change the emoticons,
change the notification toggles,
change the softkeys,
change the transparency of the statusbar (if the rom allows it),
zipalign apk files,
sign new apk files,
sign recompiled apk files in the same way as the original,
deodex apk and jar files,
resize and change boot animations,
change fonts,
create backup-generating flashable zip files
create standard flashable zip files
..and now comes in Portuguese and French!!
​
To use Tickle My Android, you will need:
- a rooted Android phone or tablet with USB Debugging enabled and a recovery installed (either ClockworkMod or TWRP) ,
- any version of Android on that device,
- a Windows PC (XP or above) with the phone or tablet's drivers installed as well as Java Runtime Environment 1.6 minimum,
- a USB cable to connect your device to the PC,
- patience and a little common sense​
What is Tickle My Android compatible with?
Tickle My Android's decompiler function always uses the very latest apktool files, as well as the very best aapt files, available. But, because Android is an open-source OS, there will always be some implementations of it that TMA will not be fully compatible with.
Currently, TMA is not fully compatible with some official MIUI rom's. This is because MIUI isn't open-source, unlike Android itself, and the developers aren't sharing how they construct their files.
TMA is also not fully compatible with HTC Sense 4.0+. This is because HTC have constructed their files in a different way to the Android norm and aren't letting people outside the company know how they did it.
TMA also has problems with stock Asus Transformer apk's. BUT there is a fix! Click on this post here to find out what to do. Many thanks to allan1313 for this.
Some apks come with "drawable-ldrtl" folders that apktool currently can't deal with. Unless you read from right to left, you can safely just delete those folders.
There will be some devices/roms that are unable to use the zip files TMA creates and you'll be given an error code:0. This is down to the update-binary and can be easily fixed.
Take the update-binary from a working zip file and place it in the 'user_files\UPDATEBINARY' folder. Use Option 4 in the settings menu and all future zips will use your update-binary. Easy!
​
How to use this : Please see this guide here.I can't copy each and every step as it is too long. http://forum.xda-developers.com/showthread.php?t=1633333​
Downloads : (112.08 MB) - http://www.mediafire.com/download/z9zewr14697nj8w/TickleMyAndroid+v7.1.exe​
Original Thread : http://forum.xda-developers.com/showthread.php?t=1633333​
Credits ;
Ticklefish
Click to expand...
Click to collapse
​

[Treble][RIL] Qualcomm device and in-call audio not working? Check this out

Hello,
After a few weeks of having Project Treble GISs running in my Razer Phone, I had one big issue to solve, and that was the in-call audio. I stumbled upon a few people in #phh-treble Telegram group that suggested me to use ZUK (MSM8996) patches to get it to work, but unfortunately they weren't fully working... because of a missing apk from my device's stock image (which I didn't know until 2 or 3 days ago). Starting from there, I worked on it quite a lot of time until almost giving up, to then finally getting it to work just now.
Steps I followed:
1. Pull from your device's stock image the following files (they may not be in /system and instead be located in /vendor, depends on your OEM's Treble implementation)
- app/QtiSystemService
- app/QtiTelephonyService
- framework/qcrilhook.jar
- framework/QtiTelephonyServicelibrary.jar
- etc/permissions/privapp-permissions-qti.xml
- etc/permissions/qcrilhook.xml
- etc/permissions/qti_permissions.xml
- etc/permissions/telephonyservice.xml
- priv-app/qcrilmsgtunnel
2. Fortunately, those APKs will contain a .dex inside of them, but in case they didn't, you'd need to first deodex your rom based on the vdex files located in /system/framework/oat. However, the jars will definitely and for sure won't have the inner .dex classes. You'll need to use a tool such as vdexExtractor to get the final .dex files for qcrilhook.jar and QtiTelephonyServicelibrary.jar. Then, open the metioned .jar's as zip files, embed the .dex inside and done.
3. The tricky part comes now: With a tool such as APKTool, decompile the qcrilmsgtunnel.apk file you've extracted from your Stock ROM image. I'm not going to go throught the steps to perform that. Now, open up the AndroidManifest.xml and find the line:
Code:
<uses-library android:name="[email protected]" />
and replace it with
Code:
<uses-library android:name="[email protected]" android:required="false" />
Recompile the apk and, without signing it yet, put it in a safe place.
4. Open up the other APKs and remove the META-INF folders from inside of them (the signatures). Now, download a copy of SignAPK and sign every apk (including the ones we've removed the signature from, plus the modded version of qcrilmsgtunnel.apk with the platform keys (platform.*) from Android AOSP.
You can do so by using the following command:
Code:
java -jar /path/to/signapk.jar /path/to/platform.x509.pem /path/to/platform.pk8 NameOfTheApk.apk NameOfTheApk_signed.apk
5. Open up the files qcrilhook.xml and telephonyservice.xml and ensure that the file="" path points to /vendor. i.e:
Code:
file="/vendor/framework/qcrilhook.jar"
6. Move the files to your device according to this table:
- app/QtiSystemService -> /system_root/system/app/QtiSystemService (replace)
- app/QtiTelephonyService -> /system_root/system/app/QtiTelephonyService (replace)
- framework/qcrilhook.jar -> /vendor/framework/qcrilhook.jar (delete the original file wherever you found it)
- framework/QtiTelephonyServicelibrary.jar -> /vendor/framework/QtiTelephonyServicelibrary.jar (delete the original file wherever you found it)
- etc/permissions/privapp-permissions-qti.xml -> /system_root/system/etc/permissions/privapp-permissions-qti.xml (delete the original file wherever you found it)
- etc/permissions/qcrilhook.xml -> /system_root/system/etc/permissions/qcrilhook.xml (delete the original file wherever you found it)
- etc/permissions/qti_permissions.xml -> /system_root/system/etc/permissions/qti_permissions.xml (delete the original file wherever you found it)
- etc/permissions/telephonyservice.xml -> /system_root/system/etc/permissions/telephonyservice.xml (delete the original file wherever you found it)
- priv-app/qcrilmsgtunnel -> /system_root/system/priv-app/qcrilmsgtunnel (replace)
Reboot and profit.
Nice job now maybe the devs can add it to their rom.a little lengthy and out of my league to try
Of course this is not a final solution @gillim74.
But if the mentioned Qcomm apks or jar libs aren't present in the device's vendor partition (which I bet they aren't), the steps of decompiling them, and placing them into vendor is still needed, even for GSI's that include the patch.
What ZUK patch? I got a ZUK Z2 with treble rom and calling is not working.
Where can i get the patches?
andreas951207 said:
What ZUK patch? I got a ZUK Z2 with treble rom and calling is not working.
Where can i get the patches?
Click to expand...
Click to collapse
https://github.com/zuk-devs/android_vendor_zuk/commit/9ab51560c8d5632a08bdb949bd433909b8db5752
great explanation
linuxct said:
Hello,
After a few weeks of having Project Treble GISs running in my Razer Phone, I had one big issue to solve, and that was the in-call audio. I stumbled upon a few people in #phh-treble Telegram group that suggested me to use ZUK (MSM8996) patches to get it to work, but unfortunately they weren't fully working... because of a missing apk from my device's stock image (which I didn't know until 2 or 3 days ago). Starting from there, I worked on it quite a lot of time until almost giving up, to then finally getting it to work just now.
Steps I followed:
1. Pull from your device's stock image the following files (they may not be in /system and instead be located in /vendor, depends on your OEM's Treble implementation)
- app/QtiSystemService
- app/QtiTelephonyService
- framework/qcrilhook.jar
- framework/QtiTelephonyServicelibrary.jar
- etc/permissions/privapp-permissions-qti.xml
- etc/permissions/qcrilhook.xml
- etc/permissions/qti_permissions.xml
- etc/permissions/telephonyservice.xml
- priv-app/qcrilmsgtunnel
2. Fortunately, those APKs will contain a .dex inside of them, but in case they didn't, you'd need to first deodex your rom based on the vdex files located in /system/framework/oat. However, the jars will definitely and for sure won't have the inner .dex classes. You'll need to use a tool such as vdexExtractor to get the final .dex files for qcrilhook.jar and QtiTelephonyServicelibrary.jar. Then, open the metioned .jar's as zip files, embed the .dex inside and done.
3. The tricky part comes now: With a tool such as APKTool, decompile the qcrilmsgtunnel.apk file you've extracted from your Stock ROM image. I'm not going to go throught the steps to perform that. Now, open up the AndroidManifest.xml and find the line:
Code:
<uses-library android:name="[email protected]" />
and replace it with
Code:
<uses-library android:name="[email protected]" android:required="false" />
Recompile the apk and, without signing it yet, put it in a safe place.
4. Open up the other APKs and remove the META-INF folders from inside of them (the signatures). Now, download a copy of SignAPK and sign every apk (including the ones we've removed the signature from, plus the modded version of qcrilmsgtunnel.apk with the platform keys (platform.*) from Android AOSP.
You can do so by using the following command:
Code:
java -jar /path/to/signapk.jar /path/to/platform.x509.pem /path/to/platform.pk8 NameOfTheApk.apk NameOfTheApk_signed.apk
5. Open up the files qcrilhook.xml and telephonyservice.xml and ensure that the file="" path points to /vendor. i.e:
Code:
file="/vendor/framework/qcrilhook.jar"
6. Move the files to your device according to this table:
- app/QtiSystemService -> /system_root/system/app/QtiSystemService (replace)
- app/QtiTelephonyService -> /system_root/system/app/QtiTelephonyService (replace)
- framework/qcrilhook.jar -> /vendor/framework/qcrilhook.jar (delete the original file wherever you found it)
- framework/QtiTelephonyServicelibrary.jar -> /vendor/framework/QtiTelephonyServicelibrary.jar (delete the original file wherever you found it)
- etc/permissions/privapp-permissions-qti.xml -> /system_root/system/etc/permissions/privapp-permissions-qti.xml (delete the original file wherever you found it)
- etc/permissions/qcrilhook.xml -> /system_root/system/etc/permissions/qcrilhook.xml (delete the original file wherever you found it)
- etc/permissions/qti_permissions.xml -> /system_root/system/etc/permissions/qti_permissions.xml (delete the original file wherever you found it)
- etc/permissions/telephonyservice.xml -> /system_root/system/etc/permissions/telephonyservice.xml (delete the original file wherever you found it)
- priv-app/qcrilmsgtunnel -> /system_root/system/priv-app/qcrilmsgtunnel (replace)
Reboot and profit.
Click to expand...
Click to collapse
Hi
It seems to be a great work.
For me in resurrection remix 8.1 in call audio is working, but music sound over Bluetooth isn't working. Do you've got any ideas?
Please could you share your modified files for in call fix?
Thanks in advance
Thread dead?
No more updates?
Laptapper said:
No more updates?
Click to expand...
Click to collapse
This has already been implemented into phh's gsi repo. I have no clue what you expect from this thread anymore.
linuxct said:
This has already been implemented into phh's gsi repo. I have no clue what you expect from this thread anymore.
Click to expand...
Click to collapse
Thanks, but even as before there are problems with Bluetooth in call and/or audio as before on a couple of devices....
Does somebody know if this fix has been included in some ROM? I don't know which ROM to try as GSI on my Razer Phone
guillermohs9 said:
Does somebody know if this fix has been included in some ROM? I don't know which ROM to try as GSI on my Razer Phone
Click to expand...
Click to collapse
I said it literally 2 posts ago.
linuxct said:
This has already been implemented into phh's gsi repo. I have no clue what you expect from this thread anymore.
Click to expand...
Click to collapse
IT IS implemented in all new, recently built GSIs. Just try any.
linuxct said:
I said it literally 2 posts ago.
IT IS implemented in all new, recently built GSIs. Just try any.
Click to expand...
Click to collapse
damn, my bluetooth calling still doesn't work on any GSI i try.
knives of ice said:
damn, my bluetooth calling still doesn't work on any GSI i try.
Click to expand...
Click to collapse
Yeah bluetooth calling on Qualcomm devices is still a no-go.
There is a bounty for it: https://github.com/phhusson/treble_experimentations/issues/374
phhusson said:
Yeah bluetooth calling on Qualcomm devices is still a no-go.
There is a bounty for it: https://github.com/phhusson/treble_experimentations/issues/374
Click to expand...
Click to collapse
ok, I'm glad I'm not alone. AndroPlus posted in your bounty thread on github as well and he maintains the GSI based build for my device the mi mix 3. for most people bluetooth calling does work with his fix, but for me it does not. i will contribute to the bounty as well.
nice work bro but can you make a video to explain the way?
I have this problem in the Qualcomm j4 core msm8917
So I have a Qualcomm device(SD845 in an AGM X3), in-call audio and bluetooth calling work great but main audio does not work at all. I can force sound to route through the in-call speaker, but not really viable.
Any chance following this guide would help? Are there other files I should include since my issue is not in-app calling.
My device will not boot past v123, so if this has been resolved in newer releases unfortunately I can't install.
I tried building an overlay. I followed the method in the guide from phh as well as from a post on XDA. First few attempts broke boot but when I finally got an overlay build to boot it did not resolve problem.
So, would trying this route be worth a shot?
9.0 otherwise runs flawlessly on this device. Sound and MTP are the only things broken. Fingerprint reader is detected as volume down, but I don't use it anyway. It's very stable.

Tried to add new language to my phone (OnePlus) but failed. Need some help.

Hi!
So I got my new phone (OnePlus 5T) and I wanted to add a language from my previous phone (Samsung).
I followed instructions in this blog (sorry url was redacted, will try to paraphrase it here: elmurod(dot)net/en/index(dot)php/archives/421 and I got to end (successfully), but when system restarted it wouldn't start. After about 5 minutes it restarted again and put me into recovery mode.
Step that I did to get there: (same steps as in the blog)
1. Get Samsung framework-res.apk
- decode to get res/*
- extract Irish language (values_ga and values_ga_rIE folders)
2. Get my phones OnePlus 5T framework-res.apk
- decode to get res/*
- added langauge directories
- encoded into framework-res_new.apk
3. Extracted resources.arsc from framework-res_new.apk and copied it into old framework-res.apk (to keep all the signatues, so that I don't need to sign)
4. Connected to phone with su (phone is rooted), made /system writable (rw,remount) copied the modified framework-res.apk to /system/framework replacing the file there
5. Restart the phone
Now according to instruction this should have worked, but like I said my phone just waits and then resets into recovery mode.
Two things I would like to point out here... my phone OnePlus 5T is Android 8.1 and Samsung was 8.0, so files are little bit different... My translation has some keywords that are not in english strings.xml and vice versa. Could this be the problem?
Any help would be appreciated (I am very new to whole hacking the android thing)...
Andy

[AOSP][9][no root] SystemUI RRO overlay not taking effect

I'm trying to change some SystemUI resources through Runtime Resource Overlay/Overlay Manager Service, so I made an apk containing only resources.arsc and installed that apk in /vendor/overlay/ . I even made sure to manually update the idmap of this overlay, match owner, group and permissions, but, after rebooting from recovery to system, the overlay simply isn't applied.
The strange thing is that I made another overlay for framework-res (target: android) and it works perfectly, as expected.
My phone is on a custom ROM (Pixel Experience, Pie) and is not rooted.
Have you run into this issue? How do you think I can solve this?
Thanks =)

Modifying framework.jar which is inside boot.oat

I pulled down `boot.oat` from an API22 Android phone. It's Android 5.1 Lollipop which brought the change from Dalvik to ART and is a bit mistified (at least for me).
To make it exact this is from an old Xperia Z Ultra (factory ROM, nothing is/was customized).
As far as I understand, modifying boot.oat is not easy, and permanent, as this file is regenerated every time whenever a package installation/deinstallation is happened.
I need to modify a class which resides in `framework.dex` which I found in `boot.oat` (/system/framework/arm/boot.oat).
I have several questions I don't really understand:
1.) I have `framework.jar` in /system/framework, but it's size is 309 bytes, contains only manifest.mf. Does this file has any correlation to `framework.dex` in `boot.oat`?
2.) What is `boot.art`? It was not needed to deodex `boot.oat`.
3.) How can I properly put back my modifications to `boot.oat`? (Can I brick the device by providing a wrong `boot.oat`? Or- as it can be regenerated after package changes, it will also be simply regenerated if it's invalid?)
4.) How can I make my change permanent, i.e. survive boots, package installations, etc (in general boot.oat regeneration)?
Thanks for reading folks!

Categories

Resources