Install htop/atop in android device - android

Is there any way to install htop and atop in my android device? ie for installing atop in my linux pc I can use apt install atop in a terminal. Similarly is there any way to install atop in my adb device?

Install Termux from the play store. Termux brings a complete linux environment and allows you to install linux tools using the "pkg" package manager.
Getting HTOP is as easy as this:
1) Install Termux from Playstore
2) Open Termux
3) type "pkg install htop"
4) type "htop"
Enjoy

Termux works, but it shows only apps rub by the termux session.
You need to chroot in the root of the system:
Run Termux
pkg install tsu
tsudo chroot /
htop

The following has worked for me:
pkg install tsu
tsu chroot /
pkg install htop
htop
Executing "HTop" whenever Termux is started works for me.

alternative to htop to show all system processes you can use top command
from an adb shell as you mentioned

This way of htop helpful in finding actual system performance, Since its running on termux again a Java app will emulate a terminal like prompt there it will install htop. hence its not useful.

Related

How do you connect a OnePlus Two Device to Ubuntu through MTP?

When I connect it to my ubuntu 14.04, I am only able to see the USB drivers for installing ADB.
There are a few solutions available for OnePlus One (See here) but I was not able to find one for OnePlus two.
After much tinkering, I found the solution -
You need the latest mtp drivers for OP2 -
$ sudo apt-get install libmtp-dev mtpfs
Now edit the following file -
$ sudo gedit /lib/udev/rules.d/69-libmtp.rules
adding this line
ATTR{idVendor}=="2a70", ATTR{idProduct}=="f003", SYMLINK+="libmtp-%k", MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1", TAG+="uaccess"
(The vendor id and product id can be got by using the "sudo mtp-detect" command)
now restart the service
sudo service udev restart
Your OP2 should be able to transfer files to your ubuntu PC now!
P.S - You will need to change the {idProduct} to whatever is specified by mtp-detect if you are not on the stock ROM/Kernel!
OnePlus X connected to Ubuntu 15.04 via USB
Alex Joseph's answer above worked for me BUT I had to also install mtp-tools in order to have the mtp-detect command (otherwise I only got "command not found").
$ sudo apt-get install mtp-tools
After that I could see my OnePlus X, verify the vendor id and product id, and follow the rest of the steps. My Ubuntu system now sees both internal storage and SD card.
I made the following changes and One Plus two starts showing up in my adb devices list:
Go to your home directory and using any editor open the adb_usb.ini file. it is present under .android folder I used vim editor:
vim .android/adb_usb.ini
Add 0x2A70 text without any trailing spacees to the file as below:
**
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x2A70
**
Stop and start the server:
adb kill-server
adb start-server
Now check, device should show up:
adb devices
After install android adb, I can open OnePlus 3 folder on Ubuntu 16.04
sudo apt-get update
sudo apt-get install adb
I would suggest just enable developers tool in your settings,
I did the same thing. now I can transfer files easily.
If you can not find developer tools option in settings, just go to about phone and tap on build number 7 to 8 times continuously.
that's it your done.
Install Android Debug Bridge and Media Transfer Protocol (MTP) library tools by.
sudo apt-get install adb install mtp-tools
Connect your OnePlus device, you should see a new volume with drivers. Run adb script from there:
$ cd /media/$USER/20160907_1106261
$ bash adb_config_Linux_OSX.sh
android home is exist!
0x2a70
VID 0x2a70 is already configured..
adb should be OK!
Install android-file-transfer package:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0BB4A1B2FA1A38EB
sudo add-apt-repository "deb http://ppa.launchpad.net/samoilov-lex/aftl-stable/ubuntu artful main"
sudo apt install android-file-transfer
Check your device connectivity by running mtp-detect.
Run android-file-transfer.
See also: Device is already used by another process.
Troubleshooting
error returned by libusb_claim_interface() = -6LIBMTP PANIC: Unable to initialize device
Activate Developer Settings by tapping 7 times Build number in About phone.
Enable File transfer in USB configuration found in Developer options.
See: How can I access media on my OnePlus 5 with a Ubuntu OS?

android sdk on ubuntu Starting emulator for AVD PANIC: Could not open:

