[Q] Choose Specific App Install Path - Android Q&A, Help & Troubleshooting

Hi
I'm trying to move my security software apk file to the /system/app folder to make it hard reset proof. I renamed the original apk which is in the /data/app folder. I then copied the file to the /system/app folder and renamed it to the original filename. I then installed the apk, chose replace. What happend was that the app created another apk in the /data/app folder this time with a "2" behind it.
I'm guessing the apk has code in it that tells it to install there. So what I was wondering, can I set a specific default install directory, install the apk and then return it to default?
or
Where do the file go after the apk is ran, the program isn't ran by the apk because when you try and run it, it just asks to install it, not open the program. Could I move the actual app files and edit the install path in where the os stores the list of installed apps and there paths (where ever that is?)?.

Related

Vlingo widget doesn't work after modifying image

Hi all,
I've modified the background and button images for the Vlingo widget, re-signed the apk, and installed. The application itself works great, and the widget shows on the screen, but nothing happens on press. Could this be because I deleted the original META_INF folder (the re-sign batch re-creates that)? Not sure what else could be causing this.
Process:
Download fresh copy of Vlingo.
Pull the apk to my PC.
Extract contents to folder.
Modify appropriate images.
Zip all files back up.
Rename to .apk.
Use sign batch file, which creates another .apk.
Rename that new .apk to com.vlingo.client.apk.
Use adb to install the new apk.

[Q] How to get back AllShare Play

Hello
How can i get back "AllShare Play" for my Galaxy S3? I installed another firmware and a rom and don't really know when it was deleted. I tried to find a solution but I couldn't find anything to solve the problem.
Cance
Go find a Stockish Rom that still has the bloatware........and just extract the System/app folder and put the apks that you want back into your current system/app folder.
Yeh useful tools are bloatware
Thanks for the fast answer but I don't know how to extract the folder when I have a ROM with the needed APK. Can I do this on my computer or do I have to do this on my phone?
Download the Rom to your phone or Computer.
Extract the Rom using a File explorer on your phone or a 7zip/winzip program on your PC and go through the folders...Find the
System/App folder it will be filled with every system app you can need......pick out the apks you want to add into your current set up.
save them to a folder and put them back on your phone....or if on your phone just copy them from the extracted location and navigate back to your Local System/App folder, make the Folder R/W so you can add and remove the system files.....and just paste them back in your current system folder overwriting the current ones. and set the premission to match the rest of the folder most of the time i think its rw-r-r
and reboot. sounds long.....but it only takes me 2 min to copy and replace the files and reboot.
its really simple once you do it a couple times.
hope this helps
Thank you very much, didn't know that it is this easy. I never opened the zip file of a rom ^^
What's the name of the apk? I don't see an obviously named app?

[SOLVED] Edit .ogg in camera.apk

