Remove Phone application from Android emulator? - android

How do I (forcibly) remove the stock android Phone application from the emulator instance?
I would especially like answers from people who have actually successfully removed the Phone application.
Removing the Phone application probably also necessitates removing the Contacts application, as they are tightly integrated, that is fine.
Solution
After much research it seems the only solution is to rebuild the Android SDK from source, as Maciej Pigulski answered.
After fetching the android source, remove Phone and Contacts from the Android makefile build/target/product/core.mk. And build the SDK as usual, i.e.:
. build/envsetup.sh
lunch generic-eng
make sdk
And in out/host/linux-x86/sdk you will have a zip file containg a fresh new sdk ready for use in e.g. Eclipse.

I successfully remove Phone apps WITHOUT rebuilding the SDK (very long op...)
You can edit you system.img in your SDK (located for ex : ~/android-sdk-linux_x86/platforms/android-10/images/system.img) corresponding to the system part of your emulator ( Phone apos is located at /system/apps/Phone.apk)
I launched the emulator, connect with adb to the emulator shell. I removed the packaged /system/apps/Phone.pak after remounting the system partition with read/write option ( mount -o rw,remount /system /system )
I push into my emulator the mkfs.yaffs2 tools compiled for arm found here (http://code.google.com/p/android-group-korea/downloads/detail?name=mkfs.yaffs2.arm)
use this tools to recreate my system.img in my emulator shell:
mkfs.yaffs2 /system /sdcard/system.img
pull the /sdcard/system.img into my PC. Replace the system.img of the emulator (~/android-sdk-linux_x86/platforms/android-10/images/system.img) and restart the emulator.
The Phone app is Gone!

I have an idea how this could be done but this is not an easy way.
It requires source code of the Android OS you need an emulator for. Then in the make files you can disable including of the Phone application to the output image and build the OS with 'make sdk' task. This will produce an SDK (like ones available from the Google site) with the binaries that has Phone application excluded. Then when you will create an emulator with this SDK it wont have the Phone.apk.
Painful but if you really need it, give it a try.

If you have root acces you can remove the .apk file that provides this app. You would have to look around in the folders on the device where it is installed.

It may be necessary to re-compile the Android OS that is running on the emulator. During the compile the default apps are rolled up into the build so it would be a matter of getting the egg before the chicken... or killing the chicken before it lays the egg...

Related

Is it possible to Install Android Package (.apk) on the emulator without access to sources?

I think the answer is No but I’m not 100% sure as I’m a newbie with Android SDK.
So, I downloaded adt-bundle-linux-x86-20140702 to my CentOS 6.5 machine. Following the documentation, I was able to create an AVD using ‘AVD Manager’ interface (using the eclipse binary).
I’m able to view my AVD that I created by running emulator -avd <name>.
I have a .apk file which I didn’t build but downloaded from a website (I don’t have the source code). If I would like to load this .apk into my emulator to see how it works, is it something that’s doable? If yes, may I know the steps please?
Many thanks in advance.
Update:
Following this link, I tried:
adb install /path/to/my.apk
which returns,
“failed to copy ‘/path/to/my.apk’ to ‘/data/local/tmp/my.apk’: No such file or directory”
I also tried copying /path/to/my.apk to the directory where adb is located. I created a /data/local/tmp directory as well with the same result. Perhaps, it’s looking for /data/local/tmp on the AVD (?). Not even sure if it is a compatible issue with the device/target/cpu configured on my AVD ..
Appreciate any help.

Android Studio AVD Manager Creating AVDs in root directory

I am using Android Studio with Ubuntu and it won't create AVDs. Nothing gets created in my ~/.android/avd directory. Instead things are getting created in my /root directory. Which I guess I wouldn't care about, except of course it can't run the emulator for these AVDs if the AVDs are in my root folder. I think it's because for the Android SDK manager to be accessed in Linux, Android Studio has to be run with sudo...but then it puts the AVDs in root instead of home...
I have a few pics outlining this problem very clearly, but stackoverflow won't let me even link to them without 10 rep, what a nuisance of a restriction.
EDIT: Here is the error I get in my terminal when I try to execute the android bash script located in /opt/android-studio/sdk/tools/. It's the same error whether or not Android Studio is open or not.
ss108 tools$ bash android
java.lang.NullPointerException
at java.io.File.<init>(File.java:277)
at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1516)
at com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:1492)
at com.android.sdklib.internal.avd.AvdManager.<init>(AvdManager.java:346)
at com.android.sdklib.internal.avd.AvdManager.getInstance(AvdManager.java:369)
at com.android.sdklib.internal.repository.updater.UpdaterData.initSdk(UpdaterData.java:252)
at com.android.sdklib.internal.repository.updater.UpdaterData.<init>(UpdaterData.java:120)
at com.android.sdkuilib.internal.repository.SwtUpdaterData.<init>(SwtUpdaterData.java:61)
at com.android.sdkuilib.internal.repository.ui.SdkUpdaterWindowImpl2.<init>(SdkUpdaterWindowImpl2.java:104)
at com.android.sdkuilib.repository.SdkUpdaterWindow.<init>(SdkUpdaterWindow.java:88)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:407)
at com.android.sdkmanager.Main.doAction(Main.java:390)
at com.android.sdkmanager.Main.run(Main.java:150)
at com.android.sdkmanager.Main.main(Main.java:116)
The AVDs are created under /root because you are starting Android Studio with sudo. You need to configure the permissions so that this isn't required. The simplest solution that I have found is to install Android Studio and the Android SDK as my regular user. I install these into $HOME/bin so that I don't have to bother with permission issues at all. When everything is installed, my regular user account has execute permission for all the files I need.
Alternatively, you can use chmod (either manually or with find) to set the permissions on Android Studio and Android SDK files.

