[BUILD][18.11.2010] Desire Spot (new initrd, no rootfs, incremental updates) - HD2 Android Q&A, Help & Troubleshooting and Genera

Desire Spot (clean) 2.0 based on HTC Desire 2.29
new initrd.gz, no rootfs, incremental updates​
Features:
- cedesmith initrd ( see post 3 )
- no rootfs
- incremental updates
- based on desire 2.29
- spot clean, system.img is a exact dump of unyaffs (with permissions) to ext2, not 1 bit modified
- auto set apn ( update )
- everything should work
- great for understanding android on h2
Not working:
- 720p video recording
- rmnet
Notes:
- i don't want yet another build, i made this mainly for my own use and to show the power of my initrd and exemplify incremental updates options it offers
- i hope that chefs will like and use my initrd.gz and a update to X build will work on all builds ( or all builds based on same rom: ex: desire, cm6 )
- i think we relay need a unified update system for all builds especially with development soon forking between nand and sdcard builds
- this is for purists, the ones that have stock windows rom and reluctant to change
- tested on stock 3.14 rom
Included updates:
- update.kernel.linux-on-wince-htc.15.11.2010
- install.init.15.11.2010
- install.hd2_libs.15.11.2010
- install.ril_wrapper.15.11.2010
- update.camera.15.11.2010
- install.busybox.cm6.14.11.2010
- install.su.15.11.2010
Credits and big thanks:
- Cotulla, NetRipper, danij3l, Markius, Rajko, LeTama, gauner1986, Cass, hastarin
- anyone who worked on hd2 android port and i forgot to mention
Disclaimer:
- all this comes without any warranty not even that it does something useful
- IF YOU USE IT YOU DO IT ON YOUR OWN RISK
Download and install:
- desire_cs.7z 2.0
- update.initrd.gz.20.11.2010 ( fix reboots for cards formatted in windows )
- update.autoapn (only if you have a data plan)
- extract to desire_cs on card ( case sensitive )

Updates
Download updates you want/need and extract on desire_cs directory on sdcard
Mandatory updates:
- update.initrd.gz.20.11.2010 fix reboot at startup
Optional updates:
- update.kernel.hastarin_8.5_eb.23.11.2010 (thanks vartp )
- update.kernel.hastarin_8.5.23.11.2010 (thanks vartp )
- fingerprint.19.11.2010 restore default desire fingerprint if you have problem with marketplace
- evo_keyboard.19.11.2010 (thanks vartp, see post )
- kernel hastarin_8.4_eb.18.11.2010 (extended battery)
- kernel hastarin_8.4_18.11.2010
- autoapn auto set apn
Read readme in archive, keep readme folder to record what you have installed and what version.
Attached updates in this post except autoapn are included in build
Dev info:
- install.init.15.11.2010 is the only mandatory update to install, your build will not boot without it

initrd.gz
Description:
- I build my initrd.gz mainly to allow updated and to be more like android phones boot process.
- It contains the directory structure of boot.img from desire 2.29 + /bin directory
- /bin contains a small busybox (with necessary commands to booth the phone ) + dosfsck + e2fsck all compiled with android toolchain and uClibc.
- It supports different partition on sdcard for system and data but probably nobody will use that.
- It only supports ext2 (for now) but i think nobody used anything else for hd2
- it is backward compatible (common cases)
Boot process:
- mounts sd card to /mnt/sdcard_boot not to interfere with android mount points
- checks and mounts /system and /data
- copy init.rc, init.htcleo.rc, default.prop, bootcomplete.htcleo.rc, shutdown.htcleo.rc ( blanks ) to /system if they don't exist
-- this is done to allow persist as / is ramfs
- execute uninstal*.sh then install*.sh in update directory
- copy AndroidApps and root as previous versions did
- execute update*.sh in update directory
- execute /system/init*.sh to perform build specific init tasks ( this can be installed by previous operations )
- symlink ( and creates dir ) /cache to /data/.cache if /cache not configured by build /system/init*.sh
- deletes /bin directory to free ram used by ramfs for busybox, dosfsck and e2fsck
- executes init.android - original android init program
- someware in process moves /sbin/adbd to /system/xbin/adbd and creates sysmlink in /sbin to free ram
Notes:
- if you create a install/update script please include readme file
- if you create a install/update script use a proper editor (notepad++) and convert file to unix format, line endings in dos format \r\n will brake sh

------ reserved -------

thanks for your great work

Sounds interesting. I look forward to reading more about it.
Sent from my HTC HD2

Thanks,
We always appreciate fresh blood.