I have a rooted Galaxy M Style phone with stock Gingerbread 2.3.4 firmware. I am trying to customize my stock camera app, but am not sure what I'm doing wrong. I plan to replace the autofocus_ok.ogg with a different tune from my phone. I checked the properties of the autofocus_ok.ogg and saw it's a mono, 44100hz, and 96 bitrate file. The tune that I have has the same properties. So this is what I have done so far:
I backed up camera.apk to /system/app/camera.apk.bak and the camera.odex to /system/app/camera.odex.bak. I left a copy of camera.odex in /system/data. I copied the camera.apk to my memory card and placed the file on my computer. I renamed the file to a .rar. I then deleted the autofocus_ok.ogg and placed the tune that I wanted in that directory. Then I renamed it to autofocus_ok.ogg. I renamed the file back to .apk and transferred the file back to the memory card, then over to /system/app. The camera app will not install/not showing up on my phone. I am transferring the files through root explorer on my phone.
I worked with the original apk file again with apktool. I was able to decompile and replaced and renamed the files that I needed again. I compiled the file and transferred the file to /system/app again, but the apk will still not install. I checked the complied apk file and noticed that the file didn't have the META-INF folder, so I copied that over to. Tried to install it again by copying the file to /system/app, but it still won't show up on my phone. Is there anyway for me to change the autofocus_ok.ogg without a custom rom?
Thanks.
ImAhNoBoDy said:
I have a rooted Galaxy M Style phone with stock Gingerbread 2.3.4 firmware. I am trying to customize my stock camera app, but am not sure what I'm doing wrong. I plan to replace the autofocus_ok.ogg with a different tune from my phone. I checked the properties of the autofocus_ok.ogg and saw it's a mono, 44100hz, and 96 bitrate file. The tune that I have has the same properties. So this is what I have done so far:
I backed up camera.apk to /system/app/camera.apk.bak and the camera.odex to /system/app/camera.odex.bak. I left a copy of camera.odex in /system/data. I copied the camera.apk to my memory card and placed the file on my computer. I renamed the file to a .rar. I then deleted the autofocus_ok.ogg and placed the tune that I wanted in that directory. Then I renamed it to autofocus_ok.ogg. I renamed the file back to .apk and transferred the file back to the memory card, then over to /system/app. The camera app will not install/not showing up on my phone. I am transferring the files through root explorer on my phone.
I worked with the original apk file again with apktool. I was able to decompile and replaced and renamed the files that I needed again. I compiled the file and transferred the file to /system/app again, but the apk will still not install. I checked the complied apk file and noticed that the file didn't have the META-INF folder, so I copied that over to. Tried to install it again by copying the file to /system/app, but it still won't show up on my phone. Is there anyway for me to change the autofocus_ok.ogg without a custom rom?
Thanks.
Click to expand...
Click to collapse
erm... is the permissions set correctly rw-r--r-- ?
MoonBlade said:
erm... is the permissions set correctly rw-r--r-- ?
Click to expand...
Click to collapse
Yup, permissions were set correctly like rw-r--r--. Owner is root:root. Those are the permission that I set on the apk file like they were on the original file. I just realized that the compiled apk's from apktools doesn't show up on my phone. The apk that I created by opening up winrar and just replacing the .ogg files do show up, but I get the error "The application Camera (process com.sec.android.app.camera) has stopped unexpectedly. Please try again."
Anything else I can try or a thread to refer to?
ImAhNoBoDy said:
Yup, permissions were set correctly like rw-r--r--. Owner is root:root. Those are the permission that I set on the apk file like they were on the original file. I just realized that the compiled apk's from apktools doesn't show up on my phone. The apk that I created by opening up winrar and just replacing the .ogg files do show up, but I get the error "The application Camera (process com.sec.android.app.camera) has stopped unexpectedly. Please try again."
Anything else I can try or a thread to refer to?
Click to expand...
Click to collapse
why dont you try to push the modified apk manually using root explorer or so instead of pushing via adb ..
after decompiling apk and modifying it, compile it into some folder and then copy it into you sd card then use root explorer and manually push(copy) the apk into system/app .. give proper permissions and then reboot your phone..
Here are some guides to use apktool
http://forum.xda-developers.com/showthread.php?t=1891686
http://forum.xda-developers.com/showthread.php?t=1989533
MoonBlade said:
why dont you try to push the modified apk manually using root explorer or so instead of pushing via adb ..
after decompiling apk and modifying it, compile it into some folder and then copy it into you sd card then use root explorer and manually push(copy) the apk into system/app .. give proper permissions and then reboot your phone..
Here are some guides to use apktool
http://forum.xda-developers.com/showthread.php?t=1891686
http://forum.xda-developers.com/showthread.php?t=1989533
Click to expand...
Click to collapse
I have been pushing the modified apk through root explorer all this time. I don't even have adb install, haha. The procedure you explained have been the way I have been doing it the whole time, lol. I read the threads you posted and the procedure is the same as I've been doing it, except for the second thread. I can't grab the apktool from 4shared because I don't have an account. I am using the latest apktool 1.5.2. Also, I didn't understand what PulseDroid was talking when he said "We are NOT done just yet, we cannot use the new apk's... we have to take what we did and add it back to the original apk file to keep proper signature use something like 7zip, take the 'resources.arcs' file and any other xml files you edited out of the "-new" apk and copy them into Original apk". So I'm suppose to replace the resources.arcs and the .ogg files that I created from the new apk to the old apk? I didn't mess with any xml file.
Anyways, is there anything else I can try?
EDIT: ........I feel so embarrassed. I checked out this thread http://forum.xda-developers.com/showthread.php?t=2378177 and saw this post "Drag your replacement files into WinRAR and (here's the important part) in the Compression Method drop-down choose "Store"." All this time I have been compressing the file as "Normal" in Winrar, instead of "Store".
All in all, I did not need apktool at all. I used the original apk and opened it up in Winrar. I deleted the files that I wanted to replaced and put in the files that I wanted. Each time I put something in the file in Winrar I get a prompt for compression and instead of "Normal" compression just use "Store". It was that simple.
This helped me, thank you!

