LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Firefox OS, Sailfish OS, Maemo, MeeGo, Ubuntu Mobile, WebOS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org

Notices



Reply
 
Search this Thread
Old 05-02-2012, 08:51 PM   #1
BlackHawk
Member
 
Registered: Mar 2011
Location: Southern California
Distribution: Fedora 14
Posts: 59

Rep: Reputation: 1
how do you give more hd space for linux on android phones?


hello everyone,

I just recently installed ubuntu linux onto my android bionic phone and I must say I loved it!

I was having so much fun with it, but at the same time I was having too much fun. I started installing too many apps that were taking up more space and when i went to install another app i believe it was openjdk (java) "apt-get" gave me an error saying "dkpg" was out of space and i needed to do "dpkg --configure -a" to fix the problem...

then when i did "du -sh" it came back with "213MB".

After that problem happened when i tried to load ubuntu back up on my phone and run androidvnc to connect to the lxde desktop window manager (gui) it would say that androidvnc was connected to "localhost" but only show me a grey screen with an "x" that was acting like a mouse.

So now i am forced to format my sdcard and download and reinstall ubuntu linux all over again... (this is just part of the whole linux experience)

So now my big question is how do i make more room for linux and add more space so I can have more fun and downloand and install more interesting apps?

Is there something i need to do with "dd" ?

On a side note my sdcard is 16Gigs and my internal HD is 8gigs and when I got this error with "apt-get" and "dpkg" i had plenty of space still left so I am confused about where i need to make more room?

The only 2 files that I am using for ubuntu are "ubuntu.sh" (shell script) and "ubuntu.img" (image file). So i can only guess that everything that i download and install is going to the image file. So is there something i can do in either the android os or in ubuntu to make more space so i can add more apps?

I hope someone here on this forum has come accross this isssue and can assist me...

I came across this very interesting article that talked about installing metasploit onto an android phone with linux. In the article it talks about adding more space for metasploit and adding an extra 1.5gigs.

the command he showed was this...


Code:
dd if=/dev/zero bs=1M count=XXX >> ubuntu.img
where XXX is the size (adding 1.5gigs would be)

Code:
dd if=/dev/zero bs=1M count=1500 >> ubuntu.img
what i am confused about is do i do this command in the android os in the terminal with the app "terminal emulator" or do i need to do this in linux.

i tried it on the android os and the android os has the app "dd" but it complained about /dev/zero

so i am not sure what to do next...

i really hope someone here can help me out

INFO about phone:

System Version: 5.9.902.XT875.Verizon.en.US

Model Number: Droid Bionic

Android Version: 2.3.4

Kernel: 2.6.35.7-g83f1a47

if anyone here needs anymore information i will be happy to provide it...

I want to thank you all for your time and for your help,

-BlackHawk
 
Old 05-02-2012, 08:54 PM   #2
BlackHawk
Member
 
Registered: Mar 2011
Location: Southern California
Distribution: Fedora 14
Posts: 59

Original Poster
Rep: Reputation: 1
if anyone is interested here is a link to the article about adding metasploit to an android phone with link installed...

http://r00tsec.blogspot.com/2011/05/...desire-hd.html

i really hope someone here has came across this situation and can assist me.



I thank you all for your time,

BlackHawk
 
Old 05-26-2012, 08:24 PM   #3
justboo2u
Member
 
Registered: Feb 2011
Distribution: Ubuntu, Debian(ARM),XP,W7,CP/M
Posts: 126

Rep: Reputation: 20
This might help some...

mknod /dev/zero c 1 5

if your busybox has mknod...
(you have to 'su' also...)


Last edited by justboo2u; 05-26-2012 at 08:27 PM.
 
Old 05-28-2012, 09:47 PM   #4
BlackHawk
Member
 
Registered: Mar 2011
Location: Southern California
Distribution: Fedora 14
Posts: 59

Original Poster
Rep: Reputation: 1
thank you for your reply justboo

hey thank you so much justboo for your reply, i truly appreciate it.

Yes i do have busybox (pro) installed on my android bionic phone. I currently have ubuntu installed on my hard drive (sdcard) on my phone and another linux distro on my sdcard (sdcard-ext). Now i have heard that android allows for up to 4gig in max size for partitions or in my case image files. Now i believe that my ubuntu (ubuntu.img) file is 2gigs, and I would like to try and up it to at least 2.5 or 3 gigs. Now how would i be able to do that with the commands that you suggested in your above post?

I would really like to learn how to do this because i am down to like 160MB's left and that does not leave much space for new applications or for updates. So if you could really help me on this issue i would so appreciate it. I have tried emailing the developer of the linux app i purchased from the android market and have looked endlessly on google, and I have had no success.

Again thank you for your reply,

BlackHawk
 
Old 06-01-2012, 06:42 PM   #5
justboo2u
Member
 
Registered: Feb 2011
Distribution: Ubuntu, Debian(ARM),XP,W7,CP/M
Posts: 126

Rep: Reputation: 20
I find more comfortable to build a new blank image and then tar/untar the original back into it...
Such as:

Code:
dd if=/dev/zero of=imagefilename.img bs=1024 count=0 skip=7168
(for a 7gb image)
then use mke2fs to format the image:
Code:
mke2fs -F imagefilename.img
mount the original image to a common spot... like /mnt/loop1

Code:
mount -o loop originalimage.img /mnt/loop1
then tar it up:
Code:
tar -cvf original.tar /mnt/loop1
umount the original and mount the larger image, then untar the backup to the new image.
Code:
umount /dev/loop
mount -o loop imagefilename.img /mnt/loop1
cd /
(to get proper placement. if you do not, youll end up with /mnt/loop1/mnt/loop1/*)
Code:
tar -xvf original.tar
There are easier ways, but I like this one...

WORD OF WARNING... I often get the lines for tar mixed up.


If youre gonna use a 4gb card, Id make it a bit smaller, to ensure that the entire image will fit... like using 4000 out of 4096 instead of the 7168 above...

Last edited by justboo2u; 06-01-2012 at 06:53 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Android Shmandroid. Give me Apple support or give me nothing. LXer Syndicated Linux News 0 02-16-2012 04:50 PM
Pros and cons of Android phones, iPhones and Blackberry phones? puppymagic General 21 11-23-2010 08:33 AM
LXer: Android phones give augmented reality view of Australian Open LXer Syndicated Linux News 0 01-18-2010 02:12 AM
LXer: Linux-based Android phones hit eBay Australia LXer Syndicated Linux News 0 10-28-2008 10:10 PM


All times are GMT -5. The time now is 09:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration