Hello, New to android programming and got ?'s - Android Software Development

Hello,
I'm Andy, and I'm a little bit more active on other forums, but I've had my android device since November, and love it. Anyways, I had a couple of ?'s about an app I have in progress and I was wondering if what I want to do is even possible.
Basically, I want to develop a simple app, with just 1 activity. I have the graphics/XML stuff all taken care of already, thats easy peezy stuff.
Next, I want to install a file I include with the app to a specific location of the internal memory. By default, if you install a file included, it goes to /data/data/....., I would like my file to install, to /system/xbin/. I know you would need superuser permissions, thats fine, I was wondering if it was possible. If it is, would someone enlighten me as to how? If it isn't thats still fine, cause I can include the file in a flashable zip.
Next question,
Can I have my app run the file (ie. the equivalent to going into a terminal emulator and navigating to /system/xbin/ and typing the file name?) I ask this, cause all I've found is running files that located within your app, or creating files and editing them. I don't need that, I just want the file to be read.
Next, um, if the above is possible, how do I stop it?
So here is what the app would be:
usb tethering for senseui phones and 2.1. It may not work with all (probably not aria, i don't think that was included), but this method works with the Sprint Hero. I would like to make it idiot proof, as in creating the exploit into an app. One that installs the file onCreate() and then runs it with the first button press, and then kills it on the second button press and maybe adding a menu option to quit the app. Its not an app I would charge for, nor even attempt to distribute on the market. Any help is greatly appreciated. Thanks.

Related

bluex problem

Hey guys,
I asked in the apps section about bluex. that I tried to use it to transfer files from my phone to a samsung behold and they told me to type this in the terminal:
mv /data/app/bluetoothFileshare.apk /data/app-private/
but when i did It says:
failed on '/data/app/bluetoothFileshare.apk' - No such file or directory
__________________
mv /data/app/com.alex.BluetoothFileshare.apk /data/app-private
this is case sensitive
enjoy
same thing
samething happened...
failed on '/data/app/com.alex.BluetoothFileshare.apk' - No such file or directory
does it matter that I have cyanogen v3.5.2 and my apps are on my sdcard?
isnt bluex automatically in the app-private folder?
so....
Is there something I have to do to get it to work with the samsung behold? Or does it just not work with that phone?
the behold would have to be rooted to receive files...i dont know if it works for just sending files
as far as i am aware the behold isnt even android powered so i dont know how you would expect it to work (in which case negate my last statement)
try this on the g1
cd /data/app/
ls (this will list all the files in that directory)
look for anything relating to bluetooth
mv /data/app/*filename.apk*/data/app-private/
hopefully with apps2sd it will all work out with the sym links
personally i dont use apps2sd so this could be the root of your troubles
instead of this code you could try a "root file browser"
and then im sure you would be able to cut and paste from one folder to another
out of curiosity, did u get bluex from a 3rd party source or the market? if it was the market i doubt there would be any problem (but where is the fun in that?)
good luck
oh, one little note...
if in the unlikely event something screws up n u need to reflash or anything else along those lines, please dont blame me
(im sure you wouldnt anyway, but just incase)
Gonna put my two cents in on this btw.
I'm trying to "pirate" this app (install it after getting a refund from the market. If I give up or succeed in "pirating the app", I'm going to rebuy it), for the sole reason I enjoy a challenge.
I believe that the app is infact not looking for whether a copy is in the app-private folder, but in the app folder.
Let me explain;
You install bluex from the market, it goes to app-private.
you give the application root permissions, and it checks to see whether there is a copy of it in the app folder. No copy, runs fine.
You install the app from an outside source. The install goes to the app folder. You copy the .apk to the app-private folder. The application looks for a copy of itself in the app folder, and OH NOES! it's there, and blocks all access to itself.
Is there anyway to adb an install to the app-private folder?
also, if the app locks itself, uninstall it, then *reinstall,* otherwise, even if you manage to succeed in installing the application and circumventing the security protection, you'll still be locked out of the application.
Bluex solution
this is how i did it - avoiding having to manually do anything
download version 1.1.2 here
rename it to com.alex.BluetoothFileshare.apk (case sensitive)
then stick it on your SD
then download SUFB (super user file browser) here
install this via watever method you normally do (personally i use ESTRONGS File Browser - free from the market)
open SUFB and navigate to /sdcard, find bluex and long press it and select copy and then navigate back to /data/app-private
press menu and select "mount /data RW" then paste bluex into app-private
press menu and select "mount /data R" to stop you screwing anything up by accident
reboot (not necessarily compulsory but it didnt work for me without it even tho bluex did appear in the dash thingie)
after reboot open bluex, enable bluetooth, enable server and enjoy
hope this helps
(the first time i did do this all in the terminal but was too lazy to type it after a couple of reflashes)
what i did find strange was that when doing a straight "mv ....." it worked without remounting RW but when using the file browser it wouldnt work without the remount
enjoy
i do encourage anyone who tries this to buy the app - i too did it for the challenge and then bought it (after my last reflash) (i was paranoid that after a reflash that i had schedualed that i would have to pay for it again). it is a great app and the developer deserves the £1.50
sorry, the links have been removed (for obvious reasons). google for droid appz and you will find a great site with some tips, tricks and appz
what phones does it work with?
does bluex only work with other g1's and android phones? or can you fileshare with blackberry's, iphones, etc.
iv not sent or received from any other phones (im in thailand now and none of my friends have bluetooth, poor them....) but it works great with my computer and the piece of crap dongle in both directions
so i dont see why it wouldnt work with other phones...its just and implimentation of the OBEX standard that is used for both infrared and bluetooth OBject EXchange
enjoy
garok89 said:
iv not sent or received from any other phones (im in thailand now and none of my friends have bluetooth, poor them....) but it works great with my computer and the piece of crap dongle in both directions
so i dont see why it wouldnt work with other phones...its just and implimentation of the OBEX standard that is used for both infrared and bluetooth OBject EXchange
enjoy
Click to expand...
Click to collapse
well I've tried with my friend and girlfriends behold and it will pair but not connect to it. and I'm the only one of my friends that have a g1, they're all iphone junkies :thumbsdown:
as far as i am aware the iphone still cant send or receive via bluetooth just like the g1
i dont think it was introduced in the new firmware upgrade
try it with someone who uses a real phone, not a jumped-up mp3 player
i can pair with my computer but not connect unless its for file transfer
the g1 and iphone only really connect to handsfree kits etc...
try sending something to your computer or something like that, it should work
also, double check that you have server enabled
once you have sent or received from one device, you can set it to automatically accept from that device on all occasions
Bluex>Options>Remote devices options>*device*>automatically accept files
i've been able to send and recieve files from my other phones sony erricson's and random other phones on the bus etc
Root has nothing to do with sending and receiving bluetooth. the only reason you need root on android is because the profile(obex) needed to exchange files is not "built-in" to android. In order to support this profile, the developer probably programmed his app to change read-only files, and that would be why the g1 requires root for obex. phones that ACTUALLY support obex don't require root/superuser/administrative privledges. So in other words, you don't need root for obex unless you're using android.
You guys shouldnt be openly discussing pirating applications. Thats not nice, and you are posting on a DEVELOPER forum. What's wrong with you guys?
garok89 said:
the behold would have to be rooted to receive files...i dont know if it works for just sending files
as far as i am aware the behold isnt even android powered so i dont know how you would expect it to work (in which case negate my last statement)
try this on the g1
cd /data/app/
ls (this will list all the files in that directory)
look for anything relating to bluetooth
mv /data/app/*filename.apk*/data/app-private/
hopefully with apps2sd it will all work out with the sym links
personally i dont use apps2sd so this could be the root of your troubles
instead of this code you could try a "root file browser"
and then im sure you would be able to cut and paste from one folder to another
out of curiosity, did u get bluex from a 3rd party source or the market? if it was the market i doubt there would be any problem (but where is the fun in that?)
good luck
Click to expand...
Click to collapse
garok89 said:
this is how i did it - avoiding having to manually do anything
download version 1.1.2 here
rename it to com.alex.BluetoothFileshare.apk (case sensitive)
then stick it on your SD
then download SUFB (super user file browser) here
install this via watever method you normally do (personally i use ESTRONGS File Browser - free from the market)
open SUFB and navigate to /sdcard, find bluex and long press it and select copy and then navigate back to /data/app-private
press menu and select "mount /data RW" then paste bluex into app-private
press menu and select "mount /data R" to stop you screwing anything up by accident
reboot (not necessarily compulsory but it didnt work for me without it even tho bluex did appear in the dash thingie)
after reboot open bluex, enable bluetooth, enable server and enjoy
hope this helps
(the first time i did do this all in the terminal but was too lazy to type it after a couple of reflashes)
what i did find strange was that when doing a straight "mv ....." it worked without remounting RW but when using the file browser it wouldnt work without the remount
enjoy
i do encourage anyone who tries this to buy the app - i too did it for the challenge and then bought it (after my last reflash) (i was paranoid that after a reflash that i had schedualed that i would have to pay for it again). it is a great app and the developer deserves the £1.50
Click to expand...
Click to collapse
Pirated programs IS NOT allowed on this forum.
Meaning if you have to pay for a program, you can not offer it to someone for free.
Warning offered.
my apologies
warning accepted
wont happen again
Idk what ur trying to do but my wifes memoir works flawless with this app and a g1. She can send and receive files from my fone with no problem.
jonnybueno said:
Root has nothing to do with sending and receiving bluetooth. the only reason you need root on android is because the profile(obex) needed to exchange files is not "built-in" to android. In order to support this profile, the developer probably programmed his app to change read-only files, and that would be why the g1 requires root for obex. phones that ACTUALLY support obex don't require root/superuser/administrative privledges. So in other words, you don't need root for obex unless you're using android.
You guys shouldnt be openly discussing pirating applications. Thats not nice, and you are posting on a DEVELOPER forum. What's wrong with you guys?
Click to expand...
Click to collapse
im well aware that phones that already support OBEX dont require root. i hadnt heard of the samsung he was talking about and thought it may have been a soon-to-be android phone...it was released under a different name here and i had interpreted the question as being that the phone ran (or was going to run) android. a simple mistake anyone could make when google is acting up (probably more the ISP than google but you get the point)
as for openly discussing pirated apps, i dont see a problem with it personally as i do things on a try-before-you-buy basis....i know it was stupid posting the links and i apologized for that and the links were removed
hiroots said:
Idk what ur trying to do but my wifes memoir works flawless with this app and a g1. She can send and receive files from my fone with no problem.
Click to expand...
Click to collapse
great. proof it works... iv still only tested it with my laptop

