[Q] How to port/cook/bake your own android rom??? - HD2 Android Q&A, Help & Troubleshooting and Genera

How can i take a cooked desire ROM, and port it to the htc hd2? (or use it as a base?)
I understand how to make a system.ext2 (make the image, not how to put anything in it) and i understand how to mount it -- but how can we make the build??? there are no tutorials on this at all, and i wish there was.
Any help would be extremely helpful! Thanks in advance!
------------
Oh and i noticed that nobody has ported any Evo 4G roms (even though the devices are pretty similar). why is that? Because it is CDMA?
------------
Update: What I KNOW​
ThaDeanesta said:
(From my post #8)
Well, from what i can see:
You can create a system.ext2 image from a folder in ubuntu (in terminal) using
Code:
[B][I]First, you need to change directory to your desktop:[/I][/B]
cd /home/[COLOR="Red"][USERNAME][/COLOR]/Desktop
[B][I]Then, make an image of a folder on your desktop:[/I][/B]
sudo genext2fs -d /home/[COLOR="Red"][USERNAME][/COLOR]/Desktop/[COLOR="Magenta"][FOLDER][/COLOR] 307200 system.ext2
Where [USERNAME] = your short ubuntu username, and [FOLDER] is the folder of which you want to make an image of. (the contents of the folder will be put into the root of your image).
This will make a 300MB image. If you want to change that, change the "307200" to the value that you want.
------------------------------​If you extract an update.zip, there is a system folder,a data folder, and a boot.img.
I'm pretty sure that you can take the contents of the system folder, and put them in system.img. I'm not 100% sure on what to do with the data folder, but i think you can put the contents into data.img. As for the boot.img, i think that it may be rootfs.img but am not 100% sure.
------------------------------​
Now, if you want to look at an exsisting system.ext2 or a data.img, just open up terminal and tipe in:
Code:
sudo mount -o loop /home/[COLOR="Red"][username][/COLOR]/Desktop/system.ext2 /mnt
This is just an example for if your file is on the desktop, and will be mounted in /mnt.
Change the username to your username before entering this into terminal ;). The same
process works for data.img (just change system.ext2 to data.img).
------------------------------​I know the way to create an image is correct, and i know the way to mount an image is correct, but i'd like to know exactly how to do the process from the start.
Click to expand...
Click to collapse

Useful!
I would love to know if there is a way or instructions on how to do this. The desire has many great roms/modded apps I would like on my phone.

I would love to know too. But I'm pretty happy with what the devs are doing so far with these roms.
Sent From My Htc-Hd2 With Froyostone V.2 Using XDA App

Go look in the android dev subforum. you might find something there
Sent from my Nexus One using XDA App

search on COFFEESHOP

Yea, I too would LOVE to know more about this...
^^^That coffee shop is OLD and hasn't been updated in a long time...I wouldn't bother...
There is a good kitchen in the Android main dev thread, but it's currently not for WM devices running Android...
PLEASE someone share the secret!

i want know too. who can share tool kitchen and to lead please! thanks

What I Know....
Well, from what i can see:
You can create a system.ext2 image from a folder in ubuntu (in terminal) using
Code:
[B][I]First, you need to change directory to your desktop:[/I][/B]
cd /home/[COLOR="Red"][USERNAME][/COLOR]/Desktop
[B][I]Then, make an image of a folder on your desktop:[/I][/B]
sudo genext2fs -d /home/[COLOR="Red"][USERNAME][/COLOR]/Desktop/[COLOR="Magenta"][FOLDER][/COLOR] 307200 system.ext2
Where [USERNAME] = your short ubuntu username, and [FOLDER] is the folder of which you want to make an image of. (the contents of the folder will be put into the root of your image).
This will make a 300MB image. If you want to change that, change the "307200" to the value that you want.
------------------------------​If you extract an update.zip, there is a system folder,a data folder, and a boot.img.
I'm pretty sure that you can take the contents of the system folder, and put them in system.img. I'm not 100% sure on what to do with the data folder, but i think you can put the contents into data.img. As for the boot.img, i think that it may be rootfs.img but am not 100% sure.
------------------------------​
Now, if you want to look at an exsisting system.ext2 or a data.img, just open up terminal and tipe in:
Code:
sudo mount -o loop /home/[COLOR="Red"][username][/COLOR]/Desktop/system.ext2 /mnt
This is just an example for if your file is on the desktop, and will be mounted in /mnt.
Change the username to your username before entering this into terminal ;). The same
process works for data.img (just change system.ext2 to data.img).
------------------------------​I know the way to create an image is correct, and i know the way to mount an image is correct, but i'd like to know exactly how to do the process from the start.

?????????????????

Thanks for the info! Should help a lot

i used : sudo genext2fs -d /home/[USERNAME]/Desktop/[FOLDER] 307200 system.ext2
but erro :
[email protected]:~/Desktop$ sudo genext2fs -d /home/hoang/Desktop/folder1 307200 system.ext2
genext2fs: Too many arguments. Try --help or else see the man page.
i use : sudo mount -o loop /home/hoang/Desktop/system.ext2 /mnt
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
and modifed it and now i want create to ext2 file
how to create a system.ext2 , please help me ! thanks

hoangan12 said:
i used : sudo genext2fs -d /home/[USERNAME]/Desktop/[FOLDER] 307200 system.ext2
but erro :
[email protected]:~/Desktop$ sudo genext2fs -d /home/hoang/Desktop/folder1 307200 system.ext2
genext2fs: Too many arguments. Try --help or else see the man page.
i use : sudo mount -o loop /home/hoang/Desktop/system.ext2 /mnt
and modifed it and now i want create to ext2 file
how to create a system.ext2 , please help me ! thanks
Click to expand...
Click to collapse
try using
genext2fs -d /home/[USERNAME]/Desktop/[FOLDER] -b 307200 system.ext2
also dont use the sudo command for this. If you use sudo then this will create it with root only permissions and makes it more annoying to edit.
Thats should help.
So looking at a Desire build the system folder in this is the same as our system.ext2 file and can see were some of the files fit but there are others in the desire build that look to belong in the kernel.
I am not bothered about building a new kernel as there are several fine people already working on excellent ones but i think we need a break down for rootfs and the intird.gz to find out a little more of what goes were when taking a working nexus/desire build apart to recompile for us.

