Install Debian Linux on the FireTV - Fire TV General

Hey guys,
I was looking for a way to install some Linux applications on the FireTV. After trying out optware (which installs a package manager to android systems) with little success, I ended up installing a Debian Chroot on the external USB. The following is a list of apps which now run almost natively on the firetv:
- Transmission 2.82/couchpotato/sickbeard
- openssh
- nano
- x11 environment
- vnc server
- ftp server
I hope these instructions will be useful for some people. Your firetv needs to be rooted for this to work. The process is relatively quick and as easy as it can get. The tricky part is to let The Debian environment boot when the FireTV boots. Here we go:
1. First, get DebKit from Google Play
2. Sideload DebKit onto the FireTV and start it up
3. Grant DebKit Root Permissions
{
"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"
}
4. Push the Menu Button on your FireTV remote and go to settings
5. Select the image Location. I created a folder called debian on the external USB device. The USB works natively through the new FireTV firmware.
6. For the image size I decided to make it 2GB. At first I had a 1GB image but I quickly ran out of space installing the x11 environment
7. Under Debian Distribution I would recommend installing Jessie since it gives you the latest Transmission version. With wheezy you get v 2.6 which does not let you choose folders through the web ui.
8. Go back to the main menu and choose "Install". Follow the onscreen instructions.
At this point you should have a working Debian installation on your FireTV.
9. The first thing we want to do is install openssh to create a login into the chroot. To log into your new Debian installation use
"adb connect 192.168.1.x" (firetv ip) and "adb shell"
10. Once you are logged into the firetv shell, execute "debkit mount" , then "debkit chroot".
11. Inside the chroot execute "apt-get update && apt-get install openssh". You will see a few error messages which are caused by the environment variables of the android shell. When using nano for example you'll notice that the enter key doesn't work. On a full size keyboard you can use the other enter key to confirm though.
12. Now try logging in to your debian chroot with ssh [email protected]" (firetv ip)
AUTOSTART
In order to autostart your debian chroot I created the following script.
1. Go to the android shell and remount /system in rw ( mount -o remount,rw /system )
2. Create or edit /system/etc/install-recovery-2.sh which will autostart (vi /system/etc/install-recovery-2.sh, then chmod 755 /system/etc/install-recovery-2.sh)
3. Here is my complete autostart script. I have all my media connected to my router which has a NFS server running:
Code:
#!/system/bin/sh
sleep 20
busybox mount -o remount,rw /
busybox mkdir -p /mnt/nfs.TV
busybox mkdir -p /mnt/nfs.Movies
busybox chmod 777 /mnt/nfs.TV
busybox chmod 777 /mnt/nfs.Movies
busybox remount,ro /
su --mount-master -c "busybox mount -o nolock,hard,intr,rw -t nfs 192.168.10.1:/mnt/TV /mnt/nfs.TV"
su --mount-master -c "busybox mount -o nolock,hard,intr,rw -t nfs 192.168.10.1:/mnt/Movies /mnt/nfs.Movies"
/data/data/com.mizusoft.debkit/files/debkit mount
sleep 5
busybox mount --bind /mnt/nfs.TV /data/data/com.mizusoft.debkit/files/mnt/mnt/TV
busybox mount --bind /mnt/nfs.Movies /data/data/com.mizusoft.debkit/files/mnt/mnt/Movies
busybox mount --bind /mnt/nfs.Movies/Music /sdcard/MPD/music
sleep 5
/data/data/com.mizusoft.debkit/files/bin/chroot /data/data/com.mizusoft.debkit/files/mnt/ /bin/bash -c "/home/ssh.sh"
4. I mount my nfs shares to the FireTV and then bind them inside the chroot.
5. Here are the contents of /home/ssh.sh which is a script to start the chroot ssh
Code:
/usr/sbin/sshd
sleep 10
/usr/bin/ssh [email protected] "/home/startup.sh"
6. and the contents of /home/startup.sh
Code:
/etc/init.d/transmission-daemon start
/etc/init.d/couchpotato start
/etc/init.d/cron start
7. What you end up with is a FireTV which runs Debian on the side. I've had this setup for the last two months and can say that so far the performance of Kodi does not seem to suffer of having the Debian Chroot running at the same time.
I hope this tutorial will be helpful for people who are looking for ways to extend the use of their FireTV.
Cheers,
Chris

mrchrister said:
Hey guys,
I was looking for a way to install some Linux applications on the FireTV. After trying out optware (which installs a package manager to android systems) with little success, I ended up installing a Debian Chroot on the external USB. The following is a list of apps which now run almost natively on the firetv:
- Transmission 2.82/couchpotato/sickbeard
- openssh
- nano
- x11 environment
- vnc server
- ftp server
I hope these instructions will be useful for some people. Your firetv needs to be rooted for this to work. The process is relatively quick and as easy as it can get. The tricky part is to let The Debian environment boot when the FireTV boots. Here we go:
1. First, get DebKit from Google Play
2. Sideload DebKit onto the FireTV and start it up
3. Grant DebKit Root Permissions
4. Push the Menu Button on your FireTV remote and go to settings
5. Select the image Location. I created a folder called debian on the external USB device. The USB works natively through the new FireTV firmware.
6. For the image size I decided to make it 2GB. At first I had a 1GB image but I quickly ran out of space installing the x11 environment
7. Under Debian Distribution I would recommend installing Jessie since it gives you the latest Transmission version. With wheezy you get v 2.6 which does not let you choose folders through the web ui.
8. Go back to the main menu and choose "Install". Follow the onscreen instructions.
At this point you should have a working Debian installation on your FireTV.
9. The first thing we want to do is install openssh to create a login into the chroot. To log into your new Debian installation use
"adb connect 192.168.1.x" (firetv ip) and "adb shell"
10. Once you are logged into the firetv shell, execute "debkit mount" , then "debkit chroot".
11. Inside the chroot execute "apt-get update && apt-get install openssh". You will see a few error messages which are caused by the environment variables of the android shell. When using nano for example you'll notice that the enter key doesn't work. On a full size keyboard you can use the other enter key to confirm though.
12. Now try logging in to your debian chroot with ssh [email protected]" (firetv ip)
AUTOSTART
In order to autostart your debian chroot I created the following script.
1. Go to the android shell and remount /system in rw ( mount -o remount,rw /system )
2. Create or edit /system/etc/install-recovery-2.sh which will autostart (vi /system/etc/install-recovery-2.sh, then chmod 755 /system/etc/install-recovery-2.sh)
3. Here is my complete autostart script. I have all my media connected to my router which has a NFS server running:
Code:
#!/system/bin/sh
sleep 20
busybox mount -o remount,rw /
busybox mkdir -p /mnt/nfs.TV
busybox mkdir -p /mnt/nfs.Movies
busybox chmod 777 /mnt/nfs.TV
busybox chmod 777 /mnt/nfs.Movies
busybox remount,ro /
su --mount-master -c "busybox mount -o nolock,hard,intr,rw -t nfs 192.168.10.1:/mnt/TV /mnt/nfs.TV"
su --mount-master -c "busybox mount -o nolock,hard,intr,rw -t nfs 192.168.10.1:/mnt/Movies /mnt/nfs.Movies"
/data/data/com.mizusoft.debkit/files/debkit mount
sleep 5
busybox mount --bind /mnt/nfs.TV /data/data/com.mizusoft.debkit/files/mnt/mnt/TV
busybox mount --bind /mnt/nfs.Movies /data/data/com.mizusoft.debkit/files/mnt/mnt/Movies
busybox mount --bind /mnt/nfs.Movies/Music /sdcard/MPD/music
sleep 5
/data/data/com.mizusoft.debkit/files/bin/chroot /data/data/com.mizusoft.debkit/files/mnt/ /bin/bash -c "/home/ssh.sh"
4. I mount my nfs shares to the FireTV and then bind them inside the chroot.
5. Here are the contents of /home/ssh.sh which is a script to start the chroot ssh
Code:
/usr/sbin/sshd
sleep 10
/usr/bin/ssh [email protected] "/home/startup.sh"
6. and the contents of /home/startup.sh
Code:
/etc/init.d/transmission-daemon start
/etc/init.d/couchpotato start
/etc/init.d/cron start
7. What you end up with is a FireTV which runs Debian on the side. I've had this setup for the last two months and can say that so far the performance of Kodi does not seem to suffer of having the Debian Chroot running at the same time.
I hope this tutorial will be helpful for people who are looking for ways to extend the use of their FireTV.
Cheers,
Chris
Click to expand...
Click to collapse
Definitely Cool! Are you strictly using it for the apps you've mentioned or have you found other uses? More screenshots would be awesome--video would be the best. But don't want you to go through too much trouble. I'm very curious to see how it runs in real time, but I'm not likely to have a chance to try it in the foreseeable future. Thanks a lot for sharing though!
BTW--whats the boot time like? It'd be nice to run sickbeard on it if I'm able to switch back and forth fire os/ debian.

