[Q] Adding Android AOSP keyboard to update.zip causes forced close. - Galaxy S I9000 Q&A, Help & Troubleshooting

I'm trying to add the Android AOSP keyboard to my update.zip and it keeps giving me forced close. It works fine when I install the apk manually. But once I place it in /system/app it will force close after flashing the update.zip via recovery.
Can someone please tell me how to fix this? I have tried several apk's and even build my own keyboard from the source found on android.git.kernel.org
Any help will be very much appreciated.

I'm having the same issue with some other apk's. They install fine on the phone from apk, but force close once added via /data/app or /system/app
The apk's that do it all have a lib folder inside, I tried putting those libs /system/lib but that didn't help.
I'm sure I'm missing something simple here but what?

I tried putting those libs /system/lib and /system/app but still FC
but I didn't use .odex, is it need?

mainicia said:
I tried putting those libs /system/lib and /system/app but still FC
but I didn't use .odex, is it need?
Click to expand...
Click to collapse
I used deodexed sources. Also I made it work by extracting the lib from the apk and placing it in /system/lib and leave the lib file inside the apk too. Removing it from the apk caused the force closes.

Related

Deleted AndroidMarket--- Please help

I am running JustAnotherCrowd's modified 1.3 ROM. By default install android can't download. Apparently all you need to do to fix it is chmod a folder, I tried that like 50 different ways and was still unable to download from market. Finally I ADB removed the AndroidMarket.apk and .odex from my app_s folder. Then I took the package out of his rom and ADB Installed AndroidMarket. Needless to say it didn't work, android market just crashes when I launch it. Any way to fix this?
fixed this myself by ADB pushing the AndroidMarket.apk and .odex directly into the app_s folder and resetting..... now I understand how that folder works...
still can't download though.

Resigning apks

Usually when I theme an app I move it from /data/app to /system/app and then edit the files and do an update.zip to install the themed application. However, the problem with this is that I am not informed of market updates after moving the app to /system/app. Now I know that some people just edit the apk itself and resign it and that allows it to stay in /data/app.
I tried doing this, edited an apk, resigned it and that part went well. However, then I'm confused. Do I uninstall the app that's sitting in /data/app? Do I just cut and paste the new apk into /data/app? Or do I just install the new apk using Astro or something and let it overwrite the existing one.
I tried all three and it doesn't seem to work for me. It appears like everything went ok and it tells me application installed but none of the edits I make stick. Further, I noticed that in /data/app all the apks are named com.something.something.apk, whereas if you download an edited APK from some website it's usually named Facebook.apk, or Pandora.apk, etc.
So how the heck do I do this? I know the resigning is working because I edited the "Pandora.apk" that I downloaded from another source and resigned it, but when I try to pull from my phone I get the error that it either didn't install, or it does install but no changes happen.
How do you get com.something.something.apk to become Pandora.apk or Facebook.apk and then install it directly without having to do an update.zip??
anyone have a clue?
somebody anybody haha...why do my apps disappear from the app drawer after editing the apk in /data/app??
Dude i feel your pain, i've been in the same position.
Check this out it might help:
What are you editing in the apk?
http://forum.xda-developers.com/showpost.php?p=6479689&postcount=1
If your changing the name then the update can't find the apk, you cant move house but keep the same adress, you wont get your mail!!
Also if your wanting to update the edited apk, it will be overwritten by the updated version so your back to square one.
Hope this helps.
Search for apk tool, it will do what you want.

touchwiz launcher doesnt work

whatshould i do?
force closed? have you try restart your the device?
aviranx said:
whatshould i do?
Click to expand...
Click to collapse
lib file if you do not copy it to the lib folder will not work ..
if you want to work push lib files to system / lib
also missing xml's related to the launcher in system/etc/permissions
probably u didn't copy a file or set permissions wrong. two apk and one lib file have be set rw-r-r permission. then restart phone.. if u are talking ab touchwiz 5.0... and also it works with JB only...

