• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

How to use SmartPhone as Ubuntu liveUSB?

Dear all,

I dunno if this is the right forum or section to post my question.

You all know the story... you are at friends... they have a pc-prob, accidentally you have your ubuntu liveCD/liveUSB with you... and you help them.
My problem is: my brain is a mess, and I always forget my usb.

My smartphone on the other hand, I'll never forget. So that brings me to the question:
Can I use my smartphone as Ubuntu liveUSB?

Yesterday evening I tried to create a bootable USB stick on my smartphone (both SD-card and internal memory). Rebooted PC, activated USB-connection on my smartphone, hit F12 to select "boot from USB", and nothing happened. It didn't recognise the usb.
I've put the SD-card into my girlfriends smartphone, with the same result :-S
With a normal usb-key it works.

So, I'm wandering... does anyone know if this is possible? And if yes, how?
I don't think this is a "ubuntu-problem", I guess I somehow have to tell my phone to act as a normal usb-key, but I've no Idea how.

Background information:
Ubuntu version I wanna use as LiveUSB : Ubuntu 12.04 LTS 32 bit
my smartphone : LG optimus 2x (p990) (CyanogenMode-7.2.0-RC1-p990)
gf smartphone : Samsung Galaxy SII (original Samsung android version 2.3.5)

Thanks!

Warm regards,
Reinhart

P.S. I posted the same question on http://ubuntuforums.org/showthread.php?t=1978208
 
It might be possible to do. Have you tried enabling "USB debugging" in Settings > Application settings > Development? I've used a cheap Chinese MP4 player as a live Linux bootable USB drive, when I didn't have a regular USB stick to hand. Only thing I found was that the MP4 player wouldn't actually function until it was re-formatted back to FAT, rather than bootable Linux format.

I would guess though that the phone's SD-card wouldn't be accessible to the phone if it was formatted as a live Linux boot drive rather than FAT.

EDIT:

I just tested it and my PC did try to boot from a Samsung Galaxy S, of course it went "No bootable media found" as it wasn't formatted as a live Ubuntu drive. The phone's SD card must be visible and available to the PC BIOS boot options at the time of booting, like when booting from a USB stick.
 
Upvote 0
Ok, I got to the point where I could select "boot from USB" on the PC, but when I continued, it said "no bootable medum found" or something like that.
This was done by using USB-creator (in Ubuntu).

The problem is, that USB-creator can only install the liveUSB after formatting the SD-card (or internal card (I tried both)). But when formatted, android won't recognise the fat32 filesystem. And when I try to connect (mount in english?) the SD-card or the internal memory, android won't let me. I expect that's the reason why the pc indicates "no bootable medum found".

When I format the SD-card (or internal card) by android and put the LiveUSB on it whithout formatting (not possible in Ubuntu, possible in windows (I used "Universal-USB-Installer-1.8.9.7.exe")), then I am not able to select "boot from USB".

So, I think there are two possible solutions:
1) or I have to, somehow, make the computer be able to boot from the android file system (A2SD+?)
2) or I have to install the drivers for filesystems like Fat32, EXT2/3/4, ... to my android phone.

Since 1) isn't a good solution for when I wanna boot different computers, I hope someone knows a way to use the second solution.... I don't seem to find it in the "play store"

Warm regards,
Reinhart
 
  • Like
Reactions: mikedt
Upvote 0
Finally I got it working!

- put Ubuntu as liveUSB on the SD-card (using format)
- reboot android in ClockworkMod Recovery
select : mounts and storage -> mount USB storage
- Reboot PC, booting from USB
Now Ubuntu LiveUSB boots.

Finally! :-D

However... now the SD-card isn't usable within Android. So next step is to figure out how to make 2 partitions on the SD-card.

To be continued...

Warm regards,
Reinhart
 
  • Like
Reactions: mikedt
Upvote 0
So, I think there are two possible solutions:
1) or I have to, somehow, make the computer be able to boot from the android file system (A2SD+?)
2) or I have to install the drivers for filesystems like Fat32, EXT2/3/4, ... to my android phone.

Since 1) isn't a good solution for when I wanna boot different computers, I hope someone knows a way to use the second solution.... I don't seem to find it in the "play store"

Warm regards,
Reinhart

I'm sure recognising EXT2/3/4 is at the Linux kernel level. Normally the Android Linux kernel has no reason to include EXT2/3/4. AFAIK Android itself uses YAFFS/YAFFS2 and can recognise FAT and FAT32 storage media. You'd probably have to build a custom kernel to get Android to recognise EXT2/3/4

EDIT:

Reinhart just I saw your "Finally I got it working!" post ... keep us posted and good luck. :)
 
Upvote 0
AFAIK Android itself uses YAFFS/YAFFS2 and can recognise FAT and FAT32 storage media. You'd probably have to build a custom kernel to get Android to recognise EXT2/3/4
Ow, I dunno anything about writing code :-S, so I'm not going there ;-)

When I format the SD-card using android, windows recognizes it at FAT32, but cannot edit the partition. In Linux I can use the partition, but gparted doesn't recognize it (no partitions).
When I format the SD-card using windows/linux, android sais the sd-card is damaged, and the only way to connect the sd-card is by formatting it again.

So, I just have to look for a partition manager that can both work with YAFFS/YAFFS2 and fat32. Thanks for the tip mikedt.

Reinhart just I saw your "Finally I got it working!" post ... keep us posted and good luck. :)
Thanks!

Yes, I will definitely post a small howto here when I'm completely finished.

Warm regards,
Reinhart
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones