[Q] FC using keyboard when pushed to system - Android Q&A, Help & Troubleshooting

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?

Related

Save memory by deleting lib from apks?

This is a work-in-progress report. I found a cool way to save internal memory: one can delete native libraries from apks after the apks have been installed. When an apk is installed, the native libraries are put in /data/data/*/lib, and if you delete the lib from the apk file in /data/app, everything works fine. Signatures don't seem to matter here.
This is particularly useful for apps most of whose memory usage is the native libraries.
OK, I've only tried it with one app.
Ooops: Normally, the /data/data/app.name/lib directory gets deleted on reboot to match the shorn apk file.
But this can be prevented by setting /data/data/app.name/lib and /data/data/app.name/lib/* to read only (chmod 555).
In case anybody wants to try with this, here's how you can do it. Of course, you need root.
Download my Android commandline build of zip. Install it in /bin and make it executable (chmod 755 /bin/zip). If you don't want to or can't make /bin writeable, install it in /data/local, and then call it explicitly as /data/local/zip
In the shell, do:
Code:
su
cd /data/data/app.name
(Where of course "app.name" is the name of the app.) Make sure there is something in the lib/ folder, or you won't save any space. Make the libraries read-only:
Code:
chmod 555 lib lib/*
Then delete the libraries from the apk:
Code:
cd /data/app
zip -d app.name*.apk lib lib/*
(You can replace the first * with a -1 or -2 or the like suffix, which gets added by the installer.)
And you're done. The apk is now thinner, and the libraries are still usable as they've already been extracted to /data/data/app.name/lib
If your app was moved to SD using Froyo (or higher?), you will need to do something a little more complicated. After you've made the libraries read-only, you'll need to remount the app directory read-write, and then zip:
Code:
mount -o rw,remount /mnt/asec/app.name*
cd /mnt/asec/app.name*
zip -d pkg.apk lib lib/*
Run the app, then reboot to see if it still works. If not, uninstall and reinstall the app.
You can save pretty serious amounts of memory this way. The libs in some graphics-intensive apps, like games, are most of the apk. I've seen apks that shrink from about 2mb to about 200k or from about 7mb to about 2mb after this procedure. Particularly bloated are apps that include two different versions of the libraries, for different CPUs.
A happy thing is that you can still move the shorn app to SD (at least with my Force2SD--I haven't tried with the OS's own function).
Interestingly, the uninstaller can still delete the app, despite the procedure, which is nice. I don't yet know what happens when you try to upgrade after this.
It would be easy to write an app that does this, or to integrate it into Force2SD. I am not sure I am going to bother.
For further savings, you can remount your sdcard as exec (I have a utility that does that if anybody is interested), move the library from /data/data/app.name/lib to your sdcard and then link to that. I have a script that automates that procedure. I've done it for a few apps that have large libraries (Angry Birds is a nice example).
Another update: This actually works very reliably. I've deleted the libraries from a bunch of apks using the above method, and things continue to work just fine.
is there an app or a script that can do this?
it is really painfull to do this with +100 apps :silly:
What happens when I update the app using play store. Is it works ?
And if it is working, does it download more data than usual to get an upgrade?
Sent from my HTC Desire X using XDA Free mobile app
ashifashraf5 said:
What happens when I update the app using play store. Is it works ?
And if it is working, does it download more data than usual to get an upgrade?
Sent from my HTC Desire X using XDA Free mobile app
Click to expand...
Click to collapse
When you update, this would need to be done again.
I have no idea if this still works on current Android versions anyway.
@arpruss
I'm doing this to my system apps currently. I use an zip explorer and just move the lib files needed to system/lib and deletes the lib folders from Apk. There is no problem of clearing of lib files at start up for this thogh. I Set the permissions to read write.
Sent from my HTC Desire X using XDA Free mobile app
---------- Post added at 05:21 PM ---------- Previous post was at 05:18 PM ----------
I like to know if the updates download more data than the normal case. What I mean is , when we updates app by play store it only download a portion of files. I like to know if this is affected by removing lib files
Sent from my HTC Desire X using XDA Free mobile app
ashifashraf5 said:
@arpruss
I'm doing this to my system apps currently. I use an zip explorer and just move the lib files needed to system/lib and deletes the lib folders from Apk. There is no problem of clearing of lib files at start up for this thogh. I Set the permissions to read write.
Click to expand...
Click to collapse
If you move the lib files to system/lib, the apps won't upgrade properly.
I have some more observations:
- On 2.3, the /data/data/*/lib directory gets cleared on reboot if the apk has had its libraries deleted. It doesn't matter what the permissions on the libraries are.
- On 4.3 and 4.4, things work great, and you don't need to change permissions at all. (I don't have rooted 4.0-4.2 devices for testing.)
- Many apps from the Amazon Appstore have a security check that makes them fail if the apk is modified.
- Moving the library-shorn apk to SD causes the libraries to disappear. I don't think the permissions matter here (but haven't tested).
It would be nice to have data from rooted 4.0, 4.1 and 4.2 devices. I guess I could play around with an emulator.
I am thinking of integrating this functionality into my Force2SD app. I would probably make this functionality available in the free version.
Anyone has tried this with 4.0 ?
benibela said:
Anyone has tried this with 4.0 ?
Click to expand...
Click to collapse
I think I tried something like this with 4.3 or 4.4 and it worked.
Yes, you said that already.
But I need to know it for 4.0.4. My stupid bank has a must-use-app for online banking with 20 MB libs that are only there to prevent it from running on a rooted device. And if it detects a modification, it self-destructs.
Nevermind. I tried it with my own app and it worked. With permission change, did not try without
I have Android 8.1.0, Xiaomi Redmi 5 Plus.
I am modifying the files in "lib" directories (such as /data/data/com.application.name/lib/) of few specified applications.
Rarely the files from the "lib" directory get overwritten with the content from APK archive of these applications. The "lib" gets restored from APK archive sometimes (maybe after 2 weeks or so).
It's important for my project to learn about the problem of Android restoring the "lib" directory.
I would like see what part of Android is responsible for this. I want to know which script or executable file in Android is responsible for restoration of "lib" directory.
Hopefully someone out there knows something about it.
i found a better way to remove lib folder from apk to get more free space https://forum.xda-developers.com/android/general/guide-t4080131

