Debugging a Kivy android app using BlueStacks - android

I'm building my apk using Buildozer in Ubuntu. But I am more comfortable using BlueStacks in Windows for the testing purpose. My app crashes after it starts with no apparent signals. How can I debug it using BlueStacks?

There's a debug tool with file name: HD-Adb.exe in Program Files (Program Files (x86) in Win64) path of BlueStacks. When you run this tool, you could see all what happens behind the android emulator. It's easy to debug your app then. To run the tool open command line in Windows and type the following lines:
> cd "c:\Program Files (x86)\BlueStacks"
c:\Program Files (x86)\BlueStacks>HD-Adb.exe logcat
I really had hard time trying android sdk emulator and other things. But this works great! Enjoy debugging.

Related

Run XSLT-script on android smartphone and/or tablet

I have a relatively simple question:
Is there a possibility to run an xslt-script on an android device? I have an .xml file, using a .xsl script to create a new .xml file.
On windows I am using saxon, which works good, but as I don´t have always access to it I would prefer to run a script on my android phone and/or android tablet.
I did some research with google and also on this site, but i didn´t found any clear answer.
thanks in advance and greetings
I have now found a way to run both Saxon-JS 2 or rather its command line tool xslt3 as well as Saxon HE Java from a command line terminal for Android.
I installed Termux, I had to use the version from F-Droid, as the one on the Google play store seems to be no longer supported, then in the Termux terminal shell I installed node and java (try to run with e.g. ˋnodeˋ and it will tell you the ˋpkg install ...ˋ command line to install, then I did e.g. ˋnpm install -g xslt3ˋ to install Saxon-JS's command line tool and downloaded the Saxon HE 11.2 Java zip from Sourceforge with wget and unzipped it and finally I am able to run e.g. xslt3 to run Saxon-JS or java -jar path-to-saxon11jar to run XSLT 3 (or in the case of Saxon Java of course XQuery too.
The interaction with the rest of the Android file system is a bit complicated to find out but the Linux Terminal shell has its own file system with a storage folder with sub folders like storage/download linked to the usual download folder other Android apps (e.g. your browser) use.
Here is a screenshot of Termux on my Android tablet showing the execution of Saxon HE 11 Java and Saxon-JS 2: .
It turns out the same procedure doesn't work quite as well on my Android phone which has Android 12 as the running Java and therefore Saxon HE 11 or any other Saxon Java HE currently does not work due to a known issue https://github.com/termux/termux-packages/issues/7332. But Node.js and npm and therefore Saxon-JS with xslt3 run fine on that phone.

Python Android Development

I'm trying to run a simple hello world app as a start of python in android,im an intermediate in python,never tried python in android but i want to run it in my phone, but i've tried, researched, i've installed kivy, and all its requirements in its original website, my main error is down below, im on windows 10, and i try this apt,sudo and dpkg thing none of them are recognized as an internal or external command(i do these in command prompt, should i not?),i have the buildozer.spec file in lib but couldnt find a way to edit, i've also tried other ways im really stuck here, my android version is 5.0.1 if that helps, please help im stuck.
C:\Program Files\Python37\Lib>buildozer android debug deploy run
I Check configuration tokens
[91m[1mBuildozer is running as root![0m
[91mThis is [1mnot[0m [91mrecommended, and may lead to problems
later.[0m
Are you sure you want to continue [y/n]? y
Unknown command/target android_old
You should download the kivy virtual machine at https://kivy.org/#download (It's at the bottom). Import the machine into virtualbox. If you don't have virtualbox installed, you can download it at https://www.virtualbox.org/wiki/Downloads. Get your application files into the virtual machine, and run buildozer init in your project directory. Edit the buildozer.spec file, and run buildozer -v android debug.
Worked for me. Hopes this helps. :)

Cordova emulator not starting

I am trying to use the Android emulator to install an app on it.
Unfortunately the emulator is never starting up. I use the following
command in my cordova project:
cordova emulate android
The last output I get from console is:
Waiting for emulator...
But the emulator does never start (I waited 45 minutes now).
The path variables are all correctly set and I can start the
emulator using Eclipse or Android studio but not using the
command from cordova.
Any hints?
If you can start the emulator through android studio, then as a work around start the emulator outside and run the command
cordova run android
It will deploy your app in the already running emulator.
Check emulator path settings
https://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_index.md.html
If not able to execute then do :
use the alternate shell interface:
$ /path/to/project/cordova/run --emulator
Instead of relying on whichever emulator is currently enabled within the SDK, you can refer to each by the names you supply:
$ /path/to/project/cordova/run --target=NAME
Check the documentation above and see whether your PC supports virtualization or not.
I was getting the same issue, I resolved it by:
Open Android device manager, click on window -> Android Virtual Device Manager
There you will see listing of all the Android Virtual Devices, if you see any device with repairable icon on it, just click on repair and then try. It works.
I had the same problem. Though cordova started the emulator, the command line kept on saying 'Waiting for emulator...' forever.
The trick is, before running the command:
cordova run android
make sure you navigate into the android platform folder. That is, don't run the command from within the
/project folder
but instead from within
/project/platforms/android folder
That will launch your application in the Android emulator

Install .apk file to Android Emulator on a Mac

I'm new to Android and I was given some .apk files (not created by me) with malware that I'm trying to run on the Android emulator for testing purposes (trying to get app's system call data using strace).I have checked several places online, but I'm stuck trying to install the .apk file. When I run the following command :
./adb install filename.apk
I'm getting this error:
Failure [INSTALL_FAILED_DEXOPT]
Any help is greatly appreciated!
Just Drag and drop apk into your Android emulator. its automatically install by it self.

Flash Builder "Burrito" : apk : invalid_apk , "parse error"

I've created an app in Flash Builder "Burrito". When I run the application there are no project warnings or errors. The .apk was compiled successfully. The emulator is running Andorid 2.2. However, when I push the .apk to the emulator I get "Invalid Apk" error.
I tried installing it into Galaxy Phone (Android 2.2) , de time i got "Parse error "
any1 had the same problem resolved ?
The .apk file generated by flashbuilder will not run successfully on the emulator. You have to generate an "emulator apk" using the adt.bat located in the bin directory of your AirSDK.
copy your files (appName.swf, appName-app.xml, cert_name.p12) to the bin directory and run the following command:
adt -package -target apk-emulator -storetype pkcs12 -keystore cert_name.p12 appName.apk appName-app.xml appName.swf
You can find a more detailed explanation here
It seems to be fixed in current build of the Flash Builder Burrito on labs.adobe.com.
For me, all my projects are working fine in the android/blackberry emulator, as well as on the android devices without setting specific options in the projects... or even with different compile-options.
Also the signing process now comes with a suitable wizard.
I've no experience in coding with Flash Builder, but I heard that Flash Builder will wrap your classes in a specific apk. You'll find there is a "swf" file in the folder named "asset", as a matter of fact, Flash Builder is trying to release your application as its own flash format. so if you want to have your application running, the AIR runtime on the smartphone is must.
if you're learning android programing, it's much better to use eclipse and google adt as your develop environment, like most of us do :-)

Categories

Resources