[Q] New member/ Droid Owner - I can has help!?

Ok so I picked up my Droid X about a month ago and haven't been able to put this thing down, I never thought about rooting it because it did everything I needed/wanted it to do, then one day I log into my car forum and all the OT guys are posting cool print screen's of their phones. I was intrigued, so I rooted my phone and have been trying to figure out a few things but I'm not really up on the terminology and/or logic behind doing certain things. I would greatly appreciate any help in regards to explaining the following:
1) Rooting - Takes off restrictions on the phone so that developer apps can be installed... Is there more to this or is that pretty much it?
2) Flashing - I see this term often but I'm not sure what it is exactly, I tried installing a theme once and the directions said to flash something somewhere and looked at it the same way my dog looks at me while I'm working out at home.. lol
3) ROM - !?
4) apk's - What are they, what do they do, and how do you install them!?
5) Installing themes - I'm thinking has to do with all of the above...
6) Locating and moving downloaded content...
7) How do all of these things tie together? I'm completely clueless as to what does what on the phone and would like to become as knowledgeable as I was when the iPhone first came out and I figured out how to jailbreak/unlock it...
As a reward for your time and effort I leave you Final Fantasy VII fan's with a cool wallpaper I found at work today.. Thanks for any/all input and again, your time is most appreciated!!
Initial GT3 said:
Ok so I picked up my Droid X about a month ago and haven't been able to put this thing down, I never thought about rooting it because it did everything I needed/wanted it to do, then one day I log into my car forum and all the OT guys are posting cool print screen's of their phones. I was intrigued, so I rooted my phone and have been trying to figure out a few things but I'm not really up on the terminology and/or logic behind doing certain things. I would greatly appreciate any help in regards to explaining the following:
1) Rooting - Takes off restrictions on the phone so that developer apps can be installed... Is there more to this or is that pretty much it?
2) Flashing - I see this term often but I'm not sure what it is exactly, I tried installing a theme once and the directions said to flash something somewhere and looked at it the same way my dog looks at me while I'm working out at home.. lol
3) ROM - !?
4) apk's - What are they, what do they do, and how do you install them!?
5) Installing themes - I'm thinking has to do with all of the above...
6) Locating and moving downloaded content...
7) How do all of these things tie together? I'm completely clueless as to what does what on the phone and would like to become as knowledgeable as I was when the iPhone first came out and I figured out how to jailbreak/unlock it...
As a reward for your time and effort I leave you Final Fantasy VII fan's with a cool wallpaper I found at work today.. Thanks for any/all input and again, your time is most appreciated!!
Click to expand...
Click to collapse
First off- that is a lot to bite off as an opener. lol. I have to get in a minute- plus I am a newb as well but here a couple of things...
1) You sound pretty on track. Root gives you access to more options with your phone. It also voids your warranty.
2) Flashing. A term used loosely. Normally it is used in conjunction with "flashing a rom". It simply means to install something (basically).
3) Rom. It is the image (not in the photo-graphical sense) that is embedded/burned on your phones hard drive with all the information of your operating system. For instance: you are on the stock 2.2 ota "rom". But you could "flash" the new "AOSP rom" that was just released. That means you would be removing the factory image that came on your phone and replacing it with a modified image. Theme's and .apk's -those are not "burned" into the phone. If you do a factory reset- those will be wiped. The rom image stays put. If you flash from 2.2 ota to AOSP and then did a factory reset- you would not return to the original state your phone came from Motorola bc that image is completely removed and replaced by the new image you flash. Instead you would return to a clean AOSP.
4) .apk's - .apk is simply the name of the file extension used for android applications. I came from Windows Mobile and they were called .cabs. So any app can be referred to as an .apk. You can download an apk from XDA, place it on your sdcard, tap the file, and i think you will be prompted with "do you want to install" (some where along those lines). There is a setting in the "Settings" that allows you to install 3rd party (non-market) .apk's.
5)Installing themes. This refers to modifying the images (and this time I do mean in the graphic sense) of certain .apk's and other whatchamajiggies. You can install a simple theme that just changes your lockscreen, or you can install a huge theme that changes almost every part of every image so the entire phone looks similar. Here is the tricky part about using themes- your phone has to be deodexed.
deodexed. When you get your phone all of the system files come with a few different parts to them. One of those parts is an odexed file. Apparently the theme building types do not like working with these files so they run this process called de-odexing in which all of the system files are somehow manipulated in a way where they no longer need their odex file. So you end up "de-odexed". There is a program called "xultimate 2.2" that enables regular folk like you and me to deodex our phones. I tried running it yesterday and it errored out on me. So I used another method that worked fine. There are some threads on here about deodexing- if you want themes you will have to do it.
6) locating and moving downloaded content. When you have root you can get Root Explorer from the market. I am sure there are other good file exploreres- but I can't speak to them- I use Root Explorer. As far as locating downloaded content- whenever I download something from my phone, it always (normally) goes to /sdcard/downloads. If it is not there, I guess you just do a search for it. If you want to move it- long press the item, copy, move.
And you will need to google "ADB" (android device bridge). Many of these activities will require the use of ADB. You plug in your phone through USB (make sure phone settings are set to "USB debugging") and... well there is just way to much on this one. Google this one and you will find a lot of stuff- or search it here on XDA
have a great weekend. got to go.