Hey Klit,
when I have a bit more time on my hands I might add a video tutorial , it's definately a pretty straight forwarded process if you don't fear using the terminal. the debian environment is only accessible through a terminal so you cant switch between fire os and a debian window manager . The boot time is not affected by loading the debian chroot since the debian stuff loads after fire os is loaded. Sickbeard works great btw!

What mode is Debian running in and is it a visual UI desktop?
While I am here,I must ask,can someone attempt to get a full Linux running using Xserver for maximum performance and make some detailed instructions afterward,I couldn't figure it out myself.
I had a version of Linux running with a UI desktop and a few browsers that worked decent.
Though this done with a slower method and made visible using a VNC app.
It's been so long since I ran it,and I forgot how to start it,and haven't used it since.
It would be nice to have a full Linux OS running via Xserver at high performance,enough to run several cool things smoothly without the framedrops and jitters that VNC gets.

This tutorial is based on Debootstrap, so it installs Debian into a "subdirectory" of fire os. In this case it mounts a 2GB image from the external USB to the Firetv. When you ssh into this environment it will feel like a debian server and you can do most things you can do in debian. you can read more about this over here:
https://wiki.debian.org/Debootstrap
I have a vncserver running on the firetv with fluxbox as my window manager. it runs great but this is not a dual boot setup with debian coexisting on the firetv.

Thanks for the detailed instructions, OP! I wonder if this would work as a Terraria server... TShock is simply too much for the Raspberry Pi.

I would like to install Debian and remove fire OS completely. Does any one have instructions or a link? Thank you.

https://github.com/freedreno/freedreno/wiki/FireTV

Fire TV Stick?
Great work! I can't wait to get the time to try it out myself.
It sounds like you did this on the Fire TV installing Debian on an external USB drive. Did I get that correct? Can this be done on a Fire TV Stick which has no external USB option?
Also, it looks like both Debian and Android run simultaneously based on your comments, is that correct? Does anyone know if there is a way to set it so Android launches when HDMI is plugged in and Debian launches when HDMI is not plugged in and not both simultaneously?

Related

Linux on the Droid 2

