Post Reply

Prompt Ubuntu for N80xx

OP X-Stranger

4th December 2013, 12:34 PM   |  #1  
X-Stranger's Avatar
OP Senior Member
Thanks Meter: 193
 
157 posts
Join Date:Joined: Sep 2008
Donate to Me
More


In addition to GNU/Linux@N80XX topic, this one is a separate for Ubuntu users. Read below if you want to have native Ubuntu 13.10 wih Gnome/LDXE/XFCE at your Galaxy Note 10.1 device (2012 models only).

Screenshots:
Click image for larger version

Name:	1.jpg
Views:	1731
Size:	71.6 KB
ID:	2432486 Click image for larger version

Name:	2.jpg
Views:	1710
Size:	91.2 KB
ID:	2432487 Click image for larger version

Name:	3.jpg
Views:	2050
Size:	94.6 KB
ID:	2432488

Please be aware, that stuff I share with you is experimental, it does not work 100% correctly and there are some lags and bugs.

Some technical details:
The approach is based on using custom recovery (e.g. custom kernel and initrd image) which boots into Linux. All Linux files are stored at data partition (it is mmcblk0p12 when using standard firmware, which also is internal sdcard) in a separate folder. Initrd script mounts data partition and looks for the special file /media/rootdev - this file contains the path to the Linux root folder. Script sets the Linux root device to be this folder specified and invokes /sbin/init. You see Linux booting - Ubuntu in our case.

However I've also prepared the second folder with native recovery files. E.g. if you change rootdev content to point to recovery files folder, you will boot into recovery. Generally, you can boot any other recovery or Linux distro using this approach. And hosting it at sdcard in a folder much easier than re-partitioning tablet or using loop-device in a file. Free space for your Linux depends only of free space you have at data partition.


Prerequisites:
  • Rooted GT-N80xx device
  • Busybox tools installed
  • Desktop computer with ADB tools
  • Custom recovery image (with or without menu), native recovery, Ubuntu image files downloaded (see downloads section)
  • Understanding of what are you doing

Downloads:
Steps:
  1. Connect your device to the desktop computer with USB cable. Make sure your device is visible when you run "adb devices"
  2. Rename downloaded recovery image to "recovery.img"
  3. Upload downloaded files to the internal memory:
    Code:
    adb push recovery.img /sdcard/
    adb push recovery.tar.gz /sdcard/
    adb push ubuntu.tar.gz /sdcard/
  4. Now you need to get into device, so run "adb shell", then type the next commands (the lines beginning from # are the comments, you don't need to type it ):
Code:
# 4. become root user
su -
# 5. go to the internal sdcard real path, where you uploaded files
cd /data/media

# 6. write custom recovery to the special partition, by default it is mmcblk0p6
dd if=./recovery.img of=/dev/block/mmcblk0p6

# 7. unpack native recovery files, the "recovery" folder will be created
gunzip -c ./recovery.tar.gz | tar -x

# 8. unpack Ubuntu files, the "ubuntu" folder will be created
gunzip -c ./ubuntu.tar.gz | tar -x

# 9.1. Now, if you downloaded custom recovery without menu - set what to 
#      boot, in our case it is Ubuntu, and go to step #10
echo "/media/ubuntu" > ./rootdev

# 9.2. OR, if you downloaded custom recovery with menu - add menu entries
echo "Ubuntu=/media/ubuntu" > ./rootdev
echo "Recovery=/media/recovery" >> ./rootdev
echo "Reboot=reboot" >> ./rootdev

# 10. remove files that we don't need anymore and quit
rm ./recovery.img ./recovery.tar.gz ./ubuntu.tar.gz
exit
exit
Now you should reboot your device to recovery mode. If you did all correctly (and I did not miss anything in steps) you should see Linux booting (and menu if you are using custom recovery with menu).
Please use your S-Pen as mouse, button on the pen works as "right-click".
The password for root user and android user is "q" (small q-letter without quotes).

Notes:
  • The Ubuntu image I shared with you is v13.10 and Gnome-based (Unity does not work due to Compiz issues).
  • Regular Gnome session works at most, but have some bugs, due to 3D acceleration support issues. For example, window dragging does not work and the session hangs (sorry, I have not found why, please fix if you can and share your workaround with us).
  • Gnome Fallback works better, but might not start properly from the first time. E.g. you should boot to regular Gnome session, then log out and login to Fallback (also have no idea why it works like this, please help if have experience).
  • Due to the issues with Gnome, I've also installed LXDE and XFCE, so you could try login to it. However I would recommend booting to regular Gnome session at least to configure your Wi-Fi connection.
  • Internal and external sdcards are mounted to /mnt/intSdCard and /mnt/extSdCard paths.

Important notes:
  • The Ubuntu image has ADB installed. E.g. if something goes wrong at the screen and you are not able to manage your device, connect it to the desktop with USB cable, run "adb shell", then "sudo su -" and you become root user. To restart graphical session you need to invoke "service gdm restart" command.
  • If you are using custom recovery without menu and want to boot native recovery instead of Ubuntu, edit "rootdev" file at internal sdcard to contain "/media/recovery" path (without quotes). You can do that via ADB shell, using any Android text editor, or directly from Linux.
The last thing to know:
Not all is working from Ubuntu. Currently there is no 3G support and some other things. All of them are discussed in the parent thread

Please let me know if I have missed something and my steps do not work for you. Any other feedback will also be appreciated
Last edited by X-Stranger; 16th December 2013 at 02:12 PM.
The Following 19 Users Say Thank You to X-Stranger For This Useful Post: [ View ]
4th December 2013, 02:17 PM   |  #2  
Member
Thanks Meter: 5
 
67 posts
Join Date:Joined: Mar 2012
More
downloading right now... just one question! can i do all this with terminal emulator on android?

edit: forget about that last question, tried from terminal emulator and it worked.
Last edited by dvijetrecine; 4th December 2013 at 06:46 PM.
4th December 2013, 02:54 PM   |  #3  
Member
Thanks Meter: 32
 
32 posts
Join Date:Joined: Oct 2011
Quote:
Originally Posted by X-Stranger



In addition to GNU/Linux@N80XX topic, this one is a separate for Ubuntu users. Read below if you want to have native Ubuntu 13.10 wih Gnome/LDXE/XFCE at your Galaxy Note 10.1 device (2012 models only).

Screenshots:
Attachment 2432486 Attachment 2432487 Attachment 2432488

Please be aware, that stuff I share with you is experimental, it does not work 100% correctly and there are some lags and bugs.

Some technical details:
The approach is based on using custom recovery (e.g. custom kernel and initrd image) which boots into Linux. All Linux files are stored at data partition (it is mmcblk0p12 when using standard firmware, which also is internal sdcard) in a separate folder. Initrd script mounts data partition and looks for the special file /media/rootdev - this file contains the path to the Linux root folder. Script sets the Linux root device to be this folder specified and invokes /sbin/init. You see Linux booting - Ubuntu in our case.

However I've also prepared the second folder with native recovery files. E.g. if you change rootdev content to point to recovery files folder, you will boot into recovery. Generally, you can boot any other recovery or Linux distro using this approach. And hosting it at sdcard in a folder much easier than re-partitioning tablet or using loop-device in a file. Free space for your Linux depends only of free space you have at data partition.


Prerequisites:

  • Rooted GT-N80xx device
  • Busybox tools installed
  • Desktop computer with ADB tools
  • 3 files downloaded (see downloads section)
  • Understanding of what are you doing

Downloads:
Steps:
  1. Connect your device to the desktop computer with USB cable. Make sure your device is visible when you run "adb devices"
  2. Upload downloaded files to the internal memory:
    Code:
    adb push recovery.img /sdcard/
    adb push recovery.tar.gz /sdcard/
    adb push ubuntu.tar.gz /sdcard/
  3. Now you need to get into device, so run "adb shell", then type the next commands (the lines beginning from # are the comments, you don't need to type it ):
Code:
# 4. become root user
su -
# 5. go to the internal sdcard real path, where you uploaded files
cd /data/media

# 6. write custom recovery to the special partition, by default it is mmcblk0p6
dd if=./recovery.img of=/dev/block/mmcblk0p6

# 7. unpack native recovery files, the "recovery" folder will be created
gunzip -c ./recovery.tar.gz | tar -x

# 8. unpack Ubuntu files, the "ubuntu" folder will be created
gunzip -c ./ubuntu.tar.gz | tar -x

# 9. set what to boot, we want Ubuntu
echo "/media/ubuntu" > ./rootdev

# 10. remove files that we don't need anymore and quit
rm ./recovery.img ./recovery.tar.gz ./ubuntu.tar.gz
exit
exit
Now you should reboot your device to recovery mode. If you did all correctly (and I did not miss anything in steps) you should see Linux booting.
Please use your S-Pen as mouse, button on the pen works as "right-click".
The password for root user and android user is "q" (small q-letter without quotes).

Notes:
  • The Ubuntu image I shared with you is v13.10 and Gnome-based (Unity does not work due to Compiz issues).
  • Regular Gnome session works at most, but have some bugs, due to 3D acceleration support issues. For example, window dragging does not work and the session hangs (sorry, I have not found why, please fix if you can and share your workaround with us).
  • Gnome Fallback works better, but might not start properly from the first time. E.g. you should boot to regular Gnome session, then log out and login to Fallback (also have no idea why it works like this, please help if have experience).
  • Due to the issues with Gnome, I've also installed LXDE and XFCE, so you could try login to it. However I would recommend booting to regular Gnome session at least to configure your Wi-Fi connection.
  • Internal and external sdcards are mounted to /mnt/intSdCard and /mnt/extSdCard paths.

Important notes:
  • The Ubuntu image has ADB installed. E.g. if something goes wrong at the screen and you are not able to manage your device, connect it to the desktop with USB cable, run "adb shell", then "sudo su -" and you become root user. To restart graphical session you need to invoke "service gdm restart" command.
  • If you want to boot native recovery instead of Ubuntu, edit "rootdev" file at internal sdcard to contain "/media/recovery" path (without quotes). You can do that via ADB shell, using any Android text editor, or directly from Linux.
The last thing to know:
Not all is working from Ubuntu. Currently there is no 3G support and some other things. All of them are discussed in the parent thread

Please let me know if I have missed something and my steps do not work for you. Any other feedback will also be appreciated

Hi! What about the Source Code for your custom recovery and stuff?
The Following User Says Thank You to Simon94 For This Useful Post: [ View ]
5th December 2013, 03:08 AM   |  #4  
Junior Member
Thanks Meter: 8
 
24 posts
Join Date:Joined: Nov 2013
Quote:
Originally Posted by Simon94

Hi! What about the Source Code for your custom recovery

In ubuntu or debian:

Code:
apt-get install abootimg
abootimg -x recovery-1.img
After this you will have a folder with all the contents of the img. Some of which you can edit the scripts. You can extract the initrd and kernel even further with abootimg-unpack-initrd
5th December 2013, 11:37 AM   |  #5  
Member
Thanks Meter: 5
 
67 posts
Join Date:Joined: Mar 2012
More
i must say this is pretty awesome very few bugs, and xfce works perfect
6th December 2013, 01:58 AM   |  #6  
Liquidmetal6's Avatar
Senior Member
Maryland
Thanks Meter: 5
 
132 posts
Join Date:Joined: Mar 2012
Can't risk ruining my tablet until after the semester ends but as soon as it does I'll be trying this! Sounds awesome...
6th December 2013, 06:09 AM   |  #7  
Senior Member
Thanks Meter: 21
 
186 posts
Join Date:Joined: Mar 2010
More
THANK YOU, and THANK YOU for returning! Note 10.1 is currently in hands of Samsung for repairs. Hopefully I can have some fun with this once it is back.

Please check drivers here: http://forum.xda-developers.com/show...7#post45340017

I think the driver for Mali acceleration may be possible (you are using Hardkernel from ODROID, correct?).
6th December 2013, 09:38 AM   |  #8  
X-Stranger's Avatar
OP Senior Member
Thanks Meter: 193
 
157 posts
Join Date:Joined: Sep 2008
Donate to Me
More
Quote:
Originally Posted by Simon94

Hi! What about the Source Code for your custom recovery and stuff?

My latest kernel sources (arch branch) and toolchain (in the toolchain branch): https://github.com/X-Stranger/N8000
Kernel sources, patched video driver and other stuff: https://code.google.com/p/opensgn/
Recovery can be unpacked/fixed/repacked using abootimg tools as mentioned
The Following User Says Thank You to X-Stranger For This Useful Post: [ View ]
6th December 2013, 09:42 AM   |  #9  
X-Stranger's Avatar
OP Senior Member
Thanks Meter: 193
 
157 posts
Join Date:Joined: Sep 2008
Donate to Me
More
Quote:
Originally Posted by dwegiel

THANK YOU, and THANK YOU for returning!

Don't forget to press "thanks" button (or even "donate to me" )

Quote:
Originally Posted by dwegiel

Note 10.1 is currently in hands of Samsung for repairs. Hopefully I can have some fun with this once it is back.

Please check drivers here: http://forum.xda-developers.com/show...7#post45340017

I think the driver for Mali acceleration may be possible (you are using Hardkernel from ODROID, correct?).

Yes, I'm using Mali acceleration in my Ubuntu image. It is still not 100% working though, that is what I'm talking about, when describe Gnome issues. If you can fix that - please do and share your experience, I'll update the image then.

I would also like someone to help with migration to the latest kernel, which has support for our Exynos board. Exception13 was going to do that, but looks like he is very busy person (and I can understand that).
The Following 2 Users Say Thank You to X-Stranger For This Useful Post: [ View ]
6th December 2013, 01:00 PM   |  #10  
X-Stranger's Avatar
OP Senior Member
Thanks Meter: 193
 
157 posts
Join Date:Joined: Sep 2008
Donate to Me
More
Lightbulb
Have composed a small menu program and added it to custom initrd. Now it is possible to select what to boot (see screenshot), e.g. don't need to edit rootdev file every time, only when adding new menu entry.

Click image for larger version

Name:	menu.png
Views:	488
Size:	1.3 KB
ID:	2436305

Updated first post of this topic with instructions how to get this.
Last edited by X-Stranger; 6th December 2013 at 01:36 PM.

The Following 3 Users Say Thank You to X-Stranger For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
galaxy, linux, n8000, note, ubuntu
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Top Threads in Galaxy Note 10.1 General by ThreadRank