I found tons of answers to this question for Windows, but my problem is on linux (ubuntu). I just downloaded the adt bundle, launched eclipse and tried to start an emulator from the Virtual Device Manager, but I am getting the message
Starting emulator for AVD 'AS'
PANIC: Could not open: AS
I tried to run both as root or not root without success.
Thanks
Dont use ./emulator -avd {AVD NAME} as a super user...Try using it without root it worked for me..for more details see this link
I just had the same problem. Turns out I didn't have proper permissions on my Eclipse ADT Bundle.
Try:
sudo chown -R username adt-bundle-linux-x86_64****
Make sure you have permissions on your workspace too...
sudo chown -R username Workspace
Then you should be able to launch Eclipse as non-root and run the AVD just fine.
If you are running a 64-bit distribution on your development machine, you need to install the ia32-libs package using apt-get::
Open terminal and type the following
sudo apt-get install ia32-libs
For more information check the link below
http://developer.android.com/sdk/installing/index.html
I guess android sdk is 32 bit so you need ia32-libs if you are running on 64 bit machine
Edit:
You can try this
open terminal
and type
sudo chmod -R 777 'YOURPATH of sdk folder(Just Drag and Drop your Android sdk folder here)'
This will give read write and execute permission
you could try piecemeal install
eclipse download - no bundle
sdk download install
adt
I use ubuntu 12.04 and eclipse 4.3 and all is OK.
Ubuntu Android Emulator Problem [Solved]
The issue with android emulator is not the hardware drivers. It is OpenGL drivers. To solve it please go through these steps:
Open synaptic package manager (If not please install it from Ubuntu software center)
In Quick filter type “opengl” and press search.
Select the following packages:
libgles1-mesa-dev
libgles2-mesa-dev
libgles1-mesa
libgles2-mesa
libqt4-opengl [Update/Upgrade]
glmark2
glmark2-es2
libgles1-mesa-dbg
libgles2-mesa-dbg
freeglut3
libhugs-opengl-bundled
Selection procedure
Right click on the package and select as ‘Mark for Installation”.
And click ‘Apply’.
Enjoy the ANDROID PROGRAMMING WITH THE EMULATOR.
I found that chown ~/.android as well as chowning the ADK directory worked for me (ubuntu 12)

How to install android application in android without using adb?

i have just android terminal
i dont have adb to install apk.
i dont have double click on apk
and install that application.
so is there any command available using that i can install application on android shell?
Yes, try this:
pm install apk.apk

Installing an apk on android emulator on Mac OS

I tried following these steps(from here):
go to sdk folder, then go to tools.
copy your apk file inside the tool directory
./emulator -avd myEmulator
to run the emulator on mac
./adb install myApp.apk
to install app on the emulator
But when I run "./emulator -avd phoneEmulator" (phoneEmulator is the name of my emulator)
it just displays:
My-MacBook-Pro:tools myName$ ./emulator -avd phoneEmulator
2012-07-30 22:44:33.377 emulator-arm[2859:80b] Warning once: This application, or a
library it uses, is using NSQuickDrawView, which has been deprecated.
Apps should cease use of QuickDraw and move to Quartz.
It's as if that command is never returning.
If I can't input the 2nd command ./adb install myApp.apk in that window, where do I call it?
Open Terminal
go to android-sdk-mac\platform-tools
type ./adb install myApp.apk
You can work around by:
You have a *.apk file with you if you don't have, download it.
Open Android Studio and Run the emulator.
Open the finder and go to the location which contains your *.apk file.
Drag that *.apk and drop into the emulator and it will ask for confirmation after your confirmation it will install the *.apk in the emulator.
You can find it in application menu once installation succeeds.
First of all, you SHOULD NOT copy APKs to the tools or any other SDK directory.
Do not cd to the SDK directories, just add them to the PATH environment var or use their absolute path in command lines.
Then, if you want to run the emulator and then execute command from the same terminal, send the process to background (&):
$ export PATH=$PATH:/path/to/sdk/tools:path/to/sdk/platform-tools
$ emulator -avd myEmulator &
$ adb install /path/to/my.apk
You can work around by:
Upload yourapp.apk to internet. I.e: yourhost.com/yourapp.apk
Run emulator
Open internet browser on your emulator, visit link yourhost.com/yourapp.apk
Download and install
adb can be run from a seperate terminal once this emulator boots up.
May Be, Useful to all the command in MAC OS Terminal
Am I the only one whose apps install in the emulator when I run them as Android Application from eclipse?
I mean - why go though the trouble of adb when you could just use eclipse? (unless you have something against eclipse!)
Try this app. It will install the apk by just double clicking on it after you create an association to .apk files. It's all explained in the github source.
Alternatively You can use 'adb install' command as follows. "adbinstall/filename.apk"
ex. adb install /Users/manojclinberg/Downloads/ad3e0e46-d716-4fa9-b603-b8db3accf260.apk

Install Android app in Eclipse without running it

I'm using Eclipse to develop a bunch of Android apps and I need to batch install them, either on the emulator or on an attached device. I'd like to be able to push them all to the device without running them individually in Eclipse.
How can I do that?
try using adb.
adb install -r your/path/to/file.apk
-r is forced install.
You can also create a batch file with number of adb install commands.
You could just push them to the emulator using "adb install fileN.apk" from the command line.

Categories

Resources