[Q] Linux (Ubuntu) & Honeycomb 3.2 usb - Acer Iconia A500

Lots of instructions both here and on the Ubuntu forums.
Nothing seems to work for me. I want to connect my Acer A500 to
a pc running linux. Things work fine on Windows XP with the Acer Driver.
added mtp support to ubuntu and a host gmtp I haven't tried usb rule setup
Should the Tablet be in USB debug mode or not?
Any help appreciated. Things seem to have change since May when most of the posts appeared.
Bob

I tested this way with 3.2 a couple of hours ago. Works fine.
1. Install mtpfs
Code:
sudo apt-get install mtpfs
2. In the tablet, go to Settings->Applications->Development and turn USB Debugging on (check the box).
3. Plug your USB cable into the tablet and your Ubuntu machine.
4. Press Ctrl+Alt+t to open console
5. execute lsusb
Code:
lsusb
6. In the result find the line
Code:
Bus 001 Device 005: ID 0502:3325 Acer, Inc.
It tells you that your vendor id is 0502
7. Disconnect the USB cable
8. Edit the file /etc/udev/rules.d/51-android.rules
Code:
sudo nano /etc/udev/rules.d/51-android.rules
you need to add this line (Note, the vendor id is one that has been got on step 6):
SUBSYSTEM=="usb", ATTR{idVendor}=="0502", MODE="0666"
Click to expand...
Click to collapse
9. Create a mount point as root and set your user as its owner
Code:
sudo mkdir /media/a500
sudo chown [B]username:groupname[/B] /media/a500
username:groupname is your username and his primary group name
for me it was deo:users
10. Change your fstab:
Code:
sudo nano /etc/fstab
to the very end add
# mount point for Acer A500
mtpfs /media/a500 fuse user,noauto,allow_other 0 0
Click to expand...
Click to collapse
11. change fuse.conf:
Code:
sudo nano /etc/fuse.conf
here you need to uncomment the line
#user_allow_other
Click to expand...
Click to collapse
should become
user_allow_other
Click to expand...
Click to collapse
12. Add yourself to the fuse group
Code:
sudo usermod -a -G fuse [B]username[/B]
username is your username
13. Reboot.
Mountpoint appears in Nautilus (and on Desktop as well)
don't forget to unmount the device before unplugging the cable

Related

[Q] Using a DROID X and MAC together is tough -- can someone help?