[Q] Developing on Device

I have programmed in java for quite some time, and am decent at android apps.
However, i have two questions about developing on my device (rooted samsung captivate).
First, how can i get dev tools to run correctly on my phone. I have installed it as stated in "developer.android com/guide/developing/debug-tasks html#additionaldebugging". However, when clicking on Dev Settings it crashed with HARDWARE_TEST security exception. I have read that you need to sign/run it as system.
Is it possible to run it on my rooted captivate? if so how do i install it as system or find the system signature to sign it.
My other question is about programing, compiling, and running android applications from a device. I can take my .apk and unzip it. Then edit any resource files. Then rezip and sign it. However if i want to replace the actual code i need to compile it. I can use an online java compiler but i need to convert it to android format.
I know that dx.bat does this by using dx.jar . I can add dx.jar to the referenced libraries of my app. However i cant figure out what to do past there. Is what i am attempting even possible?
Thanks for your help.
There's a couple threads in this forum from folks like me who want to do this. Perhaps you can help us figure it out
Step one is I think to get an java compiler running on the phone. Then to make a version of DX that can run on the phone to convert the class to .apk
Thanks. in normal java programs you can use "com.sun.tools.javac.Main.compile( new String[] {args} );" found in the "<sdk>/lib/tools.jar" to compile a program. And dx.jar is what is used to covert it to android, however i do not know what to call in it.
We just need to find a way to get these jars to work on android.

