Convert .py to .apk - Android Software Development

Sorry if this information is available already.. BUT is there a way to convert a .py to a .apk from the android phone or from the computer I'm sure there is but I don't know how and yes...I've checked on google
Sent from my Nexus One using XDA App

How do you mean converting .py to .apk? An .apk file is just a zip compressed archive with a certain file structure containing the compiled sources and your raw resources.
I'm quite certain that there is no way to just convert a Python script to a functional Android application.
If you instead meant that you are looking for an interpreter which interprets Python for example then yes there is a library called Bean shell.

okay thank you I was looking for a way to convert it but I guess it's okay is there a way to treat it as a market app.. where if I gave them a link with a barcode image that they can download it like a regular apk and perhaps give the option to install sl4a.. And how do you increase text size of the interpreter?
Sent from my Nexus One using XDA App

I found out how to convert it... It's in the sl4a wiki pages and requires eclipse, quite a bit of steps but it's possible
Sent from my Nexus One using XDA App

Legend28469 said:
I found out how to convert it... It's in the sl4a wiki pages and requires eclipse, quite a bit of steps but it's possible
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
Just wanted to add the link for the wiki as it's quite disorganized
https://code.google.com/p/android-scripting/wiki/SharingScripts#Scripts_as_APKs

so would this work with a project file made up using tkinter? ive got a script i want to build into an app but cant get kivy to work because of an issue with pygame and tkinter works fine

Related

Another noob question

