[TUTORIAL] Run Ubuntu 10.10 on Nexus One - Nexus One Android Development

Run Ubuntu 10.10 on Nexus One
--------------------------------
Background:
In June 2010, XDA zedomax got Ubuntu 9.04 running on Nexus One, tutorial is available at this thread:
http://forum.xda-developers.com/showthread.php?t=718952
I continued studying the tutorial and worked out a way to make Ubuntu 9.04 running better, smoother and cause less error, here's my post:
http://forum.xda-developers.com/showthread.php?t=815532
Recently HTC_Linux team has released version 0.3 of their Ubuntu image, compare to the original guide provided by zedomax, the v0.3 release is based on the latest Ubuntu 10.10. So I thought about making this tutorial to guide you to run Ubuntu 10.10 on your Nexus One.
--------------------------------
What benefits will you get from running Ubuntu 10.10 on Nexus One (at least):
1. Fully functional Linux terminal, with all standard Linux command line utilities
2. Fully functional desktop browser Firefox 3.6.13
3. Ability to compile and run native Linux applications
4. Bunch of graphical Internet and utility applications as shown in the screenshots
--------------------------------
Credit:
Thanks to the great XDA-developers community.
Thanks to Zedomax for providing the original tutorial of running Ubuntu on Nexus One.
Thanks to HTC_Linux team for creating the optimised Ubuntu 10.10 image file.
--------------------------------
Now the tutorial starts.
Preparation:
1. A micro SD card at least 4GB in capacity, 8GB/16GB is recommended
2. (Optional) If you're using Froyo App2SD, move all your applications which are on SD card back to Internal Storage, or you may also uninstall all applications that are on SD card. If you fail to do so, you won't be able to enter Ubuntu. However I've discovered a way that you won't need to move or uninstall apps on SD card, will discuss later.
3. Basic Linux shell knowledge
Then:
1. Get Ubuntu 10.10 from this post (file name: hd2-ubuntu_0.3.zip): http://forum.xda-developers.com/showthread.php?t=889433
2. Download attached scripts.zip
3. On your computer, make a directory on a partition that has more than 3.5GB available space, name the directory “ubuntu” (case-sensitive!)
4. Extract three scripts (b, e, u) from scripts.zip to the directory ubuntu
5. Once you finish download hd2-ubuntu_0.3.zip, extract linux/rootfs.ext2 to the directory ubuntu
6. In your ubuntu directory, rename rootfs.ext2 into ubuntu.img (case-sensitive!)
7. Now verify that you have the following files in your computer's ubuntu directory: b, e, u, ubuntu.img
8. Copy the whole ubuntu directory onto your SD card, put the SD card back to your phone
9. Power up your Nexus One
Now we have some script work:
1. Run a terminal application from your phone (e.g. Android Terminal, Better Terminal Emulator)
2. type “cd /sdcard/ubuntu” (enter)
3. type “sh u” (enter)
4. If you see “Type 'b' to boot Ubuntu”, then you're almost there!
5. Type “b” (enter)
6. If you see “[email protected]:/#” (like shown in screenshot) Congratulations! Now you're running Ubuntu 10.10 on your Nexus One!
Whenever you want to enter Ubuntu again, simply type “b” (enter) in your Android Terminal.
To properly exit from Ubuntu, you must type “exit” from Ubuntu terminal.
If your Android terminal application gets killed by Android system (i.e. you lost Ubuntu terminal), you need to go back to Android terminal, type “e” (enter), that will properly unmount Ubuntu.
Very often that you can get “loop device busy” error when exiting from Ubuntu, in that case, type “e” (enter) multiple times (it's harmless to run “e” script multiple times, don't worry). If still you get “loop device busy” error, don't worry, ignore it then.
--------------------------------
(Optional) If you would prefer working with GUI, now let's do some extra script work:
1. Install “android-vnc-viewer” from Market (freeware)
2. Enter Ubuntu terminal
3. Make sure that you have network connection (Wi-fi recommended)
4. type “apt-get update” (enter), and wait till it finishes
5. type “apt-get install tightvncserver” (enter) and answer “y” to the question
6. After installed tightvncserver, type “cd /bin” (enter)
7. Type the following commands (all are case-sensitive!):
“cat > x” (enter)
“rm -r -f /tmp” (enter)
“mkdir /tmp” (enter)
“chmod 777 /tmp” (enter)
“export USER=root” (enter)
“export XKL_XMODMAP_DISABLE=1” (enter)
“vncserver -geometry 1024x800” (enter)
(enter)
(press and hold trackball and click D on keyboard)
“chmod 777 x” (enter)
8. The above procedure makes a script named “x”, whenever you want to start GUI, you need to type “x” (enter).
Notice that the first time (only the first time) you run “x” script you'll be prompt to enter a password for VNC connection, then you'll be asked whether to create a “view-only” password, since it is not necessary, answer “n” to the question.
9. Start “android-vnc-viewer”, create a new connection with the following settings:
Nickname: (anything you like to identify the connection)
Password: the VNC connection password that you created when ran the “x”script
Address: localhost
Port: 5901
Color format: 24-bit color (4 bpp)
Click “Connect” button, and in about a minute, you'll see your Ubuntu 10.10 desktop!
10. We still need to create one final script called “s”, now go back to your Ubuntu terminal and type:
“cd /bin” (enter)
“cat > s” (enter)
“export USER=root” (enter)
“vncserver -kill :1” (enter)
“vncserver -kill :2” (enter)
“sudo reboot” (enter)
“sudo halt” (enter)
(enter)
(press and hold trackball and click “D” on keyboard)
“chmod 777 s” (enter)
11. If you have GUI running, you * MUST * type “s” (enter) to stop VNC server before you exit from Ubuntu terminal!
In case that your Android kills your Android Terminal application and you still have VNC server running, do the following steps:
a. Start Android Terminal
b. type “b” (enter) to bring back Ubuntu terminal
c. type “s” (enter) to stop VNC server
d. type “exit” (enter) to exit from Ubuntu terminal
Fail to do so you will have problem with VNC connection next time you use it.
--------------------------------
What are not working in Ubuntu:
1. Sound
2. Some applications may not run (I guess, due to Android memory management mechanism)
--------------------------------
A little trick to access SD card from your Ubuntu:
1. Install “SwiFTP” from Market (freeware)
2. Set up FTP server using SwiFTP
3. In Ubuntu, “Places → Connect to Server” then:
Service type: FTP (with login)
Server: localhost
Port: (port number specified in SwiFTP, default is 2121)
Folder: /
User Name: (user name specified in SwiFTP)
Then press “Connect” and enter your password specified in SwiFTP. Now feel free to access your phone's file system!
--------------------------------
How to bring up Ubuntu if you have applications installed on SD card using Froyo App2SD:
1. Make sure that your Android Terminal application is installed in Internal Storage
2. Put a shortcut to Android Terminal application on your home screen
3. Make sure you have got ubuntu directory and all its contents on SD card
4. Reboot your phone (stay sharp, these following steps require perfect timing!)
5. Once you enter lock screen, Immediately unlock it.
6. Enter Android Terminal and type “b” as quick as possible, do not press Enter yet!
7. Pay close attention to your notification bar, as soon as the “SD: Checking for errors” notification disappears (the little SD icon disappears), Immediately press Enter.
8. Now you should be in Ubuntu terminal, wait 1-2 minutes before you do anything else.
9. After 1-2 minutes, you may do whatever you want.
With some applications installed on SD card, you must do the procedure above to bring up Ubuntu terminal each time you reboot your phone.
--------------------------------
That's it! Thank you for reading this tutorial. Please feel free to make any comment or ask any question!

Awesome. I'll be trying this out as soon as I get a larger SD card. It would be great if you could upload a .zip with all of the scripts, downloads, etc. already placed in one folder; that would make it a lot easier.

Thx U for this Tutorial....it was really helpful...Can u fix the adobe flash thing...i know that sound will not work but just wondering if it can be installed.

yumcax said:
Awesome. I'll be trying this out as soon as I get a larger SD card. It would be great if you could upload a .zip with all of the scripts, downloads, etc. already placed in one folder; that would make it a lot easier.
Click to expand...
Click to collapse
Actually I thought about the same but here my uploading speed is 15kb/s maximum, so I'm not sure if I'm gonna upload a 600mb file...
reubenjack said:
Thx U for this Tutorial....it was really helpful...Can u fix the adobe flash thing...i know that sound will not work but just wondering if it can be installed.
Click to expand...
Click to collapse
Adobe Flash has no support for ARM architecture.. sorry, there's no way to install Adobe Flash plugin for Firefox on Ubuntu ARM.

OMG Im abt to die. Transfering the folder to my sd card takes 20 min. I really nid to get a better memory card (higher speed). SIGH..

Works nice on my N1 running MIUI 12.24..
BTW I have a question, if I wipe my phone(data,cache).. Would I need to perform any steps then?

Keshav_CoolDude said:
Works nice on my N1 running MIUI 12.24..
BTW I have a question, if I wipe my phone(data,cache).. Would I need to perform any steps then?
Click to expand...
Click to collapse
If you re-installed a rom (i.e. /system partition gets rewritten)
You'll need to execute the following commands on Android Terminal:
cd /sdcard/ubuntu
sh u
then type "b" to enter Ubuntu terminal
Happy New Year!

Hey,
In the OP you mention that some apps will not run because of the memory management? Is there a size threshold that this is start to be seen at or is it totally random on which things run/don't?
Thanks

houzuoguo said:
If you re-installed a rom (i.e. /system partition gets rewritten)
You'll need to execute the following commands on Android Terminal:
cd /sdcard/ubuntu
sh u
then type "b" to enter Ubuntu terminal
Happy New Year!
Click to expand...
Click to collapse
Okay.. Thanks for the guide..
Happy New Year..

Chopes said:
Hey,
In the OP you mention that some apps will not run because of the memory management? Is there a size threshold that this is start to be seen at or is it totally random on which things run/don't?
Thanks
Click to expand...
Click to collapse
I'm not very familiar with Linux kernel so sorry I can't give an accurate explanation
According to my observation, many applications in the Ubuntu 10.10 can successfully start (program title appears in task bar) but immediately they turn off by themselves.
And it seems to me that all those applications share a same characteristic: they're relatively bigger than others. For example, Terminal runs, Dictionary runs, Firefox runs, but Ubuntu Software Centre won't run.
So my guess is ... Android system would not allocate too much memory for an application in Ubuntu, thus they get killed before they could start.

I'll give this a one thumb up, because I got it working, got to play around a bit... it looks really nice... but I did a reboot of my phone after shutting it down properly, and now everytime I try to launch ubuntu again, I get a bunch of errors.
I've tried just about everything.... restoring to my nand backup I did before trying this, deleting the files off the sdcard and on my system relating to this, tried to set everything back up... but I still get errors and I can't get past them, even with trying "e" in the term.
FWIW, I'm on CM 6.1.1 and I do use DTa2sd with plenty of space left on all partitions. Here's a pastebin of my errors : http://pastebin.com/adCQ62iF