gps conf ... HELP !!!

Hello. I am too having problems with the GPS fix. I googled, i have read fora, i wrote on fora, i have read even the facebook desire hd page where people from all over the world have the same problem with the GPS.
I have tried EVERYTHING, now the last chance is to change the region from the gps conf file....which i can remember being northamerica, while i live in europe. Maybe changing that to EUROPE will help me fix the gps problem.
To save changes to that file, i would need root access. I don't have root access. I don't need root access, i just want to change that file and see if the gps gets the fix faster than before....other than that, i have never wanted root access.
So, knowing my target....which is the most simple way to change that .conf file? I know that the visionary tool doesn't work anymore with froyo desire hd....so i can't root the phone...other methods look really complicated to me. there should be a way to edit the GPS file without doing a mess with roms and downgrades and everything...
please help !!!
You need root access to edit the file, there's no other solution that I know of. If you decide to root, use FasterFix from market to change the region.
Unable to use Visionary due to your build number is more than 1.3xxxxxxx?
You do not have any other option other than to root your device in order you to alter system files. Even if you download FasterFix in the market, you will need to have Superuser permission before the app can directly change system files for you.
If your build number is higher than 1.3xxxxxx, then you have to do a downgrade.
GPS performance has been affecting me in the past, but now i have found a solution(not sure yet, but it works for me until now). Now I got a fix within 5-15 seconds. At most is 30 seconds for the first fix.
Anyway, you should consider rooting. You can have full access throughout your device. My phone previous, battery life can last for a day, now at least two days. I am running different ROM and Kernel thats why.
Cheers dude. =)
It is a part of \etc, definately will need a root access to grant you access to the file.
ok could you link me to a really SIMPLE tutorial to do that? of course i think i'll have to do a hard reset? lose all my saved games and screen configurations.... sigh i just did a hard reset for the same reason (gps)....
and what about new rom and so on? do i have to use another rom in order to root the phone? what does that change ? any rom to recommend?
You don't need root access to modify gps.conf.
Use FasterFix.
Use it two times (open Fasterfix, select europe, apply, then do these steps once again).
Fasterfix will return an error both times, but if you open gps.conf from a file manager like ASTRO) you'll see that file had been changed.
After a while, Android reverts automatically gps.conf to notrh america ntp.
Didn't pay much attention to this, so i don't really know if Android reverts file on reboot or even without reboot.
giegi_dc said:
You don't need root access to modify gps.conf.
Use FasterFix.
Use it two times (open Fasterfix, select europe, apply, then do these steps once again).
Fasterfix will return an error both times, but if you open gps.conf from a file manager like ASTRO) you'll see that file had been changed.
After a while, Android reverts automatically gps.conf to notrh america ntp.
Didn't pay much attention to this, so i don't really know if Android reverts file on reboot or even without reboot.
Click to expand...
Click to collapse
i actually used faster fix, but as soon as i do anything, it says 'required root access' and doesn't do anything !! is that the error you're talking about ?
EDIT: i tried again...start faster fix: can't get root. change to europe = root access required. the gps.conf (i checked) is still on north-america.pool server ((
giegi_dc said:
You don't need root access to modify gps.conf.
Use FasterFix.
Use it two times (open Fasterfix, select europe, apply, then do these steps once again).
Fasterfix will return an error both times, but if you open gps.conf from a file manager like ASTRO) you'll see that file had been changed.
After a while, Android reverts automatically gps.conf to notrh america ntp.
Didn't pay much attention to this, so i don't really know if Android reverts file on reboot or even without reboot.
Click to expand...
Click to collapse
What are you talking about? You can't change system files without root and the app description clearly states that you need root access and busybox. It's not there to fool people is it?
@rogermorse
btw, are you using a case?
I AM using a case but even without case no difference, i tried many times.
i'm trying to root the phone...already on the first step i'm blocked: android developer kit doesn't find java SDK 64 bit....i googled and other people have this problem, i can't fix it, it just keeps saying that java was not found....OMG i had never thought rooting a phone would have been that difficult....i think i'll surrender and never use the gps in my life.
the installer of android SDK stops because it doesn't find java SDK. if i unzip the SDK, at the exit it says the same thing. I was able to make windows recognize the phone in debug mode as ADB interface....but then the
adb shell /data/local/tmp/psneuteradb shell
says 'not found'. anyway the java has something wrong with the android SDK that, as i said, keeps telling me that cannot find the java. i already entered the path in user variables...
rogermorse said:
I AM using a case but even without case no difference, i tried many times.
i'm trying to root the phone...already on the first step i'm blocked: android developer kit doesn't find java SDK 64 bit....i googled and other people have this problem, i can't fix it, it just keeps saying that java was not found....OMG i had never thought rooting a phone would have been that difficult....i think i'll surrender and never use the gps in my life.
the installer of android SDK stops because it doesn't find java SDK. if i unzip the SDK, at the exit it says the same thing. I was able to make windows recognize the phone in debug mode as ADB interface....but then the
adb shell /data/local/tmp/psneuteradb shell
says 'not found'. anyway the java has something wrong with the android SDK that, as i said, keeps telling me that cannot find the java. i already entered the path in user variables...
Click to expand...
Click to collapse
while downloading the SDK, Don't download the exe, go with zip...I think that's what I did when I faced the issue last time.....

