[Q] Android general questions - Galaxy S II Q&A, Help & Troubleshooting

I'm new to Android and have a few question that didn't get answered by Google it. I have bought my first Android phone (SGS2 of course, after years of being a Symbian fanboy), but have not received it yet.
1. Does everything run on top of Dalvik JVM? At the bottom is the Linux kernel. Then there is a Linux process which runs Dalvik VM. Could for instance Sun's JVM run on a Linux process of its own or another Linux application?
2. Can C/C++ Linux program run on Android? Though compiled for ARM. Android has NDK (Native Development Kit) which allows it to run C/C++ applications inside Android applications, but I'm wondering about running C/C++ applications directly on Android. BusyBox is coded in C, but runs on Android. Is it running directly on the kernel's linux process or within an Android application on Dalvik?
3. The latter(Q2) would indicate that not everything run on top of Dalvik. Otherwise C/C++ programs would not run.
4. Android uses ADB (Android Debug Bridge) for its CLI magic. BusyBox uses Ash. Can one install bash as the default shell, with full GNU Core Utilities commands? Some forum posts indicate that it is possible to install an ARM re-compiled bash version.
5. Android can be rooted by installing applications like Super User or BusyBox that would let the user execute applications as root. That would indicate that there exist a root user, in addition to the actual user. Is this similar to how it is on Linux? Can I define a password for the root user so that no applications can run root directly?
6. Are all user data stored in the database SQLite? User data is accessible through different applications, but how does Android determine access rights to it?
7. I have read that Android applications run on their own Linux process and are assigned a unique user ID. Does this mean that we can run ps to see all running processes or does it act like the Sun JVM just showing each VM process? However looks like different applications can run in the same process. Can these be distinguished or do we just the the once process.
8, Is the camera application (that some have made modifications of) a Google app or Samsung app? Just wondering since the former would allow such modified versions to run on other than Samsung phones, but given that different phones have different camera specs I don't see how this could go well.
9. Can the codes typed in the dialer be executed through a shell instead (adb)?

There are some apps that run direct c++ code. The stock gallery app for example is written in c++. So not everything uses that dalvik virtual machine. I don't know enough to answer all your questions though.

Not many replies. That is disappointing.
Perhaps I could move this thread to another forum here on XDA? Or perhaps another forum.
In the meantime I'll try some more Google search on the subjects...

Related

[Q] Can I develop for my tablet on my tablet?

Basically the title..
Im wondering if there is any sort of android IDE app that can create and manage projects? I use my tablet as my primary pc since I no longer have a computer for the time being.
If there isnt an app, I wonder if it would be possible by booting into ubuntu and compiling code there. Although then Id have no way to run the app, would I?
exploitz said:
Basically the title..
Im wondering if there is any sort of android IDE app that can create and manage projects? I use my tablet as my primary pc since I no longer have a computer for the time being.
If there isnt an app, I wonder if it would be possible by booting into ubuntu and compiling code there. Although then Id have no way to run the app, would I?
Click to expand...
Click to collapse
Both options work. ...
If you know how to work via a shell, you should have a look at http://forum.xda-developers.com/showthread.php?t=1340852. It includes everything to get an android application up-and-running on your device from your device itself. It includes the java compiler, dex, signer, ... even vim as a text editor. Very cool.
Ubuntu works also, but is a bit heavier. You will need at least a giga byte of space. But then you can use most of the usual tools. But I didn't find a working SDK for android for the arm version of Ubuntu. So it's mainly useable to create applications that will have to run inside that Ubuntu. It is also possible to use it with a GUI throug VNC, but I don't feel that it is useable enough for real development.
Good luck ...

android apps on linux?

as many of you know, android and Linux kernels started re-merging at version 3.3. People said that a short way down the road, android apps would be able to run natively in linux. the kernel is now version 3.6 and I've heard nothing more about running android apps in linux. people on these and other forums put a lot of great work into getting linux running on android devices. now with windows 8 coming out, the market will be full of both ARM and x86 based touch devices of all sizes and shapes. I for one would love to be able to boot up ubuntu on one of these devices, and use either traditional linux apps or android touch apps as my mood and situation dictate. so- any new word on when we will be able to run android apps in linux?
we are exploring this possibility, and did some work, but nothing to release yet.
I assume you already know that for now, you can run Android as a virtual machine on Linux host.
cool to hear the work is progressing, good luck!
I heard about using a VM but was never able to find where to get it.
nothing substantial yet, we wanted to run android apps directly on desktops, Linux or Windows. Using a virtual machine is really an over kill.
You can download a prebuilt vm from ours:
http://www.vmlite.com/index.php?option=com_kunena&Itemid=158&func=view&catid=9&id=8838
it has been downloaded millions of times. You can search "Android vm" on google to find instructions.
interesed
I am also hoping to see a solution to this question also. I understand that Debian, fedora and Arch Linux all have different packaging systems i always thought is was a smiler difference with android with more Java worked into the core of things. So i would think that adding the proper Java support to any Linux distro to support the apk package it should work but i am not a programmer.

An IDE for building the Android OS?

I have spent many years developing applications and device drivers for Windows (short pause while people make grunting noises and snide remarks)... but I recently switched over to developing software for Android. I have begun getting acquainted with the Eclipse IDE for Android app development (I downloaded the ADK bundle), and have also tried to acquaint myself with the process of building an Android ROM (ie: downloading the source and doing a build of the entire Android OS and support software). It seems like people who develop software for Linux are hung on the idea that everything should be done via typing shell commands into the terminal, and because Android is an "off shoot" of Linux, that the core developers of Android do the same (getting the source and building the OS is always described in terms of terminal shell commands).
I much prefer have a graphical UI in which I can just click on menu items and buttons to do the selected build operations. Is there an IDE (some sort of enhanced source code editor or whatever) that I can use to automate "repo" operations and to automate building the Android OS???

Run any Android app on your Chromebook

