[Q] Consfusion with changing MAC address when flashing custom JB Roms - Eee Pad Transformer Q&A, Help & Troubleshooting

Hi everybody,
<begin digression>
I'm a longtime reader of the forums, first time poster. I own a TF101 (SBK2+, rooted 9.2.1.27 stock). Considering that Asus is taking forever to officially tell us if they are pushing a Jelly Bean Update (waiting since November), I decided to take the plunge into flashing custom JB ROMs. The approach I took included using the razorclaw utility (when I rooted my tablet this past spring, apparently the .su file was incorrectly placed in the wrong subfolder of system, so the clockworkmod recovery couldn't see the rooted status). After using that, I flashed the clockworkmod recovery (3.2.1 I do believe). Before each attempt I would clear the dalvik cache, the regular cache, and restore to factory defaults. The custom JB ROMs I tried were the EOS ROMs (82,90), CM10 (v6,20120107-Nightly). Since I was having problems, I would always started at square one again with the razorclaw utility (and left the team rouge FX CWM as it was). After more trying (and not getting excepted results), trying to reinstall the stock Rom with team rouge resulted in an error code 7, forcing me to install TWRP-2.2 to flash the stock Rom. I ended up in a stuck boot screen with no recover, forcing an APX connection to NV_flash. Right now I back on the stock Rom.
</digression>
What I noticed was that in all the custom JB ROMs I tried, I couldn't connect to my router (currently using a hidden SSID with MAC filtering). Checking my routers log the MAC Address was altered (restoring to stock clears this problem).
Why is this MAC address problem consistent across all the ROMs I tried?
(note: I tired looking though the fourms for about 45 mins and couldn't find a posting about this, only one I could find were, 'how to change the MAC address/MAC spoofing')

Here's how to spoof (make sure the adapter is enabled) through ADB or terminal:
su
busybox ifconfig wlan0 ( to see the current mac address)
busybox ifconfig wlan0 hw ether 00:00:00:00:00:00
I'm not a dev so I can't answer your question about why the MAC is being forged, I'll leave that to the experts.
Edit: See this post.

trying terminal via superuser:
the terminal notes (after privileged EXEC mode level command: busybox ifconfig wlan0 hw ether XX:XX:XX:XX9:F4) that the MAC address is the D9:F4 while the the about tablet status notes it as XX:XX:XX:7C:60. Powercycling the wifi does not change the seen MAC address. As a side note, the 7C:60 MAC Address does remain constant
as a side note, it's kinda funny how the privileged EXEC mode level command uses ifconfig instead of ipconfig (took two cisco CCNA classes back in 2008 hence my usage of the Cisco IOS terms)
(flashed 10-20130107-Nightly-tf101 ROM, with [email protected] #1 Kernel Version)

You can try this I guess, worth a try. I read (but I can't find it now...) that you need to "disable" the card in command line, change the MAC, then enable it (but not through the android menu) for it to work on some devices. You could also submit a bug report to TeamEOS, they should fix it rather quickly.
About your note, ifconfig (interface config) is the BSD developed utility for managing network interfaces. Variations and other branches are available for other *nix OSes. In Linux it replaced the legacy "ip" command to manually configure interfaces. ipconfig (internet protocol config) on the other hand, is the Microsoft equivalent.
Edit again: See this

I'm going to try and systematicly go though each ROM and post screenshots with text annotations
Baseband information:
ASUS Eeepad Transformer TF101
Serial number starting with: C10KA (SBK2+)
Factory MAC address ending with: D9:F4
Home network security: Hidden SSID with MAC address filtering
Recovery program used: Team Win Recovery Project version 2.3.2.3
Process used to flash ROM images:
Wipe>Interntal Storage
Wipe>System
Wipe>Dalvik Cache
Wipe>Cache
Wipe>Factory Reset
Install>Using External SD>(ROM zip files)
For Nightly of Cyanogen Mod 10 from 2013-01-07 (md5: 32083ecd6e159b06168716f898ec405b)

possible reason to changing MAC problem?
This is not intended as a double post, but looking though the files, I think I may have found a possible problem;
I'm able to run 'Android Revolution HD-EeePad 3.6' with no problem. Comparing its wpa_supplicant entries
(wpa_supplicant and wpa_supplicant2) I noticed that the CM ROM's have wpa_supplicant and wpa_cli instead
is it possible that the EOS and CM ROM's are missing data provided in the wpa_supplicant files (or is the file missing by the way JellyBean handles wireless connections)?
attached are the files

(bump)
Trying some JB roms including jelly_tf_101, I'm still getting a different MAC address (04:46:65:bc:7c:60). Looking in the nvram, I could ot find this MAC address, instead a #macaddr=00:90:4c:c5:00:34 and a macaddr=XX:XX:XX:XX:d9:f4. I tried copying the nvram.txt file, modifing the the #macaddr line of code to the d9:f4, booting into recovery, replacing the nvram.txt and rebooting into system. No bloody change.
<rant>
I'm getting bloody irrated at the fact that what is supposed to be simple isn't doing jack. I've tried terminal to modify this stupid file. What the heck is going on that is forcing these ROM's to completely disregurad the orginal MAC address?
</rant>

I'd suggest asking their authors in the respective threads to get an answer for each rom. Some files are only used by binary firmware and these roms don't use that. Stuck in the same scenario with the left speaker fix.

Related

[GUIDE] OpenVPN for Dummies

Thanks to all the developers who put the bits & pieces together; without them it wouldn't be possible. You don't need to be an Android or Linux guru to get it working - SDK, ADB, etc. are not required.
What is OpenVPN?
OpenVPN is a free and open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses SSL/TLS security for encryption and is capable of traversing network address translators (NATs) and firewalls.
What's Covered in this Guide:
A step by step tutorial for configuring OpenVPN on the Evo 4G. Use at your own risk!
Not Covered:
Yea but how do I?
Requirements:
Rooted Evo
USB Data Cable
Amon RA Recovery - RA-evo-v1.8.0 (or above)
http://files.androidspin.com/downloads.php?dir=amon_ra/RECOVERY/&file=recovery-RA-evo-v1.8.0.img
Terminal Emulator (download from market)
Super Manager (download from market)
Busybox (download from market)
OpenVPN Installer (download from market)
OpenVPN Settings (download from market)
Tun.ko built for your specific kernel (recommend netarchy-toastmod, Stable: 4.1.9.1 or higher)
http://forum.xda-developers.com/showthread.php?t=719763&highlight=amon
Modified openvpn executable & matching iproute-wrapper script.
http://forum.xda-developers.com/attachment.php?attachmentid=385959&d=1282516002
An OpenVPN Account & config files.
GTech Net Tools (download from market).
Let's begin.
Root your Evo if not already done.
Install GTech Net Tools & run; select My IP & Get IP Address; External Address & Local Information are issued from your cell provider data network; record these values for later comparison.
Install Amon RA.
Install Busybox to /system/xbin.
Install OpenVPN Installer (binaries) to /system/xbin; select path to ifconfig: /system/xbin.
Install OpenVPN Settings (settings later in this guide).
Install custom kernel with built in tun.ko support; flash via Amon RA recovery & reboot.
Install Terminal Emulator.
Install Super Manager.
Open your openvpn config file & add the following to the last line, then save: 'iproute /system/xbin/iproute-wrapper.sh'.
***Make sure your config.ovpn file has NO_SPACES in name***
Connect Evo to PC via USB cable; select 'Disk Drive' & 'Done'.
Create folders on SDCard 'Downloads' (if not already there), and 'openvpn'.
Copy your config.ovpn files to SDCard/openvpn folder
Copy 'openvpn' & 'iproute-wrapper.sh' to Downloads folder on SDCard.
Disconnect USB cable.
Start Super Manager; select Settings; Enable ROOT function; press back button on phone; browse to SDCard/Downloads - copy & paste 'openvpn' & 'iproute-wrapper.sh' to /system/xbin.
Start Terminal Emulator.
@ $, type su & enter key; should now see #
Type 'chmod 755 /system/xbin/openvpn' & enter; then type 'exit' & enter.
Start Super Manager; select Settings; disable ROOT function.
Press Home button on phone.
Start OpenVPN Settings; press 'menu' button on phone; select 'advanced'; check 'load tun kernel module'.
Click 'TUN modules settings'; Check Load module using 'insmod'.
Enter Path to tun module: '/system/lib/modules/tun.ko'.
Select 'path to openvpn binary'; enter '/system/xbin/openvpn'.
Check 'Fix HTC Routes'.
Press Back button on phone.
Check OpenVPN; check your_server.ovpn; 'Username/Password required' should appear on Status bar at top of phone.
Slide Status bar down, click on 'Username/Password required', enter info & click 'OK'.
Under yourserver.ovpn view status - Wait for 'connecting...auth...get config'...should be 'connected to 111.111.111.111 as 222.222.222.222'.
Start GTech Net Tools; select My IP & Get IP Address; External Address & Local Information should now be issued from your OpenVPN provider; compare to original data you recorded earlier.
Press Home button on phone...do you see the 'Key' icon on Status bar?
If Yes.............You have done it!
Additional Resources:
OpenVPN
http://openvpn.net/
Wikipedia - OpenVPN
http://en.wikipedia.org/wiki/Openvpn
Enjoy!
Check 1st post for revisions & updates.
Thanks for the write up. However, can you dumb it down one more level. I started looking at OpenVPN when I realized that the Android VPN was broken. I have configured Windows VPN for my home Windows PC, but I assume that it won't directly work with OpenVPN.
What do I need to do to configure my PC?
I assume once I understand that, I'll also understand what you mean by "An OpenVPN account & Config Files.
I appreciate your help.
The guide is limited to OpenVPN on the Evo 4G Android platform.
I have a question also. I am stuck at the Open your openvpn config file & add the following to the last line, then save: 'iproute /system/xbin/iproute-wrapper.sh" step. Is this on the EVO or on the OpenVPN account?
Also, I signed up for the OpenVPN account and am using a Macbook-with Windows 7 installed via Parallels, an iMac and another laptop running Linux Ubuntu. Which program do I download for my setup on the OpenVPN site so that they all work? I don't see one for OSX? I have tried the EVOVPN app and it works great just for the phone....but computers won't hook up even though I have them set up using the same LAN settings.
I am hoping for something that will let me use a secure server using the EVO connecting all of my computers.
Thanks for your help and for the guide and for any advice you could share. Have a great day!
Good questions - focus on keeping things simple.
1Brite1 said:
I am stuck at the Open your openvpn config file & add the following to the last line, then save: 'iproute /system/xbin/iproute-wrapper.sh" step. Is this on the EVO or on the OpenVPN account?
Click to expand...
Click to collapse
Your OpenVPN provider posts config files to download required for their service to work. Normally no editing is necessary, but for Android it is at least for now (*more on why later).
Their config files package may include many different types of files, look for the one with .ovpn extension (there may be several - server_1.ovpn, server_2.ovpn, etc.); open the file(s) with your text editor; normally the last line of this file is 'auth-user-pass'; create a new last line 'iproute /system/xbin/iproute-wrapper.sh' (without quotation marks) and save. Copy this edited file & any other config files your provider requires to the Evo /sdcard/openvpn folder you created earlier.
1Brite1 said:
I signed up for the OpenVPN account and am using a Macbook-with Windows 7 installed via Parallels, an iMac and another laptop running Linux Ubuntu. Which program do I download for my setup on the OpenVPN site so that they all work? I don't see one for OSX? I have tried the EVOVPN app and it works great just for the phone....but computers won't hook up even though I have them set up using the same LAN settings.
Click to expand...
Click to collapse
The good news is whatever OpenVPN service provider you choose, it should work with whatever device you have. However, each operating system has different requirements, so there are clients specific to each of these OS's. For example, Windows client = openvpn client, Linux = gopenvpn, etc. For the Evo, & Android in general, the client is 'OpenVPN Settings', setup of which is included in the guide. 'EVOVPN' is not 'OpenVPN', we're not sure what it is, they don't offer any support or documentation; advise to stay away until more info is available.
1Brite1 said:
I am hoping for something that will let me use a secure server using the EVO connecting all of my computers.
Click to expand...
Click to collapse
As above, only one service provider is needed, the clients vary by operating system. If you're referring to remotely accessing your other computers via the Evo with OpenVPN running, well yes that works but is not covered here; setup for that would be the same whether or not you use OpenVPN.
*The edit to .ovpn config file is required at this time to let the Android client know which routing table is being used; it may become unnecessary with future updates.
Thank you sc10000.....I appreciate your time...nothing more frustrating than asking a question and never getting an answer or one that is so informative. I will try the set-up again...but I see also that you have to pay for the OpenVPN service. I have an OpenDNS account and wonder if that is the same type of service and it is free but not sure if it will work with EVO. I will look into that option also as I know I used to use that for my Linux system. But, as you said, that may be just operating system specific. Again, thank you for elaborating!!! Now, I get it.
Thanks for the tutorial sc10000. I just wanted to put a little bit of input into the mix.
OpenDNS is quite different from OpenVPN. OpenVPN is strictly for users who need to encrypt their connection and/or connect to another 'network' such as their work or school network. A lot of other people use OpenVPN for other reason (i.e., watch Hulu from another country outside of the US, etc.).
I use Private Internet Access ( privateinternetaccess.com ) as an OpenVPN provider and it works with your tutorial. Other great providers are listed here:
Private Internet Access ( privateinternetaccess.com )
WiTopia ( witopia.net )
Strong VPN ( strongvpn.com )
There are a few others, but I would stick to the big three for safety.
Some other great providers not listed above:
Anonyproz - anonyproz.com
blackvpn - blackvpn.com
There are many out there, find one that suits you.
I keep getting
FATAL:Linux ip link set failed: could not execute external program
I checked the permissions on the files and they are executabled, I checked the iproute-wrapper.sh script and it was looking for ip in /system/bin my EVO did not have it there but it was in /system/xbin so I changed that too.
I don't recommend changing anything in the scripts or files. Go back to guide & make sure you have completed all the steps exactly. Possibly you have installed something in a different location, etc.
If still not working, then try a different kernel - you did replace the kernel right?
This one is working as of now, with ROM 3.70.651.1
netarchy-toastmod-4.3-bfs-nohavs-noUV-sbc-universal (No Undervolting)
I am on CM 6.1.1 and using 12/25/10 - SBC for BC's Kernel SBC-bcnice-stable-v7.zip (2.62 MB) Kernel
sc10000, what purpose would vpn serve on the cell phone for general usage? I can understand if connecting to a company vpn for access to their network.
What would the application be? Why would I want/need vpn (openvpn) on my android device?
gpz1100 said:
Why would I want/need vpn (openvpn) on my android device
Click to expand...
Click to collapse
Why would you volunteer your unprotected data to anyone who seeks it?
Right, but why would I be connecting to my network using the handset? I'd have the vpn client running on my laptop or netbook.
gpz1100 said:
why would I be connecting to my network using the handset? I'd have the vpn client running on my laptop or netbook.
Click to expand...
Click to collapse
vpn is not openvpn. Why would you connect any device to the internet without security?
Big brother is watching. Really.
I was hacking away at this last night, but haven't been successful in getting my vpn connection up and running.
I have copied my openvpn config from my linux box and have gone over the instructions multiple times to verify, but keep getting the following error in the log:
D/OpenVPNDaemonEnabler( 963): Received OpenVPN daemon state changed from Unknown to Disabled
D/OpenVPNDaemonEnabler( 963): Received OpenVPN network state changed from Connected to Exiting
D/OpenVPN-DaemonMonitor[/sdcard/download/openvpn/connect.ovpn]-mgmt( 963): attach(): using management port at 27860
E/OpenVPN-DaemonMonitor[/sdcard/download/openvpn/connect.ovpn]-mgmt( 963): attaching to OpenVPN daemon: /127.0.0.1:27860 - Connection refused
W/OpenVPN-DaemonMonitor[/sdcard/download/openvpn/connect.ovpn]( 963): start(): choosing random port for management interface: 32537
D/OpenVPN-DaemonMonitor[/sdcard/download/openvpn/connect.ovpn]-daemon( 963): invoking external process: /system/bin/su
D/OpenVPN-DaemonMonitor[/sdcard/download/openvpn/connect.ovpn]-daemon( 963): invoking command line: /system/xbin/openvpn --cd '/sdcard/download/openvpn' --config 'connect.ovpn' --writepid '/data/data/de.schaeuffelhut.android.openvpn/files/com.d/_sdcard_download_openvpn_connect.ovpn-pid' --script-security 1 --management 127.0.0.1 32537 --management-query-passwords
D/OpenVPNDaemonEnabler( 963): Received OpenVPN daemon state changed from Unknown to Startup
D/OpenVPNDaemonEnabler( 963): Received OpenVPN daemon state changed from Unknown to Disabled
D/su ( 4167): 10165 de.schaeuffelhut.android.openvpn executing 0 /system/bin/sh using shell /system/bin/sh : sh
D/OpenVPN-DaemonMonitor[/sdcard/download/openvpn/connect.ovpn]-daemon-stdout( 963): Options error: Unrecognized option or missing parameter(s) in connect.ovpn:22: iproute (2.1.1)
D/OpenVPN-DaemonMonitor[/sdcard/download/openvpn/connect.ovpn]-daemon-stdout( 963): Use --help for more information.
I/OpenVPN-DaemonMonitor[/sdcard/download/openvpn/connect.ovpn]-daemon-stderr( 963): terminated
I/OpenVPN-DaemonMonitor[/sdcard/download/openvpn/connect.ovpn]-daemon-stdout( 963): terminated
Click to expand...
Click to collapse
If I comment out the "iproute /system/xbin/iproute-wrapper.sh" from my config file, then the vpn will say it is connected, but I won't be able to access anything.
Any help is appreciated!
enormous said:
If I comment out the "iproute /system/xbin/iproute-wrapper.sh" from my config file, then the vpn will say it is connected, but I won't be able to access anything.
Click to expand...
Click to collapse
Most likely a kernel issue, try replacing with one that has known tun.ko support. Do not comment out 'iproute /system/xbin/iproute-wrapper.sh' or it won't work.
So I follow these steps EXACTLY yesterday (Evio 1.7.7 rom; Netarchys latest stable kernel) and I was able to connect! The tun.ko I used was one I found i believe for the Desire.. but it seemed to work, and I was able to ping my DB server at the data center.
After a restart last night, today I try and re-connect and continue to get "cannot allocate tun tap dev dynamically"
I checked permissions on tun.ko and openvpn but still having issues. WEIRD that it worked and restart causes it to fail now
Any ideas are appreciated as this will be very convenient for work! Thanks!
UPDATE: I just flashed Ziggy471's kernel (Jan 21 2011) and rebooted..
I disabled the "Load tun.ko module" from the advanced settings in OpenVPN Settings app, and connected fine again! so it apparently is using the built-in tun.ko driver in the kernel.
Just followed the directions to setup openvpn binary, openvpn settings paths, EXCLUDING the "load tun.ko module" check box and I am GOOOOOOD!
Thanks!

[Q&A] How to build/modify your own linux image for eMMC install Debian sample inside

[Q&A] How to build/modify your own linux image for eMMC install Debian sample inside
This thread is for help and support with all linux distributions instalable in eeepad asus transformer. I will explain how to build your own image file or modify existing one in order to use lilstive OLife script.
As ubuntu is the most popular distro, please, all de questions related with ubuntu post them in lilstevie's thread.
You can install any distribution with arm architecture support, but you'll need to make some tweaks in the image in order to work propperly. As my experience in linux is most of it related with debian is the distro i will give the best support, but i'll try to answer every question you ask.
I've chosen debian armHardFloat port instead of debian armel fore many reasons, you can read about this port here:
http : //wiki. debian.org/ArmHardFloatPort
This port is still young so right now there are packages still unaviable to install but they are entering in wheeze day to day. If you preffer to use armel instead or armhf you can always do, you will loose improvement but you will have (at the time of writting this) less packages aviable. In the future (not far away) it will be the best option.
Building your own image:
There are many ways to create a image file but because we are going to need qemu in order to debootstrap the instalation the easiest way to create it is with qemu-img
Code:
qemu-img create debian-armhf.img 400M
I have only given 400M of space because is going to be a minimal instalation without desktop enviroment, it could be smaller but, just in case, that's the size i've chosen. The transfer with OLife it will be faster if the image is smaller.
When you boot for your first time you will find an error because there is no valid MSDOS partition table, this is ok, nothing happens because of that but if you want to avoid it use fdisk to create a partition table
Code:
fdisk debian-armhf.img
we need now to give format to the filesistem:
Code:
mkfs.ext4 debian-armhf.img
It will ask if you really want to do because it's not an ordinary partition and you have to type "s" to proceed
Now whe have ready the image and we have to mount it in some folder to install debian in it:
Code:
mount -o loop debian-armhf.img debian
asuming debian as the created folder for that.
We are ready to debootstrap de instalation:
Code:
debootstrap --verbose --arch armhf --foreign --include=btrfs-tools,locales,kbd,wpasupplicant wheezy debian http://ftp.de.debian.org/debian
this will make the first step to install wheezy armhf, --foreing parameter is because the target architecture is different from the host one and it's going to stop before de second-stage, it will include the packages btrfs-tools locales and kbd, you can add as many as you want but it will be always faster if you install them manually once installed in the transformer. I didn't install ssh server because i have a dock, but if you don't have it will be needed to complete the instalation with a remote shell, but you can also install packages later with chroot after the second stage.
In order to be able to chroot we will need qemu-user-static, with armhf it's needed 1.0 version with armel it's not necesary, it can be any version not too old. Also if you have an i386 system it's recomendable to install an amd64 kernel to do chroot or debootstrap will fail configuring cron. Actually i think in this sample image there is anacron instead of cron because there was an issue i thought it was related with that but later twb found out the problem was another different and now it's solved.
we will add qemu-arm-static to the instalation to be able to chroot
Code:
cp /usr/bin/qemu-arm-static debian/usr/bin/
we chroot to the new enviroment:
Code:
chroot debian
and execute the second stage of debootstrap:
Code:
./debootstrap/debootstrap --second-stage
After finish the instalation we will set the root password
Code:
passwd
and now it's ready, you can make tweaks, install packages (as ssh if you need it) or whatever you want, but you will have to add a repository to /etc/apt/sources.list in order to install any packages.
In this image and debootstrap proccess i've used german repositories because are the fastest for me, but you can use another one, right now it's neede also experimental repository to have working touch screen, but as soon xserver-xorg-input-evdev with full multitouch support enters sid as it won't be necesary
example of /etc/apt/sources.list
Code:
http://ftp.de.debian.org/debian unstable main contrib non-free
http://ftp.de.debian.org/debian experimental main contrib non-free
I have already installed in this image necesary packages for that and experimental repositories won't interfiere unless you pass the parameter for apt-file so you can forget about this if you want, but if you are building your own image apt-get install -t experimental xserver-xorg will do the work.
we have ready now our image but it need some files and tweaks to make everithing work in the eepad.
From here you can apply this to any arm image you want to test.
(all the files needed are in the attached file files.tar.gz in the rigth folders)
we need to add modules and firmware, i've extracted them from lilstive ubuntu.img
strictly necesary are:
Code:
/lib/firmware/nvram.txt
/lib/firmware/brcm/*
but you may need another ones if you are going to use external hardware, that's on you.
there are also two folder in /lib/modules one is for the asus kernel and the other one for chrome os kernel, i suggest to add both of them because it's just a bit space and you will be able to use the image with both kernels.
In order to make wifi work i've made /etc/modprobe.d/options.conf file with some parameters found in one of the threads of lilstevie and /etc/modules with the modules to load.
You will also need to configure /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf all this files are in the attached files.tar.gz but wpa_supplicant.conf is not because it depends of each ones wifi, but there is a wpa_supplicant.conf.example and you can always google for it a bit. If you don't have a dock make sure you do this correctly or you won't be able to connect to the internet and ssh device to continue instalation easily
if you want to be able to use adb (wich is really usefull if you for example did not correctly configure wpa_supplicant) you will have tu add also "/usr/bin/adbd" and /etc/init.d/adbd"
I've modify the original init.d script to avid LSB tags missing warning error, it's not really necesary rsyslog as previous service started but ... it works.
In order to make adb service start automatically we will execute (inside the chroot of course)
Code:
update-rc.d /etc/init.d/adb defaults
This may be different in non debian based distributions, but you can always ln manually to rcX.d
Finally, there is the "bug" it has made me think something was wrong and change cron with anacron, when you boot it appears to stop booting starting a service (cron, dbus, deppending what you have installed) but it isn't you can login pressing ctrl + alt + F2 (touchpad key),
we think it's related with the bootloader and default tty as 7 or something like that.
As workaround add in /etc/rc.local "chvt 1" (without quotes) just before exit 0 line
Because there is not oem-installation like in ubuntu after the first boot there are a couple of things to do, we have to resize the image to fit the partition, change password, configure locales and xorg keyboard-layout (if you have more than one locales) add an user and include in relevant groups and maybe more in the future so i've made a postinstalation.sh script included in /usr/bin:
Code:
#!/bin/sh
echo "Making online resize of the root partition"
partition=`mount -l | grep " / " | awk '{print $1}'`
resize2fs $partition
echo "changing root password"
passwd
echo "configure locales"
dpkg-reconfigure locales
echo "configure xserver keyboard layout"
dpkg-reconfigure keyboard-configuration
echo "configure localtime"
dpkg-reconfigure tzdata
echo "Please anter a user name"
read username1
adduser $username1
echo "adding user to relevant groups"
adduser $username1 audio
adduser $username1 video
adduser $username1 netdev
adduser $username1 plugdev
adduser $username1 bluetooth
adduser to bluetooth will fil because there is not installed any bluetooth manager so there is not bluetooth group yet, and remeber tu use OLife script to inject bluetooth firmware in order to have bluetooth working.
And that's it i think i haven't miss anything but i will update this when needed. You can now install your image with lilstevie's OLife script, you will have to rename it to ubuntu.img from now. If everithing went ok you can now install the desktop enviroment you prefer, on screen keyboard or whatever you like.
I haven't test network manager and i've only tested kde-netbook, but there are still broken dependencies and it's a bit slow. This will improve as soon as we have hardware acceleration (if we ever do), and armhf port goes ahead.
Lilstevie is going to host my images and maybe OLife script will have more options in the future, but from now you can download from here:
http://dl.dropbox.com/u/60048492/debian-armhf.img.tar.gz
(md5sum inside)
http://dl.dropbox.com/u/60048492/files.tar.gz
All credits and many thanks for lilstevie and twb for all the help they gave me.
I will apreciate any correction not only in this process but also in my english grammar/ortography
Please, any mod or admin can correct the word modufy in the title?
reserved
Thanks
Following your instructions, I can finally replace ubuntu with debian, which resides my home laptops, office desktop, and now, on my tablet as well. Unfortunately debian has no "onboard" package... and it's rather inconvenient without a dock.
Thanks anyway for bring debian to this tablet.
boseliquid said:
Following your instructions, I can finally replace ubuntu with debian, which resides my home laptops, office desktop, and now, on my tablet as well. Unfortunately debian has no "onboard" package... and it's rather inconvenient without a dock.
Thanks anyway for bring debian to this tablet.
Click to expand...
Click to collapse
What has onboard that haven't other onscreen keyboards? i haven't ever tried onboard and i just tried a couple of onboard keyboards in debian, i also did managed to load it automatically in login screen, But i did never went deeper, like "only appear if the focus is in textbox" or something like that.
Anyway i has to be easy to rebuild that package for debian or just install it from ubuntu. What do you exactly need?
onboard onboard
Onboard has keys that simulate middle-click and right-click of mouse. I tried to install ubuntu's deb file, but runs into problem with dependencies. Compiling the source on the tablet led to error related to gdk/gdk.h which i couldn't figure out how to resolve.
Onboard respond better than others, e.g. xvkbd and florence both have run-away key presses, i.e. a string of letters appear even for a quick single tap on a key.
Also, onboard integrates nicely with lightdm. I used xdm plus florence to log in (the screen keyboard hides most of xdm's GUI).
With fluxbox, debian seems faster than ubuntu+fluxbox on the tablet. That's why onboard is nice since fluxbox menu requires right-clicking on the desktop. Fortunately, fluxbox keys are easily configurable, so i still can shutdown by pressing some key combination.
Hopefully lilstevie has the time to work on hardware acceleration, which would then allows to dump android completely.
boseliquid said:
Onboard has keys that simulate middle-click and right-click of mouse. I tried to install ubuntu's deb file, but runs into problem with dependencies. Compiling the source on the tablet led to error related to gdk/gdk.h which i couldn't figure out how to resolve.
Onboard respond better than others, e.g. xvkbd and florence both have run-away key presses, i.e. a string of letters appear even for a quick single tap on a key.
Also, onboard integrates nicely with lightdm. I used xdm plus florence to log in (the screen keyboard hides most of xdm's GUI).
With fluxbox, debian seems faster than ubuntu+fluxbox on the tablet. That's why onboard is nice since fluxbox menu requires right-clicking on the desktop. Fortunately, fluxbox keys are easily configurable, so i still can shutdown by pressing some key combination.
Hopefully lilstevie has the time to work on hardware acceleration, which would then allows to dump android completely.
Click to expand...
Click to collapse
Ok, i'll give it a look and if i can i will build a debian package in order to include it in the image
I've managed to build a couple of packages for onboard. You can't imagine how much crap it's in building dependencies, mono, unity and so many things, so i've removed appindicator dependency because i don't think it's going to be really necesary. The true is that i don't have so much time right now so,
Can you please test it and tell me if you have any problem? I can try to rebuild another older version in order to avoid unity crap and those things without messing the code, but if this works well it's the eassiest solution.
You have to install both packages, the other dependencies are instalable from debian oficial repository, at least i haven't got any problem installing it in my building environment.
http://dl.dropbox.com/u/60048492/onboard_0.95.1-1_all.deb
http://dl.dropbox.com/u/60048492/python-virtkey_0.60.0-1_armel.deb
arch of python-virtkey is armel instead of armhf
Almost there... but obtained the following error msg:
Unpacking onboard (from onboard_0.95.1-1_all.deb) ...
dpkg: dependency problems prevent configuration of onboard:
onboard depends on python-virtkey (>= 0.60.0); however:
Package python-virtkey is not installed.
onboard depends on python-gconf; however:
Package python-gconf is not installed.
dpkg: error processing onboard (--install):
dependency problems - leaving unconfigured
Thanks again.
boseliquid said:
Almost there... but obtained the following error msg:
Unpacking onboard (from onboard_0.95.1-1_all.deb) ...
dpkg: dependency problems prevent configuration of onboard:
onboard depends on python-virtkey (>= 0.60.0); however:
Package python-virtkey is not installed.
onboard depends on python-gconf; however:
Package python-gconf is not installed.
dpkg: error processing onboard (--install):
dependency problems - leaving unconfigured
Thanks again.
Click to expand...
Click to collapse
python-virtkey is provided in my previous post, just install it, after that
#apt-get install -f
will resolve and install automatically pending dependencies.
I've already tried and it works.
EDIT: i have been working in the suppose you are runnin debian armel and not armhf
To get bluetooth working, you need an armhf build of brcm_patchram_plus.
Thankfully it's GPL'd, so here's a copy.
Hi,
I'm having a bit of trouble getting Debian on my TF101 using OLiFE.
I'm forced to use the android/Ubuntu dual-boot option, but that's another story.
Basically, there's a kernel panic and I can't see the entire screen without it rebooting one second later. I am able to flash my TF101 properly without bricking (it's a B60), but everytime I boot it up as my default OS, I get that rebooting screen.
NothingMuchHereToSay said:
Hi,
I'm having a bit of trouble getting Debian on my TF101 using OLiFE.
I'm forced to use the android/Ubuntu dual-boot option, but that's another story.
Basically, there's a kernel panic and I can't see the entire screen without it rebooting one second later. I am able to flash my TF101 properly without bricking (it's a B60), but everytime I boot it up as my default OS, I get that rebooting screen.
Click to expand...
Click to collapse
Kernel panic kinda implies the problem is with the kernel, not with Debian. If you're using the 3.1 kernel, try the 2.6 one by lilstevie. Whichever kernel you're using, you're better off seeking help in one of the kernel-specific threads.
rdnetto said:
Kernel panic kinda implies the problem is with the kernel, not with Debian. If you're using the 3.1 kernel, try the 2.6 one by lilstevie. Whichever kernel you're using, you're better off seeking help in one of the kernel-specific threads.
Click to expand...
Click to collapse
Could or couldn't it may also be a problem with initramfs and boot parameters. I now because i experienced it. So if you give us more information, better, try to record a video of the bootloop and pass it slowly to see the error, i did that and it worked for me
Franks Tools-new modified Ubuntu install
Hello i dont know if this is right thread,i like to ask you advanced users for some help.I wanna install ubuntua via new modified Franks tools by kenshin,released few days ago,i cannot find exact answer what i need to progress.
My questions are: How can i made nvflashable files system.img boot.img recovery.img and others to use franks tools? how to obtain these images?
2.) and if i will use those images that can be found here on forum can i then just flash for example Revolution HD rom? ,or does it destroy my installation of ubuntu via franks tools?
because i know that there is little play with partitions so i am not sure if i can flash any rom after use of franks tools dual boot option.thank you for help
shaola said:
Could or couldn't it may also be a problem with initramfs and boot parameters. I now because i experienced it. So if you give us more information, better, try to record a video of the bootloop and pass it slowly to see the error, i did that and it worked for me
Click to expand...
Click to collapse
I did everything stock and did exactly what you said to do for Debian, though I used the armel architecture and the adb wouldn't work with an error.
By everything stock, I mean that I didn't alter anything from the OLiFE folder except adding the ubuntu.img file.
NothingMuchHereToSay said:
I did everything stock and did exactly what you said to do for Debian, though I used the armel architecture and the adb wouldn't work with an error.
By everything stock, I mean that I didn't alter anything from the OLiFE folder except adding the ubuntu.img file.
Click to expand...
Click to collapse
The original kernel from OLiFE didn't work for me - I had a boot loop. Try manually compiling the lilstevie kernel, or using a kernel from Jhinta's kernel thread.
The packed kernels (CWM zips) for Ubuntu will work exactly the same under Debian. (or at least in the direct mount case - I don't know about loop mount)
i can't get wifi up ... could someone help?
it is shown in iwlist wlan0 scan but i can't find an network ...
while boot it sends many intervals and abort this progress with givin' up.
i just copied li/firmware file from olife.img und files from this thread over it ...
anyone could help please?
NoDiskNoFun said:
i can't get wifi up ... could someone help?
it is shown in iwlist wlan0 scan but i can't find an network ...
while boot it sends many intervals and abort this progress with givin' up.
i just copied li/firmware file from olife.img und files from this thread over it ...
anyone could help please?
Click to expand...
Click to collapse
what are you uing to scan? this driver ony supports wpasupplicant, not iw nor iwconfig
hi,
i installed the ubuntu image with olife on my transformer. i don't like ubuntu very much, i prefer debian which i run debian on my computer as well. i stumbled over this thread so i wondered what's the status of debian on our transformer.
can anyone tell me whats currently working.
hanswurschtus said:
hi,
i installed the ubuntu image with olife on my transformer. i don't like ubuntu very much, i prefer debian which i run debian on my computer as well. i stumbled over this thread so i wondered what's the status of debian on our transformer.
can anyone tell me whats currently working.
Click to expand...
Click to collapse
The same as in ubuntu. But you may need some tweeks. Depends of the kernel you are using. nvidia has released also a beta of the nvidia drivers for armhf and not only armel so you may use armhf or armel with jintha's kernel and have almost everithung working.

[Q] [Dualboot]-[Net-Install] Flash Jhintas Kernel with no Linux Machine available

Hello everybody!
I've just set up a dualboot with ICS/Stock/Rooted as default + Ubuntu as secondary using frankc123's one-click installer with NoDiskNoFun's Net-Install Ubuntu v0.6.
Everything went fine, except it didn't install Jhintas kernel during the Ubuntu install process (net-install) , tried multiple times chosing it being flashed as first, secondary, even building it during install... I've read of others having the same problem on NoDiskNoFun's thread and one user suggested it might be because the Net-Install script can't handle ubuntu being secondary...
So my question is: How do I either flash the Jhinta kernel on top of my Install with no Linux machine available except for the transformer itself
or
how do I change the dualboot order in frank's tool to make ubuntu the default and android the secondary Os (assuming thats really what causes the jhinta kernel not to install during the script)?
I'm really a noob when it comes to stuff like this so help would be greatly appreciated!
Thanks in advance!
I just struggled with the exact same issue today, except I'm using OLiFE instead of frankc123's one-click installer. I finally figured out how to get it working earlier.
There's a file left by net-installer in /Linux_for_Tegra/ named selfbuild.img that has the kernel image that needs to get flashed to your device. I just overwrote the image that contained the 2.6.36 kernel with Jhinta's kernel _after_ finishing all the steps from the net-install scripts. This was a little bit tricky with OLiFE because it builds the image from a few files, so I had to comment out this step to let it flash the provided selfbuild.img as is.
Hope that helps. I can check out what frankc123's one-click installer does if not.
xxaconexx said:
Hello everybody!
I've just set up a dualboot with ICS/Stock/Rooted as default + Ubuntu as secondary using frankc123's one-click installer with NoDiskNoFun's Net-Install Ubuntu v0.6.
Everything went fine, except it didn't install Jhintas kernel during the Ubuntu install process (net-install) , tried multiple times chosing it being flashed as first, secondary, even building it during install... I've read of others having the same problem on NoDiskNoFun's thread and one user suggested it might be because the Net-Install script can't handle ubuntu being secondary...
So my question is: How do I either flash the Jhinta kernel on top of my Install with no Linux machine available except for the transformer itself
or
how do I change the dualboot order in frank's tool to make ubuntu the default and android the secondary Os (assuming thats really what causes the jhinta kernel not to install during the script)?
I'm really a noob when it comes to stuff like this so help would be greatly appreciated!
Thanks in advance!
Click to expand...
Click to collapse
GdmImpulse said:
I just struggled with the exact same issue today, except I'm using OLiFE instead of frankc123's one-click installer. I finally figured out how to get it working earlier.
There's a file left by net-installer in /Linux_for_Tegra/ named selfbuild.img that has the kernel image that needs to get flashed to your device. I just overwrote the image that contained the 2.6.36 kernel with Jhinta's kernel _after_ finishing all the steps from the net-install scripts. This was a little bit tricky with OLiFE because it builds the image from a few files, so I had to comment out this step to let it flash the provided selfbuild.img as is.
Hope that helps. I can check out what frankc123's one-click installer does if not.
Click to expand...
Click to collapse
Hey!
Thanks for the reply! But if I am not mistaken OLiFE is Linux only, or isn't it? Like i said I unfortunately have no access to a Linux machine other than the transformer itself, so I'm stuck with Franks tools, plus while I get the theory behind what you are saying, I have no Idea how to do it myself... I'm really a newbie when it comes to Linux, which is why I'd like to try it out on the TF
Any ideas on how to flash the kernel either during install, or afterwards without OLiFE? Maybe via NVFlash? (Just wildly guessing here)
Thanks!
xxaconexx said:
Hey!
Thanks for the reply! But if I am not mistaken OLiFE is Linux only, or isn't it? Like i said I unfortunately have no access to a Linux machine other than the transformer itself, so I'm stuck with Franks tools, plus while I get the theory behind what you are saying, I have no Idea how to do it myself... I'm really a newbie when it comes to Linux, which is why I'd like to try it out on the TF
Any ideas on how to flash the kernel either during install, or afterwards without OLiFE? Maybe via NVFlash? (Just wildly guessing here)
Thanks!
Click to expand...
Click to collapse
It should definitely work with nvflash since that's what OLiFE is using. From what I can see in the scripts, you can run:
nvflash -r --download <PARTITION> selfbuild.img
Where <PARTITION> is 5 for secondary and 6 for primary (AFAICT, booting net-install from primary doesn't work anyways, so likely this should be 5 for you).
could you by any chance walk me through this? from what you said I'd be guessing to do the following:
put the selfbuild.img into the nvflash folder
open a cmd and navigate inside the folder
plug transformer in apx mode + install drivers
type nvflash -r --download 5 selfbuild.img into the cmd
is that all I have to do? if its really that easy, than wow!
where is the /Linux_for_Tegra/ folder that contains the selfbuild.img located tho? couldn't find it on my TF, and once I found it, how do I pull it? mount the ubuntu partition in android and pull it via root explorer?
thanks a lot! :victory:
acone
GdmImpulse said:
It should definitely work with nvflash since that's what OLiFE is using. From what I can see in the scripts, you can run:
nvflash -r --download <PARTITION> selfbuild.img
Where <PARTITION> is 5 for secondary and 6 for primary (AFAICT, booting net-install from primary doesn't work anyways, so likely this should be 5 for you).
Click to expand...
Click to collapse
xxaconexx said:
could you by any chance walk me through this? from what you said I'd be guessing to do the following:
put the selfbuild.img into the nvflash folder
open a cmd and navigate inside the folder
plug transformer in apx mode + install drivers
type nvflash -r --download 5 selfbuild.img into the cmd
is that all I have to do? if its really that easy, than wow!
where is the /Linux_for_Tegra/ folder that contains the selfbuild.img located tho? couldn't find it on my TF, and once I found it, how do I pull it? mount the ubuntu partition in android and pull it via root explorer?
thanks a lot! :victory:
acone
Click to expand...
Click to collapse
That sounds right. That's what I did to get it working. This is assuming that the Windows version of nvflash takes the same parameters of the Linux version, but it sounds like it does.
You can probably pull the file from Android. If you have an sdcard, you can copy it from Linux. I've uploaded the image from mine that you can try if you are having trouble pulling the file. This is from Net-Installer 0.6: 2shared.com/file/9wAIoPat/selfbuild.html
okay, so I've tried this, here's what happened:
-put the selfbuild.img into the nvflash folder
-open a cmd and navigate inside the folder
-plug transformer in apx mode + install drivers
-type nvflash -r --download 5 selfbuild.img into the cmd
-cmd shows something along the lines of nvflash starting [resume mode] than it would get stuck forever with nothing happening afterwards
-tried to see if nvflash was working properly via nvflash --sync and it would give me the 'nvflash started rcm version 0x4 command send failed' error SBK2 users get without using wheelie, then the device lost connection (odd, was that supposed to happen?)
-downloaded wheelie (eventho I have an sbk1 device [B50])
-navigated to the wheelie folder and replaced the bootloader.bin with the one from franks tools (not sure if that was necessary)
-opened up a cmd, navigated to the wheelie folder and typed in wheelie -1 -o 0x300d8011 --bl bootloader.bin -c transformer.bct (wheelie SBK1DEVICE SET_ODM_DATA_TO 0x300d8011 SET_THE_BOOTLOADER_FILENAME_TO bootloader.bin SET_THE_BCT_FILENAME_TO transformer.bct)
-nvflashed the selfbuild.img again using nvflash -r --download 5 selfbuild.img
IT WORKED!
not entirely sure what i did there as I just randomly pulled bits of information from a ton of threads and google, but it worked :victory:
touchpad is now working, but I still can't get it to connect to my wifi using wpa_gui, it shows my router when scanning (wpa2-personal psk aes [so i'm assuming the encryption has to be set to CCMP?]) but when I enter the password and try to connect it just gives me the "associating" for a second than says "disconnected, last message bssid=00:00:00:00:00:00 reason=0
any clues why?
thanks again for the help! :good::good:
GdmImpulse said:
That sounds right. That's what I did to get it working. This is assuming that the Windows version of nvflash takes the same parameters of the Linux version, but it sounds like it does.
You can probably pull the file from Android. If you have an sdcard, you can copy it from Linux. I've uploaded the image from mine that you can try if you are having trouble pulling the file. This is from Net-Installer 0.6: 2shared.com/file/9wAIoPat/selfbuild.html
Click to expand...
Click to collapse
disregard my last post and this one, I got it working, simply needed a reboot when it was stuck on 'associating...' was able to apt-get the ubuntu software center now, just to run into the next problem: upon running it it says starting then crashes with a crash report, when I try to open up the details it says "icon 'package-install' not present in theme", downloaded synaptics, tried to start it from applications/system tools/administration/synaptic package manager but the system will just show the loading icon for a second then nothing happens... guess I'm off for a great start into the world of linux
just tried to set the encryption of the router to wep and connect, wpa_gui says its connected but I cant ping anything via terminal or sudo apt-get stuff, plus oddly enough while the tf is connected none of my other devices can access the wifi
tried WPS as well both with the push button (gives a waiting or registrar status forever) and a generated pin (router just tells me to start wps on the tf, tf tells me registrar does not yet know pin) - so thats not working either...
disabling encryption entirely and just leaving the network open (this is what worked for me during net-install) won't do anything either, status will just show "associating" forever...
any clues?
xxaconexx said:
disregard my last post and this one, I got it working, simply needed a reboot when it was stuck on 'associating...' was able to apt-get the ubuntu software center now, just to run into the next problem: upon running it it says starting then crashes with a crash report, when I try to open up the details it says "icon 'package-install' not present in theme", downloaded synaptics, tried to start it from applications/system tools/administration/synaptic package manager but the system will just show the loading icon for a second then nothing happens... guess I'm off for a great start into the world of linux
just tried to set the encryption of the router to wep and connect, wpa_gui says its connected but I cant ping anything via terminal or sudo apt-get stuff, plus oddly enough while the tf is connected none of my other devices can access the wifi
tried WPS as well both with the push button (gives a waiting or registrar status forever) and a generated pin (router just tells me to start wps on the tf, tf tells me registrar does not yet know pin) - so thats not working either...
disabling encryption entirely and just leaving the network open (this is what worked for me during net-install) won't do anything either, status will just show "associating" forever...
any clues?
Click to expand...
Click to collapse
Glad to hear you got the kernel working :highfive:
FWIW, I was having problem with WPA2 as well. For now, I've manually modified /etc/wpa_supplicant/wpa_supplicant.conf to get it working. http://forum.xda-developers.com/showthread.php?p=33856819&highlight=wpa2#post33856819 is what I followed to modify the config for my network.
yeah I had tried that first but it wouldn't work, then read a post about how wpa_gui is not always showing the correct status of the wifi, so I connected to my wifi, left it at "associating" and rebooted, after a reboot it showed "connected" :laugh:
got the software center to work as well, installing synaptics did the trick, eventho I can't run synaptics itself, the error I had before with the software center was gone after i installed it.
is usb hotplugging working for you? I know jhintas kernel is not supposed to have it, but NoDiskNoFun stated is was working with his net-install script in the post so I'm curious. rn I have to have the usb device plugged in during boot for it to work.
GdmImpulse said:
Glad to hear you got the kernel working :highfive:
FWIW, I was having problem with WPA2 as well. For now, I've manually modified /etc/wpa_supplicant/wpa_supplicant.conf to get it working. http://forum.xda-developers.com/showthread.php?p=33856819&highlight=wpa2#post33856819 is what I followed to modify the config for my network.
Click to expand...
Click to collapse

[GUIDE] Ubuntu in a chroot on the Galaxy S4 - now with Native Booting!

Notice (4/16/14): I'm no longer here. I've said "goodbye" to AT&T and their locked bootloader schemes. I'm voting with my wallet - I've sold my I337 and switched to T-Mobile. My apologies to the community, but you're now on your own here.
Intro/About/Requirements:
This thread started as a guide for people who wanted to run Ubuntu in a chroot, and then connecting to it locally with a VNC client. This method has been used countless times on other devices, with many thanks to @zacthespack and his his group, LinuxonAndroid. Unfortunately, this method did not work out-of-the-box on my device, so I tweaked things to work with the Galaxy S4 and posted them here in this thread.
However, the most people immediately noticed that with this method the performance is not great, and some applications can't work in a headless environment. With a comment made by zackthespack, I began researching what it would take to get Ubuntu to write directly to the device's framebuffer. After a few months, I not only managed to accomplish this, but also developed a way to get the Galaxy S4 to boot directly into Ubuntu. As far as I have seen, both of these are a "first" for this handset.
All of these methods require root. The VNC Chroot does not require a custom kernel, but the other methods require a custom-built kernel. For the I337 (AT&T) handset, this can pose a problem if you have bootloaders that are MF3+. If you're using MDB/MDL bootloaders still, you shouldn't have a problem with this and you can Loki the custom kernel without issue.
Depending on your ROM and/or Kernel, you may also need a new version of BusyBox installed, even for the VNC method. You'll find a few apps on the Play Store that can do this for you. Beware that some of them are not easily reversible (such as TinyBox), so if you're stuck on MF3 with no way to create/restore a nandroid/system backup, you should be careful.
Click to expand...
Click to collapse
Disclaimers:
Following this guide and/or flashing anything I've provided to your device is your own responsibility. If something breaks, you break your device, or something explodes, I can't be held liable (I'll help correct any situations you may put yourself in, however). I claim no rights to any proprietary software or intellectual property included in this post or the packages contained herein. By using any of this software, you agree to whatever licenses/agreements that the creators may have included with their software. If you use any of this stuff in your own project, please provide credit where credit is due. For example, if you take my u.sh script and adapt it to some new device (i.e. Galaxy S 5), please at least mention where it came from.
Click to expand...
Click to collapse
VNC Chroot Method (original):
This method is loosely based on this thread for the Galaxy S3 and the ubuntu.sh script there. It didn't work for the S4, but I've made several tweaks to it, simplifying it a ton, and otherwise getting it to work perfectly on my S4. I've tried this using my AT&T Galaxy S4 (SGH-I337) on both the MDL build and the MF3 build - both seem to work great.
Instructions:
Download the Ubuntu 13.04 Small v1 image here.
Create a folder on your sdcard labeled "ubuntu" by whatever means you want to.
Extract the ubuntu.img from your downloaded zip into this folder.
Download my version of the ubuntu.sh and place it on the root of your sdcard.
Open the script in a text editor and read through it. Never run a script like this on your android without first knowing what it does - especially when the author is telling you that you need root. If you're happy with it, proceed.
Install an terminal emulator of your choice. I personally used this one, and technically an adb shell will work too (but you'll be tethered to your PC...).
Install a VNC Client of your choice. I personally used this one, but there might be better/faster ones out there.
Open the terminal emulator, and execute the following commands:
Code:
su
sh /sdcard/ubuntu.sh
If you see a bunch of errors and get dumped back at the "[email protected]:/ # " prompt, then something went wrong. Report your errors in this thread. Remember, this requires root (and the "su" command to get there, of course).
You'll be prompted for some setup parameters, which you can save at the end for later. Just answer each question and press Enter after each:
You'll need to provide a new password for the "ubuntu" user. A simple passwords like "ubuntu" works, unless you want some security.
Start VNC server? (y/n) - always choose "y". We need this to interact with the device.
SSH server? Optional. If you use it, you should enable it.
Screen size: Enter whatever you want. I personally used 960x540 (one quarter of the S4's screen size) so that I could actually interact with things using the touch screen.
Save settings as defaults? - You might not want to do this until you have a screen size that works best for you.
Once you see the prompt, "[email protected]:~# " - you're in! You now have Ubuntu running in a chroot. As the on-screen instructions suggest, type "exit" at this prompt to end the chroot and Ubuntu. It is recommended to do this when you are done so that the ubuntu.sh script can clean up after itself (unmounting things, etc.).
Leave your terminal emulator app running! Use your Home button to return home and leave it running.
Open you VNC client and connect with the following settings:
Nickname: (whatever you want)
Password: ubuntu
Address: localhost
Port: 5900 (default)
Username: (leave blank)
Color Format: 24-bit color (you can use lower if you want better performance)
Connect. For the VNC app I used, I had to zoom in to make the screen fit correctly (use pinch-to-zoom, and then use the "+" button on-screen). Also, you can play around with the Input Mode some if you wish.
Enjoy Ubuntu!
As you can see, it's not terribly complicated to get this up and running. Once you have set it up the first time, it's a lot smoother from then on out. The script is designed to allow you to use the external SDCard if you wish. Just use place the ubuntu.img in an "ubuntu" folder on your external SDCard, drop the ubuntu.sh on the root of the external SDCard, and use "sh /mnt/extSdCard/ubuntu.sh" instead (don't forget "su"!).
Click to expand...
Click to collapse
Freedreno Chroot Method (NEW):
This long-winded tutorial will explain how you can setup Xubuntu-desktop in a chroot. Before attempting any of this, you should read through all the steps and be sure you're comfortable performing the steps needed.
This requires roughly 2GB free space on your /data partition - the actual finished install is about 1.4GB, but it will require some extra space while it installs Freedreno and other components. HINT: Keep in mind that your /data partition is shared with your internal sdcard (your internal sdcard gets whatever space is leftover at the end of the /data partition), so you can get an idea how much free space you have by looking at how much space your internal sdcard has available.
Instructions:
Step 0 (option A) - Build Custom Kernel
You will need to install a custom kernel that has specific options enabled in the configuration, along with a few patched files in the source code. This list of changes is based on a delta from the stock I337 MF3 kernel, available at http://opensource.samsung.com/. You should be able to apply these changes to "any" kernel that you can build from source, so this documentation may apply to devices other than the I337.
Kernel Mods:
Required config changes:
Code:
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set
CONFIG_DRM=y
CONFIG_MSM_KGSL_DRM=y
# CONFIG_KGSL_PER_PROCESS_PAGE_TABLE is not set
# CONFIG_MSM_KGSL_PAGE_TABLE_COUNT is not set
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_MSM_TRIPLE_BUFFER=y
CONFIG_FB_MSM_DEFAULT_DEPTH_BGRA8888=y
# CONFIG_FB_MSM_DEFAULT_DEPTH_RGBA8888 is not set
Fix for Wi-Fi problems when using MF3 kernel on UCUAMDL bootloaders (i.e. "unadulterated" or "neutered"):
Code:
CONFIG_PROC_AVC=y
Required Patches to kernel source code:
https://github.com/freedreno/kernel-msm/commit/4c0281745f8c85707be88acebb557aca0b8f1dba
https://github.com/freedreno/kernel-msm/commit/228f65d48d4855d903e3b4642179dfa14eedd040
https://github.com/freedreno/kernel-msm/commit/54b510b2e6bccf08fdf3a8ad00a62b27c2f8c1e6
Additional changes required for sudo to work (added 10-25-13 in v4):
Code:
# Samsung Rooting Restriction Feature
#
# CONFIG_SEC_RESTRICT_ROOTING is not set
# CONFIG_SEC_RESTRICT_SETUID is not set
# CONFIG_SEC_RESTRICT_FORK is not set
# CONFIG_SEC_RESTRICT_ROOTING_LOG is not set
Additional changes to the initramfs required for sudo to work (added 10-25-13 in v4):
Edit fstab.qcom, remove the nosuid, part of the line that references userdata.
Step 0 (option B) - Download Custom Kernel Instead
Don't want to compile your own kernel from source? If you have the I337, you can use mine! As mentioned above, this kernel is based on the original MF3 source from Samsung, with the modifications listed above. If you are stuck with MF3+ bootloaders on your I337, you will not be able to install this kernel directly (at the time of this writing). MDB/MDL bootloaders are fine, but you will need to flash loki-doki afterwards (this kernel is not pre-lokified!). This kernel might work with other similar variants (such as the M919), but I haven't tested this on anything except my own I337 daily-driver. YMMV. If you run into issues, you might need to wipe cache/dalvik. This will likely only work with TouchWiz-based ROMs (I have not tried it with AOSP). Here's some downloads for you:
mf3-freedreno-android-boot-v4.zip - CWM/TWRP flashable zip.
- Boots to android, allows Ubuntu with Freedreno to work in a chroot.
- Compiled with the original (slightly modified) MF3 initramfs and "mf3-freedreno-minimum-zImage-v4" (below).
- Includes minimal configuration changes described above, plus the WiFi fix part.
mf3-freedreno-minimum-zImage-v4 - Just the MF3 kernel itself with minimal changes to get the chroot to work.
mf3-freedreno-minimum-config-v4 - Yeah, that's right. I'm providing the .config files I used for all of this.
Step 0.5 - Install the Kernel
Before you can start up the chroot properly, you'll need to have the custom kernel installed. You don't want the "ubuntu-boot" version right now, because you don't have an Ubuntu install to boot to. If you're using my pre-built kernel, first flash mf3-freedreno-android-boot-v4.zip and then flash loki-doki.zip.
Step 1 - Companion Files
Download this file: mf3-freedreno-companions-v4.zip - Non-flashable zip. This includes the script files, which you should promptly read through both u.sh and launch.sh. It is always good practice to read through any script file you get from the internet, making sure it's doing what you would expect it to. Also check out CREDITS.txt, which includes information about the included upstart-dummy.tar.gz and start-stop-daemon files.
Extract the companion files .zip and place its contents on the root of your internal sdcard (/sdcard/). Don't extract the contents of upstart-dummy.tar.gz. This is your $src directory. You can change this if you wish (see script for details).
Step 2 - Install/Configure Ubuntu
Install an terminal emulator of your choice. I personally used this one, and technically an adb shell will work too (but you'll be tethered to your PC...). At the console/shell, type the following two commands:
Code:
su
sh /sdcard/u.sh bash
The script will download Ubuntu Core and install Freedreno, upstart-dummy, and lubuntu-desktop. Total download size will be around 425MB. Total install time will vary, but count on it taking at least 45 minutes to install and configure everything. At the very end, you'll be prompted to enter a password for the new user "ubuntu".
Step 2.5 - Exit ubuntu
When you see the message "Type 'exit' (without quotes) to leave ubuntu," the install is complete. You'll notice that your prompt changed to "[email protected]". This is the easiest way to confirm that you're actually inside the ubuntu chroot. Type exit and hit Enter to get back to android.
Step 3 - Fire it up!
From now on, you can start Ubuntu using u.sh in any of these three ways:
sh /sdcard/u.sh - This will make initial prep, STOP android (black screen), launch the chroot, install/configure if needed, and will execute "service lightdm start". This will give you the greeter and you can login as "ubuntu". If the lightdm service stops for whatever reason (see info about the home button below), the script will continue by exiting the chroot and rebooting your device.
[*]sh /sdcard/u.sh bash - Same as above, except that it will not stop android, not startx (will give bash shell instead), and will not reboot your phone when you exit the shell.
[*]sh /sdcard/u.sh destroy - This will do exactly as it sounds - destroy your ubuntu installation. This will unmount your /sdcard from ubuntu (if still mounted somehow) and then recursively delete your ubuntu installation. If you change the source or destination directories in the main script, you should be careful deleting things.
NOTE: Remember to ALWAYS run any these from a root shell, whether via terminal emulator, via adb shell, or using SManager (or similar).
Step 4 - Note the Home Button and Touchpad
Take note that any time you have X running via lightdm, the hardware Home button will kill the X server. This is intentional, and will exit the chroot and reboot your phone. You'll also notice that currently, the touchscreen acts like a giant touchpad (like on a laptop). Use two fingers to right-click or scroll. Direct touchscreen input is not available at this time due to a segmentation fault that evdev causes when used on this device in a chroot.
Step 5 - (optional) Make Changes and Do it All Over Again
Customize the crap out of it! Edit my u.sh, launch.sh or xorg.conf and have fun. If you find great improvements, please post them in this thread! In future revisions, I might include them. Things should be well documented within the scripts. You might even change the bit at the end of launch.sh that starts "service lightdm start&" instead of "startx" - this would give you the greeter and let you login as the user "ubuntu" if you want. Also note that those three files are the only ones that must remain in your $src directory if you wish to continue to run this as a chroot. By the way, booting directly to Ubuntu after it is installed does not require any of the companion files anymore.
Click to expand...
Click to collapse
Native Boot Method (NEW):
This part of the tutorial is for those who wish to take things a step further and boot your device directly into Xubuntu-desktop. This will require that you setup the Freedreno chroot properly, and then you'll be installing a new boot.img. While this doesn't replace your /system partition, you won't be able to boot directly into Android while you have this boot.img installed.
Instructions:
Step 1 - Install Ubuntu
Basically, you need to perform all the steps for the Freedreno Chroot method, and get that up and running first. All you're doing here is swapping out your kernel.
Step 2 (option A) - Build Custom Kernel
You'll need all of the kernel customizations included in the freedreno chroot method, plus these listed below:
NOTE: You will need some proprietary blobs, which can be found on your device in the /etc/firmware directory.
Config changes to enable booting directly into Ubuntu (beyond replacing the initramfs...):
Code:
CONFIG_EXTRA_FIRMWARE_="audience-es325-fw.bin a300_pm4.fw a300_pfp.fw vidc_1080p.fw"
CONFIG_CMDLINE="console=tty0 fbcon=vc:0-3"
# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
CONFIG_CMDLINE_EXTEND=y
# CONFIG_CMDLINE_FORCE is not set
Optional config changes to enable the framebuffer console when booting directly into Ubuntu - useful for debugging.
Code:
CONFIG_VT_CONSOLE=y
CONFIG_VT_CONSOLE_SLEEP=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
CONFIG_FRAMEBUFFER_CONSOLE=m
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
# CONFIG_FONTS is not set
NOTE: You will need to grab some .ko files that are created, which must be loaded in the following order:
Code:
insmod /ko/font.ko
insmod /ko/softcursor.ko
insmod /ko/bitblit.ko
insmod /ko/fbcon.ko
I recommend that you include these four lines into the init script that is included in the ubuntu ramdisk. These can go pretty much anywhere after the ". /scripts/functions" part, but before it calls out to run-init. Also, don't forget to drop those .ko files into a new /ko directory in the initramfs. If you want to load these with modprobe, I'll leave that up to you (good luck).
Replace the entire ramdisk/initramfs:
At this time, I'm not going to provide instructions on how to do this. You'll need this mako boot.img straight from Ubuntu, repacked with the zImage created here. For what it's worth, the re-pack tool I'm using includes --cmdline 'androidboot.hardware=qcom user_debug=31 zcache', but I'm not sure if that's needed (especially considering our kernel seems to use qcache?). Anyways, good luck.
Step 2 (option B) - Download Custom Kernel Instead
Again, if you don't want to compile your own kernel from source, you can download mine and use it. The same warnings and restrictions apply as they do in Step 0 (option B) of the Freedreno Chroot method. And here's your downloads:
mf3-freedreno-ubuntu-boot-v4.zip - CWM/TWRP flashable zip.
- Boots to Ubuntu directly, but only if your Ubuntu install is located at /data/ubuntu (Default).
- Compiled with the original MF3 initramfs and "mf3-freedreno-everything-zImage-v4" (below).
- Includes all configuration changes described above.
mf3-freedreno-everything-zImage-v4 - Just the MF3 kernel itself with all changes for both chroot and direct booting to Ubuntu.
mf3-freedreno-everything-config-v4 - Yet again, I'm providing my complete .config file for this.
Step 3 - Install the Kernel
Here's the easy part. Flash your completed boot.img, flash loki-doki, and reboot. If you're using my pre-built kernel, first flash mf3-freedreno-ubuntu-boot-v4.zip and then flash loki-doki.zip.
Click to expand...
Click to collapse
Flashable Zip Method (NEWEST):
It's finally finished: a flashable .zip that you can use to dump a pre-built rootfs onto your data partition. This will still require that you flash one of the two custom kernels (whether for chroot or native booting), but it will allow you to skip the whole build/install process.
ubuntu-install-v4.zip - CWM/TWRP flashable .zip. Requires approx 2GB free space on your data partition during install, and the final install size is approximately 1.3GB (may want more free space to add your own programs/etc.). Output folder is /data/ubuntu. This can be changed in u.sh, but heed the warnings within!
Instructions:
Instructions for Chroot-style Ubuntu:
Download the "companions" .zip and extract its contents to the root of /sdcard.
Download the "ubuntu-install" .zip to your internal or external SDCard.
Download the "mf3-freedreno-android-boot" .zip to your internal or external SDCard.
Make a nandroid backup of your phone, and store it on an external SDCard or your computer. Always a good idea to have this.
Install the "ubuntu-install" and "mf3-freedreno-android-boot" .zip files, followed by loki-doki.zip if you need that for your device (e.g. I337).
Restart and resume with Step3 of the Freedreno Chroot Method.
Instructions for Native Boot Ubuntu:
Download the "ubuntu-install" .zip to your internal or external SDCard.
Download the "mf3-freedreno-ubuntu-boot" .zip to your internal or external SDCard.
Install the "ubuntu-install" and "mf3-freedreno-ubuntu-boot" .zip files, followed by loki-doki.zip if you need that for your device (e.g. I337).
Restart and let it start into Ubuntu!
NOTE: The username is "ubuntu" and the password is also "ubuntu" - it is highly recommended that you change this ASAP.
Click to expand...
Click to collapse
Known Issues/Bugs:
Below is the list of known issues that I can think of, from the top of my head. This will probably be updated later as everyone points stuff out. Some issues only apply to some of the methods, so the applicable methods are listed in parenthesis after each.
Sound has not been tested (freedreno/native)
3D graphics or OpenGL support has not been tested (all)
Some applications don't work in a headless environment (vnc)
Some applications don't like to run as root, such as chromium (freedreno) lightdm is working in companions-v3, so no need to login as root anymore
Onboard is not working (freedreno/native) fixed in companions-v3
sudo does not work (all) fixed in kernel-v4 for freedreno/native, but problem remains for (vnc) if you are not using a custom kernel
A few kernel Oops's (native)
Shutdown menu doesn't always work (freedreno/native) fixed partly in companions-v4 - proper locale settings seem to allow the shutdown menu to work once you are logged in
Performance issues due to VNC connection (vnc)
No 3G/WiFi/network connection that I'm aware of... (native)
No control over 3G/WiFi/network/bluetooth yet (all)
Xorg's normal touchscreen driver evdev causes segmentation faults (freedreno/native)
Working on a possibly trying to get fbdev to work natively without Freedreno for simplicity (freedreno/native)
Anything you'd normally expect from a phone does not exist (freedreno/native)
Screen rotation (with or without accelerometer) doesn't work yet (freedreno/native)
HDMI/MHL output remains untested at this time. I got it to briefly work once, but I need to revisit this. (freedreno/native)
Many more to come, I'm sure...
Click to expand...
Click to collapse
To-Do:
Add mirrors to the download links.
Add a CWM/TWRP-flashable .zip that just dumps a clean Ubuntu install onto your data partition. This should be easy enough. completed!
Fix some of the bugs above.
Simplify the launch.sh and xorg.conf files. The u.sh script seems pretty solid.
Develop a method that works with only fbdev. This method might eliminate the possibility of 3D acceleration, but should enable screen rotation and other nifty things.
Possibly look into getting kexec (or similar) to work on the Galaxy S4 to offer a dual-boot option. Low priority at the moment, because flashing a kernel back and forth is pretty easy stuff.
Get Ubuntu Touch to work. This would eliminate a lot of bugs. I mostly need to just buckle-down and build CM10.1 from source, and then slowly visit each step of the Ubuntu Touch boot process.... Ugh.
Rebuild Freedreno to try to get Mesa/Gallium3D working properly. I'm probably going to need a lot of help from Rob Clark on this one!
More to come...
Click to expand...
Click to collapse
Revision History:
[11-13] mf3-freedreno-companions-v2.zip - Updated launch.sh: added some error checking and fixed the Freedreno build process.
[11-15] mf3-freedreno-companions-v3.zip - Updated launch.sh to include onboard and English language. Removed florence and xvkbd. Removed .keyb script. Added sudo. Simplified upstart-dummy, and included new upstart-dummy.tar.gz. Prepped for new flashable .zip method.
[11-26] mf3-freedreno-companions-v4.zip - Updated launch.sh: included fix for onboard so that it should work anytime lightdm is launched, added some bits for sudo to work, and home button now kills lightdm (not just the Xsession); Updated u.sh: Added check for root, added notes about sudo and nosuid.
[11-26] mf3-freedreno-android-boot-v4.zip & mf3-freedreno-ubuntu-boot-v4.zip - Finally fixed sudo! See kernel mods sections for details.
[11-26] ubuntu-install-v4.zip - rebuilt with new companions.
Click to expand...
Click to collapse
Aou said:
Check out this app: SManager (Script Manager). It makes running the ubuntu.sh or u.sh a whole lot easier, plus you can send it into the background (vnc method only). Just remember to jump back into SManager later, use the Menu Key and open the console to be able to kill the ubuntu.sh. You can also add "bash" as an additional argument (freedreno method only). This seems to be an effective replacement for the Terminal Emulator. Don't forget to choose the "su" option to run either script as root.
Click to expand...
Click to collapse
I have literally spent hundreds of hours working on this project, and many more hours documenting it thoroughly - just so that I could share it with all of you. If you found this guide, custom kernel or scripts to be beneficial, please hit the THANKS button on this post.
This mostly works, but I think I may have made an error. I see it starting the sshd, but not VNC server. I can call vncserver, but when launching the vnc client app I just get stuck at "Establishing Handshake" until it times out. This differs from when I don't call vncserver, where I get immediately connection refused.
I'm going to redownload the image and start from scratch, but the image isn't very friendly when I'm trying to figure out how to rerun the initial configuration script...
On my S4 running OTA-MF3 with root, this didn't work for me until i used Busybox Installer from the market. Tried internal and external without it, neither worked. Only thing that looked like an error after that was
Code:
chown: cannot access '/external-sd/': no such file or directory
but this only showed the first time I ran it. Opened VNC connection just fine from my computer to the phone, and though there was slight graphics glitching (orange and red boxes on desktop) it worked just fine and they didn't interfere. Thanks for this!
Tsaukpaetra said:
This mostly works, but I think I may have made an error. I see it starting the sshd, but not VNC server. I can call vncserver, but when launching the vnc client app I just get stuck at "Establishing Handshake" until it times out. This differs from when I don't call vncserver, where I get immediately connection refused.
I'm going to redownload the image and start from scratch, but the image isn't very friendly when I'm trying to figure out how to rerun the initial configuration script...
Click to expand...
Click to collapse
It's not, I agree. I found that the easiest way to clear the configuration and start anew is to do the following from the "[email protected]" prompt (that is, within ubuntu):
Code:
rm /root/DONOTDELETE.txt
rm /root/cfg/linux.config
DeadlySin9 said:
On my S4 running OTA-MF3 with root, this didn't work for me until i used Busybox Installer from the market. Tried internal and external without it, neither worked. Only thing that looked like an error after that was
Code:
chown: cannot access '/external-sd/': no such file or directory
but this only showed the first time I ran it. Opened VNC connection just fine from my computer to the phone, and though there was slight graphics glitching (orange and red boxes on desktop) it worked just fine and they didn't interfere. Thanks for this!
Click to expand...
Click to collapse
Interesting. I looked through the image's init.sh, and found something that's relatively new (wasn't in beta):
Code:
# Fix for sdcard read/write permissions by Barry flanagan
chown ubuntu /external-sd/
As far as I can tell, that message is harmless. It's only included in the initial configuration, as it's in the section:
Code:
if [ ! -f /root/DONOTDELETE.txt ]
As for the need to download/install the BusyBox installer, that's not surprising at all. I've had so much trouble BusyBox ever since I switched to MF3. I might include this as an extra step in the OP - thank you.
You kidding right...does this really work? To cool, thanks Aou. Great work.
TheAxman said:
You kidding right...does this really work? To cool, thanks Aou. Great work.
Click to expand...
Click to collapse
Yessir, it does indeed work! The S4 handles it very nicely with the extra RAM & CPU it has to spare, so the only limiting factor is VNC. If someone could devise a way to get Ubuntu to draw directly on the screen from within that Chroot, that would be perfect. I don't think it's really possible by design, but this might be the closest we get to running native linux on the I337 until we see some unlocked bootloaders.
Thanks
Aou said:
Yessir, it does indeed work! The S4 handles it very nicely with the extra RAM & CPU it has to spare, so the only limiting factor is VNC. If someone could devise a way to get Ubuntu to draw directly on the screen from within that Chroot, that would be perfect. I don't think it's really possible by design, but this might be the closest we get to running native linux on the I337 until we see some unlocked bootloaders.
Thanks
Click to expand...
Click to collapse
In fact I am currently working on getting xorg to write to androids frame buffer which will mean no more vnc
Sent from my Nexus 4 using xda premium
zacthespack said:
In fact I am currently working on getting xorg to write to androids frame buffer which will mean no more vnc
Sent from my Nexus 4 using xda premium
Click to expand...
Click to collapse
You, sir, are the man. thank you so much for working on this! I threw $10 at you to help fund the skittles/cheetos/carrots/beer/pizza/whatever it takes to help you along.
Added a couple things to the OP. Looks like pure-stock roms will indeed need BusyBox installed, by some means or another. Also, found SManager, which makes executing the ubuntu.sh script much, much easier.
The second script that allows me to launch ubuntu, but the first that allows me to get a real X server on my vnc. Thank you so much !
PS: Why am I unable to install wine ?
"Package wine is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source"
This is working pretty good, slow though, do I have it setup right, or did I miss something?
TheAxman said:
This is working pretty good, slow though, do I have it setup right, or did I miss something?
Click to expand...
Click to collapse
I have found it to run a bit slow, and with regular crashing of GUI programs too. Is it just slow or unusable? You can always try closing other apps besides terminal and VNC, or try to VNC from a computer even.
tboss1995 said:
The second script that allows me to launch ubuntu, but the first that allows me to get a real X server on my vnc. Thank you so much !
PS: Why am I unable to install wine ?
"Package wine is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source"
Click to expand...
Click to collapse
Looks like you're not the only one. Check out this thread on the LinuxOnAndroid site:
http://forum.linuxonandroid.org/index.php?topic=268.0
TheAxman said:
This is working pretty good, slow though, do I have it setup right, or did I miss something?
Click to expand...
Click to collapse
DeadlySin9 said:
I have found it to run a bit slow, and with regular crashing of GUI programs too. Is it just slow or unusable? You can always try closing other apps besides terminal and VNC, or try to VNC from a computer even.
Click to expand...
Click to collapse
Most of the slowness comes from interacting with it via VNC, it would seem. Hard to compare to anything else, considering VNC is all we've got at the moment. I wonder if @zacthespack can shed some light on this. As he mentioned before, he's working on getting it to draw directly to the Android screen. I'm certainly not going to ask for any status updates, but I'm wondering if he can confirm that we'd see a speed increase without VNC...
EDIT: Also, as I use it more, I am noticing the app crashes too (such as Chromium). Could just be something in the 13.04 image, but also could be because we're running this all on ARM architecture.
Aou said:
Looks like you're not the only one. Check out this thread on the LinuxOnAndroid site:
http://forum.linuxonandroid.org/index.php?topic=268.0
Most of the slowness comes from interacting with it via VNC, it would seem. Hard to compare to anything else, considering VNC is all we've got at the moment. I wonder if @zacthespack can shed some light on this. As he mentioned before, he's working on getting it to draw directly to the Android screen. I'm certainly not going to ask for any status updates, but I'm wondering if he can confirm that we'd see a speed increase without VNC...
Click to expand...
Click to collapse
RE installing WINE, sure you can install the ARM verson but Wine is not a emulator (infact WINE stands for Wine Is Not a Emulator) so you can only run ARM compiled windows software.
Yest there is a good speed increase, as with VNC xorg writes to the vnc server and passes it to the vnc client to then render on the screen.
With the new method xorg just writes to Androids frame buffer, no inbetween man.
And it can get even faster once we have graphics accelerations although not all chip sets will get that.
zacthespack said:
RE installing WINE, sure you can install the ARM verson but Wine is not a emulator (infact WINE stands for Wine Is Not a Emulator) so you can only run ARM compiled windows software.
Click to expand...
Click to collapse
Good point, forgot about that. It's really just a big package of Windows dependencies, responding to API calls, etc. The software that Wine runs is still sending stuff to/from the processor directly, therefore it would have to be compiled for ARM.
I wonder what Windows8 programs are available that are compiled for ARM (because of the Microsoft Surface and all...).
Aou said:
Good point, forgot about that. It's really just a big package of Windows dependencies, responding to API calls, etc. The software that Wine runs is still sending stuff to/from the processor directly, therefore it would have to be compiled for ARM.
I wonder what Windows8 programs are available that are compiled for ARM (because of the Microsoft Surface and all...).
Click to expand...
Click to collapse
There's plenty or ARM software within the built in app store, but I'm not sure where they install to or how one would go about extracting them. I have it on desktop and it shows what processors it runs on. Can't wait for the straight to screen function though
Also, I'm going to see if a different image is more stable. Chromium was the most obvious crashing for me and others generally crashed.
DeadlySin9 said:
There's plenty or ARM software within the built in app store, but I'm not sure where they install to or how one would go about extracting them. I have it on desktop and it shows what processors it runs on. Can't wait for the straight to screen function though
Also, I'm going to see if a different image is more stable. Chromium was the most obvious crashing for me and others generally crashed.
Click to expand...
Click to collapse
I noticed that with 12.04, it doesn't seem to connect to Xorg or something, because when you use VNC, it only shows a grey screen with a cross cursor. Same for both "Lite" and "Full" packages. Haven't tried older (10.x) packages of Ubuntu.
The other Linux images should work just fine. Optionally, you can edit the ubuntu.sh script to be more appropriate, but it should theoretically work the same (unless the init.sh is located elsewhere inside the image...).
I tried the Ubuntu 10 image and the Debian image but ubuntu didn't run vnc (vncserver not found or something) and debian kept saying I didn't have permissions.
It appears chromium is incredibly unstable on this image, so I've uninstalled it.
I'm currently working on trying to get Minecraft to work, but ever since 1.6.2 and this new launcher, it's incredibly difficult to modify the client files and such. Something is going wrong with liblwjgl.so. I can get the launcher to work correctly, but when it goes to load the game, it can't find liblwjgl.so and says that it might be because of 32bit vs ARM. I did get lwjgl installed correctly, and pulled the ARM version of the .so and stuck it in [what I believe was] the right .jar file, but it still has the error.
I'll keep you all posted. If I can get this to work, and if zacthespack can get xorg to draw on the android screen, ... :good:
EDIT:
Found out that every time the launcher runs minecraft, it downloads several libraries and other crap to run the game, to keep itself current and to support multiple versions, yada, yada. Unfortunately, this means that it downloads https://s3.amazonaws.com/Minecraft..../2.9.0/lwjgl-platform-2.9.0-natives-linux.jar every time you click Play, and overwrites any custom one you might have (i.e. one with ARM libraries inside). I tried revoking write access to the file, but then the launcher aborts the launch because it can't overwrite the file.
Any suggestions?
EDIT #2:
Well, the easy solution was to modify the file, run the launcher, disconnect mobile data temporarily, and then launch the game ("couldn't connect to server .... have local copy of file .... assuming it's good...."). No more errors about that stupid library file. However, the game immediately crashes now with an error report. Investigating this now. PROGRESS!
Problem
I'm aware I may need to modify the script in order to accommodate my setup, but I figured I'd post here first before changing anything in case someone else had a similar problem and came up with the solution.
I followed all the instructions, except I want to boot from an external USB stick (mounted using StickMount).
I reviewed the script, dropped it on the root of the USB stick, and copied the unzipped image to a folder named ubuntu.
Here is the output when I run the script:
Making mount points and mounting to them...
mount: mounting /dev/loop20 on /data/local/ubmnt failed: Operation not supported
mount: mounting devpts on /data/local/ubmnt/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/ubmnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/ubmnt/sys failed: No such file or directory
Connecting to /sdcard...
mount: mounting /sdcard on /data/local/ubmnt/sdcard failed: No such file or directory
Putting in some settings...
net.ipv4.ip_forward = 1
/sdcard/usbStorage/sda1/ubuntu.sh[19]: can't create /data/local/ubmnt/etc/resolv.conf: No such file or directory
/sdcard/usbStorage/sda1/ubuntu.sh[20]: can't create /data/local/ubmnt/etc/resolv.conf: No such file or directory
/sdcard/usbStorage/sda1/ubuntu.sh[21]: can't create /data/local/ubmnt/etc/hosts: No such file or directory
ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
(You will see an error about wlan0 if your WiFi is disabled. Safe to ignore.)
----------------- OKAY, starting Ubuntu! -----------------
chroot: can't execute '/root/init.sh': No such file or directory
----------------- Ubuntu has exited! -----------------
Cleaning up - unmounting everything and removing what we made...
umount: can't forcibly umount /data/local/ubmnt/dev/pts: No such file or directory
umount: can't forcibly umount /data/local/ubmnt/sys: No such file or directory
umount: can't forcibly umount /data/local/ubmnt/proc: No such file or directory
umount: can't forcibly umount /data/local/ubmnt/sdcard: No such file or directory
umount: can't forcibly umount /data/local/ubmnt: Invalid argument
Welcome back to your android.
Click to expand...
Click to collapse
I am running as root, BusyBox free has been installed. My terminal app has been granted root privileges. The path to the USB stick is sdcard/usbStorage/sda1.
Any help/guidance would be greatly appreciated! :fingers-crossed:

T-R42 owners...please help! which is your wifi chip?

Hello T-R42/K-R42/CS918 owners,
i have a problem with wifi: it does not work more
BUT perhaps you could help me and others with similar problems:
open the terminal and type: cat /sys/class/rkwifi/chip
and post the result on this thread , adding the model and board version you have (if you know it)
Thanks a lot!
Vicolodo said:
Hello T-R42/K-R42/CS918 owners,
i have a problem with wifi: it does not work more
BUT perhaps you could help me and others with similar problems:
open the terminal and type: cat /sys/class/rkwifi/chip
and post the result on this thread , adding the model and board version you have (if you know it)
Thanks a lot!
Click to expand...
Click to collapse
I have "[email protected]" changed from "[email protected]" after I executed the command with su or without, the result is the same, Nothing else displayed. My board verion 1.0 AP6210 wifi chip.
buhohitr said:
I have "[email protected]" changed from "[email protected]" after I executed the command with su or without, the result is the same, Nothing else displayed. My board verion 1.0 AP6210 wifi chip.
Click to expand...
Click to collapse
thank you!
i found that RK901 is hard-coded into the kernel, as you can read here:
it depends on the parameters used compiling the kernel:
in fact i found this:
https://github.com/gripped/MK808-he...net/wireless.orig/wifi_sys/rkwifi_sys_iface.c
i am not an expert, but i think that is the kernel procedure that writes the attributes of the class for wifi on the file system,
one of which is the file /sys/class/rkwifi/chip
the fact that we have all RK901 is because all (almost) our kernels have been compiled with the configuration
#ifdef CONFIG_RK901
I dont know if my device instead should use a different kernel (compiled with other configuration),
but i think that probably RK901 is the right value also for my device
This because i think that the cause of my problem is different:
seems that the problem is caused by an error returned by the insmod (insert module) procedure
(called by the load driver procedure ,
that perhaps it is something like what can be found here
https://github.com/aloksinha2001/pi****u-3.0.8-alok/blob/master/RK30_MT5931_MT6622/wifi/wifi.c
)
The insmod function does these two things:
- allocates memory for the driver and loads the file (rkwifi.ko) on this area:
module = load_file(filename_release, &size);
- initialize the module
ret = init_module(module, size, args);
One of this two events went wrong, because i am sure insmod in my case returns -1
I went to this conclusion following the logcat trace and searching infomations on the web, as you can see here
http://www.freaktab.com/showthread.php?11523-why-wifi-not-working-here-there-is-the-answer
i read somewhere that the init_module may return error when the user has not the permission to insert the module into the kernel...
so can be that some permission is missing ...like a problem caused by rooting, where i have no more root permissions after flashing the ROM...or something like that...
do you have any suggestion?
Thanks a lot!
I still believe you haven't flash the full rom correctly. You need to reflash a full stock rom where it will reformat your nano and replacing all the correct files with all the correct permission. Currently you are trying to fix many holes in the rom/kernel and just a big waist of time. When you reformat your device and flash a full rom it should address all the issues. I have been working on so many Android devices and if you could format and reflash the stock rom, it solved everything unless your hardware is in question. One thing I noticed is that if you have a proper flash your device should be seen by your PC. Once your pc communication is fixed, you should able to flash full rom using batch tool. Before you flash the full rom, the batch tool is going to do a low level formatting (which did help me in the past where I soft brick my device). So the key thing here is focus on make your pc see your device. First start with the bootloader, then recovery, then the rest. Your nano is properly corrupted, so you need to reformat the nano and reflash the bootloader.

Categories

Resources