tehgeekguy said:
I'll give this a one thumb up, because I got it working, got to play around a bit... it looks really nice... but I did a reboot of my phone after shutting it down properly, and now everytime I try to launch ubuntu again, I get a bunch of errors.
I've tried just about everything.... restoring to my nand backup I did before trying this, deleting the files off the sdcard and on my system relating to this, tried to set everything back up... but I still get errors and I can't get past them, even with trying "e" in the term.
FWIW, I'm on CM 6.1.1 and I do use DTa2sd with plenty of space left on all partitions. Here's a pastebin of my errors : http://pastebin.com/adCQ62iF
Click to expand...
Click to collapse
Happy New Year!
Could you please go to Settings-> Application Settings-> Manage Applications-> on SD card and confirm there is no application on SD card?
Also please make sure you execute "b" after "Checking for Errors" notification disappears.

Running this distro does that mean i can use firesheep on my n1?

Awesome! What kind of battery life are you seeing using Ubuntu? Any apps in particular you've enjoyed having on your N1?

rossonza said:
Running this distro does that mean i can use firesheep on my n1?
Click to expand...
Click to collapse
According to my study Firesheep would require WinPcap to work, WinPcap is only available for Windows so unfortunately you can't use it.
Deathwish238 said:
Awesome! What kind of battery life are you seeing using Ubuntu? Any apps in particular you've enjoyed having on your N1?
Click to expand...
Click to collapse
I notice battery drains 2-3 mAh more when Ubuntu is idle, when actually using Ubuntu I notice 30-40mAh higher current draw. So actually it's not much

hey thanx houzuoguo,
working great on my n1....!!
is there any solution for the sound to run...??

I cant seem to get any of the "cat >" letters to work, it just hangs in the terminal.

houzuoguo said:
According to my study Firesheep would require WinPcap to work, WinPcap is only available for Windows so unfortunately you can't use it.
I notice battery drains 2-3 mAh more when Ubuntu is idle, when actually using Ubuntu I notice 30-40mAh higher current draw. So actually it's not much
Click to expand...
Click to collapse
Firesheep works in Ubuntu, you just have to compile it yourself.
1) Download the required dependencies:
Code:
sudo apt-get install autoconf libtool libpcap-dev libboost-all-dev libhal-dev xulrunner-1.9.2-dev
2) Install git:
Code:
sudo apt-get install git
3) Download the Firesheep source:
Code:
git clone https://github.com/codebutler/firesheep.git
4) Change to the Firesheep directory:
Code:
cd firesheep
5) Initialize it:
Code:
git submodule update --init
6) Compile it:
Code:
./autogen.sh && make
7) You'll find the file in the build directory.

hotweiss said:
Firesheep works in Ubuntu, you just have to compile it yourself.
1) Download the required dependencies:
Code:
sudo apt-get install autoconf libtool libpcap-dev libboost-all-dev libhal-dev xulrunner-1.9.2-dev
2) Install git:
Code:
sudo apt-get install git
3) Download the Firesheep source:
Code:
git clone https://github.com/codebutler/firesheep.git
4) Change to the Firesheep directory:
Code:
cd firesheep
5) Initialize it:
Code:
git submodule update --init
6) Compile it:
Code:
./autogen.sh && make
7) You'll find the file in the build directory.
Click to expand...
Click to collapse
Not to threadjack or anything of the sort but:
Does the above method work on getting firesheep installed on a n1 running ubuntu or is this just the way to install it assuming your running on normal hardware?
Second question, what is the resulting file?
Thanks,

Which terminal application are you using, and did you type the "cat >" on screen keyboard or copy&paste?

Related

windows 7 root NC

