[Q] How to properly "preinstall" app in ROM? - Android Software/Hacking General [Developers Only]

Hi guys.
I hope you might be able to comment on a problem I'm having with a vendor. Please note that I'm not an Android developer myself -- I'm merely the delivery manager for our app.
They embed (preinstall) our application in their (Android 2.1-update1) device firmware, and they insist it should be done as follows (but they can't explain why it should be done like this):
Copy the native library libMyApp.so from the APK to /system/lib/.
Install the unmodified APK (i. e. with libMyApp.so still contained in the APK) we delivered to them aside in /system/app/.
In my opinion this has the disadvantage that if we upgrade the preinstalled app with a newer build from the Market or via uSD card or by downloading it from some webserver, the old libMyApp.so will still be present in /system/app/ and override the one inside the APK -- thus the old code is used instead of the new one.
Is there any docs from Google which outline how an app should be preinstalled? I couldn't come up with anything useful on Google... :-(
Your advice would be very much appreciated.
Best regards,
Ralf

Related

[Windows] Make update.zip of Google apps from NAND dump! Works w/ 1.6 and new Market!

GApps2zip
This script makes an update.zip file that only contains the Google Apps from the HTC release of the 1.5 firmware upgrade for the ADP 1. This update.zip should be flashable on any build and it should work without a problem, but since I'm just a n00b sophomore in highschool, I am naturally poor and can't guarantee anything.
Because there are already a few alternatives to this for Linux and the majority of Android users use Windows, I decided to make this a Windows-only batch script.
You MUST have the Java Runtime Environment installed in order to run this script! The signing utility requires Java and you won't be able to flash an unsigned update. If it doesn't work even if you have Java, you may have to reinstall Java as it is not in your PATH variable for whatever reason.
UPDATE: Updated and, as far as I know, should now work fine with the 1.6 developer images from HTC as well as personal NANDroid backups of most all 1.6 Android ROMs.
INSTRUCTIONS
1) Either do a or b. It is advised to use a personal NANDroid backup (b) as it does not violate any licenses, but it has not been testeda) Google for the file "signed-dream_devphone_userdebug-img-14721.zip" It should be on the HTC support page for the ADP 1, but it wont be the first result in Google. It is not advised to use this method as you need to agree to a license prohibiting modification of the file in order to download it. Rename the file to "backup.zip"​b) Restore to a regular build that has all of the Google Apps (like the regular OTA cupcake update) and then run a NANDroid backup. Then make a zip file that only has the system.img file from the NANDroid dump and name the zip "backup.zip"​2) If you haven't already, unzip the entire contents of the gapps2zip.zip file into a directory. For sake of simplification, I am assuming it is unzipped to C:\gapps2zip
3) Place the "backup.zip" file in the same directory as the GApps2zip.bat file (C:\gapps2zip) and DON'T rename it or unzip it.
4) Open up a command prompt window (Hit Windows + R, type in CMD, then click OK)
5) cd to the directory in which the GApps2zip.bat file, utils directory and the backup.zip file. For example:
Code:
cd C:\gapps2zip
6)Type in "GApps2zip.bat" (without the quotes) and hit enter. Watch and wait.
7) If all goes well, you should have an update_gapps.zip folder in C:\gapps2zip. Put it on your SD card, make a NANDroid backup, and flash after flashing an AOSP (Android Open Source Project) build that doesn't include the Google Apps.
Credits
Cyanogen for his hard work and dedication
Maxisma for a similar script on which this is based
Google for their ingenious ideas (although their legal department can be a pain)
Everyone who is willing to test this script out
Everyone else xD
Redistribution
Feel free to redistribute the archive wherever you like, but please give me credit along with Maxisma and do not modify the archive in any way.
Great job unk!
amgupt01 said:
GApps2zip - Created by Ankush Gupta (twitter.com/unkzdomain and unkzdomain.com)
This script makes an update.zip file that only contains the Google Apps from the HTC release of the 1.5 firmware upgrade for the ADP 1. This update.zip should be flashable on any build and it should work without a problem, but since I'm just a n00b sophomore in highschool, I am naturally poor and can't guarantee anything.
Because there are already a few alternatives to this for Linux and the majority of Android users use Windows, I decided to make this a Windows-only batch script.
You MUST have the Java Runtime Environment installed in order to run this script! The signing utility requires Java and you won't be able to flash an unsigned update.
This script does NOT work on a build that includes the new market as there are some incompatibilities with the files for it and the ones provided by HTC (namely the MarketUpdater.apk for the new market). This is pretty much doesn't matter however, because all AOSP builds will not include ANY Android market anyways.
INSTRUCTIONS
1) Google for the file "signed-dream_devphone_userdebug-img-150275.zip" (It should be on the HTC support page for the ADP 1, but it wont be the first result in Google)
2) If you haven't already, unzip the entire contents of this zip file into a directory. For sake of simplification, I am assuming it is unzipped to C:\gapps2zip
3) Place the "signed-dream_devphone_userdebug-img-150275.zip" file in the same directory as the GApps2zip.bat file (C:\gapps2zip) and DON'T rename it.
4) Open up a command prompt window (Hit Windows + R, type in CMD, then click OK)
5) cd to the directory in which the GApps2zip.bat file, utils directory and the signed-dream_devphone_userdebug-img-150275.zip file. For example:
Code:
cd C:\gapps2zip
6)Type in "GApps2zip.bat" (without the quotes) and hit enter. Watch and wait.
7) If all goes well, you should have an update_gapps.zip folder in C:\gapps2zip. Put it on your SD card, make a NANDroid backup, and flash after flashing an AOSP (Android Open Source Project) build that doesn't include the Google Apps.
Credits
Cyanogen for his hard work and dedication
Maxisma for a similar script on which this is based
Google for their ingenious ideas (although their legal department can be a pain)
Everyone who is willing to test this script out
Everyone else xD
Redistribution
Feel free to redistribute the archive wherever you like, but please give me credit along with Maxisma and do not modify the archive in any way.
Click to expand...
Click to collapse
when it asks u to replace system.img, do you click yes or no?
Looks interesting ill test it out later
Guyver75 said:
when it asks u to replace system.img, do you click yes or no?
Click to expand...
Click to collapse
You click Yes. You shouldnt have extracted the zip though, but it won't make a difference anyways.
Looks interesting ill test it out later
amgupt01 said:
You click Yes. You shouldnt have extracted the zip though, but it won't make a difference anyways.
Click to expand...
Click to collapse
oh ok, oops. i clicked no. guess ill have to redo it
ok trying to understand this. From what i get is you download, Lets say cm 4.2 without google (made up rom dont go looking for it)
then you flash that to are phone.
next when flash update_gapps.zip
Then we will have a cm rom with google apks?
And in returns the update_gapps is kinda like a theme only adding the needed files?
xile6 said:
ok trying to understand this. From what i get is you download, Lets say cm 4.2 without google (made up rom dont go looking for it)
then you flash that to are phone.
next when flash update_gapps.zip
Then we will have a cm rom with google apks?
And in returns the update_gapps is kinda like a theme only adding the needed files?
Click to expand...
Click to collapse
Exactly. The only thing is that since this uses an official, legal source, it doesn't include the new market and stuff...
Ok cool but once 1.6 adp1 is out we will have to update the script and do this again?
amgupt01 said:
This script makes an update.zip file that only contains the Google Apps from the HTC release of the 1.5 firmware upgrade for the ADP 1.
Click to expand...
Click to collapse
I applaud your efforts to help the community. Many thanks.
For those who think this is proof modding and this community will live on, think again. What he's doing aids and abets violation of Goog's rights. This thread will be locked and the links taken down. Welcome to the new world of Android.
xile6 said:
Ok cool but once 1.6 adp1 is out we will have to update the script and do this again?
Click to expand...
Click to collapse
Well, provided that HTC distributes ADP 1.6 the same way as they are 1.5 and that the file dependencies for closed-source apps are similar, we could just reuse this same script with maybe a few minor modifications.
ytj87 said:
I applaud your efforts to help the community. Many thanks.
For those who think this is proof modding and this community will live on, think again. What he's doing aids and abets violation of Goog's rights. This thread will be locked and the links taken down. Welcome to the new world of Android.
Click to expand...
Click to collapse
How does it aid and abet to violations of Google's rights? I am basically linking to an official mirror (HTC) that is licensed by Google to distribute the files.
@ amgupt01
Thanx now all we got to do is let the builds continue.
great job mr. sophomore, you should get together with cyanogen on this although i'm sure he's probably going to do something similar.
is it safe to sign in to google with the newly created update_gapps2zip?
amgupt01 said:
How does it aid and abet to violations of Google's rights? I am basically linking to an official mirror (HTC) that is licensed by Google to distribute the files.
Click to expand...
Click to collapse
I think the issue is that Google doesnt want its closed source apps put on non google-experience phones. This guy's method allows just that.
Cyanogen's method (from what I can gather) is to run an app on your phone that backs up the apps that you have on your phone (presumably licensed copies that you acquired when you purchased your phone, or during an OTA update), and then restores them after you run his barebones ROM. In this manner, you are only using backed up copies of software you are entitled to use.
I read somewhere (maybe in Google's C&D? I'm to lazy to go look) that Google does not allow these applications to be copied or extracted or something to that affect.
Honestly, why on earth would we expect them to react any differently?! This is a growing pain. We will all be better for it when its passed.
Here's how I'm planning on riding this out:
1. When Cyanogen releases 4.2, I will unroot my phone, and get the most recent OTA update from Tmobile.
1. Install Cyanogen's 4.2 ROM, using whatever method of installation is required to back up my closed source applications and restore them.
2. Continue to update Cyanogens ROMs this way until we discover that our old closed source apps are no longer compatible with our state of the art ROM.
3. Begin to seek out alternative apps, or check progress of the new "Open Android Alliance" or whatever those guys are calling themselves since this whole fiasco started, to see how feasible that option is.
4. Buy a new phone? I mean, how far down the road are we talking here?! And yes, when the time comes, assuming Google doesn't do something completely draconian that makes us pine for the good old days when they sent a C&D to Cyanogen, it will be another Android phone (subsequently rooted, of course)
I don't really see another legal option.
Code:
Cyanogen on twitter
So I think I've come up with a solution that should work and not violate any licenses. Just need to polish it up a bit.about 14 hours ago from twidroid
Thanks for this script.. i am amazed of how fast the community is getting up from the C&D .... Open Android Alliance is kicking off, Maxima is already out with a NO Google ROM, and this script, to get google's apps... wonderful...
amgupt01 said:
How does it aid and abet to violations of Google's rights? I am basically linking to an official mirror (HTC) that is licensed by Google to distribute the files.
Click to expand...
Click to collapse
amg, I'm worried on two fronts.
1, HTC is redist'ing Goog bits. They may very well get a c&d. I can't imagine HTC has a license to freely distribute them to anyone and everyone. I have to believe the license is for use on HTC hardware, not any user worldwide as download and extraction would allow.
2, you are aiding in the grabbing of those bits that a user may not have license to.
Granted, I know the vast majority of us have license. But there a few non-Goog experience phone owners around here. I suspect the mods will lock down.
But again... I think that would be wrong. We have license to the bits and grabbing them from HTC is not a violation IMO. But we'll see.
Thank you.
amg,
From the HTC license page when you download:
-----
You may not copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Google Software or any part of the Google Software. You may only load the Google Software onto the Android Developer Phone 1, and except in conjunction with third party software that makes up the Android system image, you may not combine any part of the Google Software with other software, or distribute any software or device incorporating a part of the Google Software.
-----
So it's clear this is illegal. I think HTC will have to pull this down sooner or later as widespread extraction starts.
btw, I think you're fine. HTC will hear from Goog and this thread will be locked. But otherwise don't worry.