[REQUEST] Looking for a APK creator.

Greets all,
I am looking for a person who understand on how to create an apk for android, and if they can create one for me. I have tried and tried and I cannot get the last half of the apk because I dont understand programming and am truly clueless. I had someone who was going to help me, but then disappeared, so I come here for help.
I would think it would not be that hard for someone who knows what they are doing. If anyone would be so kind and willing please PM me, or reply. I would like to finish this project but I'm at a standstill.
The details will be provided in PM.
Thank you.
AngelDeath
Want do you want the apk to do?
Create just an apk is easy...but without any programming skills and some code in it it will do nothing .
An APK is just a simple ZIP file, nothing more.
Thats true, its a simple zip, but when you need it to make changes or copy files, thats where I am clueless.
I have already made the gui, and the menus, I got that all covered, but the problem I have run across or the clueless programming idiot part of me is that when you make a selection, for it to impliment what you selected, also since the selection would make changes to a file, how would I got about having all the different combinations, saved in the apk so that when you make a selection it would know what to pick and either copy the settings, or to overwrite the existing file with the selection chosen?
When I tell you I am a programming idiot, take it seriously I am.
sorry, i don't have a solution to your inquiry (have tried and tried to build apks and no success beyond themes...)
and i think your skills are quite beyond mine as a chef, but in all of my reading i felt that this guide seemed to help. maybe can help, but if not good luck!
http://www.vogella.de/articles/AndroidLiveWallpaper/article.html
Thanks for the link I bookmarked it, but one of the things its lacking in the tut for wallpapers is the way to overwrite an existing file. But I'll look at it as with my android books, but I am more a visual learner first then read, if that makes sense.
interesting idea. i would think that if possible, might run into problems a la metamorph with apks not being able to updated once their initial integrity is altered. though if a rom file, don't think that would be a problem. another angle would be to see if it is redirectable - like what themechooser for tmo/ cm7 roms does. those themes don't replace per se, though can redirect most things. just waxing philosophically. best of luck. if i ever venture out of cm7, your roms are looking very interesting! keep up the great work.
cheers.
A place where to make apps
I know this webpage where you can make apps whithout programing.
The webpage is: Called "Andromo" Since I'm new I cant paste the link but I think that you can put "www" and at the end "com"
Greetings,
Mister-Android.rs Team

Categories

Resources