Skrulladams figured out a way to get Linux onto the Droid X, Droid 2 / Global, Droid Pro, and DEFY (Really any modern motoblur phone with a locked bootloader.) Supposedly the Atrix has it as well? Technically, according to wikipedia, motoblurexists on the CLIQ/DEXT, Backflip, Devour, Flipout, Charm, and Flipside as well. I can't tell you whether or not this method works for those phones, maybe somebody could verify. While I was researching methods to get this all to work I found different methods for the original Droid, I am assuming that the version of blur on any phone from the OG droid/milestone is different, because the installation method seems somewhat less locked-down.
First you will need a Linux image. I suggest getting yours from Ruan over at androidclone.com
Ubuntu Laika-Beta1.2a.rar
The commands have to be issued from Linux or a virtual machine of Linux as far as I know. I downloaded VirtualBox and used a copy of Ubuntu 10.10 that I had laying around. You could use the image you downloaded above with VirtualBox. PuTTYcyg seems like a better alternative, but I haven't used it.
When setting up your linux virtual machine you might want to make your username "noob" like I did, it will allow you to copy and paste my commands.
The first thing you will need is the android sdk.
Click here to get it
Using and installing it is a little confusing. I just extracted it to my desktop.
You will have to run /tools/android, I did this by dragging and dropping the icon into a terminal window and hitting enter. You have to install the platform-tools. ADB will be downloaded to the platform-tools folder inside the SDK folder.
VirtualBox allows you to capture a USB device inside your virtual machine inside the menu. Devices -> Motorola ####
Inside your virtual machine you will need to copy ubuntu.img from the Laika-Beta1.2a.rar you donloaded earlier to your home directory. While still in the home directory create a new folder simply called "ubuntu."
Your phone has to be rooted and you need a terminal emulator. Most custom ROMs have this by default, but there are many options.
Next, open up a terminal emulator on your phone and execute some commands:
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mkdir /data/local/mnt
Back on your virtual machine in a terminal:
Code:
sudo losetup /dev/loop0 /home/noob/ubuntu.img
sudo mount -t ext2 /dev/loop0 /home/noob/ubuntu
Dirty_Jerz has an alternate method, Click here for his thread. so it is now up to you whether you'd have everything on your internal storage or SD card. My method uses the internal storage, his uses the SD card. If you'd rather use his, stop here.
Here you will want to remove a symbolic link in /home/noob/ubuntu/usr/bin that screws this method. You can do this by:
Code:
sudo rm /home/noob/ubuntu/usr/bin/X11
Then I remove security stuff:
Code:
sudo chmod 777 /home/noob/ubuntu
sudo '/home/noob/Desktop/android-sdk-linux_x86/platform-tools/adb' shell
chmod 777 /data/local/mnt
exit
sudo '/home/noob/Desktop/android-sdk-linux_x86/platform-tools/adb' push /home/noob/ubuntu /data/local/mnt
This is going to take about 2 and a half hours so I suggest you find something else to do while it copies over.
When it's all done you will need to copy a script over in order to chroot (boot from inside android) into Ubuntu.
Download this script! (specific for this install method!)
Username: androidclone.com
Password: androidclone.com
Click to expand...
Click to collapse
This script belongs in /system/bin so you will have to put it there. The easiest way to do that would be to copy it to your sdcard and then use your terminal emulator to move it.
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /sdcard
cp bootubuntu /system/bin
cd /system/bin
chmod 777 bootubuntu
Now you can boot into Ubuntu from any directory as long as your terminal emulator has superuser.
Code:
su
bootubuntu
Once inside there are some commands that need to be run in order to get a functional UI.
I got these from this site He seems to have a lot of extra configuration instructions which may or may not help you.
Code:
mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
-Xvnc commands-
Code:
export DISPLAY=localhost:0.0
Xvnc -localhost -geometry 854x480 -depth 24 -deferupdate 0
-start your gui-
Code:
startlxde
I prefer xfce though, personally.
--------problems----------
"/bin/sh can't access tty: job control turned off" upon chrooting
Terminal emulators from within the UI don't work.
*DRIVERS*
Touch screen support/UI enhancements for touch screen.
androidVNC
Might not be an ideal solution. I still noticed what seemed to be some graphical lag. There could be a setting that can get it running better, but an app optimized for high speed localhost operation
Chrooting a prebuild image causes all kinds of problems because the proper post-installation scripts are not run. Some programs ignore these errors, and for others they error out. I have yet to find a good solution for this but I have found hints:
Check out this page
Seems a little outdated, but maybe somebody will find a way to make a method like this work.
What we really seem to need is a custom kernel/ROM/distro team that can work on these issues.
-----other alternatives?-------
First I tried kubuntu mobile. It was very buggy so I gave up on it.
Ubuntu netbook edition has been slammed by some for being bloated, but it's ARM port should be lightweight. From screenshots it looks like it has a great UI. The problem is getting gnome to start, it encounters some error and doesn't load.
fedora has a mobile edition that looked good, I think they are somehow involved with Meego which now seems doomed. I'm not sure how similar to android it is or if it is worth the effort.
Check this out
Many of you may already know about the QEMU for android app, but we should be able to cross-compile it to use within our chroot.
I looked into wine, it should be a dead-end since we aren't on x86 architecture and it doesn't do any emulation.
VMware will be releasing a version for android.
Also while playing around I thought about porting iOS on to an android phone. It should be possible.
Pics!
{
"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"
}
This could potentialy be used to get truly custom ROMs on the D2/DX/Motoblur ridden phones. Honeycomb here I come!
Sir, if you could use this to port newer versions of android and other operating systems such as meego and maybe even webos, you are truly the savior of our locked phones :O
Sent from my BLAZING FAST Droid 2 Global using the XDA app
From my understanding (not a coder or even a regular linux user), a chroot environment is just running an OS within your OS. Meego (maybe I'm thinking of Maemo?) should definitely be possible, I think there is an ARM build somewhere. Fedora was involved with them in some way, and I think might have an ARM build of one of their older releases.
Truly custom ROMs? Not sure, maybe Linux on the phone will be of help to devs?
I was hoping maybe Droid 2 bootstrapper could be modified to fastboot into the install. That still wouldn't be a true bootloader unlock and we still have drivers to worry about and might not even be possible, just an idea.
Well, we might be able to hijack to boot to maybe run CyanogenMod(at last!) . I can for sure, that would rule. I used CM on my old phone(the ultra moddable Droid Eris(HTC FTW!)), and it was the greatest rom I've ever seen
Sent from my DROID2 using XDA Premium App
It is possible to port it to Milestone 2?
Sent from my T-Mobile G1 using Tapatalk
This is a sweet little tutorial that I've been following and I'm excited to get Ubuntu up and running... if I do get it up and running. Problematic mentions a problem where '/bin/sh can't access tty; job control turned off' and I also hit this. I'm pretty new too linux, I've only really got into it upon the purchase and rooting of my Droid 2 and I haven't been able to find anything that can help me fix this problem. Has anyone else gotten past this and had ubuntu running on the Droid 2? Or could someone point me in the right direction? Any help is appreciated.
Can u mirror Ubuntu Laika-Beta1.2a ?. I can't download at filefactory now. Or can I use another ubuntu image ?
Can someone answer? Is it possible to run it on Milestone 2?
It is possible to port it to Milestone 2?
Click to expand...
Click to collapse
Should be. There shouldn't be enough differences between the two for this to not work. I have a hard time thinking of a scenario where this wouldn't work for an andrioid phone. I think the main requirement is having a fairly recent version of busybox installed.
Can u mirror Ubuntu Laika-Beta1.2a ?. I can't download at filefactory now. Or can I use another ubuntu image ?
Click to expand...
Click to collapse
You can use any armel image of Linux. Currently I think this mainly applies to Ubuntu, there should be ARM builds for other distros out there, but these are tough to find. A skilled enough developer should be able to port any distro they wish.
Problematic mentions a problem where '/bin/sh can't access tty; job control turned off' and I also hit this.
Click to expand...
Click to collapse
This seems to be a bug from chrooting a preinstall image without any kind of real setup. I found you can do a lot of this manually, (If you're interested try googling the MAKEDEV command, I think that generated ttys for me.) but I'm still searching for a real solution. Currently I'm considering trying the debootstrap method, the "ubuntu-netbook-10.10-preinstalled-netbook-armel+omap.img" image could be the ticket as well.
thanks, i'll try with Ubuntu-Netbook 10.10
Please Help
hello i am trying this and am getting hung up on the
"sudo mount -t ext2 /dev/loop0 /home/noob/ubuntu" am getting this
wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
looking at dmesg i see this
EXT2-fs (loop0): error: couldn't mount because of unsupported optional features (4)
any ideas?
bootubuntu script
hello. it seems i'm unable to log into androidclone.com are you able to post the bootubuntu script?
link
I think this could be the script you looking for, gonna try this out on my flipout when i get home
https://www.ebower.com/docs/droidx-hacking/

Optware for Android

I was looking for a command line ssh program for Android, and was surprised that I couldn't find anything. I didn't want to install a chroot environment, but then I found Optware for Android. I've used it before on other devices and it's VERY useful for getting a more complete unix environment on otherwise stripped down linux devices.
The version on that page was built for a rooted Nook Color, but I only had to make minor changes to get it to run on an Epic running SRF:
1. Extract miniunz from Barnes and Noble's Nook Color 1.2 update zip and put it somewhere in the path - I put mine at /system/bin. You can get it from the first link here http://www.google.com/search?q=nook+color+1.2+update.
2. Make sure /system has at least 2MB or so free. Mine was full... I deleted a few ringtones from /system/media/audio/ringtones/
3. run this:
mount -o remount,rw /
ln -s /data/tmp /tmp
4. Follow the instructions from the Optware for Android page
Optware will now be installed, but pretty much nothing will run at the moment. I'm VERY new to Android, so I don't know that this is the right way to fix it, but here's what I did to get it working:
1. mount -o remount,rw /system
create /system/xbin/optlinks.sh with these contents:
#!/bin/sh
if [ ! -L /tmp ]; then
mount -o remount,rw /
ln -s /data/opt/lib/ld-linux.so.3 /lib/ld-linux.so.3
ln -s /data/opt /opt
ln -s /data/tmp /tmp
mount -o remount,ro /
fi
create /system/xbin/shell.sh with these contents:
#!/bin/sh
/system/bin/su -c /system/xbin/optlinks.sh
/system/bin/su -c "/opt/bin/bash --login"
2. chmod 755 shell.sh and optlinks.sh
3. Edit /etc/profile and add :/opt/sbin:/opt/bin to the PATH export and :/opt/lib to the LD_LIBRARY_PATH export.
4. Install Jack Palevich's Terminal Emulator from the Market
5. In Terminal Emulator's Prefs, set Initial Command to shell.sh.
I had to put the optlinks.sh part in because that's what optware expects - the Nook has those locations, SRF doesn't. Symlinks seem to work fine, but they disappear on reboot - no idea why - so that's why I run it every time.
Now, when I launch Terminal Emulator, I get a root shell, and can use ipkg install to get anything optware provides. It would be really cool if I the shell was run as a normal (non-root) user, and even better if the optware installer didn't need all the workarounds. Anybody have any ideas?
Tried this on CM 7
First off, thanks!
I tried this on CM 7 nightly (nexus one) and here is what I found:
- Most importantly, it broke root access to other apps on the phone. Not sure if this is due to not being able to update init.rc, may try to sort this out later.
- The goal of the install is to be able to run an SSH server and in addition to that you will have access to optware.
- The default busybox that is included with CM7 does not include adduser, addgroup or passwd applets which will cause things to fail once the install script tries to add a new user. Also, there is an app called "busybox installer" on the market that *will* update busybox, however it depends on libraries that CM7 does not include by default. The result is none of the busybox applets can reach the internet due to not being able to resolve domain names.
If you open the optware-bootstrap-0.0.1.shar file with 7zip, you will see there is a busybox executable included. It's an older version, however it includes what you need. I copied that version to /system/xbin and I was able to use the aforementioned applets
- At the end of my install I received an error that it was unable to edit the ram disk while trying to update init.rc. I think the solution is to add a script to /system/etc/init.d/ . Still working that out.
- I'm probably going to try combining this method with this one: http://android.modaco.com/topic/312...cripts-installing-bash-dropbear-mc-nano-opkg/ Since this is more of a manual method, however it's connecting to a custom optware feed that only has a few packages.
I dont suppose you got anywhere with this?
Looking to install optware on my desire hd running miui rom.

Linux chroot mount scripts

The actual creation of an arm linux chroot image is probably out here on teh internetz somewhere, but I can assist with my mounting shell script (which works).
My image is of a debian arm chroot, and the image filesystem is ext2 (a good idea for fewer writes. ie innately non-journaling), has been used extensively on fw DE .17 and I'm currently trying it out on WW .29 (thank you, miloj).
I would upload my debian img somewhere, but I've actually broken it somewhat (it works for my needs, but it's nonetheless a bit too hacked up to be reliable).
I've modified it somewhat for generalization, some of it is probably wrong and/or redundant, and it IS hackish and ugly, but it works for me (tm).
* the chroot image only need a root account (and probably bash installed, but it usually is)
* You need busybox installed.
* You need to upload your chroot image named linux.img to the internal sdcard in a folder named linux
A shell script to set things up is attached.
What you need to do:
push the install script and run it:
Code:
adb push installlinuxstuff.sh /data/local/
adb shell sh /data/local/installlinuxstuff.sh
Now you can (from adb shell or terminal emulator on device):
Code:
su -
/data/local/mnt/linux.sh
/data/local/mnt/notlinux.sh
Feel free to remove the install script at
/data/local/installlinuxstuff.sh
when you've got it up and running.
Alternative way to run the scripts from adb shell:
Code:
adb shell su -c /data/local/mnt/linux.sh
adb shell su -c /data/local/mnt/notlinux.sh
I usually symlink start and stop (in my case deb and undeb) shell scripts placed in /data/local/mnt in /system/bin (ie shell scripts with 'su -c /data/local/mnt/whatever.sh' in them) for easy start an stop from terminal emulator, and if you've gotten this far you may welcome the small advice. (in other words - don't do this unless you _really_ know what you're doing)
Debian ARMHF or ARMEL?
If you would uploaded it (good place is google drive , sharing as public, as there are no ads or bull**** and the download is extremely fast) I would love to try your image - after modifying your script so it can work on a UHS-1 class MicroSD I want to try running this off of (should give it a little more speed).
zamaditix said:
Debian ARMHF or ARMEL?
If you would uploaded it (good place is google drive , sharing as public, as there are no ads or bull**** and the download is extremely fast) I would love to try your image - after modifying your script so it can work on a UHS-1 class MicroSD I want to try running this off of (should give it a little more speed).
Click to expand...
Click to collapse
Armel (I use the same chroot installation on my phone in a smaller image file (with less stuff installed)). I've got loads of personal stuff all over it and besides - it's somewhat broken. I really don't want to try to fix it.
So I'm working on retracing my steps, creating a clean armhf ext2 image (debian wheezy base installation for now) and redo the mount script, but I can't make any promises on a release date.
Anyhu - there are loads of images (armel, at least) on teh internetz (BT5 and too many ubuntu, for instance).
Just check so our kernel can mount the filesystem.
Edit: if not you can just create a new image file with a filsystem that's mountable and copy the chroot files to it.
So the ideal image for this tablet is armhf? If I wanted to create a Gentoo image, I would go with armv7? I'm just not sure exactly which ARM architecture this tablet is.
EndlessDissent said:
So the ideal image for this tablet is armhf? If I wanted to create a Gentoo image, I would go with armv7? I'm just not sure exactly which ARM architecture this tablet is.
Click to expand...
Click to collapse
The CPU is the Tegra 3 if you want to google it and it is an ARMv7 w/ NEON extensions chip. ARMv7 specification requires hardware fp so naturally it is ARMhf.
Nice to hear, keep us updated on your progress. I'm currently running an armel copy of Ubuntu 12.04 but it has problems with some packages and others are armhf only.
When I run linux.sh, I get an error that /sdcard can't be mounted because it doesn't exist.
Code:
mount: mounting /sdcard on /data/local/mnt/linux/sdcard failed: No such file or directory
I also tried changing the script to mount /mnt/sdcard, but that didn't work either.
EndlessDissent said:
When I run linux.sh, I get an error that /sdcard can't be mounted because it doesn't exist.
Code:
mount: mounting /sdcard on /data/local/mnt/linux/sdcard failed: No such file or directory
I also tried changing the script to mount /mnt/sdcard, but that didn't work either.
Click to expand...
Click to collapse
Yes, it is somewhat hackish, like I wrote. My image has got an sdcard folder (/sdcard) inside of it where I mount /sdcard from android. (Ie chroot and mkdir /sdcard)
followed this:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-rooted-transformer-prime/
make sure you have busybox installed der. Or at least the cp command in /system/bin
works well on my TF300T, Yea its not native but im currently configuring it for kernel building ;-D
FlyingPoo said:
followed this:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-rooted-transformer-prime/
make sure you have busybox installed der. Or at least the cp command in /system/bin
works well on my TF300T, Yea its not native but im currently configuring it for kernel building ;-D
Click to expand...
Click to collapse
Why does the mount script remount a non-existing block device with an ancient (according to android) filesystem?
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Edit: I read all the scripts, and they all mount that crap. It's not made for transformers, and on the android device it's made for it leaves /system mounted rw after you've run it, and WHEN run (installed) it modifies too much in /system/bin
Code:
# At first it copies loads of crap to /system/bin, and then:
cd /system/bin/
chmod 4777 *
It's not even "hackish" - it's just... wrong...
Will loop1 work every mount?
Code:
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1
I'm almost only asking, since this thread was supposed to be about scripts?
gasingvar said:
Yes, it is somewhat hackish, like I wrote. My image has got an sdcard folder (/sdcard) inside of it where I mount /sdcard from android. (Ie chroot and mkdir /sdcard)
Click to expand...
Click to collapse
Thanks. I created /sdcard, and it works almost perfectly now. However, mounting devpts at /dev/pts doesn't seem to work. I replaced that line with
Code:
mount --bind /dev $mnt/dev
and it seems to work fine. Is there anything wrong with my method?
/dev/void said:
Why does the mount script remount a non-existing block device with an ancient (according to android) filesystem?
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Edit: I read all the scripts, and they all mount that crap. It's not made for transformers, and on the android device it's made for it leaves /system mounted rw after you've run it, and WHEN run (installed) it modifies too much in /system/bin
Code:
# At first it copies loads of crap to /system/bin, and then:
cd /system/bin/
chmod 4777 *
It's not even "hackish" - it's just... wrong...
Will loop1 work every mount?
Code:
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1
I'm almost only asking, since this thread was supposed to be about scripts?
Click to expand...
Click to collapse
I'm assuming you're talking about the link in the post you quoted, even though you seem to be referencing the OP's use of the word "hackish". The script in the OP doesn't do any of that stuff. It just creates a few directories in /data/local/mnt/ and writes the mount/unmount scripts, which themselves only un/mount appropriate directories for the tablet. As for your question, I'm not nearly experienced enough to answer it. Sorry.
EndlessDissent said:
Thanks. I created /sdcard, and it works almost perfectly now. However, mounting devpts at /dev/pts doesn't seem to work. I replaced that line with
Code:
mount --bind /dev $mnt/dev
and it seems to work fine. Is there anything wrong with my method?
Click to expand...
Click to collapse
AFAIK your mount seems to be more complete, ie more android hardware goodies accessable from the chroot environment. However - that means more things possibly going wrong (like writing to a device who's critical to the android environment).
Personally I'd try to find what "hardware goodies" and whatnot I'd need to get the chroot environment working optimally, and not mount ALL of /dev.
EndlessDissent said:
I'm assuming you're talking about the link in the post you quoted, even though you seem to be referencing the OP's use of the word "hackish". The script in the OP doesn't do any of that stuff. It just creates a few directories in /data/local/mnt/ and writes the mount/unmount scripts, which themselves only un/mount appropriate directories for the tablet. As for your question, I'm not nearly experienced enough to answer it. Sorry.
Click to expand...
Click to collapse
Yes, and the OP is very honest about his script(s) being "hackish", which I interpret to mean 'not optimal, possibly redundant but working', all of which it is (and I applaud the early release, since for instance I could get things rolling), but the ubuntu image installation and mounting scripts from the other poster ( whom I was addressing ) are plain faulty.
I am looking for a armhf build of ubuntu or debian that I can chroot (newer the better), if anyone knows of such a build that would be fantastic but if not does anyone know of an easy to follow guide to compile such a thing?
I found two pretty good guides. I mostly followed THIS ONE, but I found that it doesn't mount enough before "first boot", so what I did was follow the guide until the point where you move the image to the tablet. Then I ran the OP's installlinux.sh script, and then the mount script. However, the mount/unmount scripts need to be edited before using them. Comment out the sdcard line and probably the devpts line (mounting devpts didn't work; Bash complained that devpts didn't exist; I had to replace it with the line I mentioned a few posts above, but as /dev/void says, it could be problematic, so be careful). Mount the image, make the /sdcard directory, exit, unmount, and edit the scripts again to mount/unmount /sdcard.
Next time you enter the chroot, feel free to run the
Code:
sh /debootstrap/debootstrap --second-stage
command to build the image, and follow the linked guide until the next time it tells you to exit the session (NOTE: The second echo "whatever" > sources.list command is wrong; it should be echo "whatever" >> sources.list; Also, remember to replace "squeeze" with the appropriate Debian version, in my case, "testing"). Instead of exiting right after the apt-get update, I'd recommend playing around with the chroot and configuring whatever apps you install. You can just use the OP's scripts now and ignore the script in the linked guide.
When the guide I linked above gets to this line:
Code:
sudo debootstrap --verbose --arch armel --foreign squeeze /mnt/squeeze/ http://ftp.debian.org/debian
just replace armel with armhf, and if you want a testing image, replace squeeze with testing.
Sorry I'm not attaching my image. I made it gigantic (5GB), so I don't really have anywhere to store it, and you probably wouldn't want to download a file that big. Plus, it already has Openbox and a bunch of other things you probably don't want installed. I'm assuming you'd want GNOME or KDE instead.

Setting up NAS with Auto Backups on the rPi

So I set up the rPi with rdesktop, gedit, ntfs-3g, Samba, Hamachi, Privoxy and rsync to build my NAS and VPN. I have two external hard drives (2 TB and 500 GP) plugged in to a powered USB hub. I also have the powered USB hub powering the rPi. I'll reference the links I used as I go along, this wasn't hard to do.
I'll say it right now, if I can figure it out, anyone can.
First off if you haven't put Rasbian on your rPi, go do it and then come back....you're back already? Great, let's get started.
I don't like having to plug in a monitor, keyboard and mouse every time I want to access my rPi, so go ahead and do it the first time for the setup. Now that you have your peripherals all set up, let's install rdesktop so we don't have to do this again.
Open the terminal and then:
sudo apt-get install rdesktop
then get the IP address and write it down:
ifconfig eth0
Great. Now you can keep working on it as you have it set up or you can access it from another computer. IF you're on linux, go to your terminal and enter:
rdesktop ipaddress from above -g 90% (the -g 90% tells rdesktop to launch at 90% of the size of your screen. If you want something larger or smaller, suit yourself.) Sign in as your user id and password for your rPi.
Since I'm not a big nano fan, I like to use gedit, let's install it now:
sudo apt-get install gedit
Now I initially followed this guide to set up Samba, http://elinux.org/R-Pi_NAS. We'll walk through the relevant parts. Let's install Samba:
sudo apt-get install samba samba-common-bin
If you're prompted to continue then say yes. Copy the the samba config file, in case we mess it up.
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.old
On the link above we're told to use nano to update our config file, as I said, I don't like it. The great thing about Linux is, if you don't like something, you don't have to use it. So we won't use it...much.
Let's work on that config file:
sudo gedit /etc/samba/smb.conf
Search for security (ctrl + F and type security, then press enter) and you'll find the following:
# security = user
Go ahead and remove the #, so we just have:
security = user
Now let's search for homes and change:
read only = yes
to
read only = no
Now save and close the file. Run the following command to restart Samba:
sudo /etc/init.d/samba restart
You'll see the following:
Stopping Samba daemons: nmdb smdb
Starting Samba daemons: nmdb smdb
Samba comes configured with your user id defined, assuming it's pi we will now allow pi to be a Samba user.
sudo smbpasswd -a pi
You'll need to enter the password twice and then pi will be setup as the samba user id. If you would like to add an additional user(not required), then do the following:
sudo useradd marty -m -G users
sudo smbpasswd marty
You'll be asked to enter the password for marty twice now.
Now let's make a shared folder to house our main storage (this will be for user pi, not for marty):
sudo mkdir /home/pi/shared
We also need to make a folder to house our backups:
sudo mkdir /home/pi/backup
Once more we need to edit the Samba configuration file, this time we are telling it about the shared folder we just created. So let's go do that:
sudo gedit /etc/samba/smb.conf
Scroll down to the end of the file and add the following:
[public]
comment = Public Storage
path = /home/pi/shared
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
read only = no
Now save and close the file. Run the following command to restart Samba:
sudo /etc/init.d/samba restart
You'll see the following:
Stopping Samba daemons: nmdb smdb
Starting Samba daemons: nmdb smdb
Now we are getting ready to start mapping our drives, so let's make sure we have support for NTFS-formatted disks.
sudo apt-get install ntfs-3g
Great, good job!
Let's go find our hard drives that we have mounted so we can get them setup to do their jobs. Run the following command to determine where they are currently located in our file system:
sudo fdisk - l
You'll see something like this:
{
"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"
}
Now let's look at the results:
/dev/mcblk0 - This is the SD Card that Rasbian is running on.
/dev/sda - This is the 2 TB hard drive that I am using for my main storage.
/dev/sdb - This is the 500 GB hard drive that I am going to use for backing up my family pictures and business documents.
The next step is to mount the hard drives to the folders we created earlier. Before we do this we need to make sure that they are not currently mounted. We are going to do this the easy way, open the file explorer as root:
sudo pcmanfm
and you will probably see the two hard drives mounted, simply client the unmount button beside each one. then close the file manager. Now let's mount the hard drives to their permanet location:
sudo mount /dev/sda1 /home/pi/shared
sudo mount /dev/sdb1 /home/pi/backup
Great job, now we have access from our home folder to both of these drives. But we need to make this happen automatically on boot, easy:
sudo gedit /etc/fstab
Now in the fstab file add the following two lines below the line that starts with /dev/mcblk0p2
/dev/sda1 /home/pi/shared auto noatime 0 0
/dev/sdb1 /home/pi/backup auto noatime 0 0
Make sure you tab where you see the spaces above. Now save and close the file. We are set now, the drives will auto-mount to our home folders when we reboot.
Now it's time to get started with our backups, we need the software first:
sudo apt-get install rsync
(that was hard huh!)
Well we've reached the point where we have to use nano. It's not that hard, but it's definitely different than using a text editor. You will need to use your arrow keys to move up and down and then to save the file you'll need to press 'Ctrl + X' and then you'll be prompted to accept by pressing 'y'. We are now going to configure our backups. I used the guide found on How to Geek, as my inspiration for this, but I've modified a few things to work better for me. I want to give them credit for the idea though. If you read their article they instruct you to setup your backup to run nightly, however I thought that was bit much, so I decided to educate myself and figure out how to modify this. I found this link, which explains how crontab works. Basically crontab takes this entry to determine when it will execute the command that follows:
# Minute Hour Day of Month Month Day of Week Command
# (0-59) (0-23) (1-31) (1-12 or Jan-Dec) (0-6 or Sun-Sat)
0 2 12 * 0,6 rsync
I wanted to have my backups running at alternating times and only a couple of times a week, so let's go ahead and configure that:
crontab -e
Now you are in nano, navigate down to the bottom of the list and enter the following:
0 2 * * 0,3 rsync -av --delete /home/pi/shares/Pictures /home/pi/backup
0 2 * * 1,5 rsync -av --delete /home/pi/shares/busdocs /home/pi/backup
Now save the file, 'Ctrl + X' and then confirm 'y'. So let me explain what we just set up, I'll go through the first line:
0 - 0 minutes
2 - 2 hours (2 AM)
* - Any day of the month.
* - Any month.
0,3 - Run this on Sunday and Wenesday. (0 - Sunday, 1 - Monday, 2 - Tuesday, etc)
rsync - Command to be ran.
-av - archive and verbose
- -delete - (MAKE sure there are TWO dashes - -, there should not be a space between these.) This parameter tells rsync to delete any file on the to folder that is not on the from folder, so if you remove a file in your main storage it will be removed in you backup.
/home/pi/shares/Pictures - This is the from folder.
/home/pi/backup - This is the to folder.
This last step is optional but recommended. Let's go ahead and run rsync for two reasons, to verify that it can successfully back up your data and to get the biggest backup done.
rsync -av --delete /home/pi/shares/Pictures /home/pi/backup
Depending on how much data you are backing up, this could take a while. When I first ran it I backed up around 40 GB of pictures and it took about 2 1/2 to 3 hours. So go get some coffee and relax.
So your backup is set and ready to run! You did it! And it wasn't even that hard!
There may be a better way to set this up, but this what worked for me, I hope you've enjoyed getting your rPi setup as a NAS with auto backups!
One final piece, setup Hamachi so you can access your files remotely (yes you can already do it if you have SSH installed (which you should.)) Go to logmein.com and create a free account and set up your network. You can install this on Linux, Mac and windoze.
sudo apt-get update
sudo apt-get install --fix-missing lsb lsb-core (this will take a bit)
sudo dpkg -1 --force-architecture --force-depends logmein-hamachi_2.1.0.86-1_armel.deb
( the above line is dash dash force dash architecture and then dash dash force dash depends)
Now set up hamachi on the rPi:
sudo hamachi login
sudo hamachi attach [INSERT LOGMEIN.COM EMAIL HERE]
sudo hamachi set-nick [INSERT A NICKNAME FOR YOUR RASPBERRY PI]
Now back on your computer on logmein.com, go to your networks and grant the Pi permissions to join your network and write down the network ID (a 9-digit number) for that network.
Back on the rPi:
sudo hamachi do-join [THE NETWORK ID YOU WROTE DOWN]
Now start SSH so you can reach the rPi remotely:
sudo /etc/init.d/ssh start
You should test out the set up now by SSH'ing into the rPi at the virtual IP on the logmein.com site, it will be something like 25.xx.xx.xx:
ssh [email protected]
Now you can access your rPi remotely (outside of your network.)
You can also remote desktop into the pi at the new virtual IP address:
rdesktop 25.xx.xx.xx -g 70%
Here are the links that pulled knowledge from for all of this.:
http://www.howtogeek.com/139433/how-to-turn-a-raspberry-pi-into-a-low-power-network-storage-device/
http://linux.about.com/library/cmd/blcmdl1_rsync.htm
http://www.pantz.org/software/cron/croninfo.html
http://elinux.org/R-Pi_NAS
This is what I have planned, but with a twist.
I plan to connect my Seagate Expansion 2TB desktop drive to the rPi. I intend to write a script that will run as a daemon and will check if I have connected my phone to the rPi and if detected, it will backup the images to my drive.
Will share it once successfully implemented. My rPi arrives next week.
Tapatalked from Desire S running Andromadus
suku_patel_22 said:
This is what I have planned, but with a twist.
I plan to connect my Seagate Expansion 2TB desktop drive to the rPi. I intend to write a script that will run as a daemon and will check if I have connected my phone to the rPi and if detected, it will backup the images to my drive.
Will share it once successfully implemented. My rPi arrives next week.
Tapatalked from Desire S running Andromadus
Click to expand...
Click to collapse
That sounds awesome! I would definitely be interested in seeing that!!!

[How-To] Root an Android Virtual Device (AVD) [Video]

Hi guys, I made a little screen-cast of the routine used to root an android emulator.
Here's the video version, but I wrote the text version under it too.
Prerequisities​
su binary : http://d-h.st/qZ2
busybox binary : http://d-h.st/IIv
Superuser apk : http://d-h.st/Et5
(These instructions are assuming you're on ubuntu or an other debian-based linux distro, but it should be pretty easy to adapt to batch if you're on windows.)
Instructions​
1) First, create a new AVD in Eclipse or in terminal
Here's the manpage for the emulator :
Code:
Android Emulator usage: emulator [options] [-qemu args]
options:
-sysdir <dir> search for system disk images in <dir>
-system <file> read initial system image from <file>
-datadir <dir> write user data into <dir>
-kernel <file> use specific emulated kernel
-ramdisk <file> ramdisk image (default <system>/ramdisk.img
-image <file> obsolete, use -system <file> instead
-initdata <file> same as '-init-data <file>'
-data <file> data image (default <datadir>/userdata-qemu.img
-partition-size <size> system/data partition size in MBs
-cache <file> cache partition image (default is temporary file)
-cache-size <size> cache partition size in MBs
-no-cache disable the cache partition
-nocache same as -no-cache
-sdcard <file> SD card image (default <system>/sdcard.img
-snapstorage <file> file that contains all state snapshots (default <datadir>/snapshots.img)
-no-snapstorage do not mount a snapshot storage file (this disables all snapshot functionality)
-snapshot <name> name of snapshot within storage file for auto-start and auto-save (default 'default-boot')
-no-snapshot perform a full boot and do not do not auto-save, but qemu vmload and vmsave operate on snapstorage
-no-snapshot-save do not auto-save to snapshot on exit: abandon changed state
-no-snapshot-load do not auto-start from snapshot: perform a full boot
-snapshot-list show a list of available snapshots
-no-snapshot-update-time do not do try to correct snapshot time on restore
-wipe-data reset the user data image (copy it from initdata)
-avd <name> use a specific android virtual device
-skindir <dir> search skins in <dir> (default <system>/skins)
-skin <name> select a given skin
-no-skin don't use any emulator skin
-noskin same as -no-skin
-dynamic-skin dynamically construct a skin of given size, requires -skin WxH option
-memory <size> physical RAM size in MBs
-netspeed <speed> maximum network download/upload speeds
-netdelay <delay> network latency emulation
-netfast disable network shaping
-trace <name> enable code profiling (F9 to start)
-show-kernel display kernel messages
-shell enable root shell on current terminal
-no-jni disable JNI checks in the Dalvik runtime
-nojni same as -no-jni
-logcat <tags> enable logcat output with given tags
-no-audio disable audio support
-noaudio same as -no-audio
-audio <backend> use specific audio backend
-raw-keys disable Unicode keyboard reverse-mapping
-radio <device> redirect radio modem interface to character device
-port <port> TCP port that will be used for the console
-ports <consoleport>,<adbport> TCP ports used for the console and adb bridge
-onion <image> use overlay PNG image over screen
-onion-alpha <%age> specify onion-skin translucency
-onion-rotation 0|1|2|3 specify onion-skin rotation
-scale <scale> scale emulator window
-dpi-device <dpi> specify device's resolution in dpi (default 165)
-http-proxy <proxy> make TCP connections through a HTTP/HTTPS proxy
-timezone <timezone> use this timezone instead of the host's default
-dns-server <servers> use this DNS server(s) in the emulated system
-cpu-delay <cpudelay> throttle CPU emulation
-no-boot-anim disable animation for faster boot
-no-window disable graphical window display
-version display emulator version number
-report-console <socket> report console port to remote socket
-gps <device> redirect NMEA GPS to character device
-keyset <name> specify keyset file name
-shell-serial <device> specific character device for root shell
-tcpdump <file> capture network packets to file
-bootchart <timeout> enable bootcharting
-charmap <file> use specific key character map
-prop <name>=<value> set system property on boot
-shared-net-id <number> join the shared network, using IP address 10.1.2.<number>
-nand-limits <nlimits> enforce NAND/Flash read/write thresholds
-memcheck <flags> enable memory access checking
-gpu <mode> set hardware OpenGLES emulation mode
-camera-back <mode> set emulation mode for a camera facing back
-camera-front <mode> set emulation mode for a camera facing front
-webcam-list lists web cameras available for emulation
-screen <mode> set emulated screen mode
-force-32bit always use 32-bit emulator
-qemu args... pass arguments to qemu
-qemu -h display qemu help
-verbose same as '-debug-init'
-debug <tags> enable/disable debug messages
-debug-<tag> enable specific debug messages
-debug-no-<tag> disable specific debug messages
-help print this help
-help-<option> print option-specific help
-help-disk-images about disk images
-help-keys supported key bindings
-help-debug-tags debug tags for -debug <tags>
-help-char-devices character <device> specification
-help-environment environment variables
-help-keyset-file key bindings configuration file
-help-virtual-device virtual device management
-help-sdk-images about disk images when using the SDK
-help-build-images about disk images when building Android
-help-all prints all help content
2) Then, open a terminal (ctrl+alt+T) and type the following command in order to start you freshly created emulator with a bigger /system partition so we can push the su & busybox binaries :
Code:
emulator -avd yourNewAvdName -partition-size 256 -no-snapshot-load
Wait for the emulator to boot.
3) Now, cd to the directory where you put the binaries and the apk you downloaded in the prerequisities, and issue the following comands in your terminal :
Code:
adb shell mount -o rw,remount -t yaffs2 /dev/block/mtdblock0 /system
adb push su /system/xbin/su
adb push busybox /system/xbin/busybox
adb install Superuser.apk
adb shell
chmod 06755 /system/xbin/su
chmod 06755 /system/xbin/busybox
4) Enjoy your Rooted emulator
However, you might need to go through these steps every time you start this emulator, to avoid this hassle, here's a script containing those commands : rootavd.sh
Simply put it where you put the binaries, cd to this location and enter the following command to execute it :
Code:
bash rootavd.sh
...since many thanked you apparently it worked to many but why didn't it to me?
{
"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"
}
Why's this so? I've tried many similar guides, and it makes sense for this to work but it always shows the above (permision denied) and there's absolutely no other way to test applications that require root, for better or worse :/
Obviously I've followed the step it's not that it is hard to do so gave the right permissions but still no root?
Sth's on with the chmod commands?
Thanks for the guide and attention...
PS: It probably doesn't work in JellyBean'd AVD? :/
Stevethegreat said:
...since many thanked you apparently it worked to many but why didn't it to me?
Why's this so? I've tried many similar guides, and it makes sense for this to work but it always shows the above (permision denied) and there's absolutely no other way to test applications that require root, for better or worse :/
Obviously I've followed the step it's not that it is hard to do so gave the right permissions but still no root?
Sth's on with the chmod commands?
Thanks for the guide and attention...
PS: It probably doesn't work in JellyBean'd AVD? :/
Click to expand...
Click to collapse
Yeah, I believe it's been patched in jellybean.
However, you can use Jar of Beans, which is a community-built pre-rooted jb emulator.
Sadly it seems to be windows only. I'll post a guide if I manage to run it on linux through WINE
I know this is a little old of a post but i wanted to point out that i noticed a lot of people (when i was searching for a solution) having a hard time trying to get,
emulator -avd youravdhere -partition-size 256 -no-snapshot-load, to work correctly or not popup at all.
After a little research i noticed that you should add
./emulator to the first part instead of just "emulator"
hope this helps anyone. (credits goes to another person on another site i take no credit just spreading the knowledge)
kamakazidreamer said:
I know this is a little old of a post but i wanted to point out that i noticed a lot of people (when i was searching for a solution) having a hard time trying to get,
emulator -avd youravdhere -partition-size 256 -no-snapshot-load, to work correctly or not popup at all.
After a little research i noticed that you should add
./emulator to the first part instead of just "emulator"
hope this helps anyone. (credits goes to another person on another site i take no credit just spreading the knowledge)
Click to expand...
Click to collapse
You don't necessarily need that. As far as I know the only situation in which you might need this is on a Linux system. (Not sure about Mac)
And even in this case it depends. You can also add the tools directory to your PATH variable. Then you won't need it.
So not all people will need this but some definitely will. So thanks for that.
nikwen said:
You don't necessarily need that. As far as I know the only situation in which you might need this is on a Linux system. (Not sure about Mac)
And even in this case it depends. You can also add the tools directory to your PATH variable. Then you won't need it.
So not all people will need this but some definitely will. So thanks for that.
Click to expand...
Click to collapse
guess i should have pointed out i was using xubuntu to do all this haha.
Hello
Can you redownload files for rooting emulator?
I downloaded files from another source, but it doesn't work with it.
kolia2221 said:
Hello
Can you redownload files for rooting emulator?
I downloaded files from another source, but it doesn't work with it.
Click to expand...
Click to collapse
Can anyone help me?
Android L
Will this work on an Android L avd
i have nand backup generated from galaxy s2 . can i restore this backup on rooted avd s2
or virtual machine??
akhilnarang said:
Will this work on an Android L avd
Click to expand...
Click to collapse
I've had no luck so far, followed the guide but SuperSU tells me that "su is not present" and that "he cannot install it".
Anyone succeded in rooting a 5.0 AVD?
I am trying to get xposed framework going in remix os to get xprivacy. I am running remix os in virtualbox and I am having trouble getting adb set up. Remix os is similar to android x86 so has anyone been able to get xposed working in either remix os or android x86 marshmallow?

Categories

Resources