Motorola Stock Apps

Hi,
does anyone know where i can get a Full Package of the Original Honeycomb Motorola Stock Apps? Just have a Xoom from a friend here, Flashed ICS from Team Eos, and now he anxious want's the Original Motorola Apps again.
Especially he Stock Filemanager.
Can i download them from anywhere? Or have i to flash back to HC, and backup the apps? If yes, does it work with Titaniumbackup?
So that i can get the clean install-apk's, not the orginial which are integrated into the system?
thanks in advance
Cant help you sorry. But would also like the default File Manager back for posterity. Apparently it is only the non US model that actually cam with the file manager in Honeycomb 3.2 update. US versions never had it and everyone will tell you to download a file manager from the market!! But the stock one was very simple and intuitive so I like it and want it back too.
Hey guys!
I managed to get the file manager that came in the Honeycomb stock motorola, ROM, but I can not install!
I've tried putting the file directly in the "app", I changed the permissions for all possible combinations, and nothing... I've been researching and I think the problem is that such "android manifest" it determines the sdk to target 11 and the ICS is 15 .. but can not edit the xml. I'll leave the apk here, if someone can help: http ://dl. dropbox. com/u/28574144/FileManager. apk
I liked it too, because it was simple. But I then realised it was not tablet optimised, so much slower to navigate.
miss stock apps too
matheusferreira said:
Hey guys!
I managed to get the file manager that came in the Honeycomb stock motorola, ROM, but I can not install!
I've tried putting the file directly in the "app", I changed the permissions for all possible combinations, and nothing... I've been researching and I think the problem is that such "android manifest" it determines the sdk to target 11 and the ICS is 15 .. but can not edit the xml. I'll leave the apk here, if someone can help: http ://dl. dropbox. com/u/28574144/FileManager. apk
Click to expand...
Click to collapse
Not sure if anyone would be still interested in this but I got the stock File Manager back!
I've "reseted" my xoom back to 3.0.1 version. The File Manager apk provided wouldn't work but after an update to 3.1 version that nice stock File Manager apk just showed up automatically. No need for apk installation or anything.
Anyway thanks buddy for providing this link!

