Preinstall apps - General Questions and Answers

Dears,
I need to preinstall some apps onto my tablet.
I installed them manually, them I collected apks via Apk Extractor.
I added those apks in the firmware, but just some of them are really preinstalled when firmware is flashed to devices.
Anything to check or do to these apks before to add them to firmware?
Thanks and best regards

ultradj83 said:
Dears,
I need to preinstall some apps onto my tablet.
I installed them manually, them I collected apks via Apk Extractor.
I added those apks in the firmware, but just some of them are really preinstalled when firmware is flashed to devices.
Anything to check or do to these apks before to add them to firmware?
Thanks and best regards
Click to expand...
Click to collapse
Didn't understand your question properly but if you want to preinstall apps everytime you flash the rom or factory reset then copy the apks to following location-
/system/vendor/operator/app/
It will do the work.

Well I did this, but some apps are not installed, this is the problem...
And I have no idea where to find a flash log to see what happened.
Thanks!

ultradj83 said:
Dears,
I need to preinstall some apps onto my tablet.
I installed them manually, them I collected apks via Apk Extractor.
I added those apks in the firmware, but just some of them are really preinstalled when firmware is flashed to devices.
Anything to check or do to these apks before to add them to firmware?
Click to expand...
Click to collapse
Place the apks in /system/app folder so that they will automatically install.
Make sure to set its permission as 644

ultradj83 said:
Well I did this, but some apps are not installed, this is the problem...
And I have no idea where to find a flash log to see what happened.
Thanks!
Click to expand...
Click to collapse
In the firmware copy apks to
/data/app/
this should work but they will be erased when you factory reset.

So if I do a factory reset they won't be installed because apks will be deleted?
Any way to avoid this?
Tks!

ultradj83 said:
So if I do a factory reset they won't be installed because apks will be deleted?
Any way to avoid this?
Tks!
Click to expand...
Click to collapse
No, they won't be deleted if you place it in /system/app, even if you do factory reset

ultradj83 said:
So if I do a factory reset they won't be installed because apks will be deleted?
Any way to avoid this?
Tks!
Click to expand...
Click to collapse
Then you have to use 1st method which you said didn't work properly. So copying to /system/app/ folder is only option left. But you can't uninstall these apps, you can only delete them.

I'm trying to understand if the system partition has enough space.
Will Play Store update apps in the system?
Tks!

ultradj83 said:
I'm trying to understand if the system partition has enough space.
Will Play Store update apps in the system?
Tks!
Click to expand...
Click to collapse
Yes
That's how apps like Google Maps get updated.

System gets full with a few apps...
I need to put the most of apps into /data, how to set permissions 644 by a Windows computer?
The tool that packages the firmware is only for Windows.
What if I edit permissions on a Linux machine then I copy them to Windows machine?
Tks!

ultradj83 said:
System gets full with a few apps...
I need to put the most of apps into /data, how to set permissions 644 by a Windows computer?
The tool that packages the firmware is only for Windows.
What if I edit permissions on a Linux machine then I copy them to Windows machine?
Tks!
Click to expand...
Click to collapse
Just give permission to /data/app folder as same as /system/app folder. Giving permission to each and every app is not required.

Ok but files and folder are on a Windows machine because the builder is for a Windows.
How can I do?

ultradj83 said:
Ok but files and folder are on a Windows machine because the builder is for a Windows.
How can I do?
Click to expand...
Click to collapse
I didn't understand. What are you doing ? Flashable zip ? Which tool you are using ?

Yes it's a flashble firmware.
I use Rockchip Firmware Factory.

ultradj83 said:
Yes it's a flashble firmware.
I use Rockchip Firmware Factory.
Click to expand...
Click to collapse
What is the flashable firmware format ? Zip ? If zip then you can make changes in the firmware after making the firmware from that tool.

Yes it's a zip.
How to edit in the zip?

ultradj83 said:
Yes it's a zip.
How to edit in the zip?
Click to expand...
Click to collapse
Extract update.script from Zip's meta-inf/google/android/ folder and edit it using notepad++ or similar program and you can add permissions there. You can even add data folder directly to zip using winrar or 7zip and make changes in update.script file.