Too many threads... too many sites and PC options.
Here's my situation:
Droid X
Used the leak update... running 2.2 now.
Use a MAC. And have Terminal app on DX.
Have SBF file for 2.1 stock, have ZIP files of rooted 2.2's
Dont have custom recovery.
Dont care much about warranty or OTA... just want to be able to apply ZIPs.
I need to somehow either root my DX with Mac or Terminal app. Or flash the SBF to bring things back to 2.1.
Not sure what to do??? Please please help.
I am not familiar with terminal commands...so if you leave instructions that would be great.
-Roman
You follow the same ADB commands, more or less. Why not try something like Universal AndRoot though? Then you could just skip over it.
But, if you need to sbf, I would *think* you follow the Linux instructions.
1) download sbf_flash & sbf file
Code:
cd directory/where/these/are/located
./sbf_flash SBFfileLOCATION
The only way to SBF is to run windows through bootcamp or this http://www.droidforums.net/forum/droid-hacks/38671-flashing-sbf-mac.html . I am in the same boat as you luckily my girlfriend has a dell running Windows. You should also be able to root 2.2 using the Droid 2 method posted in this section http://forum.xda-developers.com/showthread.php?t=766767. I assume you have the SDK downloaded already? The Linux directions does not work for Mac.
x.v_ said:
You follow the same ADB commands, more or less. Why not try something like Universal AndRoot though? Then you could just skip over it.
I TRIED THAT, BUT THERE IS SOME ERROR THAT POPS UP... CAN'T DO IT. 2.2 ISN'T SUPPORTED... I THINK IT'S JUST FOR 2.1..
But, if you need to sbf, I would *think* you follow the Linux instructions.
1) download sbf_flash & sbf file
Code:
cd directory/where/these/are/located
./sbf_flash SBFfileLOCATION
Click to expand...
Click to collapse
SO THAT EASY? JUST TWO COMMAND LINES?
So, if I put the SBF on my desktop it would be:
cd desktop (enter)
./sbf_flash fullSBFfilename.sbf (enter)
???????
romanvail said:
SO THAT EASY? JUST TWO COMMAND LINES?
So, if I put the SBF on my desktop it would be:
cd desktop (enter)
./sbf_flash fullSBFfilename.sbf (enter)
???????
Click to expand...
Click to collapse
Running ADB with Mac OSX and therefore rooting with the mac is EASY. Just make sure you have the Android SDK installed on your Mac. Make sure in your .bash_profile you have the path set to the tools directory of your SDK folder.
Since I can't tell if you have all this down, I'll give you the instructions on setting up adb on the mac (using terminal), then give you the directions I followed on rooting my Droid X from OSX (I am running 2.2 leaked).
Essentially follow these instructions (taken from tjrocks91 on droidforum... I'd link, but I am not yet allowed to post outside links on this forum):
1. Download the Android SDK for Mac OSX. (google it)
2. Extract the zip file to any destination on your Mac. *Remember its path!*
In the AndroidSDK folder, there will be a folder named “tools”. We will be adding this folder to the path on Mac OSX. For this example, extract to your home folder (the folder that contains the desktop, documents, etc. folders)
3. To do this click on Finder > Go > Utilities > Terminal.
4. Type in without quotations “cd ~/”
5. Next, type "touch .bash_profile" to create your new bash or otherwise known path file.
6. Next, type "open -e .bash_profile" to open it in TextEdit. A TextEdit window will open, copy and past this into that window, substituting <username> for your username on OSX:
export PATH=${PATH}:/Users/<username>/AndroidSDK/tools
7. Save the file and close the window.
8. Repeat steps 5 through 7, but replace .bash_profile with ".bashrc" (without the quotes)
9. ADB should be ready to go. Make sure that your Droid X is set to "charge only" when connected via USB, and that you have debug mode set to on in your Android settings (settings>applications>development> USB Debugging)
10. In terminal, type (without the quotes): "adb devices". You should see a return that gives a list of devices attached. If the daemon wasn't started yet, this will do it. After that, type "adb shell" to enter adb.
11. After that, the adb commands are ALL the same on any platform, just make adjustments for different file systems when moving things TO your phone when using the command prompt (and not in the adb shell itself, but using adb commands). OSX follows unix/linux file structure, but not always the linux/unix file arrangement (but pretty darn close, since it is a Unix BSD GUI).
Now onto rooting your DX running 2.2. I've attached the file I used. It is a .rar files, so you will need a .rar extractor. I found a nice free one on the net called UnrarX. Google it, get it. Its free, it works. I will give instructions assuming you have them. These instructions come from karnovaran here on XDA. THey are for the droid 2, but work for the Droid X as well. i will translate them into instructions that can be followed verbatim on Mac (as the instructions he gave are meant for those doing this through the command prompt in windows).
1. Extract the contents of the attached file to your sdk tools folder
2. Open a terminal window and navigate to your sdk tools folder. if you put the sdk folder in your home folder, then the command and path you should enter from the terminal should be something like this:
cd AndroidSDK/tools
3. Now the process is as follows (follow EXACTLY, making sure you are faithful to YOUR file paths). I'm copying almost verbatim from karnovaran:
- adb devices (to verify the connection)
- adb push Superuser.apk /sdcard/Superuser.apk
- adb push su /sdcard/su
- adb push busybox /sdcard/busybox
- adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin
- adb shell
- cd data/local/tmp
- chmod 0755 rageagainstthecage-arm5.bin
- ./rageagainstthecage-arm5.bin
- let the process run until it 'kicks' you out (this WILL take a while, so don't TOUCH ANYTHING on your phone. Just go grab a beer and relax until the proces kicks you back out to the tools folder in terminal)
- adb kill-server
- cd <wherever-your-sdk-tools-folder-is>
- adb devices (to verify the connection)
- adb shell (you should now have a # prompt, if not return to ./rage step above)
- mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
- cp /sdcard/Superuser.apk /system/app/Superuser.apk
- cp /sdcard/su /system/bin/su
- cp /sdcard/busybox /system/bin/busybox
- chmod 4755 /system/bin/su
- chmod 4755 /system/bin/busybox
- mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
- exit
- exit
This got me root on my DX and I did this on OSX no problem. The only PC I have that is functional is my laptop for work and because of the content on it and security procedures, though I could do android hacking with it, I will not, so I'm stuck with using my Mac. Thing is that it really is NOT hard. Commands are almost exactly as in Linux/Unix, and OSX terminal runs bash, which is quite versatile (more commands than busybox, iirc) in and of itself. And getting mac root access is bloody easy using sudo if you need it (otherwise, don't use it).
I hope this helps. Have fun.
many steps.... but will go slowly.
Thank you!!!!
Many steps, but they work!
SirBrass said:
Running ADB with Mac OSX and therefore rooting with the mac is EASY. Just make sure you have the Android SDK installed on your Mac. Make sure in your .bash_profile you have the path set to the tools directory of your SDK folder.
Since I can't tell if you have all this down, I'll give you the instructions on setting up adb on the mac (using terminal), then give you the directions I followed on rooting my Droid X from OSX (I am running 2.2 leaked).
Essentially follow these instructions (taken from tjrocks91 on droidforum... I'd link, but I am not yet allowed to post outside links on this forum):
1. Download the Android SDK for Mac OSX. (google it)
2. Extract the zip file to any destination on your Mac. *Remember its path!*
In the AndroidSDK folder, there will be a folder named “tools”. We will be adding this folder to the path on Mac OSX. For this example, extract to your home folder (the folder that contains the desktop, documents, etc. folders)
3. To do this click on Finder > Go > Utilities > Terminal.
4. Type in without quotations “cd ~/”
5. Next, type "touch .bash_profile" to create your new bash or otherwise known path file.
6. Next, type "open -e .bash_profile" to open it in TextEdit. A TextEdit window will open, copy and past this into that window, substituting <username> for your username on OSX:
export PATH=${PATH}:/Users/<username>/AndroidSDK/tools
7. Save the file and close the window.
8. Repeat steps 5 through 7, but replace .bash_profile with ".bashrc" (without the quotes)
9. ADB should be ready to go. Make sure that your Droid X is set to "charge only" when connected via USB, and that you have debug mode set to on in your Android settings (settings>applications>development> USB Debugging)
10. In terminal, type (without the quotes): "adb devices". You should see a return that gives a list of devices attached. If the daemon wasn't started yet, this will do it. After that, type "adb shell" to enter adb.
Last login: Tue Sep 14 09:12:34 on console
Roman-Vails-Computer:~ romanvail$ cd ~/
Roman-Vails-Computer:~ romanvail$ touch .bash_profile
Roman-Vails-Computer:~ romanvail$ open -e .bash_profile
Roman-Vails-Computer:~ romanvail$ touch .bashrc
Roman-Vails-Computer:~ romanvail$ open -e .bashrc
Roman-Vails-Computer:~ romanvail$ adb devices
-bash: adb: command not found
Roman-Vails-Computer:~ romanvail$
*****DOESNT WORK FOR ME*****
Click to expand...
Click to collapse
Do you have the path to adb set properly?
Sent from my DROIDX using XDA App
SirBrass said:
Do you have the path to adb set properly?
Sent from my DROIDX using XDA App
Click to expand...
Click to collapse
Yeah this would be your problem.
@OP,
yes, it would be just that easy IF AND ONLY IF the linux commands apply to macs as well. Which I have NO IDEA on. so proceed at your own risk :z
i finally figured it out... saw another post....
here's what worked:
./
Here's my log in case anyone else needs is:
Roman-Vails-Computer:~ romanvail$ adb
-bash: adb: command not found
Roman-Vails-Computer:~ romanvail$ cd/Users/romanvail/android-sdk-mac_x86/tools -bash: cd/Users/romanvail/android-sdk-mac_x86/tools: No such file or directory
Roman-Vails-Computer:~ romanvail$ cd /Users/romanvail/android-sdk-mac_x86/tools Roman-Vails-Computer:tools romanvail$ ./adb
Android Debug Bridge version 1.0.26
-d - directs command to the only connected USB device
returns an error if more than one USB device is present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is running.
-s <serial number> - directs command to the USB device or emulator with
the given serial number. Overrides ANDROID_SERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number is specified.
Using this ocmmand with no additional arguments
will disconnect from all connected TCP/IP devices.
device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-l] [-r] [-s] <file> - push this package file to the device and install it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)
('-s' means install on SD card instead of internal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories)
adb bugreport - return all information from the device
that should be included in a bug report.
adb help - show this help message
adb version - show version num
DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition
scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specified device
adb remount - remounts the /system partition on the device read-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the bootloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on the specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, both /system and /data partitions will be updated.
- If it is "system" or "data", only the corresponding partition
is updated.
environmental variables:
ADB_TRACE - Print debug information. A comma separated list of the following values
1 or all, adb, sockets, packets, rwx, usb, sync, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes priority over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these debug tags are printed.
Roman-Vails-Computer:tools romanvail$ adb devices
-bash: adb: command not found
Roman-Vails-Computer:tools romanvail$ ./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
015D61C60A003017 device
Roman-Vails-Computer:tools romanvail$ ./adb push Superuser.apk /sdcard/Superuser.apk
1059 KB/s (27688 bytes in 0.025s)
Roman-Vails-Computer:tools romanvail$ ./adb push su /sdcard/su
1802 KB/s (26248 bytes in 0.014s)
Roman-Vails-Computer:tools romanvail$ ./adb push busybox /sdcard/busybox
1918 KB/s (1926944 bytes in 0.980s)
Roman-Vails-Computer:tools romanvail$ ./adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin
726 KB/s (5392 bytes in 0.007s)
Roman-Vails-Computer:tools romanvail$ ./adb shell
$ cd data/local/tmp
$ chmod 0755 rageagainstthecage-arm5.bin
$ ./rageagainstthecage-arm5.bin
[*] CVE-2010-EASY Android local root exploit (C) 2010 by 743C
[*] checking NPROC limit ...
[+] RLIMIT_NPROC={3815, 3815}
[*] Searching for adb ...
[+] Found adb as PID 2846
[*] Spawning children. Dont type anything and wait for reset!
[*]
[*] If you like what we are doing you can send us PayPal money to
[*] [email protected] so we can compensate time, effort and HW costs.
[*] If you are a company and feel like you profit from our work,
[*] we also accept donations > 1000 USD!
[*]
[*] adb connection will be reset. restart adb server on desktop and re-login.
$ Roman-Vails-Computer:tools romanvail$ ./adb kill-server
Roman-Vails-Computer:tools romanvail$ ./adb kill-server
* server not running *
Roman-Vails-Computer:tools romanvail$ cd /Users/romanvail/android-sdk-mac_x86/tools
Roman-Vails-Computer:tools romanvail$ ./adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
XXXXXXXXXXXXXXXX device
Roman-Vails-Computer:tools romanvail$ ./adb shell
# mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
# cp /sdcard/Superuser.apk /system/app/Superuser.apk
# cp /sdcard/su /system/bin/su
# cp /sdcard/busybox /system/bin/busybox
# chmod 4755 /system/bin/su
# chmod 4755 /system/bin/busybox
# mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
# exit
Roman-Vails-Computer:tools romanvail$ exit
logout
[Process completed]
Now that's odd. I only get problems when I try and use ./ just regular "adb" works on my machine.
SirBrass said:
Now that's odd. I only get problems when I try and use ./ just regular "adb" works on my machine.
Click to expand...
Click to collapse
Yea pretty weird... I use OSX 10.5.8
Intel machine... so, it's weird, but IT DID WORK.
romanvail said:
Yea pretty weird... I use OSX 10.5.8
Intel machine... so, it's weird, but IT DID WORK.
Click to expand...
Click to collapse
There's your problem.... you're using leopard . I'm using 10.6.3. Love it. They did well with this new OS version (for those who don't know... the difference to users between Leopard and Snow Leopard for OSX folks is like the diff between Eclair and FroYo... the former is good, but the later far exceeds it under the hood though still remaining almost the same on the front end).
And obviously that means I'm running an intel machine as well. 2008 iMac 20".... 2.66 Ghz Core 2 Duo. Just your regular, nothing-special iMac.
I thought Macs were supposed to be user friendly?
*snicker*
Sent from my DROIDX using XDA App
Will this method work for a Droid X on Android 2.3.4 Gingerbread and with build # 4.5.1_57_DX8-51 Also is there a new one click type solution by now on a Mac?