this from rad131304 not me, thank you
Windows 7 Sideload Instructions
Hope this helps some people - I tried to be very step-by-step about it.
Again, thank you Pokey9000, the guys and gals from the IRC channel, and everybody else for all of your hard work! 99.9% of this is an aggregation of what is already in this thread; some of it comes from nookdevs also.
You will need the following applications on your Windows 7 computer:
- cygwin (www dot cygwin dot com)
- Android Debug Bridge (ADB) - this comes with the android SDK
- Android USB Drivers - this comes with the android SDK
-- (WOQ) stands for without quotes, it means that I am giving you something between quotes to copy and paste.
-- if you see <some_odd_name> inside quotes, it means you MUST replace this with something from your specific OS instance (e.g. a drive letter, or something)
1. make sure your NC is disconnected from you computer
2. make sure your SD card is mounted on your computer (readable/browsable in explorer)
3. Install cygwin - you only need the base install AFAICT (YMMV), don't worry about the options for now.
4. download nooter at http //www dot mediafire dot com/?hugt8uxcfffpdvg
5. extract the contents to a folder in your cygwin install (standard install path is c:\cygwin)
6. Go to: Start, type in (WOQ) "compmgmt.msc" - this may require UAC elevation
7. Select "Disk Management" under storage
8. note the drive letter of the SD card and the disk number
9. Go To: Start > All Programs > Cygwin > Cygwin Bash Shell
10. At the prompt, type (WOQ): "mount //./<f>: /dev/sd<c>"
Where <f> is your drive letter, and
<c> is the letter you would get if you zero-indexed the disk number into the alphabet (i.e. 0 = a, 1 = b) **
11. press enter - there should be no output
12. at the prompt, type (WOQ): "dd if=<path_to_nooter_from_cygwin_install_folder>/nooter_sdcard_40MB.img of=/dev/sd<c>"
It will sit at this for a few minutes seeming to do nothing, be patient; you should get a response eventually that looks like:
80326+0 records in
80326+0 records out
41126912 bytes (41 MB) copied, 174.525 s, 236 kB/s
13. remove the sd card from the computer and plug it into the NC
14. power down the NC (hold power button for 15 seconds)
15. connect the NC to the computer
16. Wait for a "Composite Device" to be recognized by Windows and fail to install drivers
17. Wait for 15 seconds after the recognition
18. power down the NC
19. remove SD card ***
20. Find your android_winusb.inf file - this is located in your android-sdk install directory in the usb_driver folder. (NOTE: if you installed this in the program files folder, you will need to UAC elevate your editor to edit this file)
21. Paste the following lines into the file below both occurrences of the line ";Moto Sholes" after the ADBInterface definitions:
;B & N Nook Color
%SingleAdbInterface% = USB_Install, USB\VID_2080&PID_0002
%CompositeAdbInterface% = USB_Install, USB\VID_2080&PID_0002&MI_01
22. save the file and close
23. find your adb_usb.ini file - it is usually located in c:\users\<username>\.android\
24. add (WOQ) "0x2080" on its own line
25. power on NC - at this point, the NC should boot normally, but ADB won't be able to recognize it
26. Go To: Start > Devices and Printers
27. Right-click on Nook and select properties
28. Select the hardware tab
29. If you have something that says "Nook" and has a yellow yield sign with a "!", then continue, if not skip to 38
30. Click on "Nook"
31. Select Properties
32. Click Change Settings (may require UAC elevation)
33. Click update driver
34. Select "browse for driver software on your computer"
35. Browse to the android-sdk/usb_driver folder
36. click next
37. You should be done; skip to 47 (I have no idea if this is correct - i pieced it together from somewhere in this as I did not get Nook to appear in the Device Functions List)
38. If you don't have a "Nook" Device Function, click on "USB Mass Storage Device"
39. Select Properties
40. Click Change Settings (may require UAC elevation)
41. Select the Driver Tab
42. Click Uninstall
43. Click OK
44. Disconnect NC
45. Reconnect NC
46. You should be done (this is different from my previous instructions on how to uninstall the NC USB drivers, I have not tested it so YMMV)
47. Go To: start > run > cmd
48. type (WOQ): "cd <path_to_android_sdk>\tools"
49. type (WOQ): "adb.exe kill-server"
You should get something like:
* server not running *
50. type (WOQ): "adb.exe remount"
You should get something like:
* daemon not running. starting it now *
* daemon started successfully *
remount failed: No such file or directory
51. You are done configuring to sideload
From here you should be able to sideload from ADB.
by rad131304
Just to throw it out there...
Does this cause a PERMANENT change to the Color Nook?
Edit: thank you for posting this
I believe it was mentioned in a previous post that if you did a factory reset (power off completely, then hold power, nook button and vol up) that it would reset the Nook back to non rooted factory defaults. Can anyone else confirm this?
HeroHTC said:
Just to throw it out there...
Does this cause a PERMANENT change to the Color Nook?
Edit: thank you for posting this
Click to expand...
Click to collapse
Are these instructions for Win 7 64 or 32 bit?
BTW, how does one go back or to menu without those buttons?
RichTJ99 said:
Are these instructions for Win 7 64 or 32 bit?
BTW, how does one go back or to menu without those buttons?
Click to expand...
Click to collapse
believe this was done on win 64, some buttons are located in or below menu bar, some will depend on launcher.
I also wanted to mention this
http://forum.xda-developers.com/showpost.php?p=9517050&postcount=863
NOTE: I have not even opened my nook box yet, its still sealed but I am getting ready. Just waiting on an email solution.
Do you think a partitioned SD card woul dprevent this from working?
I'm pretty sure my card is partitioned....I read something in the BIG THREAD about departitioning a card.....
I can't get this to work for me and I just thought my card might be the culprit.
Thanks
I cannot find the file listed in step 23. This is the only thing keeping me from root. Also when I plug my nc in, the light on the cord is amber instead of green. It tells me that adb drivers are installed. But it won't show up as a folder in my computer any more. How do I add files without removing the SD card and plugging it into my computer.
Sent from my HERO200 using XDA App
RichTJ99 said:
Are these instructions for Win 7 64 or 32 bit?
BTW, how does one go back or to menu without those buttons?
Click to expand...
Click to collapse
I did this on 32 bit - AFAIK, they don't support cygwin on 64 bit yet (it might run though, but YMMV).
The back and menu buttons are soft-buttons. The nook for some reason hides them by default in a bunch of apps.
sudermatt said:
Do you think a partitioned SD card woul dprevent this from working?
I'm pretty sure my card is partitioned....I read something in the BIG THREAD about departitioning a card.....
I can't get this to work for me and I just thought my card might be the culprit.
Thanks
Click to expand...
Click to collapse
IIRC, somebody said that in the big thread, too.
oakleyrdc said:
I cannot find the file listed in step 23. This is the only thing keeping me from root. Also when I plug my nc in, the light on the cord is amber instead of green. It tells me that adb drivers are installed. But it won't show up as a folder in my computer any more. How do I add files without removing the SD card and plugging it into my computer.
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
It could be hidden (so you'll have to change the hidden files and folders setting), or installed in another user directory (like Admin).
If I run Windows XP, how many of these steps would change? I'm thinking it might need its own thread.
I did mine on Win 64bit using winimage. Everything is working fine.
rad131304 said:
I did this on 32 bit - AFAIK, they don't support cygwin on 64 bit yet (it might run though, but YMMV).
Click to expand...
Click to collapse
XP
cabbieBot said:
If I run Windows XP, how many of these steps would change? I'm thinking it might need its own thread.
Click to expand...
Click to collapse
plus 1 for XP
So once your rooted, do you need to do anything special to install apk files that you download from dropbox? Is superuser ready?
i cant find the android_winusb file in the windows XP version of the android SDK. is there a different one that does the same?
EDIT: it appears the sdk is not split between versions of windows
im going to reinstall the sdk and see maybe if i accidently deleted it at some point
cabbieBot said:
If I run Windows XP, how many of these steps would change? I'm thinking it might need its own thread.
Click to expand...
Click to collapse
Very little changes; the only thing I can tell you off the top of my head is that
C:\users\<username>\.android\
Becomes
C:\documents and settings\<username>\.android\
Also, I don't know where, besides device manager, that you could locate the nook like you do in devices and printers - it may show up in my computer, also in scanners and cameras in the control panel - you can always right click a drive, select properties, select the hardware tab, select the b&n storage device, click properties, select the driver tab and uninstall from there....
HTH
EDIT: To delete the NC through device manager:
start > run > compmgmt.msc
browse to Device Manager
Expand Universal Serial Bus Controllers
Select USB Mass Storage Device (there may be multiple)
Right-Click and select "properties"
select the details tab
in the dropdown, select "Hardware Ids" - if this says "USB\VID_2080&...." then this is the NC
click ok
right Click again and select uninstall
disconnect NC from computer
reconnect NC to computer
NC re-finds all drivers, including ADB
start > run > cmd
cd <android-sdk-dir>\tools
adb.exe remount
Fixed instructions!
that's what I get for writing this crap at 1 in the AM ... I left out two INSANELY important steps at step 11.
SORRY!!!!
Windows 7 Sideload Instructions
Hope this helps some people - I tried to be very step-by-step about it.
Again, thank you Pokey9000, the guys and gals from the IRC channel, and everybody else for all of your hard work! 99.9% of this is an aggregation of what is already in this thread; some of it comes from nookdevs also.
You will need the following applications on your Windows 7 computer:
- cygwin (http://www.cygwin.com)
- Android Debug Bridge (ADB) - this comes with the android SDK
- Android USB Drivers - this comes with the android SDK
-- (WOQ) stands for without quotes, it means that I am giving you something between quotes to copy and paste.
-- if you see <some_odd_name> inside quotes or a code block, it means you MUST replace this with something from your specific OS instance (e.g. a drive letter, or something)
make sure your NC is disconnected from you computer
make sure your SD card is mounted on your computer (readable/browsable in explorer)
Install cygwin - you only need the base install AFAICT (YMMV), don't worry about the options for now.
download nooter at http://www.mediafire.com/?hugt8uxcfffpdvg
extract the contents to a folder in your cygwin install (standard install path is c:\cygwin)
Go to: Start, type in (WOQ) "compmgmt.msc" - this may require UAC elevation
Select "Disk Management" under storage
note the drive letter of the SD card and the disk number
Go To: Start > All Programs > Cygwin > Cygwin Bash Shell
At the prompt, type:
Code:
mount //./<f>: /dev/sd<c>
Where <f> is your drive letter, and
<c> is the letter you would get if you zero-indexed the disk number into the alphabet (i.e. 0 = a, 1 = b) **
press enter - there should be no output
REMOVE SD CARD FROM PC
INSERT SD CARD INTO PC
at the prompt, type:
Code:
dd if=<path_to_nooter_from_cygwin_install_folder>/nooter_sdcard_40MB.img of=/dev/sd<c>
It will sit at this for a few minutes seeming to do nothing, be patient; you should get a response eventually that looks like:
80326+0 records in
80326+0 records out
41126912 bytes (41 MB) copied, 174.525 s, 236 kB/s
Click to expand...
Click to collapse
IF THIS COMPLETES ALMOST IMMEDIATELY, YOU PROBABLY HAVE AN ERROR
remove the sd card from the computer and plug it into the NC
power down the NC (hold power button for 15 seconds)
connect the NC to the computer
Wait for a "Composite Device" to be recognized by Windows and fail to install drivers
Wait for 15 seconds after the recognition
power down the NC
remove SD card ***
Find your android_winusb.inf file - this is located in your android-sdk install directory in the usb_driver folder. (NOTE: if you installed this in the program files folder, you will need to UAC elevate your editor to edit this file)
Paste the following lines into the file below both occurrences of the line ";Moto Sholes" after the ADBInterface definitions:
Code:
;B & N Nook Color
%SingleAdbInterface% = USB_Install, USB\VID_2080&PID_0002
%CompositeAdbInterface% = USB_Install, USB\VID_2080&PID_0002&MI_01
save the file and close
find your adb_usb.ini file - it is usually located in c:\users\<username>\.android\
add (WOQ) "0x2080" on its own line
power on NC - at this point, the NC should boot normally, but ADB won't be able to recognize it
Go To: Start > Devices and Printers
Right-click on Nook and select properties
Select the hardware tab
If you have something that says "Nook" and has a yellow yield sign with a "!", then continue, if not skip to 40
Click on "Nook"
Select Properties
Click Change Settings (may require UAC elevation)
Click update driver
Select "browse for driver software on your computer"
Browse to the android-sdk/usb_driver folder
click next
You should be done; skip to 49 (I have no idea if this is correct - i pieced it together from somewhere in this as I did not get Nook to appear in the Device Functions List)
If you don't have a "Nook" Device Function, click on "USB Mass Storage Device"
Select Properties
Click Change Settings (may require UAC elevation)
Select the Driver Tab
Click Uninstall
Click OK
Disconnect NC
Reconnect NC
You should be done (this is different from my previous instructions on how to uninstall the NC USB drivers, I have not tested it so YMMV)
Go To: start > run > cmd
type:
Code:
cd <path_to_android_sdk>\tools
./adb.exe kill-server
You should get something like:
* server not running *
Click to expand...
Click to collapse
if adb.exe is not in tools (or tools does not exist), try:
Code:
cd <path_to_android_sdk>\platform-tools
./adb.exe kill-server
type:
Code:
./adb.exe remount
You should get something like:
* daemon not running. starting it now *
* daemon started successfully *
remount failed: No such file or directory
Click to expand...
Click to collapse
You are done configuring to sideload
From here you should be able to sideload from ADB.
To sideload an app, simply do the following:
Code:
./adb.exe install <app_name>
Thanks Rad!
im going insane, ive completely updated the SDK but i cant find this damn android_winusb file
When you updated the SDK, did you install the USB drivers also? If you did, that file should be in whatever directory you installed the SDK in under the usb_driver subdirectory.
cabbieBot said:
im going insane, ive completely updated the SDK but i cant find this damn android_winusb file
Click to expand...
Click to collapse
I'm an idiot, I was certain the USB Drivers were installed. Done and done now, sheesh what a waste of time!
now to hunt for adb_usb which is being a pain to find too. Has anyone found adb_usb on XP?
I can see the folder C:\documents and settings\<username>\.android\ but theres two folders in there for AVD and AndroidDesktopNotifier. Maybe if someone can upload the adb_usb file I can just throw it in the folder and cross my fingers?

Create your Linux environment to build YOUR Android

Hello all,
if you are like me, you love to do things by yourself and see how it works. In this thread I'll show you how to create your Linux environment in order to create and compile your own roms - any version (1.5, 2.3, etc etc). I had soooooo many problems to make it work, so here is THE thread
BE CAREFUL : this thread is ONLY to set up the OS. The Android you will compile will not be compatible with your x10 as it needs to be "edited" for our phones. It basically shows you how to get ready
Note : parts 1 and 2 explain how to set up Ubuntu into a virtual machine in Virtualbox. If you don't virtualize Linux, if your Ubuntu is already installed, etc etc you can directly go to 3. It's just here to explain how to install Ubuntu.
This tutorial works of course for any "hard installation" of Ubuntu (I mean not in a Virtual machine) and in any virtualizing software (Virtualbox, VMWare, etc etc). I've dropped the Virtualbox tutorial because the software is free
1. Requirements
2. Set up Ubuntu 64 bit (Virtualbox)
3. Set up Android Source dependencies
4. Set up Android Source
5. Regular use
1. Requirements
A working computer, capable of virtualization (if you don't want to wipe your Windows or your MacOS X !) and with Internet connection
Few Gb on your hard drive (10Gb minimum ! Recomended : 15-30Gb)
As much RAM as possible (Minimum 1024Mb), and as powerful CPU as possible (Core2Solo, Core2Duo, ...)
A bit a time
2. Set up Ubuntu 64 bit
Download and install the latest Oracle VM Virtualbox for Windows
Download latest 64-bit Ubuntu Linux (as .iso package) - you can store the file wherever you want.
(Optional) Download the VirtualBox v4 extension, this will allow you to support improvements like USB2.0... Install : once VirtualBox will be installed, File>Preferences>Extensions>Add... If you get an error (Error 1), try to put the file in a "very simple" location (like C:\) and reinstall.
Once you've set up Virtualbox, run it. Click on "New", then follow the wizard.
Make sure you set the following :
Operating System : Linux
Version : Ubuntu (64 bit)
RAM : 512Mb (you can adjust more, but avoid use lower than 512Mb - I use 2Gb)
Create a new hard drive : set it variable size or fixed sized, but you'll need at last 15Gb to get all the files. To feel confortable, I use 30Gb (variable)
The computer is created, now run it. It will say there's no OS. Click on Devices > CD/DVD > More CD/DVD... Here is you virtual player. Click on Add, and select the Ubuntu .ISO file you downloaded. Then, choose it in the list, and click Choose. Now, you can restart the virtual machine by clicking Machine > Restart.
The computer should restart from the virtual CD, so install it to your virtual hard drive - regular install, same as if you were installing it on a physical HDD.
Once it's installed, do not forget to kick the .iso file from the virtual player for you not to start always on the CD
3. Set up Android Source dependencies
In Ubuntu, do right-click on the upper bar (where are Applications, Shortcuts...), and click Edit Menus. Then, go to System > Administration and tick Software Sources. We need to do this because Sun is highly restrictive on access to Java setup files...
Close that, then click on System > Administration > Software Sources.
Enable all sources, then on the second tab, tick the two Canonical sources (the most important ones, as these sources allow to install Java !)
Close the window and allow to refresh the sources (if you don't, next steps won't work).
Go and read the official Android Source page. That's what we're going to do.
Run a terminal, and copy/paste this : (this is a corrected setup, it should work like a charm -- please tell if it's not)
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java6-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
After setup complete, make sure Java works, by typing
Code:
java
and
Code:
javac
This should return help on both commands. If one of these doesn't work (ie. "command not found"), your environment is not configured properly.
4. Set up Android Source
Create a dir called "bin" in your user dir.
Code:
cd ~
mkdir bin
echo $PATH
Then, type this :
Code:
curl http://android.git.kernel.org/repo >~/bin/repo
chmod a+x ~/bin/repo
Next step is to create a folder where we'll store Android sources we work on. You can place it and name it as you wish, let's call it "android" and place it on the user folder.
Code:
mkdir android
cd android
Then, run this command :
Code:
repo init -u git://android.git.kernel.org/platform/manifest.git
If it returns "command not found", restart Ubuntu !
Enter username and email, although I'm not sure it's useful for our use -custom roms-.
Now, let's get the files ! Type
Code:
repo sync
and wait... Wait... Wait... Lots of commands, of "Resolving deltas", "Receiving", etc etc. It can be very long (depends of your Internet speed), just wait...
Finally, let's register the public key and finalize setup process. Type
Code:
gpg --import
And the cursor will down a line and nothing will appear. Stuck ? Broken ? Woooops ? Not at all ! Program is waiting for you to type the key, which is sooooooo big. So, copy and paste all this :
Code:
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
mQGiBEnnWD4RBACt9/h4v9xnnGDou13y3dvOx6/t43LPPIxeJ8eX9WB+8LLuROSV
lFhpHawsVAcFlmi7f7jdSRF+OvtZL9ShPKdLfwBJMNkU66/TZmPewS4m782ndtw7
8tR1cXb197Ob8kOfQB3A9yk2XZ4ei4ZC3i6wVdqHLRxABdncwu5hOF9KXwCgkxMD
u4PVgChaAJzTYJ1EG+UYBIUEAJmfearb0qRAN7dEoff0FeXsEaUA6U90sEoVks0Z
wNj96SA8BL+a1OoEUUfpMhiHyLuQSftxisJxTh+2QclzDviDyaTrkANjdYY7p2cq
/HMdOY7LJlHaqtXmZxXjjtw5Uc2QG8UY8aziU3IE9nTjSwCXeJnuyvoizl9/I1S5
jU5SA/9WwIps4SC84ielIXiGWEqq6i6/sk4I9q1YemZF2XVVKnmI1F4iCMtNKsR4
MGSa1gA8s4iQbsKNWPgp7M3a51JCVCu6l/8zTpA+uUGapw4tWCp4o0dpIvDPBEa9
b/aF/ygcR8mh5hgUfpF9IpXdknOsbKCvM9lSSfRciETykZc4wrRCVGhlIEFuZHJv
aWQgT3BlbiBTb3VyY2UgUHJvamVjdCA8aW5pdGlhbC1jb250cmlidXRpb25AYW5k
cm9pZC5jb20+iGAEExECACAFAknnWD4CGwMGCwkIBwMCBBUCCAMEFgIDAQIeAQIX
gAAKCRDorT+BmrEOeNr+AJ42Xy6tEW7r3KzrJxnRX8mij9z8tgCdFfQYiHpYngkI
2t09Ed+9Bm4gmEO5Ag0ESedYRBAIAKVW1JcMBWvV/0Bo9WiByJ9WJ5swMN36/vAl
QN4mWRhfzDOk/Rosdb0csAO/l8Kz0gKQPOfObtyYjvI8JMC3rmi+LIvSUT9806Up
hisyEmmHv6U8gUb/xHLIanXGxwhYzjgeuAXVCsv+EvoPIHbY4L/KvP5x+oCJIDbk
C2b1TvVk9PryzmE4BPIQL/NtgR1oLWm/uWR9zRUFtBnE411aMAN3qnAHBBMZzKMX
LWBGWE0znfRrnczI5p49i2YZJAjyX1P2WzmScK49CV82dzLo71MnrF6fj+Udtb5+
OgTg7Cow+8PRaTkJEW5Y2JIZpnRUq0CYxAmHYX79EMKHDSThf/8AAwUIAJPWsB/M
pK+KMs/s3r6nJrnYLTfdZhtmQXimpoDMJg1zxmL8UfNUKiQZ6esoAWtDgpqt7Y7s
KZ8laHRARonte394hidZzM5nb6hQvpPjt2OlPRsyqVxw4c/KsjADtAuKW9/d8phb
N8bTyOJo856qg4oOEzKG9eeF7oaZTYBy33BTL0408sEBxiMior6b8LrZrAhkqDjA
vUXRwm/fFKgpsOysxC6xi553CxBUCH2omNV6Ka1LNMwzSp9ILz8jEGqmUtkBszwo
G1S8fXgE0Lq3cdDM/GJ4QXP/p6LiwNF99faDMTV3+2SAOGvytOX6KjKVzKOSsfJQ
hN0DlsIw8hqJc0WISQQYEQIACQUCSedYRAIbDAAKCRDorT+BmrEOeCUOAJ9qmR0l
EXzeoxcdoafxqf6gZlJZlACgkWF7wi2YLW3Oa+jv2QSTlrx4KLM=
=Wi5D
-----END PGP PUBLIC KEY BLOCK-----
Once pasted, hit CTRL+D, this will make the program to register the key, and will display the key has processed.
Everything is now done, you have all the sources and you are ready to create your own roms. You can edit files simply by double-click, or use any software you want.
If you want to compile, simply run a terminal, go to your folder (remember it is cd android (MS-DOS-like command), where android is the folder you defined above) then type
Code:
make
. After a long time (depends on how much RAM you assigned to the machine, 512Mbits is slow), you will generate IMG files.
5. Regular use
If you want to get the latest source files (ie you have 2.1 files and want 2.2.1 files), simply run a terminal, go to your working folder and type
Code:
repo sync
. This should do the trick (correct me if I'm wrong)
Compiling sources takes hours to process, and you may want to kill the compile or pause it. You can then abuse of these keyboard shortcuts (common to Ubuntu OS) :
Code:
CTRL+C
will kill the process. Use it carefully, as it instantly kills it with no prompt.
Code:
RIGHT CTRL+P
is a Virtualbox command. Il will pause the whole Ubuntu (and also your process), and makes the screen ugly/gray (it just stuck the screen on Virtualbox v4.x). This is helpful when you run a Virtual machine, as you can pause the OS and make your computer to sleep/hibernate (or save an image - do NOT turn off your computer, as it will turn off the Virtual machine also !). Out of sleep, you can type again RIGHT CTRL+P to make the process to continue.
** Please note it might be risky to flash your phone with the stock rom you compiled (I mean with no modification), as this is not intended to work on X10
** Please note this install is for AOSP and NOT for Android SDK (you can install it with ease).
What's the difference ?
Android Open Source Project (AOSP) allows you to get the source code of the Android Operating System, in order to improve/change it, and create your personalized Android operating system
Android SDK allow you only to create and edit apps for Android Operating System.
Please note that compiling takes hours to process ! (3 hours or more)
** For any question, deeper info : please FIRST read official documentation. Easy to use, you'll get all info ! **​
man...did you ever stop?!
THANKS FOR INFO. If you can explain how to make system images for our X10 then we can use the dual boot option to make gingerbread or froyo roms for dual boot using Zhidu chargemon file.
I am not clear on making and android system image for the x10. can we extract a system image from a running rom? that way I could make a system image of black freedom and we can all dualboot it instead of installing it.
rendeiro2005 said:
man...did you ever stop?!
Click to expand...
Click to collapse
Lol I can't stop
@SuperUserMovado : I'd love to know, unfortunately I am like you - I don't know how to do this. I'm gonna get several info there and there and try to do some stuff
Regarding Zd's Dual, please note it is not compatible with his xRecovery, which makes things a bit boring when you want to easily install a custom rom AND benefit of Dual Boot.
Dual boot by the way is an excellent idea, but it has limitations (of course), like no SD card mount and few other things because it run from SD card and not from NAND.
EDIT : here is a good start : http://source.android.com/porting/index.html
I have just started playing with this and have compiled one aosp rom from source. I think it can be extracted from a running rom but I'm not sure how yet. On the other hand it looks like the source is available on the se dev website. I'm having trouble downloading it... not sure yet if its on my end or theirs.
Here's the error if someone could help me out: (Ubuntu 64bit)
Archive: /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip
[/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip or
/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.zip, and cannot find /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.ZIP, period.
Check this site out as well. The whole site is really helpful. I'm in the process of compiling a captivate rom with some slight changes and i hope it works.
Edit: Btw if you get the error repo not found, type this into the command line
code:
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
then close the terminal, reopen another one and it should work
@superusermovado
I'm pretty sure you use unyaffs for the system.img and split_bootimg.ph for the boot.img.
That's how to decompile an update.zip.
From there you recompile as usual. I'm not going to post the instructions because they are all over the net.
Hint: Andy rubins tweet lol
gavriel18 said:
I have just started playing with this and have compiled one aosp rom from source. I think it can be extracted from a running rom but I'm not sure how yet. On the other hand it looks like the source is available on the se dev website. I'm having trouble downloading it... not sure yet if its on my end or theirs.
Here's the error if someone could help me out: (Ubuntu 64bit)
Archive: /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip
[/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
zipinfo: cannot find zipfile directory in one of /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip or
/tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.zip, and cannot find /tmp/X10_X10mini_X10_minipro_X8_2.0.A.0.504.tar.gz-4.zip.ZIP, period.
Check this site out as well. The whole site is really helpful. I'm in the process of compiling a captivate rom with some slight changes and i hope it works.
Edit: Btw if you get the error repo not found, type this into the command line
code:
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
then close the terminal, reopen another one and it should work
Click to expand...
Click to collapse
Thanks for info
About this package, what's the content ?? The easiest way is to download from XDA the generic global rom, it's the same -- with no bug
Perceval from Hyrule said:
Thanks for info
About this package, what's the content ?? The easiest way is to download from XDA the generic global rom, it's the same -- with no bug
Click to expand...
Click to collapse
Huh? The generic ROM is compiled. The one we are talking about here is source-code. I thought you should know since you started this topic on how to setup a build environment. Im not intirely sure what the download from from SE is but it looks like the source-code from all the changes and additions SE made to the bare system. So there's the kernel source and some other stuff that I don't know the purpose of.
Sent from my SNES using Mario Paint
LouNGeRR said:
Huh? The generic ROM is compiled. The one we are talking about here is source-code. I thought you should know since you started this topic on how to setup a build environment. Im not intirely sure what the download from from SE is but it looks like the source-code from all the changes and additions SE made to the bare system. So there's the kernel source and some other stuff that I don't know the purpose of.
Sent from my SNES using Mario Paint
Click to expand...
Click to collapse
A compiled rom is not a problem
I was asking what was the content within the rom, and as you said - i supposed too - it is the original + all SE garbage.
Very interesting to get some apps back on AOSP (some like the *Scape, i do like predictive input from SE, gains a lot of time)
To answer then, the SE kit should contain everything of what SE adds : RachaelUI, all their apps (the *Scape), modules (keyboard, apis...), etc etc and all files to link these components to the kernel. And make our phones as fast as a monster truck. Not as fast as AOSP (Formula 1 !!!!!)
Don't forget the most important part, the package contains the SE kernel.
Sent from my SNES using Mario Paint
After using, struggling more like with Ubuntu and VMware, the main issue being I couldn't figure out getting VMware tools running so copy and pasting was hit and miss, I tried the Cygwin method instead which works much better for me on Windows 7 Ultimate x64.
XperiaX10iUser said:
After using, struggling more like with Ubuntu and VMware, the main issue being I couldn't figure out getting VMware tools running so copy and pasting was hit and miss, I tried the Cygwin method instead which works much better for me on Windows 7 Ultimate x64.
Click to expand...
Click to collapse
VMWare is much more difficult to run than VirtualBox. But course you can try and compile Android from Windows
But I definitely can't tell you if the kitchen method will work for XPERIA.
Perceval from Hyrule said:
VMWare is much more difficult to run than VirtualBox. But course you can try and compile Android from Windows
Click to expand...
Click to collapse
I've put VB on too, but thought I'd try the Cygwin method, which as I've said works for me, and is better imo, at least for what I need.
Perceval from Hyrule said:
But I definitely can't tell you if the kitchen method will work for XPERIA.
Click to expand...
Click to collapse
I can, and it does.
XperiaX10iUser said:
I've put VB on too, but thought I'd try the Cygwin method, which as I've said works for me, and is better imo, at least for what I need.
I can, and it does.
Click to expand...
Click to collapse
Thanks for info then
Hey guys, did someone do the same install as me ? (Windows 7 x64 host // Ubuntu 10.10 x64 guest).
I've never been able to make USB to work, kinda weird... Because when you compile Android, you'd like to send it to your phone *warning !*
Perceval from Hyrule said:
Hey guys, did someone do the same install as me ? (Windows 7 x64 host // Ubuntu 10.10 x64 guest).
I've never been able to make USB to work, kinda weird... Because when you compile Android, you'd like to send it to your phone *warning !*
Click to expand...
Click to collapse
That's why I went the Cygwin route, much less hassle imo.
XperiaX10iUser said:
That's why I went the Cygwin route, much less hassle imo.
Click to expand...
Click to collapse
I would say it depends. Linux environment is much cooler to work with source files (no boring "NOOO Windows can't find how to open this weird non-Windows file. What to do ? 1.Delete 2.Crash Windows 3.Phone Ballmer to make a tender offer)
Is compiling long with Cyg ? From AOSP, it takes me up to 3 hours with my (well RAM-ed, well CPU-ed) Virtual Machine.

[HOWTO] Ubuntu on Folio 100

I'm sorry it took so long, I got lots of stuff to deal with. Good things are worth waiting for (i heard)
First off: You are responsible for any of your actions! Changes that are needed to boot Ubuntu on your folio will void your warranty!
Special Thanks goes to DerArtem for posting his Kernels, Weeds2000 for eMail support, topogigi for wifi hacking and last but not least the Ubuntu-Touch Team on IRC that made it possible for me to tweak the touchscreen driver.
However, the system you are about to create is not fully functional, there are still things missing (a working sound driver for example). Its nice to play with it anyway
Heres a quick walk-through:
We will flash a kernel to the toshiba folio tablet which makes it possible to boot from an sdcard or USB-stick (You have to choose one, we need at least 2GB, I'd recommend 4GB so you can install fancy stuff like OpenOffice etc.).
We will then create a root filesystem with rootstock, which will hold our Ubuntu system (similar to your hard drive-Ubuntu).
Finally, we have to tweak that filesystem and change passwords, copy wifi driver etc.
Then we're able to boot a beautiful Ubuntu.
Things you will need:
- A Computer running Linux (Debian / Ubuntu would be great. If you're not running Linux on your computer, running it on the folio would make absolutely no sense. Please don't ask, I don't know how to install it in Windows.)
- The files i added to this post
- A SD-Card, 2-4 GB should be fine.
- optional: A second SD-card, 128MB would be enough (for flashing)
- A USB hub (If you want to boot from USB AND use a keyboard.
- Some time... =)
The first thing you should do is flash one of the update.zip files; choose update-sdmmc.zip (this will boot your folio from sdcard) or update-usb.zip (this will boot from a usb pen drive), open it and unpack the content to a sdcard (This has to be a SDcard, we're gonna flash our device from there.)
Backup all your data on your folio (I'm serious! It'll be gone!) and turn it off.
Put the SDcard in its slot and turn the folio back on. Press + hold both power and volume up.
Follow instructions to do a system update (If you've never done this before you shouldn't start now =) )
When it reboots, your folio will show some funny black and white linux text stuff and hang somewhere. Congratulations! You just bricked your tablet. Now lets see how we can fix it... Turn it off (Keep power pressed for about 5 seconds) and take out the sdcard, put it in your PC.
It's getting messy now, so grab a beer and let's go:
Open a Terminal on your linux computer.
Code:
#echo "Hello world!"
If your console says "Hello World" you got it. Awesome! =)
Code:
#sudo apt-get install rootstock gparted
This will install rootstock, the tool we're gonna need to create our filesystem, as well as gparted, a tool for partitioning our flash drive. You can also install rootstock-gtk, the graphical version. Try it if you like:
Code:
#sudo apt-get install rootstock-gtk
I heard that ubuntu-netbook won't work because there are drivers missing, would somebody try that and report please?
If your beer is already empty when this is done, you need a faster computer. Tell your wife the guys at xda-developers told you so
Back to the terminal:
Code:
#sudo rootstock -f MyCoolHostName -l myCoolUserName -p myCoolPassword --seed xubuntu-desktop -i 2G --notarball
This will create our filesystem with a user called "myCoolUserName" and (theoretically) his password "myCoolPassword" and install a basic xubuntu-desktop. I had to change the password manually because it didn't work this way... We'll do that later.
Rootstock will download lots of packages (You could also set it up with "--seed ubuntu-desktop", then youll download even more packages or "--seed ubuntu-minimal" or kubuntu... I still didnt find a list of seeds online :-/
The creating will take quite some time, get another beer.
When this is done, you'll get a file like this : "qemu-armel-201104112120.img". We will now mount this image: (make sure the directory /mnt/ does exist and is empty:
Code:
#ls -la /mnt )
Code:
#sudo su
(its simpler to be root for now)
Code:
#mount -o loop qemu-armel-201104112120.img /mnt/
(You are aware that your filename is different, are you? Try this:
Code:
# mount -o loop qemu-armel-*TAB*
and your terminal will automatically fill in your filename. Awesome linux, huh? =)
)
Code:
#cd /mnt/etc/
#mv fstab fstab.bak
#echo "proc /proc proc defaults 0 0" > fstab
#echo "dev /dev tmpfs rw 0 0" >> fstab
Note that the first time we create a file called fstab (echo asdf > fstab), then we add one line to this file (echo asdfasdf >> fstab)
Now we need to copy our wifi-driver over. Remember I told you to write down the directory you put them in? =)
Code:
#cp /home/YourUserName/Desktop/FolioStuff/firmware /mnt/lib/firmware
We will now do something stupid: We chroot into our arm-based system from an intel-system. But since we're only changing passwords, we should be OK.
Code:
#cd /
#chroot /mnt/
#passwd myCoolUserName
#passwd
#exit
That's it, we're out of the chroot.
It's now time to prepare the SDcard (The steps are the same for a USB Flash drive, I think you'll figure them out.)
Find out how your SDcard can be accessed (You should still be root):
Code:
# fdisk -l
In my card reader, it's "/dev/mmcblk0", it could also be "/dev/sdb1" in your computer.
Now there are two possibilities:
1. You know what youre doing. Then it's easy: You wipe the only partition (or, if there are more than one, the first partition) on your sdcard and format it with ext3:
Code:
#mkfs.ext3 /dev/mmcblk0p1
Note: The device is called /dev/mmcblk0, the partition itself /dev/mmcblk0p1 (Partition 1)
2. You are not sure about this. No problem, start gparted: (as root!)
Code:
#gparted
In the upper right corner, select your flash drive, delete all partitions and create one formatted with ext3. Close gparted.
Mount your freshly created partition somewhere (i chose /mnt2/):
Code:
#mkdir /mnt2/
Code:
#mount /dev/mmcblk0p1 /mnt2
We can now copy our filesystem over. Make sure you use exactly the same flags (rfp for recursive, force, preserve (attributes))
Code:
#cp -rfp /mnt/* /mnt2/
OK, that could work. Unmount the sdcard:
Code:
#umount /mnt2/
Put it in your folio and cross your fingers.
Wifi drivers will be up soon...
It's recommend to add build-essentials to your rootstock image too..
Because then you can easily build the wireless lan drivers on your devices..
Maybe I'll post a howto this afternoon!
Is this Ubuntu really usable (for daily work) with the folio 100 (touch, response speed, ecc.)?
Thanks.
Yup, it's usable for everyday work. It's quite fast on the Folio 100, I've been pretty impressed when I tested it a few weeks ago.
Thanks ph84
It seems most difficult than expected but, great job !
Only i have 1 question, bricking the tablet sounds dangerous... is possible break out the tablet and get a rock?
Thanksss!!!!!
if ubuntu is installed on sd, does that mean that we can dual boot foliomod from nand and ubuntu from sd/usb?
Hm... I'm using Ubuntu 11.04 and I'm getting this error at the end of the rootfs creation :
E: Sub-process /usr/bin/dpkg returned an error code (1)
E: Second stage build in chroot failed !
E: Please see the log to see what went wrong.
I: Cleaning up...
.....
I: Umounting temporary Image
umount2: Dispositivo o risorsa occupata
umount: /tmp/tmp.zaZ1j1Tgt6/tmpmount/proc: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
umount2: Dispositivo o risorsa occupata
Click to expand...
Click to collapse
Do you have any idea where I can find the log?
And this procedure will build in the tablet a dual boot? Or dualboot is another procedure?
what is the *.rar????
No it's for singleboot only...
You can only start Ubuntu installed on SD-Card/USB-Stick with this procedure...
I don't know wether the boot-partition is locked when you are booting ubuntu/android..
If not it should be possible to build some applications to flash the boot-partition on the running system to change from ubuntu to android
When I do the rootstock step,I got this error!!!Please help!!!
I: Base system installed successfully.
I: First stage install done
I: Using Chroot for installer
Adding 'local diversion of /usr/sbin/invoke-rc.d to /usr/sbin/invoke-rc.d.rootstock'
Generating locales...
en_GB.UTF-8... done
Generation complete.
Generating locales...
en_US.UTF-8... done
Generation complete.
/bin/installer: line 53: syntax error near unexpected token `+'
E: Second stage build in chroot failed !
E: Please see the log to see what went wrong.
I: Cleaning up...
.....
I: Umounting temporary Image
I: A logfile was saved as //rootstock-201104140706.log
I: Done
Click to expand...
Click to collapse
Could you upload an *.img for us in this forum?
or a databank,etc?
mhmm it always hangs in the xulrunner configuration.. bahh someone know a solution for this? or does i realy have to chroot the rootfst and install everything manualy =(? Cant find any solution on google for this bug =/
sony_tornado said:
what is the *.rar????
Click to expand...
Click to collapse
Nvm, I was talking crap...
schnudergof said:
mhmm it always hangs in the xulrunner configuration.. bahh someone know a solution for this? or does i realy have to chroot the rootfst and install everything manualy =(? Cant find any solution on google for this bug =/
Click to expand...
Click to collapse
Just try rootstock without the parameters on --seed..
Maybe it will work..
You wont have a Desktop Enviroment like Gnome or something but you wont need that for installing the wireless drivers...
And after installing wireless drivers you can install ubuntu-desktop or something with apt-get!
Ok, I have been looking at rootstock, and if you install rootstock-gtk and than click on tasksel there is a whole list of seeds to chose from. I Think im going to try build the netbook build.
On a side note:
We will now do something stupid: We chroot into our arm-based system from an intel-system. But since we're only changing passwords, we should be OK
Click to expand...
Click to collapse
with chroot your only changing the root of your file system, your not running anything from there.
But its its in no way a complaint to your awesome guide! Thanks and keep up the good work!
shidima_101 said:
with chroot your only changing the root of your file system, your not running anything from there.
Click to expand...
Click to collapse
Thats right but when you change your root shell to the rootstock-fs you can also use sudo apt-get update/install and install it into the rootfs!
ph84 said:
Meanwhile, open another terminal. (This is linux! We're gonna multitask since our computer is capable of handling that!) Go to where you stored the attached files, for example
Code:
#cd /home/YourUserName/Desktop/FolioStuff
and unpack them:
Code:
#rar x *.rar
Click to expand...
Click to collapse
Where/what is the "attached files"?
Thanks
Just go to the first page, press STRG+F and type attached into the search window...
I hope you will find the attached files.. Else you dont have to try installing ubuntu on your folio >_<
°EraZoR° said:
Just go to the first page, press STRG+F and type attached into the search window...
I hope you will find the attached files.. Else you dont have to try installing ubuntu on your folio >_<
Click to expand...
Click to collapse
The files I found are only *.zip for update bootloader. Where is *.rar file?
Thanks

How to create a shelf icon that executes a shell programm call?

Hey everyone,
I am looking for a way to activate sleep mode of my chromebook manually in order to save battery without having to log out or power off all the time (it's connected to an external display, so closing the lid doesn't trigger it).
So far I found out that calling "powerd_dbus_suspend" from the shell does the trick, but as you can imagine, using the shell and actually typing the command every time is not really a solution.
Is there a way to create a chrome os app that executes this program call, so I can put it in my shelf and just click it to activate sleep?
I'm not really good at .json, maybe there's a way? Or any other suggestions?
Thanks alot!
Markus
I would like to know it too. Anyone?
Sneets said:
Hey everyone,
I am looking for a way to activate sleep mode of my chromebook manually in order to save battery without having to log out or power off all the time (it's connected to an external display, so closing the lid doesn't trigger it).
So far I found out that calling "powerd_dbus_suspend" from the shell does the trick, but as you can imagine, using the shell and actually typing the command every time is not really a solution.
Is there a way to create a chrome os app that executes this program call, so I can put it in my shelf and just click it to activate sleep?
I'm not really good at .json, maybe there's a way? Or any other suggestions?
Thanks alot!
Markus
Click to expand...
Click to collapse
Run a tiny web server like lighttpd in the shell on a weird port, restrict to localhost. Set up index.php to run system (whatever);
Then bookmark the 127.0.0.1: xxxx URL
Which system call invokes power_dbus_suspend?
Thanks Parrotgeek1. Working off your excellent suggestion I installed a lightweight local server on ChromeOS (Web Server for Chrome with the 200 OK! icon) and built a small framework app that is served from local storage. I'm all set up to call chrome.app.??? from my JavaScript. Which API provides the power_dbus_suspend capability? I looked through the Power and System APIs and I don't see anything. - Thanks!
Sneets said:
Hey everyone,
I am looking for a way to activate sleep mode of my chromebook manually in order to save battery without having to log out or power off all the time (it's connected to an external display, so closing the lid doesn't trigger it).
So far I found out that calling "powerd_dbus_suspend" from the shell does the trick, but as you can imagine, using the shell and actually typing the command every time is not really a solution.
Is there a way to create a chrome os app that executes this program call, so I can put it in my shelf and just click it to activate sleep?
I'm not really good at .json, maybe there's a way? Or any other suggestions?
Thanks alot!
Markus
Click to expand...
Click to collapse
Have you tried this simple extension? Keep Awake
https://chrome.google.com/webstore/...lb?utm_source=chrome-app-launcher-info-dialog
What I do is have the shell tab pinned, and press [up arrow] for the command then hit [enter]. Probably not ideal if you use the shell a lot as you have to step through recently used commands.
Re: Pkt_Lnt's post
Thanks Pkt_Lnt. That app only deals with disabling the normal sleep behavior, not causing it, and in particular not causing it when an external monitor is connected. I'm looking for something like Sneets has requested, to invoke a powerd_dbus_suspend command that will force the system to sleep (and turn off an external monitor). Per Parrotgeek1's comment, I've got a little app now sitting on the shelf that is all set to call some system command to invoke powerd_dbus_suspend, only I'm looking for what command to call, from JavaScript.
I managed to find a way to do something similar with the Secure Shell app. During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook.
This method might be overkill somewhat, but, anyway, what I did was as follows:
Installed Secure Shell extension; setup sshd on the Chromebook (by making a symlink in /etc/init/ pointing to /usr/share/chromeos-ssh-config/init/openssh-server-conf); rebooted; added public key from ConnectBot (Android app) to ~/.ssh/authorized_keys in order to test connection; setup Android homescreen shortcut to send shell command; created profile in Secure Shell app on Chromebook to connect to [email protected]/my local IP address; generated keys on Chromebook (in ~/.ssh); added generated public key to ~/.ssh/authorized_keys; imported newly-generated private/public key pair within Secure Shell app (one by one); created bookmark link to [email protected] profile in shelf, and, finally, added required command to profile in Secure Shell.
It works well! It looks like any command can be added to the 'Arguments' field in Secure Shell, with the syntax:
Code:
-- thecommand
Although I guess commands that need sudo would require a connection to [email protected], instead of chronos. (-t argument lets you use sudo, but then sending a line break/ENTER seems to be needed)
The window opened with the click does hang around - I haven't figured out if it's possible to avoid this - but it does at least seem to persistently remember the size and position to which it's set.
I posted up some further details at http://nolirium.blogspot.com/shell-command-shelf-shortcut-chromeos.html
Impressive! But a bit more than I'm looking to do
@Nolirum - I read your blogspot doc and your procedure's pretty impressive. Frankly it's a little beyond me and beyond what I'm looking for. If you ever run across a way to invoke powerd_dbus_suspend a little more directly please post here as well. You clearly have a strong grasp of the issues!
Nolirum said:
I managed to find a way to do something similar with the Secure Shell app. During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook.
This method might be overkill somewhat, but, anyway, what I did was as follows:
Installed Secure Shell extension; setup sshd on the Chromebook (by making a symlink in /etc/init/ pointing to /usr/share/chromeos-ssh-config/init/openssh-server-conf); rebooted; added public key from ConnectBot (Android app) to ~/.ssh/authorized_keys in order to test connection; setup Android homescreen shortcut to send shell command; created profile in Secure Shell app on Chromebook to connect to [email protected]/my local IP address; generated keys on Chromebook (in ~/.ssh); added generated public key to ~/.ssh/authorized_keys; imported newly-generated private/public key pair within Secure Shell app (one by one); created bookmark link to [email protected] profile in shelf, and, finally, added required command to profile in Secure Shell.
It works well! It looks like any command can be added to the 'Arguments' field in Secure Shell, with the syntax:
Code:
-- thecommand
Although I guess commands that need sudo would require a connection to [email protected], instead of chronos. (-t argument lets you use sudo, but then sending a line break/ENTER seems to be needed)
The window opened with the click does hang around - I haven't figured out if it's possible to avoid this - but it does at least seem to persistently remember the size and position to which it's set.
Click to expand...
Click to collapse
This really is impressive! Thanks for the extremely detailed explanation.
I was able to follow along completely and get the SSH argument "powerd_dbus_suspend" working.
However, I got to thinking. I was wondering if this could be extended to use an alias stored in ~/.bashrc?
After doing some research of my own and using various parameters and arguments, I was unsuccessful.
The goal is to have a linux app (through crouton) be run using xiwi with just a single bookmark by utilizing an alias.
Any thoughts?
UPDATE:
Of course just a few moments later I figured this out! Rather than dealing with an alias stored in ~/.bashrc and ensuring ssh had access, typing the entire alias command as an argument worked. Now I can run Steam directly from a shelf bookmark. All it took was replacing "powerd_dbus_suspend" with "-- sudo enter-chroot xiwi steam" in the argument.
Thanks again!
DandyRandyMarsh said:
This really is impressive! Thanks for the extremely detailed explanation.
I was able to follow along completely and get the SSH argument "powerd_dbus_suspend" working.
Click to expand...
Click to collapse
No problem! I think it's perhaps overly detailed if anything. Might be easier to follow if I cut it down a bit.
DandyRandyMarsh said:
Now I can run Steam directly from a shelf bookmark. All it took was replacing "powerd_dbus_suspend" with "-- sudo enter-chroot xiwi steam" in the argument.
Click to expand...
Click to collapse
Nice!
Adding crouton single app shortcuts is a cool idea which I hadn't considered. Does it work OK for you with sudo in the command, even straight after booting up? ...You didn't have to setup sudoing without a password via sudoers.d or anything?
Inspired by your post I added xiwi to my chroot to try it out. I seem to remember experiencing quite unbearable lag and slowness when running a full desktop via xiwi in the past, but with single apps there doesn't seem to be any noticeable performance hit (this is on an armv7 Asus Flip, with the chroot on a slooow USB drive).
In order to not have to enter my sudo password, in the argument I put:
Code:
-t -- echo mypassword | sudo -S sh /media/removable/3/bin/enter-chroot xiwi firefox
Maybe I'm missing something? Is there a better way, perhaps?
Anyway, since I have rootfs verification switched off, I also tried saving a similar command to a file in /usr/bin, and putting the filename in the argument instead. This works, too, and I suppose could potentially be useful e.g. in the case of needing to run a more convoluted sequence of commands with a shortcut.
Nolirum said:
Adding crouton single app shortcuts is a cool idea which I hadn't considered. Does it work OK for you with sudo in the command, even straight after booting up? ...You didn't have to setup sudoing without a password via sudoers.d or anything?
Click to expand...
Click to collapse
I'm not entirely familiar with exactly how my process worked, but I do not have any sudo password required within shell.
Here's the list of steps I followed allowing me to use sudo commands in the SSH Arguments box.
As a side note, this is the crouton installation I am running on an ASUS c302.
sudo sh ~/Downloads/crouton -r trusty -t unity,touch,xiwi,extension
Setup Bookmarks that Run Shell Commands
1. Installed Secure Shell extension
2. Open crosh with Ctrl+Atl+T
3. Enter Command: shell
4. Enter Command: sudo su -
5. Enter Command: sudo /usr/share/vboot/bin/make_dev_ssd.sh --force --remove_rootfs_verification
6. Enter Command: reboot
7. Let Chrome OS reboot
8. Open crosh with Ctrl+Atl+T
9. Enter Command: shell
10. Enter Command: sudo su -
11. Enter Command: mount –o remount rw /
12. Close current crosh window
13. Open a new crosh with Ctrl+Atl+T
14. Enter Command: shell
15. Enter Command: sudo ln -s /usr/share/chromeos-ssh-config/init/openssh-server.conf /etc/init/openssh-server.conf
16. Enter Command: sudo initctl reload-configuration
17. Enter Command: sudo initctl start openssh-server
18. Enter Command: cd ~/.ssh/
19. Enter Command: ssh-keygen
“Enter file in which…” *LEAVE BLANK*
“Enter passphrase” *LEAVE BLANK*
“Enter same passphrase” * LEAVE BLANK*​20. Enter Command: cat /home/chronos/user/.ssh/id_rsa.pub >> /home/chronos/user/.ssh/authorized_keys
21. Enter Command: cp -a /home/chronos/user/.ssh/id_rsa* /home/chronos/user/Downloads
22. Close current crosh terminal and open Secure Shell extension
23. Select [New Connection]
24. Click Import… and select “id_rsa”
25. Click Import… again and select “id_rsa.pub”
26. Enter chronos as the username and localhost as the hostname
27. Enter a shorthand name replacing the text in the top cell “[email protected]”
28. Click Enter. If prompted, enter “yes” to continue connecting
29. Bookmark the page that is open which should end in, "#profile-id:_ _ _ _"
DONE. Now time to add some commands to automate.
Open Secure Shell and select the connection created. In the arguments box, start with two dashes -- and follow it your desired shell command.
Examples:
-- sudo startunity
-- sudo startgnome
-- sudo enter-chroot xiwi steam
-- sudo enter-chroot xiwi wine microWord​
Next Steps... Getting Custom Shelf Icons
Now here I am running into some issues. Rather than have all these icons be the same, I was hoping to customize them.
Followed a strategy found on reddit, Change Shelf Icon for Website, but this only works if the site already had an "apple-touch-icon" set. Also, tried to inject the entire code myself which I couldn't get to work. Unfortunately, I think that since this bookmark is created from a Secure Shell, there are some issues.
I have already tried adding in code for this into the site, but it is having no effect. If someone could make this work then we're really looking good here.
DandyRandyMarsh said:
I'm not entirely familiar with exactly how my process worked, but I do not have any sudo password required within shell.
Click to expand...
Click to collapse
Oh, I see what you mean. You are saying that you can sudo in the shell generally, without being prompted for a password, right?
Was that the default setup on your CB (after switching to Dev mode)? Or did you have to configure it manually for passwordless sudoing...
DandyRandyMarsh said:
Here's the list of steps I followed allowing me to use sudo commands in the SSH Arguments box.
Click to expand...
Click to collapse
Nice work summarizing the steps. :highfive: It's probably easier to follow, listed out like that. One slight addendum, perhaps - at step 29, it might be good to clarify the "add to shelf" procedure. Especially because of the following...
DandyRandyMarsh said:
Next Steps... Getting Custom Shelf Icon
Now here I am running into some issues. Rather than have all these icons be the same, I was hoping to customize them.
Click to expand...
Click to collapse
Happily it turns out that, when you add shortcuts to the shelf on Chrome OS like this, a minimal app is created for each one, with its own manifest.json, and icon.pngs. Our shell shortcuts were getting created with blank pngs by default (the black box with P in the center).
So, all we need to do, is get some icons, find the right folder for our shelf shortcut apps, then copy our new icons into them!
For instance, here's how I made a nice shiny icon for my single app shelf shortcut to Firefox.
Prepared icons:
Created a temporary folder in ~/Downloads to store downloaded icons.
Prepared a set of icons in ~/Downloads/firefox. (I downloaded mine from findicons.com).
Six sizes are required - from 32px to 256. To avoid any manifest editing, saved them as *size*.png
e.g. 32.png; 48.png; 64.png; 96.png; 128.png; 256.png
Located folder to copy icons to:
It is easiest to do this directly after clicking "add to shelf"
EITHER:
To change dir into the most recently modified extension icon subfolder automatically, the following one-liner worked for me*.
Code:
shell
cd ~/Extensions/&&cd $(ls -v1td */ | head -1)/*/icons&&ls
A list of blank icons (*.png) should be visible. If so, the new icons can simply be copied over these, e.g..
Code:
sudo cp ~/Downloads/firefox/* .
*YMMV with this particular one-liner - sometimes there's an extra 'temp' folder in ~/Extensions, which stops it working as expected. If you get an error after running the command, simply use the slightly more manual method to locate the folder, as detailed below.
OR:
(slightly more manual method).
Code:
shell
ls -ltr ~/Extensions
Checked the date/times - the most recently added folder is at the bottom. Then,
Code:
cd themostrecentlyaddedfolder
(or, the folder modified at the date/time that the shortcut was "added to shelf"). Then,
Code:
cd */icons
ls
sudo cp ~/Downloads/firefox/* .
I then repeated the above with a new SSH argument and a set of Ubuntu icons, for a custom startxfce4 shortcut, too.
Then just did sudo restart ui, and enjoyed the shiny new shelf icons!
I am hopeful that these changes will get picked up by CrOS's sync, thus getting backed-up and restored automatically. At this point I am not sure if that will be the case, but I don't see why it wouldn't.
Another way?
Another way to approach this, since you're modifying system stuff anyway, might be to edit crosh at /usr/bin/crosh. It's a regular ol' dash/bash shell program, and you can create a shortcut to it on the shelf by opening crosh (ctrl-alt-T), then right click the top right of the browser and select More Tools --> Add to shelf...
Clicking the newly-created link (which looks like an "N") will launch /usr/bin/crosh in a tab. Changing the default behavior of /usr/bin/crosh could accomplish your goal to do whatever you want. With some experimenting, you might even be able to pass arguments to make it do different things depending on how it's opened (via ALT-CTRL-T vs from the shelf-- dunno if it can read the url used to call crosh), but at the very least you could do something like have it run whatever you want it to run if a second modifier key is held down (or if it isn't...), otherwise return to normal operation. A menu w/1 sec timeout could do this as well, ie--
Doing [THE THING YOU WANT] in 2 seconds (press SPACE for crosh)... /
Note there's no proof-of-concept here. Just throwing it out as an idea that I'm pretty sure would work... Someone might even create a neat extension that allows crosh to use scripts/plugins to execute different system operations beyond the stock ones that are built-in via single-clicks... If it worked, it might be a little simplier than via the SSH extension and you wouldn't have to run any extra daemons.
ft
This is probably harder, but a third way, which probably is the "right" way is to see how the crosh extension works and learn about opening the hterm.Terminal instance chrome.terminalprivate object directly, sending it output, and closing it in the same way crosh does it. There's a file in the crosh extension at js/crosh.js that shows the basics of how it's done:
var terminal = new hterm.Terminal(profileName);
And then you can do stuff with it. You could then create an extension that could handle multiple shelf-icons (say by appending ?COMMAND=ls to the URL to do different shell commands(. The security implications for this would probably be huge obviously.
Update: More on embedding hterm is here.
Nolirum said:
I managed to find a way to do something similar with the Secure Shell app. During the process of figuring it out, I also found that I was able to create a homescreen shortcut on my Android tablet which when tapped sends a shell command to the Chromebook.
I posted up some further details at http://nolirium.blogspot.com/shell-command-shelf-shortcut-chromeos.html
Click to expand...
Click to collapse
Nice post - Some good food for thought, changing up the contents of crosh etc directly is an interesting idea.
fattire said:
Another way to approach this, since you're modifying system stuff anyway, might be to edit crosh at /usr/bin/crosh. It's a regular ol' dash/bash shell program, and you can create a shortcut to it on the shelf by opening crosh (ctrl-alt-T), then right click the top right of the browser and select More Tools --> Add to shelf...
Click to expand...
Click to collapse
Interesting! ....Aaaaand, now I've broken crosh. lol. Lucky I had my SSH shortcut setup... (actually, we can still get into the VTs with CtrlAltF2 etc anyway).
Some good potential for experimentation with this, definitely.
fattire said:
This is probably harder, but a third way, which probably is the "right" way is to see how the crosh extension works and learn about opening the hterm.Terminal instance chrome.terminalprivate object directly, sending it output, and closing it in the same way crosh does it. There's a file in the crosh extension at js/crosh.js that shows the basics of how it's done:
Click to expand...
Click to collapse
Again, very interesting. Now you come to mention it, an approach such as this does seem like it might be do-able without too much messing around (maybe)...
Any possible method we can get e.g. an extension to 'talk' to the shell is worth looking into I think; as you say, if we can cut out the middleman (ssh) and maybe do it more elegantly, that might be pretty useful indeed.

[GUIDE]Dual boot ChromeOS with Linux or Windows on almost any device

Dual Boot ChromeOS with Linux or Windows!
Update 1: This thread has been fully rewritten for Windows too!
Update 2: Added Steps for Arch Based Distros!
This guide will tell you how you can dual boot ChromeOS with Linux or Windows! This guide is based on the official GitHub page!
Update2: Added troubleshoot section: Added ChromeOS not detecting fix​
INDEX
• About
• Requierments
• Downloads
• Intel CPUs
• Types of recoveries
• AMD CPUs
• Linux Installation
• Preparing environment
• Installation
◦ Gparted
◦ Secureboot
• Windows Installation
• Preparing Linux Environment
◦ Preparing Environment
◦ Installation
◦ Secureboot
• Troubleshoot
• Fix ChromeOS not detecing
• Credits
About​ChromeOS, is an Operating system based on Gentoo Linux and designed by Google based on the ChromiumOS an open source project but unlike that ChromeOS is not open source, ChromeOS uses Google API and has intergrated Google Apps and Google Chrome as its interface! It also supports android apps!
Why chromeOS ? ChromeOS is a very smooth OS unlike other Android-x86 projects it is a fully functional and powerful OS, though it is not an ideal choice for gaming because it does not support the keymapping function. But if it ever gets Key Mapping there is no better option for running android for your PC other than chromeOS
Brunch, To keep it short and simple brunch is a framework which can help you to run ChromeOS on your Device even if its not a chromebook!
Requierments
​
• qs-x86_64 based computer with UEFI boot support (you can check that just search on google if you don’t know)
◦ With MBR patch your MBR/Legacy device might be supported
• Administrator Permissions
• Should have an Intel CPU (check conditions for that too)
◦ Intel 1st gen Core are supported only till ChromeOS 81 (This release may not be available anymore)
◦ Atom, Celeron and Pentium processors are supported since Baytrail and later versions!
• AMD Ryzen and AMD Stoney Ridge are supported, but it is limited
• Nvidia GPUs are not supported (if you have one then its ok, but ChromeOS won’t detect it)
• No Virtual Machines (VMs) are supported
• ARM CPUs are not supported at all, No luck guys
• Intel Core 2 Duo and older CPUs are not supported
Now if you are supported then Great! Lets move on!
DOWNLOADS
NOTE: you can even download the eve image which is the best as its the official Pixelbook recovery, but remember the boot chances are less with that so If you don't have time/data download from the below images
Intel CPUs​
• If your CPU is 10th and 11th gen open this Link note the versions and proceed to download from HERE but before read below
◦ 11th gen and some 10th gen CPUs may need kernel 5.10
• If your CPU is 1st gen to 9th gen then after opening this Link, note the versions and proceed to download from HERE and before downloading read below,
Stable Builds​
For daily and frequent use [Recommeneded for average users],
these builds are reliable and are pretty stable for day-to-day use and are recommended.
Beta Builds​
Good for daily use and more Beta features [Recommended],
these builds are pretty stable and relaible with a few more Beta features and just a few bugs. These are recommended and also if the stable build is not availible.
Dev Builds​
Buggy and more features [Power users only, Not Recommended],
these builds are not very stable and are buggy but have more features! Not recommended for daily use. These builds are ideal for developers who want to test out some features (Liveboot)
Canary Builds​
Unstable! Experimental feaatures! [NOT Recommended][DEVs ONLY],
These builds have a lot of bugs but the most of the features! These builds are not intended for average users and are only for testing.
AMD CPUs​
• For Stoney Ridge and Bristol Ridge Click Here but before read the above info carefully
and proceed to download from HERE
• For Ryzen Click here but read above before downloading then carefully
and proceed to download from HERE
• for Ryzen 4xxx devices you need kernel 5.10
As of I am writing this I have an Intel 10th gen CPU and the Stable builds are unavailable so I will be downloading the BETA Build which are quite stable too!
Now we have to also download Brunch, download the latest stable version from HERE
LINUX​
Prerequisites,
• You should be on a Linux Distro
• Root access
• Atleast 16gb storage you can give to the OS
• Your PC should support Brunch
• Some basics of linux terminal (if not I recommend to learn because this helps in troubleshooting problems)
• Grub2 Bootloader
Preparing the Environment​
Now open Terminal by Ctrl+Alt+T
and run,
Lets enable super user permissions using the following command
Bash:
sudo su
Enter password if it asks and hit enter
Debian based Distros:
Its a good thing to update and upgrade the packages by running this command,
Bash:
sudo apt update && upgrade
Lets install the required packages the command below will install pv, tar, unzip, cgpt and gparted,
Bash:
sudo apt install pv tar unzip cgpt gparted
Arch Based Distros:
Bash:
sudo pacman -Syu pv tar unzip gparted && yay -S cgpt
Side Notes
____________________________________________________________________________________
pv,
Pipe Viewer, known as pv is a package which allows the user for the monitering of data being sent through pipe, it helps the user by giving them a visual display
Tar,
tape archive. Known as tar is used to create and extract archive files in the format of .tar, .tar.gz etc...
Cgpt,
Cgpt is a tool to manipulate GUID Partition Table from command line. It also supports ChromiumOS extentions
Gparted,
Gparted is an Advanced disk manager, its simple yet powerful UI makes it easier to create, delete or modify any partition!
Unzip
unzip command simply extracts zip files!
_____________________________________________________________________________________
Now lets go into Documents using the cd command cd simply means change directory
Bash:
cd Documents
Now lets create a new folder and open that to keep things clean and tidy
mkdir command means make directory (make folder) and cd is change to directory
Bash:
mkdir ChromeOS && cd ChromeOS
now cut/move the downloaded files to documents/ChromeOS from your file manager
Installation​
Now we will extract the tar.gz archive using tar we previously downloaded! Tar calles the command to run tar and zxvf is to extract the file in format of tar.gz
Bash:
tar zxvf brunch_ filename.tar.gz
Replace the brunch_filename.tar.gz from your actual bruch file’s name
now we also want to extract the chromeos zip file this file can be extracted by using the unzip command!
Bash:
unzip chromeos_ filename.bin.zip
Replace the chromeos_filename.bin.zip from your actual chromeOS file’s name
once done
if you already have an empty disk and are deciding to use that for installation then just check these things:
the partition should be ext4 or ntfs (ext4 recommended)
if not or if you don’t know what partition is it then
1. open Gparted and if under the file system your partion shows ext4 then close Gparted and if not then
2. right click the patition then
3. select format to and
4. select ext4 after that
5. click the ✓ logo and proceed after that
6. close Gparted.
If you don’t have a free partition or you want to create a different partition then,
minimize terminal and open Gparted (if you ran the first command it is automatically installed).
1. Now open Gparted and
2. Resize your storage and free up 16-100 gb of storage, to do that right click the partition you want to give storage from,
3. Click on the resize/move and
4. In the Free space following (MiB) text box enter the amount of storage you want to give to chromeOS in MB and click resize,
5. now you will notice a new space created called unallocated right click on it then click on new.
6. Now select Create as Primary Partion and File System: ext4 and click add! Now again click the ✓ Icon and proceed.
Also in Gparted note the name of your ChromeOS partition below the “Partition” table
for eg: /dev/sda11, /dev/mmcblk0p5 or /dev/nvme0n1p4
now open terminal,
now we will create a new mountpoint for that we will create a new directory using mkdir. The ~ is a symbol of your home directory so ~/tmpmount actually means home/tmpmount!
Bash:
mkdir -p ~/tmpmount
Now its time to mount the partition at the mountpoint
now this command will mount your partition named dev/partion to tmpmount!
Bash:
sudo mount /dev/partition ~/tmpmount
here replace the ‘partition’ to your partition name you saw in Gparted
Now
as we did before replace the chromeos_filename.bin to your actual file’s name and also replace the size from the amount of storage you want to give to chromeOS, minimum 16gb maximum your choice.
This command runs the chromeos-install.sh file in bash this file runs the installer! With the source (-src) being chromeos.bin file and the destination (-dst) being ~/tmpmount/chromeos.img and the size (-s) is what you desire
Bash:
sudo bash chromeos-install.sh -src chromeos_filename.bin -dst ~/tmpmount/chromeos.img -s size
Now if it asks for confirmation then type yes in the prompt
Now after it is over you should see something like this:
**************************************************************
menuentry "ChromeOS" --class "brunch" {
rmmod tpm
search --no-floppy --set=root --file /chromeos.img
loopback loop /chromeos.img
source (loop,12)/efi/boot/settings.cfg
if [ -z $verbose ] -o [ $verbose -eq 0 ]; then
linux (loop,7)$kernel boot=local noresume noswap loglevel=7 options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params \
cros_secure cros_debug loop.max_part=16 img_uuid=8191adfb-ab27-4e4d-a12e-b9e49aa1b466 img_path=/chromeos.img \
console= vt.global_cursor_default=0 brunch_bootsplash=$brunch_bootsplash quiet
else
linux (loop,7)$kernel boot=local noresume noswap loglevel=7 options=$options chromeos_bootsplash=$chromeos_bootsplash $cmdline_params \
cros_secure cros_debug loop.max_part=16 img_uuid=8191adfb-ab27-4e4d-a12e-b9e49aa1b466 img_path=/chromeos.img
fi
initrd (loop,7)/lib/firmware/amd-ucode.img (loop,7)/lib/firmware/intel-ucode.img (loop,7)/initramfs.img
}
menuentry "ChromeOS (settings)" --class "brunch-settings" {
rmmod tpm
search --no-floppy --set=root --file /chromeos.img
loopback loop /chromeos.img
source (loop,12)/efi/boot/settings.cfg
linux (loop,7)/kernel boot=local noresume noswap loglevel=7 options= chromeos_bootsplash= edit_brunch_config=1 \
cros_secure cros_debug loop.max_part=16 img_uuid=8191adfb-ab27-4e4d-a12e-b9e49aa1b466 img_path=/chromeos.img
initrd (loop,7)/lib/firmware/amd-ucode.img (loop,7)/lib/firmware/intel-ucode.img (loop,7)/initramfs.img
*******************************************************************
Now copy the text similar to this from your terminal and paste it in a notes app or save it somewhere.
Now the end is near!
Now run this command which will copy the given
Bash:
sudo cp /etc/grub.d/40_custom /etc/grub.d/99_brunch
Running this command will open the nano text editor to edit these files,
Bash:
sudo nano /etc/grub.d/99_brunch
Now a file will open,
1. Now paste the text you copied before in a new line
2. then press Ctrl+X then type y to save it and hit enter
Now lastly run,
Debian:
Bash:
sudo update-grub
and
Bash:
sudo update-grub2
Arch:
Bash:
sudo pacman -Syu
this will update your grub configuration!
Now for those who have secure boot enabled you will have to follow some extra steps.
Now there are 2 ways:
• Way 1 [run if Way 2 does not work]: Go to BIOS Setup and simply disable SecureBoot and boot into ChromeOS
• Way 2 [Recomended]: Download the file from this link and paste the file in the ChromeOS folder
open terminal and run:
Bash:
cd Documents/ChromeOS
Bash:
sudo mokutil --import brunch.der
and thats it!
Windows​
Prerequesites,
• Administrator access
• you have to give atleast 16gb to ChromeOS minimum, the disk should be
bitlocker disabled, and the format should be NTFS
• Windows Subsystem for Linux 2 (WSL2) or use Cygwin
• pv, tar, unzip and cgpt should be installed
• Basic Linux command knowledge
Preparing the Linux Environment​
• For windows 10 and 11 users
Open Powershell and run
Code:
wsl –install
thats it
NOTE: You must be running Windows 10 version 2004 and higher (Build 19041 and higher) or Windows 11.
• for Windows 7 & 8/8.1 (works for windows 10 and 11 too)
Download and install Cygwin from HERE
after this run the CygWin terminal (for CygWin users) and for WSL2 users launch it!
Preparing Environment​
And run this
Bash:
sudo apt update && sudo apt -y install pv cgpt tar unzip
If the process ends with errors then run this:
Bash:
sudo add-apt-repository universe
and run
Bash:
sudo apt update && sudo apt -y install pv cgpt tar unzip
Installation​
Bash:
cd /mnt/c/Users/username/Downloads
Here replace the username by your actual username
Now run,
Bash:
tar zxvf brunch_filename.tar.gz
replace the brunch_filename.tar.gz from the real filename
Now run,
Bash:
unzip chromeos_filename.bin.zip
Here replace chromeos_filename.bin.zip from the actual filename (cmon you know the drill)
Now run,
Bash:
mkdir /mnt/c/Users/username/brunch
Again replace the username from the real username (if you want to install it in C disk)
Run,
Bash:
mkdir /mnt/d/brunch
(if you want to install in Disk D)
Now run,
Bash:
sudo bash chromeos-install.sh -src chromeos_filename.bin -dst /mnt/c/Users/username/brunch/chromeos.img -s size
Here replace chromeos_filename.bin from the real one, and replace size from the storage you want to provide (give atleast 16 gb)
Now Install Grub2Win from HERE
and run it
then click on the Manage Boot Menu and then add a new entry
Select the create user section from the type section.
Now open chromeos.grub.txt saved earlier, it will be in the same directory and copy the grub boot entries saved in that file and copy them to Grub2win
then click Ok and Apply to save the entries into Grub2win
To prevent windows from locking the NTFS partition I recommend you to switch off secureboot!
Troubleshoot​
ChromeOS boot fix
this fix includes:
• Grub bootloader does not show up
• PC/Laptop directly boots into the MainOS
• the menu boot time is too short
• etc
Now there is a common issue where you have installed ChromeOS but the grub menu does not show up and your PC directly boots into the MainOS (Windows/Linux) these steps will help you fix it!
open terminal and run
Bash:
sudo apt install gedit
this will install Gedit
Gedit
is a simple text editor which is commonly used to edit system files
next run,
Bash:
sudo gedit /etc/default/grub
This will open a text document in gedit
If it asks for password then type it
Now the usual default format of the text document is like this:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
Now you will see GRUB_TIMEOUT_STYLE=hidden
here replace the hidden from menu
next
in GRUB_TIMEOUT=0 change 0 from any number this is for how many seconds the grub menu should be visible, I recommend replacing 0 from 30.
thats it! save the file and run the command:
Bash:
sudo update-grub
and
Bash:
sudo update-grub2
Reboot now you should be able to see chromeOS in your menu!
Credits,
• Google
• Android
• ChromeOS Devs
• GitHub
• XDA
• Brunch
• Project Croissant
• Me
-Manav Harsana
possible windows 11?
ismatovvsanjarbek said:
possible windows 11?
Click to expand...
Click to collapse
This thread is for linux, I will add for windows
ismatovvsanjarbek said:
possible windows 11?
Click to expand...
Click to collapse
Added tutorial for windows!
Cygwin uses less data (and storage space) than the WSL route, right?
Also from what I understand there's no need to setup a dedicated partition for brunch? I had used Puppy Linux earlier where the file system could be located in a folder.
Edit: Cygwin does indeed use very little data no more than 30MB downloaded in the default config.
Edit2: Couldn't run the commands in Cygwin. Some error about sudo not being found. WSL2 was easy to install and didn't take more than 500MB data.
amn1987 said:
Cygwin uses less data (and storage space) than the WSL route, right?
Also from what I understand there's no need to setup a dedicated partition for brunch? I had used Puppy Linux earlier where the file system could be located in a folder.
Edit: Cygwin does indeed use very little data no more than 30MB downloaded in the default config.
Edit2: Couldn't run the commands in Cygwin. Some error about sudo not being found. WSL2 was easy to install and didn't take more than 500MB data.
Click to expand...
Click to collapse
I mean we can install it but 1. Its better to keep it clean ig 2. I am lazy im not gonna add another method for sometime atleaset. For that Cygwin thing idk I use Arch btw so idk about cygwin and stuff
I cant find the way to download beta or dev image, https://chromiumdash.appspot.com/serving-builds?deviceCategory=Chrome OS only allow download stable version
oldman20 said:
I cant find the way to download beta or dev image, https://chromiumdash.appspot.com/serving-builds?deviceCategory=Chrome OS only allow download stable version
Click to expand...
Click to collapse
Thats because the dev or beta build for the model may not be their, wait it out or try someother image

Categories

Resources