[Solved] ERROR: 32-bit Linux Android emulator binaries are DEPRECATED - Android Studio

Hello,
I am taking my first steps into trying to create an Android app.
In installed Android Studio 1.5.1 on Linux Mint 17.3 (kernel 3.19.0-32-generic, 64-bit). JRE version is 1.7.0_95-b00 amd64 (according to the about box).
I try to run the app in the emulator. I have created a virtual device, with the following details:
Code:
Name: Moto_X_Play_API_23
CPU/ABI: Google APIs Intel Atom (x86_64)
Path: /home/gewe/.android/avd/Moto_X_Play_API_23.avd
Target: Google APIs (API level 23)
Skin: nexus_5x
Snapshot: no
hw.lcd.density: 400
hw.dPad: no
avd.ini.encoding: UTF-8
hw.camera.back: none
disk.dataPartition.size: 200M
hw.gpu.enabled: yes
runtime.network.latency: none
skin.dynamic: yes
hw.keyboard: yes
runtime.network.speed: full
hw.device.hash2: MD5:3f75bdae5e6cbfeae9214f0ae67b97b4
hw.ramSize: 1536
tag.id: google_apis
tag.display: Google APIs
hw.sdCard: yes
hw.device.manufacturer: User
hw.mainKeys: no
hw.accelerometer: yes
hw.trackBall: no
hw.device.name: Moto X Play
hw.sensors.proximity: yes
hw.battery: yes
AvdId: Moto_X_Play_API_23
hw.sensors.orientation: yes
hw.audioInput: yes
hw.camera.front: none
hw.gps: yes
avd.ini.displayname: Moto X Play API 23
snapshot.present: no
vm.heapSize: 64
runtime.scalefactor: auto
If I select this virtual device I get the following error message:
Code:
Cannot launch AVD in emulator.
Output:
WARNING: Cannot decide host bitness because $SHELL is not properly defined; 32 bits assumed.
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
- Use the '-force-32bit' option when invoking 'emulator'.
- Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.
Either one will allow you to use the 32-bit binaries, but please be
aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.
I downloaded an example app, but that results in the same error.
Why does Android Studio or the emulator think it is running on a 32-bit system?
How can I get rid of this error?

The emulator uses the shell to define if you are running a 32 or 64 bits machine.
The $SHELL environment variable doesn't seem to be defined in your case
Try to launch Android Studio from a terminal:
Code:
$ <YOUR_ANDROID_STUDIO_INSTALL_DIR>/bin/studio.sh
If this works, try to create a menu entry starting the following command:
/bin/bash <YOUR_ANDROID_STUDIO_INSTALL_DIR>/bin/studio.sh

I am running Android Studio from a terminal, I don't have a menu entry for it.
If I change the command into
Code:
export SHELL=/bin/bash && android-studio/bin/studio.sh
the emulator runs fine.
Another account on the same machine has the environment variable SHELL set automatically. Both accounts do not have a .bashrc in their home directory. The both have identical .pam_environment and .profile files.
From where could it have been set?