http://surl.im/MhvRr
This has really breathed new life into my HP Chromebook. The only downside to this OS is the way it handles ZIP files. You must drag them to the Download section and they get unpacked and show up in left column.
Android Apps that work for me:
Pandora
DoggCatcher
Garman My-Cast Weather
TWIT.TV
Android Apps that won't run:
iBird Pro
WinAmp
Gmail 5.0
Anyone know if gmail 5.0 will run well on Chromebook? I need a new laptop and would like to go to ChromeOS but I need a decent exchange email client. The company that hosts our web access will not enable full version of OWA for anything other than IE.
Thanks for sharing useful information with us.It helps for the new followers who dont know about this.
I dont see the FIOS app listed, can it be done? I use my tablet like a second tv at home and to watch stuff in HD as I do not have the hd box. Thx.
Technically, yes you can run any Android application on a Chromebook, but it will require quite a lengthy process that may not even be worth the time. Here's the guide. Just follow these steps: (I would post a link but I'm a new member...)
"Google is currently working with a handful of developers to bring a few Android apps to Chrome OS—but why wait for the pokey process to bear fruit? You can run any Android app on your Chromebook today. Chat on Skype, play Minecraft Pocket Edition, or read the latest news in Flipboard; it’s all possible, with a little help from Linux.
Here’s how it works: Google created a “runtime” that allows any Android app to run on Chrome OS. To test it out, it released four Android apps—Vine, Evernote, Duolingo, and Sight Words—that are now on the Chrome Web Store. Installing one of these apps will get you the runtime, and then you can “sideload” an Android app and run it on your Chromebook.
Google's goal is to get every Android app running on a Chromebook. In practice, the runtime is still in development and some apps crash—especially since Google's Android backend services aren't present on a Chromebook—but many apps already work just fine. Apps that use the microphone and camera even have access to your Chromebook’s microphone and camera. Android app notifications appear in Chrome’s notification center, too.
4.3 skype on chrome os
Skype's Android app running in Chrome OS, complete with notifications in the lower-right corner. Nobody tell Microsoft!
Getting started
First, install one of the four official Android apps—like Kids Sight Words—from the Chrome Web Store. Try the app and ensure it works on your Chromebook. Installing this sample app will also install the Android runtime for Chrome OS, and that’s what lets this hack work behind the scenes.
Install an Android app on Chrome OS
We’ll be using the chromeos-apk tool for this. It runs on UNIX-like systems (read: Linux and Mac OS X). We performed this process with Ubuntu 14.04, but there’s a way to convert APK files manually if you’re on Windows, or you can run Ubuntu from a live CD or Wubi. You can even do this on a Chromebook itself if you’re a geek who’s installed Linux in developer mode.
On Ubuntu, open a Terminal window. Run the following two commands to install and set up node.js:
sudo apt-get install nodejs npm
sudo ln -s /usr/bin/nodejs /usr/bin/node
Next, install the chromeos-apk tool:
sudo npm install chromeos-apk -g
You’ll need the Android app’s APK file. Google doesn’t just allow you to download these from the Google Play Store. You can sometimes find APK files on various websites online, but that's risky—it’s like downloading a program’s .exe file from an unofficial file-hosting site instead of the official source.
1 download android app apk file for chrome
Downloading an Android app's APK using AirDroid's web interface. (Click on any image in this article to enlarge it.)
If you have an Android smartphone or tablet, AirDroid works well for this. Install the Android app you want to run on your Chromebook on your Android device, and install AirDroid as well. Open the AirDroid app and visit the AirDroid website on your computer. Sign in to the AirDroid interface. You don’t need to create an account, just scan the QR code on the screen with your device’s camera. Click the Apps icon, locate the app you want to run, and click the Download button to its right. You’ll get the app’s APK file on your computer.
Next, you’ll use the following command on your computer to package the Android app up for Chrome OS. (Be sure to replace “/path/to/app.apk” with the file path to the downloaded APK file on your drive.)
chromeos-apk /path/to/app.apk
If you’d like to use the app’s tablet interface instead of it smartphone interface, add --tablet to the end of the command, like so:
chromeos-apk /path/to/app.apk --tablet
2.5 convert android app for chrome
Converting an Android app for use on a Chromebook using the Chromeos-apk tool in Ubuntu Linux.
I saw an error message with Skype and had to enter the “com.skype.raider” name when prompted, but the tool still successfully converted Skype and it ran on my Chromebook. The tool is supposed to get the appropriate name from the APK file so you don’t have to enter it by hand, but it doesn’t always work.
The command generates a directory, which will appear in your home directory on Linux. Copy the entire directory to your Chromebook via a USB flash drive, SD Card, or shuffling it around using a cloud syncing service. Go to the Extensions page on your Chromebook (Chrome > "Hamburger" menu > Tools > Extensions), click Enable developer mode, and use the Load unpacked extension button to load the extension directory for the Android app.
3 install unpacked extension
The Extensions menu's developer mode in Chrome OS.
Once that's done, simply open select the Launch option for the app in the Extensions menu.
Run more than one app
This tool has some limitations. Google’s Android runtime for Chrome is currently restricted to four specific apps, and the tool above replaces Vine with an app of your choice. You can only use the command above to install a single Android app on your device at a time. If you want to install up to three more, follow these instructions.
Vladikoff—chromeos-apk’s developer—has also now released a modified Android runtime for Chrome. It’s known as the ARChon Custom Runtime, and it allows you to run any number of apps at a time. It even allows you to run Android apps in Chrome on Windows, Linux, and Mac OS X. This modified runtime is less official and may be more unstable. Of course, Windows users already have a good way to run Android apps with BlueStacks or by installing Android in a virtual machine.
soundcloud chromeos Vladikoff
Soundcloud's Android tablet app running on a Chromebook.
Where is this headed?
In the future, Google will likely improve their Android app runtime and allow all Android developers to easily package their apps and put them on the Chrome Web Store. Google could go even further, adding Chromebooks as another supported device in Google Play so you could easily install any Android app on a Chromebook like you'd install it on a smartphone or tablet.
We’ll probably need unofficial tools like chromeos-apk for a while. It’s unlikely we’ll see every Android app appear in the Chrome Web Store any time soon. Chrome OS users may have to use tools like chromeos-apk to package up apps like Skype; Microsoft probably doesn’t want Skype running on Chromebooks, as they like using it as a cudgel against Chrome OS in their “Scroogled” campaign and other ads.
Check out /r/chromeapks on Reddit for more discussion of this tool, including whether specific apps work! We’ll hopefully see the tool continue to improve, bringing more software to Chrome OS—though you have to wonder what this means for the future of Chrome and its offline “Chrome apps.”
It's a pretty straight forward guide.
chromebooks are a google product...
griffmac12 said:
Anyone know if gmail 5.0 will run well on Chromebook? I need a new laptop and would like to go to ChromeOS but I need a decent exchange email client. The company that hosts our web access will not enable full version of OWA for anything other than IE.
Click to expand...
Click to collapse
where chromebooks are a google product, yes, you shouldn't have any problem running your gmail.. i can sink my email from my samsung gal 4 and no issues... comes equipped with gmail, you will have to set up an account, or use an old one... to set your chromebook up... it's like an android netbook... but i love this... ( had a netbook, loved it too, but... this is way better!!!)
good luck with yours!!
apps
hi
i have a hp 14 chromebook(celeron)
android skype and ymail are working for me
hi
how successful are people at running android apps on there chromebooks?
i have been trying off and on since christmas to run android apps on a intel acer chromebook with no success,
while i havent used this method described here, as i havent got linux, i have tried the other two methods that are supposed to work.
i have mainly been trying to convert mincraft as this is supposed to work fine, i just thought get this working and move on
first i installed evernote, to get the run time on chrome book, its definetly on there
then i have put ARChon
https://play.google.com/store/apps/details?id=me.bpear.archonpackager
on my phone, and used it to create the files/folders from apk files which then i put on the chromebook, and install via chrome/load unpacked extension
but it just shows the icon for a minute then the chrome crash screen
i have then tried installing Twerk,
https://chrome.google.com/webstore/detail/twerk/jhdnjmjhmfihbfjdgmnappnoaehnhiaf?hl=en
directly on the chromebook, converting the apks with twerk and then again install the resulting files/folders via load unpacked extension
but same result,
next attempt, i put the Archon runtime on the chromebook
https://archon-runtime.github.io/
i have repeated the previous steps, archon on my phone and twerk on the chromebook but still get same results
i have also tried a few other random apks, and i have tested the apks im using on a tablet so they all work
For older Chromebooks/Chromeboxes that Google will not load the Android store on, there is one possibility. There is a Linux distribution called "Android x86". I have installed this Linux distribution on my PC laptop, dual boot with Windows 10 and Ubuntu. It looks and runs android marshmallow just like my android tablet and phone. You don't need touchscreen. The mouse point, click and drag works fine to perform all touch functions. I can download and run Google Play Store apps to my PC with Android x86.
So, since you can install Linux through Crouton on a Chromebook/Chromebox, you should be able to install Linux Android x86 through Crouton.

