[Q] Add Stock ServiceMenu.apk (*#*# 7378423#*#*) to CM? - Xperia Z3 Q&A, Help & Troubleshooting

Hi Guys,
I was wondering if anyone had figured how to bring Sony's stock ServiceMenu.apk to work in CM or other custom ROMs that don't have it?
ServiceMenu (*#*# 7378423#*#* from dialer on stock ROM) is very handy for battery test, GPS test, Compass test and calibration, all the Sony device-specific hardware tests.
I tried to make a recovery-flashable zip by extracting ServiceMenu.apk from stock ROM but it doesn't install. I did more searching to find it also depends on files in /system/etc/permissions and /system/framework so I also added those to the zip, but still fails to install.
Can anyone with better experience chime in? I think a flashable Sony ServiceMenu.apk zip would be useful for every custom ROM on Sony devices.
So far I'll attach my zip which puts all the files where they should be, but App does not install. Signing problem? Odex problem? Please any ideas

Related

Replacing framework-res.apk on Stock Android 4.1.1

Hi all -
I'm using a GSM Galaxy Nexus with stock Android 4.1.1, and I'm trying to reduce the dim level, which kills my eyes at night. This is determined by a value "config_screenBrightnessDim" found in framework-res.apk. (In the source tree, it is found at frameworks/base/core/res/res/values/config.xml.)
I tried using apktool to decompile/recompile the stock framework-res.apk, but it doesn't seem to work with Jelly Jean. So, I instead attempted to replace the stock framework-res.apk with one I compiled from AOSP. When I do this, I get stuck at the boot animation. I assume this has something to do with the fact that my AOSP framework-res.apk is signed with a different certificate than the stock one. However, I also noticed that my AOSP file was ~10MB, while the stock one is only ~9.8MB, so there could be some other issue.
Any help with this would be greatly appreciated. Thanks!
(PS: Another modification I made was successful: I replaced the stock audio.primary.tuna.so with one I built from AOSP with a higher maximum volume. So, I think I am at least replacing the files correctly!)
Don't sign the framework file. Leave it unsigned and just move the cert from the stock framework. Also I would be interested in your audio boost file if you wouldn't mind sharing.
Sent from my Galaxy Nexus using Tapatalk 2
Thanks for the advice –*I'll try it out. I'll "unsign" my framework-res.apk by removing all the META-INF files in it. If it doesn't work, do you know a way to find the logs from the failed boot? Also, is there anything I should do (wipe cache, etc) after copying over the new framework-res.apk?
I've attached a zip containing three versions of the library audio.primary.tuna.so, found at /system/lib/hw/audio.primary.tuna.so: orig, loud, and aosp. "orig" was pulled from my phone with stock 4.1.1, "aosp" was built from aosp (the command you need is "make audio.primary.tuna"), and "loud" was made from aosp with the "device/samsung/tuna/audio/audio_hw.c" file altered to change the volume. Enjoy!
Geo411m said:
Don't sign the framework file. Leave it unsigned and just move the cert from the stock framework. Also I would be interested in your audio boost file if you wouldn't mind sharing.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
This worked! Thanks so much!
Great! Glad it worked for you. Also thanks for the Audio file.
How do you build just framework-res.apk from AOSP?
I've followed a tutorial and built the whole system, but I don't know where fraemwork-res.apk is built from in the source or how to only build it.
Edit:
figured out to build specific packages:
make (package name)
...omg
If you figure out how to use a framework-res.apk built from AOSP to replace one on the stock rom, let me know. I never did get that method to work.
michaelmotes said:
How do you build just framework-res.apk from AOSP?
I've followed a tutorial and built the whole system, but I don't know where fraemwork-res.apk is built from in the source or how to only build it.
Edit:
figured out to build specific packages:
make (package name)
...omg
Click to expand...
Click to collapse
There are some (most) things that you can modify in framework-res.apk and just copy over the old META-INF.
There are some things (like AndroidManifest.xml) that you can not modify and use the old META-INF.
The most radical solution is to resign your entire system with a new signature.
If the particular APK (not FW-R) does not use a sharedid, you might get away with just signing that.
(The above observations might be different on different versions Android.)

Need a stock 4.0.4 audio_effects.conf

Hi I'm unable to apply the OTA update from 4.0.4 to 4.1.1 due to a status 7 error on /etc/audio_effects.conf.
I've installed beats audio which seems to be causing the problem, ideally I'd like to remove it and revert the audio to stock but I cant find any information on how to do that, can anybody shed some light on whether its possible to revert beats, if not could somebody provide me with a copy of their audio_effects.conf file from a stock ICS build.
Regards
Burgershot
burgershot said:
Hi I'm unable to apply the OTA update from 4.0.4 to 4.1.1 due to a status 7 error on /etc/audio_effects.conf.
I've installed beats audio which seems to be causing the problem, ideally I'd like to remove it and revert the audio to stock but I cant find any information on how to do that, can anybody shed some light on whether its possible to revert beats, if not could somebody provide me with a copy of their audio_effects.conf file from a stock ICS build.
Regards
Burgershot
Click to expand...
Click to collapse
attached
Thanks a million Ironia.
That got me past that file, now I need /system/lib/libSR_AudioIn.so do you have that as well?
I'm still unable to find a list of stock files that beats modifies so if, after reverting this file, I still have others to find I'll concentrate my efforts on extracting the contents of a stock ICS image. Right now the unyaffs.exe crashes when I try.
Thanks again
Your best bet is to fastboot flash system.img and boot.img from Google's factory images.
i quote rasengan82 , but anyway attached
up to you

How to changeout camera apk in roms.

I'm interested in flashing the Sabsa Prime rom, http://forum.xda-developers.com/showthread.php?t=1839004 , but there are currently reported issues with the camera not working correctly. It's said (by the dev himself) that you can change the current camera apk with a previous one but I'm not exactly sure how to do this. I already have the camera.apk from the earlier version that works great, can I just extract the current rom and replace the camera.apk with the working one and rezip it as a .zip file and flash it? Or would I need to do something else to make it flashable or a different step all together? Thanks!
That sounds about right. Just keep the originals in case there are additional steps. Flash and test.
However, using that other cam apk, if it's the one I'm thinking, not sure if it's allowed. For personal use without re-distributing it, maybe but not quite sure.
Sent from a dream.
Unzip replace and rezip. I do this with all roms I use. There are apks I like to add and delete as well as system audios and bootani. You can alter the rom to your liking just remember not all apks work for a rom in other words you can not use sense apks on a aokp rom for example. And second if you do alter a rom you can not ask the Dev for help if something goes wrong with it, you altered it. With that said alter at your own risk and enjoy the learning.
Sent from my Ice Cold Inspire 4G

[Resolved] Help Creating a Flashable Zip for AOSP MMS (5.0)

Before the eye rolling starts, please note i've Googled and searched for a solution on XDA extensively, with very little help concerning creating a flashable Zip file for Lollipop. Most of the guides and results dealt with KK and lower...
I'm attempting to create a flashable zip for the modified version of the Lollipop AOSP MMS app (located here: https://www.androidfilehost.com/?fid=95832962473398790). I've done this in the past with Jellybean and KitKat, but this time the app, for whatever reason just simply won't flash. No errors come up in recovery, but upon reboot, the app won't be installed.
I've concluded that the reason the app won't flash is the way I have my flashable zip structured.... Or the Updater Script is written wrong.. I've had this problem in the past and rectified it by placing the corresponding META-INF file into the apk itself before placing it in a flashable zip, but this hasn't fixed the issue this time around. The apk in the link above installs itself into the following directory when installed using a file explorer:
Code:
/data/app/com.android.mms-1
If I place the modified apk into the same exact directory in a flashable zip (along with the META-INF folder). An example of what I've done can be downloaded Here, for those interested in dissecting the zip. The only difference is the apk loaded in that zip is the original apk that I know works, not my modified one, as it isn't complete yet.
For reference, I took a look at the CM12 Gallery flashable zip which installs itself in this directory:
Code:
/system/app/Gallery2
Please note that the apk decompiles and recompiles with no issue, so unless APKtool (newest version) screws something up without throwing an error, I doubt that's the issue.
Really need some guidance on this one. I'm excited to see what I can do with this MMS app as I have done in the past with the KK AOSP MMS application. Any help would be greatly appreciated.
Resolution:
I've constructed a perfectly functioning flashable zip (not the ones above) after a few more trial runs. The problem actually seems to be with Apktool not compiling or decompiling the apks correctly. Basically the problem is APKtool.

[Q] How to create a Google Apps flashable zip from the stock ROM ?

From CM Gapps page it says
It is possible to perform a "backup" of the Google Apps on your device and then "restore" them, but this does take additional steps which are not covered here.
Click to expand...
Click to collapse
I'd like to know how can I do this.
I've searched all across the forum but had no luck. It looks like some kind of trade secret.
I know that it's not just a matter of pulling the apk files. Because I can see that the zip has .apk, .jars, .so, configuration and certificate files.
I'm guessing this is done by extracting the files from a system.img.
But how is this done?
Is there some script available to build a gapps zip from a system.img file?
Another thing is that my OnePlus phone doesn't has an official LP update yet (although CM12 and their gapps work fine) so I suspect this would have to be done using the stock ROM of another device, maybe a Nexus. Is this correct?
Any help is appreciated.
Thanks

Categories

Resources