Debian Linux one-click installer for Motorola Defy - now with lxde desktop!

bonethugs

Senior Member
Sep 23, 2008
147
4
38
can't install on adlxmod v2.03. anyone cans? any solutions to this?

p.d.: the program crashes when i press install or boot.

[EDIT]

Finally, I've run it with next script but it's only for executting it, how about the reverse steps? anyone know?...


mount -o remount,rw -t yaffs2 /dev/block/mmcblk1p21 /system
export bin=/system/bin
export img=/sdcard/debian/debian.img
export mnt=/data/local/debian
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
#busybox mknod /dev/block/loop5 b 7 0
#busybox losetup /dev/block/loop5 $img
#busybox mount -t ext3 -o noatime,nodiratime /dev/block/loop5 $mnt
busybox mount -t ext3 -o loop,noatime,nodiratime $img $mnt
busybox mount -t devpts devpts $mnt/dev/pts
busybox mount -t proc proc $mnt/proc
busybox mount -t sysfs sysfs $mnt/sys
busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
busybox mount --bind /sdcard $mnt/sdcard
busybox chroot $mnt /bin/bash
if ps -Al | grep vnc > /dev/null
then
echo "vnc detected"
else
export USER=root
rm -r /tmp
mkdir /tmp
vncserver -geometry 854x480
fi
exit
mount -o remount,ro -t yaffs2 /dev/block/mmcblk1p21 /system
 
Last edited:

drmouse81

Senior Member
Apr 1, 2011
91
8
0
Hi

OK, I have been PMing xdaid about this, as I have only just reached the required number of posts to reply here :mad:

Anyway, I have been looking into the loopback mount issues many seem to be having. I tried various steps, and here's a summary.

