[MOD][SOLVED] Ubuntu install on G2 - G2 and Desire Z Android Development

Unable to install ubuntu on the G2 i get an error when i run the ubuntu.sh and bootubuntu commands , see attached . i got the files from http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
Please help !!! Also i am running this rom ROM] (ext3-sdcard-based) - StockG2 (optional Manup456 Themed) - v1.1 - 10/14/2010 .
UPDATE I was able to get the following method to work on my root G2 running the desire z rom . http://forum.xda-developers.com/showthread.php?t=836022 .

*bump*
Id actually really like to see this able to be accomplished

I have Debian working perfectly in a chroot. I'll give Ubuntu a shot this weekend.

keenerb said:
I have Debian working perfectly in a chroot. I'll give Ubuntu a shot this weekend.
Click to expand...
Click to collapse
What steps did you follow to get debian to work ? It shout be the same process just sub out the debian image for the ubuntu image . Are you running the enomther themed rom off the sdcard? do you have the instructions in a step by step format i could try ? Thanks in advance i was able to get this running on the mytouch slide but no luck on the G2 , i think i just need an updated install.sh or ubuntu.sh script to write to the corect paths .

bled82 said:
What steps did you follow to get debian to work ? It shout be the same process just sub out the debian image for the ubuntu image . Are you running the enomther themed rom off the sdcard? do you have the instructions in a step by step format i could try ? Thanks in advance i was able to get this running on the mytouch slide but no luck on the G2 , i think i just need an updated install.sh or ubuntu.sh script to write to the corect paths .
Click to expand...
Click to collapse
My method used actual linux partitions.
http://forum.xda-developers.com/showthread.php?t=811765
It was based on my Cliq Ubuntu chroot here:
http://modmymobile.com/forums/403-m...ent/526845-successful-debian-chroot-cliq.html
The Cliq chroot guide worked perfectly except the filesystem for /system is EXT3 now instead of yaff2, and the partition numbers have changed.
mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
Needs to be
mount -o rw,remount -t ext3 /dev/mmcblk0p25 /system
And
mount -t ext2 -o noatime /dev/block/vold/179:2 /system/debian
Needs to be
mount -t ext2 -o noatime /dev/block/vold/179:34 /system/debian
Everything else should pretty much be identical.
You may want to substitute /data/debian for /system/debian, since /system gets wiped every reboot.
If you used the parallel SD-card based rom that enom posted the debian block device might be 179:35 or 179:36, depending on whether you added one or two partitions for that rom.

keenerb said:
My method used actual linux partitions.
http://forum.xda-developers.com/showthread.php?t=811765
It was based on my Cliq Ubuntu chroot here:
http://modmymobile.com/forums/403-m...ent/526845-successful-debian-chroot-cliq.html
The Cliq chroot guide worked perfectly except the filesystem for /system is EXT3 now instead of yaff2, and the partition numbers have changed.
mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system
Needs to be
mount -o rw,remount -t ext3 /dev/mmcblk0p25 /system
And
mount -t ext2 -o noatime /dev/block/vold/179:2 /system/debian
Needs to be
mount -t ext2 -o noatime /dev/block/vold/179:34 /system/debian
Everything else should pretty much be identical.
You may want to substitute /data/debian for /system/debian, since /system gets wiped every reboot.
If you used the parallel SD-card based rom that enom posted the debian block device might be 179:35 or 179:36, depending on whether you added one or two partitions for that rom.
Click to expand...
Click to collapse
Cool thanks i bet the partion was what was hanging my up ill try it later and let you know

Since im running the rom of the sdcard i would need to place my img on the ext3 correct ? in which cause i guess placing it in the system folder should work then ? Just wondering if i can get it on my ext partition without running linux , they switched out my work pc and i dont have time to setup a vm right now .

Quick question.
Dont bash me please
What is the point of doing this? other then the fact of being able to do it?

keenerb said:
I have Debian working perfectly in a chroot. I'll give Ubuntu a shot this weekend.
Click to expand...
Click to collapse
Hey just wondering if you gave this a try over the weekend i was away from my pc all weekend so i did not try any thing .

Has anyone been successful in getting the n1 method to work on the g2, it doesn't look like anything propitory to the N1 is done....think ima give it a go tomorrow

i was able to get debian to natively install on my g1, being g1 is very slow compared to the processing power the g2 can give out i might give this a go and see how well it will run along side with android. if i remember correctly g1 was very slow running along side android like this hope g2 would be way much better.
native debian g1
hXXp://novaspirit.com/blog/?p=6
i will give this a go for the g2 =)
p.s. replace hxxp with http

This is as far as I got...I'm thinking its because the fs isn't ext2?
Not sure, ima try playing with the script and see what I can come up with.
Curently runin CM 6.1.0-RC2
Sent from my two cans and a peice of string.

This is what happenes with the 'updated' bootubuntu script :/
Sent from my two cans and a peice of string.

This worked for me, but a) I can't figure out how to right-click in VNC, b) it starts and runs as root, c) why is it Karmic? Is there something wrong with Ubuntu Maverick under ARM? d) can I expand the size of the .img loop-file so that I can install more stuff?
EDIT: BTW, I fixed the above problem that MrOtsKrad was having by doing "sh bootlinux" at the command line instead of just "bootlinux." Or bootubuntu, whatever it was