4shreyas said:
In the firmware copy apks to
/data/app/
this should work but they will be erased when you factory reset.
Click to expand...
Click to collapse
Dear,
I found that the automatic tool puts all apks that you suggest to put in /data/app in the system/preinstall, this might be the error.
At the same time apps to be installed as system apps are in the system/app.
How can I move my apks from system/preinstall to data/apps?
Creating a data.img in the update file, editing update-script and repacking firmware?
Thanks a lot.

ultradj83 said:
Dear,
I found that the automatic tool puts all apks that you suggest to put in /data/app in the system/preinstall, this might be the error.
At the same time apps to be installed as system apps are in the system/app.
How can I move my apks from system/preinstall to data/apps?
Creating a data.img in the update file, editing update-script and repacking firmware?
Thanks a lot.
Click to expand...
Click to collapse
First tell me what is the format of your firmware ? First you told .zip and now you're talking about .img. Zip firmware is easy to edit. Just extract the zip file using 7z , winrar etc and add data/app/ folders to it and move required apks from system folder then edit update.script as said in previous post and compress again to zip using same software with normal deflate compression mode in options. Then you can directly flash. If .img you are talking about then it is different and slightly difficult.

Related

help: how to add removable apk to roms?

I wasn't able to find info about this until now. But I need to know how to make the apks I include in a rom removable. I guess, maybe, I have to copy into a different folder instead or /system/app. is it right?
thanks
you have to install it in data directory not in system directory. so data/app
ok, thanks, but, if it doesn't exist, should I create it?
no u should not create it because then it wouldnt be a proper directory for your rom, the rom may not recognize it, i think.
which rom are you on? most rom has a data directory, that is where third party apps are installed and where apps downloaded from the market is also installed
this one
http://forum.xda-developers.com/showthread.php?t=556962&highlight=enomther
ok i see what u mean when there's no data directory. what you should test out first is go to market and download an app. then see where that app is install. see if it created a data directory or not. it should...
I had a look using root explorer, and there is a folder in the root called /data/app , and there inside are every installed apk, even the ones I installed by astro...
and there is another one called /data/data where I find folder of every app too
ANd another one called /data/app-private (there I found one apk that I downloaded from market.
I try to download a new one
Yup put your apks in data/app
on a related note, is there any way to flash unsigned ROMs? like if I want to drop .apk 's into the data folder of a rom before flashing?
The_Chrome_Coyote said:
on a related note, is there any way to flash unsigned ROMs? like if I want to drop .apk 's into the data folder of a rom before flashing?
Click to expand...
Click to collapse
I think no, but have a look for a program called autosign.
It very easy
NguyenHuu said:
Yup put your apks in data/app
Click to expand...
Click to collapse
but it only appear in my phone,not in the files of the rom.
Anyway I'm going to ask enomther, the creator of the rom, maybe he can help me
joshuas_79 said:
but it only appear in my phone,not in the files of the rom.
Anyway I'm going to ask enomther, the creator of the rom, maybe he can help me
Click to expand...
Click to collapse
ok your running a reg rom system, thus meaning 1.5/1.6 non hero. i can teach you step by step on how to set up "signing .zip's". its super super convenient!! i promise and its not to hard. just pm me if you need help. its way way easier to flash a rom with whatever apk you want then to push them and hope you pushed them to the right spot.

[Q] apk question

Is the apk file essentially the same as a .deb file or .rpm file in that once it's installed it can be removed from the phone? Or is the .apk required for the application to run?
Thanks.
Basically, what you said. It can be removed once installed.
Thank you.
ktmdms said:
Is the apk file essentially the same as a .deb file or .rpm file in that once it's installed it can be removed from the phone? Or is the .apk required for the application to run?
Thanks.
Click to expand...
Click to collapse
Depends what you mean. If you mean the apk on the device itself (/data/app or /system/app), then don't touch it, as Android runs from the apk.
If you mean the sd card, then sure, delete it
Ah, nuts! /data/app has 4 apk files in it. /system/app has 75. What I was hoping to do was clear out the .apk's in /system/app (or move them to the sdcard and maybe link /system/app to a directory on the sdcard) to make room in the phone. Not safe to do that, huh?
Thanks.
I wouldn't think so. I'd leave them just incase.

[Q] Update.zip to restore apps?

hey guys i just wanted to ask something. Its possible to install apps via update.zip immediately after flashing ROM rite? I searched XDA and found this: http://forum.xda-developers.com/showthread.php?t=917922
but im not sure how to do it and anyway the meaupload link for that download is down. Btw since all my app data together is more than the data partition of the phone (>200mb), is it possible to make the apps link to my second partition of sd card via update.zip script or something? Hope u guys can help me!!
Does anyone know how to do this? if possible i think it would save a lot of time as when reinstalling via titanium backup. this way would be more hassle-free if possible.
So no one knows how to do this? ok then nvr mind i guess it must be too hard or something....
Why not just use an ext partition and app2ext?
Creating an update.zip is possible, but it's not very convenient. Esp keeping it up-to-date.
Mioze7Ae said:
Why not just use an ext partition and app2ext?
Creating an update.zip is possible, but it's not very convenient. Esp keeping it up-to-date.
Click to expand...
Click to collapse
srry if im asking a really dumb qn but does that mean that if u install apps to ur ext2 via link2sd, u dont have to install them again on new ROM?
App2ext is different from link2sd (but they both use ext partition.
In link2sd you usually create /sd-ext/link2sd folder, reboot and then use the Link2SD app to manually move apps to /sd-ext/link2sd. This is good if you want to mix apps on SD and internal.
In app2ext (which I'm suggesting) you instead create /sd-ext/app folder on sdcard and reboot. All your installed apps will be moved there from internal memory and new apps will be installed there automatically. They will still be there after you factory reset or install a new ROM. (To preserve application data you need something else such as titanium backup)
Ohhhhh. Thx a lot!! Ok I just wanna try a bit of programming that's why I asked how to make update.zip. haha. Anyway Thx!!
Sent from my XT720 using XDA App
androidlover123 said:
Ohhhhh. Thx a lot!! Ok I just wanna try a bit of programming that's why I asked how to make update.zip. haha. Anyway Thx!!
Click to expand...
Click to collapse
You can learn by studying the gapps package used by CM or any other update.zip. The "magic" is inside the META-INF folder. META-INF/com/google/android/updater-script has the installer commands that do things like mount /system and extract files, set permissions etc. The final step is to sign the update. OpenRecovery allows unsigned updates, but you should sign anyway even using testkeys--it forces a sha1 verification of the zip files to detect corruption before the update is applied.
Mioze7Ae said:
You can learn by studying the gapps package used by CM or any other update.zip. The "magic" is inside the META-INF folder. META-INF/com/google/android/updater-script has the installer commands that do things like mount /system and extract files, set permissions etc. The final step is to sign the update. OpenRecovery allows unsigned updates, but you should sign anyway even using testkeys--it forces a sha1 verification of the zip files to detect corruption before the update is applied.
Click to expand...
Click to collapse
oooh i can kinda understand the code in the updater-script. for eg: ui_print to print to screen, package_extract_dir to extract files to the directory in whatever folder u state. but what is the update-binary file?
The update-binary is the program that reads and executes updater-script.
Mioze7Ae said:
The update-binary is the program that reads and executes updater-script.
Click to expand...
Click to collapse
Is that something you must write yourself or something? Or just copy from other update.zips?
I just copy it. It's probably in the AOSP source somewhere but I've never looked.

[Q] Is it ok to delete apk files after installation? Please read further.

Hi. I just found out that apk files are kept in the device after installation of the app.
I just recently downloaded a file explorer app and I found out that the apk files of the free games which I downloaded and installed from android market are kept in this folder:
/mnt/asec (I'm using Samsung Galaxy Ace)
There are individual folders for each game, and in each folder are a lib folder and the apk file. For example:
Fruit Ninja folder (which is found in mnt/asec folder) contains a lib folder and an apk file.
Fruit Slice folder (which is also found in mnt/asec folder) contains a lib folder and an apk file.
My question is, is it ok to delete these apk files? Will the games still work?
Also, can I send these apk files to someone else via bluetooth so they may download the apps without having to visit android market?
yeah you can delete the apk file after installing any app for it to still function, I do it all the time. Yes you can send the apk file to your friend so they can install it. If you're still cautious, try doing a trial run with one apk file...send it to your friend first, then delete, see if it works.
The .apk files are like setup files for windows. Once installed, you don't need the apk, especially if you are backing up with Titanium or similar backup program.
follow up question
Hi. Thanks guys.
Is everything from the android market ".apk"? Is it possible that some have a different extension? I downloaded a dictionary app, I can't be sure but I think it's a .zip file.
Thank you.
pakattack
I tried to delete the apk file. It cannot be deleted.
However, I copied it to my sd card, uninstalled the app, re-installed it using the one already in my sdcard, and it installed just fine.
I still want to be able to delete the apk file that is in the system though (/mnt/asec).
Any ideas or do I just have to deal with it?
sending .apk signed with another device
PakAttack1994 said:
yeah you can delete the apk file after installing any app for it to still function, I do it all the time. Yes you can send the apk file to your friend so they can install it. If you're still cautious, try doing a trial run with one apk file...send it to your friend first, then delete, see if it works.
Click to expand...
Click to collapse
I agree with deleting it won't be a problem but sending to a friend?
sometimes I think there would be a message stating that its not sign
correctly.. correct me if I'm wrong Thank You
WillShaka, like I said, I tried to delete it. I can't. Not allowed.
I don't know why. I'm using ES File explorer
not sure if this works but have you tried unmounting the sd and delete?
WillShaka said:
I agree with deleting it won't be a problem but sending to a friend?
sometimes I think there would be a message stating that its not sign
correctly.. correct me if I'm wrong Thank You
Click to expand...
Click to collapse
Also, and I don't mean to veer out of topic (this question is often ignored in Q&A forum), if I use Odin to upgrade my stock firmware instead of using Kies, will it erase all my data? I have a feeling it will...
WillShaka said:
not sure if this works but have you tried unmounting the sd and delete?
Click to expand...
Click to collapse
Just tried it. Doesn't work, but thanks for suggesting. =)
Yes, you can delete the APK after installation. But the APKs in /system/app/ need to stay where they are to function appropriately
MarlonKaye said:
Also, and I don't mean to veer out of topic (this question is often ignored in Q&A forum), if I use Odin to upgrade my stock firmware instead of using Kies, will it erase all my data? I have a feeling it will...
Click to expand...
Click to collapse
MarlonKaye said:
Just tried it. Doesn't work, but thanks for suggesting. =)
Click to expand...
Click to collapse
yes odin your phone would wipe out all the user and data status.
your welcome sorry I couldn't help
All-In-One Toolbox App
MarlonKaye said:
WillShaka, like I said, I tried to delete it. I can't. Not allowed.
I don't know why. I'm using ES File explorer
Click to expand...
Click to collapse
I use the All-In-One Toolbox app to automatically find and delete all .apk files. It also has an automatic backup and restore function for apps.
So my daragon city and messenger are in the apk files I don't know if its backed by another zip folder my tablet is the amazon fire so if I deleted the apk files that is downloaded for an android would my appe still work the same

[Q] Recover data from previous rom

Installed new rom, need to restore system app from old rom. Is it possible without a backup of the system App?
warlock5 said:
Installed new rom, need to restore system app from old rom. Is it possible without a backup of the system App?
Click to expand...
Click to collapse
Nope! And even if u do, it might not work on the new ROM. Try asking the person on that ROM to extract it for u.
Lifehacker7 said:
Nope! And even if u do, it might not work on the new ROM. Try asking the person on that ROM to extract it for u.
Click to expand...
Click to collapse
You are a bit wrong there. Do you still have the install package (.zip) for the rom? If so, download WinRAR.
Now open the zip, and open system. Open app, and copy out the .apk for the app you want.
Hope this helps!
Johnsmith41junk said:
You are a bit wrong there. Do you still have the install package (.zip) for the rom? If so, download WinRAR.
Now open the zip, and open system. Open app, and copy out the .apk for the app you want.
Hope this helps!
Click to expand...
Click to collapse
Ya. That's possible. I just told in other way to get it from someone else who has it!

Categories

Resources