[Guide] USB Connect in Fedora 15

Hi everyone, yesterday i finally found a way to connect my PC with Fedora 15 and the Acer Iconia A500. Now I am able to transfer file directly from my PC to Acer, and vice versa.
With Android Honeycom to connect tablet with PC i need MPT (media transfer protocol) support, I surfed on internet and I found this two post:
[Guide] Mount Internal Storage in Ubuntu: wrote for Motorola Xoom;
zen vision m 60gb (mtpfs, libmtp, amarok, gnomad2): wrote for zen vision m 60gb
and I decided to write a guide to connect Acer Iconia to Fedora 15
First of all, we need to install all the dependencies with:
Code:
sudo yum install gcc-c++ gcc
sudo yum install libmtp libmtp-devel libnjb libnjb-devel
sudo yum install libid3tag libid3tag-devel glib2 glib2-devel fuse fuse-libs fuse-devel libmad libmad-devel
Now download mtpfs_0.9.orig.tar.gz from www.adebenham.com/mtpfs/, on internet there's Fedora package but it did't work for me.
Now we have to unpack it with:
Code:
tar -xzf mtpfs_0.9.orig.tar.gz
move into directory:
Code:
cd mtpfs-0.9.orig
lauch this commands:
Code:
./configure
make
sudo make install
Now we have to create a directory where we will mount acer's internal disk:
Code:
sudo mkdir /mnt/acerIconia
sudo chown user:user /mnt/acerIconia
replace user:user with your user. Create a file called acerIconiaMount in /usr/bin and put the line:
Code:
mtpfs -o allow_other /mnt/acerIconia
now we have to give it execute permission:
Code:
sudo chmod a+x acerIconiaMount
Now we have to reboot. When Fedora boot open terminal and launch:
Code:
/usr/bin/acerIconiaMount
and we can access to Acer's internal disk from /mnt/acerIconia. To unmount the Acer's internal disk we have to launch:
Code:
fusermount -u /mnt/acerIconia
Quite simple, isn't it? ;-)
Bye Alberto

