Android SL4A query - android

How do I download zipped files containing python source code into the android SL4A ? I've tried going to the website and downloading it but the download always fails. Also can I install python-urwid in android?

Go to here throuh your Android device browser:
http://code.google.com/p/android-scripting
after you download the python*.apk file you click on it, then Open --> Install and it should be installed.
in case you have a problem to download it you can download it to your desktop machine then copy it to your computer.
as far as i know about urwid, you can't install.it on the SL4A.

you can unzip file and send script files using the below command on command prompt.
adb push yourlocalfile.py /sdcar/sl4a/scripts/filenamepy
make sure you run this command
adb devices it will display the list of devices connected to the computer. If you see your device then you can run the above push command.
Let me know if this doesn't work.

You need a file explorer (I used andexplorer) to transfer the files to sl4a's install dir (ideally in a subdirectory), and unzip them there.

Related

Get list of files programmatically of android device on Windows 10

Below is the image of how the android device automatically mounts on windows 10 (named: remdiz)
Actual Device: Redmi Note 5 Pro
1: https://i.stack.imgur.com/uOnI4.png
I am not able to get the list of files inside any given folder inside it because I see the path of it as This PC\redmiz\disk\Music which is not accessible in powershell, command prompt or even python.
All I need is to list the files inside Music as I have a same copy on my local and I want to find the difference
Accepted answer can be a batch file, windows command, powershell command, python script, command using git bash etc or any process that will give me a real path of the device named redmiz
MTP doesnt allow this on Windows. Found a tool named MTPDrive. It was a little buggy, but helped by mounting the internal storage and external storage of Android as mapped drive leading to now limitless possibilites for my use case

Automate copy Mobile App Builds from DropBox and install to Device

Existing procedure to install iOS:-
Download binary from Dropbox
Open the application with iTunes
Click Install
Existing procedure to install Android:-
Download binary from Dropbox
Copy apk into device via USB.
Go to My Files and a appropriate folder.
Click on the apk and install it.
I want to transfer .apk (android app) or .ipa (iOS app) file to multiple devices and install it simultaneously. How would I do that?
For Android - Assuming you sync the APKs folder to your PC/Laptop this should be easy.
You can use ADB install -r apk-file-path command to push and install the APK from the dropbox folder to your device(s).
If you have multiple devices connected, you need to add a -s paramter to the command and specify the device serial id.
To list all the connected devices, use ADB devices command.
Muzikant's answer looks like it would work for Android. For iOS you should check out the Configurator. If that's too bulky for you, PhoneGap is pretty useful as well.
This would change your current iOS procedure to be:
Ensure that Dropbox is synced to a folder on your PC
You could add a daemon to watch for changes to the folder which would then launch a script that calls
$ ios-deploy -r -b your.app
You can find all iOS devices on your system by following the steps found here

Upload Android Source Code into real device

I have build whole android source code...with the help of make command....for dream htc product...now i want to deploy those files(system.img,recovery.img,userdata.img,boot.img) in my real device htc t mobile g1...how can i deploy those files....?
I assume you're just starting out with Android, in which case it would be very wise to use the Android Development Tools Plugin for Eclipse, which I'm guessing you're not doing currently.
Once you install that, deploying to your application to your Android device is as simple as right clicking the project in Eclipse, and selecting "Run As -> Android Application".
Note: make sure you enable debugging on your phone: "Settings -> Applications -> Development -> USB debugging".
I guess what u wanna do is create a flashable zip file and install it via recovery,
You need to get the Android Kitchen (provided you have a Linux box or else you have to install cygwin on windows)goto http://forum.xda-developers.com/showthread.php?t=633246
and download the kitchen execute the .menu and you'll find a really long menu that may help you to package the files into a flashable zip file,
and since you are using HTC Dream install the amon ra's custom recovery(you need to root the device first,install the universal AndRoot from play store and root your device)copy the file to your sdcard and rename it as recovery.img if you have a terminal emulator app goto the prompt and type flash_image recovery /sdcard/recovery.img and if you are having trouble with the flash_image binary install busyBox from app store and that should solve the problem,
and after the recovery had been installed goto the terminal app or adb window then type reboot recovery or turn on the device by holding home key and in the recovery window do a complete wipe and select the option flash zip archive or something, browse the zip file you have created using the kitchen from the sdcard and select yes wait for the process to complete. hope this helps you