How to Integrate apps into system on 4.4? They keep FC'sing

I want to save some space on the internal storage, and since tha system partition is enormous, on 4.3 I integrate the updates into system/app. For example If Facebook gets an update I delete "facebook-xhdpi.apk" and I just move the new facebook from data/app to system/app and voila! Even after a factory reset I have no problems...
But on Kit Kat this is almost impossible. Even after signing the apks, renaming them like the old ones and giving the correct permissions via root explorer they force close. Even Google+ gives a "reinstall-loop" as I call it :crying:
What can I do? Fixing permissions by TWRP doesn't work either.
Open the APK using 7zip, extract the libraries there(the files inside the lib folder), place the extracted libraries inside /system/lib/, delete the libs folder inside the apk, move the apk to /system/app/ or /system/priv-app/ depending what type it is.
Just a warning though... Be careful with replacing already existing libraries in /system/lib/ sometimes they break stuff so if that happens just don't replace them.
Doesn't titanium offer this kind of switch? Have never done it but if it's automated then it's worth a look.
It does... But once you wipe data of the app you moved to system it force closes again. Thing is... System apps doesn't extract libraries in /data/data/ folder hence they force close.
Riyal said:
It does... But once you wipe data of the app you moved to system it force closes again. Thing is... System apps doesn't extract libraries in /data/data/ folder hence they force close.
Click to expand...
Click to collapse
Would it be possible to change the path via titanium or even shift the files via a file explorer? Again haven't done it myself before either.
Also could the apps be added to the ROM you're installing prior to the initial flash?
Sent from my C6903 using XDA Premium 4 mobile app

[MOD] Multi DPI Camera and Samsung Keyboard

