Would it cause problems to remove the audio resources from the Samsung Camera apk? - Samsung Galaxy S9+ Questions & Answers

The Samsung Camera app doesn't give you an option for silent operation.
Yes, it's a workaround to mute your phone first, but it adds another step - which can be a problem if you're capturing a fleeting moment, and you're trying to not intrude.
The audio files are located within the SamsungCamera.apk file in \res\raw.
Would it cause any problems or malfunctions to delete those audio files, re-zip the apk and replace the original with the modified one? Would the app handle the missing resource gracefully?
If this is possible, is there anything else I need to do other than delete these files?

It would be better to copy the Audio-Files, edit it on the PC (Mute) and replace the files inside the APK. Then everything should work fine. (The phone will play the Audio, but there is no Sound in the file)
But the problem is, that you cannot update an System-App without root

profi_fahrer said:
It would be better to copy the Audio-Files, edit it on the PC (Mute) and replace the files inside the APK. Then everything should work fine. (The phone will play the Audio, but there is no Sound in the file)
But the problem is, that you cannot update an System-App without root
Click to expand...
Click to collapse
That's an excellent idea. And I have root, so that won't be a problem.
Thanks!

Related

Sound Recorder (.amr) app not working, permission issue

hi guys,
i have a problem with the app Sound Recorder (stock and from market), they cannot write properly my file system apparently, i have root and i changed permissions recently on the file system for other things.
stock soundrecorder gives me "cannot access SD card"
and another one tells me "unable to access file system"
i can find the files on the sd card (so looks like they are recorded) though when i click for opening there's no way to open them, i can use another app, as long as it doesn't write an .amr file.
i think the problem is either permissions on the SD card or codecs related, is there a way to check that permissions are ok AND to reinstall stock audio codecs like we do on windows for example?
i opened the .amr file with another app from market and they had an awful background noise though, so i think it's 90% codecs related.
thanks
gabrio
I got this problem before. It is due to stagefright being enabled. disable it in build.prop in system.
media.stagefright.enable-player=false
wizagg said:
I got this problem before. It is due to stagefright being enabled. disable it in build.prop in system.
media.stagefright.enable-player=false
Click to expand...
Click to collapse
thanks, checked but i already it on "false"

[Q] FC using keyboard when pushed to system

Hey there, I have an xperia S running rooted stock 4.1.2 jellybean, and I'd like to install a keyboard from the playstore as a system application. The keyboard works fine when installed from the playstore, but when I push it to system (and set the permissions properly) it just force closes and does not work at all.
I've pushed various other apps from the playstore into system and they have worked without fault. Is there something finicky with installing keyboards from the playstore as system applications?
Any help would be appreciated, thanks.
open the apk and copy all lib files to your system lib and reboot,done.
-CALIBAN666- said:
open the apk and copy all lib files to your system lib and reboot,done.
Click to expand...
Click to collapse
Hey, thanks for the answer. I actually have no idea how to grab all the libraries from an apk. Any chance you could give me a rundown on how to do it?
So I realise now that "opening" the apk is as simple as changing the extension to zip and opening it like a normal archive. The apk does not contain and libraries, however. Is there any other way to get it to work?

[Q] How should I de/recompile a system app? What did I do wrong?

Hi,
So the situations is like this:
Just got a new LG Nexus 4, NFC enabled, GREAT!!!!
But then I start using it, and the NFC sound (everytime the phone reads a nfc-tag it makes an sound) annoys me beyond belief.
So I start looking around, it seems there's no solution, except recompiling the app.
So I learn how to compile an app (noob here), using this guide: http://forum.xda-developers.com/showthread.php?t=1860115
I'm up to the point where my apk is decompiled, and I have modified the sound files, located in my decompiled files folder respectively at res/raw/start.ogg & res/raw/end.ogg.
I modded the files using audacity, lowering the volume to zero, used them to replace the original .ogg files. The file size is a bit smaller as the original ones (1Kb difference).
Next I use the recompile command: apktool b decompiled_apk_folder_with_modified_files modded_apk_file.apk
So now I have the new nfc apk file, called NfcNci.apk, with which I replace the original file in /system/app.
Next up I reboot my phone into recovery, wipe all cache and dalvik cache, and reboot again.
First thing that pops up on my screen is a force-close message, saying that the nfc-service force closed.
Anyone who can tell me what I did wrong? Or how I can fix this?
Attached are: my decompiled-files-folder (compressed to zip)
the original NfcNci.apk file
my modded NfcNci.apk file which causes the FC's.
Any help will be greatly appreciated!!!!
S.
Looks like you're still on 4.2
The latest NfcNci.apk has some more files.
And your apk is missing the META-INF folder.
I guess that this is the problem.
But you should use "adb logcat" to ensure we're on the right track.
Micky
1 thing i would recomend is not using the actual apk you just built. instead, open your new apk with a file manager such as 7zip and remove your newly compiled files out of it, then put them into the original apk from your rom using 7zip as well! thus keeping the apk's original signature
try to copy the least amount of files from one to another, so to be safe only pull out your new .ogg files, then put them into your original apk! hope this helps
ldrifta said:
1 thing i would recomend is not using the actual apk you just built. instead, open your new apk with a file manager such as 7zip and remove your newly compiled files out of it, then put them into the original apk from your rom using 7zip as well! thus keeping the apk's original signature
try to copy the least amount of files from one to another, so to be safe only pull out your new .ogg files, then put them into your original apk! hope this helps
Click to expand...
Click to collapse
Hi, I tried this, installed 7zip, and double clicked the original apk, I opende the res/raw/ directory, and only copied the files I was using: start.ogg & end.ogg. Then I close 7zip, and send the file to my phone. But as soon as I it them to /system/apps on my phone, and reboot to recovery, wiping the dalvik cache. I get FC's on reboot (NFC-service has FC'd).
Any reasons for this?
Thanks for the help, both of you!
BTW: I'm on Android 4.3 JB