how can I import .apk file of the downloaded file into Eclipse? Do we have this option?

I am newb To Android.I just to check out few applications in my Desktop and have downloaded some sample applications. However, they are in the format .apk.
Please let me know the procedure to import this file into Eclipse which helps me to run the application.
Regards,
Serenity.
If you want to test the downloaded *.apk try installing it in the emulator. Copy the APK file into platform-tools directory, navigate to platform-tools directory. Execute
adb install filename.apk
If you want to view the source code of the *.apk. Try this link How to View the Source Code of an Android *.apk
If you wanna run the application you don't have to import it into Eclipse but instead you have to install it on your phone.
If you wanna see the source code of the apk file, you need a decompiler. There are some available in the Internet, however, all of them I have seen doesn't work 100% (e.g. they can extract the resources but not the *.java files, and so on)...
But you have to note that using decompilers could not be legal in some cases
You cannot "import" them to Eclipse as they are binary files. But, you can test the applications using the Android Virtual Device:
http://developer.android.com/guide/developing/tools/avd.html
In order to use it you will have to install the Android SDK and configure a Virtual Device:
http://developer.android.com/sdk/index.html
Once you have installed and configured the virtual device, you just have to install you aplications using the adb tool:
adb install applicacion.apk
Also, if you are using WinRAR or other zipping programmes, right click on the .apk file with your mouse and open with winrar/winzip/e.t.c. then surf to the .xml files then edit them via notepad easily.
If adb complains you have multiple devices, do
adb devices
Notice the serial number of the one you want, and then
adb -s SERIAL -r filename.apk
File -> Import -> Android Code into Workspace -> (Select Root Directory (folder) of the Application you are importing) -> Check the (Copy projects into workspace [checkbox]) -> Click Finish [En Twitter puedes preguntar][DS]
If you want to test the downloaded *.apk in the Emulator --> install it in the emulator.
How to install .apk file into Emulator?
Ans: Copy the *.apk file into SDK->platform-tools directory (where you'll find adb.exe file),
navigate to that directory through command line on your windows PC.
And then Execute:-
adb install filename.apk
If you want to view the source code of the *.apk.
Try this link How to View the Source Code of an Android *.apk
Compress .apk with winrar, open it in winrar and click on apk file. It will show the content just click on extract. Now you have a complete directory structure of a source file. Try to repeat the import steps as suggested above.

How do I copy an android app to an actual device?

I have written a simple android app and it runs in the emulator.
Now how do I actually copy it to my phone? I have HTC's Eris. When I attach it with USB it asks me If I want to mount it as a USB mass storage device. I then see it in my drive list.
the directories on the device are:
albumthumbs
amazonmp3
com.google.android.apps.listen
ComicReader
data
DCIM
download
media
music
rosie_scroll
Now what should I copy from my Project directory and where should I put it?
And is there any other process I need to run to "install" my app?
The adb tool provides a command for installing an application onto the phone, adb install .... It takes the .apk file as an arguement. adb --help has a bit more info.
If you are running Eclipse, you can setup Eclipse to publish the application to a connected device.
http://developer.android.com/guide/developing/device.html
You can also simply copy the .apk file to the sdcard and navigate to it using a file manager such as Astro. Long press on it, and Astro will install it for you.
You should be able to use HTC Sync, if you are on Windows..
At least for Hero, it will automatically install APK files on my phone, when I double click them
Download: http://www.htc.com/us/support/droid-eris-verizon/downloads/
Install ADB driver. Have your phone in USB debugging mode. In an opened eclipse code press ctrl+F11. it will show your device. Run through it

Categories

Resources