add apks to root

hey quick question and i am sorry i am sure this has been asked before but how can i go about adding aps to the update zip for a 16gb tablet so that after i root it the apps are in like with the market app.
thanks,
yonu
Should be able to open the zip (not extract, just open) and add the apk file to /system/app
It should work most of the time, but some apks might not work.
yonu said:
hey quick question and i am sorry i am sure this has been asked before but how can i go about adding aps to the update zip for a 16gb tablet so that after i root it the apps are in like with the market app.
thanks,
yonu
Click to expand...
Click to collapse
just keep in mind that if you put your apks into the system/app the apps you install will be installed into the system/app folder. therefore, all those apks you put in will be considered as system apps and may be difficult to update or reinstall.

[Q] How to reinstall deleted apps. Both apk and odex?

I'm trying to reinstall some deleted apps to my Verizon GS4. I downloaded the big zip file with all the stock apk's but am confused now since there's also a ".odex" file for most of the ".apk" files. Do I need to install both the apk and odex? If so, how?
TMack1962 said:
I'm trying to reinstall some deleted apps to my Verizon GS4. I downloaded the big zip file with all the stock apk's but am confused now since there's also a ".odex" file for most of the ".apk" files. Do I need to install both the apk and odex? If so, how?
Click to expand...
Click to collapse
You need the odex files.
They go in /system/app just like the apk files.
tech_head said:
You need the odex files.
They go in /system/app just like the apk files.
Click to expand...
Click to collapse
Thanks. The next question is about how I'm installing the apps. Typically, I've just downloaded an apk to the phone, clicked on it and pressed "install". If I do that, then what do I do with the .odex? Do I manually copy/paste it into the app folder?
Also, with some of the apk's, i get a "application won't install" message. Any ideas why? These apk's are all from a huge master apk download of all stock Verizon GS4 apk's.