Customizing a cyanogenmod rom

I have made several CM10 Nexus 7 roms using the repo sync to cm's repositories. I was wondering how best I can make the rom my own so that it what me and my friends find useful.
I would like to be able to change the meta inf updater script for example to say "Fallon Rom"
or include supersu, not superuser.
(obviously no paid apps)
is there a way to include an app as a user app so that if the user wants to get a paid version it is easy? (eg romtoolbox lite --> rom tool box pro)
Lastly, how can i best make this apply to each release. Can I make a folder that will then get included in future builds (so i don't have to manually unzip the rom and change stuff)
Thanks for any responses. :highfive::highfive::highfive:
edit: and how can i include hillbeast's 720p camera mod
i am also planing on including gapps. How best to include them (or is staying separate that much more preferable)
anyone??
Can anyone give any tips?

ZTE V975

Hi all.
I have a new ZTE V975 and i have it root and with gapps but i have a problem with Play Store compatibility. "Financial" apps aren´t compatible with the phone. I think that it is a location problem in build.prop
The problem is that i dont know modify it.... can someone see this build.prop archive to see if can change it to improve compatibility?
If someone want to see it i can upload it.
Thx.
gargamelxda said:
Hi all.
I have a new ZTE V975 and i have it root and with gapps but i have a problem with Play Store compatibility. "Financial" apps aren´t compatible with the phone. I think that it is a location problem in build.prop
The problem is that i dont know modify it.... can someone see this build.prop archive to see if can change it to improve compatibility?
If someone want to see it i can upload it.
Thx.
Click to expand...
Click to collapse
Hi gargamelxda,
I've got the same phone and noticed the same thing with certain apps on the play store. Basically what I found was the device was missing a bunch of Google support files that were in GAPPS zip. Now I wasn't able to flash the GAPPS.zip file through the built in recovery as it wasn't signed correctly for this phone and there is no custom recovery available yet.
What I ended up doing is extracting the GAPPS zip file to my SD card then used the root explorer function in ES File Explorer to mount /system as RW and move the majority of the extracted /system files to the same location in the device root /system folder. Couple of things to remember though:
1) Don't overwrite anything that's already there (there was only 2 or 3 files already there by memory)
2) If the folder already exists don't copy the whole folder but rather all the files under that folder as you may either stuff up the folder permissions or create a new folder as the android file are case sensative (eg the folder "Apps" is different to "apps")
3) There are some apk files you won't want to copy like the "onetimeinitializer.apk" file as it will run the google first time initialization next time you reboot which may stuff up your settings (although if you're planning on doing a factory reset after doing this it should be OK and all the changes you've made will stick as they're in the /system folder). I also found that if I copied "LatinIMEDictionaryPack.apk" and "GoogleTTS.apk" they would constantly crash after the reboot.
4)Make sure you set the permissions after you're done copying to "-rw-r-r--" for the files and "drwxr-xr-x" for any new folders you create. you can do this individually with ES File Explorer but if you're ok with linuix command line you can do it in batches (eg all files with the apk extension) via the Android Terminal Emulator app or ADB Shell over a USB connection to a PC. I don't remember the exact command lines I used but if you do some searching on this forum you'll find them easy enough.
After a reboot the apps should now be available to install (at least they were for me) via the Play Store.
Usual disclaimer - If you stuff this up you may brick your device and I'm in no way responsible for it.
Hope that helps
Cheers
Browney
I spent a few days trying to install Google Play the cyanogenmod way, following instruction on a spanish site similar to what other's have posted here. The idea is to mount the readonly systemfolder using the bootloader and insert/write systemapps into system/apps
I succeeded but for some reason launching google play was killed instantly by some resident app on the phone.
On the MIUI forum somebody called Eric Xiang built a google play apk that kills the resident blocker and installs googleplay !
xttp://en.miui.com/thread-3998-1-1.html
I now have a fully operational V975 (4.2.2) with the latest official build B06 and google play.
Out of the box the phone is unlocked but not rooted.
To root it, install xttps://dl.dropboxusercontent.com/u/15286951/update.zip using the bootloader (vol+ and power on, when v975 wakes up release power but keep vol+ pressed for a few seconds more, then browse to update.zip. Obviously you preloaded the zip on a sdcard.
If ZTE release firmware B08, you'll have to root it again.
Battery life is excellent, as well as speed, camera, GPS fix is instant. I had a iocean X7 that i killed trying to get the gps working, but v975 feels a lot faster vs the X7's MTK 6589 quadcore 1.5ghz. Granted there's less pixels to move around.
One caveat : iCoyote does not install because of binary incompatibility ? This is an x86 device.
I also discovered the existence of AmazonMarket. Not as complete as GAPPS, but a nice fallback market. And most of the google stuff is installable by apk anyway, so living without GAPPS was not as bad as it looked.
Thx to Eric Xiang, his app prolly opens up all androidphones to googleplay, chinese phones can flood the rest of the world now
the above was two days of research guys, enjoy it !
GlennRunciter said:
I spent a few days trying to install Google Play the cyanogenmod way, following instruction on a spanish site similar to what other's have posted here. The idea is to mount the readonly systemfolder using the bootloader and insert/write systemapps into system/apps
I succeeded but for some reason launching google play was killed instantly by some resident app on the phone.
On the MIUI forum somebody called Eric Xiang built a google play apk that kills the resident blocker and installs googleplay !
xttp://en.miui.com/thread-3998-1-1.html
I now have a fully operational V975 (4.2.2) with the latest official build B06 and google play.
Out of the box the phone is unlocked but not rooted.
To root it, install xttps://dl.dropboxusercontent.com/u/15286951/update.zip using the bootloader (vol+ and power on, when v975 wakes up release power but keep vol+ pressed for a few seconds more, then browse to update.zip. Obviously you preloaded the zip on a sdcard.
If ZTE release firmware B08, you'll have to root it again.
Battery life is excellent, as well as speed, camera, GPS fix is instant. I had a iocean X7 that i killed trying to get the gps working, but v975 feels a lot faster vs the X7's MTK 6589 quadcore 1.5ghz. Granted there's less pixels to move around.
One caveat : iCoyote does not install because of binary incompatibility ? This is an x86 device.
I also discovered the existence of AmazonMarket. Not as complete as GAPPS, but a nice fallback market. And most of the google stuff is installable by apk anyway, so living without GAPPS was not as bad as it looked.
Thx to Eric Xiang, his app prolly opens up all androidphones to googleplay, chinese phones can flood the rest of the world now
the above was two days of research guys, enjoy it !
Click to expand...
Click to collapse
Some Qs about this phone,
Does is sync. with google server ? for example does the gmail contacts sync. ok to the phone ?
Did anyone tried to install an email apk (like touchdown) and sync. with exchange server ?
popular apps like whatapp & waze works fine ? any issues with other apps ?
Does the phone has a notification Led ? can it be configured by app. to indicate with desiered color per incoming event ?
thanks!
google play
GlennRunciter said:
I spent a few days trying to install Google Play the cyanogenmod way, following instruction on a spanish site similar to what other's have posted here. The idea is to mount the readonly systemfolder using the bootloader and insert/write systemapps into system/apps
I succeeded but for some reason launching google play was killed instantly by some resident app on the phone.
On the MIUI forum somebody called Eric Xiang built a google play apk that kills the resident blocker and installs googleplay !
xttp://en.miui.com/thread-3998-1-1.html
I now have a fully operational V975 (4.2.2) with the latest official build B06 and google play.
Out of the box the phone is unlocked but not rooted.
To root it, install xttps://dl.dropboxusercontent.com/u/15286951/update.zip using the bootloader (vol+ and power on, when v975 wakes up release power but keep vol+ pressed for a few seconds more, then browse to update.zip. Obviously you preloaded the zip on a sdcard.
If ZTE release firmware B08, you'll have to root it again.
Battery life is excellent, as well as speed, camera, GPS fix is instant. I had a iocean X7 that i killed trying to get the gps working, but v975 feels a lot faster vs the X7's MTK 6589 quadcore 1.5ghz. Granted there's less pixels to move around.
One caveat : iCoyote does not install because of binary incompatibility ? This is an x86 device.
I also discovered the existence of AmazonMarket. Not as complete as GAPPS, but a nice fallback market. And most of the google stuff is installable by apk anyway, so living without GAPPS was not as bad as it looked.
Thx to Eric Xiang, his app prolly opens up all androidphones to googleplay, chinese phones can flood the rest of the world now
the above was two days of research guys, enjoy it !
Click to expand...
Click to collapse
Hey
I'm going to get this phone in the next few days. As far as I know, for 99%, I'm not going to have Google Play on it.
What is the easiest way to install Google Play on it?
I already downloaded B06 since I want to have the latest build.
New ROM´s
Hi, i aplied root, instaled recovery and now search custom ROM´s, Where are thete?
help
Hi... how to root zte v975?
Please help..