[Q] Is it possible to turn an Android installation into a Linux distribution? How?

Hello everyone,
In brief I was wondering if I could somehow turn an Android installation into a GNU/Linux distribution, given that Android uses the Linux kernel. Maybe I can install the GNU libraries and the rest of a distribution on top of the kernel, then deactivate the Android libraries that get on its way? I'm thinking of doing this because the Linux kernel already has all the required drivers for my device so perhaps the only thing that I should do is to tweak some files.
Here is my story:
At work I was given an old and unsupported industrial touchscreen module from a largely unknown company. The screen itself is connected to a computer module in the back, which has connectors for several peripherals, an embedded ARMv7 processor, and runs Android 2.2 (rooted) as its operating system.
I was given the task of finding out in a short time if I can install another operating system in the computer (say, Debian) to use it as a PC.
So I looked for information about this device, but I could only find the document attached.
So far, I have been able to turn it on, to connect it to the internet, to get it to read an SD card, and to connect USB peripherals such as a mouse and a keyboard.
But as for installing a different operating system, I haven't had any luck. I've tried different things. For example, I tried to boot into recovery mode by pushing several combinations of keys, but with no success so far. I've looked at the circuit board, but I haven't seen anything illuminating.
Also, I think that installing a Linux distribution from scratch would be painful, even impossible, because this device is not supported in any form and it doesn't come with a user guide or a software package, so it would be impractical to get the drivers for the device, as they are most likely non-standard.
I mean, is it even possible to accomplish this? Is it practical? How should I proceed? I think it is technically possible, but I'm not a Linux expert, not an Android expert, and not an embedded systems expert so I may be wrong.
I have also looked into other options. For example, the "Complete Linux Installer" Android app. I don't think this would work. The device only has ~100MB of free space in the internal flash memory.
There is also a way to install a GNU/Linux distribution that runs on chroot simultaneously with Android and communicates with it via VNC, called "Linux Deploy", but this sounds like it is not optimal. I don't think it would be a good option because of the limited resources of the device.
Any help will be appreciated.

Categories

Resources