gewe said:
I am running Android Studio from a terminal, I don't have a menu entry for it.
If I change the command into
Code:
export SHELL=/bin/bash && android-studio/bin/studio.sh
the emulator runs fine.
Another account on the same machine has the environment variable SHELL set automatically. Both accounts do not have a .bashrc in their home directory. The both have identical .pam_environment and .profile files.
From where could it have been set?
Click to expand...
Click to collapse
Well AFAIK, the SHELL environment variable is set by the shell executable itself when it starts. It looks like something unsets it on your system.
You already checked the 3 files that came to my mind.
Maybe one of the global environment file (/etc/environment, /etc/bash.bashrc, /etc/profile or /etc/profile.d/*) But I doubt it as you would have the same issue with your other account

With some help from the Linux Mint forum the problem is solved. In /etc/passwd some accounts did not have a default shell specified. Adding that solved the problem.
Thanks for pointing me in the right direction!

Related

[HOW-TO] Setup ADB on Ubuntu Linux 64Bit

As you all may know (or may not know or may not even care), Google's current implementation of ADB for Linux only works on 32Bit Linux systems (boooh!) which leaves the rest of us x64 users with the dilemma of either installing an extra redundant 32bit version of Ubuntu that will hord 15Gb of space so that we may type a few ADB commands in the bash prompt or install ADB on Windows for those of us that have it. Ever since I bought my phone and was forced to reboot my beloved free OS to type those few commands, I'd wave my fists in the air and curse Google for not having had enough sense to make a 64Bit implementation.
Fortunately, my fists will need tire themselves no more. Using a guide compiled by a Geeksphone.com forum user called Talpa, I was able to successfully compile and run ADB on a Linux 64Bit system in short order. Little things make me happy and having seen that this technique is not very wide spread on the forums, I've decided to spread the happiness myself...
CREDITS:
Big, big thanks to the users of the geeksphone forums for having pooled their time, skills and efforts together to figure out this hack and a another big thank you to talpa for having sifted through all the of posts and having made a coherent and unified guide out of it. The guide can be originally found at:
http://wiki.geeksphone.com/en/index.php?title=CompileADB64bitLinux
the discussion that lead to the guide is at:
http://forum.geeksphone.com/index.php?topic=850.0
ADB Linux 64Bit (yeeehhhaaaah!!!)
For the sake of added clarity, I've completely rewrote the geeksphone guide. go to your terminal
#> sudo su
#> mkdir /tmp/my-adb
#> cd /tmp/my-adb
if you don't already have it, install git-core:
#>apt-get install git-core
once that's done, type out the following commands:
#> git clone git://android.git.kernel.org/platform/system/core.git system/core
#> git clone git://android.git.kernel.org/platform/build.git build
#> git clone git://android.git.kernel.org/platform/external/zlib.git external/zlib
#> git clone git://android.git.kernel.org/platform/bionic.git bionic
Before you run compile, you need to the following alterations to the compile scripts to make the output bianaries 64bit compatible. As time progress and this post ages in the ageless internet, some additional modifications may be necessary (or they may change the place of the offending code or may add new bits that need to be deleted or changed). You can go back to the GeeksPhone wiki link (up above) to see if the forum members there have updated it. Hopefully by then, Google would have compiled a 64Bit Linux version of ADB and all of this would be unnecessary. If for any reason you're unable or unwilling to modify the source code yourself, go to this link where I have posted the source code that I have modified:
http://www.mediafire.com/file/q42gektqr32nr31/adb-Linux64bit-source-code-jan-2011.zip
Editing the Source Code Yourself
first, edit the file /tmp/my-adb/build/target/product/sdk.mk and delete the last six lines:
==============================
# include available languages for TTS in the system image
include external/svox/pico/lang/PicoLangDeDeInSystem.mk
include external/svox/pico/lang/PicoLangEnGBInSystem.mk
include external/svox/pico/lang/PicoLangEnUsInSystem.mk
include external/svox/pico/lang/PicoLangEsEsInSystem.mk
include external/svox/pico/lang/PicoLangFrFrInSystem.mk
include external/svox/pico/lang/PicoLangItItInSystem.mk
==============================
then, edit the file /tmp/my-adb/build/core/main.mk at line 116 (again the position may change, just keep an eye out for the offending code) and erase the following lines:
==============================
# Check for the correct version of java
java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1\.6[\. "$$]')
ifeq ($(strip $(java_version)),)
$(info ************************************************** **********)
$(info You are attempting to build with the incorrect version)
$(info of java.)
$(info $(space))
$(info Your version is: $(shell java -version 2>&1 | head -n 1).)
$(info The correct version is: 1.6.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)http://source.android.com/source/download.html)
$(info ************************************************** **********)
$(error stop)
endif
# Check for the correct version of javac
javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1\.6[\. "$$]')
ifeq ($(strip $(javac_version)),)
$(info ************************************************** **********)
$(info You are attempting to build with the incorrect version)
$(info of javac.)
$(info $(space))
$(info Your version is: $(shell javac -version 2>&1 | head -n 1).)
$(info The correct version is: 1.6.)
$(info $(space))
$(info Please follow the machine setup instructions at)
$(info $(space)$(space)$(space)$(space)http://source.android.com/source/download.html)
$(info ************************************************** **********)
$(error stop)
endif
==============================
Edit /tmp/my-adb/build/core/combo/HOST_linux-x86.mk and change every "-m32 string" to "m64"
Now that that's done, you should be able to get the compiling going with the following command:
#> make -f build/core/main.mk out/host/linux-x86/bin/adb
Once that's done, you go to /tmp/my-adb/out/host/linux-x86/bin/ and you get your adb and acp binaries and move them to wherever your OS keeps all the system binaries.
In ubuntu 10.04, that would be
/bin/adb
/bin/acp
That's it, adb should work from your 64 bit linux shell.
==========================
Holy hell that looks overly complicated. I've installed adb about a dozen times on x64 Ubuntu. I'll post a link to the guide i was using in a minute...
Sent from my SGH-T959 using Tapatalk
http://forum.xda-developers.com/showthread.php?t=537508
(skip the last part about setting up fastboot)
except on this step:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"
Click to expand...
Click to collapse
You need to do lsusb in console (with your phone plugged in) and find the Samsung vendor id, it's like 0ed4 or something, I don't remember.
Much easier, I think.
birgertime said:
Holy hell that looks overly complicated. I've installed adb about a dozen times on x64 Ubuntu. I'll post a link to the guide i was using in a minute...
Sent from my SGH-T959 using Tapatalk
Click to expand...
Click to collapse
Um, yeah, I don't know why the OP is doing all this. All you need to do is download the android SDK for your platform:
http://developer.android.com/sdk/index.html
An adb binary is included in the tarball in the tools directory. Just add that to your path somewhere.
Yes, the binary included in the SDK is 32bit. No, it doesn't matter at all. A clean install of 64-bit Ubuntu includes multilib support for the (very few) 32-bit shared libraries it requires.
If you really, really need a 64-bit binary... well, go for it. But unless you're building your own Linux distribution or are doing something really exotic, it's highly likely that the 32-bit version will work just fine.
Yikes! This is overkill. Dude, just install the lib32 library files. You should really read the Android developers page on how to setup the sdk on 64-bit linux, its all there. ;-) Good luck with this though. Really...
Sent from my SGH-T959 using XDA App
I thought some people might appreciate the instructions to get adb working over WiFi too and this seems like a good place to put it:
Type this in your terminal emulator on your Android device:
Code:
setprop service.adb.tcp.port 5555
stop adbd
start adbd
Then check it with this:
Code:
getprop service.adb.tcp.port
If it doesn't return "5555" and you're rooted, then do a "su" command and try again. You shouldn't need to be rooted for adb over wifi to work, but I haven't tried every device:
Code:
su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
Then check it:
Code:
getprop service.adb.tcp.port
When it returns "5555" then run this command in the terminal (or command prompt) on your computer:
Code:
adb connect 192.168.0.151
(Obviously enter your device's IP address. You must be on the same network as the computer that has the Android SDK installed.)
And you should be connected!
To tell the Android device to listen for adb on the USB port instead of TCP again, enter this into the terminal emulator:
Code:
setprop service.adb.tcp.port -1
stop adbd
start adbd
(again, might need "su" on your device)
Or just reboot the Android device.
And to tell your computer to use USB for adb instead of TCP:
Code:
adb usb
Now, keep in mind, when your Android device is listening for adb via WiFi, it's wide open... anybody that that the Android SDK installed and knows your device's IP address can access it without a password.
HTH,
Billy
PS - Your
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
are appreciated!
Yes, I just installed a clean Ubuntu 64 bit and the lib32 binaries were included. I only needed to create a /etc/udev/rules.d/70-android.rules and enter my device ID - SUBSYSTEM=="usb", SYSFS{idVendor}=="18d1", MODE="0666". I can connect via ADB 32 bit just fine.
Of course using 64 bit drivers falls under the I did it because I could category as well. Kudos!
JeremyNT said:
Um, yeah, I don't know why the OP is doing all this. All you need to do is download the android SDK for your platform:
http://developer.android.com/sdk/index.html
An adb binary is included in the tarball in the tools directory. Just add that to your path somewhere.
Yes, the binary included in the SDK is 32bit. No, it doesn't matter at all. A clean install of 64-bit Ubuntu includes multilib support for the (very few) 32-bit shared libraries it requires.
If you really, really need a 64-bit binary... well, go for it. But unless you're building your own Linux distribution or are doing something really exotic, it's highly likely that the 32-bit version will work just fine.
Click to expand...
Click to collapse
Exactly my thoughts as well. It is simple enough to get it working using the standard package that Android provides!
Like others have said adb packaged with the android sdk works fine on ubuntu 10.10 with no additional configuration. The only problem that I know of is you have to run the adb server as root.
Sent from my SGH-T959 using XDA App
I'm pretty sure that you only have to give it root on the first time.
Sent from my SGH-T959 using Tapatalk
phattchumpy said:
Like others have said adb packaged with the android sdk works fine on ubuntu 10.10 with no additional configuration. The only problem that I know of is you have to run the adb server as root.
Sent from my SGH-T959 using XDA App
Click to expand...
Click to collapse
I am able to run the adb server with a user login with guest permissions. Did not have to use root. But I run Ubuntu 10.04. I guess that it would probably be the same for 10.10 as well, but can't confirm.
This is what I do (very simple and fast)
1) Open the terminal and type: wget dl.google.com/android/android-sdk_r07-linux_x86.tgz (Downloads The SDK with ADB)
2) Then type: tar xvfz android-sdk_r07-linux_x86.tgz && cd android-sdk-linux_x86 (Extracts the archive)
3) After that type: sudo mv tools /usr/local/share/android-tools (Moves the sdk tools to your local system folder)
4) Now type: sudo ln -s /usr/local/share/android-tools/adb /usr/local/bin/ (Makes a symbolic link to the adb executable)
5) Then type: sudo adb devices (This will start the adb server and search for connected devices)
You should now see this in your terminal:
List of devices attached
T959730f48f7 device
Firstly, Thanks a lot to the OP for posting this and the link to the geeksphone wiki. I really needed this and I would have removed my existing linux install, had I not come across this in the next few minutes.
Now back to the main reason why I am posting this comment.
I didn't see even one single reply that was grateful to the OP and the first many posts were just plain crap. If you people don't know what someone is talking about, then please don't show your ignorance and move on to troll other threads.
Of course you can install adb from the default google sdk package and it would work fine on 99% of your systems. It is the remaining 1% for whom this post is intended.
This method is for those who have a pure non-multilib 64-bit system. For such users, google has not packaged a 64-bit adb file in their release, and the default adb will not work. Such users have to build the adb file for a 64-bit machine from the sources. It is for such users that this is necessary and it was very much necessary for me, as well as for the OP, I presume.
So if you don't understand something, please don't waste others' time by spamming the post. The title is quite obvious to those who are looking for a solution.
Update: Just as I finished typing this, my adb has got compiled and I am able to run it. Thanks a million once again, OP.
geekoo said:
Firstly, Thanks a lot to the OP for posting this and the link to the geeksphone wiki. I really needed this and I would have removed my existing linux install, had I not come across this in the next few minutes.
Now back to the main reason why I am posting this comment.
I didn't see even one single reply that was grateful to the OP and the first many posts were just plain crap. If you people don't know what someone is talking about, then please don't show your ignorance and move on to troll other threads.
Of course you can install adb from the default google sdk package and it would work fine on 99% of your systems. It is the remaining 1% for whom this post is intended.
This method is for those who have a pure non-multilib 64-bit system. For such users, google has not packaged a 64-bit adb file in their release, and the default adb will not work. Such users have to build the adb file for a 64-bit machine from the sources. It is for such users that this is necessary and it was very much necessary for me, as well as for the OP, I presume.
So if you don't understand something, please don't waste others' time by spamming the post. The title is quite obvious to those who are looking for a solution.
Update: Just as I finished typing this, my adb has got compiled and I am able to run it. Thanks a million once again, OP.
Click to expand...
Click to collapse
damn!
The adb tool has moved to platform-tools/
If you don't see this directory in your SDK,
launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK Platform-tools"
Please also update your PATH environment variable to
include the platform-tools/ directory, so you can
execute adb from any location.
ofcourse they meved it. so ... any new tutorial with android sdk ?
in windows is the same problem with missing adb.exe (but i have an older version installed). just that i use windows for starcraft2 so i want adb for linux (eventually x64).
later edit: found it ->scroll down to platform tools
and after:
extract in a folder, cd to that folder
$sudo apt-get install lib32ncurses5 lib32stdc++6
# echo SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666">/etc/udev/rules.d/51-android.rules
$./adb kill-server
$./adb start-server
(kill and start i don`t know if is necessary, but it can`t do nothing wrong)
connect the device, $./adb devices and shall see it.
$./adb shell and enjoy
$ => as regular user
# => as root
i`m on kubuntu 12.04 (x64) and using an android 2.3.7 (cm7 based) huawei u8180 / orange stockholm
even easier
even easier paste these commands in linux terminal
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
btw # < $

Install ADB on Windows & ubuntu 12.04 or 12.10

If you need to flash ROM even using fastboot for Smartphone or Tablet in which they use Android OS! Then Ubuntu OS is needed!
This is a guide I made for ubuntu users and included a guide for windows users to setup Android SDK which contains ADB.
Android Debug Bridge (ADB) provides a terminal interface on your PC to interact with your device's file system. This can be useful for many things like installing & uninstalling apps, logcat, backup & restore, and hacking your device just to name a few.
ubuntu 12.04 & 12.10 Guide
1. Go here and download android-sdk (not the adt-bundle)....
https://hotfile.com/dl/241406263/5e6a306/android-sdk_r22.0.5-linux.tgz.html
2. Place the downloaded file in your home folder and then extract it and you should get a folder named android-sdk-linux (do not rename it).
3. If you’re on a 64bit machine run these commands in terminal to make sdk compatible with 64bit (if you’re on 32bit machine then skip this step)....
sudo apt-get update
sudo apt-get install ia32-libs-multiarch
4. Run this command in terminal to install jdk if you don’t have it already....
sudo apt-get install openjdk-6-jdk
5. Navigate to the home folder where you extracted android-sdk-linux and open the folder then open the folder named tools
6. Inside the tools folder there will be a file named android... double click it and select run then android sdk manager will open.
7. In the center pane deselect everything... Now only select the following....
Android SDK Tools
Android SDK Platform-tools
Android Support Library
8. Once selections have been made click on install packages and wait till finished.
9. Upon completion of step 8 in terminal run this command....
sudo gedit ~/.bashrc
When the file opens, go to the very bottom and copy/paste the following 3 lines (make sure they’re each on separate lines)....
# Android tools
export PATH=${PATH}:~/android-sdk-linux/tools
export PATH=${PATH}:~/android-sdk-linux/platform-tools
10. Now reboot your computer.
11. Set your phone to usb debugging then plug it to your pc after pc is done booting
12. Open a terminal on your pc and enter....
adb devices
If all went well, you should see your phone’s serial number and you’ll be ready to go.
~~~~~Important~~~~~
You can use steps 5 & 6 to open Android SDK Manager & update your ADB/SDK installation. Only select your installed packages then update.
Also if you only need the fastboot/adbtools:
sudo add-apt-repository -y ppa: phablet-team/tools
Note: delete the space after"-y ppa:" -xda creates smileys like ppa
sudo apt-get update
sudo apt-get install -y phablet-tools
Sent from my Nexus 4 using xda app-developers app
Thank...
gazhead said:
Also if you only need the fastboot/adbtools:
sudo add-apt-repository -y ppa: phablet-team/tools
Note: delete the space after"-y ppa:" -xda creates smileys like ppa
sudo apt-get update
sudo apt-get install -y phablet-tools
Sent from my Nexus 4 using xda app-developers app
Click to expand...
Click to collapse
Thanks man! It's also good way!
Followed this guide (thank you for posting) but couldn't connect. Scratched around and found I needed to create a new file in /etc/udev/rules.d with:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="<4-char_verndorID>", ATTR{idProduct}=="4-char_productID", MODE="0666", OWNER="username"
Followed by:
Code:
sudo restart udev
Then plugged device in and it worked!
qtoon said:
Followed this guide (thank you for posting) but couldn't connect. Scratched around and found I needed to create a new file in /etc/udev/rules.d with:
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="<4-char_verndorID>", ATTR{idProduct}=="4-char_productID", MODE="0666", OWNER="username"
Followed by:
Code:
sudo restart udev
Then plugged device in and it worked!
Click to expand...
Click to collapse
What did you name the new file you created? Or did you add this string to another existing file from the rules.d directory? I'm not sure what I've done wrong, but I get
Code:
[email protected]:~$ adb devices
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'kdb' from package 'elektra-bin' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'openjdk-7-jdk' (universe)
Command 'ab' from package 'apache2-utils' (main)
Command 'ad' from package 'netatalk' (universe)
adb: command not found
[email protected]:~$
This is after following each step, adding the three lines to the end of .bashrc and rebooting.
atmu5fear said:
What did you name the new file you created? Or did you add this string to another existing file from the rules.d directory? I'm not sure what I've done wrong, but I get
Code:
[email protected]:~$ adb devices
No command 'adb' found, did you mean:
Command 'cdb' from package 'tinycdb' (main)
Command 'gdb' from package 'gdb' (main)
Command 'dab' from package 'bsdgames' (universe)
Command 'zdb' from package 'zfs-fuse' (universe)
Command 'kdb' from package 'elektra-bin' (universe)
Command 'tdb' from package 'tads2-dev' (multiverse)
Command 'pdb' from package 'python' (main)
Command 'jdb' from package 'openjdk-6-jdk' (main)
Command 'jdb' from package 'openjdk-7-jdk' (universe)
Command 'ab' from package 'apache2-utils' (main)
Command 'ad' from package 'netatalk' (universe)
adb: command not found
[email protected]:~$
This is after following each step, adding the three lines to the end of .bashrc and rebooting.
Click to expand...
Click to collapse
@atmu5fear, inferring that you're new to Linux (a common background for all), some notes:
Unlike wlth Win-d'oh-s, there is a worldwide development community that's always working toward improvement of every aspect of the system, including echoed messages and documentation. You may have to shake off the tendency to ignore Windudz messages, which are frequently unhelpful. Linux command echoes are much more on-target. Also, look for files such as README in rules.d and read it!
Now before creating a new config file (which may not be necessary on your system), see the top feedback line: "No command 'adb' found." First, see that the adb binary is present and that it has exec permission. (Since it's a small file and functions alone, I prefer to copy it to the folder I'm working from.)
If it then runs but won't connect, read on...
Directory (or "folder") names with a trailing '.d' are special: They configure, control, or provide executables for daemons (programs which run continuously, providing a service).
Within service-config.d folders, if the service steps through the files sequentially (as in this case), then it does so based on each filename. (True except for the special case of rc.d, iIRC, in which order is set by the special program rcorder).
So in this case, for example, since the existing files are named 70-whatever, your newly-created file could be 80-atmu5fears-phone to load after the others.
Should connect.
qtoon said:
@atmu5fear, inferring that you're new to Linux (a common background for all), some notes:
Unlike wlth Win-d'oh-s, there is a worldwide development community that's always working toward improvement of every aspect of the system, including echoed messages and documentation. You may have to shake off the tendency to ignore Windudz messages, which are frequently unhelpful. Linux command echoes are much more on-target. Also, look for files such as README in rules.d and read it!
Now before creating a new config file (which may not be necessary on your system), see the top feedback line: "No command 'adb' found." First, see that the adb binary is present and that it has exec permission. (Since it's a small file and functions alone, I prefer to copy it to the folder I'm working from.)
If it then runs but won't connect, read on...
Directory (or "folder") names with a trailing '.d' are special: They configure, control, or provide executables for daemons (programs which run continuously, providing a service).
Within service-config.d folders, if the service steps through the files sequentially (as in this case), then it does so based on each filename. (True except for the special case of rc.d, iIRC, in which order is set by the special program rcorder).
So in this case, for example, since the existing files are named 70-whatever, your newly-created file could be 80-atmu5fears-phone to load after the others.
Should connect.
Click to expand...
Click to collapse
Thanks @qtoon for the reply. I'm not really new to Ubuntu, albeit, it's been a while. First started using it just prior to the realease of Hardy Heron 8.04 LTS. That being said I am certainly no expert, but am somewhat familiar and comfortable with the command line. I did read the README file before posting, but since I'm not all that familiar with configuration files and the like, I figured maybe I should ask.
As per your suggestion i moved the ADB binary to my home folder, not necessarily my working folder, but to test to see if the adb command would be recognized in terminal.
Code:
mv ~/ADB/android-sdk-linux/platform-tools/adb ~/
Still got same result so I moved it back, then went on to make a new file and add the suggested string
Code:
sudo > /etc/udev/rules.d/80-atmu5fear-adb
sudo gedit /etc/udev/rules.d/80-atmu5fear-adb
After saving and restarting udev I still get the same "adb command not found" error.
I then changed the string to read OWNER"atmu5fear" instead of "username", still nothing
Any more suggestions?
Thanks
atmu5fear
Sorted it out
instead of:
adb devices
i needed to input:
./adb devices
It's listed, and in order to use the adb shell:
./adb shell
once in the shell all adb commands work
I get this error...
[email protected]:~$ sudo > /etc/udev/rules.d/80-sjy-phone
bash: /etc/udev/rules.d/80-sjy-phone: Permission denied
ok....... didn't need to add a file, changed phone usb mode to media device and all is ok.
thanks
atmu5fear said:
Sorted it out
instead of:
adb devices
i needed to input:
./adb devices
It's listed, and in order to use the adb shell:
./adb shell
once in the shell all adb commands work
Click to expand...
Click to collapse
Didn't think to mention that, apologies.
Quick 'why' on the ./ here.
Glad you got it running.
Just tried on 14.4 and worked like a charm.
Note: No need to reboot the computer, just reload the bash config with
Code:
source ~/.bashrc
Thanks
A good step by step guide
i will try it and see if it works
Thanks again
Hello, can someone help me ? - I m having problems connecting my device with adb (I ve connected several other devices before with no problems).
I ve got an Allwinner A20 tv box, it worked fine for a few months then one day, after being on (but idle) for a few hours, I noticed the screen was blank but the light on the front was blue (indicating it was on, red is standby). It would not respond to the remote control or to anything, so I unplugged it and since then it will not boot and the screen is blank, the red light will light up but that is it. I ve eliminated the remote controller not working, but I cant boot the device.
So I ve tried connecting via ADB (with Ubuntu) but I cant get the device to show up after typing "adb devices".
Using this guide:
http://androidonlinux.wordpress.com/2013/05/12/setting-up-adb-on-linux/
I can get the vendor id and device id and I ve added it and the manufacturer to udev/modeswitch devices, but when I type "sudo usb_modeswitch -v 0x1f3a -p 0xefe8 -S -R -W"
I get the following error:
~/Android/sdk/platform-tools$ sudo usb_modeswitch -v 0x1f3a -p 0xefe8 -S -R -W
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.1.1 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x1f3a
DefaultProduct= 0xefe8
SierraMode=1
NeedResponse=0
Look for default devices ...
found USB ID 048d:1336
found USB ID 1d6b:0002
found USB ID 19a8:2036
found USB ID 1f3a:efe8
vendor ID matched
product ID matched
found USB ID 1d6b:0001
found USB ID 062a:0102
found USB ID 1d6b:0001
Found devices in default mode (1)
Access device 004 on bus 003
Current configuration number is 1
Use interface number 0
USB description data (for identification)
-------------------------
Manufacturer: not provided
Product: not provided
Serial No.: not provided
-------------------------
Send Sierra control message
Error: Sierra control message failed (error -7). Abort
I ve searched Google for the error code but I cannot find anything.
The device was rooted and USB debugging was on.
Any help would really be appreciated.
Thanks

How to set up Android SDK in Linux

*If you find this Guide Thread helpful, feel free to hit the "thanks" button below!
I'm doing this guide because when I switched to arch linux ,I found no guides to setup sdk in it.Arch is a beautiful OS, but for newcomers like me ,I took some time to get used to it.So,In this guide, we’ll take a look at how to set up a development environment for Android in Arch linux(or Arch based Linux Distros) so you can start working on your Projects.Most of the Arch Linux are pro linux users so there is really no need of this guide, but this guide is meant for those who are switching from ubuntu/mint/fedora/any other disto which are not based on Arch, to say it in short its meant for new users of Arch Linux. Anyway Let's set up.
First let's set see how to install Platform tools.
Setting up platform-tools in UBUNTU(or Ubuntu based distros/Linux Mint)
In ubuntu platform tools can be setup very easily.
1.Open terminal(Default shortcut is ctrl+alt+T)
2. Type "sudo apt-get install android-tools-adb" (this will install the adb)
3. Type "sudo apt-get install android-tools-fastboot"(this will install the fastboot)
Step 4: Check whether the above tools are working by typing an adb command. For e.g. "adb devices"
Now its time to install SDK in Ubuntu and set it up but before that let me tell you there is already a great thread by matt95.You can see the guide and thank him herehttp://forum.xda-developers.com/showthread.php?t=2302780
Fedora/CentOS/RedHat
First lets install Eclipse[You can also use Android Studio if you want]
Code:
sudo yum install eclipse-jdt
Now lets download the sdk from here. http://developer.android.com/sdk/index.html. Its about 500mb , Just wait and let it downlaod. Once the download is done extract it wherever you want.
For newcomers I recommend to extract it to 'home'.So the file is now extracted inside /home/user/AndroidSDK .
Now lets setup .bash_profile file so that we can access adb anywhere or else you have to type the whole location again use the adb command which is lot of work . So let's shorten it up.
Type "sudo vim .bash_profile"in terminal.
Code:
PATH=$PATH:$HOME/AndroidSDK:$HOME/AndroidSDK/tools
export PATH
# For SDK version r_08 and higher, also add this for adb:
PATH=$PATH:$HOME/AndroidSDK/platform-tools
export PATH
Now lets install android plugin for eclipse.
Open Eclipse and click on Help.Select Install New Software. Then click Add, at the top right of that window. Type in Android Plugin for the name and https://dl-ssl.google.com/android/eclipse/ for the address.
Once this is done, click on the Available Software Sites hyperlink below the Add button, then highlight the Android Plugin source and click on Reload. Now exit this window, and choose Android Plugin from the “Work with” dropdown menu. Choose the developer tools option that you see here and Proceed with the installation.
After the installation configure your Android virtual devices.
ARCH LINUX(or Arch based Distros)
Lets install android sdk
Open terminal and type
Code:
wget https://aur.archlinux.org/packages/an/android-sdk/android-sdk.tar.gz
Note:- If terminal shows wget is not found. Type this in the terminal
Code:
pacman -Suy && pacman -S wget
Once it fetches the tarball, lets extract it by typing
Code:
tar -xvzf android-sdk.tar.gz
wait for it to finish. Change the directory to android-sdk by using the command
Code:
cd android-sdk
.
Now lets make the package by using the command
Code:
makepkg -s
now lets install it by typing
Code:
sudo pacman -U *.pkg.tar.xz
Platform tools for Arch
Let's install platform-tools now.Just like above steps ,well get a package and install it.
1. Type
Code:
wget https://aur.archlinux.org/packages/an/android-sdk-platform-tools/android-sdk-platform-tools.tar.gz
2.Type
Code:
tar -xvzf android-sdk-platform-tools.tar.gz
3.Change directory.
Code:
cd android-sdk-platform-tools
4.
Code:
makepkg -s
5.Install it
Code:
sudo pacman -U *.pkg.tar.xz
All the files are installed in /opt/android-sdk/ . Just like we had .bash_profile in FEDORA, we use symbolic links in Arch linux to use commands from anywhere .
Code:
sudo ln -s /opt/android-sdk/platform-tools/adb /usr/bin/adb //this one's for adb
sudo ln -s /opt/android-sdk/platform-tools/fastboot /usr/bin/fastboot //This one's for Fastboot
sudo ln -s /opt/android-sdk/tools/ddms /usr/bin/ddms //This is for DDMS
sudo ln -s /opt/android-sdk/tools/android /usr/bin/android //This is for Android
Now run android by typing "android" in terminal. :good:
Simple as that. If you are yet to switch to Arch linux then I recommened you to use "BBQLinux " its an Arch linux for Android developers. It comes with most of the things needed for android development. You can download it from Here.
Thanks for reading this. Help me by giving me e-books.:angel:
PM me or post here if you have any doubts. :victory:
Install an aur wrapper like pacaur .
pacaur -S android-sdk android-studio android-udev android-platform-tools
Done
Sent from my Nexus 5
Pirateghost said:
Install an aur wrapper like pacaur .
pacaur -S android-sdk android-studio android-udev android-platform-tools
Done
Sent from my Nexus 5
Click to expand...
Click to collapse
Thanks for the reply, I havent tried pacaur repository though. Will give it a try soon.:good:
sorry, I made an error:
Code:
pacaur -S android-sdk android-sdk-platform-tools android-udev android-studio android-sdk-build-tools
you dont need both platform and build tools, it looks like build-tools is more recent. if you want eclipse instead of android studio, just use 'eclipse-android' instead of android-studio

Virtual Reality chroot for android

You will need google cardboard or some other VR headset.
This project is built on top of Deploy Linux. It uses SDL Xserver as well as a custom x11 compositor for VR graphics
To install do the following:
(Install base)
1: install openSuSE 13.2 with "Linux Deploy"
1.1: Installation type: FIle
1.2: Desktop Environment: LXDE
1.3: X Server​2: /usr/sbin/sshd (start ssh)
3: Run: zypper in pango* (this will fix the issue with text being all boxes [])
At this point you should have a working SuSE install
4: Download the project https://bitbucket.org/ruapotato/vrsuse.git
5: Install python-xpyb-1.3.1-4.fc22.armv7hl.rpm (zypper in /path/to/vrlinux/python-xpyb-1.3.1-4.fc22.armv7hl.rpm)
6: Run: sed -i -e 's/RECTANGLE/xproto.RECTANGLE/g' /usr/lib/python2.7/site-packages/xcb/damage.py
Now we should be able to run the project
In a terminal run:
(With xserver sdl open)
7: source vrlinux/display.sh
8: lxsession &
9: vrlinux/pycompmgr &
OTG works alternatively you can use synergyc -f HOSTCOMPUTER for mouse/keyboard input
http://postimg.org/image/wbftuwg7t/
http://postimg.org/image/66fl8m251/
Done:
OTG mouse/keyboard input!
TODO:
better graphics (smaller with some correction for blur around the edges)
auto startup
head tracking
Add other distro (Ubuntu, Arch, etc)
fix systemd (to run properly in a chroot)
XDA:DevDB Information
VR Linux, Tool/Utility for the Google Nexus 5
Contributors
ruapotato
Source Code: https://bitbucket.org/ruapotato/vrsuse.git
Version Information
Status: Alpha
Created 2016-04-03
Last Updated 2016-04-08
Dose anyone know how to apply effects in x render (python). I suck on the resizing windows part.

Arch Linux - Lightweight Custom Environment Setup

Arch Linux - Lightweight Custom Environment Setup Instructions​
NOTICE: I am not responsible if something happens with your device, proceed at your own risk. It is always recommended to follow Arch's own installation guide, even though these instructions below are from it already just more simplified.​
This article is an alternative to the R method from my minimal Arch Linux instructions which you can find here, so don't do anything from here unless you have Arch Linux already installed either from my instructions or from the wiki! This instructions consists of the following packages for creating the custom environment:
i3: dynamic tiling window manager
LightDM: login page
tint2: bottom bar
rofi: application launcher
xfce4-terminal: lightweight terminal
nitrogen: wallpaper tool
thunar: lightweight file manager
autotiling: better autotiling for the window manager
PulseAudio and pavucontrol: audio manager
This has been tested in VMs and on my main computer.
--
Table of Content:
I. Lightweight Custom Environment Installation
II. Optional Notes
--​
I. Lightweight Custom Environment Installation​
R. Installing the Custom Environment
First let's enable NetworkManager, type this (do this if you came here after following my own Arch Linux installation instructions and you want to continue step R from here, or else connect to your internet in any way you want):
sudo systemctl enable NetworkManager
Reboot by typing "reboot", then after the reboot type "nmtui" and connect to your internet.
Next, update your system by typing:
sudo pacman -Syu
Now let's install these packages: xorg-server, lightdm, i3-gaps and tint2. Type:
Note: you can replace "lightdm-gtk-greeter" with another greeter of your choice, check here: https://wiki.archlinux.org/title/LightDM#Greeter
sudo pacman -S xorg-server lightdm lightdm-gtk-greeter i3-gaps tint2
After the packages are installed, enable lightdm by typing:
sudo systemctl enable lightdm
Now let's setup LightDM, type this in order to edit the config:
sudo nano /etc/lightdm/lightdm.conf
Change the [Seat:*] section, which is this:
...
greeter-session=lightdm-yourgreeter-greeter
...
Instead of "yourgreeter" replace it with the greeter you installed, for example in this case it's "gtk".
Type "reboot" to reboot your system, you should see the login page. Login to i3 (not the one with "(with debug log)", click the arrow and change to "i3") and follow the steps to create config file. After creating the config file, you can continue:
Go to TTY by doing the combination (usually ALT+SHIFT+F2) and run this:
sudo cp /etc/i3/config ~/.config/i3/
Now let's setup tint2 by adding this at the bottom of the i3 config file (run this command to be able to edit the config file: sudo nano $HOME/.config/i3/config):
exec --no-startup-id tint2
Now let's install rofi and xfce4-terminal by running this command:
sudo pacman -S rofi xfce4-terminal
Exit TTY by doing the combination (usually ALT+SHIFT+F1), if you're facing issues just reboot pc.
ALT+Enter (after logging in from the login page) is the combination to open terminal.
Now let's finish setting up rofi, do the combination above to open the terminal and run this command in it:
sudo nano ~/.config/i3/config
Go to the "start dmenu (a program launcher)" section, comment the second line, it should be like this:
# bindsym Mod1+d exec --no-startup-id dmenu_run
the # is commenting the line. And uncomment the third line, which is:
bindsym Mod1+d exec "rofi -modi drun,run -show drun"
the # should be gone
Then save by CTRL+S and close by CTRL+X and reboot your system.
Now we will configure i3 further for tint2, remove the following from the i3 configuration file:
# Start i3bar to display a workspace bar (plus the system information i3 status
# finds out, if available)
bar {
status_command i3status
}
This will be at the bottom of the config file ^ it removes i3bar so only i3 would start.
Then reboot your system by typing "reboot" in the terminal.
After rebooting, when doing the combination ALT+D it opens the application menu.
This step is optional, but it is recommended because it will let you install packages from the AUR (user repisotary). We will also install yay by running these separately:
(Let’s install git in order to install yay afterwards with it)
sudo pacman -S git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Install Nitrogen and Thunar to have a wallpaper tool and a file manager by running this command:
sudo pacman -S nitrogen thunar
Check here for more information about Nitrogen and how to use it: https://wiki.archlinux.org/title/nitrogen#Usage
And add this at the bottom of the i3 config file:
exec nitrogen --restore &
Now let's install the user folders (Documents, Pictures...) by installing this package:
sudo pacman -S xdg-user-dirs
Then run this in terminal:
xdg-user-dirs-update
Now let's install autotiling https://aur.archlinux.org/packages/autotiling by running this command:
yay -S autotiling
Add "exec_always --no-startup-id autotiling" to the ~/.config/i3/config file.
At last, let's install PulseAudio by running this command:
sudo pacman -S pulseaudio pulseaudio-alsa pavucontrol
Now reboot your PC and enjoy! You should have memorized how to do this already, it's straight forward and simple.
II. Optional Notes​
Type this in the command in the terminal to check the themes available for rofi:
rofi-theme-selector
For controlling the volume, install this package:
yay -S pnmixer
And then add this at the bottom of your i3 config file:
exec_always pnmixer
Restart your PC
In order to fill your wallpaper fullscreen with Nitrogen, you can do it with this command:
nitrogen --set-zoom-fill /path/to/image.png
That's it! Let me know how it goes with you
I use some of these packages now, like Thunar over Dolphin, myself, in most cases, but still end up going back to Dolphin in certain situations. For one, it handles loading thumbnails better and faster, so browsing images is easier.
Everybody loves xfce4-terminal. Even Arch users!
SerjSX said:
Arch Linux - Lightweight Custom Environment Setup Instructions​
NOTICE: I am not responsible if something happens with your device, proceed at your own risk. It is always recommended to follow Arch's own installation guide, even though these instructions below are from it already just more simplified.​
This article is an alternative to the R method from my minimal Arch Linux instructions which you can find here, so don't do anything from here unless you have Arch Linux already installed either from my instructions or from the wiki! This instructions consists of the following packages for creating the custom environment:
i3: dynamic tiling window manager
LightDM: login page
tint2: bottom bar
rofi: application launcher
xfce4-terminal: lightweight terminal
nitrogen: wallpaper tool
thunar: lightweight file manager
autotiling: better autotiling for the window manager
PulseAudio and pavucontrol: audio manager
This has been tested in VMs and on my main computer.
--
Table of Content:
I. Lightweight Custom Environment Installation
II. Optional Notes
--​
I. Lightweight Custom Environment Installation​
R. Installing the Custom Environment
First let's enable NetworkManager, type this (do this if you came here after following my own Arch Linux installation instructions and you want to continue step R from here, or else connect to your internet in any way you want):
sudo systemctl enable NetworkManager
Reboot by typing "reboot", then after the reboot type "nmtui" and connect to your internet.
Next, update your system by typing:
sudo pacman -Syu
Now let's install these packages: xorg-server, lightdm, i3-gaps and tint2. Type:
Note: you can replace "lightdm-gtk-greeter" with another greeter of your choice, check here: https://wiki.archlinux.org/title/LightDM#Greeter
sudo pacman -S xorg-server lightdm lightdm-gtk-greeter i3-gaps tint2
After the packages are installed, enable lightdm by typing:
sudo systemctl enable lightdm
Now let's setup LightDM, type this in order to edit the config:
sudo nano /etc/lightdm/lightdm.conf
Change the [Seat:*] section, which is this:
...
greeter-session=lightdm-yourgreeter-greeter
...
Instead of "yourgreeter" replace it with the greeter you installed, for example in this case it's "gtk".
Type "reboot" to reboot your system, you should see the login page. Login to i3 (not the one with "(with debug log)", click the arrow and change to "i3") and follow the steps to create config file. After creating the config file, you can continue:
Go to TTY by doing the combination (usually ALT+SHIFT+F2) and run this:
sudo cp /etc/i3/config ~/.config/i3/
Now let's setup tint2 by adding this at the bottom of the i3 config file (run this command to be able to edit the config file: sudo nano $HOME/.config/i3/config):
exec --no-startup-id tint2
Now let's install rofi and xfce4-terminal by running this command:
sudo pacman -S rofi xfce4-terminal
Exit TTY by doing the combination (usually ALT+SHIFT+F1), if you're facing issues just reboot pc.
ALT+Enter (after logging in from the login page) is the combination to open terminal.
Now let's finish setting up rofi, do the combination above to open the terminal and run this command in it:
sudo nano ~/.config/i3/config
Go to the "start dmenu (a program launcher)" section, comment the second line, it should be like this:
# bindsym Mod1+d exec --no-startup-id dmenu_run
the # is commenting the line. And uncomment the third line, which is:
bindsym Mod1+d exec "rofi -modi drun,run -show drun"
the # should be gone
Then save by CTRL+S and close by CTRL+X and reboot your system.
Now we will configure i3 further for tint2, remove the following from the i3 configuration file:
# Start i3bar to display a workspace bar (plus the system information i3 status
# finds out, if available)
bar {
status_command i3status
}
This will be at the bottom of the config file ^ it removes i3bar so only i3 would start.
Then reboot your system by typing "reboot" in the terminal.
After rebooting, when doing the combination ALT+D it opens the application menu.
This step is optional, but it is recommended because it will let you install packages from the AUR (user repisotary). We will also install yay by running these separately:
(Let’s install git in order to install yay afterwards with it)
sudo pacman -S git
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Install Nitrogen and Thunar to have a wallpaper tool and a file manager by running this command:
sudo pacman -S nitrogen thunar
Check here for more information about Nitrogen and how to use it: https://wiki.archlinux.org/title/nitrogen#Usage
And add this at the bottom of the i3 config file:
exec nitrogen --restore &
Now let's install the user folders (Documents, Pictures...) by installing this package:
sudo pacman -S xdg-user-dirs
Then run this in terminal:
xdg-user-dirs-update
Now let's install autotiling https://aur.archlinux.org/packages/autotiling by running this command:
yay -S autotiling
Add "exec_always --no-startup-id autotiling" to the ~/.config/i3/config file.
At last, let's install PulseAudio by running this command:
sudo pacman -S pulseaudio pulseaudio-alsa pavucontrol
Now reboot your PC and enjoy! You should have memorized how to do this already, it's straight forward and simple.
II. Optional Notes​
Type this in the command in the terminal to check the themes available for rofi:
rofi-theme-selector
For controlling the volume, install this package:
yay -S pnmixer
And then add this at the bottom of your i3 config file:
exec_always pnmixer
Restart your PC
In order to fill your wallpaper fullscreen with Nitrogen, you can do it with this command:
nitrogen --set-zoom-fill /path/to/image.png
That's it! Let me know how it goes with you
Click to expand...
Click to collapse
Hi, what are the keyboard shortcuts for the i3 tiling window manager?
$cronos_ said:
Hi, what are the keyboard shortcuts for the i3 tiling window manager?
Click to expand...
Click to collapse
Hello! Check these out:
i3 - ArchWiki
wiki.archlinux.org
i3 - Reference Card
i3 is a dynamic tiling window manager with clean, readable and documented code, featuring extended Xinerama support, usage of libxcb instead of xlib and several improvements over wmii
i3wm.org

Categories

Resources