Connecting MTP and your Ubuntu pc

Since MTP is replacing UMS in newer version of android I thought I'd share what I did to get it working on my ubuntu partition since it took me a little bit to figure out why it wasn't connecting.
[1]First check your 51-android.rules
Code:
gksudo gedit /etc/udev/rules.d/51-android.rules
[2]And make sure this is in there
Code:
#Sony Ericsson
SUBSYSTEM=="usb", ATTR{idVendor}=="0fce", MODE="0666"
[3]Then install these tools:
Code:
sudo apt-get install mtp-tools mtpfs
[4]Then create a point to mount it
Code:
sudo mkdir /media/Sony
sudo chmod a+rwx /media/Sony
if you change /Sony or another part of the directory just be sure you keep it the same throughout the steps, uppercase and lowercase don't matter unless you screw it up and don't keep the name the same.
[5]Now you yourself to the fuse user group
Code:
sudo adduser YOURUSERNAME fuse
[6]And open up fuse.conf
Code:
gksu gedit /etc/fuse.conf
and remove
[7]The # in front of #user_allow_other so it looks like this:
Code:
user_allow_other
Here's the part that I was annoyed with, cause the original page has it written incorrectly, and for the longest time I couldn't figure that out
[8]Open up your .bashrc
Code:
gksudo gedit ~/.bashrc
And add these exact lines to it:
Code:
alias android-connect="mtpfs -o allow_other /media/Sony"
alias android-disconnect="fusermount -u /media/Sony"
if you've changed your mount point make sure that "/media/Sony" is what you changed it to
DONE!
Now when you plug in your xplay simply type
Code:
android-connect
and it will show the sdcard contents at /media/Sony.
When you done simply type
Code:
android-disconnect[code] to un-mount it.
Original page and tutorial from [URL="http://www.omgubuntu.co.uk/2011/12/how-to-connect-your-android-ice-cream-sandwich-phone-to-ubuntu-for-file-access/"]http://www.omgubuntu.co.uk/[/URL]
and the page that fixed the typo [URL="http://ubuntuforums.org/showthread.php?t=1903440&page=2"]http://ubuntuforums.org/[/URL]
So thank them, I'm just coping their info.

Debian/Ubuntu now on Ouya