Android install apk on phone

I have a game I built in eclipse and now want to install on my phone.
I downloaded ASTRO per an example in YouTube, then copied the .apk file to the SD Card, went to the phone, found it try to install it but it seems like it doesn't recognize it because it does not give me the option to install although I can browse through my assets, drawables etc...
Am I missing something? I just want to download it to the phone ... but all I see is a black list under summary with no description and no button to click on for "Install".
try installing it via adb. Type
'the path to your adb on the pc - it's located in the platform-tools directory of the sdk' install 'the path to your apk on the pc'
in the shell. i.e
adb install myapp.apk in case the path to your adb installation is in the system path and your current directory is the one with the apk.
If you develop i think you got android sdk set up, try to fire up install from the command line by using : adb install
Make sure adb is in your path and your phone has development settings turned on.
you can also open it using the webrowser
using file:///sdcard/bla.apk
If you can browse your assets etc then it sounds like you used long-press in Astro and then told it to 'Extract'. This doesn't install the app, it simply unpacks the apk into its component parts.
Do a 'short-press' (click) on the apk file with Astro and it should give you the option to 'Open App Manager'. This should allow you to install it.
I had this happen to me and this is what I had to do to fix it. Since the option to install is grayed out you need to edit your AndroidManifest.xml and tell Android what sdk version it targets. The version on your phone is probably 2.1 and you have been developing on 2.2. This is what you need to insert into the manifest file.
<uses-sdk
android:minSdkVersion="7" android:targetSdkVersion="8" android:maxSdkVersion="8">
</uses-sdk>
Renaming the .apk to some other extension is not enough to enable beaming. Android will look into the file. You must rename the file then zip it. After that a beam will work and just reverse the process before installing on the device.
This is quite a pain because I beam my apk hundreds of times while testing. On my desire with froyo it was allowed but now on my nexus s with gingerbread it is blocked.
Just figured out you can email the apk to your gmail account as an attatchment and you can install the apk straight from the email. When you open up the email scroll to the very botton and you will see a "Install" button. it's a quick and easy solution.

eclipse won't create adt project due to 'access denied'

I installed JavaEE, JDK, Eclipse 3.5.x (Galileo), the Android Starter SDK, and the current ADT all with no problems. However, when I try to walk through the 'Hello Android' tutorial, I bring up the New Android Project wizard, fill it in and hit 'Finish'.
After a moment, it comes back with a message saying there was a problem at path X:\so and so\ (access denied).
Things to note:
-Running Windows 7 Home Premium 64-bit
-Quadcore Pentium with 8GB RAM, 8TB NAS
-I am an Administrator
-I have also tried this by activating the full (hidden) Administrator profile
-I have reinstalled everything 8 or 9 times
-I have changed ownership & permissions all over the place
-I have launched eclipse in 'Run as Administrator' Mode
-I have installed Everything as 32-bit, as others have done this successfully
Eclipse creates the folder it's having a problem with, but then cannot work with the .project file it creates (access denied). It then can't save anything so there is nothing but an empty folder 'Hello_Android' on the left within Eclipse.
Anybody have any clues about what is going on-- I'm frustrated. I want to get into this, and I've looked EVERYWHERE on the net trying to crack this nut.... but I need help.
-J
Hmmm. Interesting.
I would double-check permissions on the folder X:\so and so\ and ensure that the Administrators group and/or your account has full control.
Have you tried creating the project outside of the users or systems environment? You know in c:\myprojects
Windows7 and creating/saving files in program files or documents can be a PITA.
Turned out to be a bug with how eclipse is written. I've developed a workaround.
The problem is that eclipse can't write to hidden files, unhide them and it should work.

How to make an EXE file using .apk file

am almost done with my project in android, now I want to make the executable version of the application.
I need to demonstrate it in .exe form as soft app as on emulator, not by built and debug process from eclipse.
what the op is asking for is simple - he wants to create a MS Windows program file that runs just like the APK he's made.
Unfortunately this cannot be done. The only way to 'show off' your program is as people have stated:
Through the emulator on Windows
On an acual device (Once installed, you can disconnect the device from the computer and use it like a normal app)
You can't convert an APK file into a .exe file. APK files hold Android apps as self-installable files already - opening an APK file on a phone or the emulator will start the installation process. It sounds like you just want to sign the app with a 'proper' key rather than using a debug key. To do that, read the official page on signing apps.
You don't need to create a .EXE file for doing what you want. You can just create a bat file that executes adb commands that will: install and start your application in the emulator. I guess, the problem here is that you don't understand how the APK files work... I'm just saying.
OK... in order to install an Android application using adb (which is basically what Eclipse does in the background) you need to do this:
adb install path/name_app.apk
Then, you can start the application by using adb shell am command. You can find info here: http://pdk.android.com/online-pdk/guide/instrumentation_testing.html
Another thing you have to take in account is that you will have to run the AVD before installing and executing your application: http://developer.android.com/guide/developing/tools/avd.html
All those commands you have to execute (may be using a .bat file as I mentioned before) are executables that you can find in the android-sdk\tools directory.
When I have a client that want's to show an app, at conference for example, I always use Bluestacks it's not perfect but it allows you to run android apps on your computer without doing all the technical stuff (like installing an emulator etc).
To install an app on your you computer using the Bluestacks device/emulator you simply click on the apk.
http://bluestacks.com/
Once you create a project/application in Eclipse then along with this you also have created the .apk file. Android can run .apk files, so go to the place where your project have been saved and open it, like this Open Project -->bin-->.apk.
Now send the .apk file to your android phone through Bluetooth or copy it.

Categories

Resources