Can't open .apk file on android device - android

I created a mobile application using kivy, but after having it installed on android device, it does not launch. Below is the buildozer.spec file.
title=Translator
package.domain=org.test
source.dir=.
source.include_exts = py,png,jpg,kv,atlas
version=0.1
requirements=python3,kivy,requests,bs4 #I used requests and bs4 libraries for webscraping purposes, I'm not completely sure that I do not need any other requirements for internet connection.
orientation=all
osx.python_version=3
osx.kivy_version=2.0.0
fullscreen=0
android.arch=arm64-v8a
android.allow_backup=True
#then some ios speceific settings which I think are not important as my device is android.
[buildozer]
log_level=2
warn_on_root = 1
I created the apk file, installed it on my android device, but when I click on it, it just does not launch. I dont really understand why, I was thinking that I didn't pass requirements that enable the app to use internet connection, or that it does not launch because of my phone settings. How can I solve this issue? Any help is appreciated a lot.
UPDATE
I actually tried to install another python/kivy program on android phone not involved with web scraping, and it worked. So I guess I put wrong wrong requirements in the buildozer.spec. But I wonder if there are some requirements that MUST be included besides the module names that are used to build the app. Any help?
UPDATE ON UPDATE
I found this line in the buildozer.spec file:
#android.permissions = INTERNET
and I put that line out of comment. But still that did not help any way. After installing the app on my phone, it just won't launch. Now I have no idea what I can do to solve this issue. Any ideas or advices?

Related

Set up root emulator android

I need to block access to my android application on rooted devices. So when the app is launching I check if there is a file named "Superuser.apk" on the device (see the post of this solution here). If the file exist the application quit.
But here is my real problem, I want to test this feature and I don't want to root my own device. So I was wondering if there is a way to root an emulator on Android Studio to try it ?
I checked a lot of topic on internet, but every post I saw was about how to root a real device.
Is someone there know if it's possible ? And if yes, how?
Thanks in advance !

Debug Android system app?

I'm trying to create a (root) app in /system/app, but having an issue that I can't resolve without seeing some errors and debugging to see exactly where it's going wrong.
If I run from Eclipse, errors are expected however, as the app won't have appropriate permissions.
How can I run a local (/system/app) installation, and somehow see what's going wrong?
Can it be done from Eclipse? I had a look at this - but it's so poorly formatted I couldn't make sense of it. If it can't - is there some way to print errors as text?

How to create batch command for : compile + sign + install + run

Background
As it turns out, it's quite an annoyance to test out in-app-billing (i've written about it here) . Each time you find a bug and need to test your app, you must have the following steps:
compile the app , preferably with the debuggable="true" flag on the manifest
sign the app with your real key you've created for the play store.
install the app on your device
run the app on your device, preferably debugging it via eclipse.
If you'd use a batch operation instead of doing all of those by yourself, it should make things easier to test such apps, and might also be useful for other apps as well.
The question
Is there any way to make the whole process fully automatic, so that with a single click of a button, it will do all of the above?
I know how to achieve 3+4 (using "adb.exe install -r *.apk" and "adb.exe shell am start -n FULL_ACTIVITY_PATH" ), but I don't know how to achieve the others.
If there is a solution that doesn't involve a third party app or plugin (like maven or Ant), it could be very nice. Of course, if that's what is available, I would like to know if it's possible to achieve via a batch file that will use them somehow.
Is there maybe a way to mimic how Eclipse does things in this regard, without being so specific on the project (maybe just the path of the project and that's it)?
Maybe you can package app by ant . You can do every thing you what int the ant code of packaging ,causing the core code is to make property configs in your app and referenced lib, such as build.xml,local.properties...,and replace channel in AndroidMainfest.xml ,so you can also replace any code in your android app,just as you want ,to change the flag of debug , because all the operation just handle local file before packaging your app,you can copy or modify any file in your app. After above process ,you get a app,then you can run other code to install the app. Recently ,I have been using the batch package method to get a lot of app for different channel .so hope it helps.

Including a package in android source code

I am modifying CyanogenMod (CM 7) Source code,
i want to include "Cyanogen/packages/apps/phone/src/com/android/phone/CallNotifier.java" in the "Cyanogen/frameworks/base/policy/src/com/android/internal/policy/impl/LockPatternGuardview.java" file. I added "import com.android.phone.CallNotifier;" in the LockPatternGuardview.java file and upon compiling i get this error.
LockPatternKeyguardView.java:20: package com.android.phone does not exist
import com.android.phone.CallNotifier;
^
But CallNotifier.java is included in the "com.android.phone" package, so if someone can please tell that how to include com.android.phone package ?
You can't include com.android.phone, it's hidden.
You might be able to access it via reflection but in most cases, the telephony stack is setup so that it's running in a different process and you won't be able to access anything meaningfull.
In development case, android api is consisted of collection of abstract class. And the implemented class kept on android os. So that when you use android api, during execution it actually call that implemented classes from android os. Therefore, you actually implement that class, but it unable to find that class from os.
It'll happen if you install this app as third party, try to push your app in /system/app/ path, and reboot your device. It'll be installed.
System folder always stays in readonly mode.
Search on google about push to system tutorial.
Good luck...

Dokan (DokanNet.dll) on Android/Monodroid - Code Migration Issue

Context:
I have an windows desktop app(c#) which loads the dokan libraries , creates a new file system/drive each time it runs, and then deploys financial data files & copywrite protected files in the newly created drive - Allowing only limited process (declared by me) to have access to these files in newly created file system(using dokan).
Now we are migrating the same C# code to android. Though the code doesn’t give Errors, (while running apk)the new drive is not created. While i could debug only to an extent (suddenly get out of debugging mode)
Assumptions for the issue:
Permission issues:
Question:
Does Dokan work with Android? How to go about this, if it’s a permission issue? In market place, most of the devices installing my app may not be "rooted"!!
Has anyone implemented new file system/drive using DokanNet on Android/Monodroid and faced with similar issues? Solutions???
When using a tool it's a good idea to have some basic understanding of how it works. Dokan works by installing Windows filesystem driver. On Android there's no concept of drives and mounting anything to the filesystem is not possible (without building custom kernel and installing it on device). Consequently your idea is DOA on Android and you need to look for other ways to deal with your data.

Categories

Resources