1080p H264 hardware accelerated playback goodness. And the CPUFreq ondemand governor doesn’t even raise the CPU frequency from the minimum as everything is properly accelerated.
Tuomas Kulve has ported all the main subsystems to the OUYA hardware, meaning that there is now a build, although it is still risky to tinker with it.
At this point. The kernel is booted from RAM and OS is running from SD or USB. So no flashing is involved at the moment, making it a great deal safer due to the missing hardware to boot into recovery.
From:
http://tuomas.kulve.fi/blog/2013/09/12/debian-on-ouya-all-systems-go/
Binaries:
http://tuomas.kulve.fi/tmp/ouya-debian/
instructions from Github:
INSTALLING DEBIAN WHEEZY TO OUYA
This is tested on Debian Wheezy and mostly adapted from http://linux-sunxi.org/Debian
OUYA IS EASILY BRICKABLE. READ NO FURTHER
That said, the goal is not to flash anything on Ouya. Kernel is booted from memory and Debian from USB stick or SD card.
Known issues
Not properly tested, so there is a bunch unknown issues.
Low-power core doesn't work (kernel crash)
CPUfreq with ondemand governer works though.
Gstreamer usually assumes xvimagesink as the video sink, but nvxvimagesink must be used.
Totem obeys gconf: gconftool-2 -s /system/gstreamer/0.10/default/videosink nvxvimagesink --type=string
Wifi firmware binaries not included, they need to be copied from the Android rootfs.
Setting up the rootfs
Prepare a USB stick
Partition an USB stick (I used SD card in a small USB reader) and give e.g. 512M for swap, the rest for EXT4. I recommend using at least 4GB stick.
Use mkswap and mkfs.ext4 to initialise the partitions. If your system is properly set you shouldn't need even sudo for that while you would need sudo to format your actual root partition.
Mount the USB stick:
Change the sdX2 below to match your setup.
export TARGET=/mnt/rootfs
sudo mkdir -p $TARGET
sudo mount /dev/sdX2 $TARGET
Extract base system packages to the USB stick:
sudo debootstrap --verbose --arch armhf --foreign wheezy $TARGET http://ftp.debian.org/debian
Prepare for chroot:
sudo apt-get install qemu-user-static binfmt-support
sudo cp /usr/bin/qemu-arm-static $TARGET/usr/bin
sudo mkdir $TARGET/dev/pts
sudo modprobe binfmt_misc
sudo mount -t devpts devpts $TARGET/dev/pts
sudo mount -t proc proc $TARGET/proc
Finish the base system installation:
sudo chroot $TARGET
You should see I have no [email protected]:/#
/debootstrap/debootstrap --second-stage
At the end, you should see I: Base system installed successfully.
Configuring rootfs while still in chroot
Setup sources.list:
cat <<END > /etc/apt/sources.list
deb http://ftp.debian.org/debian/ wheezy main contrib non-free
deb-src http://ftp.debian.org/debian/ wheezy main contrib non-free
END
apt-get update
Configure language:
export LANG=C
apt-get install apt-utils dialog locales
dpkg-reconfigure locales
Choose en_US.UTF-8 for both prompts, or whatever you want.
export LANG=en_US.UTF-8
Install some important stuff:
apt-get install dhcp3-client udev netbase ifupdown iproute openssh-server iputils-ping wget \
net-tools ntpdate ntp vim nano less tzdata console-tools module-init-tools mc
Configure ethernet with dhcp and set hostname:
cat <<END > /etc/network/interfaces
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp
END
echo ouya > /etc/hostname
Create filesystem mounts:
cat <<END > /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/root / ext4 noatime,errors=remount-ro 0 1
tmpfs /tmp tmpfs defaults 0 0
/dev/sda1 none swap sw 0 0
END
Activate remote console and disable some local consoles:
echo 'T0:2345:respawn:/sbin/getty -L ttyS0 115200 linux' >> /etc/inittab
sed -i 's/^\([3-6]:.* tty[3-6]\)/#\1/' /etc/inittab
Set root passwd:
passwd
Add normal user:
adduser ouya
adduser ouya video
adduser ouya audio
adduser ouya plugdev
Install XFCE and Slim login manager:
apt-get install xfce4 xfce4-goodies totem midori slim
Add "vt1" to xserver_arguments in /etc/slim.conf
Install Tegra 3 proprietary binaries, configs, headers and pkgconfig files:
dpkg -i tegra30-r16_3-*_armhf.deb
Finish up with the chroot:
Log out from the chroot, kill any process started in the chroot (lsof $TARGET) and sudo umount $TARGET.
Extract kernel modules:
tar zxf modules-3.1.10-tk*.tar.gz -C $TARGET/lib/modules/
Install adb and fastboot to the host Debian:
sudo dpkg -i android-tools*deb
Booting Ouya
Reboot Ouya to fastboot:
adb reboot-bootloader
Boot Ouya with the kernel:
WARNING: NEVER EVER FLASH THE KERNEL, JUST BOOT FROM RAM
fastboot boot zImage-3.1.10-tk*
Wifi
The BCM firmware binaries may not be redistributable so they need to be copied from the Android rootfs after booting to Debian:
mount -o ro /dev/mmcblk0p3 /mnt/
mkdir /lib/firmware/bcm4330/
cp /mnt/etc/firmware/nvram_4330.txt /lib/firmware/
cp /mnt/vendor/firmware/bcm4330/fw_bcmdhd.bin /lib/firmware/bcm4330/
# Not sure where BT firmware should be in
cp /mnt/etc/firmware/bcm4330.hcd /lib/firmware/
cp /mnt/etc/firmware/bcm4330.hcd /lib/firmware/bcm4330/
umount /mnt
Click to expand...
Click to collapse
https://github.com/kulve/tegra-debian
I've tried that and got into login screen.
Unfortunately due to Debian being boot from USB, and my USB hub not working properly with ouya I have no way of logging into the system (bt is not useful, as at that stage nothing is paired with os).
Sent from my iPad using Tapatalk - now Free
dexter84 said:
I've tried that and got into login screen.
Unfortunately due to Debian being boot from USB, and my USB hub not working properly with ouya I have no way of logging into the system (bt is not useful, as at that stage nothing is paired with os).
Sent from my iPad using Tapatalk - now Free
Click to expand...
Click to collapse
I haven't had a change to play with this yet so I could be completely wrong, but if you plug in an ethernet cable there is a good chance that you will be able to SSH in. From there you might be able to work something out depending on how strong your command line skills are.
I'm somewhat familiar with command line in Linux. The problem is that it wasn't answering to ssh connection attempts, my router didn't even record dhcp request from ouya so I assume it didn't get any IP address. I must try with different USB hub.
Sent from my iPad using Tapatalk - now Free
Is this still valid or is there a better option to install a Linux on Ouya? I am actually only interested in python so if there's a way to run python in Ouya's Android 4.1 it works for me also.