Is there a way to get this working natively? Booting ubuntu/debian on the G2 without booting into android first? I tried building a boot.img, but I just end up in reboot loop after the white HTC screen and I haven't been able to debug anything yet.

bdogg64 said:
Is there a way to get this working natively? Booting ubuntu/debian on the G2 without booting into android first? I tried building a boot.img, but I just end up in reboot loop after the white HTC screen and I haven't been able to debug anything yet.
Click to expand...
Click to collapse
I get the impression that is a SERIOUSLY non-trivial project, hence the reason we haven't seen (for example) MeeGo ported yet.
So, I figured out a, above: just hold the camera button while tapping. Still don't know how to not be root. Haven't tried an upgrade to Maverick yet mostly because the loopimg only has 111MB (roughly) free.

starkruzr said:
This worked for me, but a) I can't figure out how to right-click in VNC, b) it starts and runs as root, c) why is it Karmic? Is there something wrong with Ubuntu Maverick under ARM? d) can I expand the size of the .img loop-file so that I can install more stuff?
EDIT: BTW, I fixed the above problem that MrOtsKrad was having by doing "sh bootlinux" at the command line instead of just "bootlinux." Or bootubuntu, whatever it was
Click to expand...
Click to collapse
Yes you can change the img size . You can follow the instructions here that where made for the debian image on the g1 . http://www.androidfanatic.com/community-forums.html?func=view&catid=9&id=1610

Can someone post step-by-step instructions to get Ubuntu Maverick working? I tried getting Debian to work on my G1 a while ago and it always rebooted my phone.

I get nothing when I do "sh ./ubuntu.sh" (and it IS there, I checked by doing ls)
And of course if I try "sh bootubuntu" after that, I won't get results.

What rom are you trying this on ? When i did this i was on either stock or one of the very first roms . if you can provide the rom i can flash it and test and see what the issue is .

Related

Ubuntu on N1, Desire next?

Anyone seen this yet?
This guy got Ubuntu to run on his nexus one, is it also possible on our Desire?
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
It's a chroot. I don't know if it's me, but this isn't fascinating since Debian could be chrooted already (right?) - its the native boot we really want. This still runs the Android kernel.
-
I think it would be very facinating.. Android kernel running or not, I'd still be happy to be able to have a full worthy Ubuntu desktop enviroment to play around in. Think of all the apps you can then run! Millions!
But this is an ubuntu x11 session opened via VNC!! this isn't ubuntu on android!
Why would you need ubuntu on a phone? I don't get it...
Can't you just buy a netbook?
Why not just try to use the guide for N1? It should work I think... will try when I have some spare time.
I thought using the N1 guide would work, but i kept getting "bootubuntu not found" (or something similar) when trying to launch bootubuntu. Also I thought Ubuntu would be running on the phone itself, using vnc to access X11, in effect giving the more or less full Linux experience from the phone alone, or have I misunderstood?
N1 guide doesn't work
The N1 guide doesn't work on the Desire because the ubuntu.sh trys to install files onto the devices system partition. But this fails because we don't have write permission to the system partition unless the device is in recovery. I booted into recovery, mounted the /system partition & pushed the files to /system/bin using adb. I then changed the files permission using. I can now run bootubuntu but it fails, I think it's trying to mount ubuntu.img somewhere on the system partition. I think the bootubuntu script needs edited but i hav en't had a chance to do it yet.
You can mount on the system partition regardless of write permissions.
If this is the same as the debian one the mount point is /data/local/mnt
/

[APP] Native EXT2 without custom kernel