Copy LG apps to OnePlus6

Hi guy’s,
I’m running a stock standard (not rooted) OnePlus 6 running Android 9.0.7. I have just upgraded from an old LG G2 running Android 5.0.2
I was wondering if any one can tell me if it is possible to copy a couple of LG apps from my old LG G2 phone to the new OnePlus 6.
I would really like to copy the Contacts, Messaging, File manager Phone & Gallery apps if it’s possible across to the new phone. I have tried to copy the *.apk files for some of these apps over to the phone using file manager and execute them but this fails. I have also used the same method to copy another app such as ZDNet as a test case and that works ok. I’m at a bit of a loss as to what to try next. Is this even possible & can anyone suggest anything ? I’m new to this so if you can keep any replies relatively simple I would appreciate it. I would really appreciate any help I can get, thank you.
c843861 said:
Hi guy’s,
I’m running a stock standard (not rooted) OnePlus 6 running Android 9.0.7. I have just upgraded from an old LG G2 running Android 5.0.2
I was wondering if any one can tell me if it is possible to copy a couple of LG apps from my old LG G2 phone to the new OnePlus 6.
I would really like to copy the Contacts, Messaging, File manager Phone & Gallery apps if it’s possible across to the new phone. I have tried to copy the *.apk files for some of these apps over to the phone using file manager and execute them but this fails. I have also used the same method to copy another app such as ZDNet as a test case and that works ok. I’m at a bit of a loss as to what to try next. Is this even possible & can anyone suggest anything ? I’m new to this so if you can keep any replies relatively simple I would appreciate it. I would really appreciate any help I can get, thank you.
Click to expand...
Click to collapse
The LG system apps may require there framework to run correctly. Try to download the newest version from Apkmirror and see if that will work.

Categories

Resources