Still not helping

i cant move lost+found folder

smjfosho said:
i cant move lost+found folder
Click to expand...
Click to collapse
From where.....
Ok Lets assume that you have mounted the system.ext2 to /mnt
from terminal type chmod 777 /mnt/lost+found
see if this helps. You might need to preface the command with sudo if it does not work

David Balfour said:
try using
genext2fs -d /home/[USERNAME]/Desktop/[FOLDER] -b 307200 system.ext2
also dont use the sudo command for this. If you use sudo then this will create it with root only permissions and makes it more annoying to edit.
Thats should help.
So looking at a Desire build the system folder in this is the same as our system.ext2 file and can see were some of the files fit but there are others in the desire build that look to belong in the kernel.
I am not bothered about building a new kernel as there are several fine people already working on excellent ones but i think we need a break down for rootfs and the intird.gz to find out a little more of what goes were when taking a working nexus/desire build apart to recompile for us.
Click to expand...
Click to collapse
This is pretty much what I was wondering too. Like, where do I put all of these Kernal and Module files and make them play nice with Android and then port it all so I can use it on my HD2.
Noob Question:
When you say mount the img, what exactly do you mean? Is it the same is being able to open the file and add/remove the files that make up the img?
Is there anywhere I can find like a cheat sheet of sorts for terminal commands?
Sorry for the noob questions, I have never used Linux before.
I was able to though within about 3.5 hours create 2 custom ROMS, flash my wifes G1 without bricking it, and use coffeeshop to create a System.ex2 file from a CM6 Desire rom I modified and added FRG33 radio too To bad I have no idea WTH to do with it
Sooo... I'm learning if anything!

I have managed to create the system.ext2 file haret loads and then starts to boot android but gets to cant find ipv6 and then loops with the battery percentage. I think I am not using the right image.
I downloaded a desire image from shippedroms.com Im wondering is there another source for downloading roms? I am looking for a rom compatable with the HD2 that has sense.

GhostXSeries said:
I have managed to create the system.ext2 file haret loads and then starts to boot android but gets to cant find ipv6 and then loops with the battery percentage. I think I am not using the right image.
I downloaded a desire image from shippedroms.com Im wondering is there another source for downloading roms? I am looking for a rom compatable with the HD2 that has sense.
Click to expand...
Click to collapse
you cant just take a desire build and make an ext2 and hope it will work. You need to port all the correct drivers,firmware other modules. Dont ask me what though i dont know and no one seems to be sharing.
Also @Hatefly http://ss64.com/bash/
hope that helps

Yes I have tried the desire build and sofar it does not boot. I am getting furhter and getting android to load.
I am using kitchen to extract the image file and then using the genext2fs -d /home/[USERNAME]/Desktop/[FOLDER] -b 307200 system.ext2 to create the ext2 file its self. I will play arround with the desire build and see if I can get it working. If I can I will be sure to share the procedure

i chmod 777 the complete set of folders and build prop prior to making it a ext2. see if it helps everyone else

Related

Android img files

Okay I know this is a very noob question, how do I open android .img files And I have run a number of different search queries and still haven't found the answer.
jimmydafish said:
Okay I know this is a very noob question, how do I open android .img files And I have run a number of different search queries and still haven't found the answer.
Click to expand...
Click to collapse
what do you want to do with the img? dump it or just flash it?
if you got some kind of linux distro installed, just go (in terminal) to the dir where the image file is located, and type "file filename.img" if it returns something like ext2 filesystem, simply do:
mount -o loop filename.img /mnt
and the file will be mounted on /mnt, so you can access it using cd /mnt
if it returns something like VMS Alpha executable, you will have to download unyaffs, and if you want to repackage it later on, mkfs.yaffs2,
to get the file's content, just run unyaffs filename.img, and you will have the file content right in the folder with the img file...
if you don't have a linux distro installed, you can simply get virtualbox, and download the latest ubuntu iso file... mount the file in virtualbox and install ubuntu (it's quite easy)...
oh and incase you need them some basic commands:
Code:
ls - lists current folder content
cd folder - allows you to switch to a specific folder, like if you type ls, and you get the folder android listed just type cd android... if you want to go back to your home folder, type ~/...
sudo command - allows you to run specific commands as superuser (root... you can also just switch to user root by typing sudo su, so you won't need sudo every single time)
rm file / rm -R folder/file - allows you to remove files and with the parameter -R also folders ;)
hope this helped
emulator
What if i want to use the .imgs in the emulator/AVD? Any tips?
Thanks.
tdh_andy said:
What if i want to use the .imgs in the emulator/AVD? Any tips?
Thanks.
Click to expand...
Click to collapse
use mkfs.yaffs2.

[Q] how to unpack squashed.sqsh in NAND android builds ??

hi ..
i need help with this ,, i already posted on Q/A forum and didn't get any answers !!
i want to make some changes on the squashed.sqsh file but i can't cause it is read only !!
so is there a way to unsquash it or unpack it and then resquash the file ??
i did some search and found out that this could only be done on linux so i went ahead and downloaded the latest Ubuntu build
and tried this command
"sudo squashfs /home/'user'/desktop/extract /home/'user'/desktop/squashed.sqsh"
the file is on my desktop
but i get command not found ..
i searched and found that i need to download "squashfs-tools" and i did download version 4.1
but now how do i install it ??
the read me says that i have to use "make" command but i don't know how to use it !!
i also searched and it is all complicated and i couldn't figure out the way to install it !!
this is my first time using linux !!
please help cause as for now Android on NAND is pretty much useless for me !!
i'll be sure to make a guide after this .. for people who want to modify the squashed.sqsh file ..
I agree with you too.. Nand is kinda useless for the EU HD2.. TMOUS HD2 are lucky to have 1gb ROM.. these days i'm having nothing on my phone :/
D69K said:
hi ..
i need help with this ,, i already posted on Q/A forum and didn't get any answers !!
i want to make some changes on the squashed.sqsh file but i can't cause it is read only !!
so is there a way to unsquash it or unpack it and then resquash the file ??
i did some search and found out that this could only be done on linux so i went ahead and downloaded the latest Ubuntu build
and tried this command
"sudo squashfs /home/'user'/desktop/extract /home/'user'/desktop/squashed.sqsh"
the file is on my desktop
but i get command not found ..
i searched and found that i need to download "squashfs-tools" and i did download version 4.1
but now how do i install it ??
the read me says that i have to use "make" command but i don't know how to use it !!
i also searched and it is all complicated and i couldn't figure out the way to install it !!
this is my first time using linux !!
please help cause as for now Android on NAND is pretty much useless for me !!
i'll be sure to make a guide after this .. for people who want to modify the squashed.sqsh file ..
Click to expand...
Click to collapse
to unpack a squashed image use this command:
sudo unsquashfs /your directory/system.sqsh, this yo will do inside the directory that you have your system.sqsh
then to repack it use sudo squashfs /the unquashed system folder/ system.sqsh
there might be some mistakes its been a while since iv tampered with sytem images squashed. hopefully you have an idea now
siulmagic said:
to unpack a squashed image use this command:
sudo unsquashfs /your directory/system.sqsh, this yo will do inside the directory that you have your system.sqsh
then to repack it use sudo squashfs /the unquashed system folder/ system.sqsh
there might be some mistakes its been a while since iv tampered with sytem images squashed. hopefully you have an idea now
Click to expand...
Click to collapse
thank you very much for the help
it is nice to see that people still care about each other
i actually tried that but i get an error
Code:
Parallel unsquashfs: Using 2 processors
713 inodes (2805 blocks) to write
dir_scan: failed to open directory squashfs-root, because File exists
[| ] 0/2805 0%
created 0 files
created 0 directories
created 0 symlinks
created 0 devices
created 0 fifos
I can't squshfs.. just unsqushfs, thats all..
EDIT: someone helped me solving all the problems, its mksquashfs.
So, any luck being able unsquash and squash? Have any of you been able to modify system files using this method? I'd love to be able to modify framework-res.apk. Seems like a difficult process though....
I'll try making a tutorial for who doesn't know how to do those methods.
patmorris said:
So, any luck being able unsquash and squash? Have any of you been able to modify system files using this method? I'd love to be able to modify framework-res.apk. Seems like a difficult process though....
Click to expand...
Click to collapse
have you tried using "sudo unsquashfs /home/user/location/squashed.sqsh" ??
white-energy said:
I'll try making a tutorial for who doesn't know how to do those methods.
Click to expand...
Click to collapse
yes please i tried the above command but couldn't get it to work on my machine !!
it says something about failed to access squashed-root because file exists !!!
any help would be appreciated
This can be done within Windows aswell. You just have to grab this package and unzip into a new folder.
Copy the squashed.fsqh into this folder and execute
>unsquashfs squashed.sqsh
it will create a folder squashfs-root.
Now you can edit whatever you want. When you are done use this command to repack. Note that you must delete the old sqaushed.sqsh before you do so or you will get an error message
>mksquashfs squashfs-root squashed.sqsh -all-root
now you can connect to the device with adb and log into shell
>adb shell
And delete the squashed.sqsh on the device
#rm /system/squashed.sqsh
#exit
and reeboot
>adb reboot
The device will stop during boot because the squashed.sqsh ist missing
connect with adb and push the new squashed.sqsh
>adb push squashed.sqsh /system/squashed.sqsh
and reboot
>adb reboot
Done!
Note that this is for gauners Rom. He used squashfs 4.0. Maybe you will need 4.1 for other roms. I don´t know. Not a linux guy
Odhinn said:
This can be done within Windows aswell. You just have to grab this package and unzip into a new folder.
Copy the squashed.fsqh into this folder and execute
>unsquashfs squashed.sqsh
it will create a folder squashfs-root.
Now you can edit whatever you want. When you are done use this command to repack. Note that you must delete the old sqaushed.sqsh before you do so or you will get an error message
>mksquashfs squashfs-root squashed.sqsh -all-root
now you can connect to the device with adb and log into shell
>adb shell
And delete the squashed.sqsh on the device
#rm /system/squashed.sqsh
#exit
and reeboot
>adb reboot
The device will stop during boot because the squashed.sqsh ist missing
connect with adb and push the new squashed.sqsh
>adb push squashed.sqsh /system/squashed.sqsh
and reboot
>adb reboot
Done!
Note that this is for gauners Rom. He used squashfs 4.0. Maybe you will need 4.1 for other roms. I don´t know. Not a linux guy
Click to expand...
Click to collapse
thank you very much for the answer
i got it unsquashed by dragging the squashed.sqsh to unsquash.exe
"because when i try opening the unsquash.exe and mksquash.exe i get a cmd with a bunch of lines for like half a second and then it exits before i even do any thing"
then i tried putting it back togeather by draging squashed-root folder to mksquash.exe and it didn't work ??
i also tried squash-tools 4.1 and the same error happened !!
running out of options here
Ehm... This a command line tool. You have to open a cmd window and cd to the folder where you have the unsquash und mksquash files. The execute the commands.
Do you have adb installed and working? This is part of the android sdk. You will need it to push the file after repacking.

Linux on the Droid 2