Decided to start a new thread as this one was getting a bit messy (and I couldn't change the title anymore)
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-multi-dpi-samsung-apps-camera-t3141148
----------------------------------------------------------
Hi all, after changing the dpi to 480 the camera was the main thing bugging me. Looking for a solution I found this thread:
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-fix-samsung-camera-app-device-dpi-t3131995
But that did not work for me, so I decided to try it myself and I finally managed to create multi-dpi versions of the Camera and Samsung Keyboard apps. They are based on the apks from the XtreStoLite Universal Deo-Mod Edition 1.5 as I'm currently running that. So just give it a try (backup the original apks first! I usually just rename them to "filename.org") and let me know if it works for you. I tested on 480 and 520 dpi and that works here...
Installation:
1. Backup original apk (in system\app\SamsungCamera4 and/or systemm\app\SamsungIMEv2 )
2. Extract modded apk to the corresponding folder
3. Wipe data for the app
4. Reboot
I basically modified the dimens.xml file to hardcoded pixel sizes instead of dip value, modifying dip value caused other issues for me (camcorder not working, pro mode messing up). Hopefully it's of use to some.
I have not been able to fix the Contacts/Dialer (SecContacts_L.apk in the priv-app folder)! I either get a corrupt apk (parsing error) or it just won't show up in my apps. Corrupted apk gives a parsing error when trying to install manually, otherwise it just says 'install failed'.
I am guessing this is somethiong with the priv-app folder and other restrictions there. I also tried copying the apk to the system\app folder instead but that didn't work either...
If anyone has ANY idea how to fix this? (I tried with both apktool as apk multitool).
*SCRIPTS ADDED*
Added the scripts and all I've written for this to this post for those wanting to try themselves (dpi_mod.zip). They are not completely polished so need some manual editing every now and then...
Basically, doubleclicking apk_process.bat in the root will go through the apk's in the apk subfolder and
1. Decompile them to the decompiled subfolder
2. Edit the dimens.xml file in the res\values subfolder of the decompiled folder replacing all the <n>dip values with <4*n>px (So 640 dip becomes 2560px for example...)
3. Rebuild the apk to the dpimod_apk subfolder (using the -c option to keep original manifest and signature files)
The files folder contains the files used (apktool, the subscripts for each step, signature files, (g)awk and an awk script to process the xml file replacing the values, etc)
There is also a script for signing the apk manually, but somehow the apk then also doesn;t work in my case it seems...
ALl scripts are windows batch files (and an awk file) as I mainly use windows at home. Shouldn't be too hard for the linux users to convert them to bash files if desired...
*EDIT2*
Added patched services.jar (and original services.jar for restoration in case of issues). Flash through twrp recovery... This allows you to use the modded SecContacts_L.apk supplied, the services.jar needs to be patched to disable the signature verification for the (system) apk files. Note that this might cause issues (an invalid services.jar caused my phone to get stuck in boot... had to restore the original to be able to continue) so use at your own risk!
Great job !
I have not been able to decompile the contacts.apk either.. I am a bit rusty tho.. will have to look into that a little more.
fOmey said:
Great job !
I have not been able to decompile the contacts.apk either.. I am a bit rusty tho.. will have to look into that a little more.
Click to expand...
Click to collapse
Thanks! And yeah, weird stuff.
I actually was only really bothered by the camera, not using the samsung keyboard at all myself and don't mind the contacts as much (perfectly usable for me) but it's now a matter of principle If you find anything out, I would love to hear.
dagrim1 said:
Thanks! And yeah, weird stuff.
I actually was only really bothered by the camera, not using the samsung keyboard at all myself and don't mind the contacts as much (perfectly usable for me) but it's now a matter of principle If you find anything out, I would love to hear.
Click to expand...
Click to collapse
But In Call screen looks weird with 480 DPI right? Would you know any fix for that? Thanks.
Sent from my SM-G925F using XDA Free mobile app
ksekhar said:
But In Call screen looks weird with 480 DPI right? Would you know any fix for that? Thanks.
Sent from my SM-G925F using XDA Free mobile app
Click to expand...
Click to collapse
Yup, it does. (But again, doesn't bother me as much as I don't look at it long because I usually hold my phone to my ear anyway ).
But yeah, I think I know where to fix it... It's the Contacts apk I mentioned above but there is an issue with decompiling/rebuilding it so can't fix it yet. Looking into it.
Did notice when decompiling and recompiling including resources it fails, when keeping resources intact it does work.
To successfully mod seccontacts you have to do these steps :
- Decompile apk
- Edit xml files in res folder
- Recompile apk
- Extract xml edited files in res folder from recompiled apk
- Paste these xml files in the original apk in the res folder with compression tool like Winrar
It works I made this with my S5.
Meh, been looking into it some more and also found this:
http://forum.xda-developers.com/android/software-hacking/how-to-recompile-tw-contacts-phone-t3066350
and
http://www.ez-pg.com/guide-how-to-decompilerecompile-lollipop-seccontacts.html
I tried modifying the manifest as instructed, but the apk still didn't work. Perhaps because signature verfication is not properly disabled on my rom. BUt if it isn't it is also not for the majority of the users in which case siumply supplying the apk wouldn't work anyway.
I also tried resigning the apk, no luck. Copying the original manifast is also not going to work afaik with a changed manifest file...
More info about signature verficiation:
http://forum.xda-developers.com/showthread.php?t=2725233
http://forum.xda-developers.com/showthread.php?t=2342262
Perhaps I will try this soon as well, but for now I think I'll leave it be...
sebdigital said:
To successfully mod seccontacts you have to do these steps :
- Decompile apk
- Edit xml files in res folder
- Recompile apk
- Extract xml edited files in res folder from recompiled apk
- Paste these xml files in the original apk in the res folder with compression tool like Winrar
It works I made this with my S5.
Click to expand...
Click to collapse
Thanks for the tip, had looked into that as well but this xml file is in the values folder which is not simply found in the res folder of the apk but compiled into the resources.arsc file in the apk so this is not working unfortunately.
dagrim1 said:
Thanks for the tip, had looked into that as well but this xml file is in the values folder which is not simply found in the res folder of the apk but compiled into the resources.arsc file in the apk so this is not working unfortunately.
Click to expand...
Click to collapse
I'm on 5.1.1 today and noticed that contacts/dialer is (almost) multi DPI already without having to do anything. And your camera mod works on 5.1.1 too!
Sent from my SM-G920F using XDA Free mobile app
can u change this Camera 480 dpi camera s6 to 420 dpi?
https://mega.nz/#!M4Ui0KoR!TKsPKkMl-XQHyiJ_DNf53eQCGZTrYWhuHaAnhAYXeSM
thanks you very much
can be used for other than s6 for SamsungCamera4. ??
my android device A8 6
dagrim1 said:
Decided to start a new thread as this one was getting a bit messy (and I couldn't change the title anymore)
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-multi-dpi-samsung-apps-camera-t3141148
----------------------------------------------------------
Hi all, after changing the dpi to 480 the camera was the main thing bugging me. Looking for a solution I found this thread:
http://forum.xda-developers.com/galaxy-s6/themes-apps/mod-fix-samsung-camera-app-device-dpi-t3131995
But that did not work for me, so I decided to try it myself and I finally managed to create multi-dpi versions of the Camera and Samsung Keyboard apps. They are based on the apks from the XtreStoLite Universal Deo-Mod Edition 1.5 as I'm currently running that. So just give it a try (backup the original apks first! I usually just rename them to "filename.org") and let me know if it works for you. I tested on 480 and 520 dpi and that works here...
Installation:
1. Backup original apk (in system\app\SamsungCamera4 and/or systemm\app\SamsungIMEv2 )
2. Extract modded apk to the corresponding folder
3. Wipe data for the app
4. Reboot
I basically modified the dimens.xml file to hardcoded pixel sizes instead of dip value, modifying dip value caused other issues for me (camcorder not working, pro mode messing up). Hopefully it's of use to some.
I have not been able to fix the Contacts/Dialer (SecContacts_L.apk in the priv-app folder)! I either get a corrupt apk (parsing error) or it just won't show up in my apps. Corrupted apk gives a parsing error when trying to install manually, otherwise it just says 'install failed'.
I am guessing this is somethiong with the priv-app folder and other restrictions there. I also tried copying the apk to the system\app folder instead but that didn't work either...
If anyone has ANY idea how to fix this? (I tried with both apktool as apk multitool).
*SCRIPTS ADDED*
Added the scripts and all I've written for this to this post for those wanting to try themselves (dpi_mod.zip). They are not completely polished so need some manual editing every now and then...
Basically, doubleclicking apk_process.bat in the root will go through the apk's in the apk subfolder and
1. Decompile them to the decompiled subfolder
2. Edit the dimens.xml file in the res\values subfolder of the decompiled folder replacing all the <n>dip values with <4*n>px (So 640 dip becomes 2560px for example...)
3. Rebuild the apk to the dpimod_apk subfolder (using the -c option to keep original manifest and signature files)
The files folder contains the files used (apktool, the subscripts for each step, signature files, (g)awk and an awk script to process the xml file replacing the values, etc)
There is also a script for signing the apk manually, but somehow the apk then also doesn;t work in my case it seems...
ALl scripts are windows batch files (and an awk file) as I mainly use windows at home. Shouldn't be too hard for the linux users to convert them to bash files if desired...
*EDIT2*
Added patched services.jar (and original services.jar for restoration in case of issues). Flash through twrp recovery... This allows you to use the modded SecContacts_L.apk supplied, the services.jar needs to be patched to disable the signature verification for the (system) apk files. Note that this might cause issues (an invalid services.jar caused my phone to get stuck in boot... had to restore the original to be able to continue) so use at your own risk!
Click to expand...
Click to collapse
how to fix on parse error, after recompile SamsungCamera4.apk with apktool
with or without edit error on parse...
My device Galaxy-A8

Categories

Resources