Official PlayStore apk install and More for android wear

1.- Move all these apks to the /system/priv-app folder of the android wear watch, and chmod 644 all apks with adb/terminal or change permissions to rw,r,r and change the owner to System and the group to System with file manager.
/system/Priv-app Apks -
ES filee explorer https://app.box.com/s/j4u1hiwymkbyvh4py2welvn88puyrn8w
Google Backup transport https://app.box.com/s/tvothkbt7yv0vw3fd6rcuxuf2vwa09qw
Google calendar sync https://app.box.com/s/i4ribv2kta4nhapb93tsesblgm3efvox
Google onetime init https://app.box.com/s/llxqniqy3thddj11g4jletk5qxpduw08
Google partner setup https://app.box.com/s/yg18h5rhs8d3ozdgmd2cufjgkynm55rs
UCBrowser https://app.box.com/s/misbdk8dg2nw1pz01ik8zrhxemvk5v9l
PlayStore https://app.box.com/s/cndzlazkq1z3599u39r842ocn7addlra
2.-Reboot watch to recovery and wipe dalvik and cache partitions.
3.- delete and move the dummy apks to system/priv-app folder
Google Play Store dummy apk https://app.box.com/s/thyhe4fscsbfnzacjpzh8ee5ufz5t8wu
UC Browser dummy apk https://app.box.com/s/epbyt8q2s1un5weigxeugphglbrjo01z
4.- Install these apks with ES file explorer -might not need to install all apks but that's what I use
Apks- https://app.box.com/s/rf5870pwmaeym7i132tlf5nt7uho72eg
4.- Reboot watch twice
Let me know how it goes!
Reserved
Hello,
thanks for this. But I need help.
I get this message: "com.google.process.gapps has stopped". Can you help me please ?
Thanks
mister-gwada97one said:
Hello,
thanks for this. But I need help.
I get this message: "com.google.process.gapps has stopped". Can you help me please ?
Thanks
Click to expand...
Click to collapse
Did you get apks installed ok?
iAppleDev said:
Did you get apks installed ok?
Click to expand...
Click to collapse
Yes I got all intalled ok. I did everything as you said.
I can't figure out what's wrong.
Does UCBrowser open and work?
"Google play services has stopped to work" after this process. I can´t get uc browser or play store working (installing as user apps as shown at step 3) If I move it to priv-app, UC browser works, but playstore´s still crashing. I don´t understand the dummy apks and its purpose...
If I install the dummy and before the user app UC browser, it doesn´t work. It needs to be pushed on priv-app to get networking
iAppleDev said:
Does UCBrowser open and work?
Click to expand...
Click to collapse
I got UC Browser working in system/app folder.
prototovsky said:
"Google play services has stopped to work" after this process. I can´t get uc browser or play store working (installing as user apps as shown at step 3) If I move it to priv-app, UC browser works, but playstore´s still crashing. I don´t understand the dummy apks and its purpose...
If I install the dummy and before the user app UC browser, it doesn´t work. It needs to be pushed on priv-app to get networking
Click to expand...
Click to collapse
Yes I guess it needs to be done first! If you use /system/app mover to move playStore to system then after it reboots install the newer PlayStore apk as an user with ES file explorer then delete the play store apk on the system/priv-app folder and add the older dummy apk again and it should work! I think it needs to be installed to system for real first then update it then move the older dummy apk to /system folder after you've updated it, the point of the dummy apk is to save space! if you want you could just leave the real apk in the System/folder
iAppleDev said:
Yes I guess it needs to be done first! If you use /system/app mover to move playStore to system then after it reboots install the newer PlayStore apk as an user with ES file explorer then delete the play store apk on the system/priv-app folder and add the older dummy apk again and it should work! I think it needs to be installed to system for real first then update it then move the older dummy apk to /system folder after you've updated it, the point of the dummy apk is to save space! if you want you could just leave the real apk in the System/folder
Click to expand...
Click to collapse
I don´t understand the steps. If I install something outside from priv-app, it won´t work on network, that´s a fact. I think google play services must be in priv-app also with play store and other google apps, but I don´t have space enought on /system partition (the play store crashes saying google play services has stopped, and I cannot install play services as user app because it says that already exists). Why it already exists? Must I delete the default Android wear Play services and replace with this new package? And what´s the installation order?
1- Install the dummy as user app and move it to /system with permissions, etc.
2- Reboot and install the real google play apk as user app
3- Reinstall the dummy on /system again (mantaining the real Gplay as user app and getting free space on /system)
Is this?
I only got UC browser working while being on priv-app, but nothing with play store... Really I´m trying to get it working
Yes any apps in the system folders get networking! And if you update that app it moves it to /data and still works as long as an dummy apk is in system folder. And yes I might have use the adb -r command to install play services or threw ES file explorer as an update? I'm not to sure
iAppleDev said:
Yes any apps in the system folders get networking! And if you update that app it moves it to /data and still works as long as an dummy apk is in system folder. And yes I might have use the adb -r command to install play services or threw ES file explorer as an update? I'm not to sure
Click to expand...
Click to collapse
Then, how I update an app for save space on /system? And how I install new play services without corrupting anything?
And what´s adb -r command for?
Sorry for all of that questions, but I´m interested in learning And thanks for all!
Have you tried to install play services apk with ES file explorer or threw adb? Android wear has play services installed already so it's just an update! It's called prebuiltGmsCoreForClockworkWearable.apk on my watch and is in the priv-app folder!
you have to install the app or apps to the /system/priv-app or /system/app folder first - you can use the app /system/app mover or adb or terminal or file manager. then you need to use ES File explorer and install an newer version of the same app and it will be updated and re-installed to the /Data partition where there is more space, it does not remove the apk from the /system folders but it's not used only checked for and wastes space so that's why the dummy apk is used. If you don't want to install other apps to system then just install PlayStore or UCBrowser and leave it in system but there isn't much space 30+mb.
adb install -r package.name.apk reinstalls the app without replacing the data like an update.
Ahh I found what was going on I forgot an apk GoogleAccountManager.apk it don't need to be in the system folder but if you reset the watch it will get deleted too unless it's in the system folder!
Can you upload it please? I'll try it
@iAppleDev : Hello, is there a way to store google contacts directly on the watch please ?
mister-gwada97one said:
@iAppleDev : Hello, is there a way to store google contacts directly on the watch please ?
Click to expand...
Click to collapse
Nope
iAppleDev said:
1.- Move all these apks to the /system/priv-app folder of the android wear watch, and chmod 644 all apks with adb/terminal or change permissions to rw,r,r and change the owner to System and the group to System with file manager.
/system/Priv-app Apks -
ES filee explorer https://app.box.com/s/j4u1hiwymkbyvh4py2welvn88puyrn8w
Google Backup transport https://app.box.com/s/tvothkbt7yv0vw3fd6rcuxuf2vwa09qw
Google calendar sync https://app.box.com/s/i4ribv2kta4nhapb93tsesblgm3efvox
Google onetime init https://app.box.com/s/llxqniqy3thddj11g4jletk5qxpduw08
Google partner setup https://app.box.com/s/yg18h5rhs8d3ozdgmd2cufjgkynm55rs
UCBrowser https://app.box.com/s/misbdk8dg2nw1pz01ik8zrhxemvk5v9l
PlayStore https://app.box.com/s/cndzlazkq1z3599u39r842ocn7addlra
2.-Reboot watch to recovery and wipe dalvik and cache partitions.
3.- delete and move the dummy apks to system/priv-app folder
Google Play Store dummy apk https://app.box.com/s/thyhe4fscsbfnzacjpzh8ee5ufz5t8wu
UC Browser dummy apk https://app.box.com/s/epbyt8q2s1un5weigxeugphglbrjo01z
4.- Install these apks with ES file explorer -might not need to install all apks but that's what I use
Apks- https://app.box.com/s/rf5870pwmaeym7i132tlf5nt7uho72eg
4.- Reboot watch twice
Let me know how it goes!
Click to expand...
Click to collapse
Hi, may I ask, what is the purpose of doing this? Is it for times when Android Wear becomes unstable?
I have put the apps to /system/priv-app. I chmod-ed them to 644. But i am not able to change user/group.
when in sdcard/Downloads the files are shown as root:sdcard_r. chown system:system filename result in no error, but ls -al still delivers root:sdcard_r
after putting the files in system/priv-app i am shown to have no rights to change user/group (no rights to write on system?). I dont know how to get these rights. Standard linux code doesnt work, necessary commands not integrated in wear?
In the file manager of twrp i dont find any option to change user/group. ES File Explorer is installed, but activation of root explorer returns an error. And yes, the device IS rooted
Edit:
When in /system/priv-app by adb shell su the files are shown root/root as user/group.
So the whole procedure results in:
I can start ES File Explorer (only through native GUI, not wear mini launcher, dont know why) - but i am not able to install an apk by it. Every try results in no app/no gesture. Now i am stuck...
Edit:
Ok, i made it by TWRP/Terminal. baaaaad work with that smaaaall keyboard and big fingers...
but it doesnt look as if that was the big point. File Explorer still cant get root explorer and i still cant install apps...
iAppleDev said:
1.- Move all these apks to the /system/priv-app folder of the android wear watch, and chmod 644 all apks with adb/terminal or change permissions to rw,r,r and change the owner to System and the group to System with file manager.
/system/Priv-app Apks -
ES filee explorer https://app.box.com/s/j4u1hiwymkbyvh4py2welvn88puyrn8w
Google Backup transport https://app.box.com/s/tvothkbt7yv0vw3fd6rcuxuf2vwa09qw
Google calendar sync https://app.box.com/s/i4ribv2kta4nhapb93tsesblgm3efvox
Google onetime init https://app.box.com/s/llxqniqy3thddj11g4jletk5qxpduw08
Google partner setup https://app.box.com/s/yg18h5rhs8d3ozdgmd2cufjgkynm55rs
UCBrowser https://app.box.com/s/misbdk8dg2nw1pz01ik8zrhxemvk5v9l
PlayStore https://app.box.com/s/cndzlazkq1z3599u39r842ocn7addlra
2.-Reboot watch to recovery and wipe dalvik and cache partitions.
3.- delete and move the dummy apks to system/priv-app folder
Google Play Store dummy apk https://app.box.com/s/thyhe4fscsbfnzacjpzh8ee5ufz5t8wu
UC Browser dummy apk https://app.box.com/s/epbyt8q2s1un5weigxeugphglbrjo01z
4.- Install these apks with ES file explorer -might not need to install all apks but that's what I use
Apks- https://app.box.com/s/rf5870pwmaeym7i132tlf5nt7uho72eg
4.- Reboot watch twice
Let me know how it goes!
Click to expand...
Click to collapse
Do you have root for this? If so how have you granted access if superuser doesnt work yet? Also how do you change the groups? And do the apks need to be in a folder in system/priv-app like they are in our phones? I moved all the apks but none of them installed I have TWRP but im still trying ti work out my root on Sony Smartwatch 3

unable to setup apk

I wonder why i can't use samsung apks such as music, gallery and keyboard apps. Is there a way to use them?
Arxea said:
I wonder why i can't use samsung apks such as music, gallery and keyboard apps. Is there a way to use them?
Click to expand...
Click to collapse
They fail to install? Do you have the complete deodexed APK? Have you tried pushing the APK file to /system/app folder and reboot? Even then they may fail due to dependencies on Samsung's framework.
wbrambley said:
They fail to install? Do you have the complete deodexed APK? Have you tried pushing the APK file to /system/app folder and reboot? Even then they may fail due to dependencies on Samsung's framework.
Click to expand...
Click to collapse
I download samsung gallery from apkmirror and there is no system file when i download es file. Its my first huawei phone and i scare of bricking it bcz funky wants money when downloading rom or sth unlike samsung/odin.

Categories

Resources