Skrulladams figured out a way to get Linux onto the Droid X, Droid 2 / Global, Droid Pro, and DEFY (Really any modern motoblur phone with a locked bootloader.) Supposedly the Atrix has it as well? Technically, according to wikipedia, motoblurexists on the CLIQ/DEXT, Backflip, Devour, Flipout, Charm, and Flipside as well. I can't tell you whether or not this method works for those phones, maybe somebody could verify. While I was researching methods to get this all to work I found different methods for the original Droid, I am assuming that the version of blur on any phone from the OG droid/milestone is different, because the installation method seems somewhat less locked-down.
First you will need a Linux image. I suggest getting yours from Ruan over at androidclone.com
Ubuntu Laika-Beta1.2a.rar
The commands have to be issued from Linux or a virtual machine of Linux as far as I know. I downloaded VirtualBox and used a copy of Ubuntu 10.10 that I had laying around. You could use the image you downloaded above with VirtualBox. PuTTYcyg seems like a better alternative, but I haven't used it.
When setting up your linux virtual machine you might want to make your username "noob" like I did, it will allow you to copy and paste my commands.
The first thing you will need is the android sdk.
Click here to get it
Using and installing it is a little confusing. I just extracted it to my desktop.
You will have to run /tools/android, I did this by dragging and dropping the icon into a terminal window and hitting enter. You have to install the platform-tools. ADB will be downloaded to the platform-tools folder inside the SDK folder.
VirtualBox allows you to capture a USB device inside your virtual machine inside the menu. Devices -> Motorola ####
Inside your virtual machine you will need to copy ubuntu.img from the Laika-Beta1.2a.rar you donloaded earlier to your home directory. While still in the home directory create a new folder simply called "ubuntu."
Your phone has to be rooted and you need a terminal emulator. Most custom ROMs have this by default, but there are many options.
Next, open up a terminal emulator on your phone and execute some commands:
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
mkdir /data/local/mnt
Back on your virtual machine in a terminal:
Code:
sudo losetup /dev/loop0 /home/noob/ubuntu.img
sudo mount -t ext2 /dev/loop0 /home/noob/ubuntu
Dirty_Jerz has an alternate method, Click here for his thread. so it is now up to you whether you'd have everything on your internal storage or SD card. My method uses the internal storage, his uses the SD card. If you'd rather use his, stop here.
Here you will want to remove a symbolic link in /home/noob/ubuntu/usr/bin that screws this method. You can do this by:
Code:
sudo rm /home/noob/ubuntu/usr/bin/X11
Then I remove security stuff:
Code:
sudo chmod 777 /home/noob/ubuntu
sudo '/home/noob/Desktop/android-sdk-linux_x86/platform-tools/adb' shell
chmod 777 /data/local/mnt
exit
sudo '/home/noob/Desktop/android-sdk-linux_x86/platform-tools/adb' push /home/noob/ubuntu /data/local/mnt
This is going to take about 2 and a half hours so I suggest you find something else to do while it copies over.
When it's all done you will need to copy a script over in order to chroot (boot from inside android) into Ubuntu.
Download this script! (specific for this install method!)
Username: androidclone.com
Password: androidclone.com
Click to expand...
Click to collapse
This script belongs in /system/bin so you will have to put it there. The easiest way to do that would be to copy it to your sdcard and then use your terminal emulator to move it.
Code:
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cd /sdcard
cp bootubuntu /system/bin
cd /system/bin
chmod 777 bootubuntu
Now you can boot into Ubuntu from any directory as long as your terminal emulator has superuser.
Code:
su
bootubuntu
Once inside there are some commands that need to be run in order to get a functional UI.
I got these from this site He seems to have a lot of extra configuration instructions which may or may not help you.
Code:
mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
-Xvnc commands-
Code:
export DISPLAY=localhost:0.0
Xvnc -localhost -geometry 854x480 -depth 24 -deferupdate 0
-start your gui-
Code:
startlxde
I prefer xfce though, personally.
--------problems----------
"/bin/sh can't access tty: job control turned off" upon chrooting
Terminal emulators from within the UI don't work.
*DRIVERS*
Touch screen support/UI enhancements for touch screen.
androidVNC
Might not be an ideal solution. I still noticed what seemed to be some graphical lag. There could be a setting that can get it running better, but an app optimized for high speed localhost operation
Chrooting a prebuild image causes all kinds of problems because the proper post-installation scripts are not run. Some programs ignore these errors, and for others they error out. I have yet to find a good solution for this but I have found hints:
Check out this page
Seems a little outdated, but maybe somebody will find a way to make a method like this work.
What we really seem to need is a custom kernel/ROM/distro team that can work on these issues.
-----other alternatives?-------
First I tried kubuntu mobile. It was very buggy so I gave up on it.
Ubuntu netbook edition has been slammed by some for being bloated, but it's ARM port should be lightweight. From screenshots it looks like it has a great UI. The problem is getting gnome to start, it encounters some error and doesn't load.
fedora has a mobile edition that looked good, I think they are somehow involved with Meego which now seems doomed. I'm not sure how similar to android it is or if it is worth the effort.
Check this out
Many of you may already know about the QEMU for android app, but we should be able to cross-compile it to use within our chroot.
I looked into wine, it should be a dead-end since we aren't on x86 architecture and it doesn't do any emulation.
VMware will be releasing a version for android.
Also while playing around I thought about porting iOS on to an android phone. It should be possible.
Pics!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This could potentialy be used to get truly custom ROMs on the D2/DX/Motoblur ridden phones. Honeycomb here I come!
Sir, if you could use this to port newer versions of android and other operating systems such as meego and maybe even webos, you are truly the savior of our locked phones :O
Sent from my BLAZING FAST Droid 2 Global using the XDA app
From my understanding (not a coder or even a regular linux user), a chroot environment is just running an OS within your OS. Meego (maybe I'm thinking of Maemo?) should definitely be possible, I think there is an ARM build somewhere. Fedora was involved with them in some way, and I think might have an ARM build of one of their older releases.
Truly custom ROMs? Not sure, maybe Linux on the phone will be of help to devs?
I was hoping maybe Droid 2 bootstrapper could be modified to fastboot into the install. That still wouldn't be a true bootloader unlock and we still have drivers to worry about and might not even be possible, just an idea.
Well, we might be able to hijack to boot to maybe run CyanogenMod(at last!) . I can for sure, that would rule. I used CM on my old phone(the ultra moddable Droid Eris(HTC FTW!)), and it was the greatest rom I've ever seen
Sent from my DROID2 using XDA Premium App
It is possible to port it to Milestone 2?
Sent from my T-Mobile G1 using Tapatalk
This is a sweet little tutorial that I've been following and I'm excited to get Ubuntu up and running... if I do get it up and running. Problematic mentions a problem where '/bin/sh can't access tty; job control turned off' and I also hit this. I'm pretty new too linux, I've only really got into it upon the purchase and rooting of my Droid 2 and I haven't been able to find anything that can help me fix this problem. Has anyone else gotten past this and had ubuntu running on the Droid 2? Or could someone point me in the right direction? Any help is appreciated.
Can u mirror Ubuntu Laika-Beta1.2a ?. I can't download at filefactory now. Or can I use another ubuntu image ?
Can someone answer? Is it possible to run it on Milestone 2?
It is possible to port it to Milestone 2?
Click to expand...
Click to collapse
Should be. There shouldn't be enough differences between the two for this to not work. I have a hard time thinking of a scenario where this wouldn't work for an andrioid phone. I think the main requirement is having a fairly recent version of busybox installed.
Can u mirror Ubuntu Laika-Beta1.2a ?. I can't download at filefactory now. Or can I use another ubuntu image ?
Click to expand...
Click to collapse
You can use any armel image of Linux. Currently I think this mainly applies to Ubuntu, there should be ARM builds for other distros out there, but these are tough to find. A skilled enough developer should be able to port any distro they wish.
Problematic mentions a problem where '/bin/sh can't access tty; job control turned off' and I also hit this.
Click to expand...
Click to collapse
This seems to be a bug from chrooting a preinstall image without any kind of real setup. I found you can do a lot of this manually, (If you're interested try googling the MAKEDEV command, I think that generated ttys for me.) but I'm still searching for a real solution. Currently I'm considering trying the debootstrap method, the "ubuntu-netbook-10.10-preinstalled-netbook-armel+omap.img" image could be the ticket as well.
thanks, i'll try with Ubuntu-Netbook 10.10
Please Help
hello i am trying this and am getting hung up on the
"sudo mount -t ext2 /dev/loop0 /home/noob/ubuntu" am getting this
wrong fs type, bad option, bad superblock on /dev/loop0,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
looking at dmesg i see this
EXT2-fs (loop0): error: couldn't mount because of unsupported optional features (4)
any ideas?
bootubuntu script
hello. it seems i'm unable to log into androidclone.com are you able to post the bootubuntu script?
link
I think this could be the script you looking for, gonna try this out on my flipout when i get home
https://www.ebower.com/docs/droidx-hacking/

[Guide] Change default orientation to portrait!

After days (literally days...) of staring at this code trying to make sense of it (I am not a coder, but am the IT guy at a software company so that helped a litte), it finally started making sense and I found the one tiny change necissary to make the default orientation portrait. Since I cannot make the new .odex file for a specific build without installing it (which I dont want to do), I'll just post the instructions to do this yourself.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Disclaimer: The usual, I don't accept responsibility for any harm to your phone, any changes you make should be reversible if you mess up. These steps will only work for stock Dell roms. If you are on StreakDroid it can still be accomplished but is slightly different. You should only proceed if you have a decent knowledge of adb/shell/command line. This guide is intended for Windows PCs. Make a nandroid backup and/or backup your android.policy.odex
What you need
Android SDK (if you're a member of xda and you dont have this already then it's a must)
Java JDK
7-zip
Smali/Baksmali (download both jar files and rename them to remove the version number. For example rename 'baksmali-1.2.6.jar' to just 'baksmali.jar')
dexopt-wrapper (attached)
busybox (easiest way to install is to install titanium backup and select problems as many of you know from the superuser.zip root method)
your BOOTCLASSPATH (can be found in /init.rc on your phone)
Install the Android SDK, Java JDK, and 7-zip if you havent already. If you are installing the SDK for the first time you should probably familiarize yourself with the SDK first (lots of guides out there) then make sure to run SDK Manager and download the platform tools. Place the smali.jar and baksmali.jar files in the same folder as adb.exe (whether it be in the tools or platform tools folder or wherever you have moved adb). Place dexopt-wrapper on your Streak's sdcard.
Steps
> means a command (dont type the >)
1. Open a command window to the same folder as adb.exe (in Win7 ctrl + shift + right-click in the folder and select "open command window here")
2. Plug in your phone then pull the entire framework folder
> adb pull /system/framework/ framework
3. Decompile the android.policy.odex file
> cd framework
> java -jar ..\baksmali.jar -x android.policy.odex -o ..\androidpolicy
4. Navigate to the androidpolicy\com\android\internal\policy\impl folder and replace the PhoneWindowManager.smali with the one attached to this post.
5. Compile the code
> cd ..\
> java -jar smali.jar -o classes.dex androidpolicy
6. Add the resulting "classes.dex" file to the android.policy.jar file. To do this open the framework folder, right click on android.policy.jar and 7-zip -> open archive, drag the classes.dex into the 7-zip window so that you now see a META-INF folder and the classes.dex file. The resulting android.policy.jar should be around 96 KB in size.
7. Put the resulting android.policy.jar onto your phone sdcard. Fastest way is to put the jar file into the same folder as adb.exe and
> adb push android.policy.jar /sdcard/
8. Open shell
> adb shell
9. Become super user (if you havent done this before, make sure your phone is on so you can grant it superuser permissions)
> su
----------------------------------------------------------------------------
This section only needs to be done once
----------------------------------------------------------------------------
10. Put dexopt-wrapper into the correct folder with the correct permissions
> cd /system/bin/
> busybox cp /sdcard/dexopt-wrapper . (yes after dexopt-wrapper is a space and a period)
> busybox chmod 755 dexopt-wrapper
> cd /sdcard/
----------------------------------------------------------------------------
11. Create a new .odex file from the .jar file
> dexopt-wrapper android.policy.jar new.odex BOOTCLASSPATH
BOOTCLASSPATH should be the value of your bootclasspath from init.rc. For example my command looked like this (all one command):
dexopt-wrapper android.policy.jar new.odex /system/framework/core.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/kafdex.jar:/system/framework/OmaDrmClient.jar
12. Copy the "signature" from the original .odex file to the newly created one
> busybox dd if=/system/framework/android.policy.odex of=new.odex bs=1 count=20 skip=52 seek=52 conv=notrunc
13. Replace the original android.policy.odex with the new one (you will need to mount your /system/framework/ with r/w permissions, can be done with root explorer or this app
> cd /system/framework/
> busybox cp /sdcard/new.odex android.policy.odex
> busybox chmod 644 android.policy.odex
14. Done
> sync
> reboot
Your phone will now reboot, be patient as it may take slightly longer to boot up the first time. On initial bootup the lockscreen will still be in landscape with the sliders also in landscape. Just unlock, let the phone boot up some more, turn off the screen and turn it back on...
Troubleshooting
If for some reason you run into problems and your phone hangs at the dell logo...
1. Boot into recovery
2. Put the original android.policy.odex (the one in the framework folder) into the same folder as adb.exe
3. Open a command window to same folder as adb.exe (should still be open from the install steps)
4. Type the following commands
> adb shell mount /dev/block/mtdblock6 /system
> adb push android.policy.odex /system/framework/
5. Select the reboot option in the recovery menu and you should be back to stock.
For GingerStreak 2.4 look here - Thanks TheManii
If you use adw you can lock the screen to eitherportrait of landscape in settings. I haveit locked to landscape because I prefer it.
I prefer launcher pro for a few reasons and would like the lockscreen to be in portrait so that I don't have to use widgetlocker
Interesting note. I have compared the streak code for the file specified to the dell venue which is a portrait default device and they are identical...not sure what to think about that.
Think I found what needs to be changed, but must sleep. will report back tomorrow
Hope you will be able to sort this one out!
I am one of the many that want this fix.
Original post updated with guide!
good work! I will give it a try soon.
Sent from my Dell Streak using XDA App
I'm having a headache just reading the instructions! Ha ha. I guess I'll just wait for jhotmann or another android genius to come up with a Recovery flashable .pkg or even an installable .apk, whichever is feasible. Great work, jhotmann!
jhotmann, maybe you can share this mod of yours with Dj_steve. He might be able to incorporate it into a new ROM.
I have messaged steve on twitter. I know krad can do this and he's probably on the latest build.
Sent from my Dell Streak 2.2.1 (339)
Amazing! It's a phone now, not a Tablet! It worked perfectly for me!
Very nice, but not so easy. I am at the 11. and can't find when to get BOOTCLASSPATH. I know it is in init.rc in the phone, I can find it with ASTRO file manager or with adb shell, but I don't know how to open it and get BOOTCLASSPATH??? Please help somebody. I was trying to find it on the internet but no success...
Thank you in advance
Type exit to get out of shell (you may have to do it twice), then adb pull /init.rc
Sent from my Dell Streak 2.2.1 (339)
Thank you for your effort, but it says permission denied. I tried to reopen command line (always as admin), but id didn't help. Found somewhere operation 'adb remount', but it didn't help either (Operation not permitted).
I have rooted Dell Streak with Gingerbreak, maybe this information will help.
However, I copied init.rc with busybox to my sdcard and get it from there, but now I can't open it (I found, that it can be open with MS Visual Studio, then tried Notepad plus, Total commander... always just mess of black squares etc.)
I guess I am too tired today, but I will try to finish this tomorrow, because I really want Dell Streak in portrait and it is only 4 more steps
But thank you anyway, I must be really hard to find this. The way is not easy but at least it can be accomplished now
Weird, I have had no problems opening it in notepad. Theres a good chance the bootclasspath is the same as mine so you can probably copy it from my example
Nice work!! Too bad I'm not on stock. Hopefully Steve will integrate this in 1.9.1
Edrill said:
Nice work!! Too bad I'm not on stock. Hopefully Steve will integrate this in 1.9.1
Click to expand...
Click to collapse
Steve said it'll be there but not active by default, so it's a go!
Question: So can we now lock the default orientation to portrait for apps like the dialer? I'm using us240 density and the landscape dialer while in a call or when you receive a call hides the name of the person and looks ugly.
the entire system can be locked to portrait. Or you could probably set up a tasker to lock the phone app (and contacts app) in portrait if you dont want the whole system locked in portrait.
Edit: just created a tasker profile to do that...good call sir
Can you port cyanogen 7 to streak. Just loaded a nightly on my ole craptivate and it had 2.3.4 ginger goodness.
Sent from my Dell Streak
jhotmann said:
I have messaged steve on twitter. I know krad can do this and he's probably on the latest build.
Sent from my Dell Streak 2.2.1 (339)
Click to expand...
Click to collapse
Thanks jhotmann!

[Q] Randomised boot animations?

Would it be at all possible to get something like this made for Defy?
This is a script from Galaxy Nexus forums, so I don't think it would work on Defy..
http://forum.xda-developers.com/showthread.php?t=1434950
What it Does
There are various apps out there that can achieve the same result but this is a simple script that uses a random number generator to swap in a random boot animation each time you boot. The script runs one just before the animation and never again until you boot the next time.
You can have any number of animations that will randomise and you can also set a flag to have just one run without needing to delete the others.
Click to expand...
Click to collapse
Couldn't you write a quick shell script to randomly choose a file from SD and copy it over the current bootanimation.zip? It would be executed after boot finishes, perhaps by an app to manage scripts. Just an Idea.
ArRaY92 said:
Couldn't you write a quick shell script to randomly choose a file from SD and copy it over the current bootanimation.zip? It would be executed after boot finishes, perhaps by an app to manage scripts. Just an Idea.
Click to expand...
Click to collapse
I haven't a clue :s I really hope it can be done though.. there are so many awesome boot animations!
Plus I'm making one of my own... or trying to.
Hoping for someone who knows about scripts and things
Okay, I think I will have a go. Let me just find out how to get a random number in unix shell that is in a certain range.
okay, so lets try.
Code:
#!/system/bin/sh -
#Change folder
cd /mnt/sdcard/bootanimations
ls > list
#Get random file
set -- *
length=$#
ran=$(hexdump -e '1/1 "%d"' -n 1 /dev/urandom)
rand=$(( $ran % ($length + 1) ))
file=$(sed -n "${rand}"p list)
#Copy over old animation
cp -f "$file" /system/media/bootanimation.zip
echo "successful if 0: " $?
rm list
Works now, took a piece of code from the other script because I could not get ${!rand} to work on the phone.
Works great for pictures and such too.
ArRaY92 said:
Okay, I think I will have a go. Let me just find out how to get a random number in unix shell that is in a certain range.
Click to expand...
Click to collapse
Perhaps looking at the script I linked to will help?
My script should work, only drop animations into /sdcard/bootanimations.
run once after boot with smanager from playstore
ArRaY92 said:
My script should work, only drop animations into /sdcard/bootanimations.
run once after boot with smanager from playstore
Click to expand...
Click to collapse
I'll give it a try!
After running this I reboot (a couple) and test it?
I'm assuming it needs SU in SManager?
Is this a patch? Will it need anything to remove it if it doesn't work and I can't a boot?
Sorry haha
pk92 said:
I'll give it a try!
After running this I reboot (a couple) and test it?
I'm assuming it needs SU in SManager?
Is this a patch? Will it need anything to remove it if it doesn't work and I can't a boot?
Sorry haha
Click to expand...
Click to collapse
No, this is only a small shell script. I think it needs SU to copy the animation over the existing one.
I am however not sure, if cp copies over the old file without forcing, let me look this up
You can just delete it from sManager if it does not work. Will not prevent you from booting if it fails, phone boots fine without animation. In case of failure, I would however think that it would just fail to change the animation
edit: I added the -f flag to cp.
ArRaY92 said:
No, this is only a small shell script. I think it needs SU to copy the animation over the existing one.
I am however not sure, if cp copies over the old file without forcing, let me look this up
You can just delete it from sManager if it does not work. Will not prevent you from booting if it fails, phone boots fine without animation. In case of failure, I would however think that it would just fail to change the animation
edit: I added the -f flag to cp.
Click to expand...
Click to collapse
Thanks so much for writing it by the way
I'd take a guess that it does need SU to copy the animation, as it is going to a root directory (/system/media).
Does your script mount /system/media as RW or is that not needed in a script? (I have NO idea haha, I'm studying Software Dev but no idea about Android development).
I'll try it out later tonight when I get home (Going out for a few drinks)
pk92 said:
Thanks so much for writing it by the way
I'd take a guess that it does need SU to copy the animation, as it is going to a root directory (/system/media).
Does your script mount /system/media as RW or is that not needed in a script? (I have NO idea haha, I'm studying Software Dev but no idea about Android development).
I'll try it out later tonight when I get home (Going out for a few drinks)
Click to expand...
Click to collapse
Will test it on my own mobile now.
edit: **** wont work
For the hell of it, I cant make it work with sh. Bash works nicely. Most stupid thing is: sManager always forces sh when executing scripts. If you tap on start konsole from within sManager, it starts /system/xbin/bash. calling the script from there works.
I have no Idea for a clean workaround
ArRaY92 said:
Will test it on my own mobile now.
edit: **** wont work
For the hell of it, I cant make it work with sh. Bash works nicely. Most stupid thing is: sManager always forces sh when executing scripts. If you tap on start konsole from within sManager, it starts /system/xbin/bash. calling the script from there works.
I have no Idea for a clean workaround
Click to expand...
Click to collapse
Will I have to run the script each boot? Sorry for all the questions haha.
I'm trying to make my own Boot Animation at the moment... Using Flash CS6 for now..
The part0 (non loop) will be drawing the Pentagram, then the elements appearing
The part1 (loop) will be the elements animated until boot.
I'll be using it with this Boot Logo
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
https://dl.dropbox.com/u/25175326/bootlogos/pentagram.raw
Ok, The only problem I get now is this:
Code:
localhost bootanimations # cp -f $file /system/media/bootanimation.zip
cp: can't create '/system/media/bootanimation.zip' : File Exists
Going to try deleting the boot animation from there and running.
-EDIT-
Deleted /system/media/bootanimation.zip
Ran the script
Ended up with the default Android boot animation :|
Hm. I added the -f to force overwriting. For me it works, I tried it with pictures, every time the the script is executed, I have another picture with the same name. Only make sure to not include sub folders or other files then zip files in the folder.
Sent from my MB525 using xda app-developers app
ArRaY92 said:
Hm. I added the -f to force overwriting. For me it works, I tried it with pictures, every time the the script is executed, I have another picture with the same name. Only make sure to not include sub folders or other files then zip files in the folder.
Sent from my MB525 using xda app-developers app
Click to expand...
Click to collapse
Does the script need to be ran each boot to work?
My process:
Open SManager
Click script - Edit - Copy all
Menu > Console
Run Shell
Hold screen - Paste
No errors at all
Back button - Kill
Reboot (normal)
/sdcard/bootanimations contains the following files:
"Portal.zip"
"CM9.zip"
The only one that seems to run is Portal.zip, making me think that it does need to be run each boot.. Any way around this?
Perhaps it being a flashable zip that does something along these lines or this or something ?
Possible way to get it to run at startup:
Install Autostart (Root)
Download the script Autostart.sh and place it at /data/opt/autostart.sh (Permissions 755 I think)
Place your Boot Animations in /sdcard/bootanimations - They can be named anything.
Reboot your phone, and the script should run
When you next reboot your phone you should have random boot animations working..
This is all just theory so far, I haven't tested it yet!
Nevermind, It seems the Autostart app doesn't work on ICS (so I'm assuming JB too.)
Perhaps a flashable .zip is the best way, editing system files
pk92 said:
Does the script need to be ran each boot to work?
My process:
Open SManager
Click script - Edit - Copy all
Menu > Console
Run Shell
Hold screen - Paste
No errors at all
Back button - Kill
Reboot (normal)
/sdcard/bootanimations contains the following files:
"Portal.zip"
"CM9.zip"
The only one that seems to run is Portal.zip, making me think that it does need to be run each boot.. Any way around this?
Perhaps it being a flashable zip that does something along these lines or this or something ?
Click to expand...
Click to collapse
What shell does smanager open?
Also, did you try just creating a script.sh file with the code I posted and when opening it in sManager klick run? Without any copy and paste?
There is even a button to give su rights to script.
ArRaY92 said:
What shell does smanager open?
Also, did you try just creating a script.sh file with the code I posted and when opening it in sManager klick run? Without any copy and paste?
There is even a button to give su rights to script.
Click to expand...
Click to collapse
After I click run shell it says:
Code:
exec sh -c "cd '/mnt/sdcard' ; exec /system/xbin/bash"
dcard' ; exec /system/xbin/bash"
[COLOR="Red"]localhost[/COLOR] [COLOR="Blue"]sdcard #[/COLOR]
No errors, but the boot anim doesn't seem to change (from what I can see)
I did try saving it as a .sh and open in sManager but you said it only uses sh not bash?
Result of running .sh file without editing anything:
Code:
exec sh 'mnt/sdcard/Random Boot Animation.sh'
andom Boot Animation.sh' <
:not found/Random Boot Animation.sh:line 2:
/mtn/sdcard/Random Boot Animation.sh: cd: line 4:
can't cd to /mnt/sdcard/bootanimations
/mnt/sdcard/Random Boot Animation.sh: line 5: ca:
read-only file system
:not found/random Boot Animation.sh: line 6:
sed: list: No such file or directory
:not found /Random Boot Animation.sh: line 13:
': no such file or directory
Seems to be a bit... messed up lol
(when running as executable i get this:
Code:
# exec sh -c '/mnt/sdcard/script.sh'
sh: /mnt/sdcard/script.sh: Permission Denied
Code:
#!/system/bin/sh -
#Change folder
cd /mnt/sdcard/bootanimations
rm list
ls > list
#Get random file
set -- *
length=$#
ran=$(hexdump -e '1/1 "%d"' -n 1 /dev/urandom)
rand=$(( $ran % ($length + 1) ))
file=$(sed -n "${rand}"p list)
#Copy over old animation
cp -f "$file" /system/media/bootanimation.zip
echo "successful if 0: " $?
This one works for me reliably...
pk92 said:
After I click run shell it says:
Code:
exec sh -c "cd '/mnt/sdcard' ; exec /system/xbin/bash"
dcard' ; exec /system/xbin/bash"
[COLOR="Red"]localhost[/COLOR] [COLOR="Blue"]sdcard #[/COLOR]
No errors, but the boot anim doesn't seem to change (from what I can see)
I did try saving it as a .sh and open in sManager but you said it only uses sh not bash?
Result of running .sh file without editing anything:
Code:
exec sh 'mnt/sdcard/Random Boot Animation.sh'
andom Boot Animation.sh' <
:not found/Random Boot Animation.sh:line 2:
/mtn/sdcard/Random Boot Animation.sh: cd: line 4:
can't cd to /mnt/sdcard/bootanimations
/mnt/sdcard/Random Boot Animation.sh: line 5: ca:
read-only file system
:not found/random Boot Animation.sh: line 6:
sed: list: No such file or directory
:not found /Random Boot Animation.sh: line 13:
': no such file or directory
Seems to be a bit... messed up lol
(when running as executable i get this:
Code:
# exec sh -c '/mnt/sdcard/script.sh'
sh: /mnt/sdcard/script.sh: Permission Denied
Click to expand...
Click to collapse
Sorry for my intermission.
The
:not found/random Boot Animation.sh: line 6:
line, is related with EOL. You are using MS-Dos end of line, but Android (as linux, unix based system) needs Unix end of line for scripts.
When I edit script on Windows, I use Scite it allows change and convert EOL.
There is a lot of Text editors whith this EOL feature.
I would like implement EOL check in SManager, but it is my eternal TODO.
Regards,
Devwom
devwom said:
Sorry for my intermission.
The
:not found/random Boot Animation.sh: line 6:
line, is related with EOL. You are using MS-Dos end of line, but Android (as linux, unix based system) needs Unix end of line for scripts.
When I edit script on Windows, I use Scite it allows change and convert EOL.
There is a lot of Text editors whith this EOL feature.
I would like implement EOL check in SManager, but it is my eternal TODO.
Regards,
Devwom
Click to expand...
Click to collapse
So you wrote sManager? Nice work. One thing that bothers me though, is that if you start a console it starts up bash, but if you run a script it forces sh. That really sucks for testing. Please correct me if I am wrong, or if you have any advice.
Also, the design is kind of old But as long as it works...

Categories

Resources