[Q] How to disable Sony xperia tablet z startup sound?

Could anybody help a newbe to disable the annoying startup sound I got after system update? Does deleting the sound file help? If so what is it called and how to access it?
katjah said:
Could anybody help a newbe to disable the annoying startup sound I got after system update? Does deleting the sound file help? If so what is it called and how to access it?
Click to expand...
Click to collapse
The sound file bootanim.mp3 is inside the tablet's bootanimation.zip file. To stop the sound file from playing, you will need to either modify the existing bootanimation.zip file or replace it with a bootanimation.zip file that does not include a sound file. Also, if you turn down the tablet's volume before powering off the tablet, the sound will be muted when the tablet is powered on.
I have encrypted my tablet so I get the startup sound twice. By muting the volume I get rid of the last one but not the first. I found the bootanim.zip file with a root explorer but was not able to modify it anyway. I tried to delete or rename the zip file and the mp3 file without success. Do you guys use any specific tool to do that? Do I have to root my tablet in order to do that?
katjah said:
I have encrypted my tablet so I get the startup sound twice. By muting the volume I get rid of the last one but not the first. I found the bootanim.zip file with a root explorer but was not able to modify it anyway. I tried to delete or rename the zip file and the mp3 file without success. Do you guys use any specific tool to do that? Do I have to root my tablet in order to do that?
Click to expand...
Click to collapse
Yes, you will need root access to be able to modify the bootanimation.zip file. You can learn how to work with boot animation files and what tools you will need by searching XDA Developer forums and the Internet for tutorials like THIS ONE and THIS ONE.
Cat McGowan said:
Yes, you will need root access to be able to modify the bootanimation.zip file. You can learn how to work with boot animation files and what tools you will need by searching XDA Developer forums and the Internet for tutorials like THIS ONE and THIS ONE.
Click to expand...
Click to collapse
Thanks for your help. Will try that.

Parse error after editing apk's on samsung marshmallow devices

Heya,
A while ago, my phone, which is a samsung A3 from 2015, got an update to marshmallow.
That's cool ofcourse and it runs awesome! but I like when my phone has a nice, clean and organized system and Samsung does not do that for all apps.
What I mean is that
- Some apps are odexed, and some apps are not AND some apps are odexed, but the apk file still contains a classes.dex file.
- Some apps have a folder with libs inside the app directory, and some have this folder inside the apk file AND some have this folder inside both
So ideally, i would like all apps to follow the same structure ofcourse, which would be no classes and lib files inside the apk, and then separate oat and lib folders containing the odexes and libs.
In lollipop this was easily done by copying these files out of the apk and putting them in separate folders, then removing them from the apk itself. My phone accepted this, the apps would run as though nothing had happened and it made me feel happy
However now that i'm on marshmallow, everything i do to an apk to change it results in getting a parsing error with that apk, after which it either becomes very fragile or completely broken.
One way I have found to get around this so far is to resign the apk, but for a lot of apps resigning it makes android ignore the app completely.
So the question is...
Is there something I can change somewhere to make marshmallow act like lollipop in these cases and not care that i removed files from apk's in an attempt to odex or delib them?
Any help would be much appreciated
Further info
- I have also noticed this on an S5 / SM-G900F running marshmallow
- I have not tested this on aosp or lineage because there are no suitable roms for my phone to test this with, and I would not want to use them over stock anyway.
- I have not run into this before marshmallow, it was always fine with me editing apk's like this in older versions of android.
- I am not ready to get over my ocd and accept this :crying:
No one? I suppose it is a really tough question.
So I got around the duplication of lib files by putting the actual libs in the appname\lib\arm folder and then placing zero length lib***.so placeholder files inside the apk.
this somehow keeps the apk intact and does not cause a parse error and makes the app work as it should, even across data wipes, reboots, backups and restores.
putting zero length classes.dex files inside the apk however doesn't work. Although this also doesn't cause a parsing error, the app actually tries to transform the empty classes into dalvik cache and then it breaks.
I'm still open to better suggestions

Categories

Resources