Related
I have been helping out with rooting HTC Aria's over in IRC in the #liberatedAria channel for a while now. A lot of people have problems with drivers on Windows. The easiest solution for them to do this has been to download an Ubuntu LiveCD and use it to root their phone, however many people know nothing about Linux at all and feel daunted by this.
I have created a customized Ubuntu LiveCD that has a script that downloads the Unrevoked Teams reflash, untars it, and runs it as root to root HTC's phones that are supported by the tool (HTC Evo, Hero, Aria, Desire, and Incredible). It also has the Android SDK included and added to the path so it is accessible from a terminal. Everything can be done without a single change to the computer you are doing it on.
Download the iso image here:
MD5: 9a34c343e8f610e66674af9384334bf6
ubuntu-10.04-desktop-i386-HTCROOT.iso Primary
ubuntu-10.04-desktop-i386-HTCROOT.iso FileFactory.com
Burn the iso to a cd (This can be done with any cd burning software, imgburn found here is free)
[Optional]
If you do not have a CD drive, you can create a bootable flash drive by using the tool found here:Pendrive Linux
Put the CD into your computer cd/dvd drive and reboot your computer.
You must make your computer boot from CD, there are many different ways to do this depending on what computer you have, most recent computers have this enabled by default. Here is a guide that may help if you can't get this to work:Enable Boot from CD
Once it boots from the cd it will show a small picture of a keyboard and a person, do not press anything here and it will come to a window that will allow you to select your language.
Select your language and click "Try Ubuntu 10.04 LTS". This will boot up to a standard Ubuntu livecd desktop.
On your phone click menu, settings, applications, development, usb debugging
On the computer click "Places" on the top menubar and click "Home Folder". This will open a file explorer window, in that window is a script called "reflash.sh".
Double click reflash.sh. A window will pop up asking you what to do with this file, click "Run in Terminal". This will go get from the internet the current version of Unrevoked recovery installer from unrevoked.com/recovery, unzip/tar it, and run it as root.
Once it is complete you will be looking at the unrevoked3 screen and you should follow the prompts on screen.
You will then follow the prompts on the screen to plug in your phone, from the notification pane in android select charge only.
unrevoked3 will reboot your phone twice and leave you in ClockworkMod Recovery. On the computer at the bottom of the window it will say "Done".
Close the window, if you do not need to do anything further you can shut down the machine and be back in windows with nothing changed on your windows system.
Congratulations, your phone is now rooted and has ClockworkMod recovery installed.
There are other guides to setup of sideloading for the aria as well as how to load roms. You can do these using this live cd as well, this is a full ubuntu 10.04 livecd with only games and open office removed, and the unrevoked3 installer and the android sdk installed, it is already in the path and you can use adb commands from the terminal without having to switch directories(however it can be found in /opt/android-sdk-linux_86).
I would like to thank The Unrevoked team for making such a nice tool, and website that made this possible. I would like to that the guys in IRC on Freenode.net channels #liberatedAria and #koush for everything I've learned recently as well as all the great work they have done. Thanks also to Attn1 for making some nice roms for the HTC Aria and gave me the idea to create this. Thanks to Downer3d for the torrent mirror. Thanks to Neolobster for the new faster mirror.
Allowing Non-Market Apps using this cd on the stock ARIA rom:
Click Applications in the upper left corner.
Go to Accessories, click Terminal. This will put in you a terminal in the default users home folder. Because ADB(and android sdk) are in the path you do not need to change any directories. Start the phone in CLockworkmod with data mounted from the partitions menu and plug the phone into the computer.
Code:
sudo su
adb pull /data/data/com.android.providers.settings/databases/settings.db settings.db
echo "update secure set value = 1 where name = 'install_non_market_apps';"|sqlite3 ./settings.db
adb push settings.db /data/data/com.android.providers.settings/databases/settings.db
adb reboot
What this does:
Switch user to root.
ADB pulls the file that contains the setting to allow non market apps down to the machine from the phone.
The next line runs a sql update of the field install_non_market_apps in table 'secure' and sets the value to 1 (on).
ADB then pushes the file back to the phone in its original location.
You then use ADB to reboot the phone to enable it.
Thats awesome!! If I didnt already go through all the trouble of doing it on my Windows box I would definitely try your live CD. I already have 10.04 installed on my laptop and I never really thought of trying it on there. I wonder if it would have been easier....oh well. Thanks again. Im sure there are plenty of people out there that will find this very useful.
Much easier. And yes, this IS awesome. Great job, Shad0wf0x. This kicks ass.
This is a fantastic idea, I had a ton of trouble rooting my Aria on Win7 x64 and downloading and using Ubuntu 10.04 eventually proved to be much easier. If your iso works as advertised I can see this possibly being the most pain-free solution for annoyed Windows rooters.
Sent from my HTC Liberty using XDA App
This works wonderfully for rooting and sideloading apps (the only issue there was figuring out I needed the root account and permissions). As painless as a dentist trip.
If I was to install Ubuntu from that LiveCD, would it still have the Android SDK on it or would I need to reinstall it? I like not having to cd to it.
the android sdk is installed on the livecd and in the path, you'll have it every time you boot up, the part the script downloads will be gone on a second boot(unrevoked.com's recovery installer)
Great job!
Do u think that u could add some other HTC devices, in the future?
Awesome, thanks!
matteios said:
Great job!
Do u think that u could add some other HTC devices, in the future?
Click to expand...
Click to collapse
The devices supported are the devices supported by the unrevoked3 tool, I am not part of their team, just trying to help out some windows users who have driver problems.
Virtual image?
Has anyone created a virtual image of s full Android dev system? That would sure be handy!
jmdearras said:
Has anyone created a virtual image of s full Android dev system? That would sure be handy!
Click to expand...
Click to collapse
not sure if this is what you're looking for, but it'll help.
http://forum.xda-developers.com/showthread.php?t=701816
Problem with reflash.sh tool
I followed all the steps, till the final step, and it said failed to flash recovery image and my phone only booted up once. Am I doing something wrong?
I am currently running.
Version 2.2 updated OTA last week Aug 3rd
Kernel version - 2.6.32.15
build #: 3.26.651.6
software: 3.26.651.6
PRI version: 1.40_003
jbwfg said:
I followed all the steps, till the final step, and it said failed to flash recovery image and my phone only booted up once. Am I doing something wrong?
I am currently running.
Version 2.2 updated OTA last week Aug 3rd
Kernel version - 2.6.32.15
build #: 3.26.651.6
software: 3.26.651.6
PRI version: 1.40_003
Click to expand...
Click to collapse
it says in your signature you have 2.2 updated OTA, that must mean you have an evo, and those aren't supported by the unrevoked tool when running 2.2.
awesome shortcut for rooting phones, however I followed the steps and it is saying that the hero is not supported at this time? Did i do something wrong, I'm running 2.27.651.5
I've burned the the iso file to a cd but I'm not able to get the boot-up to work correctly..or to come up at all, when re-booting windows.
@lcw
When you boot, you will need to hit your bios and select your CD drive as a boot device. Then enjoy the ride - easy as falling off a bike.
I cannot get my dell d600 or d630 to boot. The CD spins but I get the message "No bootable device".
I verified that the ubunto_*HTCROOT.iso file 641,942 kb is the only file on the CD.
Can someone please help.
pinkpanther2000 said:
I cannot get my dell d600 or d630 to boot. The CD spins but I get the message "No bootable device".
I verified that the ubunto_*HTCROOT.iso file 641,942 kb is the only file on the CD.
Can someone please help.
Click to expand...
Click to collapse
You're not supposed to burn the ISO file onto a disc as a file. You're supposed to burn the contents of the ISO to a disc.
Sent from my HTC Liberty using XDA App
I attempted to boot from the CD, I get the person/keyboard screen then i get the Ubuntu screen, then my computer goes black, any solutions?
This is the BEST way to root your Aria. Big props to everyone that helped create it. You guys are the best.
EDIT: I can't post to XDA due to the fact that i just signed up for an account, but look at fards' copy of my post to see how to install Ubuntu on your Dell Streak
Here's Pats Post on modaco;
although it would be nicer to keep development discussion to just one thread, the more constructive input the better
Hello All,
I'm attempting to natively port Ubuntu and/or Debian to the Streak. With it being such a powerful device there really is no reason it SHOULDN'T be running a “desktop” operating system. However, implementing his is quite a difficult task, so if any and everyone's help would be very much appreciated.
In the mean time, this is my first guide on how to get ubuntu running piggyback on the Dell Streak. After quite a while (and numerous different trials), I have found that this is the easiest way to get Ubuntu Mobile up and running fast. All commands can be done through either ADB shell or the terminal emulator on the phone.
This was *NOT* done entirely by me, but is a culmination of the effort of lots of people in the android community. I just modified it so that it would work on the Streak.
**This Installation DOES NOT install Linux natively, and as such is should not be destructive to your Android system, however i take absolutely no responsibility for anything that happens and you do this COMPLETELY at your own risk**
Here is how to do it:
1) Root your phone. There are plenty of guides on how to do it, so find one and get root access on your phone.
**YOUR PHONE MUST BE ROOTED. THIS WILL NOT WORK WITHOUT IT.**
2) Download Ubuntu Mobile Bundle: http://uploading.com/files/bbm6b311/ubuntu.zip/
This contains an image of the filesystem as well as other necessary scripts to get it working.
2) Busybox - Install Titanium Backup from Android Market - if you press the "Problems" button it will install Busybox on your phone for you (Feel free to uninstall Titanium after this is done). This is the fastest and most pain free way to install busybox on the streak that i know of for now (the other ways of doing this ARE NOT fun...)
3) On your SD card's root directory, create a folder called ubuntu and extract all files in the ubuntu mobile bundle there.
4) Replace the bootubuntu executeable file in the ubuntu directory with mine, found here http://www.mediafire.com/?fi011w4fbmymw3y
5) Unmount phone from computer. ADB and Android Terminal will not work if the phone is mounted.
5) Download a terminal from the Android Market - I used Jack Palevich's Android Terminal Emulator (android market search: terminal) but anything similar should work the same
CODE
Code:
su
cd /sdcard/ubuntu
sh ubuntu.sh
6) Ignore any errors thrown up by ubuntu.sh. From this point, all that is needed to boot ubuntu is just to enter this:
CODE
Code:
bootubuntu
To start ubuntu from now on, this is all you need to do.
You should now have ubuntu working on your laptop, and while it DOES connect to your phone's internet sources, it DOES NOT yet have a graphical interface.
Here is how to add one:
1) Update the system with the following commands in ubuntu:
CODE
Code:
apt-get update
apt-get upgrade
The first one updates the package lists, the second one downloads updates to the system itself.
2) Install TightVNC in ubuntu:
CODE
Code:
apt-get install tightvncserver
3) Configure TightVNC:
CODE
Code:
export USER=root
vncserver -geometry 800x480
For security purposes, it is recommended that you assign a password to your VNC server when asked.
4) Download Android VNC Viewer from the market
5) Configure Android VNC Viewer:
Change the port to 5901 and type in your password that you entered before.
Other Problems
There appears to be a bug with the X window server sometimes refusing to connect to VNC. DO NOT change any settings on Android VNC Viewer, instead open a terminal and run the folloring command:
CODE
Code:
rm -R /tmp/.X11-unix
What Does Not Work – Will Try To Fix
Keyboard from Android VNC Viewer
Shutdown – Does Nothing
Reboot
Log Out
Native Install
I hope you guys enjoy this, and I can't wait to get your feedback.
- Pat
Click to expand...
Click to collapse
there was a thread about this but it wasnt work on me. now i am downloading and i will inform you again
what is the address for vnc ?
OMG! Could that be any slower on the download?
EDIT:
That sounded totally ungrateful - sorry!
Thank you very much for this
yeah works fine without problems.
it is better from g1 but not as well as a netbook. so only experimental use i think
I connected to the loopback 127.0.0.1 on 5901 and it worked - haven't seen how to connect to it remotely though
Edit:
Reading is fundamental - I can connect to it form another machine
now to fix the keyboard issue
in terminal emulator there is a note : localhost:1 vnc could work properly so i connect with only port and password.
is it possible to install jolicloud since its an ubuntu based system?
Newbie questions, sorry....
Before to try this port, just some maybe stupid questions for you:
- Still working the phone function?
- Is it easy to go back to standard or Steve Streaks Roms?
- Are there lack of drivers for bluetooth, gps, audio, wifi, etc?
Thanks.
No your missing the point here, this isn't an OS separate to android. Think of this as an app it runs on top of the android system. Also this is very experimental most features would be limited and no ubuntu can't be used as an smartphone os -No phone...
beginner said:
Before to try this port, just some maybe stupid questions for you:
- Still working the phone function?
- Is it easy to go back to standard or Steve Streaks Roms?
- Are there lack of drivers for bluetooth, gps, audio, wifi, etc?
Thanks.
Click to expand...
Click to collapse
1) Ubuntu does not replace android, and the UI only runs in a VNC server, so you can switch back and forth between ubuntu and the phone app (or angry birds?)
2) I installed mine on top of DJ Steve's 1.8.1 rom... It's not native, so it only runs on top of android instead of replacing it
3) Haven't tried audio yet, but it should work (let me know how it goes)... internet connectivity works and provided you have an internet connection enabled in android you can use tools like APT or Firefox in ubuntu... only problem is keyboard is a bit wonky...
For those who had trouble figuring out how to set up the VNC, here is a picture of my VNC configuration on my phone. If you find out the phone's IP address you should even be able to VNC into it from your computer (if your on the same wifi network)
Also, openoffice.org
- pat
Is anyone actively attempting to get Ubuntu running native?
audio not working
keyboard not working
also lots of lags.
ear0wax said:
Is anyone actively attempting to get Ubuntu running native?
Click to expand...
Click to collapse
Yes, i'm looking into it, but it's quite an uphill battle in order to get it working. I'll let everyone know when we make some progress.
www.cepdukkani.net said:
audio not working
keyboard not working
also lots of lags.
Click to expand...
Click to collapse
cause you are running 2 operating systems at the same time
But seriously, if ubuntu can run native (no android in the background) then the lag would be gone, and (if set up right) audio and keyboard would work.
- pat
could i recieve phone and uses sms?
Getting error
Hi all after passing command for booting ubuntu I get a error chroot can't find /bin/bash folder or directory missing
Sent from my Dell Streak using XDA Premium App
www.cepdukkani.net said:
audio not working
Click to expand...
Click to collapse
Im wondering if I install a rdp server instead of vnc if I can get remote audio working.
Ill post with whatever results i get once I'm done waiting 2 hours for the ubuntu image to download.
As for lag. I had a n900 running @600mhz and was doing a chroot into ubuntu and it ran fine, but it used xpyher not vnc. Is there any embedded X servers for android yet? (I highly doubt it)
data requirement for updating GUI pkg of Ubuntu
Can any body tell me size of the data required to update to gui ......as i m not using wi -fi i hv to stick on gsm data usage which is limited in my plan
Very cool!
I had lots of trouble rooting my 2.2.2, but finally got it done by running Gingerbreak twice in a row on a cleanly re-started Streak.
Thanks for a fun gig!
I have the idea that Just as the Ubuntu hacks for android work, we could use androidVNC to connect and view the webtop from the phone without HDMI or the dock, using the phones screen.
Another thing is many of us are using SystemR89's ubuntu hack, with Gnome or LXDE so then all we need is to have tightVNCserver installed as well in the Ubuntu eviroment. Do the steps provided in the above site androlinux.com and trigger that Ubuntu Session to start and then connect on loopback should work.
As I recall ubuntu.sh sets up the soft links or Binds. I don't recall what Booubuntu does but it appears to chroot you to the Ubuntu enviroment for install of the rest of the packages.
I don't think we need to mess with those, they have been done by SystemR89's WebtopMOD. We just need to Chroot to the Ubuntu.disk and give the command "export USER=root" and "vncserver -geometry 1024x800" to start the VNC server Then connect via AndroidVNC.
You'll note that our Phone already has a ubuntu.sh on the root directory. Evidence that moto basically copied the work??? IDK.
I'm looking for some ideas or help from someone who knows ubuntu better then me on how to do this.
I'll hack at it a bit and see if I can get anywhere.
I doubt too many people will find this useful, maybe I'm wrong though. If it would be helpful to you let me know, it will add to my drive to figure it out.
First of all please notice, that this is not my own development project, it is just a port of the guide for HTC G1 from http://pdaclub.pl/forum/htc-dream/%28how-to%29-instalacja-debiana-%28na-g1%29/ for Xperia X8.
Please be aware, that this solution has been only tested with one Xperia X8 device running Floyo 0.30 (thanks to Racht for this great ROM !). I cannot guarantee that it will work on every other custom ROM as well as on the stock Xperia X8 ROM's.
Please also notice, that instructions in this tutorial in some cases can brick Your phone. I'm not responsible for any damage to the software or hardware caused by this tutorial. You can follow the instructions from this guide but only at Your own responsibility!
Please also notice, that I'm not an Android Developer. I'm just a user with some knowledge about Unix, so don't blame me if this tutorial won't work for You. You can post Your problems and we'll try to solve it together.
OK, I think that's all for the intro .
TABLE OF CONTENTS:
1) The purpose of this guide
2) Requirements
3) Things to prepare
4) Installation
5) Some known bugs
6) Some little tips
1) The purpose of this guide.
This guide reffers to the newbie users who want to run Debian Linux on their Xperia X8. Step by step I'll try to explain how to run Debian simultaneously (at the same time) with Android. To gain that we'll use a program/command chroot (http://en.wikipedia.org/wiki/Chroot) which will allow us to Run Debian in Android as something similiar to "virtual machine" on PC.
You may ask why to run Debian on Android device ?
There are several answers to that question:
a. For testing...
b. ...developing applications in for e.g. C/C++ for ARM platform and try to run them on Android OS.
c. Installing Linux applications (like web servers, WiFi cracking software) and test what is working and what isn't.
d. For fun
For those who are asking what Debian actually is - please refer to the page http://en.wikipedia.org/wiki/Debian.
2) Requirements.
Before continuing check if You and Your device meet the following requirements:
a. ROOTED Xperia X8 device (I recomend to have Floyo 0.30 by Racht ROM installed, because it was tested on this ROM. I don't know if it'll work on different ROM's.)
b. At least 800MB space free on Your SD Card
c. Access to PC computer
d. Basic knowledge about Windows command line and Linux shell
e. About 1 hour of free time to set up everything
3) Things to prepare.
a. Download one of the following packages:
http://rapidshare.com/files/327504536/debian750.rar
Click to expand...
Click to collapse
or
http://rapidshare.com/files/327491605/debian1.5.rar
Click to expand...
Click to collapse
These are the packages containing Debian drives image as well as all other files needed to install Debian on Android. The only difference is that the first one is 750MB and the second is 1,5GB. The second one is for bigger SD Cards, you'll get more free space in Your "virtual machine" after running it.
b. ADB Shell (can be found in Android SDK in folder platform-tools\ - http://developer.android.com/sdk/index.html)
c. SSHDroid from Market (only if You're planning to connect to Your Debian via SSH)
d. PuTTY for Windows (only if You're planning to connect to Your Debian via SSH - http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)
e. ConnectBot or Terminal Emulator from Market (it's a good terminal application)
The bold items are necessary.
4) Installation.
PERFORM A FULL SYSTEM BACKUP USING XRECOVERY BEFORE PROCEEDING ANY FURTHER !
Now the best part !
There are several ways to install Debian:
1) Some are using Terminal Emulator application (preinstalled in Floyo 0.30)
2) Others are connecting with phone via SSH
3) But some are using adb shell command from Android SDK and that's the way we'll do this, because I know there are some differences between using adb shell and other ways. I tested it with adb and it is working so I think it is the right choice.
First, unpack the *.rar file of Your choice (debian750.rar or debian1.5.rar) to Your hard disk on a PC.
Replace file bootdeb which can be found in Debian folder after unpacking the archive with the one from bootdeb.zip file attached to this post. You need to do this, because the bootdeb file which is in the archive won't let You boot Debian correctly. It'll only cause Xperia X8 to restart after few seconds since execution. The file in bootdeb.zip has been corrected by me and it allows to boot Debian without any (known ) bugs.
Copy the Debian folder from the archive directly to the SD Card (also known as a root directory of Your SD Card). You should have the following directory tree on Your SD Card visible in Xperia X8:
/sdcard/Debian/bootdeb
/sdcard/Debian/debian.img
/sdcard/Debian/installer.sh
etc...
Click to expand...
Click to collapse
Enable USB Debugging in Xperia X8. To do this go to Settings->Applications->For programmers and check USB Debigging.
Connect Your phone via USB and don't mount the SD Card (just like You want to charge the phone via USB).
On Your PC click Start->Run, type cmd and cd to the directory where You installed Android SDK, then cd to platform-tools and execute command adb shell. After execution You should see a # symbol in the command line window like on a below screenshot:
{
"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 execute the following commands in ADB ahell on PC:
su
cd /
sh /sdcard/Debian/installer.sh
Click to expand...
Click to collapse
And You shoul get something like this:
VERSION 2.1
Custom Debian Bootloader is now installed! Quick huh?
etc...
Click to expand...
Click to collapse
And it's done ! Debian Linux has been installed.
Type in ADB Shell command
exit
Click to expand...
Click to collapse
As many times (I guess 3) until command line window disappears. Disconnect Your phone from PC and unplug the USB cable.
Now let's try to run Debian - on Xperia X8 run ConnectBot or Terminal Emulator and type:
su
sh /sdcard/Debian/bootdeb
Click to expand...
Click to collapse
Remember to allow the terminal application to run as a superuser.
After a while You should see a screen similar to the below screen shot:
I removed the lines (blured section) which You won't see after first boot. I have them, because I installed Apache Web Server and it is starting at the logon .
As You can see we are logged into Debian Linux !
Now, execute the following command:
/scripts/onetime.sh
Click to expand...
Click to collapse
It's necessary only after first logon. It'll let You to set up root password (only for Debian, not for Android) and do some more stuff (actually I didn't even check what this script is doing - forgive me).
And it's done... Now You are on Your own with Debian installed ! Go, play around, because it is a fully functional operating system for Your demand .
What about the performance ?
My Debian is still working since one day in the background (minimize the Terminal Emulator window after logging in) and I haven't suffer any problems with the low performance yet. I even set up an icewm window manager and VNC Server to be able to log in to my machine via VNC client and see the desktop and it isn't too laggy . But that's only a stupid future. The most power we get because of the access to Linux Shell (the command line which let us to use Linux applications on our Xperia X8).
4) Some known bugs.
For Your own safety read this short section.
1) Better don't try to unmount the SD Card from Xperia X8 (for e.g. when mounting the phone to the PC) when Debian is running. I didn't try this yet, but the bootdeb script is creating something called loop device in the Android system which should be properly unmounted. If this device will wanish due to some user activity the phone may not boot correctly any more.
2) When You finish playing with Debian always use the exit command to safely unmount the loop filesystem. After exit Your phone needs to be rebooted, better don't try to override this setting.
3) If somehow You will loose connection with Debian in Terminal Emulator You always can run:
sh /sdcard/Debian/bootdeb
Click to expand...
Click to collapse
And log in again. You'll just receive several errors on the boot screen, because the script will try to mount already mounted file system.
5) Some little tips.
1) After first logon execute the following commands:
cd /etc/apt
nano sources.list
Click to expand...
Click to collapse
And in the opened text editor add these lines (do not overwrite the file contents):
deb http://ftp.debian.org/debian lenny main contrib non-free
deb-src http://ftp.debian.org/debian lenny main contrib non-free
Click to expand...
Click to collapse
After this execute the command:
apt-get update
Click to expand...
Click to collapse
It will update Your applications repository available for Debian.
2) Running Apache Web Server:
Execute command:
apt-get install apache2
Click to expand...
Click to collapse
To install Apache Web Server. When the installer asks You if You want to proceed with the installation type Y.
After installation run command:
/etc/init.d/apache start
Click to expand...
Click to collapse
And then You can try to connect to Your phone on port 80 using HTTP browser and see if there's a message It works! .
3) Uploading files to Your Debian "virtual machine":
Install SSHDroid from Android Market.
Download program WinSCP and connect to Your device on port 22 using root as a user name and admin as a password.
After connection open location /data/local/mnt and You'll see Your Debian file system.
I think that's all for now.
I hope this guide will help "newbie" users to run Debian on their phones.
If You have any more questions or problems please let me know.
Regards,
Chris.
you should post this on development!
At the moment it's a little fiddling. Start phone -> connect bot -> su -> sh /sdcard/Debian/bootdeb -> from there I should be able automat anything
How can I use some kind of autostart?
Why I lose connection in ConnectBot when I disable mobile internet connection? Doesn't make sense to me. Mobile internet has nothing do do with local shell, or?
kingsize623 said:
you should post this on development!
Click to expand...
Click to collapse
He should. This is GREAT!
hello,
if i typ
su
sh /sdcard/Debian/bootdeb
and then come some text
and my phone does reboot.
what am i doing wrong?
kingsize623 said:
hello,
if i typ
su
sh /sdcard/Debian/bootdeb
and then come some text
and my phone does reboot.
what am i doing wrong?
Click to expand...
Click to collapse
I also had this problem. But try using ConnectBot - this is known for me to work.
kingsize623 said:
hello,
if i typ
su
sh /sdcard/Debian/bootdeb
and then come some text
and my phone does reboot.
what am i doing wrong?
Click to expand...
Click to collapse
Hi kingsize623!
As I said at the begining this script is highly ROM-dependent. It can run on some ROM's, but on the others there will be many problems.
I suggest You to edit file /sdcard/Debian/bootdeb in some text editor (I suggest Notepad++), locate the line:
busybox mount -o loop,noatime $kit/debian.img $mnt
Click to expand...
Click to collapse
(it should be line 47), and change it to:
mount -o loop,noatime $kit/debian.img $mnt
Click to expand...
Click to collapse
This should help. If it won't, there can be a lack of some module in Android on Your device which will prevent the script from running (no loop support for e.g.).
If You'll face some further problems let me know.
bagers said:
I also had this problem. But try using ConnectBot - this is known for me to work.
Click to expand...
Click to collapse
i've treid
and make a printscr
http://imageshack.us/photo/my-images/233/screenshot1315842466117.png/
http://imageshack.us/photo/my-images/18/screenshot1315842470958.png/
bagers said:
At the moment it's a little fiddling. Start phone -> connect bot -> su -> sh /sdcard/Debian/bootdeb -> from there I should be able automat anything
How can I use some kind of autostart?
Why I lose connection in ConnectBot when I disable mobile internet connection? Doesn't make sense to me. Mobile internet has nothing do do with local shell, or?
He should. This is GREAT!
Click to expand...
Click to collapse
Hi bagers!
Thanks for the comments on this post !
First of all, You're right, maybe I should post it on Dev section, but I didn't use XDA-DEVELOPERS much in the past, so I was afraid I may get kicked because of such information from "newbie user" in Dev section. This section (in my understanding) is for Android guru's, and I'm not one of them .
As for the autostart: the only thing You can automate in my opinion is the part where You type:
su
sh /sdcard/Debian/bootdeb
Click to expand...
Click to collapse
The only thing You need to do is to write a simple script which will look like the following:
su
cd /sdcard/Debian/
sh bootdeb
Click to expand...
Click to collapse
or
su
sh /sdcard/Debian/bootdeb
Click to expand...
Click to collapse
Name it for e.g. startdeb and place it in /system/bin for e.g. (I think bash will look for files in this directory by default, but I'm not sure about that).
Now, everytime when You'll try to run Debian, just open ConnectBot and type startdeb - this should automatically make You su and execute the startup script.
As for the dissconnections issue:
As far as I can see this problem exists on Floyo 0.30 as well. I'm not yet sure why it acts like that.
kingsize623 said:
i've treid
and make a printscr
http://imageshack.us/photo/my-images/233/screenshot1315842466117.png/
http://imageshack.us/photo/my-images/18/screenshot1315842470958.png/
Click to expand...
Click to collapse
As I wrote in previous post - try modyfying the startup script.
You also should have Busybox installed (if You don't have it download it from Market).
I installed also sshdroid and connected to the phone from Windows 7 using Putty. But, when I disconnect putty, then I will also see this "Rebooting device to ensure clean takedown.".
Ehrm, I just wanted to disconnect putty, not to shut down debian. Another bug?
Can you disable all this "Rebooting device to ensure clean takedown.", it's really disturbing.
krzysiek_grucha said:
As for the autostart: the only thing You can automate in my opinion is the part where You type:
The only thing You need to do is to write a simple script which will look like the following:
or
Name it for e.g. startdeb and place it in /system/bin for e.g. (I think bash will look for files in this directory by default, but I'm not sure about that).
Now, everytime when You'll try to run Debian, just open ConnectBot and type startdeb - this should automatically make You su and execute the startup script.
Click to expand...
Click to collapse
Okay, I done that and something really strange happened.
I made a files called "sd" in /system/bin with content:
su
sh /sdcard/Debian/bootdeb
Like you said.... But when I type sd in ConnectBot then, debian will start, and then the phone will restart...
But, when I type su and sh /sdcard/Debian/bootdeb, manually in ConnectBot, then debian will start with no error. Strange, huh? Any idea? Bug?
krzysiek_grucha said:
As for the dissconnections issue:
As far as I can see this problem exists on Floyo 0.30 as well. I'm not yet sure why it acts like that.
Click to expand...
Click to collapse
Please add it to the bug list. Maybe later someone will have an insight.
bagers said:
I installed also sshdroid and connected to the phone from Windows 7 using Putty. But, when I disconnect putty, then I will also see this "Rebooting device to ensure clean takedown.".
Ehrm, I just wanted to disconnect putty, not to shut down debian. Another bug?
Can you disable all this "Rebooting device to ensure clean takedown.", it's really disturbing.
Okay, I done that and something really strange happened.
I made a files called "sd" in /system/bin with content:
su
sh /sdcard/Debian/bootdeb
Like you said.... But when I type sd in ConnectBot then, debian will start, and then the phone will restart...
But, when I type su and sh /sdcard/Debian/bootdeb, manually in ConnectBot, then debian will start with no error. Strange, huh? Any idea? Bug?
Please add it to the bug list. Maybe later someone will have an insight.
Click to expand...
Click to collapse
Hi again !
There are lots of bugs as I can see . But... If You're connecting from Putty don't be surprised that the phone is rebooting after closing Putty window. It works like that:
1)You're running the sh /sdcard/debian/bootdeb from Putty - Putty is the only terminal for the script.
2)When You dissconnect suddenly the only terminal which was preventing the bootdeb script from running wanishes so the script continues working (so it's jumping to reboot section). That's not a bug, it was written to work like that.
I don't suggest You to disable the rebooting - it helps You to have a clean unmount. If You override this, strange things may happen when You'll boot for the next time, but it is not sure for 100% - check it for Yourself .
As for the not working script file - I thought that su command won't work in the script. That's why the bootdeb script doesn't already have it included.
If You want to know about some more bugs:
Don't try to set up OpenSSH on Debian - it won't work.
Don't run FTP server like proftpd or vsftp - port 21 is forwarded correctly, but port 20 is not, and that's why FTP is not working.
There are many bugs, but if You'll follow simple rules You won't have any problem with using Debian.
Can you think of some workarround in order to use Windows+Putty+Disconnect+Nophonereboot?
I really like to use that phone now as a server, because the power consumption is very very little (compared to a PC server). All time connected to charger (~3,5 W) would only coast me around 5 or 10 Eur per year. l So I plan to run Debian on the phone at all times and from time to time to administer my "server" using Putty and WinSCP.
But of course, at some time I'll have to quit Putty (and WinSCP)...
The problem is, that SSHDroid runs "outside" of Debian. The ssh would need to run "inside" Debian. You already told me not to try OpenSSH. Do you know any alternative to OpenSSH or an alternative protocol? Connect and remote administer by anything else, vnc server maybe (vnc for console?), but not ssh.
bagers said:
Can you think of some workarround in order to use Windows+Putty+Disconnect+Nophonereboot?
I really like to use that phone now as a server, because the power consumption is very very little (compared to a PC server). All time connected to charger (~3,5 W) would only coast me around 5 or 10 Eur per year. l So I plan to run Debian on the phone at all times and from time to time to administer my "server" using Putty and WinSCP.
But of course, at some time I'll have to quit Putty (and WinSCP)...
The problem is, that SSHDroid runs "outside" of Debian. The ssh would need to run "inside" Debian. You already told me not to try OpenSSH. Do you know any alternative to OpenSSH or an alternative protocol? Connect and remote administer by anything else, vnc server maybe (vnc for console?), but not ssh.
Click to expand...
Click to collapse
The workarround is very simple. As You said SSHDroid works on the "outside", but I'm telling You that it can work in the "inside" of Android as well. I tried to use X8 as a web server so this solution has been tested.
1) Run SSHDroid
2) Connect using ConnectBot to [email protected] and run:
su
sh /sdcard/Debian/bootdeb
Click to expand...
Click to collapse
You'll have Debian on the phone already started.
3) Connect to Your phone via Putty with Debian started in ConnectBot and type:
chroot /data/local/mnt /bin/bash
Click to expand...
Click to collapse
It will connect to the virtual Debian on Your phone and will let You to administer it, but on the second side it won't even touch bootdeb script which is annoying You so much, so the phone won't restart after logging off from Putty, because the "main" session will be still held by ConnectBot on the phone.
The only thing You need to remember is to safely kill Debian when You'll want to restart the phone using exit command in ConnectBot (which will cause the phone to restart as usual).
As I know, You'll very soon tell me, that there's a bug - don't let the Android device to go to "sleep" (turn off the screen), because the performance of the "server" will get very low because of lower CPU speed in sleep mode.
Hope it'll help
krzysiek_grucha said:
As I wrote in previous post - try modyfying the startup script.
You also should have Busybox installed (if You don't have it download it from Market).
Click to expand...
Click to collapse
I've treid it twice and i've bricked my phone twice
And now i can't instal gingerdx (i was on gingerdx)
So is there any way to deinstal the whole debian.
And trey it argain on froyo(i've learnt something!)
kingsize623 said:
I've treid it twice and i've bricked my phone twice
And now i can't instal gingerdx (i was on gingerdx)
So is there any way to deinstal the whole debian.
And trey it argain on froyo(i've learnt something!)
Click to expand...
Click to collapse
Hi !
I guess there's some problem with GingerDX.
To Deinstall Debian You just need to delete the Debian folder from /sdcard/ . Nothing has been installed into /system/.
krzysiek_grucha said:
Hi !
I guess there's some problem with GingerDX.
To Deinstall Debian You just need to delete the Debian folder from /sdcard/ . Nothing has been installed into /system/.
Click to expand...
Click to collapse
And You shoul get something like this:
VERSION 2. Custom Debian Bootloader is now installed!
Quick huh? etc... And it's done.
Click to expand...
Click to collapse
He instals a custom boatloader right?
Mayby it doesn't work with gingerdx becouse he restarts after the gingerdx logo but before the cyanogen mod 7 logo, i don't know how to name it
Btw, sorry for my bad english
kingsize623 said:
He instals a custom boatloader right?
Mayby it doesn't work with gingerdx becouse he restarts after the gingerdx logo but before the cyanogen mod 7 logo, i don't know how to name it
Btw, sorry for my bad english
Click to expand...
Click to collapse
No - if I am not completely wrong - the real bootloader of the x8 will not be changed in any way.
The debian bootloader is only needed to start debian inside android.
kingsize623 said:
I've treid it twice and i've bricked my phone twice
And now i can't instal gingerdx (i was on gingerdx)
So is there any way to deinstal the whole debian.
And trey it argain on froyo(i've learnt something!)
Click to expand...
Click to collapse
Don't panic, as long as you did not mess with the bootloader, you can always rescue your device.
I also bricked my device once, could not even get to xrecovery. Read this post.
http://forum.xda-developers.com/showpost.php?p=13341271&postcount=2
No worry, with PC Companion and repair (you'll loose all data) you will be able to recover your phone.
My phone has GPRS and WiFi enabeld at the same time.
Is it possible to tell the a few selected debian processes "use only GPRS, no WiFi"?
bagers said:
No - if I am not completely wrong - the real bootloader of the x8 will not be changed in any way.
The debian bootloader is only needed to start debian inside android.
Don't panic, as long as you did not mess with the bootloader, you can always rescue your device.
I also bricked my device once, could not even get to xrecovery. Read this post.
http://forum.xda-developers.com/showpost.php?p=13341271&postcount=2
No worry, with PC Companion and repair (you'll loose all data) you will be able to recover your phone.
Click to expand...
Click to collapse
so you can't HARD brick your device?
o, and thanx for your help
kingsize623 said:
so you can't HARD brick your device?
Click to expand...
Click to collapse
I also asked that myself....
http://forum.xda-developers.com/showthread.php?t=1239274
Afaik - from my knowledge from reading and searching the forums alot - a permanent (must send to se to repair) brick is only possible if you want to use the new cracked bootloader and mess up something.
Hi Folks
heimdall.7z - 334.63 KB
I thought I'd continue in the same vein as my previous post and add to the Pi's arsenal of android related tools , So here is the Open Source Samsung Flashing utility Heimdall.
There's nothing special about this build, I just cloned the git sources and compiled them on Rapbian. Easy as, well , Pi I suppose
you'll have to install either libusb-1.0-0 or libusb-1.0-0-dev using apt-get.
[ EDIT: ] Do It yourself!
Just for completeness here's the steps if you want to build it yourself using Raspbian
Open a terminal window
Code:
sudo apt-get install git-core libusb-1.0-0-dev
cd ~/
git clone git://github.com/Benjamin-Dobell/Heimdall.git
cd Heimdall/libpit
./configure
make
cd ../heimdall
./configure
make
sudo make install
cd ~/
rm -rf Heimdall
The configure -> make -> make install workflow is used by a large number of linux tools this make compiling most things for the Pi on the Pi as simple as the steps above. Sometimes finding where the official source code is for a package is the hardest step.
trevd said:
Hi Folks
[ heimdall.7z ]
I thought I'd continue in the same vein as my previous post and add to the Pi's arsenal of android related tools , So here is the Open Source Samsung Flashing utility Heimdall.
There's nothing special about this build, I just cloned the git sources and compiled them on Rapbian. Easy as, well , Pi I suppose
you'll have to install either libusb-1.0-0 or libusb-1.0-0-dev using apt-get.
I've not got a samsung device to hand at the minute but I'm going to give it a test later on
Click to expand...
Click to collapse
Awesome work! Having both ADB and now Heimdall working definitely opens up some really interesting possibilities for the RPi.
Sent from my SCH-I535 using xda premium
I love you trevd!
Sent from my GT-S5830 using Tapatalk 2
did you try it on any phones?
Hi,
I'm glad to see someone else considering using a Pi for this. Did you try using it on any phones?
I don't have a linux or windows machine handy, just a mac (which has some problems with heimdall), so I thought I'd try the Pi for rooting an old Epic 4G (a Galaxy S phone), in order to upgrade to CM10. Unfortunately I ran into two problems:
1) When I plug the phone in (not just the USB cable), the Pi would sometimes completely restart. This didn't happen every time. I think this may be due to power issues (perhaps it was trying to charge, and the Pi couldn't produce the right current), I didn't try a powered hub (I don't have one). But it also could be a software bug crashing the system. Debugging crashes like this is a little beyond my expertise, though if I get some time and can reproduce it I might try some more.
2) I was only able to get heimdall to detect the phone once. Other times it said "no device detected". When it was detected, I flashed clockwork recovery mod (or at least I typed the commands to do so), and it seemed to work (as far as I could tell), but when I started in recovery mode it was a stock recovery. Perhaps it didn't finish? I'm not sure what happened, since heimdall treated it as a success and the phone restarted.
Anyway, I thought I'd give my experience in case anyone else saw either of these problems too (or knew the answers). And I'd be interested to hear if someone had no problems.
Steve
sdeneefe said:
Hi,
I'm glad to see someone else considering using a Pi for this. Did you try using it on any phones?
I don't have a linux or windows machine handy, just a mac (which has some problems with heimdall), so I thought I'd try the Pi for rooting an old Epic 4G (a Galaxy S phone), in order to upgrade to CM10. Unfortunately I ran into two problems:
1) When I plug the phone in (not just the USB cable), the Pi would sometimes completely restart. This didn't happen every time. I think this may be due to power issues (perhaps it was trying to charge, and the Pi couldn't produce the right current), I didn't try a powered hub (I don't have one). But it also could be a software bug crashing the system. Debugging crashes like this is a little beyond my expertise, though if I get some time and can reproduce it I might try some more.
2) I was only able to get heimdall to detect the phone once. Other times it said "no device detected". When it was detected, I flashed clockwork recovery mod (or at least I typed the commands to do so), and it seemed to work (as far as I could tell), but when I started in recovery mode it was a stock recovery. Perhaps it didn't finish? I'm not sure what happened, since heimdall treated it as a success and the phone restarted.
Anyway, I thought I'd give my experience in case anyone else saw either of these problems too (or knew the answers). And I'd be interested to hear if someone had no problems.
Steve
Click to expand...
Click to collapse
I haven't tried this tool at all as I use my pi as a htpc, but i can tell you from experience setting that up that power can be a major issue. I didn't have reboots, but rather all my usb devices would quit working, even powered ones(and the only thing drawing power was a keyboard dongle) and my power supply is supposed to be rated for 2A.
I picked up a 20$ 7 port hub that works almost flawlessly (the 7th port doesn't agree with it). I would recommend picking one up.
Just my 2 cents
Also you don't mention what os you are running but try checking /var/log if it happens again. This is where logs generally get generated
Sent from my DROID3 using xda premium
sdeneefe said:
I'm glad to see someone else considering using a Pi for this. Did you try using it on any phones?
I don't have a linux or windows machine handy, just a mac (which has some problems with heimdall), so I thought I'd try the Pi for rooting an old Epic 4G (a Galaxy S phone), in order to upgrade to CM10. Unfortunately I ran into two problems:
Click to expand...
Click to collapse
Hi sdeneefe,
I never did get round to have a go myself .....but it's top of my new years resolutions list I've got a galaxy S lying around the place to have a go with so I'll let you know my results.
sdeneefe said:
1) When I plug the phone in (not just the USB cable), the Pi would sometimes completely restart. This didn't happen every time. I think this may be due to power issues (perhaps it was trying to charge, and the Pi couldn't produce the right current), I didn't try a powered hub (I don't have one). But it also could be a software bug crashing the system. Debugging crashes like this is a little beyond my expertise, though if I get some time and can reproduce it I might try some more.
2) I was only able to get heimdall to detect the phone once. Other times it said "no device detected". When it was detected, I flashed clockwork recovery mod (or at least I typed the commands to do so), and it seemed to work (as far as I could tell), but when I started in recovery mode it was a stock recovery. Perhaps it didn't finish? I'm not sure what happened, since heimdall treated it as a success and the phone restarted.
Anyway, I thought I'd give my experience in case anyone else saw either of these problems too (or knew the answers). And I'd be interested to hear if someone had no problems.
Click to expand...
Click to collapse
Endoroid said:
I haven't tried this tool at all as I use my pi as a htpc, but i can tell you from experience setting that up that power can be a major issue. I didn't have reboots, but rather all my usb devices would quit working, even powered ones(and the only thing drawing power was a keyboard dongle) and my power supply is supposed to be rated for 2A.
Click to expand...
Click to collapse
Thanks for sharing sdeneefe, I'm no electronics expert, but a educated stab in the dark and given the fun I had myself finding a stable setup combination I'd be tempted to agree with Endoroid, power does seem to be in the hands of the gods. Personally I could not find a charging plug the would supply enough power to keep the HDMI output stable on my monitor.....every other display I've tried works fine apart from the intended main one, partly to do with the monitor I think because it also has trouble with MHL connections. I eventually solved my power woe's by using my computer's USB as the power source.
EDIT: Initial Tests seems OK although I had to run with sudo because I've not configured udev but device is detected and I've pulled and printed the pit. This is both through a powered hub and jacked straight into the device I'll try flash a rom in a bit...... because doesn't everyone spend NYE flashing roms and posting on xda,
wanted to drop this Linux 64 Heimdall 1.4 RC1 built from today's source debian package somewhere
http://d-h.st/2Vj
trevd said:
Hi Folks
heimdall.7z - 334.63 KB
I thought I'd continue in the same vein as my previous post and add to the Pi's arsenal of android related tools , So here is the Open Source Samsung Flashing utility Heimdall.
There's nothing special about this build, I just cloned the git sources and compiled them on Rapbian. Easy as, well , Pi I suppose
you'll have to install either libusb-1.0-0 or libusb-1.0-0-dev using apt-get.
[ EDIT: ] Do It yourself!
Just for completeness here's the steps if you want to build it yourself using Raspbian
Open a terminal window
Code:
sudo apt-get install git-core libusb-1.0-0-dev
cd ~/
git clone git://github.com/Benjamin-Dobell/Heimdall.git
cd Heimdall/libpit
./configure
make
cd ../heimdall
./configure
make
sudo make install
cd ~/
rm -rf Heimdall
The configure -> make -> make install workflow is used by a large number of linux tools this make compiling most things for the Pi on the Pi as simple as the steps above. Sometimes finding where the official source code is for a package is the hardest step.
Click to expand...
Click to collapse
packaged in deb format.... Please let me know if this works.. i had to guess the arch code.
If this doesn't work, it's the arch, and I can repackage properly. I'm working on getting CASUAL support up on the Raspi.
AdamOutler said:
packaged in deb format.... Please let me know if this works.. i had to guess the arch code.
If this doesn't work, it's the arch, and I can repackage properly. I'm working on getting CASUAL support up on the Raspi.
Click to expand...
Click to collapse
No Dice on the arch, My Real Pi was doing not playing nice... but the emulators fails with this
Code:
package architecture (armv6l) does not match system (armhf)
trevd said:
No Dice on the arch, My Real Pi was doing not playing nice... but the emulators fails with this
Code:
package architecture (armv6l) does not match system (armhf)
Click to expand...
Click to collapse
I kinda figured... do this:
Code:
dpkg -i --force-architecture /path/to/heimdal.deb
I will fix the arch later tonight.
AdamOutler said:
I kinda figured... do this:
Code:
dpkg -i --force-architecture /path/to/heimdal.deb
I will fix the arch later tonight.
Click to expand...
Click to collapse
Code:
heimdall depends on libc6 (>= 2.4).
heimdall depends on libgcc1 (>= 1:4.1.1).
heimdall depends on libstdc++6 (>= 4.1.1).
heimdall depends on libusb-1.0-0 (>= 2:1.0.8).
Got some dependency version issues, Is that something you want to/can deal with automatically? or just tell the user to upgrade! I'm not overly familiar with what debs and dpkg etc are fully capable of.... I tend to let apt and aptitude do all the heavy lifting
Could always build a static one I suppose. :good:
I just placed this version of Heimdall into my CASUAL repository. Here is a proper arch Heimdall deb file packaged with the binary from the OP.
https://android-casual.googlecode.com/svn/trunk/GUI/src/CASUAL/resources/heimdall/heimdall_armv6.deb
Code:
dpkg -i heimdall_armv6.deb
This will always be up-to-date with CASUAL's capabilities because this is my source repository, so it's a good link. Let me know if there's any problems.
Hello, this stopped being usable time ago i think. I'm also having big problems compiling heimdall on current 3.12.35+/3.18.3+|4+ kernel Raspbian on rasPi B+, seems to be a libc dependancy problem. Could you please provide a new link instead of android-casual googlecode site? Thank you very much
anyone succeeded in flashing a Pi4 with "Heimdall", the flashing-software ?