[HOWTO] Add /etc/init.d support and enable OTG on boot [ROOT REQUIRED]

[UPDATE #1] I've added a zip file with the 2 scripts, with UNIX line endings , as suggested below by @aftvNews . Cheers.
[UPDATE #2] I've added a zip file with the 2 extra scripts to go into /etc/init.d, as requested by @Axecaster . These will need the same ownership and permissions as enableotg. They disable SELinux and set the permissions on the recovery directories. Cheers.
Having had a look around the android image on my Fire TV Stick (v1) [ FireOS 5.2.1.1 @rbox ] I found that a script, which doesn't exist, called /system/bin/factoryadb.sh was being run by /init.build.rc on boot.
I was able to create a simple script to run scripts in /etc/init.d on boot.
UPDATE (05/04/19): Now I've got root access on my FireTV Gen 2 [ FireOS 5.2.6.9 ] I can see the see these instructions will also work, although the OTG enabling is not needed
NOTE: I've only tested this on a 1st generation Fire TV Stick but may work on Fire TV boxes if they also call /system/bin/factoryadb.sh from /init.build.rc
Before you do this please make sure factoryadb.sh is NOT on your FireTV and that it is called from /init.build.rc by connecting to your FireTV via adb and running the following commands
Code:
adb shell
su
grep factoryadb /init.build.rc && ls -l /system/bin/factoryadb.sh
Hopefully this will return
Code:
service factoryadb /system/bin/factoryadb.sh
/system/bin/factoryadb.sh: No such file or directory
Now continue ...
My factoryadb.sh script
Code:
#!/system/bin/sh
#
# Execute all scripts in /etc/init.d
if [ -d /etc/init.d ]
then
for f in `ls /etc/init.d/* 2>/dev/null`
do
if [ -s ${f} ]
then
echo Executing ${f} ... >/dev/kmsg
/system/bin/sh ${f}
fi
done
fi
NOTE: Make sure this file has UNIX line endings only. Notepad++ has an option to specify UNIX line endings.
I also have a simple script to enable OTG which I called enableotg, again MUST have UNIX line endings.
Code:
#!/system/bin/sh
echo 1 > /sys/devices/platform/bcmpmu_otg_xceiv/host
Connect to the Fire TV Stick via adb and run the following commands
Code:
adb push factoryadb.sh /sdcard/
adb push enableotg /sdcard/
adb shell
su
mount -o remount,rw /system
mkdir /etc/init.d
cp /sdcard/factoryadb.sh /system/bin/
cp /sdcard/enableotg /etc/init.d/
chown 0:0 /system/bin/factoryadb.sh /etc/init.d /etc/init.d/enableotg
chmod 755 /system/bin/factoryadb.sh /etc/init.d /etc/init.d/enableotg
mount -o remount,ro /system
reboot
When the FireTV Stick has rebooted then reconnect via adb and run the following commands
Code:
adb shell
su
dmesg | grep -e factoryadb -e Executing -e bcmpmu
You should see something similar to
Code:
<6>[ 3.005279] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Probing started...
<6>[ 3.007690] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Probing successful
<3>[ 4.998016] init: Warning! Service factoryadb needs a SELinux domain defined; please fix!
<4>[ 5.573242] Executing /etc/init.d/enableotg ...
<6>[ 5.579040] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Switching to Host
All is working and OTG should be working about 5 seconds after leaving the TWRP screen and long before Android has finished booting.
If you have an ethernet dongle attached it should have an IP address before the launcher starts
NOTE: The SELinux warning can be safely ignored.
Hope this helps.
Nicely done. Clever using the missing factoryadb.sh to roll your own init.d.
Might be easier for some if you just upload/attach your factoryadb.sh and enableotg files that others can download, so there's no need to worry about proper UNIX line endings.
Worked nicely on one of my gen 1 sticks running 5.2.4.1_r2.
OTG works for USB pendrive?
AFTVnews.com said:
Nicely done. Clever using the missing factoryadb.sh to roll your own init.d.
Might be easier for some if you just upload/attach your factoryadb.sh and enableotg files that others can download, so there's no need to worry about proper UNIX line endings.
Click to expand...
Click to collapse
Doh! Completely missed the section to "Attach Files" when I was writing the post
I've now added a zip file with the 2 scripts with UNIX line endings to the post.
Cheers
Awesome job figuring out this was possible! I can confirm the init.d part works just fine on the FireTV-v1 on Rbox v5.2.4.1_r2 (didn't test OTG scripts as I already have a full USB port).
I am going to be adding in your init.d support to my Playing with Fire MOD for the next release.
Now just got to get PS3 / Xbox One controller kernel plugins compiled and working for the Gen1 devices now that init.d works. :good:
dony71 said:
OTG works for USB pendrive?
Click to expand...
Click to collapse
I tried this on fire tv stick 1, usb storage does not work.
dmesg shows my Kingston USB pendrive being recognized by kernel,
but registered driver debus_usbdev ?
So I guess kernel doesn't have USB storage driver?
----------------------------------------------------------------------------------------------------
<6>[ 7.267791] usb 3-1: new high speed USB device number 2 using dwc_otg
<6>[ 7.538024] usb 3-1: New USB device found, idVendor=0951, idProduct=1642
<6>[ 7.538116] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
<6>[ 7.538238] usb 3-1: Product: DT 101 G2
<6>[ 7.538330] usb 3-1: Manufacturer: Kingston
<6>[ 7.538482] usb 3-1: SerialNumber: 001CC0EC3509EA50B0000232
<6>[ 47.829345] usbcore: registered new interface driver dbus_usbdev
<3>[ 60.385131] init: Warning! Service adb_usb needs a SELinux domain defined; please fix!
Does this enable the use of USB storage ? as ive had this setup for over 6 months now to enable usb pheripal support on boot (with a script booter). If not i guess its still good to do away with the extra apk i had installed to enable my script at boot.
What does this actually do? My FireTV already can read from usb drives.
tdfsu said:
What does this actually do? My FireTV already can read from usb drives.
Click to expand...
Click to collapse
Seems mainly for gen 1 sticks to enable usb peripherals. Each boot requires a command to be re-run to recognize usb keyboards, mice, wired networking port, etc. Someone correct me if I'm wrong, but this configuration could in-theory assign multiple scripts to run on boot without extra apps installed.
Axecaster said:
Seems mainly for gen 1 sticks to enable usb peripherals. Each boot requires a command to be re-run to recognize usb keyboards, mice, wired networking port, etc. Someone correct me if I'm wrong, but this configuration could in-theory assign multiple scripts to run on boot without extra apps installed.
Click to expand...
Click to collapse
Yes Gen2 sticks and the main FireTV's seem to have OTG already enabled but Gen1 sticks don't.
However even though I've only specified enabling OTG in my initial post, as Axecaster mentioned I do in fact have a number of scripts in /etc/init.d that run on boot.
e.g. Set SELinux to Permissive, set full R/W access on the recovery directories, cleanup some temp files on boot etc
I'm currently checking to see if I can set a static IP on the USB Ethernet adapter I use with my Gen1 stick which will most likely result in a new script in /etc/init.d
I also need to investigate the USB storage options more though. Might be the same issue as I'm having with NFS mounts. I can mount an NFS share but currently only root can see it!
Hope this helps.
tgellen said:
Yes Gen2 sticks and the main FireTV's seem to have OTG already enabled but Gen1 sticks don't.
However even though I've only specified enabling OTG in my initial post, as Axecaster mentioned I do in fact have a number of scripts in /etc/init.d that run on boot.
e.g. Set SELinux to Permissive, set full R/W access on the recovery directories, cleanup some temp files on boot etc
I'm currently checking to see if I can set a static IP on the USB Ethernet adapter I use with my Gen1 stick which will most likely result in a new script in /etc/init.d
I also need to investigate the USB storage options more though. Might be the same issue as I'm having with NFS mounts. I can mount an NFS share but currently only root can see it!
Hope this helps.
Click to expand...
Click to collapse
Have you checked or modified your "persist-usb-config" file yet? If your's has different values than this (from a FireTV-Box) edit it to match mine and see if that helps.
Code:
[email protected]:/ # cat /data/property/persist.sys.usb.config
diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
As for your NFS shares issue you are going to need to do a Bind Mount to get non-root users able to access the directory. Im using the same bind-mount method to get a bunch of additional GApps installed on the FireTV by binding folders in /data/local/ --> /system/priv-app and using your /etc/init.d/ discovery to launch it automatically on boot.
[email protected]: # mkdir /data/local/nfs && chmod 0755 /data/local/nfs && chown 0:0 /data/local/nfs
init.d startup script:
Code:
#!/system/bin/sh
NFSPATH=/path/to/nfs
NFSDATA=/data/local/nfs
(mount -o bind $NFSPATH $NFSDATA) ; (mount -o remount nosuid,nodev,noexec,reltime,async $NFSPATH)
SimLynks said:
Have you checked or modified your "persist-usb-config" file yet? If your's has different values than this (from a FireTV-Box) edit it to match mine and see if that helps.
Click to expand...
Click to collapse
Result:
Code:
[email protected]:/ # cat /data/property/persist.sys.usb.config
[B]adb[/B][email protected]:/ #
I pulled the file, replaced "adb" with "iag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb", pushed it back and rebooted the device.
Result: ADB is disabled and otg doesn't seem to work (usb flash drive)
Enabling ADB sets the file back to "adb" and after a reboot otg is working again.
after installing xposed framework on the fire tv stick this method for otg on boot not longer works.
any solutions?
thecoonx said:
after installing xposed framework on the fire tv stick this method for otg on boot not longer works.
any solutions?
Click to expand...
Click to collapse
Hmm. I installed this method after xposed framework. As far as I'm aware, everything seems to be working.
thecoonx said:
after installing xposed framework on the fire tv stick this method for otg on boot not longer works.
any solutions?
Click to expand...
Click to collapse
Axecaster said:
Hmm. I installed this method after xposed framework. As far as I'm aware, everything seems to be working.
Click to expand...
Click to collapse
So only setup your scripts after you are done flashing a PreRooted ROM &/or SuperSU &/or XPosed Framework. So in other words only after your done messing with things that mess with /System in TWRP. Or you will have to reset them again.
SimLynks said:
Have you checked or modified your "persist-usb-config" file yet? If your's has different values than this (from a FireTV-Box) edit it to match mine and see if that helps.
Code:
[email protected]:/ # cat /data/property/persist.sys.usb.config
diag,serial_smd,serial_tty,rmnet_bam,mass_storage,adb
As for your NFS shares issue you are going to need to do a Bind Mount to get non-root users able to access the directory. Im using the same bind-mount method to get a bunch of additional GApps installed on the FireTV by binding folders in /data/local/ --> /system/priv-app and using your /etc/init.d/ discovery to launch it automatically on boot.
[email protected]: # mkdir /data/local/nfs && chmod 0755 /data/local/nfs && chown 0:0 /data/local/nfs
init.d startup script:
Code:
#!/system/bin/sh
NFSPATH=/path/to/nfs
NFSDATA=/data/local/nfs
(mount -o bind $NFSPATH $NFSDATA) ; (mount -o remount nosuid,nodev,noexec,reltime,async $NFSPATH)
Click to expand...
Click to collapse
Hi SimLynks,
Thanks for your suggestion. The bind mount did make the directory available for the non-root user but unfortunately it's contents were still only visible to the root user
I'll keep on trying
Cheers.
tgellen said:
[UPDATE #1] I've added a zip file with the 2 scripts, with UNIX line endings , as suggested below by AFTVNews. Cheers.
[UPDATE #2] I've added a zip file with the 2 extra scripts to go into /etc/init.d, as requested by Axecaster. These will need the same ownership and permissions as enableotg. They disable SELinux and set the permissions on the recovery directories. Cheers.
Having had a look around the android image on my Fire TV Stick (v1) [FireOS 5.2.1.1 rbox] I found that a script, which doesn't exist, called /system/bin/factoryadb.sh was being run by /init.build.rc on boot.
I was able to create a simple script to run scripts in /etc/init.d on boot.
NOTE: I've only tested this on a 1st generation Fire TV Stick but may work on Fire TV boxes if they also call /system/bin/factoryadb.sh from /init.build.rc
Before you do this please make sure factoryadb.sh is NOT on your FireTV and that it is called from /init.build.rc by connecting to your FireTV via adb and running the following commands
Code:
adb shell
su
grep factoryadb /init.build.rc && ls -l /system/bin/factoryadb.sh
Hopefully this will return
Code:
service factoryadb /system/bin/factoryadb.sh
/system/bin/factoryadb.sh: No such file or directory
Now continue ...
My factoryadb.sh script
Code:
#!/system/bin/sh
#
# Execute all scripts in /etc/init.d
if [ -d /etc/init.d ]
then
for f in `ls /etc/init.d/* 2>/dev/null`
do
if [ -s ${f} ]
then
echo Executing ${f} ... >/dev/kmsg
/system/bin/sh ${f}
fi
done
fi
NOTE: Make sure this file has UNIX line endings only. Notepad++ has an option to specify UNIX line endings.
I also have a simple script to enable OTG which I called enableotg, again MUST have UNIX line endings.
Code:
#!/system/bin/sh
echo 1 > /sys/devices/platform/bcmpmu_otg_xceiv/host
Connect to the Fire TV Stick via adb and run the following commands
Code:
adb push factoryadb.sh /sdcard/
adb push enableotg /sdcard/
adb shell
su
mount -o remount,rw /system
mkdir /etc/init.d
cp /sdcard/factoryadb.sh /system/bin/
cp /sdcard/enableotg /etc/init.d/
chown 0:0 /system/bin/factoryadb.sh /etc/init.d /etc/init.d/enableotg
chmod 755 /system/bin/factoryadb.sh /etc/init.d /etc/init.d/enableotg
mount -o remount,ro /system
reboot
When the FireTV Stick has rebooted then reconnect via adb and run the following commands
Code:
adb shell
su
dmesg | grep -e factoryadb -e Executing -e bcmpmu
You should see something similar to
Code:
<6>[ 3.005279] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Probing started...
<6>[ 3.007690] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Probing successful
<3>[ 4.998016] init: Warning! Service factoryadb needs a SELinux domain defined; please fix!
<4>[ 5.573242] Executing /etc/init.d/enableotg ...
<6>[ 5.579040] bcmpmu_otg_xceiv bcmpmu_otg_xceiv: Switching to Host
All is working and OTG should be working about 5 seconds after leaving the TWRP screen and long before Android has finished booting.
If you have an ethernet dongle attached it should have an IP address before the launcher starts
NOTE: The SELinux warning can be safely ignored.
Hope this helps.
Click to expand...
Click to collapse
Can this be used in some way to enable otg while at the TWRP countdown bar ( as to use keyboard/mouse/airmouse within TWRP), As it's a whole lot easier to use than the ADB mouse, having to plug firestick into laptop/computer if you need to be in recovery, if it is possible it could be easier.
I use the airmouse/keyboard method myself when I go I to recovery but have to use my home made otg cable and swap over usb to computer after running the command to usb dongle for the airmouse (melee F10 pro). After the command has run while plugged into my laptop I unplug the laptop connection and plug in my dongle and I navigate TWRP with my remote.
It is any chance that we can enable OTG on no-rooted devices of firetv gen 1 ?I have firmware 5.2.6.7 so I think there is no way I can root the device. Thanks!
minute said:
It is any chance that we can enable OTG on no-rooted devices of firetv gen 1 ?I have firmware 5.2.6.7 so I think there is no way I can root the device. Thanks!
Click to expand...
Click to collapse
Sorry. Unfortunately you need root access to change the OTG value on the FireTV gen 1

Categories

Resources