Hey guys could someone tell me how to unpack a Rom, modify it then re-pack it please, or just point me to a tutorial.
Many thanks.
Jay.
Sent from my HTC Wildfire using XDA App
Well i'm a noob around these corners too, having my first-ever android phone since april and trying to learn as much as possible from this awesome community.
That being said, You can open and/or extract a rom, by using a zip/rar archiver like winzip, winrar etc. You can then add or remove system apps by moving to system/app (at least that's the tree hierarchy on cyanogen, but i guess it should be universal). In case you need to modify or add files, you can even do it directly from your zip/rar manager on the fly without the need of ectracing and re-compressing the rom.
That's my 2 bits of knowledge for you
Hey, that's exactly the info I was looking for.
Thank you.
Sent from my HTC Wildfire using XDA App

[TOOL] Develop/Customize Your Own Rom 1.0.4 | 1/05

RandomKing's Android Kitchen​
IMPORTANT NOTICES:
First and foremost, I will not be providing intricate and detailed directions with this.
This will remove almost any need to ever have to enter command-line code by simplifying everything into simple menus and performing the code for you!
I only take partial claim to this, as I've only written the over-arching interface and the smali/baksmali interface.
This is provided primarily for personal modifications. Please do not make a few minor changes to an existing rom and call it your own.
WHAT IS PROVIDED:
Quite simply, this is a menu-based interface coupled with nearly all of the .jars, packages, and files necessary for android development. Using this you can decompile/compile .apks and the vast assortment of features associated with this as well as baksmali/smali .dex files and even sign your .zips! This is the interface I currently personally use to streamline my edits combined into an easy installer. This will create a shortcut in your start menu, as well as provide an uninstaller. I'm always looking to streamline more!
Decompile framework-res.apk and systemui.apk for theming purposes!
Rebuild framework.jar to include the latest mod that your favorite rom just doesn't have!
Etc!
WHAT ELSE IS NEEDED:
Java [For functionality]
Gimp [For png and .9.png editing]
Winmerge [For easily identifying file changes]
Notepad++ [For smali and xml edits]
7zip Archiver [For creating/managing .zips]
A general knowledge of everything mentioned!
INCLUDED FEATURES:
Apk Manager 5.0.2 by raziel23x
-Zipalign
-Apk Tool
-More
Dex Manager 1.0.0 by RandomKing
-Smali
-Baksmali
AutoSigner by Stericson
DOWNLOADS:
>>Android Kitchen 1.0.4<<
>>Alternate Download<<
(Rename from '.bin' to '.msi'.)
CHANGELOG:
Version 1.0.4
-Removed rogue classes file (reduced install size)
-Fixed shortcut
Version 1.0.3
-Redesigned AutoSigner menu in line with overall menu
-New versions should install over old versions
-Version number shown in cmd header
-New splash screen
Version 1.0.2
-Added shortcut to kitchen folder for easier file management
Version 1.0.1
-Fixed issue with APK Manager not including requisite folders
KNOWN ISSUES:
-When using my Dex manager to Smali/Baksmali, it may say "File Not Found" and appear to work anyway. It will work anyway. All this indicates is that prior to performing its function it is removing a preexisting directory or classes.dex to avoid overwrite issues and that none currently exists.
-Sometimes baksmali will not properly perform, but running it again usually solves that.
I post this in 'General' under the assumption that most users in the 'Development' forum can do all of this and more without my help.​
ScreenShots
Went down with my old site. PPCGeeks gave me no warning. Nice of them, right? Good thing I moved almost everything beforehand.​
Nice work
Sent from my SPH-D700 using XDA App
Sweet! Well done! Thanks for sharing.
marcusant said:
Nice work
Sent from my SPH-D700 using XDA App
Click to expand...
Click to collapse
codest3r said:
Sweet! Well done! Thanks for sharing.
Click to expand...
Click to collapse
I figure, some people are daunted by command lines. Plus it can be tiresome. But even more so, some that want to try their hand at developing (the only way to learn it!) don't know where or what tools to find. I made this some time ago, and have been adjusting it ever since to my liking.
XDA is for sharing, right?
Awesome
sent from my cm7 touchwiz 4.5-ed epic
what do i do with the .bin file?
So can I compile 9.pngs with this instead of Eclipse? I couldn't get the Android plug-in to work on Eclipse...thanks.
Thanks, RandomKing, I've been thinking of creating some CMD line scripts. You just saved me the trouble!
Wow this is awesome! Thank you for all your hard work!
Sent from my ADR6300 using Tapatalk
kennyglass123 said:
So can I compile 9.pngs with this instead of Eclipse? I couldn't get the Android plug-in to work on Eclipse...thanks.
Click to expand...
Click to collapse
Yup, this is how I've been doing it for a while now.
AmericanJedi001 said:
Thanks, RandomKing, I've been thinking of creating some CMD line scripts. You just saved me the trouble!
Click to expand...
Click to collapse
The developers of ApkTool, and subsequently Apk Manager are the ones that gave me the idea... why not one cmd interface to rule all of my programming needs?
imtoomuch said:
Wow this is awesome! Thank you for all your hard work!
Sent from my ADR6300 using Tapatalk
Click to expand...
Click to collapse
No problem, I figured I'd finally made it as user-friendly as possible. I had a lot of trouble keeping all the necessary codes memorized, and smali edits to framework.jars was my biggest annoyance!
jpond83 said:
what do i do with the .bin file?
Click to expand...
Click to collapse
Change it from .bin to .msi. I'm not sure why it uploaded like that, I may put it in a zip.
that worked, thanks for sharing this, this is great

[TOOL][WINDOWS] ADB Graphical User Interface GUI

Hey guys I know I have posted some other similar programs, but hopefully this will raise the bar on how people use Android Debug Bridge.
So To start off, this program will not root any phone, but can easily break a phone if used improperly.
Secondly, If you need to ask what a button in the program THEN DO NOT USE IT!
I will only answer questions if they involve drivers or programming bugs, NOT for something like "What is Sync?" because If you do not know, then you do not need to know now.
SEE LINKS BELOW FOR MORE RECENT UPDATES!
This program has some built in ADB functions:
Rebooting- Recovery/Bootloader/Fastboot.
Sync from a folder (If you don't know or have to ask do not use!)
Use logcat
Start up a shell instance (With root if possible.)
Remount (Needs root also)
Flash(Recovery/Boot.img)
Root SOME devices(Using Bin4ry Script Credit to him)
Auto Download Root script
adb shell built in now
cmd shell built in
automatic updates
push files
install apks
get misc system information
Download ODIN for Samsung devices
Detect HTC device correctly for once lol
Application Manager
ADB Learning Center (Under Construction but not beta)
4.0-4.3 Backup Manager (Using adb backup NOT Nandroid)
0Nandroid intergration
Build.PROP veiwer (Soon to be editor too!)
Free device ram and kill background process
MORE TO COME!
___________________________________________________________________
Also a BIG thing for this program is the ability to install ADB and Fastboot into Windows as a command in Command Prompt.
This would allow one to use adb as a normal command from CMD.
E.G "C:\Users\Lab\>adb shell"
Instead of having to CD to C:\android\and all that.
Download the program: Version 5.0.2.26:New Download link[/COLOR]
As far as the newest huge feature in ADBGUI goes, the Application Manager is to be considered Pre-beta and should be used with extreme caution.
Requirements for the Application Manager:
> You need root
> It only works with 3rd Party (Downloaded from google play or other source)
> It does not work with all devices and has some major bugs.
Come on guys give some feed back!
Well enjoy!
Have questions or maybe want to report an issue?
Check out my Discussions Forum here otherwise you can post here at XDA Forums
About ClickOnce:
The core principle of ClickOnce is to ease the deployment of Windows applications. In addition, ClickOnce aims to solve three other problems with conventional deployment models: the difficulty in updating a deployed application, the impact of an application on the user's computer, and the need for administrator permissions to install applications.
ClickOnce-deployed applications are considered 'low impact', in that they are installed per-user, not per-machine. No administrator privileges are required to install one of these applications. Each ClickOnce application is isolated from the other. This means one ClickOnce application is not able to 'break' another. ClickOnce employs Code Access Security (CAS) to ensure that system functions cannot be called by a ClickOnce application from the web, ensuring the security of data and the client system in general.
Some other thinks about ClickOnce:
My ClickOnce application is personally signed, so windows will tell you the publisher is "Unknown" but that is OK. It will install just fine.
[UPDATE Nov. 21st 2013]
Hey guys!!
Just wanted to share some news for all you linux users!
I will be starting a linux conversion for ADBGUI to be fully compatible with Ubuntu/Debian/Arch Linux Distros!
Details: Click Here!
Looks great! Will try as quickly as possible.
Sent from my U20i using xda app-developers app
Is this ADB GUI project open source?
I think this is a really cool idea. Might also help get more users into ADB and willing to learn what things do. (sometimes it's scary when thinking of command line)
Shifted from the bottom of the rabbit hole
thronnos said:
Is this ADB GUI project open source?
I think this is a really cool idea. Might also help get more users into ADB and willing to learn what things do. (sometimes it's scary when thinking of command line)
Shifted from the bottom of the rabbit hole
Click to expand...
Click to collapse
I will be posting the source on github but it is written in VB.NET. I am also happy to answer questions about the source code.
Required program for the source is
visual studio 2012.
Sent from my SCH-R530U using xda premium
Just updated to version 2
Read about it at urgero.org/node/5
Sent from my SCH-R530U using xda premium
Hey guys!!
Just fixed a bug in ADBGUI about a file not found.
Download Fix
Can also be found Here
Fixed bug with version 2.1:
Would still try to download, even if you selected no.
and added Android Device Discovery
currently working on adding an option to browse sd card and to get device information and battery levels.
Tonight around 11pm central time I will be uploading the source code for this project.
Sent from my SCH-R530U using xda premium
UPDATE:
Check out the new updates at http://urgero.org/node/5!!
Added rooting scripts!!
With downloader (No need to hunt down the scripts!!)
Just updated to 2.4!
added:
Automatic updates!!
Over 400 dpwnloads and no one has anything to comment about?
Sent from my SCH-R530U using xda premium
sandix said:
Over 400 dpwnloads and no one has anything to comment about?
Sent from my SCH-R530U using xda premium
Click to expand...
Click to collapse
Sorry, bro, I thought the same after releasing my first few works... Sadly, that how it seems to be.
To the tool: I think its awesome, haven't had any problems so far. Don't give up!
Sent from my U20i using xda app-developers app
Thank you!
Does anyone have any feature requests?
Sent from my SCH-R530U using xda premium
Just Updated to V2.6:
Added F-Droid for all you Open Source fans!
Also fixed a bug where applications would not install correctly for some devices(Still does not fix all of them)
Download: http://urgero.org/node/5
If you already have 2.4 or higher, just launch the program as administrator and it will prompt you to update, otherwise download 2.4 aat the link above to upgrade to 2.6!
sandix said:
Thank you!
Does anyone have any feature requests?
Sent from my SCH-R530U using xda premium
Click to expand...
Click to collapse
Can you add a file manager to see from your tool all the folders and modify them and files
Inviato dal mio GT-I9070 con Tapatalk 2
I am currently in the process of doing so yes.
Sent from my SCH-R530U using xda premium
Does not work on mine. Dont know why.
it says: "is not valid s Win32."
Please help.
i have winxp 32 bit.
Make sure you run as administrator and that all the files are extracted from the archive. Also make sure they are all in the same folder.
If you could post a screenshot that would be great help
Sent from my SCH-R530U using xda premium
mr_itou said:
Does not work on mine. Dont know why.
it says: "is not valid s Win32."
Please help.
i have winxp 32 bit.
Click to expand...
Click to collapse
I for got to add:
You NEED .NET Framework 4.5, download from microsoft here

[SCRIPT]Very Simple Screen Flashlight with Python and XML

This is a simple script written in Python for Android devices. I'm just learning Python but I hope this simple demonstration will inspire others to learn how to program. This has some XML mixed in with it.
This website will give more information on running Python with Android:
http://code.google.com/p/android-scripting/
Here is the link for the script:
http://db.tt/xbZwabUk
Here are some screenshots of the program in action but remember the screen brightness was turned all the way to 100% (or 255) by the script. The shot showing the console was initially a mistake I came across by typing a wrong value for the color but I liked it so it stayed. Now I'm working on a calculator program.
What did you use to compile the script
Into an app?
Sent from my SGH-T999 using xda premium
Ninosmaxima said:
What did you use to compile the script
Into an app?
Sent from my SGH-T999 using xda premium
Click to expand...
Click to collapse
After installing the app you have sl4a/scripts folder on sdcard.
Sorry let me rephrase...
OK so I make websites and I occasionally script.
How did you turn that script into an app, from a txt file to apk. is there a guide you followed?
Sent from my SGH-T999 using xda premium
I haven't converted this script yet for an .apk file. There is an easy way to convert it but it would require the user to install the Python 4 Android app in addition to the .apk of the script. There is also a way to compile the interpreter and script in one .apk for easy distribution.
This site will provide more info and Google also has a wealth of knowledge
http://code.google.com/p/android-scripting/wiki/SharingScripts#Scripts_as_APKs

Porting android apps to another android device.

Hey guys, i need help porting apps from one android device to another like apps from LG Optimus 2x to LG optimus one or porting stock apps to cyanogenmod or porting xperia, samsung apps to non xperia(or non samsung) devices. I dont intend to make it for commercial use like posting on playstore. I just want it include on roms and make it such a way that other devs can include it on their roms. I have basic C++ knowledge and Im learning java on my own!
Normally you can just compile the app and add it to your work with the right copyright notice as long as your device/ROM is the minimum API level which is required.
How can i compile a app from source, which is already compiled like stock keyboard for xperia making it work on non xepria or LG optimus 2X Launcher for LG optimus one!
Edit: I'm new at this!
Sent from my LG-P690 using xda app-developers app
ayazm.140895 said:
How can i compile a app from source, which is already compiled like stock keyboard for xperia making it work on non xepria or LG optimus 2X Launcher for LG optimus one!
Edit: I'm new at this!
Sent from my LG-P690 using xda app-developers app
Click to expand...
Click to collapse
So have you got the sources? If you do, select File -> Import -> Existing Android code into workspace in Eclipse.
If you have already got a compiled app why don't you use that one?
If you mean resizing the images, rename the compiled apk to a .zip file. Then you can browse the content. Afterwards rename it to .apk.
nikwen said:
So have you got the sources? If you do, select File -> Import -> Existing Android code into workspace in Eclipse.
If you have already got a compiled app why don't you use that one?
If you mean resizing the images, rename the compiled apk to a .zip file. Then you can browse the content. Afterwards rename it to .apk.
Click to expand...
Click to collapse
I have got no sources. It's a stock application. I have to make it work on other device by resizing the images and make them work on other devices (may be low end device of same company or different company!)
Sent from my LG-P690 using xda app-developers app
ayazm.140895 said:
I have got no sources. It's a stock application. I have to make it work on other device by resizing the images and make them work on other devices (may be low end device of same company or different company!)
Sent from my LG-P690 using xda app-developers app
Click to expand...
Click to collapse
Ok. Try what I described:
If you mean resizing the images, rename the compiled apk to a .zip file. Then you can browse the content. Afterwards rename it to .apk.
Click to expand...
Click to collapse
I know I should modify the apk but what files like xperia has some file which checks the device for xperia device. What are the dimensions for mdpi device. What are the files should I modify in a keyboard to make it work on other device!
Sent from my LG-P690 using xda app-developers app

Categories

Resources