Hot answers tagged

27

( sleep 300 ; echo "80" > /sys/class/leds/blue/brightness ) & That way your script continues, or you restore control immediately, while a new background task of the script starts, with two commands: sleep, and echo. The common error is trying to give either sleep or echo or both the & which will not work as intended. Launching a series of ...


15

Terminals only understand characters, not keys. So al function keys are encoded as sequences of characters, using control characters. Apart from a few common ones that have an associated control character (Tab is Ctrl+I, Enter is Ctrl+M, Esc is Ctrl+[), function keys send escape sequences, beginning with Ctrl+[ [ or Ctrl+[ O. You can use the tput command to ...


13

sudo is a a normal application with the suid bit. This means in order to use sudo it has to be installed on the system. Not all Linux systems have sudo installed per default like for example Debian. Most Android systems are targeted for end users who don't need to know the internals of Android (i.e. each Android applications runs under it's own user), so ...


12

You can use ap-hotspot from the webupd8 repository to create an infrastracture AP instead of adhoc. I am using this on Ubuntu Precise (12.04), but it is available for Saucy, Raring and Quantal as well. $ sudo su - # add-apt-repository ppa:nilarimogard/webupd8 # aptitude update # aptitude install ap-hotspot # ap-hotspot configure # ap-hotspot start


11

Yum maintains a cache of the RPMs it downloads here: /var/cache/yum/<you architecture>/<OS version>/ For example my box is Fedora 14, x86_64 architecture so I have the following: $ ls /var/cache/yum/x86_64/14/ adobe-linux-i386 lamolabs rpmfusion-nonfree adobe-linux-x86_64 lamolabs-noarch ...


8

With regard to eclipse not being able to find adb, etc, this because without the 32-bit shared libraries needed to run them on the system, they are not executable. With regard to 32-bit libraries, the situation is fairly simple: you just need to install the appropriate 32-bit libs. On the 64-bit fedora 17 install I have here, the primary 64-bit libraries ...


8

boot.img is a small(ish) file that contain two main parts. * kernel(important for android) * ramdisk( a core set of instruction & binaries) Unpack boot.img: It contains the following steps: Download the tool using wget http://android-serialport-api.googlecode.com/files/android_bootimg_tools.tar.gz Extract the file using tar xvzf ...


8

UPDATE: There are several, better alternatives to Airdroid now. However, it seems most linux distros are now working with MTP fairly well. I know in my experience, Mint (Ubuntu based) works out of the box, as does Manjaro (Arch based). If it doesn't work out of the box or natively, then be sure to search your package manager for an MTP solution. Newer ...


8

Android and Linux are two different operating systems. You can't just take an executable from one and run it on the other. The first hurdle is the kernel. Android and Linux are based on the same kernel, but they have a few different features. In particular, Android provides binders, which only exist in the mainstream kernel (the one found in Linux ...


7

I don't know of a way of adding things to /proc outside of writing a module (or plain kernel code). Might be some utilities out there though. If you can build and insert a module, then it's pretty simple: you can just create another symlink (/proc/mounts is a symlink already). Source (mnt_link.c): #include <linux/module.h> #include <linux/kernel....


7

The phone has to be rooted to have the root user install sudo (or any other app). Otherwise it would be installed as the "standard" user and not have root access. As for the second question, once sudo is installed on the rooted phone, in my experience, the apps that need it simply request it and you get a popup prompt.


7

use the at command echo "echo \"80\" > /sys/class/leds/blue/brightness" | at now + 5 min that will run in the background


6

No. There is no official Arch Linux repository for ARM. However, there is a fork of Arch for ARM: http://archlinuxarm.org/


6

The easiest way to do it would be to change the binary: sed s-/proc/mtd-/tmp/mntx- < romdump > romdump.new ln -s /proc/mounts /tmp/mntx ./romdump.new The trick here, since you're editing a binary, is to make sure the original string /proc/mtd is the same length as the new string /tmp/mntx, so that you don't change the size or location of anything in ...


6

You have to install the 32 bit glibc: # yum install glibc.i686 This removes the misleading 'no such file or directory' message when trying to execute a 32 bit binary. With that the 64 bit Fedora system is capable of executing 32 bit binaries. This also removes the misleading 'not a dynamic executable' message of ldd when calling ldd on a 32 bit dynamic ...


6

You can use a wiki like Zim - a Desktop Wiki and save its files to a Dropbox folder. For Android you can use WikiMind note to work with the Zim Wiki. I'm sure there are other apps that can work with Zim's files since they're just text with wiki markup. EDIT #1 Other options for Android if the $3 price for WikiMind is too steep. WikiMind Lite ZimDroid (it'...


6

sudo is not universal. Just because it exists on the particular Linux distro you use, doesn't mean it's available on all OSes that also use the Linux kernel.


6

The rpm files themselves are downloaded and then installed. Once these files are installed, they are tracked by the rpm database. To see where the files for a particular rpm were installed, you can run rpm -ql. E.g. [z@localhost ~]# rpm -ql bash |head /bin/bash /bin/sh /etc/skel/.bash_logout /etc/skel/.bash_profile /etc/skel/.bashrc /usr/bin/bashbug-64 /...


6

For Arch Linux try : $ sudo vboxreload And for Mac try : $ sudo /Library/StartupItems/VirtualBox/VirtualBox restart


6

On Android, like on many Linux-based systems, the kernel first mounts an initramfs on /. The initramfs is stored in RAM; it is loaded from a CPIO archive which is stored together with the kernel itself (or in some other place where the bootloader can find it). Most desktop Linux systems have a small initramfs which contains just enough programs and ...


6

A very easy solution is to put your files under version control before applying the patch. The version control tools du jour are Git and Mercurial. I personally use and recommend Mercurial. Also, if you want to see what files a patch applies to, you can run diffstat patchname Sample output with Mercurial: apt-get source hello cd hello-2.9 hello-2.9$ hg ...


5

The difficulty is that it's a completely different operating system. Android is not a Linux distribution. The only thing that's common between Android and GNU/X11/Apache/Linux/TeX/Perl/Python/FreeCiv (usually known as “Linux” or “Linux distributions”) is the Linux kernel. Linux is based on POSIX-based APIs, the X Window System for the graphical interface, ...


5

Actually google did more writing an app platform / virtual machine system to run on top of linux than they did modifying linux. They basically just used it as a base to build off of, they hardly had to touch it. As for your question, just start doing things. Get yourself some linux distros, install them on your computers or in VM's, learn your way around ...


5

Android's source code is released by Google under open source licenses, although most Android devices ultimately ship with a combination of open source and proprietary software, including proprietary software developed and licensed by Google. Open source part (http://source.android.com/) is licensed under Apache Software License, Version 2.0 ("Apache 2.0"),...


5

"Linux", strictly speaking, is an operating system kernel used by both Android and the unix-like operating system referred to colloquially as linux, and sometimes more formally as GNU/Linux which we know via distributions such as ubuntu and debian. Linux, the operating system kernel, is written in C and must be compiled to native machine code. I think ...


5

Yes there is one VM called Linux-on-android. I have heard of it, few of my friends used it and they had good experience. You can find it on sourceforge. I hope it will help you


5

USB mass storage mode is only for accessing the microSD card. Linux is reporting that there is no medium because you don't have a card inserted in the phone. Mass storage mode provides exclusive access to the card, and it provides that access on a raw device level, below even the filesystem. You're using Linux's implementation of vfat, not the phone's. You ...


5

The LSB, POSIX, and the Single UNIX Specification all significantly involve userland. Simply using a kernel that is also used as the basis of a "unix-like", "mostly POSIX compliant" operating system -- GNU/Linux -- is not sufficient to make Android such as well. There are, however, some *nix-ish elements, such as the shell, which is a "largely compatible" ...


5

First, you must be clear that Google's Android code and Linux kernel code are separate. Android itself is licensed under Apache License 2.0, which is permissive, and in Wikipedia's words: The Apache License is permissive in that it does not require a derivative work of the software, or modifications to the original, to be distributed using the same ...


4

The “no such file or directory” message is in fact referring to the loader for 32-bit executables, which is needed to execute your 32-bit executable. For a more detailed explanation, see Can't execute some binaries in chroot environment (zsh: Not found). You need to install 32-bit support on your Arch Linux. Unfortunately, Arch Linux doesn't have a ...



Only top voted, non community-wiki answers of a minimum length are eligible