I don't know how much this, if any, is based on the work of zegobit (who eventually got copied by shui8), but I'm very interested in this.
Coming from an android-on-Dream background, I've always thought of the rootfs as unecessary, and seeing how zegobit's initrd handled updates, I always thought that his way of doing things was the best (the rootfs used on most builds now came from the XDAndroid project which is made to support as many devices as necessary, something of a waste if you're building only for Leo).
You say your ext2 is just a re-packed, unyaffs'd image of the Desire rom, if so, are your leo-specific files stored in the initrd?
How will you handle updates?
And, this is for my learning, how is it you handle mounting and booting from SD. I'm trying to come up with an initrd that can be used to make an AOSP vendor that will produce a ramfs and an ext2 image that can be booted on Leo with little or no modification.
Any pointers you could give me.
In the mean time, I'm trying, and this might be, my main build.

Wow, very well documented. Kudos. Favortie build starting now.

jubeh said:
I don't know how much this, if any, is based on the work of zegobit (who eventually got copied by shui8), but I'm very interested in this.
Click to expand...
Click to collapse
and i thought i was completely original
unfortunately i did not see zegobit's work before, things might been easier.
on the other hand the most tricky part was compiling busybox 1.17.3, dosfsck and e2fsck with google toolchain ( well with codesourcery too but it produces 50% bigger exe )
jubeh said:
Coming from an android-on-Dream background, I've always thought of the rootfs as unecessary, and seeing how zegobit's initrd handled updates, I always thought that his way of doing things was the best (the rootfs used on most builds now came from the XDAndroid project which is made to support as many devices as necessary, something of a waste if you're building only for Leo).
Click to expand...
Click to collapse
this should work on any device also as long it works with cortex-a8 compiler optimizations and rename the init.htcleo.rc bootcomplete.htcleo.rc and shutdown.htcleo.rc as this are device dependent.
extracting initrd is simple: gzip -d -c initrd.gz | cpio
remaking: find . | cpio -o -H newc | gzip > ../initrd.gz
remember to do it on linux to preserve permissions
but ppl plz don't go rampage and make your own just because you can
i think they went rootfs because the utilities needed to boot are big ( 4mb old initrd and ~16MB rootfs ) and initrd uses ram for storage vs rootfs witch is on sd
i decided to make initrd after i got the tools to ~500Kb and read that memory is freed after file delete ( that is why i delete /bin directory when no longer needed ).
jubeh said:
You say your ext2 is just a re-packed, unyaffs'd image of the Desire rom, if so, are your leo-specific files stored in the initrd?
How will you handle updates?
And, this is for my learning, how is it you handle mounting and booting from SD. I'm trying to come up with an initrd that can be used to make an AOSP vendor that will produce a ramfs and an ext2 image that can be booted on Leo with little or no modification.
Any pointers you could give me.
In the mean time, I'm trying, and this might be, my main build.
Click to expand...
Click to collapse
blank init files are in initrd that is why install.init is only required update/ package
blank files also allows for this to work with CM6 builds
also all my install/update script edit files with sed not just drop file on /system
edit: install.init contains desire boot.img init files unedited (renamed .bravo.=>.htcleo. tho), install sh script does the editing. this way is crystal clear what is modified.
oh not to forget... : do not sed -i 's///' /init.rc and co, sed creates files and breaks symlink, your changes will revert after reboot. use sed -i 's///' /system/init.rc

I got robot voice on T-MOUS 3.14 rom. All else works wonderfully.
--edit---
ah, nevermind. A reboot fixed the problem. Perfect.

cedesmith said:
extracting initrd is simple: gzip -d -c initrd.gz | cpio
remaking: find . | cpio -o -H newc | gzip > ../initrd.gz
remember to do it on linux to preserve permissions
but ppl plz don't go rampage and make your own just because you can
Click to expand...
Click to collapse
My linux is still poor, I haven't really studied the boot process much. I knew how to extract/repack initrd.
Oh, and whatever changes I make, it's all for learning and my personal use. No interest in making a release. If I do do something and use your scripts, I'll credit appropriately, though the only release I'd be interested in is instructions and a vendor profile for AOSP so that people can make their own AOSP builds (you know, with gingerbread coming and all)

I tried to run the build (after execuring crlcad)but it stays on htc black screen for 5 seconds and then reboot the phone...i've just copied your archive in Android folder...

FD10 said:
I tried to run the build (after execuring crlcad)but it stays on htc black screen for 5 seconds and then reboot the phone...i've just copied your archive in Android folder...
Click to expand...
Click to collapse
me too, keep rebooting, the android folder is desire_cs btw.

dandiest said:
me too, keep rebooting, the android folder is desire_cs btw.
Click to expand...
Click to collapse
i second that emotion!! me 2 or maybe i just dont fully understand the info on post 1????
JR

cool i love mdj
but always willing to try out new stuff
thank you Sir!

sorry i forgot to mention extract archives to desire_cs directory (case sensitive) on SD card not Android.
if you still get reboot try format sd card from wince then extract again.
it happened to me when i switched to 8gb card from 2gb but was fine after card reformat.
for me i suspect dosfsck may caused a kernel crash but could not test as it not happened again after format

Thanks a lot!!!
Keep it up!!!

So what's the difference between this and any other sense rom out there?
Sent from my HTC Desire using XDA App

cedesmith said:
if you still get reboot try format sd card from wince then extract again.
Click to expand...
Click to collapse
sorry bud i dont understand that sentence what is wince and how do i go about using it to format my sd card, is formatting under my OS (win7) not good enough? because i still get a reboot.
Regards JR

Related

[TUT]-PORTING-Android To The VOGUE

the title says it
after many requests here is the guide
most of this is spread around the vogue
forum here and there, i just wanted to bring it all together
goal-seeing lately we have lost some good developers, this is a shot at getting more involvement in vogue/android development
I.SETTING UP YOUR SYSTEM
1. GETTING LINUX you will need to have Linux installed on your computer(dual-boot, vm, whatever). i recommend Ubuntu karmic (9.10) because its pretty new-user friendly. It can be found at http://www.ubuntu.com/
for you windows lovers here is a guide to setting up a ubuntu VM(virtual machine (if you really didnt know ))
2. THINGS/TOOLS YOU WILL NEED download these:
original 8/8/09 ion 1.5 build HERE(we are gonna use the bin-files and the apns-conf.xml, and a few apps)
the latest rootfs.img (find it)
these android tools (included are genext2fs (android version), split_bootimg.pl, and extract_ramdisk.sh)
after downloading, extract the zip to a folder. open a terminal and cd to the dir of the tools. click applications>accesories>terminal and type:
Code:
cd ~/whatever/
sudo rm -rf /bin/genext2fs
#dont type whats after the pound signs
#type in your password
#if you havent set up a su password yet type:
sudo passwd
#then make one, next
sudo cp -r ./whatever/genext2fs /bin/
squashfs-tools (if you have ubuntu 9.10-karmic first you will have to uninstall squashfs-tools 4.0(4.0 WILL NOT NOT NOT NOT NOT WORK) that is installed during the installation of linux ): go to system>administration>synaptic package manager. type squashfs-tools in the quick search, then right click and click mark for complete removal. then hit apply. then download and install this here http://http://ftp.us.debian.org/debian/pool/main/s/squashfs/squashfs-tools_3.3-7_i386.deb
i also strongly recommend downloading the sdk-tools v1.1(adb is almost essential when porting, for debugging purposes) enatefox has it posted on his media fire. (search for it)
3. ORGANIZATION
now that we have what we need. lets get organized.
a.mount points
we are going to use mount points while porting.
terminal:
Code:
sudo mkdir /mnt/rootfs
sudo mkdir /mnt/system
#i also have one for mounting data files
mkdir /mnt/data
b. directories
terminal:
Code:
mkdir ~/Desktop/android
mkdir ~/Desktop/android/ion
mkdir ~/Desktop/android/donut
#you get the point...
now put the ion 8/8/09 build in the ~/Desktop/android/ion folder and rename it system.sqsh then
terminal:
Code:
cd ~/Desktop/android/ion
unsquashfs ./system.sqsh
you should now have a folder called squashfs-root in the ion directory. it contains all the guts from the ion build. feel free to look around in that folder as you should get familiar with the folders and things in there
II PORTING
1. PORTING A HERO ROM(this was in zens how-to-make-a-hero-rom.txt im just adding on to it)
a. Download a rom from the dream/sapphire development forums.
b. Extract what you downloaded to ~/Desktop/android/hero. It is usually an update.zip.
c. Open the extracted folder. Inside you should see a data directory and a system directory.
d. Open the data directory and look for an app or app_s folder.
e. Open those folders and copy the apks to the system/app/ folder. Leave out what you don't need. feel free to add any custom apps. as long as they are from the same sdk number. ie 1.5, 1.6, 2.0.1, 2.1 most are pretty cross-compatible though.
f. Delete system/xbin from the rom your porting and replace it with the one from Ion.
g. Copy ~/Desktop/android/ion/squashfs-root/etc/apns-conf.xml from Ion to ~/Desktop/android/hero/system/etc/
h. Mount the latest rootfs.img
terminal:
Code:
sudo mount ~/whereever/rootfs.img -o loop /mnt/rootfs
i. Copy libaudio.so libaudioflinger.so libcameraservice.so libgps.so from /lib in the mounted rootfs over to system/lib in the rom you are porting*(donut and eclair really dont need this step because those files are in most of the latest rootfs.img's but be sure to check)
j. Edit the system/build.prop or even use the Ion build.prop.*(for donut/eclair you may want to edit the lcd density to 120 or 110 in the build.prop for qvga and 160 for 320x480)
k. Create a blank file in system/ called hero.build*(for eclair/donut create donut.build or eclair.build or eclairhero.build.....etc)
*l. for hero any systems too big to run on nand, here is a script to make a data file. put this in the ~/Desktop/android/hero directory. cut the app folder from ~/Desktop/android/hero/system and paste it to ~/Desktop/android/hero , and rename it too app_s . next run the mkdataimg.sh it should ask for you password in a terminal. type it in and then it should mount the data.img to data-mnt folder in ~/Desktop/android/hero . keep that terminal open copy the app_s folder in to data-mnt. then type y in the terminal to unmount the data.img. next:
terminal:
Code:
cd ~/Desktop/android/hero
ln -s /data/app_s ./system/app
that should make a broken symlink in system
2. Mount it and squash it
ok now that we are done porting lets put it together
terminal:
Code:
cd ~/Desktop/android/hero
genext2fs -d ./system -b 180000 -a system.ext2
sudo mount -o loop ./system.ext2 /mnt/system
sudo mksquashfs /mnt/system system.sqsh
sudo chown $USER ./system.sqsh
#and if you want
rm -rf ./system.ext2
from zenulator:
There are other little tweaks here and there but thats basically it. Now you can roll your own.
Click to expand...
Click to collapse
im gonna clean this up a bit later just wanted to get this out to you guys
nice thanks jamezelle
zen's manup456-based Eclair build contains different libaudio.so & libaudioflinger.so than the rootfs, and Eclair wouldn't boot if I replaced them with the libs from the rootfs. This might be due to the rootfs libs not being updated for Eclair yet (also why voice search/dial doesn't work) but I'm not sure. I don't know if this will be the case for 2.1, just wanted to add that in.
I really appreciate the guide and look forward to hearing more. I've learned a lot from zen as well but a lot of the work the devs do is so hard to follow because it's undocumented.
Do you know why the xbin has to be from Ion? Is it because of our kernel version or the squashfs ver that our kernel contains? I've been wanting to grab some of the tools from the xbin of other builds but have been unsure about compatibility.
Also, for more advanced Android ROM building, I'd like to add a link to zipalign optimization.
polyrhythmic said:
zen's manup456-based Eclair build contains different libaudio.so & libaudioflinger.so than the rootfs, and Eclair wouldn't boot if I replaced them with the libs from the rootfs. This might be due to the rootfs libs not being updated for Eclair yet (also why voice search/dial doesn't work) but I'm not sure. I don't know if this will be the case for 2.1, just wanted to add that in.
I really appreciate the guide and look forward to hearing more. I've learned a lot from zen as well but a lot of the work the devs do is so hard to follow because it's undocumented.
Do you know why the xbin has to be from Ion? Is it because of our kernel version or the squashfs ver that our kernel contains? I've been wanting to grab some of the tools from the xbin of other builds but have been unsure about compatibility.
Also, for more advanced Android ROM building, I'd like to add a link to zipalign optimization.
Click to expand...
Click to collapse
we need to move back to a more standardized comunity rootfs.img. i'm seeing more and more different rootfs.imgs that vary little by little. it is kind of hard to really document all of the development. but i see your point. the xbin(are just eXtended bin files) doesnt have to come from ion. the xbin in ion is actually empty
yes our kernel doesnt support LZMA compression which is what 4.0 uses. more info on it here http://www.squashfs-lzma.org/ i dont know why out kernel has not been updated to support it(you would have to ask DZO), i just know is isnt supported
thanks for the link to zipalign. i usually zipalign my apps. btw most dream and sapphire devs are already zipaligning there apks so we dont have to
I agree, I don't like forking the rootfs but the latest ones don't contain the correct WiFi files & settings for Kaiser. I know our kernel is way behind, I've asked several questions in the kernel thread about it but then the thread goes OT and I've never gotten an answer to most of the questions. Newbie16 has been compiling kernels but we've had trouble finding all the updated source files.
Oh, the PNG optimization in the zipalign thread is useful also, I easily saved 5 MB in the Eclair build.
The 8/8 file is a .img file, not .sqsh. Terminal tells me it can't find a sqash superblock on the file, or something to that extent.
EDIT: also missing a step that seems crucial... re squashing the files to make a .sqsh file to use?
ln -s help. hero nand porting
When ever I'm trying to port a hero build to nand ln -s gives me "operation not permitted" during boot. I used -a during genext2fs. Also data didn't work, even though I have the right apns-conif.xml. any idea? I was trying to port hero revolution (I think thats it ). Thanx
TheKartus said:
The 8/8 file is a .img file, not .sqsh. Terminal tells me it can't find a sqash superblock on the file, or something to that extent.
EDIT: also missing a step that seems crucial... re squashing the files to make a .sqsh file to use?
Click to expand...
Click to collapse
i fixed(add the missing steps) it but i dont have a copy of 8/8 ion personally. any ion system.sqsh build will work. if anyone has one please post it!
TheKartus said:
The 8/8 file is a .img file, not .sqsh. Terminal tells me it can't find a sqash superblock on the file, or something to that extent.
EDIT: also missing a step that seems crucial... re squashing the files to make a .sqsh file to use?
Click to expand...
Click to collapse
jamezelle said:
i fixed(add the missing steps) it but i dont have a copy of 8/8 ion personally. any ion system.sqsh build will work. if anyone has one please post it!
Click to expand...
Click to collapse
i just mounted the system.img and copied all the files to a new folder....that way then u dont have to mount the system.img everytime u are porting a rom
my steps to do that
[email protected]:~# cd Android
[email protected]:~/Android# dir
hi Inferno sensehero13 SenseHERO-v1.4_NoTheme senshero
signed-Hero_Inferno_Final signed-Hero_Inferno_Final.zip
system-2009-08-08.img system-sensehero-20091009.sqsh
TOOLS
ZipAlign.sh
[email protected]:~/Android# mkdir ion
[email protected]:~/Android# mount -o loop system-2009-08-08.img ion
[email protected]:~/Android#
Could someone please define...
Could someone please define rootfs, zIMage and the other parts that go into an Android build? If you're going from say, donut, to eclair, which ones can you reuse? I think I understand that the system.sqsh is what makes a build donut or eclair and actually is the file that has the customizations in it. But, what do the other parts do? If this is the wrong place to post this, mods, please move this. Thanks.
Sally
Hey guys, don't know if anyone else is having this issue or not.
I'm trying to work with the Topaz kernals...I downloaded the XDAndroid 2.1 system.sqsh and was able to unsquashfs it fine on my Vector Linux box...but I want to do the same to the TopazKernal16 system.sqsh (donut) but when I run unsquashfs it makes it to about 70% (highest I got to was 80% on one try) and then stops saying "killed".
any way to remedy this? also, what is the simplest way to "re"squash it?
Thanks!
iceman198 said:
Hey guys, don't know if anyone else is having this issue or not.
I'm trying to work with the Topaz kernals...I downloaded the XDAndroid 2.1 system.sqsh and was able to unsquashfs it fine on my Vector Linux box...but I want to do the same to the TopazKernal16 system.sqsh (donut) but when I run unsquashfs it makes it to about 70% (highest I got to was 80% on one try) and then stops saying "killed".
any way to remedy this? also, what is the simplest way to "re"squash it?
Thanks!
Click to expand...
Click to collapse
You just posted in the wrong forum altogether. This section is for the Vogue, not for the Topaz. Try to ask there on in one of the xdandroid threads. This project is different from xdandroid. Thanks.
egzthunder1 said:
You just posted in the wrong forum altogether. This section is for the Vogue, not for the Topaz. Try to ask there on in one of the xdandroid threads. This project is different from xdandroid. Thanks.
Click to expand...
Click to collapse
Sorry, thanks...
iceman198 said:
Sorry, thanks...
Click to expand...
Click to collapse
No prob
I would be interested in the Android's filesystem breakdown. Just some guide on what exactly is in the system, and then rootfs.img and then the modules. If someone could point me in the right direction, that would be much appreciated!
Thanks!
iceman198 said:
I would be interested in the Android's filesystem breakdown. Just some guide on what exactly is in the system, and then rootfs.img and then the modules. If someone could point me in the right direction, that would be much appreciated!
Thanks!
Click to expand...
Click to collapse
pm dzo, he will probably be able to help you there.
egzthunder1 said:
pm dzo, he will probably be able to help you there.
Click to expand...
Click to collapse
Thanks egzthunder1!
iceman198 said:
Thanks egzthunder1!
Click to expand...
Click to collapse
Not a problem. Good luck!

[REF] How to compile your own kernel and initrd for HTC Leo

Kernel compile :
Do it on user not root :
1. Make sure you have an appropriate environment to get the source (git) and to compile the kernel. Install git, gcc, make and libncurses5-dev at least. For Ubuntu based distributions.
apt-get install git-core build-essential libncurses5-dev
2. Create a directory to hold the kernel sources
mkdir ~/htcleo
3. Download the kernel source
cd ~/htcleo
git clone git://git.linuxtogo.org/home/groups/mobile-linux/kernel.git
cd kernel
git checkout -b htc-qsd8k-2.6.29 origin/htc-qsd8k-2.6.29
4. Download and decompress the arm toolchain (64mb)
cd ~/htcleo
wget http://www.codesourcery.com/gnu_too...-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
tar xjf arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
5. Generate the default .config for the kernel(ARCH is case sensitive)
cd kernel
make htcleo_defconfig ARCH=arm
6. Compile
export PATH=~/htcleo/arm-2008q1/bin:$PATH
make Image ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
Find your kernel Image in /htcleo/kernel/arch/arm/boot/
Now you can configure your proper kernel :
mousepad (Xfce) or gedit (Gnome) ~/htcleo/kernel/arch/arm/configs/htcleo_defconfig
cd ~/htcleo/kernel
make mrproper
make htcleo_defconfig ARCH=arm
export PATH=~/htcleo/arm-2008q1/bin:$PATH (must need once time)
make Image ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
Use git pull in ~/htcleo/kernel to update file and recompile to have the last modified on development
Initrd compile :
Need to be root !
1. Download initrd.gz from other HTC compiled
mkdir initrd (or anything else in propely folder nothing else on)
cd initrd (put your initrd.gz here)
gzip -dc initrd.gz | cpio -id
Now you have all file and folder you can touch and modified
Use mousepad or gedit on root
2. Recompile proper
rm initrd.gz (before do a copy for other instance)
find (all name of folder and file) | cpio --create --format='newc' > initrd
Compile source for Arm :
(root user)
On source folder :
#export ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- PATH=(your path)/arm-2008q1/bin:$PATH
#CC=arm-none-linux-gnueabi-gcc ./configure --host=arm-none-linux-gnueabi --target=arm-none-linux-gnueabi
# make
For who want to take time to test and finaly make Android works on HTC Leo.
I thinks all members hav's HTC Leo !!
hey guys..
i really want to use android on my new HD2!
i'm a little-medium (^^) n00b, but spent a lot of time in android on my kaiser.. so i'm not a totally noob, i think.
i can help testing files for you.
so, what do the dev's think, how long did it take to use android on our phones?
greetings
Thanks for the tip, will try it tomorrow and report what I see
wget http://www.codesourcery.com/gnu_tool...ux-gnu.tar.bz2 -O arm-2008q1-126-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
Click to expand...
Click to collapse
On the wget command supplied you have to right click and copy link location and paste that as the wget url or it wont work, the forum has truncated the text with ... in the middle . use the -O afterwards as shown
1. Download initrd.gz from other HTC compiled
Click to expand...
Click to collapse
Im also not quite understanding this, what is other HTC compiled ? Another set of sources with Android?
Thread Edit
You can take any one initrd.gz and modified script on it.
HTC Vogue initrd.gz its the better.
Tigrouzen said:
Thread Edit
You can take any one initrd.gz and modified script on it.
HTC Vogue initrd.gz its the better.
Click to expand...
Click to collapse
Thanks for fixing the wget ..
Cool so i already have another initrd and i hang at the freeing 104k init error .. Are you able to get past this ?
Nice job writing that up.
Personally I use a different toolchain, but if the toolchain you mention works without a problem, then all is well When I used a toolchain from codesourcery I somehow got compile errors as there was no VFP support (maybe I just took the wrong binary).
The toolchain i'm using is in this git repo: http://android.git.kernel.org/?p=platform/prebuilt.git;a=summary and under linux-x86/toolchain/arm-eabi-4.4.0
NetRipper said:
Nice job writing that up.
Personally I use a different toolchain, but if the toolchain you mention works without a problem, then all is well When I used a toolchain from codesourcery I somehow got compile errors as there was no VFP support (maybe I just took the wrong binary).
The toolchain i'm using is in this git repo: http://android.git.kernel.org/?p=platform/prebuilt.git;a=summary and under linux-x86/toolchain/arm-eabi-4.4.0
Click to expand...
Click to collapse
This toolchain works, compiles fine but fails on boot at the 104k error for me .. Not sure how to progress this without further info / debug ..
NetRipper said:
Nice job writing that up.
Personally I use a different toolchain, but if the toolchain you mention works without a problem, then all is well When I used a toolchain from codesourcery I somehow got compile errors as there was no VFP support (maybe I just took the wrong binary).
The toolchain i'm using is in this git repo: http://android.git.kernel.org/?p=platform/prebuilt.git;a=summary and under linux-x86/toolchain/arm-eabi-4.4.0
Click to expand...
Click to collapse
Yes cause you use 2009q3 arm-eabi not contain VFP support maybe not important.. i try with your toolchain and 2008q1 binary
This is one worked with 2008q1 binary
Nice work! When do you think Android will be avaible on HD2?
How should I format the micro SD Card ?
Do I have to create two partitions (one eith FAT to boot and another ext3 to filesystem ?)
Does anyone have a tutorial to configure the sd card ?
My experience format SD card make some mistake and brick some SD card on linux. For now dont do that cause no way and ist not ready to work.
But Android porting hardware its now everything ok, just wait some moment maybe one or two month to see it on HD2.
This test just need put haret, default.txt based on Leo, initrd.gz and Image on sdcard root and executed haret
If you have drivers to every piece of hardware then tell me how did you managed to detect the SD card reader. Because I simply can't.
The developer find right interrupt for hardware on Leo but we dont have definitively realized driver, this is a problem to communicate right with Leo hardware.
If we have main console work then its ok!!
Now just have boot working and freez.
We need wait.
You can maybe look in this thread Martijn Stolk works, 38hours ago he add some instruction on kernel, then its signified we advanced to make Android works.
http://git.linuxtogo.org/?p=groups/mobile-linux/kernel.git;a=shortlog;h=refs/heads/htc-qsd8k-2.6.29
I think 2 months later if everything ok.
Now you dont need formating your sd card just put file on root.
What's about other non-Leo QSD8x50 devices? I tried some of previous NetRipper's kernels, but they didn't work... As I'm completely next to nothing in ARM kernel development, I take someone should port IRQ and GPIO map (If I remember correctly) of respective devices (e.g. neoTouch, Expo, TG01 etc), isn't it?
Or is the kernel universal?
I thinks HTC take's other hardware way and this hardware doesn't have any driver on linux.
HTC just make's driver for Windows mobile and then have realy code source to ported on linux and android.
Or maybe system locked protection !! Like's Archos 5 IT code secure implentation !!
Maybe HTC do it protection hardware cause Microsoft ask him to not porting it on Android !!!
Or marketing way not arrenged HTC to sell HTC Supersonic simillar hardware with Android !!
I hope its not this way, cause no way to ported Android or linux on Leo..
Last issue if there no protection just wait for HTC Supersonic and porting in Leo.
Tigrouzen said:
Last issue if there no protection just wait for HTC Supersonic and porting in Leo.
Click to expand...
Click to collapse
Would love it, with DualBoot in more
I'll donate for Android, I am really excited to get it on our device !
Thank you to all developpers who take time for us !
See you.
Edit : Use "git pull" to update automatically file modified on development
Thanks for developers.
Edit : compile source for Arm

Cyanogen Rom 6 RC1

This thread was initially an inquiry on the Cyanogen Rom however is now a Rom thread so here we go.
Background on the Rom is here http://www.cyanogenmod.com/about
On the Hd2/Leo mod see here http://pastebin.com/BBf1hr50
memin1857 said:
INSTRUCTIONS
Cyanogen Mod RC1 - Leo build by Zego WITH ADOBE FLASH and 3G WORKING
There is a new nice build called CM6-HTCLEO (Cyanogen Mod RC1 - Zeto)
It needs a lot of prep work to get to good working order, then its really good.
I have also managed to get adobe flash working. (It doesn't work out of the box)
This build
(after all the steps) have gps, camera (with proper flash exposure), camcorder, camera flash/led/torch, adobe flash, nice look and most other goodies available.
Here are the steps
1) Download cm6-htcleo.7z from:
http://www.mediafire.com/?kzo7fxi2hp917s8
2) Download phone button (keypad) fix:
http://www.mediafire.com/?qrs4w0kd470keqm
3) Download MTU fix from:
http://www.mediafire.com/?tqggvgrzb79gm24
or
http://www.megaupload.com/?d=JL368N3N
4) Download Cotulla 23 July nospeed zimage from:
http://cotulla.pp.ru/leo/Android/Cotulla_zImage_CABDET_NOSPEEDDY.rar
5) Extract the cm6-htcleo.7z file and put the cm6-htcleo to your sd card root.
6) Extract the cm6-htcleo_keypadfix.7z file and put the FOLDER NAMED root UNDER cm6-htcleo folder in your sd card. (Not to sd card root folder. I really mean a folder named root. You will see it in the archive)
7) Extract the cm6-htcleo-datafix.zip file and put the FOLDER NAMED root UNDER cm6-htcleo folder in your sd card. Just merge them. (Say yes when windows asks) Credit: ElBartoME
8) Extract Cotulla_zImage_CABDET_NOSPEEDDY.rar
and put zimage file to cm6-htcleo folder and overwrite.
credit: cotulla
9) ONLY DO THIS STEP IF YOU CANNOT BOOT (linux complaining about mmcblk0): Open startup.txt with notepad and
replace the line
set cmdline "rel_path=cm6-htcleo"
with:
set cmdline "rel_path=cm6-htcleo loop_partition=mmcblk0"
credit: dusty_nz
10) Run clrcad and haret as usual but from cm6-htcleo folder. Once Android has booted start terminal app.
11) write
su
and press enter. It will ask for superuser permission. Tap allow.
12) write
mount -o rw,remount /system
and press enter. You should not get any response or error.
13) Now launch ES File Manager and tap \ on top left.
Navigate to /system/app and find
com.adobe.flashplayer apk file and delete it.
14) Power off your phone in a normal way and reboot to Android CM6.
15) Go to Market and install Adobe Flash 10.1 Beta 3 (use your gmail account)
Done!
Notes:
-FIRST BOOT WILL TAKE A LOT OF TIME! BE PATIENT. IT WILL TAKE A LOT LONGER THAN YOUR USUAL BUILDS.
-ADOBE FLASH does not work out of the box. You have to reinstall it but since it was cooked in to the rom as system app and you can't uninstall it, you need to mount /system directory read/write and delete flash so you can install it again. This time it works properly.
-You may not be able to boot if you do not edit the startup.txt
-You may not be able to wake up if you do not replace the zimage with the older 23 july one. You can use 25 july panel on off zimage if you CAN wake up from sleep. It depends on hd2 lcd panel type which is more than one.
Optional: Install Launcher Pro and make it default home screen to get a smoother experience.
After ALL these operations, this seems like the most functional build.
Cyanogen is normally a mod for android and someone named zego turned it into a hd2/leo build. A lot of stuff was missing and there was no central infromation. That was what I did. You don't need to read 6 pages to get this build working this good now.
I recommend disabling live wallpaper. Static wallpapers are faster. Formatting sd card beforehand and using a class 6 sdhc card is also recommended.
I don't have time to package all this stuff into a build. Maybe someone who does above steps can package it in a new single file and put to megaupload/mediafire (mskip/Mark?) For now you have to do it yourself. You will like the end result.
Packagers please don't call yourselves devs and give credit to original hard working people. Donation is also recommended.
I am sorry if I forgot to give credit to anyone.
I got all this information by reading all the pages of this thread and some more. Now you don't have to.
Click to expand...
Click to collapse
From makavelitha
Good
+ Successfully booted on the first try
+ Camcorder is finally working with the original HTC app (i hope someone will port this to the other android builds)
+ Flashlight is finally working with the original HTC Flashlight App
+ No SOD or GSOD with cotullas zImage 25.07 (maybe i have a Sharp Panel?)
Bad / Problems
- Bad Performance (especially at scrolling)
- Can't Download anything from the Market, i get always the message that my Storage Card is full, i've checked it and android shows me 0mb left on my SD Card, but i have more than 4GB free on this Card (it was working in all other Android Builds)
- Needs time to boot-up
- No or Bad Battery Management (already optimized in other Android Builds)
- USB Storage not working (already working in other Androids)
- Bluetooth finds other devices but can not be paired
- Compass works but it doesn't show magnetic north.
- Low volume issue is already known. During a call other party hears echo of his own sound when speaker is on. No echo in normal mode.
Performance Tweaks
Update I:
Using Cotulla zImage 7/25/10 makes a huge difference in speed!
The only thing still sluggish is scrolling through the apps....
Otherwise from that this is a very good build. Nice pre installed apps, good out-of-the-box build.
Update II:
Changing the application drawer to "Horizontal" like on the Galaxy S eliminates scrolling speed issues when scrolling through the apps.
dusty_nz said:
So looking at the Cyanogen rom, Swapping out the Zimage and trying to boot.
Has anyone tried this?
Would it work?
Looks like it has heaps of Qualcomm optimized components
Click to expand...
Click to collapse
http://www.mediafire.com/?kzo7fxi2hp917s8
And don't forget to add the phone button fix:
http://www.mediafire.com/?qrs4w0kd470keqm
any changelog of this mod/port ?
Readme:
http://pastebin.com/BBf1hr50
on this build flash doesn't work for me in the browser.
I am running it at this moment, it boots correctly until android froyo wizard.
It runs correctly for a minute and SOD
Ah it wake up, great
For the first time in the leo android world, the camera works
I give you more feedback later ...
Update:
- GPS works perfert
- Reboot not work, like other builds
- Import contact from SD not works
perhaps the one based on RC2 will be better, where have you find the links for this build ?
I can't get this to boot.
Initrd keeps looking to mount /mnt/sdcard against /dev/block/mmcblk0p1 and falling over. I only have the one FAT32 partition on my sdcard which normally is at /dev/block/mmcblk0.
Also should I be extract the .tar.gz file into the CM6 directory or put it up at the root of the sdcard.
Thanks.
idcom said:
I can't get this to boot.
Initrd keeps looking to mount /mnt/sdcard against /dev/block/mmcblk0p1 and falling over. I only have the one FAT32 partition on my sdcard which normally is at /dev/block/mmcblk0.
Also should I be extract the .tar.gz file into the CM6 directory or put it up at the root of the sdcard.
Thanks.
Click to expand...
Click to collapse
Try replace cmd cmdline
set cmdline "rel_path=cm6-htcleo loop_partition=mmcblk0"
m4ck said:
Try replace cmd cmdline
set cmdline "rel_path=cm6-htcleo loop_partition=mmcblk0"
Click to expand...
Click to collapse
Thanks. Worked a treat. Now to play.
Nuja said:
any changelog of this mod/port ?
Click to expand...
Click to collapse
Yeah I agree guys, can you please be a bit more specific about what is additional from other froyo with/witout sense or Eclair?
readme file does ntoe give much in fact.... A couple of screen shots would be fantastic...;-)
general statement: Donate, so all mods/chefs/devs can eventually pay some flowers or perfums or sex toys to their girls friends (all of them so angry that they spend so much time developing stuf !!!)
Well.... more info on what cyanogenMod is on:
http://www.cyanogenmod.com/about
Anyone having problems with 3g on this build?
nordicfastware said:
Well.... more info on what cyanogenMod is on:
http://www.cyanogenmod.com/about
Click to expand...
Click to collapse
Thank you, but there is no mention of build for our HTC HD2
Who is the maker of this build for HD2 ?
the build is done by Zego from the IRC channel compiled from source of CyanogenMod 6.0.0 release candidate 1
I tried it last night and it gives me SOD repeatedly, it's fast, but the SOD is killing me, I am falling back to Darkstone's FroyoV1
Hmmmm
Not booting for me.
Formatted a SD card. Single Fat32 partition.
Extracted zip to \cm6-htcleo\startup.txt etc.
Changed the Startup.txt to
set cmdline "rel_path=cm6-htcleo loop_partition=mmcblk0"
error
/init: line 88: mmcblk0=mmcblk0: not found
Logical sector size is zero
mount: mounting /dev/block/mmcblk0 on mnt/sdcard failed: invalid argument
lucian777 said:
Anyone having problems with 3g on this build?
Click to expand...
Click to collapse
Yes. I had the same with Dan's Froyo v.1 but Darkstones works a treat. Changed the apn's to voda uk and all that.
booted first time - took a while but OK
Loaded with apps
camera working
Video recorder working
GPS working
man it's fast..........
will test further and report back
dusty_nz said:
Not booting for me.
Formatted a SD card. Single Fat32 partition.
Extracted zip to \cm6-htcleo\startup.txt etc.
Changed the Startup.txt to
set cmdline "rel_path=cm6-htcleo loop_partition=mmcblk0"
error
/init: line 88: mmcblk0=mmcblk0: not found
Logical sector size is zero
mount: mounting /dev/block/mmcblk0 on mnt/sdcard failed: invalid argument
Click to expand...
Click to collapse
took out the set cmdline "rel_path=cm6-htcleo loop_partition=mmcblk0" ands its booting further. Got wizard
I for one am excited for this development. The collaboration from the devs here along with cyanogens work is fantastic. Any chance of getting cyanogen directly involved and/or once a build is completed would an official thread on this be desired?
I am not a coder but I'm working on it. Until then I'm just a fan and a donor. I've been a long term user of cyanogens work and I can safely say with the joint efforts of everyone here, this would be a powerful development. Keep up t the awesome work!
-------------------------------------
Sent via the XDA Tapatalk App

Minimal UI for LUKS encryption on the Wildfire

This is a basic gui I wrote to unlock my encrypted partitions during boot.
I'm running my /data and /sdcard partitions encrypted, and the "luksunlock" binary is launched from init.rc to read the password and unlock the encrypted partitions.
I have included my somewhat modified init.rc for those interested.
For more information about LUKS on Android see this blogpost, written by shawn (Seems I'm not allowed to have urls in the post, but Google for 'android luks' , first hit)
This works good on Wildfire, altough it should work fine on other phones as well. Just remember that you need to set up your partitions as in the luksunlock.c (or change the defines).
Dont forget to backup before you start playing around!
Good luck!
Thanks! i'll give a try!
Hi,
I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:
I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...
Any clue?
Thanks in advance!
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
tusabe said:
Hi,
I tried to use your cryptsetup binary from your blog, but I have some issues that you'll sure have an answer:
I run ./cryptsetup luksFormat -c aes-plain /dev/block/loop2 and after i put the luks password it says 'Command failed', no logs, no other output, even using the -v flag...
Any clue?
Thanks in advance!
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
Click to expand...
Click to collapse
CM6.1 for wildfire uses a 2.6.32 kernel (see HCDR.jacob's post about his custom kernel for more info)
tusabe said:
PS: the module dm-crypt is necessary for cryptsetup? could be this the error? I don't have it installed on the system because I can't find it for 2.6.35.9-cyanogenmod
Click to expand...
Click to collapse
Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.
sigkill1337 said:
Yeah you really need dm-crypt support, either compiled into the kernel or as a module. You also need the AES ciphers support.
Click to expand...
Click to collapse
Hi! Yeah, that's what I was afraid of.... ok, but the problem is that i'm running CM6.1 with 2.6.35.9 which has no dm-crypt module neither compiled in kernel... where can i find some kernel with this modules included? Is for an HTC Desire (@Sympnotic )
Thanks in advance!
Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.
BTW, I’m the lead on a project working on general secure Android distro – we’ve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.
wow! awesome work!!! Very exciting news. Gonna give this a go on my MyTouch Slide
NathanFreitas said:
Great work and thanks for sharing @Sigkill. Working on building it here for my NexusOne with CM6.1.
BTW, I’m the lead on a project working on general secure Android distro – we’ve ported Tor, have an OTR IM app, and have supported other projects along those lines. Would love to talk more about supporting anyone working on this specific capability.
Click to expand...
Click to collapse
Seems really nice. I like the secure phone concept.
New Makefile and wiki info up
_hc from the @guardianproject has a new build process up for Crypsetup/LUKS which includes a Makefile compatible with Android NDK r5.
We have new instructions up on our wiki, as well.
I cannot post links under this account, but you can find the info on github if you search "LUKS" or just under our guardianproject account.
How did you create the encrypted partitions? Could you give some pointers for that. I am familiar with using dmcrypt/cryptsetup on desktop linux, I guess this works similar. What are the relevant device names? Did you run into any problems?
Calavera1 said:
How did you create the encrypted partitions? Could you give some pointers for that. I am familiar with using dmcrypt/cryptsetup on desktop linux, I guess this works similar. What are the relevant device names? Did you run into any problems?
Click to expand...
Click to collapse
Hi, sorry for the late answer,
/dev/block/mtdblock5 is the "userdata" partition. I formatted it and mount it to /encrypted-data during init:
mount yaffs2 [email protected] /encrypted-data nosuid nodev
The only file on this partition is "data.encrypted" file, which gets created in init.rc as a loopback device:
exec /system/bin/losetup /dev/block/loop0 /encrypted-data/data.encrypted
I created the "data.encrypted" file on my computer with cryptsetup and losetup, and copied all files from my old unencrypted userdata partition to it and then copied it back as a file to the formated userdata partition.
The sdcard "/dev/block/mmcblk0p2" partition is formated with "cryptsetup luksFormat", I did this also on my computer, saves some time. And then copy everything from the old unencrypted sdcard.
I did run in to one problem recently, my phone hung during boot, about 4 months after I started encrypting my phone.
Had to copy my data.encrypted file to my computer, mount it as a loopback device and do a fsck, and then copy it back to my phone.
I suspect this has to do with the filesystem not being umounted properly. (I have had this on my to do list for a while hehe)
Probably should make a script run during shutdown to cleanly "luksClose" the encrypted partition and then umount them. Not doing this is probably very crazy
I also want to fix it so my "/dev/block/mmcblk0p2" partition gets presented to my computer when i attach my usb cable (as it should do), so i can unlock it in ubuntu and copy images and files. Right now i have to take my memorycard out and put it into the computer.
I hope this post makes sense, it was written in haste =) Good luck!
sigkill1337 said:
Hi, sorry for the late answer,
/dev/block/mtdblock5 is the "userdata" partition. I formatted it and mount it to /encrypted-data during init:
mount yaffs2 [email protected] /encrypted-data nosuid nodev
The only file on this partition is "data.encrypted" file, which gets created in init.rc as a loopback device:
exec /system/bin/losetup /dev/block/loop0 /encrypted-data/data.encrypted
I created the "data.encrypted" file on my computer with cryptsetup and losetup, and copied all files from my old unencrypted userdata partition to it and then copied it back as a file to the formated userdata partition.
The sdcard "/dev/block/mmcblk0p2" partition is formated with "cryptsetup luksFormat", I did this also on my computer, saves some time. And then copy everything from the old unencrypted sdcard.
I did run in to one problem recently, my phone hung during boot, about 4 months after I started encrypting my phone.
Had to copy my data.encrypted file to my computer, mount it as a loopback device and do a fsck, and then copy it back to my phone.
I suspect this has to do with the filesystem not being umounted properly. (I have had this on my to do list for a while hehe)
Probably should make a script run during shutdown to cleanly "luksClose" the encrypted partition and then umount them. Not doing this is probably very crazy
I also want to fix it so my "/dev/block/mmcblk0p2" partition gets presented to my computer when i attach my usb cable (as it should do), so i can unlock it in ubuntu and copy images and files. Right now i have to take my memorycard out and put it into the computer.
I hope this post makes sense, it was written in haste =) Good luck!
Click to expand...
Click to collapse
I figured most of that out without your post and tried it on my desire (I created the luks partitions with adb on the phone though, worked anyway ). Then I couldn't figure out where my regular init.rc is stored (I could only find the one used by Clockwork Recovery), and then I figured I already spent enough time, tried a reboot (which of course didn't work). Then I couldn't even get into recovery (probably because its init.rc tries to mount /data which doesn't work? I didn't investigate any further). Flashed my backup with fastboot and was stuck again with my un-encrypted pre-experiment state
Oddly enough, it was no problem to unlock my encrypted SD-card from my computer (running ubuntu) while in recovery (clockword has an option to present the sd card to a computer connected via usb). Maybe the booted system handles this differently than recovery though? I didn't get a chance to try, as I couldn't boot after my encryption attempt.
I will try again after my algorithm and data structure exam this friday and report back
Is anybody using the UI on another device than the Wildfire? Does it work?
How much is the performance drain when using an encrypted /data partition?
Amazing work!
Did anyone manage to make sigkill1337's luksunlock build from source ?
I would like to change the path of the data/sdcard partitions to match my device but I tried many ways using the NDK and I can't get it to compile properly.
Is there any way to do this ?
I have been trying for days, I am getting literaly insane !
@sigkill1337 : could you give me some pointers ? I would appreciate a lot.
mount manpage said:
The bind mounts.
Since Linux 2.4.0 it is possible to remount part of the file hierarchy somewhere else. The call is
mount --bind olddir newdir
or shortoption
mount -B olddir newdir
or fstab entry is:
/olddir /newdir none bind
After this call the same contents is accessible in two places. One can also remount a single file (on a single file).
This call attaches only (part of) a single filesystem, not possible submounts. The entire file hierarchy including submounts is attached a second place using
mount --rbind olddir newdir
or shortoption
mount -R olddir newdir
Note that the filesystem mount options will remain the same as those on the original mount point, and cannot be changed by passing the -o option along with --bind/--rbind. The mount options can be changed by a separate remount command, for example:
mount --bind olddir newdir
mount -o remount,ro newdir
Click to expand...
Click to collapse
If nothing helps, you should always be able to bindmount it
I'd rather get sigkill1337's UI to compile...
Lots of nice security tweaks and settings could be done with a pre-boot GUI
Anyway, concerning encryption, I'll use the bind option for now, thanks for the tip.
But if anyone here could give me some pointers about compiling this stuff it would be great.
I managed to compile it by integrating luksunlock in Android source externals and main.mk but when I push it to my phone and modify init.rc to call it, it just does not work...
Other modifications are working (mount, mkdir, etc.) but the GUI won't show up
Sorry for the late reply.. But you could try running it from a shell when the phone is booted, just to verify that the binary starts (thats how I tested it without having to reboot my phone all the time)
My environment for building the source was setup using one of the tutorials online, nothing out of the ordinary
Im still running this on my phone, for almost 8 months now, I havent noticed that much in performance problems, the Wildfire was slow before i started using luks.
When i get a new phone (maybe SE Arc) i will be easier to see if performance is affected
There is an Issue for getting CM support for encrypted filesystems during boot:
Issue 2736: support encrypted filesystem from boot
If you want to get that feature, just "star" it, so it may get more attention.