Update! Much improved APP version is available here: http://forum.xda-developers.com/showpost.php?p=8230964&postcount=143
Still not recommended for anybody without a fully working recovery mode.
------------
This is very much ALPHA! Don't try it unless you have something to prove!
Does not work with the latest froyo builds
Start off with a clean firmware without any other lagfixes. It should work in other cases, but I've only tested it with a clean JM8. It should work fine in a clean JPC Froyo too. You're gonna need busybox (1.17.1) or similar tools.
Step 1: You need a 512byte MBR file. If you have a 8GB I9000 like me, you can use my attached file. Else, proceed to post #2 on how to create this file for your device.
Step 2: Copy all of the required files to the correct place.
Code:
adb push test.sh /sdcard/test.sh
adb push parted-static /sdcard/parted-static
adb push partprobe-static /sdcard/partprobe-static
adb push playlogos1 /sdcard/playlogos1
adb shell
su
busybox cp /sdcard/test.sh /system/bin/userinit.sh
busybox cp /sdcard/parted-static /dbdata/parted-static
busybox cp /sdcard/partprobe-static /dbdata/partprobe-static
busybox mv /system/bin/playlogos1 /system/bin/playlogosnow
busybox cp /sdcard/playlogos1 /system/bin/playlogos1
chmod 755 /system/bin/playlogos1
chmod 755 /system/bin/userinit.sh
Step 3: Put the MBR file in place. It must be a 512byte file, and it must be placed in /dbdata/test2 - Refer to 2nd post to create one, or use my included one in the zip.
EDIT: Missed a step. You need to move the binary '/system/bin/fsck_msdos' to '/system/bin/fsck_msdos.bak' or other name. You won't be able to unmount if the FAT32 check is running. It will have to be done manually after.
Step 4: This is the hard part! Reboot your phone. The boot logo will be 20 seconds delayed. This is because there is a 'sleep 20' command inside the boot script, as it seems to take 10+ seconds for mmcblk0p3 to show up in /dev/block. I don't know why, it should show up instantly. Anyway, it'll boot up after you see the messed up boot logo.
Step 5: Create the EXT2 partition
Code:
adb shell
su
busybox mkfs.ext2 -b 4096 -m 0 /dev/block/mmcblk0p3
mount -t ext2 -o noatime,nodiratime,errors=continue /dev/block/mmcblk0p3 /data/data2
Step 6: Copy your /data/data across, and whatever else you want too
Code:
mkdir /data/data2
busybox cp -rp /data/data /data/data2/
busybox mv /data/data /data/data.bak
busybox ln -s /data/data2/data /data/data
You can repeat the cp, mv, and ln for app, app-private, system, dalvik-cache
Step 7: Reboot. It'll have the messed up boot animation again.
Congratulations!
Quadrant scores are around 1900 (database writes take longer than EXT2 on RFS, as the buffer is smaller)
It runs very very smoothly though!
Good luck if you try this!
I'll have an app to do all of this later in the week / next week.
If anybody can tell me why I need the 'sleep 20' before /dev/block/mmcblk0p3 is created, I'd really like to know.
Updates / Known Issues
GPS breaks on boot. Fix it with 'kill pid', where pid is found with 'ps' and the process is called '/system/bin/gpsd/glgps_samsungJupiter'
20 second pause is too long, and some apps may start to load before hand! I changed the 20 sec sleep in test.sh to 10 sec, and it seems a lot better. Still need to find out why a pause is needed at all.
How to create your own MBR 512byte file:
First, make sure you have /dbdata/parted-static. See above post on how to copy it.
Then, you need to knock /sdcard/sd and /sdcard out of operation. This method is easiest:
Code:
busybox fuser -km /sdcard/sd
busybox fuser -km /sdcard
umount /sdcard/sd
umount /sdcard
Now you need to create the partition using parted-static. You could use sfdisk or busybox fdisk too, but I like parted!
Code:
/dbdata/parted-static /dev/block/mmcblk0
First, list the existing partitions with 'print'. You should get something like this:
Code:
Number Start End Size Type File system Flags
1 32.8kB 6208MB 6208MB primary fat32 lba
2 6208MB 8221MB 2013MB primary lba
Now, resize your /sdcard partition. It's the big one (6208MB in my case):
Code:
resize 1 32.8kB 5208MB
And then, you need to create a new partition using the remaining space:
Code:
mkpart
logical
5208MB
6208MB
And now list the partitions again with print. You should have something like this:
Code:
Number Start End Size Type File system Flags
1 32.8kB 5208MB 5208MB primary fat32 lba
3 5208MB 6208MB 999MB primary ext2
2 6208MB 8221MB 2013MB primary lba
All done! Exit parted with 'quit'
Now, you need to create the 512byte file. Really easy:
Code:
dd if=/dev/block/mmcblk0 of=/dbdata/test2 bs=1 count=512
And now you have your own MBR file sitting in /dbdata/test2, all ready for use by the reboot script.
Thanks for your work ryan
i Guess you need root
mazsuper said:
Thanks for your work ryan
i Guess you need root
Click to expand...
Click to collapse
Hahah, you very much need root! If root is a problem for you, you really shouldn't try this out! It's fairly complicated. Difficulty Level: Advanced!
That said, this will be hopefully end up in OCLF as a one click option (well, it might have to be 2 clicks). I'm not sure how much testing this is going to need. I guess the more people who help test it out, the sooner I can move it up. I'm sure there are a lot of bugs.
MBR file
Would be willing to give it a try if you could pre-bake a MBR file that is compatible with the 16gb version !
bratfink said:
Would be willing to give it a try if you could pre-bake a MBR file that is compatible with the 16gb version !
Click to expand...
Click to collapse
It's really easy, just follow the steps in post 2. Shouldn't take more than 5 mins.
You just resize the big partition (look for the one with the biggest size) and then enter the start as the same as the current start, and the end as end-1000MB or whatever.
The 20 sec wait seems to be too long though. It is possible to lose apps if they try to load up too soon.
Shows up after doing a few reboots. Should be fixable.
That looks promising. But do I understand it correctly that the system is still running off of rfs? Thumbs up in any case, this looks like it could finally fix the lagging on my JPC
Ok RyanZA, I finally understood what you meant
Meister_Li said:
That looks promising. But do I understand it correctly that the system is still running off of rfs? Thumbs up in any case, this looks like it could finally fix the lagging on my JPC
Click to expand...
Click to collapse
Nope, the system runs completely off EXT2. It's very fast.
Bug found: The fix breaks the GPS deamon for some reason! Interesting, I wonder why.
Anyway, workaround is easy: just kill the gps deamon and it will automatically restart, and work fine. GPS deamon is called /system/bin/gpsd/glgps_samsungJupiter - It can be found with 'ps' and killed with 'kill pid'
Gotta make notes of all of this stuff..
supercurio said:
Ok RyanZA, I finally understood what you meant
Click to expand...
Click to collapse
Woooooooohoooooooooo!!
You see? It works after all! Got some bugs and stuff still, but with a bit of work it is definitely possible to make this bulletproof. I think, anyway.
Do you know why it takes ~5-10 seconds for /dev/block to update? Looking at the log, it seems to wait for vold to do it. I guess I need to find a way to force vold to re-check it quicker?
I'm quite liking this fix so far. Makes JPC a LOT nicer.
Anyway, I'll use this for a day and report back on any issues tomorrow night. If anybody else could give it a try, that would be awesome!
Hi ryan
Thanks for your great work as ever
2 questions
Do I have to do this every time I flash a new rom
And how do I undo this
Sent from my SAMSUNG-SGH-I897 using XDA App
Thank you, RyanZA, for your work! It's very appreciated.
Sent from my GT-I9000 using XDA App
wow first voodoo now this These lag fixes can only get better. Will try this on the weekend when my phone have some "downtime"
Maybe even go back to JPC as well lol Only reason I'm using JM cos of lagfixes lol
Thank you both for you work Curio and Ryan.Im very happy with the voodoo so far but if u are going to make an app like one click i probably wanna try it.Afterall maybe we can get froyo and lagfix next week hein??
Ryan, I'm lazy mate... have you got this into any sort of package yet, or do I need to read the destructions carefully? (Running JPC with your 1.6x lagfix)
Any hope for an apk or similar noob proof stuff?
toca79 said:
Any hope for an apk or similar noob proof stuff?
Click to expand...
Click to collapse
RyanZA said:
That said, this will be hopefully end up in OCLF as a one click option (well, it might have to be 2 clicks). I'm not sure how much testing this is going to need. I guess the more people who help test it out, the sooner I can move it up. I'm sure there are a lot of bugs.
Click to expand...
Click to collapse
Message for char limit.
I mean com'on. Look at when he created this thread. Look at the text in bright red to get an idea of where this is at.

