[MOD] v0.3.1 Working Full Ubuntu for 1.5.7 and 1.8.3 based on Sogarth's script

Status
Not open for further replies.
Search This thread

the2dcour

Senior Member
Mar 17, 2011
464
587
Boston
^ escapes batch, \ escapes shell. Hope this helps. If you zip up and send me the whole process in a single .sh file I can wrap it up in CWM for you.

Yeah, i plan to make it all one shell script after I make sure this works.
I tried escaping it like that to no avail. as well as setting the command to execute as a string and calling the string, using '' and "", etc.
 

Ririal

Retired Recognized Developer
Feb 21, 2011
785
393
Grayslake
www.rirnef.net
Yeah, i plan to make it all one shell script after I make sure this works.
I tried escaping it like that to no avail. as well as setting the command to execute as a string and calling the string, using '' and "", etc.

Code should be:
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell /system/bin/su -c "/bin/chmod -R 6755 /mnt/sdcard-ext/shell/"' > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort

You had the " in the wrong spot, and you're not using chmod correctly.

EDIT: if that doesn't work try adb.exe shell /system/bin/su -c ^"/bin/chmod -R 6755 /mnt/sdcard-ext/shell/^"
 
Last edited:

the2dcour

Senior Member
Mar 17, 2011
464
587
Boston
Code should be:
Code:
set retval=
for /f "tokens=*" %%l in ('%~dps0adb.exe shell /system/bin/su -c "/bin/chmod -R 6755 /mnt/sdcard-ext/shell/"' > /dev/null 2>&1 && echo PASS"') do set retval=%%l
if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort

You had the " in the wrong spot, and you're not using chmod correctly.

EDIT: if that doesn't work try adb.exe shell /system/bin/su -c ^"/bin/chmod -R 6755 /mnt/sdcard-ext/shell/^"

still getting "> was unexpected at this time." using either of those =/
edit: I guess it doesn't matter a whole lot since su still botches without using su -c... I'l probably just admit defeat and rewrite sogarth's script with su -c commands and people will have to suffer through hitting accept on their phones about 50 times till I (or someone else) makes a CWM script. ^^/
 
Last edited:

Ririal

Retired Recognized Developer
Feb 21, 2011
785
393
Grayslake
www.rirnef.net
still getting "> was unexpected at this time." using either of those =/
edit: I guess it doesn't matter a whole lot since su still botches without using su -c... I'l probably just admit defeat and rewrite sogarth's script with su -c commands and people will have to suffer through hitting accept on their phones about 50 times till I (or someone else) makes a CWM script. ^^/

If you throw all the commands into a single shell I can make it CWM flashable for you.
 

uisgdlyast

Member
Mar 27, 2011
45
1
Ofcourse as soon as I do everything to upgrade to 1.57 with root I find out Ubuntu has been enabled and I do not want to go back to 1.26 especially since I just installed gladatrix.

Please try to find out how to get this working, would making it CWM compatible help at all?

===Edit===
Couldn't wait any longer, tried to manually do it based on Sogarths post (had to use sudo for most commands). I got a little stuck at the rsync part, made it through (I think) but when I was attempting to change the moutosh file and boot into the new partition I ran into some problems.
I re-booted, but how do I know if it went into the new partition? All the files/directories were the same as the phone showed, but more importantly I could not get into the webtop. I re-started with the phone off the dock and then when I docked the phone just mirrored on my monitor, it gave no options for webtop/clock/etc and I had to replace the files using "how to get hdmi without a dock" mod. So I dont know why those files got messed with or why it wouldn't let me select webtop.
In order to do it manually I did the "simplified webtop modification" or whatever, to let me get the terminal on the webtop, its still accessable in the icon bar when I reboot.
I just feel like if a script comes out now it might mess up my phone since I tried to manually do it.
 
Last edited:

the2dcour

Senior Member
Mar 17, 2011
464
587
Boston
FYI you can load and execute files for /data/local/tmp

Ririal, I PM'd you with the shell script I wrote. If you don't mind giving it a once over for typos and such that'd be great. There's also instructions in the first few lines about where files need to be since I'm not sure how you have to package things for CWM. Hope everything checks out
-Thedd
 

the2dcour

Senior Member
Mar 17, 2011
464
587
Boston
you have to run install.bat from your computer (or manually upload the files using adb)

then you have to run adb to get a shell on your phone and run install.sh you do this by typing exactly
Code:
. /data/local/tmp/install.sh
dont forget the "."
 

mafiaboy01

Senior Member
Sep 17, 2007
1,358
29
Toronto
Edit again, I'm getting some crazy errors

C:\Users\xxxx\Desktop\BETA_CWM_fullubuntu-0.1>adb shell
$ su
su
# . /data/local/tmp/install.sh
. /data/local/tmp/install.sh
1
Whew functions defined Lets do this
2
3
4
5
6
mount: wrong fs type, bad option, bad superblock on /dev/block/loop7,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

8
dpkg-deb: failed to read archive `/tmp/wget.deb': No such file or directory
rm: cannot remove '/tmp/wget.deb': No such file or directory
--2011-04-20 20:31:55-- http://ports.ubuntu.com/pool/main/r/rsync/rsync_3.0.5-1
ubuntu2_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 348232 (340K) [application/x-debian-package]
Saving to: `/tmp/rsync.deb'

100%[======================================>] 348,232 72.8K/s in 4.7s

2011-04-20 20:32:01 (72.8 KB/s) - `/tmp/rsync.deb' saved [348232/348232]

refill your coffee and dont panic check /tmp/rsync.out for status
rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe (32)
rsync: write failed on "/tmp/osh/usr/lib/firefox-3.6.13/components/nsMicrosummar
yService.js": No space left on device (28)
rsync: connection unexpectedly closed (28871 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at io.c(600) [sender=
3.0.5]
9
10
11
12
--2011-04-20 20:33:47-- http://ports.ubuntu.com/pool/main/c/coreutils/coreutils
_6.10-6ubuntu1_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1948878 (1.9M) [application/x-debian-package]
Saving to: `/tmp/coreutils.deb'

9% [==> ] 176,649 76.5K/s in 2.3s


Cannot write to `/tmp/coreutils.deb' (No space left on device).
mkdir failed for /tmp/osh/usr/share/man/man1, No such file or directory
dpkg: unable to access dpkg status area: No such file or directory
12.5
mkdir failed for /tmp/osh/usr/share/man/man1, No such file or directory
--2011-04-20 20:33:56-- http://ports.ubuntu.com/pool/main/c/cpio/cpio_2.9-15ubu
ntu1_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 113038 (110K) [application/x-debian-package]
Saving to: `/tmp/cpio.deb'

100%[======================================>] 113,038 71.4K/s in 1.5s

2011-04-20 20:34:02 (71.4 KB/s) - `/tmp/cpio.deb' saved [113038/113038]

dpkg: unable to access dpkg status area: No such file or directory
13
--2011-04-20 20:34:02-- http://ports.ubuntu.com/pool/main/d/dbus/dbus_1.2.12-0u
buntu2_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 186450 (182K) [application/x-debian-package]
Saving to: `/tmp/dbus.deb'

92% [==================================> ] 171,883 89.9K/s in 1.9s


Cannot write to `/tmp/dbus.deb' (No space left on device).
chmod: /tmp/osh/usr/sbin/invoke-rc.d: No such file or directory
dpkg: unable to access dpkg status area: No such file or directory
chmod: /tmp/osh/usr/sbin/invoke-rc.d: No such file or directory
13
--2011-04-20 20:34:11-- http://ports.ubuntu.com/pool/main/d/dbus/dbus-x11_1.2.1
2-0ubuntu2_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 40200 (39K) [application/x-debian-package]
Saving to: `/tmp/dbus-x11.deb'

9% [==> ] 3,885 --.-K/s in 0.3s


Cannot write to `/tmp/dbus-x11.deb' (No space left on device).
dpkg: unable to access dpkg status area: No such file or directory
14
--2011-04-20 20:34:13-- http://ports.ubuntu.com/pool/main/d/dhcp3/dhcp3-client_
3.1.1-5ubuntu8_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 232032 (227K) [application/x-debian-package]
Saving to: `/tmp/dhcp3-client.deb'

1% [ ] 3,883 --.-K/s in 0.3s


Cannot write to `/tmp/dhcp3-client.deb' (No space left on device).
dpkg: unable to access dpkg status area: No such file or directory
15
--2011-04-20 20:34:17-- http://ports.ubuntu.com/pool/main/f/findutils/findutils
_4.4.0-2ubuntu3_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 387838 (379K) [application/x-debian-package]
Saving to: `/tmp/findutils.deb'

1% [ ] 3,883 --.-K/s in 0.3s


Cannot write to `/tmp/findutils.deb' (No space left on device).
dpkg: unable to access dpkg status area: No such file or directory
16
--2011-04-20 20:34:24-- http://ports.ubuntu.com/pool/main/l/logrotate/logrotate
_3.7.7-3ubuntu1_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 40542 (40K) [application/x-debian-package]
Saving to: `/tmp/logrotate.deb'

9% [==> ] 3,885 --.-K/s in 0.3s


Cannot write to `/tmp/logrotate.deb' (No space left on device).
dpkg: unable to access dpkg status area: No such file or directory
17
cp: write error: No space left on device
--2011-04-20 20:34:26-- http://ports.ubuntu.com/pool/main/p/pulseaudio/pulseaud
io_0.9.14-0ubuntu20_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 453146 (443K) [application/x-debian-package]
Saving to: `/tmp/pulseaudio.deb'

0% [ ] 0 --.-K/s in 0s


Cannot write to `/tmp/pulseaudio.deb' (No space left on device).
chmod: /tmp/osh/usr/sbin/invoke-rc.d: No such file or directory
dpkg: unable to access dpkg status area: No such file or directory
chmod: /tmp/osh/usr/sbin/invoke-rc.d: No such file or directory
18
19
cp: write error: No space left on device
--2011-04-20 20:34:27-- http://ports.ubuntu.com/pool/main/x/xorg-server/xserver
-xorg-core_1.6.0-0ubuntu14_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2210460 (2.1M) [application/x-debian-package]
Saving to: `/tmp/xserver-xorg-core.deb'

0% [ ] 0 --.-K/s in 0s


Cannot write to `/tmp/xserver-xorg-core.deb' (No space left on device).
dpkg: unable to access dpkg status area: No such file or directory
20
--2011-04-20 20:34:29-- http://ports.ubuntu.com/pool/main/g/gnupg/gpgv_1.4.9-3u
buntu1_armel.deb
Resolving ports.ubuntu.com... 91.189.92.175
Connecting to ports.ubuntu.com|91.189.92.175|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 156866 (153K) [application/x-debian-package]
Saving to: `/tmp/gpgv.deb'

100%[======================================>] 156,866 82.1K/s in 1.9s

2011-04-20 20:34:32 (82.1 KB/s) - `/tmp/gpgv.deb' saved [156866/156866]

dpkg: unable to access dpkg status area: No such file or directory
21
22
23
24
E: Could not open lock file /var/lib/apt/lists/lock - open (2 No such file or di
rectory)
E: Unable to lock the list directory
E: Opening configuration file /usr/share/aptitude/aptitude-defaults - ifstream::
ifstream (2 No such file or directory)
E: Opening configuration file /usr/share/aptitude/section-descriptions - ifstrea
m::ifstream (2 No such file or directory)
E: Could not open file /var/lib/dpkg/status - open (2 No such file or directory)

E: The package lists or status file could not be parsed or opened.
E: Could not open file /var/lib/dpkg/status - open (2 No such file or directory)

E: The package lists or status file could not be parsed or opened.
E: Opening configuration file /usr/share/aptitude/aptitude-defaults - ifstream::
ifstream (2 No such file or directory)
E: Opening configuration file /usr/share/aptitude/section-descriptions - ifstrea
m::ifstream (2 No such file or directory)
E: Could not open lock file /var/lib/dpkg/lock - open (2 No such file or directo
ry)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Reading package lists...
E: Could not open file /var/lib/dpkg/status - open (2 No such file or directory)

E: The package lists or status file could not be parsed or opened.
E: Opening configuration file /usr/share/aptitude/aptitude-defaults - ifstream::
ifstream (2 No such file or directory)
E: Opening configuration file /usr/share/aptitude/section-descriptions - ifstrea
m::ifstream (2 No such file or directory)
E: Could not open lock file /var/lib/dpkg/lock - open (2 No such file or directo
ry)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Reading package lists...
E: Could not open file /var/lib/dpkg/status - open (2 No such file or directory)

E: The package lists or status file could not be parsed or opened.
E: Opening configuration file /usr/share/aptitude/aptitude-defaults - ifstream::
ifstream (2 No such file or directory)
E: Opening configuration file /usr/share/aptitude/section-descriptions - ifstrea
m::ifstream (2 No such file or directory)
E: Could not open lock file /var/lib/dpkg/lock - open (2 No such file or directo
ry)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Reading package lists...
E: Could not open file /var/lib/dpkg/status - open (2 No such file or directory)

E: The package lists or status file could not be parsed or opened.
E: Opening configuration file /usr/share/aptitude/aptitude-defaults - ifstream::
ifstream (2 No such file or directory)
E: Opening configuration file /usr/share/aptitude/section-descriptions - ifstrea
m::ifstream (2 No such file or directory)
E: Could not open lock file /var/lib/dpkg/lock - open (2 No such file or directo
ry)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Reading package lists...
E: Could not open file /var/lib/dpkg/status - open (2 No such file or directory)

E: The package lists or status file could not be parsed or opened.
25
26
27
29
umount: /tmp/osh: not mounted
32
Rebooting, if you get blinkenlights then you must power off your device and all
shall be peachy keen and clean
 
Last edited:

the2dcour

Senior Member
Mar 17, 2011
464
587
Boston
it looks to me like you don't have the ~1gb free space needed. also, when you rant install.bat did all of the files upload successfully? I'm not sure why it can't find wget.deb if so. can you PM me the output ofrunning
df
and
dmesg | tail
from adb shell?
 
Last edited:
Status
Not open for further replies.

Top Liked Posts

  • There are no posts matching your filters.
  • 12
    Sogarth's webtop2sd will be released soon, you really should wait and install that instead of this! Thanks -The Management
    No longer breaks on 1.83, thanks to Romracer :D
    Update: This script worked on my phone. Mind you I was installing it from a fresh SBF flash, but it should work on your phone too. Absolutely no guarantees as usual.
    Update 11th April 2011, 06:59 PM: Won't be getting CWM package because it'd be huuuuuuuuuge.
    Update 28th April 2011. 16:38 PM: Removing BETA tag since there have been no issues with the script for quite some time.

    First off I would like to thank Sogarth for making this script in the first place as well as Romracer for fixing it for 1.83. Since he is busy doing more important work I decided to do this little hack for those of us that updated to 1.5.7 and dont feel like flashing back to earlier versions to get full Ubuntu working.

    Again, this is only necessary if you're already running 1.5.7 or 1.8.3.

    Secondly, I am still working on this script so it may not work for you. If you have a problem you may post in the thread or PM me showing exactly the error message, word for word, that you receive.

    Updates will be included in the OP from time to time as I fix errors.

    Instructions:
    1) install.bat (from your computer)
    2) adb shell (get a shell on your phone)
    3) su (get root on your phone in that shell)
    4) . /data/local/tmp/install.sh (run the install script *on your phone* don't forget the "." and the space after the dot, or you will have to chmod 755 the shell script manually)
    5) ?????
    6) profit\

    Noob instructions, written by Viamonte (I take no credit or responsibility):
    Thanks again for all your help. Now the noob instructions:

    "1-Download "Terminal Emulator" from the market, on your phone (or any other terminal), and the file anexed in this thread to your computer.

    2-Connect the Atrix to the computer via USB, configuring the connection mode to "None" and enabling USB Debugging mode (Settings>Applications>Development>USB debugging)

    3-Unzip the file you downloaded on your pc, and run Install.bat. This will push the script to your phone.

    4-Go back to your phone and open the emulator you downloaded. Then type "su" (without quotes) and press enter. Then type ". /data/local/tmp/install.sh" (without quotes) and press enter again.

    The script should begin running now. It will stop in two moments where you'll be instructed to get a cup of coffee, and may take several minutes to continue form this point. When finished, the Atrix will reboot.

    To check if this worked, use the Webtop either on your multimidia dock or your lapdock and verify if new itens appeared on your task bar and on the right upper side of the screen"

    0.3.1 release
    0.2 release
    0.1 first release

    Changelog
    0.3.1 fix to gconf file's mdate so it does what its supposed to do =)
    0.3 Small typo fixes and cpp package install fix by romracer, now works on 1.83 =)
    0.2 Fixed some typos in uninstall.sh and make sure the %gconf file wound up in the right spot.
    0.1 - first version. NOT CWM install but ready to be packaged for that more or less
    2
    Here's what I've dubbed Ubuntu 0.3. I've cleaned up the cpp error on aptitude_parse.pl as well as a few other typos I came across (udev package check, sudoers, a few others I don't remember). I've gone through the install a few times from scratch with no major issues, but I haven't had time to test the webtop. If it worked before, then I'd think it would work now but no guarantees until I'm able to test it.

    If nothing else, I don't expect this will brick your phone. But as always, buyer beware, seller accepts no responsibility, yadda yadda.

    I should also note that each attempt I made was starting from scratch first. I'd strongly recommend anyone else do the same. I can't extrapolate what will happen if you're halfway through some previous botched install.

    Edit: Initial testing on 1.8.3 seems to work fine. The only thing that didn't seem to take was the gconf.xml (menu bar changes). I'll take a look at that in the morning.
    1
    The only easy workaround to that I can see at the moment is to
    Code:
    adb shell
    su
    chmod 777 /path-to-scripts/*
    ls -l /path-to-scripts/*
    make sure all the files are executable (should say rwxrwxrwx)
    then remove the bit of code from 1.5.7.bat
    Code:
    set retval=
    for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/bin/chmod 6755 /mnt/sdcard-ext/shell/* > /dev/null 2>&1 && echo PASS"') do set retval=%%l
    if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort

    If anyone can help me fix this problem I should be able to automate the chmod process using ririal's suggestion of su -c. The problem is that there are too many nested quotation marks in this section of the batch file, and I can't for the life of me figure out how to escape quotes so they pass through to adb:
    Code:
    set retval=
    for /f "tokens=*" %%l in ('%~dps0adb.exe shell "/system/bin/su -c [U]'/bin/chmod 6755 /mnt/sdcard-ext/shell/*'[/U] > /dev/null 2>&1 && echo PASS"') do set retval=%%l
    if "%retval%" neq "PASS" set message=Unable to chmod scripts. && goto abort
    The underlined bit is where I need to escape either single or double quotes.

    ^ escapes batch, \ escapes shell. Hope this helps. If you zip up and send me the whole process in a single .sh file I can wrap it up in CWM for you.
    1
    yeah you should have more than 1gb free in /data then. But after the install ~300mb free in data is to be expected. That partition is only like 2gb total and lots of other important things reside there too ;)
    1
    thank you for the input but shortly my script will become outdated. it doesnt work as-is for 1.8.3 I also get the cpp expected error. I won't be fixing this since it will be replaced by a more sophisticated version soon, wait for it with bated breath.