[Q] ROM porting

Edit: bootloop, partitions are not mounting.
nagato.fm said:
I'm trying to port an X5PRO rom to regular X5 and facing an issue of unworking wi-fi and USB mass-storage. All data I have: it's all right with IMEI, wi-fi and bluetoth MAC's are missing, serial number is missing, wi-fi toggle in settings is inactive (I mean it can't be turned on and if I try to turn it on directly from wi-fi settings it says "an error occured" and goes inactive again), when I'm connecting my phone to computer and trying to turn on storage I get message of dismounting SD card and the storage stays turned off.
I've already tried to change the kernel (this ROM is running 3.0.8 PRO kernel and I've used Dzo's v5.0u17 kernel) and it haven't fixed my problems. Changing of /system/libs/hw/ to the Aurora's resulted in non-bootable rom.
Have you any ideas of how to solve it? Or is there any threads about x5pro to non-pro porting I could miss? (I've tried to google anything about problems with my port and about porting from U8800PRO and found... nothing)
Click to expand...
Click to collapse
I have no ideal to give you because i'm not a DEV, but in the whole 4rum, you can easy find out the solution to help you.
http://forum.xda-developers.com/showthread.php?t=1941239
Those so called tutorials are pretty much useless, they will help you get the base on, but no more.
So, since U8800+ has a different Wi-Fi, you should first replace /system/lib/libhardware_legacy.so, /system/bin/wpa_supplicant with the dzo ones. Then copy over the /system/lib/modules directory, it contains Wi-Fi modules needed.
If it does not work out, try to modify the init.huawei.rc or init.rc and replace service wpa_supplicant and related configs with dzo ones. Note that you will have to modify boot.img, because it contains the init files. So use a boot.img unpacker, modify it, then repack it again.
Try to get me the logs too .
Blefish said:
Those so called tutorials are pretty much useless, they will help you get the base on, but no more.
So, since U8800+ has a different Wi-Fi, you should first replace /system/lib/libhardware_legacy.so, /system/bin/wpa_supplicant with the dzo ones. Then copy over the /system/lib/modules directory, it contains Wi-Fi modules needed.
If it does not work out, try to modify the init.huawei.rc or init.rc and replace service wpa_supplicant and related configs with dzo ones. Note that you will have to modify boot.img, because it contains the init files. So use a boot.img unpacker, modify it, then repack it again.
Try to get me the logs too .
Click to expand...
Click to collapse
The problem is that I've changed the kernel using abootimg package in Ubuntu because none of the scripts for unpacking/repacking boot.img found on this forum worked for me, also I couldn't unpack ramdisk so I think I can't modify init.rc at this moment. I'll try to get some logs and do all that you've mentioned.
Also there is another problem: no mobile network at all. When I turn on the phone the indicator goes gray and nothing seems working (can't phone someone and etc.). When trying to change mobile operator via settings I get a VERY strange menu asking me for PIN code (I actually don't have one - I've disabled it years ago).
Also I need to ask for some tutorials or knowledge bases about how android works and how core parts of android work (I mean EVERYTHING I can get) because I actually don't know ANYTHING about android and there's no noob-friendly tutorials or FAQ's over the internet. I've checked xda-university and it didn't helped either.
Anyway thanks for your help, Blefish!
After following your instructions system hangs on boot. When first flashed it started to "updating android:setting applications..." and then it rebooted. Then it said "updating... 1 of 1" and another reboot. Seems like framework-res isn't starting because it hangs on bootanimation and hardware buttons lights are constantly flashing. Installing SDK now, will try to get some logs.
Try to do it step-by-step so first replace one thing, reboot, then try another. That will help us understand what makes the phone hang.
For modifying kernel or init.rc I attatched boot.img unpacker-repacker with README, check it out. I am not sure if you need a Linux box for it, but I use that tool and it works well.
MIUI-XJ (my ROM) is a ported u800pro ROM. But it is a gingerbread ROM.
First of all,you need change all init files in /system. You can found this files in system/etc (example;init.qcom.wifi.sh).And I think the mass stroage problem causing by init.qcom.usb.rc (It can found in boot.img) but I'm not sure.
You should change gralloc files for a better GPU performance. It can found in systen/lib/hw. I think You don't need change other hw files.
u8800 needs system/bin/netd - system/lib/modules/*(anything in this folder) - system/bin/wpa_supplicant - system/lib/liboem_rapi.so - system/lib/libreference-ril.so - system/lib/libhardware_legacy.so - system/etc/init.qcom.wifi.sh - system/etc/firmware/wlan/*(anything in this folder) for turn on WiFi
and also u8800 needs system/etc/init.qcom.bt.sh - system/bin/hci_qcomm_init - system/bin/qmuxd (I'm not sure about this file) - system/bin/sdptool - system/bin/hciattach for turn on BT
And also,you need change init.rc and init.huawei.rc files in boot.img for turn on WiFi and BT.
forumber2 said:
MIUI-XJ (my ROM) is a ported u800pro ROM. But it is a gingerbread ROM.
First of all,you need change all init files in /system. You can found this files in system/etc (example;init.qcom.wifi.sh).And I think the mass stroage problem causing by init.qcom.usb.rc (It can found in boot.img) but I'm not sure.
You should change gralloc files for a better GPU performance. It can found in systen/lib/hw. I think You don't need change other hw files.
u8800 needs system/bin/netd - system/lib/modules/*(anything in this folder) - system/bin/wpa_supplicant - system/lib/liboem_rapi.so - system/lib/libreference-ril.so - system/lib/libhardware_legacy.so - system/etc/init.qcom.wifi.sh - system/etc/firmware/wlan/*(anything in this folder) for turn on WiFi
and also u8800 needs system/etc/init.qcom.bt.sh - system/bin/hci_qcomm_init - system/bin/qmuxd (I'm not sure about this file) - system/bin/sdptool - system/bin/hciattach for turn on BT
And also,you need change init.rc and init.huawei.rc files in boot.img for turn on WiFi and BT.
Click to expand...
Click to collapse
Thanks a lot! Will try it all now!
Okey, now it's a bootloop on splash screen.
Edit: a bootloop was caused by some error in boot.img repack. Will try to repack it again now.
How to enable ADB when booting? On Aurora I could get kernel messages via ADB using adb shell cat /proc/kmsg. And now I really miss this feature.
Okey, great news! Wi-fi turned on, but the phone will fastreboot if I turn it off (framework crash I think) and wont turn on again until a full reboot. Also it isn't really working: no networks found.
No changes at all except Aurora kernel + setprop persist.sys.wifimac mac_param in terminal. After that wi-fi turned on, but even with that prop I have no wi-fi mac.
From that I understand all my problems are from some RIL or hardware libs that don't load or load with mistakes. So I need to know what exactly it can be and what libs are for what. Also I think it can be because of unedited init.rc's in ramdisk so I need to know what to edit in them. I've tried to look through them but I don't understand anything in it.
nagato.fm said:
Okey, great news! Wi-fi turned on, but the phone will fastreboot if I turn it off (framework crash I think) and wont turn on again until a full reboot. Also it isn't really working: no networks found.
No changes at all except Aurora kernel + setprop persist.sys.wifimac mac_param in terminal. After that wi-fi turned on, but even with that prop I have no wi-fi mac.
From that I understand all my problems are from some RIL or hardware libs that don't load or load with mistakes. So I need to know what exactly it can be and what libs are for what. Also I think it can be because of unedited init.rc's in ramdisk so I need to know what to edit in them. I've tried to look through them but I don't understand anything in it.
Click to expand...
Click to collapse
Which ROM are you fixing? Isn't CM10?
Nope, it's some desire z jb rom.
Code:
[email protected]:~# adb shell dmesg
- exec '/system/bin/sh' failed: No such file or directory (2) -
That's what I'm getting now. Already tried to fix this issue with some methods from google, no results. Even tried to adb-push bash from 4pda to system/bin and make symlinks, no results. Phone is in bootloop. Any ideas?
P.S.: sh is actually in both xbin and bin, so the problem is somewhere in the boot.img, right?
Have tried all kind of sorcery, still bootloops and exec '/system/bin/sh' failed: No such file or directory (2). Don't know why this is happening. Either /system mounts on boot in some wrong poing or init.rc is completely messed up. But I've checked everything connected to mounting partitions in all init files (except binaries) and gained nothing. I really need some explanation of what are these files for and what they do and what they MUST do.
If someone can give me answers or advices, please, do it now. Because all my ideas are over and I simply don't know now what to do.
EDIT: with aurora boot.img (no changes at all) results are the same except the message in terminal is now "/system/bin/sh: no such tool"
The system/bin/sh error is caused by not mounting /system properly. Check the init.rc files, it could also be in init.emmc.rc if it's a CM rom.
Find out where the on emmc-fs trigger is; if you can't find it, add it into one of the init.rc files.
Code:
on emmc-fs
# mount mmc partitions
wait /dev/block/mmcblk0p12
mount ext4 /dev/block/mmcblk0p12 /system rw barrier=1
wait /dev/block/mmcblk0p13
exec /system/bin/e2fsck -p /dev/block/mmcblk0p13
mount ext4 /dev/block/mmcblk0p13 /data nosuid nodev barrier=1 noauto_da_alloc
mount ext4 /dev/block/mmcblk0p6 /cache nosuid nodev barrier=1
Not sure that I am following this thread properly. I am just starting out with android devel in Fedora. Have you recompiled the WLAN module?
eyeconic said:
Not sure that I am following this thread properly. I am just starting out with android devel in Fedora. Have you recompiled the WLAN module?
Click to expand...
Click to collapse
Nope, I have no proper skills for that, sorry.
I still need some information
Mostly completely rewrote init. files and still no results.
According to this: (http://forum.xda-developers.com/showpost.php?p=30458679&postcount=1)
The Android Boot Process
Bootloader – In HD2’s case, Magldr or cLK – loads the kernel based on how you have configured the phone.
Kernel – The kernel (zImage) is loaded into RAM along with an initial ramdisk (initrd.gz), which initializes various devices (IO, memory, GPU, etc.), interrupts, and mounts the root file system (/). After this, the first user-space process called init is started.
Init – this is a binary file that is contained within the initrd.gz. The init binary processes init.rc and init..rc , along with other .rc files that are called by these two .rc files. Some of the key functions (from this thread’s perspective) in the order of their initialization/ execution are:
The init process follows the instructions in the init.rc and init.xyz.rc files and creates empty directories including /data. It then mounts the storage devices (partitions in the internal NAND (MTD)) to these empty directories. The NAND partition for system is mounted to /system, followed by the partitions specified for data, cache, etc. The directories for dalvik-cache (/data/dalvik-cache) are also created by the init process after mounting the specified device to /data.
The init process then starts various services including adb, service manager, Volume Daemon (vold) for media like SD Card (FAT partition). Most importantly, the zygote service which initiates the Dalivk-Cache is loaded in this sequence.
As we all know, Android is based on Linux. The boot sequence described above is common for all Linux machines – until the zygote stage. Core Android file like core, framework, services, IME, policy, etc. are executed from the Dalvik-Cache and hence Initialization of the Dalvik Cache is pretty much where Android comes into the picture
The sysinit/ run-parts part, which runs scripts from the /system/etc/init.d later the Zygote stage. No matter how this is done, Android has already started loading by the time the boot process comes to executing scripts in /system/etc/init.d
Click to expand...
Click to collapse
Click to expand...
Click to collapse
the error is in mounting nand partitions, but how can it past to starting adb when it fails on mounting system partitions? I don't understand this.

Categories

Resources