Guide: Translate/modify apk files

Thought id share this since it can be quite a hassle to find everything needed if you wanna translate stuff yourself or edit something for personal needs.
This was done on miui stable 8.1.3.0 from xiami.eu on a mi5 but should work on other miui versions and roms (with slight modification)
Download Bursoft apktool (http://bursoft-portable.blogspot.se/p/blog-page_23.html) and unzip to C:\BatchApkTool
Make sure you have java installed (www.java.com)
You will also need root
Fetch the following files/folders from your phone and copy them to C:\BatchApkTool\_framework
system/framework/framework-res.apk
system/framework/framework-ext-res/
system/app/miui/
system/app/miuisystem/
system/priv-app/miuisystemUI/
Place the apk you wanna modify in C:\BatchApkTool\_INPUT_APK\
Execute BatchApkTool.exe in c:\BatchApkTool\
Press 1 to decompile
Go to your C:\BatchApkTool\_INPUT_APK\ folder and if everything worked alright then open the newly created folder from the apk file you just decompiled and make whatever change you wanna do. If you wanna translate, then open the \res\ folder and make a new folder called values-sv (if you wanna add swedish language for example) then you can either copy strings.xml from another language folder and edit them or grab xml from a partially (or fully but not 100% voted) translated source like crowdin or github
Do not use caps or anything other wierd stuff or it wont compile afterwards
You can now return to batchapktool and press 3 to recompile and hopefully no errors, otherwise check log to determine possible cause.
Do not sign the apk!
Now open the recently modified compiled apk with winrar (your w/e zip program you prefer) and grab resources.arsc out of there. Now open a copy of the original apk and paste the resources.arsc into it (replacing the existing resources.arsc).
Plug in the phone to the computer and copy the apk to the internal memory
Open your favourite root browser (using romtoolbox filemanager myself) and go to the location of the original apk and rename it (or make a backup incase any error occurs), now copy the modified apk you copied earlier into the folder of the apk you wanna replace, e.g system/app/ or system/priv-app/
Kill/close app (incase it was started earlier) and restart it and see if the changes are live!
Edit: After you replaced the files, then you need to chmod those aswell to 0644 and possibly clear cache in twrp
Might have forgotten something but just ask and ill try to help

[Oreo] How to integrate apps update in rom.

After update my LG G6 (LG-H870) from nougat to oreo, I've have problem with integration updated apps in to /system.
I do it like this:
1. copy apk file from data/apk to sd card
2. rename copied apk file to name of /system apk
3. extract lib folder from apk
4. copy newer file to proper folder in /system/app or /system/priv-app and replace file in it
5. Copy lib files extracted form apk to right folder /system/lib or /system/lib64
6. Uninstall update from /data/app
7. reboot + dalvik-cache wipe
In nougat it was working, but in oreo, app after integration, breaks. It cannot be open, and app name changes to random words (ex. google docs name changes to "write com.android").
To repair integrated apps I have to perform a full /data/ wipe.
Is it a some kind of protection? How to do it properly?
TitaniumBackup and Link2SD cannot integrate updates to rom properly without errors since Lolipop.

Categories

Resources