The most obvious problem I encountered was that the /dev/loopN nodes did not exist (I found later they are under /dev/block/loopN, although mount -o loop doesn't look there...). The simple fix for this is:

Code:
for N in `seq 0 7`; do if [[ ! -e /dev/loop$N ]]; then mknod /dev/loop$N b 7 $N; fi; done
Now, at least mount -o loop would find a loop dev to use (even if you are using the new form of app2sd which uses loop devs, as I found out.. something to be aware of). But this didn't solve the problem.

Next I tried creating my own images on the SD to use. I found that small images would work most of the time, but larger ones consistently failed with "invalid argument" messages. After a few tries, I eventually tried creating such an image on /data instead of the SD card and, guess what...

IT WORKED

This lead me to the conclusion that there must be an issue with the SD (a 32GB Sandisk), so I decided to try my 16gb Kinston form my last phone. After tranferring all my data over and downloading the image again (deleted it :( ), I tried to mount it and, again....

IT WORKED

So my conclusion here is that doing this is sensitive to SD card. If you are having this issue, try a different one, there may be some small issue with yours which is ****ing it up.

Now, Mr. Xdaid... Your App doesn't work (as previous poster mentioned) on Adlxmod F4D 2.03. When I get chance, I'll post you the logs, but it FC's doing just about anything except download.
 

xdaid

Inactive Recognized Developer
Jul 12, 2009
514
648
0
Hi

OK, I have been PMing xdaid about this, as I have only just reached the required number of posts to reply here :mad:

Anyway, I have been looking into the loopback mount issues many seem to be having. I tried various steps, and here's a summary.

The most obvious problem I encountered was that the /dev/loopN nodes did not exist (I found later they are under /dev/block/loopN, although mount -o loop doesn't look there...). The simple fix for this is:

Code:
for N in `seq 0 7`; do if [[ ! -e /dev/loop$N ]]; then mknod /dev/loop$N b 7 $N; fi; done
Now, at least mount -o loop would find a loop dev to use (even if you are using the new form of app2sd which uses loop devs, as I found out.. something to be aware of). But this didn't solve the problem.

Next I tried creating my own images on the SD to use. I found that small images would work most of the time, but larger ones consistently failed with "invalid argument" messages. After a few tries, I eventually tried creating such an image on /data instead of the SD card and, guess what...

IT WORKED

This lead me to the conclusion that there must be an issue with the SD (a 32GB Sandisk), so I decided to try my 16gb Kinston form my last phone. After tranferring all my data over and downloading the image again (deleted it :( ), I tried to mount it and, again....

IT WORKED

So my conclusion here is that doing this is sensitive to SD card. If you are having this issue, try a different one, there may be some small issue with yours which is ****ing it up.

Now, Mr. Xdaid... Your App doesn't work (as previous poster mentioned) on Adlxmod F4D 2.03. When I get chance, I'll post you the logs, but it FC's doing just about anything except download.
I think you hit the problem:
my sdcard is a kingston 16gb 4x.
The image was mounted from that sdcard all the times..
 

drmouse81

Senior Member
Apr 1, 2011
91
8
0
Here's the logs from me trying to "Boot debian"...

Code:
D/AndroidRuntime( 3658): --- registering native functions ---
E/WindowManager( 3635): Activity scd.debondroid.DebOnDroid has leaked window [email protected] that was originally added here
E/WindowManager( 3635): android.view.WindowLeaked: Activity scd.debondroid.DebOnDroid has leaked window [email protected] that was originally added here
E/WindowManager( 3635): at android.view.ViewRoot.<init>(ViewRoot.java:253)
E/WindowManager( 3635): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
E/WindowManager( 3635): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
E/WindowManager( 3635): at android.view.Window$LocalWindowManager.addView(Window.java:424)
E/WindowManager( 3635): at android.app.Dialog.show(Dialog.java:241)
E/WindowManager( 3635): at scd.debondroid.DialogUtils.console(DialogUtils.java:298)
E/WindowManager( 3635): at scd.debondroid.DebOnDroid.bootDebian(DebOnDroid.java:147)
E/WindowManager( 3635): at scd.debondroid.DebOnDroid.access$5(DebOnDroid.java:104)
E/WindowManager( 3635): at scd.debondroid.DebOnDroid$5.onClick(DebOnDroid.java:64)
E/WindowManager( 3635): at android.view.View.performClick(View.java:2408)
E/WindowManager( 3635): at android.view.View$PerformClick.run(View.java:8824)
E/WindowManager( 3635): at android.os.Handler.handleCallback(Handler.java:587)
E/WindowManager( 3635): at android.os.Handler.dispatchMessage(Handler.java:92)
E/WindowManager( 3635): at android.os.Looper.loop(Looper.java:143)
E/WindowManager( 3635): at android.app.ActivityThread.main(ActivityThread.java:4717)
E/WindowManager( 3635): at java.lang.reflect.Method.invokeNative(Native Method)
E/WindowManager( 3635): at java.lang.reflect.Method.invoke(Method.java:521)
E/WindowManager( 3635): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/WindowManager( 3635): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/WindowManager( 3635): at dalvik.system.NativeStart.main(Native Method)
D/AndroidRuntime( 3658): Shutting down VM
I cannot see anything before or after that which is relevant (unless you want to see all the dirty jokes my friend has been posting as his status on facebook...)
 

michka

Senior Member
Oct 7, 2010
82
1
0
Trying this on CM7. But when it installs it gets stuck after a minute. Then when i reboot its says that its installed. When i boot debian VNC gives me "connection refused".
 

makr8100

Senior Member
May 29, 2011
64
6
0
South Dakota
www.makrit.net
I got it working on a troubled Atrix (same vnc error that seems common). I booted 1 line at a time and figured out some issues with bash, busybox, etc.

Atrix rooted with gingerbreak running gingerblur v4 rom
busybox WAS v1.10, and was missing both losetup and mount applets
Stericson's BusyBox Installer worked, but v1.18.4 wasn't being used and v1.10 still existed
using bash from http://forum.xda-developers.com/showthread.php?t=537827

adb shell output with minimal comments:

Code:
sh-3.2$ su
sh-3.2# bash
bash: groups: command not found
bash: lesspipe: command not found
  (weird errors?? bash works anyways)
[email protected]:/sdcard# cp /sdcard-ext/debian-img.zip /sdcard/debian/
  (somehow during the initial setup process my phone got unrooted
   running gingerbreak again wiped my internal sdcard
   afterwards it won't mount on my computer, but external sd will
   will have to fix later, but copy to ext, copy to int, done...)
[email protected]:/sdcard# cd debian
[email protected]:/sdcard/debian# ls
  (ls instead of dir in the version of bash I'm using...  grrr...)
share
debian-img.zip
[email protected]:/sdcard/debian# cd /
[email protected]:/# mount -o remount,rw -t yaffs2 /dev/block/mmcblk1p1 /system
  (block device was slightly different name, but tab complete works on my bash :D)
[email protected]:/# export bin=/system/bin
[email protected]:/# export img=SDPATH/debian/debian.img 
[email protected]:/# export mnt=/data/local/debian/
[email protected]:/# export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
[email protected]:/# export TERM=linux
[email protected]:/# export HOME=/root
[email protected]:/# busybox mknod /dev/block/loop5 b 7 0
mknod: /dev/block/loop5: File exists
  (error wtf?!)
[email protected]:/# busybox losetup /dev/block/loop5 $img 
losetup: applet not found
  (:o not looking good)
[email protected]:/# busybox mount -t ext3 -o noatime,nodiratime /dev/block/loop5 $mnt                    
mount: applet not found
  (zomg who left mount out of busybox?! o.O)
[email protected]:/# busybox
BusyBox v1.10.2 (2010-10-25 17:12:51 PDT) multi-call binary
  (gingerblur uses bb v1.10.2?! you bastards!)

Usage:  (...)

[email protected]:/# /system/xbin/busybox
BusyBox v1.18.4 (2011-03-20 15:16:04 CDT) multi-call binary.
  (I have a 2nd busybox, but have to relocate it)
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

[email protected]:/# rm /bin/busybox
[email protected]:/# ln -s /system/xbin/busybox /bin/busybox
[email protected]:/# busybox
BusyBox v1.18.4 (2011-03-20 15:16:04 CDT) multi-call binary.
  (much better....)
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage:  (...)

[email protected]:/# busybox mount -t ext3 -o loop,noatime,nodiratime $img $mnt
  (found this suggestion, produced an error I can read :D)
mount: mounting SDPATH/debian/debian.img on /data/local/debian/ failed: No such file or directory
[email protected]:/# export img=/sdcard/debian/debian.img 
[email protected]:/# busybox losetup /dev/block/loop5 $img                     
losetup: /dev/block/loop5
[email protected]:/# busybox mount -t ext3 -o noatime,nodiratime /dev/block/loop5 $mnt                    
mount: mounting /dev/block/loop5 on /data/local/debian/ failed: Invalid argument
[email protected]:/# busybox mount -t ext3 -o loop,noatime,nodiratime $img $mnt
  (retry with new path settings and zomg something mounted)
[email protected]:/# busybox mount -t devpts devpts $mnt/dev/pts     
[email protected]:/# busybox mount -t proc proc $mnt/proc
[email protected]:/# busybox mount -t sysfs sysfs $mnt/sys
[email protected]:/# busybox sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
[email protected]:/# echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
[email protected]:/# echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf  
[email protected]:/# echo "127.0.0.1 localhost" > $mnt/etc/hosts
[email protected]:/# busybox mount --bind /sdcard $mnt/sdcard
[email protected]:/# busybox chroot $mnt /bin/bash
localhost:/# ps aux | grep vnc               
Unknown HZ value! (68) Assume 100.
10125    19439  0.3  3.2 298352 27460 ?        Sl   04:09   0:26 org.onaips.vnc  <--not the right vnc
root     32550  0.0  0.0   1640   616 pts/4    S+   06:34   0:00 grep vnc
localhost:/# export USER=root
localhost:/# rm -r /tmp
localhost:/# mkdir /tmp
localhost:/# vncserver -geometry 960x540 -depth 24
  (atrix resolution :D)
xauth:  creating new authority file /root/.Xauthority

New 'X' desktop is localhost:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:1.log
After successfully running the CLI boot procedure above DebOnDroid apk "boot debian" button actually does something, but same vnc failure, and then instead of continually allowing me to "boot debian" it actually offers the ability to "quit debian", which seems to work, but still no way to actually get in. Seems like fixing busybox fixed 1/2 the problem.

Lastly, is there source to the .apk so I can poke at the scripts? Or are they located on the phone? Looks like we just need to clean it up a bit, but who knows how universal we can make it.... I'll probably break it for someone else D:

Addition: I think I used the wrong partition, didn't know much about partitioning to start and when I was done webtop wouldn't boot. I will not be attempting this again, but make sure to read up on partitioning before installing. I did get the separate Debian webtop hack installed so I'll be sticking with that. Replacing BusyBox may have actually been the culprit instead, because it's not inconceivable that stock BusyBox is required to boot webtop.
 
Last edited:

Lou2serious

Senior Member
Jun 9, 2009
292
2
0
Orange county
Ubuntu is actually based off of debian. It shouldn't be to hard for the developer to do it. Although it probably wont be very usable it would be nice for bragging rights.

Please may we get Ubuntu for this without any other window managers just pure ubuntu.
This company has ubuntu, chrome os and android booting natively on an OMAP chipset.
http://www.alwaysinnovating.com/products/smartbook.htm

Maybe someone could use this info to get ubuntu running on the defy even dual booting might be possible.

Here's the source code
http://git.alwaysinnovating.com/
 

makr8100

Senior Member
May 29, 2011
64
6
0
South Dakota
www.makrit.net
Do we need busybox for this?
Absolutely, but make sure to check if your phone has busybox stock - if the new busybox doesn't have the same functions as the likely custom/proprietary stock busybox you may lose features on your phone. My Atrix's webtop broke because of either replacing busybox or using a random partition for the install (i.e. I didn't know what I was doing when selecting a partition and used the closest filename that tab would autocomplete).