I understand the Android OS is based on Linux. Does that mean the G1 phone has a terminal emulator and you can open a console and use commands like cd, ls, etc? Or failing that, would it be possible to write a terminal emulator for it?
On a related note, would it be possible to run a ssh server on the G1 and log into it over a wifi connection?
Actually, until recently everything you typed on the keyboard got echoed to a root shell. Nasty bug.
That said, you want PTerminal, from the Android Market.
As for SSH, yep. You can even install Debian on the phone.
Currently there are a few terminal emulators in the market and elseware on the web (quick google search and you'll see), but if you are running the latest OS patch level (RC30) you will no longer be able to get root at all. The shell's are still somewhat useful to poke around the file system and see the results of ps and top for example.
In case you don't know, it's worth pointing out that android has a fairly secure application sandbox. Each installed app runs as it's own user. Not many binaries on the phone are world-executable, and a lot of files aren't even world-readable.
However, I don't think anything is preventing you from copying executables to the phone and running them as a non-privileged user.
The android SDK comes with a tool that lets you run a shell from your development machine over USB. The su command does not work on the TMobile phone but does work on the unlocked phone that comes direct from google.
Very easy to flash back to RC29 and get root, I did and have Terminal Emulator running good. I just don't know many commands.
Related
I am using Android 6 Marshmellow.
I need to perform a local backup on Whatsapp without access to the screen. The motherboard has been damaged possibly beyond repair. The net result: Nothing displays on the screen. I have tried Windows 10 programs that display the Android screen in a window on PC but they don't work - possibly because the phone is failing to produce an output in the first place.
One program I used is this but the screenshot that the java app takes is pitch black. Hence my assumption the motherboard is incapable of producing a display at all.
Therefore, I would like to know if there is a way to execute app-specific commands such as telling Whatsapp to create a local backup via adb tools. So use Whatsapp via the Windows command line, through adb, as you can on Linux.
I cannot interact with the display; touch inputs are not registered. It has a password but the phone is not encrypted. My Windows 10 PC is a trusted PC and the phone has developer tools on.
More info here.
If you set that phone up for development and you can use adb commands to install an app (and send other intents), you might be able to try this out: Vysor
You can test this by simply turning on your phone, plug it in via USB cable and then run "adb devices" on your PC. Make sure adb.exe is in your Window's path.
Download the Windows app, install it and run it. Then plug in your phone. If this phone has developer options enabled and has been white-listed for the particular PC you're using, then it should allow the Windows app to install the Vysor Android app and start it. Once that happens, it should be able to connect and you'll see the phone's screen on your PC. Try it out with a working phone first if you like.
Good luck!
Find your emulator device ID. Run C:>adb devices
Find the package you want to debug. Run adb shell pm list packages .
Set the app to debug at startup (note the -w)
Start the app in the emulator.
Connect Android Studio Debugger.
Point to source code and set breakpoints.
I am trying to find a fast way to see if an android phone is rooted or not. I know you can use root checker app but due to numbers of phones it is far too slow to install and use.
I am looking for a way that I use. I know I have to turn ADB on, on the phone and plug it into my pc.
Is there a way to check this using command a line I can run in CMD?
I have android studio install so is there a way of running a script from this that will check to see if a phone has been rooted?
I know what due to number of way a phone can be rooted it not always 100% but I can live with that.
I know two ways you can check if you android is rooted.
Installing an "Root Checker" app from the Play Store.
Installing a Rooting software that check the android when is conected, try Kingo Root.
I want to debug my android application, I have Eclipse Installed fully setup for android developement.
The problem is,
1) I can't run android emulator(Hardware Concerns).
2) I can't attach phone to my computer(Driver Concerns).
Now,
Is there a way to get debug functionality by putting directly the apk into the phone storage and installing it from there.
I wanted get the logcat of the application that I'll be running.
Basically I'm quite naive in android, I'm not quite sure of the terms I said but, What I want is a way to test my app on my phone without the role of my PC.
If you have root you can use Wifi ADB
Also you can remove drivers for this device and install other driver from your device manufacturer.
If you can run standard emulator you can use Genymotion.
I've bought a tablet recently. It's a SysTrade's Plug 10.1 (Chinese product of local company). It features a reasonable CPU and quite nice GPU, so I thought it would be great to hardware debug my applications. However, this feature seems not to work on my device...
At beginning I lacked the required vendor id so after a few phone calls to SysTrade I received one. But that code didn't work. So I've written a small app and got all 2-byte numbers which I copy-pasted to /etc/udev/rules.d/51-android.rules. The problem is that adb still can't see my device. What's important my HTC Wildfire is successfully recognized so rules are written well.
I know none who owns this tablet so I don't have a possibility to check whether all Plugs or only mine are affected. Any ideas would be highly appreciated...
PS. I'm developing on Linux (Ubuntu 12.10).
PS2. When I connect the device to PC it shows that hardware debugging is turned on, but adb doesn't see my device.
I've managed to successfully resolve the issue without rooting the device. The only needed action is to manually add an entry for the device vendorid in ~/.android/adb_usb.ini.
Normally it should be generated based on /etc/udev/rules.d/51-android.rules by android update adb command but it seems that this application failed. What's important, vendorid must be given in hex number specific format, which is: 0x(2-BYTE HEX) for example 0x2207.
Try running adb on root.
If that doesn't work you can still try to root your device(This may void warranty) and use app like adbWifi. I'm using the latter for debugging and it works: I can run my apps on my M-tech aTAB7t.
Where do I copy the apk file on the Motorola Droid? Which directory? Are there any possible issues I need to be careful of, it's also my personal phone...
To install an apk file, you need to execute
adb install /path/to/file.apk
While the droid is connected. I would avoid using any programs other an adb to install your application. adb will definitely follow the rules and you should be able to clean things up, etc if something goes wrong. That may not be the case with other programs.
I should note, this is assuming you are writing the program yourself. adb is a program that comes with the Android development kit (I assumed you are using this as this is a programming related site. If you are not referring to this and you are simply trying to install a program on your phone, this question would probably be better on superuser.com)
Edit To address your comment. When you select "run" from eclipse, and you have your droid plugged in, it should give you the option to select which device you want to execute the code on. Double clicking on your droid will automatically install and launch the app. You may need to enable the development settings within the Settings menu though for it to be recognized. To confirm that eclipse (really it's adb) can see your droid, launch a terminal or command prompt and type adb devices while the droid is connected. If it's listed there, you're good to go.
I guess I was making it way more complicated than it needed to be. If you have eclipse with the Android plug-in, all you need to do is go into the settings of the phone, then applications, then development. Set the Debug mode to on. when you compile the app with eclipse I guess it looks for an actual phone first, if it detects it, then it loads the app on it. If no phone is detected and you have the ADV set up right it loads it there. Easy... There is a setting about unsigned apps in the application menu, I set it to accept and turned it off after, my apps are still on the phone and work... I am not sure if it was needed at all.
I don't know whether this is how you're supposed to do it, but get Astro File Manager, and you can install your app wherever you place it.
There shouldn't be anything you need to be careful of if it isn't rooted. Programs are pretty well contained and can't do much outside of their own little Dalvik machine.