[GUIDE] Flash any recovery easily on the phone using flash_image

Background
To update (flash) a recovery image onto your phone allows you to update or replace your recovery environment on your phone. There are a number of ways to flash a new recovery image, some of the more commonly used methods are using a tool such as ROM Manager or using development tools such as Fastboot. There is also a third method using a standalone utility "flash_image" which allows the flashing of recovery using the terminal emulator on the phone.
flash_image is not a new tool, it has been used on Android since the beginning, many custom ROMs include the utility as part of the ROM itself though not all stock ROMs (including the stock ROM on the G2) include it.
Requirements
1. A permanently rooted (with S-OFF) phone
2. The flash_image binary
3, A recovery image that is compatible with your phone and ROM
3. A terminal emulator application on the phone or use of an ADB shell
Overview:
1. Get the flash_image binary and recovery image onto your phone
2. Copy or move the flash image binary to your system and make executable
3. Use flash_image to update your recovery environment
Stage 1: Get flash_image and recovery image on your phone
1. Download the flash_image binary (not needed if you are running a custom ROM that includes this binary)
2. Download the recovery image you wish to use
You can either directly download the files onto your phone or onto your PC and transfer to your phone. Probably the easiest way to do this is to connect your phone to your computer via USB and mount USB storage, then copy the files to your SD Card. Alternatively you can use ADB Push, bluetooth file transfer or several other methods.
Stage 2: Copy or move the flash image binary to your system and make executable
In terminal emulator:
su
mount -o remount, rw /system
cd /sdcard (or wherever you downloaded/copied the file)
cp flash_image /system/bin
cd /system/bin
chmod 777 flash_image
Click to expand...
Click to collapse
Stage 3: use flash_image to update your recovery environment
In terminal emulator:
su (not needed if using the same terminal session used in the steps above)
cd /sdcard (or wherever you downloaded/copied the recovery image)
flash_image recovery recovery.img (use the appropriate file name for the image file you are flashing)
Click to expand...
Click to collapse
Reboot into recovery and verify that the correct recovery environment is installed
Notes
Any of the commands that call for using a terminal emulator on the phone should work fine using an ADB shell if you prefer.
This was tested on G2 but I can't think of why it would not work on Desire Z or any other phone for which this version of flash_image works. Obviously different phones have different compatible recovery images.
I've attached a zip file containing the flash_image binary that I extracted from the CM 6.1 update zip. I suspect most custom ROMs already have flash_image.
If you are wondering "Why should I use this method over using ROM Manager?" you could be using a recovery image that ROM manager doesn't support, for example ClockWorkMod Recovery 3.x which is required for some experimental ROMs.
If you are wondering "Why should I use this method over using fastboot?" The two main reasons are you can't use fastboot if you are not with a computer with working ADB and using fastboot requires that you have previously flashed the engineering HBOOT.
This is my first guide so I'm open to suggestions or feedback.
Nice one
Though I would suggest that
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
could be simplified to :
Code:
mount -o remount,rw /system
Edit - actually /system isn't even on /dev/block/mtdblock3, and it's not a yaffs2 file system, I suspect that's come from another phone model ?
"dd" will do exactly the same, but no need to install extra stuff since its already there.
dhkr123 said:
"dd" will do exactly the same, but no need to install extra stuff since its already there.
Click to expand...
Click to collapse
I wouldn't have a problem using dd myself. But I would have thought it was much more risky, since instead of typing something relatively user-friendly like "recovery", you're typing in /dev/xyz/abc or similar, which if you get it slightly wrong could be disastrous ?
Excellent, worked for me, flashed CW 3.0 without fastboot
steviewevie said:
Nice one
Though I would suggest that
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
could be simplified to :
Code:
mount -o remount,rw /system
Edit - actually /system isn't even on /dev/block/mtdblock3, and it's not a yaffs2 file system, I suspect that's come from another phone model ?
Click to expand...
Click to collapse
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
steviewevie said:
I wouldn't have a problem using dd myself. But I would have thought it was much more risky, since instead of typing something relatively user-friendly like "recovery", you're typing in /dev/xyz/abc or similar, which if you get it slightly wrong could be disastrous ?
Click to expand...
Click to collapse
Unless you run wpthis before dd, you're perfectly safe. The radio partitions are all protected by the power-on write protect feature of the eMMC AS WELL as the linux kernel write protect on low addresses. Worst you can do is blow away your system, data, cache, misc, boot, or recovery partitions, and these are trivial to recover from.
raitchison said:
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
Click to expand...
Click to collapse
Depends on whether or not the mount command can tell the associations between the devices and mount points, which is determined by either system configuration, or what mount command you are using (i.e. android's mount or busybox mount).
raitchison said:
Interesting, I've been using that command since forever (since I first rooted my G1 in early 2009) and it definitely does work on my G2 as well as my wife's MT4G.
I just tried "mount -o remount,rw /system" on my phone and it does not work, mount gives me the "Usage:" messages which seems to mean it wants more parameters.
Click to expand...
Click to collapse
Sorry, there should have been an extra space, this works on my phone :
Code:
mount -o remount, rw /system
I don't have a "/dev/block/mtdblock3" on my system. My system partition is mounted on /dev/block/mmcblk0p25, and it is ext3 not yaffs2.
What ROM are you running ? I am running the stock DZ 1.34 ROM. I wonder if you are running Gingerbread ?
steviewevie said:
Sorry, there should have been an extra space, this works on my phone :
Code:
mount -o remount, rw /system
I don't have a "/dev/block/mtdblock3" on my system. My system partition is mounted on /dev/block/mmcblk0p25, and it is ext3 not yaffs2.
What ROM are you running ? I am running the stock DZ 1.34 ROM. I wonder if you are running Gingerbread ?
Click to expand...
Click to collapse
I'm running the Stock G2 T-Mobile post-OTA ROM, definitely not Gingerbread.
Edit: I just tried your method and it works, I will update the guide because your way is simpler and sounds like a safer choice.
you could just rename the CW 3.x.x recovery to the exact named recovery slap it in the cloclwork download folder after you delete the old one and flash it with CW just a quicker trick for GB roms
Not sure that's actually quicker, at least I don't think it would be for me, especially if you are changing recoveries with any frequency (like if tying out Gingerbread ROMs then going back to a 2.2 ROM) because you'd need to constantly rename your recovery images. With my method you would only need to leave the two files named as they are, or for expediency you could rename to recovery.img and recovery3.img then when you wanted to switch you could just execute:
flash_image recovery recovery.img
Click to expand...
Click to collapse
or
flash_image recovery recovery3.img
Click to expand...
Click to collapse
Depending on which recovery you wanted at that point & time.
As I said in the guide, there are already a number of options available, using ROM Manager and fastboot are the most commonly seen in guides but your method and mine are other options for people for whom they work better.
Works!!!
Hi my friends!
It worked for me flawlessly. I was using virtuos 0.9 on my desireZ
Great description, but file did not work for me
It's a very good description that a novice like me can follow. And, I am sure the provided file works for many of you, since many of you reported it to work. After following this guide, and not getting it to work (Stopping Signal error), I decided to find another binary file for flash_image, and the other flash_image file worked for me on my Sprint CDMA Hero. My phone currently has aospMod v0.9.9.2 | AOSP 2.2.1(12/10/2010), if it matters.
One can download a flash_image from here http://cyanogen-files.carneeki.net/flash_image.zip
Then unzip and place on sdcard - follow all the steps in the original post of this thread.
It is my understanding that this file is not unique for different android phones, but if I am incorrect, someone please reply to this thread to correct me.
Again, great job in summarizing the steps.
Regards,
Sanjiv
so darn easy! thank you!
Also usable for splash screen ??
Just curious,
Anybody tried to use flash_image to flash a custom splash screen ?
Something like :
flash_image splash1 customsplash.img
very good post for a newbie like me, just want to make sure, do i need to do the stage 2 every time I flash the recovery?
jaoyina said:
very good post for a newbie like me, just want to make sure, do i need to do the stage 2 every time I flash the recovery?
Click to expand...
Click to collapse
No, you only need to do stage 2 once, whenever you update/change recoveries from that point forward just use stage 3.
Is there a way I can reflash a recovery without access to the ROM?
I'm stuck at the HTC splash screen, so I'm basically stuck in my current (broken) recovery.
sanjivp2000 said:
One can download a flash_image from here (..)[/URL]
Click to expand...
Click to collapse
The flash_image in the start post did not work for me, the one above did.
Also, my HTC Hero was missing the cp command.
Instead, I used: cat /sdcard/flash_image > /system/bin/flash_image
Successfully flashed recovery again

G-Slate root

There's no G-Slate forum yet, so this goes here.
How to root your T-Mobile G-Slate
This process works under Linux. The hard part under Windows would be mounting a file as an ext4 filesystem, but if you can do that you win.
You need:
The four files in the gslate_root.zip archive attached to this post.
To root:
Put those four files in a directory and open a terminal to there.
Shut down your G-Slate and plug it into your computer via USB.
Hold down both volume buttons and press the power button. The G-Slate will not appear to turn on, but it'll go into APX mode.
Running "lsusb" should show an entry "0955:7820 NVidia Corp."
Run the command "sudo su" to get a root shell. Running "ls" should still show the four files.
./nvflash --bl bootloader.bin --getpartitiontable ptable.txt
./nvflash -r --read 8 system-orig.img
Wait while 400 meg of data copies.
cp system-orig.img system.img
mkdir system
mount -o loop system.img system
cp su system/bin
chmod 4755 system/bin/su
cp Superuser.apk system/app
umount system
./nvflash -r --download 8 system.img
Wait while it copies back.
./nvflash -r --sync
Press the reset button under the sim cover to reboot.
There's your rooted G-Slate. Making that process "one click" is going to suck.
Troubleshooting:
You may need to install the package libstdc++6 or lib32stdc++6 to get nvflash to run.
You may need to use "sudo" on the nvflash commands.
If you want to try to make this work on Windows, the nvflash.exe binary and the APX USB drivers are are available from nvidia.com
This is unbelievable! Can't wait to give it a shot.
EDIT: For future reference, DO NOT use Virtual Box to try and root your device. There are issues getting the drivers to work properly. Lsusb will not work. The following methods have been tested and work:
1. Wubi install of Ubuntu Linux
2. VMware install of Ubuntu Linux
3. Dual-boot install of ""
4. Dedicated Linux box (duh)
And remember: If at first you don't succeed, try try again. Then visit our IRC channel.
Trying this on Windows 7 is gonna be a trip. Never workt with ext4 before.
Install Ubuntu and you can dual boot into Windows or Ubuntu. That's what I do.
Sent from my LG-V909 using XDA Premium App
This method is confirmed working. Thank you so much for the hard work Chandon. It wasn't very hard to complete on Linux. I can't believe my G-Slate is rooted!!!! Hell yes! Oh and the device is not wiped during the process either just to let everyone know!
Some More Help
Would it be possible to pull the recovery partition off now?
Why I ask. I am in a bit of a pickle. My slate will get to the first LG boot screen and then freeze. It does not even go to the boot animation. I can still get into fastboot and APX mode and it is seen by my computer.
How did i get here. While poking around in fastboot I am pretty sure i wiped they recovery partition D'OH.
I was able to complete the steps listed (for root) with out issue but still cannot get past the boot screen since this is only modifying the system partition.
I am thinking that if that could be pulled from the device i could flash it to mine and bring my slate back to life?
Am I way off on this one?
SmellyTunic -
Attached are all the reasonably small partitions that I could pull off my device with nvflash. This should be everything except /system, /cache, and /data.
I suggest backing everything up before flashing any of these, on the off chance that there's some difference between devices.
Thanks so much for this! Is there a good linux live cd(or bootable usb flash drive) someone could suggest where this could be accomplished easily? Not ready to take the plunge actually installing linux on my system yet >.>
Here you go
shinkinrui
Info and steps can be found here http://www.ubuntu.com/download
Pretty easy to set up a dual boot machine.
Chandon,
Any chance you know off hand which one of those partitions is the recovery?
I suggest doing a Wubi install [1], where Ubuntu pretends to be a Windows app (which you can then uninstall like any other app later). Alternatively you could try using VirtualBox [2], but that's less guaranteed to work.
The only reason I wouldn't do this with a Live CD is that you'd risk losing your backup of the stock /system partition when you reboot. It would also make losing power in the middle of the flash really annoying.
[1] https://wiki.ubuntu.com/WubiGuide
[2] (edit: virtual box doesn't easily see the USB device)
Thanks guys, reading about that Wubi solution looks like the simplest way to have a dual-boot system. I like it! I'll be getting my root on later tonight
i prefer Ubuntu just cause you can install it in windows then simply restart and boot into Linux or Windows. This way you don't need to worry about not having Linux again.
SmellyTunic said:
Any chance you know off hand which one of those partitions is the recovery?
Click to expand...
Click to collapse
I'm sure that /system is 8 and the kernel is 13, but don't know about anything else. You might be able to figure it out by reading the ptable.txt file generated by the --getpartitiontable command - it's pretty clear except for the part where it uses 3 letter partition names.
Thanks. I will take a look when i get home from work.
Sent from my GT-I9000 using XDA App
While we are on the topic of development, we really need a forum over here at XDA for the G-Slate!
deez1234 said:
While we are on the topic of development, we really need a forum over here at XDA for the G-Slate!
Click to expand...
Click to collapse
I definitely concur.
thengkiu so much
works like a charm
I have no idea why I'd ever need/want to root my G Slate, I'm fairly simple in my desires for my device - but I have to say I'm delighted to see it is possible and am ever so grateful for folks who figure this stuff out because it keeps moving G Slate towards legitimacy.
Thank you!!
The hard part under Windows would be mounting a file as an ext4 filesystem, but if you can do that you win.
Click to expand...
Click to collapse
No kidding. Since the linux method failed miserably for me, I've decided to press forward with trying to do it on Windows. Problem is, I have yet to find any way to mount an ext4 filesystem on Windows. There are several options out there that will allow you to read ext4 filesystems on Windows, but not write. Any suggestions?
my friend will be happy to see that this is possible.

[SCRIPT]Debian Image Builder (01-22-2012)

Debian Image Builder...
So basically, I've been reading several different articles, etc. on running Debian and/or Ubuntu on Android. I did this on my Eris and D1 in the past, and I figured that it would work even better on the Galaxy Nexus. Of course it does... Anyway, it can be run from a loop mounted image or a separate partition on most phones. However, for phones like this one with no sdcard slot, it makes sense to just do the image thing.
After building and rebuilding an image a few times, I decided to do what I normally do and turn those crazy linux commands into a script. It's not really all that complex or fancy, but it works and can be improved. I hope you find it helpful.
NOTE: This is really just the first step in getting Debian running on your phone. This will just create the image. You still have some work to do. There are other ways to do this, but I like having control of the initial image...
1/14/2012 - fixed some typos and added 'apt' as a default package (debootstrap did this by default, but apparently multistrap doesn't)
1/16/2012 - removed multistrap and went back to debootstrap for now
1/21/2012 - added a setup script to do the second stage and updates after booting into Debian on the phone, fixed extra package install code
1/22/2012 - updated variable code per swordrune10's suggestion
Download: https://github.com/gnarlyc/DebianImageBuilder
Currently requires Debian 6, but feel free to fix that for me.
Rock on.
Thanks. I had fun with Debian on my Eris back when that was being worked on. I am sure this will be much faster on this beast.
synesthete said:
Thanks. I had fun with Debian on my Eris back when that was being worked on. I am sure this will be much faster on this beast.
Click to expand...
Click to collapse
It does, and it's pretty sweet with a bluetooth keyboard & mouse and a monitor via a MHL video cable. I've even compiled a kernel or two on it.
Where do we put the image? Do we have to create a new partition?
Sent from my Galaxy Nexus using XDA App
ttereve said:
Where do we put the image? Do we have to create a new partition?
Sent from my Galaxy Nexus using XDA App
Click to expand...
Click to collapse
No, you don't have to create a partition. Here's what I do:
I use Connectbot for a terminal emulator, but there are others out there.
One time:
1) 'mkdir /data/local/debian' (don't type the single quotes)
2) copy the image to /sdcard/
Each time I start up (actually, I've made a script for this too):
1) 'su'
2) 'mount -o loop -t ext2 /sdcard/linux.img /data/local/debian'
3) 'chroot /data/local/debian /bin/bash'
4) ta-da!
You should be at a Debian bash prompt. Check /etc/apt/sources.list to make sure it's there and has 'deb http://ftp.us.debian.org/debian squeeze main'. You might also have to do 'dkpg --configure -a'. If it looks like that's needed each time, I'll automate it. If you install a desktop gui like xfce or whatever, you'll probably want to install tightvncserver in Debian and get an Android VNC client from the Market. I'll probably add more options to make these things a little easier in the future.
I'm still going through the entire process over and over until I get things how I want it, so the script will be updated as I get the time.
I'm guessing we can use ext3 (or even ext4) instead of ext2?
ttereve said:
I'm guessing we can use ext3 (or even ext4) instead of ext2?
Click to expand...
Click to collapse
I dunno. It won't hurt to try!
Is there any chance that this will work on GSM GN?
Sent from my Galaxy Nexus using xda premium
JTECJ said:
Is there any chance that this will work on GSM GN?
Sent from my Galaxy Nexus using xda premium
Click to expand...
Click to collapse
Yes. This just builds the rootfs in an image. It should work for nearly any arm based Android device. I'm still working out some kinks with getting vnc and SSH servers working though. These worked fine when I used debootstrap to create the rootfs, but multi strap is much more flexible. So, I'm going to keep trying multi strap for a bit.
alright I can get into [email protected] bash but i can't start ssh because well, there is no ssh in/etc/init.d/ how do I get it in there? (i built my own ubuntu rootfs with rootstock)?
ttereve said:
alright I can get into [email protected] bash but i can't start ssh because well, there is no ssh in/etc/init.d/ how do I get it in there? (i built my own ubuntu rootfs with rootstock)?
Click to expand...
Click to collapse
Did you install openssh-server?
EDIT: Yeah, some things aren't working quite right with installing and updating packages. I might have to re-work it with debootstrap again... Oh well.
Ok. Give me a day or two. I've re-written the script using debootstrap instead. I'll update the repo as soon as I do my initial test, which should be later tonight.
sweet I got it all to work! I'll try and get a script up for the way I did it.
btw I used a rootstock ubuntu rootfs
now I need to figure out how to setup gnome through command line!
ttereve said:
sweet I got it all to work! I'll try and get a script up for the way I did it.
btw I used a rootstock ubuntu rootfs
now I need to figure out how to setup gnome through command line!
Click to expand...
Click to collapse
Cool! I read something about rootstock, but never really looked too deep. Yeah, post your code. That would be great. I have used debootstrap before, so I know it works. The thing that I never liked is that you have to run '/debootstrap/debootstrap --second-stage' after you boot into Debian on the phone. With multistrap, the packages are supposed to all be there and ready to go. (At least, that's how I understand it.) Anyway, I'm working out debootstrap again, and will just do a one-shot startup script or something. Or maybe, I'll switch gears and do it your way instead...
from: http://androlinux.com/android-ubuntu-development/how-to-build-chroot-arm-ubuntu-images-for-android/
build rootfs
Code:
sudo rootstock \
--fqdn ubuntu \
--login ubuntu \
--password ubuntu \
--imagesize 4G \
--seed linux-image-omap,build-essential,ssh,tightvnc
then make an image:
Code:
dd if=/dev/zero of=ubuntu.img bs=1MB count=0 seek=4096
format as ext4
Code:
mkfs.ext4 -F ubuntu.img
mount empty image
Code:
sudo mount -o loop ubuntu.img /mnt
extract rootfs inot image
Code:
sudo tar -C /mnt -zxf armel-rootfs-datetag.tgz
and unmount
Code:
sudo umount /mnt
this is my script to get chroot working (but this script fails and idk why so any help would be appreciated) (modified from the script http://burningbroccoli.se/post/949205350/chrootd-ubuntu-on-samsung-galaxy-s-android):
Code:
#!/bin/sh
echo "mount the image"
mount -o loop -t ext4 /sdcard/ubuntu.img /data/local/ubuntu
echo 'Mounting proc,sys and dev'
busybox mount -t proc proc /data/local/ubuntu/proc
busybox mount --bind /sys /data/local/ubuntu/sys
busybox mount --bind /dev /data/local/ubuntu/dev
echo 'Exporting a proper path'
export PATH=/bin:/usr/bin:/sbin:/usr/sbin:$PATH
echo 'Chrooting and starting ssh server'
chroot /data/local/ubuntu /bin/bash
echo "And your ip is:"
busybox ifconfig | busybox grep "inet addr"
I looked at rootstock. It doesn't appear to be Debian friendly, but maybe I'm just missing something. As soon as I'm happy with this on Debian, I'll look into making it work on Ubuntu also. I also realized that debootstrap has an option to install extra packages, so that's cool.
Right now, this is working well for me, but there are things that I would like to add.
ran into a problem, apparently it doesnt know let so it pretty much didnt work..
Code:
./debianImageBuilder.sh: 20: let: not found
running oneiric and the UI is gnome3
---------- Post added at 04:53 PM ---------- Previous post was at 04:37 PM ----------
nvm, i got it to work by modifying it to this.. u can do whatever to the code, im just happy to help... tho im not sure why let doesnt work for me x.x
Code:
export image_name=debian.img
export build_folder=image_folder
real_image_size=$(6442450944)
echo "******************************"
echo "Installing dependencies"
echo "******************************"
apt-get install debootstrap
echo "******************************"
echo "Gather info"
echo "******************************"
echo -n "What size image would you like to create? (in GBs): "
read image_size
real_image_size=$(((($image_size * 1024) * 1024) * 1024))
swordrune10 said:
ran into a problem, apparently it doesnt know let so it pretty much didnt work..
Code:
./debianImageBuilder.sh: 20: let: not found
running oneiric and the UI is gnome3
---------- Post added at 04:53 PM ---------- Previous post was at 04:37 PM ----------
nvm, i got it to work by modifying it to this.. u can do whatever to the code, im just happy to help... tho im not sure why let doesnt work for me x.x
Code:
export image_name=debian.img
export build_folder=image_folder
real_image_size=$(6442450944)
echo "******************************"
echo "Installing dependencies"
echo "******************************"
apt-get install debootstrap
echo "******************************"
echo "Gather info"
echo "******************************"
echo -n "What size image would you like to create? (in GBs): "
read image_size
real_image_size=$(((($image_size * 1024) * 1024) * 1024))
Click to expand...
Click to collapse
Cool. That does look a bit cleaner. The code for installing extra packages wasn't right/all there, so I'm working on that now.
Thanks for this script. It worked perfectly for me. It's great to be able to apt-get things on my phone, and it's interesting to run debian's utilities on Android. A lot of other methods are about getting some sort of Linux desktop on Android, but I really appreciate the barebones CLI that this provides. To my knowledge this is the only way to be able to run ping6 on Android.
To anyone thinking of setting this up - make sure to install busybox!
I made a couple of helper scripts to get cleanly in and out of the chroot, and to make the sdcard directory available within debian. I'm keeping this stuff stored in /sdcard/debian:
Code:
[email protected]:/sdcard/debian # ls
debian.img
debroot
start.sh
stop.sh
start.sh
Code:
mount -o loop -t ext2 debian.img debroot
busybox mount --bind /sdcard debroot/mnt
chroot debroot /bin/bash
stop.sh
Code:
umount /mnt/sdcard/debian/debroot/mnt
umount /mnt/sdcard/debian/debroot/dev/pts
umount /mnt/sdcard/debian/debroot/proc
umount /mnt/sdcard/debian/debroot/sys
umount /mnt/sdcard/debian/debroot

Categories

Resources