[TUT]-PORTING-Android To The VOGUE - Touch CDMA General

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!

Related

Android system.img Development

Ok so over the last week or so and with alot of help I've learned alot of information about Android Development. I'd like this thread to be a common place for sharing information.
Please don't ask questions about usage in this thread but let's use it as a place for us to learn and share information.
Building Android;
You will need to do this before you are able to edit any system.img files (you'll see why later in the post).
1. I recommend Debian,
2. Follow the instructions here. http://source.android.com/download They show for ubuntu but it all works. You need to enable all the third part and commercial sources in your SYSTEM-ADMINISTRATOR-SOFTWARE SOURCES. The only change is the first apt-get statement. Instead of java5 you need 6 so this is the string to enter in terminal;
sudo apt-get install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
Follow the rest of the guide. When it's complete (and it takes a while) you'll have a basic Android build in the folder /home/mydroid/out/target/product/generic/system
Create a new working folder and inside create a system folder. Copy the contents of the android make folder to that system folder, Either with sudo nautilus or using cp -Rf.
Now your ready to customize, you can include your notifications, alarms etc in the media folder.
following the instructions here; http://www.myhtcphone.com/node/13 you can replace the files from DZO's build for keymappings and the lib files.
Now to make it bootable.. This is why you needed to make the android. I struggled with this for a while. Thanks again DZO
/home/mydroid/out/host/linux-x86/bin/genext2fs -d /home/newandroid/system -b 80000 -a system.ext2
now make a mount directory for it.
cd /mnt/
mkdir system
Next mount your system.ext2 and convert it to cramfs. This fixes the issue with blank storage cards.
mount system.ext2 /mnt/system
mkfs.cramfs /mnt/system system.img
There you go. your own bootable system.img file. You cannot use DZO's latest kernel and intrid.gz as of this post. So please use the one released previous to that. For a blank data file use the data.gz from the android1.1 download.
Skinning your vogue android build
The 'skin file' for android is located in system/framework/framework-res.apk, if linux you can open the file with package manager. Inside you will find a res folder. And within that folder you will find folders called 'drawable' and 'drawable-land'. Edit the png's inside here to create your own custom theme. Or if you like you can always grab a theme from the dream themes forum. These come as an update.zip. Inside you will find a system/framework/framework-res.apk file. Simply open it up, and copy the drawable folders out to your apk.,
Rebuild with the instructions from the previous post and you're good to go.
Custom APPS
If you'd like to add any apps copy the apk's to the system/app folder. Be aware though that you have limited space.
thanks for putting this together, will edit this post if/when I have more to add
wiki
Thanks too..
you need to edit the build.prop to use the libreference.so instead of the htc one that's listed.
happy building
Thanks
It's also helpful to download the android sdk.
Android Rom system folder
Hey all , is there any guide to understand the apps which are in system folder in Android Rom i'm trying To bulid custom Rom .
The main point is to understand the purpose of the apps cz most of them cant be understood by only reading the code i prefer if the guide is for Kitkat version .
Thanks.

Debian Lenny on Droid Eris [02/14/2010 - WORKING! mjgdroid completed!!]

EDIT [02/14/2010]: Please see mjgdroids FINISHED PORT HERE.Make sure to thank him and/or donate to mjgdroid.
EDIT: MAKE SURE YOUR ROM SUPPORTS PARTITIONS ON YOUR SD! YOU CAN USUALLY FIND THIS INFO IN YOUR ROMS FAQ.
I'm currently looking for a work-around. Mounting EXT3 still works in the rooted terminal, but that doesn't help Android see your FAT partition.
Here it is folks, working instructions to get Debian Lenny running on your Droid Eris! I say that it's 90% complete because I do not yet have fully functioning MeeGo, I hope to resolve the issue sometime this weekend. Otherwise, all is well. I'm releasing the instructions so that others in the community can contribute.
Thanks to ban_dover for a lot of initial work. For author credit, other contributions, and the original thread leading up to my fix, see http://forum.xda-developers.com/showthread.php?t=748094. If there is ANYONE else who needs to be credited here, PLEASE pm me and I'll edit this post.
Also, if you're wondering "Why Debian Lenny?" it was readily available and already set up for ARMv5 and up. There are also available MeeGo binaries for Lenny. WOOHOO! Everybody's life is easier.
EDIT: I've released what I consider to be an unstable/incomplete RAW image. I will not link to unstable images in this post, you can download it on page 2 of thread. This image can be used to skip both step 1 and converting the image from QCOW to RAW.
1. Create ARM image containing Debian Lenny
In Linux command line
- Download Debian ARM Installer
wget http://ftp.de.debian.org/debian/dis...el/current/images/versatile/netboot/initrd.gz
wget http://ftp.de.debian.org/debian/dis.../versatile/netboot/vmlinuz-2.6.26-2-versatile
- Create disk image
qemu-img create -f qcow deb-arm.img 4G
- Run QEMU VM to run Debian ARM Installer
qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.26-2-versatile -hda deb-arm.img -initrd initrd.gz -append "root=/dev/ram" -m 256
- In Debian installer, follow prompts
I chose the following user access, root-pass:debian91, user:debian and pass:debian91
Install desired defaults. I initially went with desktop environment; core environment may be best for MeeGo
- Reboot VM ONCE to permit it to statisfy any changed dependencies
2. Create filesystem on phone and copy Lenny
In Linux SUPER-USER command line
- Backup SDCARD if necessary
- Enter superuser mode
"sudo sh" or "sudo bash"
- Partition SDCARD
Use partition editor of choice (I used GParted)
FAT must be first partition
Create second partition as ext3
- Mount EXT3 partition
mkdir sd
mount -t ext3 /dev/sdb2 sd
- Convert QCOW image to RAW image
qemu-img convert deb-arm.img -O raw deb-arm.raw
- Mount RAW image as loop
mkdir image
mount -t ext3 deb-arm.raw image -o loop,offset=32256
- Copy image contents to EXT3 partition on SDCARD
cp -r image/* sd
- Unmount both SDCARD and RAW image
- umount deb-arm.raw && umount /dev/sdb2
3. Bind necessary nodes and create chroot jail
In eiter ADB shell or in rooted phone command line (either method MUST BE SUPERUSER!!!)
- Enter superuser mode
"su" (make sure to accept and remember if asked on rooted phone; also not sure how to superuser in ADB shell)
(NOTE: The folowing commands should use "busybox" as a prefix if using ADB shell in terminal)
- Mount EXT3 partition (should be /dev/block/mmcblk0p2)
mkdir /data/local/debian
mount -t ext3 /dev/block/mmcblk0p2 /data/local/debian
- Bind the necessary nodes
mount --bind /dev/pts /data/local/debian/dev/pts
mount --bind /proc /data/local/debian/proc
mount --bind /sys /data/local/debian/sys
sysctl -w net.ipv4.ip_forward=1
- Enter into Debian system
chroot /data/local/debian /bin/bash
4. Installing MeeGo and opening an Xsession through VNC
- COMING SOON!! (like, over the weekend)
EDIT: MINOR SETBACK DUE TO FROYO NOT SUPPORTING PARTITIONED SDCARDS. WORKING WITH DEVS TO RESOLVE.
Connecting chroot to VNC
Running MeeGo environment
- Why Not Now
Finding the best way to get an xserver on Android... possibly without VNC
Seeing which is better, install MeeGo before copying to SDCARD, or after
- Possible future: adapting Lenny to favorite distro flavor
- This would take a lot more of my time, and those who want to convert it to ubuntu can google it more easily
Information Sources
This is a list of articles that I've gleaned my info from.
Debian Lenny ARM on Qemu
http://www.debian.org/releases/stable/installmanual
http://www.finalcog.com/howto-install-debian-lenny-arm-qemu-ubuntu-jaunty
http://kevin.deldycke.com/2007/04/how-to-grow-any-qemu-system-image/
Chrooting Troubleshooting
http://forum.xda-developers.com/showthread.php?t=748094
http://forums.dlink.com/index.php?topic=6073.0;wap2 (helpful in determining why nexus one and incredible images wouldn't chroot)
https://help.ubuntu.com/community/BasicChroot
http://forums.gentoo.org/viewtopic-t-470306-start-0.html
Inspiration
http://bayleshanks.com/wiki.pl?tips-computer-android-g1_debian_cyanogenMod
Most of the G1 development on XDA
http://androidforums.com/incredible-all-things-root/120622-how-run-ubuntu-droid-incredible.html
Very cool, good job.
very nice indeed!
Thanks guys.
I've always wanted to ask but thought it might offend someone. In any case, what will this enable us to do that we couldn't do already?
Sent from my FroyoEris using XDA App
xnatex21 said:
I've always wanted to ask but thought it might offend someone. In any case, what will this enable us to do that we couldn't do already?
Sent from my FroyoEris using XDA App
Click to expand...
Click to collapse
My thoughts exactly, I have no idea what's being said here.
Sweet! Nice work.
korben dallas said:
My thoughts exactly, I have no idea what's being said here.
Click to expand...
Click to collapse
Hmm... I sometimes fall on the answer that its obvious. Let me give a few reasons why I did it. Other than "it is fun for me."
1. Because we can, lol
2. It opens potentially the full gamut of available Linux software that wouldn't otherwise run (unless ported)
3. Broadened capability means wider choice
4. Unknown territory (at least for Eris users) provides new frontiers
I like these answers, three out of four also sum up why open source exists.
Very nice man. Got any screens?
Nikolai2.1 said:
Very nice man. Got any screens?
Click to expand...
Click to collapse
Right now, my camera is my eris. I'll get somebody to take either video or some pics this weekend so y'all can see it in action.
Could anybody create an image and upload it I just spent the last 4 hours waiting for debian to install inside qemu only for it to hang right before the end lol. Needless to say I just want to experiment with it but I don't really want to do that again or risk it hanging again.
Running X from Chroot
OK, so I was sitting around on break and it hit me that Debian Lenny has the Gnome Mobile desktop designed for touch interfaces in its repositories. The project is called Hildon and was the basis for Maemo before it became MeeGo. Voila, debian gui solved.
Then I remembered an article I'd read while in college on running X from within a chroot jail. I love google; I took a look around for it and found it: http://norman.walsh.name/2003/08/22/chroot. Bingo! We may not need VNC to get graphical output.
In short, my free time is going to consist of installing Hildon in Lenny and writing a script to bind the proper directories, descend into chroot and run X.
It's interesting to note a few things. I read on a few boards that android doesn't have it's own Xserver. Historically, chroot was used for testing purposes to ensure that a system could run on the existing kernel/hardware/etc. Well, in Debian Lenny we have an xserver and its dependencies compiled to run on ARMv5 and up. So technically if we can get X to run from chroot with the proper bindings, then we can get that SAME xserver to run directly on Android. Further, the ability to run Debian in chroot directly implies that the same software will run outside of chroot.
And one speculation: it would be an interesting experiment to see if these tools could be run side-by-side with the default Android rom. To any devs familiar with Android roms, does that sound overly ambitious?
AcidRoot said:
Could anybody create an image and upload it I just spent the last 4 hours waiting for debian to install inside qemu only for it to hang right before the end lol. Needless to say I just want to experiment with it but I don't really want to do that again or risk it hanging again.
Click to expand...
Click to collapse
Hey AcidRoot! I give no guarantees as I mentioned I'm still working out kinks, but I can upload my image. I'll compress it, upload it, and edit this post with a link to it.
My current image of Debian Lenny ARMv5 is available here. I'm not posting the link in the first post because this image does not constitute what I'd call stable and complete, just so you're forewarned.
composerdude said:
Hey AcidRoot! I give no guarantees as I mentioned I'm still working out kinks, but I can upload my image. I'll compress it, upload it, and edit this post with a link to it.
My current image of Debian Lenny ARMv5 is available here. I'm not posting the link in the first post because this image does not constitute what I'd call stable and complete, just so you're forewarned.
Click to expand...
Click to collapse
Thanks alot I know the risks I just want to experiment with it.
One of the kinks that would be immediately noticed is that paths to executable directories are not set. When chroot into /data/local/debian, make sure that one of the first things you do is change the path variable.
Code:
PATH=/usr:/bin/:usr/local/bin:.
oman def going to try this later on tonight... sounds GREAT
What is this exactly?
Awesome work man! I've been following this in ban_dovers thread. I just needed to comment here so it'll show up in my "participated" folder on my xda app.
I'll be lurking and waiting for something more stable and noob friendly. Keep up the great work.
Sent from my nonsensikal froyo using XDA App
@joshw0000: Thanks for the encouragement!
@EVERYBODY: I just discovered today after updating Tazz Froyo to the latest version that updates to CM6 have aparently broken support for partitioned SD cards. I am looking for a work-around before working out more kinks. My istructions still work, it's just that ANDROID sees a blank SD, even though partitions can still be mounted to run Debian. Anyone testing, check your FAQs to make sure partitions are supported. I'll keep you posted on my end.

[BUILD][18.11.2010] Desire Spot (new initrd, no rootfs, incremental updates)

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

[OUTDATED GUIDE]Make Custom Rom Easier Than Cycling

Things you need:
Base firmware (i'm use Gingerbread S5830SERKPH 2.3.4)
Windows (I'm use windows 7 X64 service pack 1)
Linux (Ubuntu recommended)
And the last thing is, You need enough experience in android world
step-step :
Flash your phone with your desired base firmware.
Make required modifications at your phone.
After that, do hard reset to your phone.
Next back up system.rfs .
put system.rfs with boot.img, data.rfs, recovery.img from PDA base firmware in one folder.
After that, repack your custom rom.
what should we do to modify it :
Remove useless widgets
Add more apps
Change theme
How to back up System.rfs :
Download at market "terminal emulator"
next run this code:
Code:
su
dd if=/dev/stl12 of=/sdcard/system.rfs
How to hard reset your phone :
Move by root explorer your modification apps to system/app then change permission like this :
Code:
User:Read, Write
group:Read
Others:Read
Next change the owner to "root" by root explorer
At least boot into recovery mode "HOME+POWER" and choose "wipe data/factory reset" be sure your contact data already backup
How to repack your custom rom :
PDA by running this code via terminal at linux:
Code:
tar -H ustar -c boot.img recovery.img data.rfs system.rfs >> ROMNAME.tar
md5sum -t ROMNAME.tar >> ROMNAME.tar
mv ROMNAME.tar ROMNAME.tar.md5
change ROMNAME to your desired, of course, ROM name.
If you want to build One-Package ROM, just use 1st and 2nd command and don't forget to include all files on all *.tar.md5 (such as modem, csc, apboot) like this :
Code:
tar -H ustar -c *.* >> ROMNAME.tar
md5sum -t ROMNAME.tar >> ROMNAME.tar
How to change your rom name :
At root explorer you see at folder system "build.prop"
Open it in text editor edit "ro.build.display.id=GINGERBREAD.XXKPH" with your rom name
Another Handy Modification Guide:
How to edit system.rfs on your Pc :
importan : if you want to edit system.rfs at windows, DON'T use Magic Iso, why? because i was use it, then my system.rfs corrupt.
you must have linux (ubuntu recommended)
run it from terminal :
Code:
sudo mount -o loop system.rfs /some_dir
make required modification
then Unmount it
How to Unpacking & repacking the image :
Note: below I give you the details for unpacking and repacking manually, but I have attached two perl scripts that do most of this for you
If you are good with a hex editor, you can open up any of these images and strip off the first 2k of data. Then, look for a bunch of zeroes followed by the hex 1F 8B (which is the magic number of a gzip file). Copy everything from the first line of the file, through the zeroes, and stopping at the 1F 8B. That is the kernel. Everything from the 1F 8B through the end is the ramdisk. You could save each of these files separately. In order to see the contents of the ramdisk, you need to un-gzip it and then un-cpio it. You could use a command like this (ideally after creating a new directory and cd'ing into it):
Code:
gunzip -c ../your-ramdisk-file | cpio -i
That will place all of the files from the ramdisk in your working directory. You can now edit them.
In order to re-create the ramdisk, you need to re-cpio them and re-gzip those files, with a command like the following (remember, cpio will include everything in the current working directory, so you probably want to remove any other cruft you might have in there):
Code:
find . | cpio -o -H newc | gzip > ../newramdisk.cpio.gz
The final step is to combine the kernel and your new ramdisk into the full image, using the mkbootimg program (which you should download and compile from the git repository):
Code:
mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel your-kernel-file --ramdisk newramdisk.cpio.gz -o mynewimage.img
Now, there's a lot of hassle in pulling apart files in hex editors and remembering all of these commands, so I wrote unpack and repack perl scripts for you (attached). Hooray.
How to Manually deodex your phone :
What you'll need:
xUltimate v2.2
Unzip xUltimate v2.2, and launch "Main.exe"
If everything goes well xUlt should recognize the phone and make a connection. You now should see a list of options.
Run option 1. After option 1 is done, run option 2.
Now these well take a while. Run option 3.
IMPORTANT: After you have run option 3, you MUST navigate to the xUltimate folder and find "origi_frame" folder, and delete "guava.odex". It's a bad file, and interferes with deodexing process.
Now run option 4, and wait.
Exit xUltimate, and put the phone in USB mass storage.
Go back into the xUltimate folder and copy "done_frame", and "done_app", and move them to the root of the sdcard.
Put the phone in PC mode
Open a command prompt, and do the following:
Code:
adb shell
su
stop
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/done_app/* /system/app/
cp /sdcard/done_frame/* /system/framework/
rm /system/app/*.odex
rm /system/framework/*.odex
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
reboot
Your phone should now be deodexed!
You may notice an increase in speed, and you now have the ability to edit certain files with greater effects.
How to change bootanimation :
using a Root explorer goto the /system/media directory.
Copy bootanimation.zip to your SD Card.
Connect your droid to your computer with usb and mount the SD Card
Copy bootanimation.zip to your computer.
extract bootanimation.zip to a folder
Inside you will find 2 folders with all the individual PNG files in them.
With photoshop or paint modify the png files to add your custom graphics, OR make/download your own pictures. (Make sure they are match with your phone device)
Highlight the two folders and the desc file.
Right click the highlighted files.
Select add files to archive.
Select Zip check box
In the compression method drop down box select Store. (this is key if you dont do this it wont play the animation)
save the archive as bootanimation.zip
copy the new bootanimation.zip to your SD Card
Select the bootanimation.zip file from your SD Card and move it... system>media>paste
________________
i'm just 12 years old if i can do it, why you can't
Advantages of this way is :
More efficient
Reduce your internet usage (dont need kitchen, apk manager, etc)
Easy to modification (You can see the direct result)
Reduce your time (only 2 hours i can do this way)
More soon
You steal my IDEAS Univos! No, just kidding, there are incorrect guide on "how to hard reset" lol. Anyway, try to build a ROM before creating this guide, my friend.
Wow Kids!
are doing development now a days
fla.sh said:
You steal my IDEAS Univos! No, just kidding, there are incorrect guide on "how to hard reset" lol. Anyway, try to build a ROM before creating this guide, my friend.
Click to expand...
Click to collapse
im not steal it.
Where is incorrect guide i'm try to fix it?
Sent from my GT-S5830 using XDA App
GadgetCheck said:
Wow Kids!
are doing development now a days
Click to expand...
Click to collapse
Thanks
Sent from my GT-S5830 using XDA App
This guide tested by me, and i have get result from this.
Sent from my GT-S5830 using XDA App
If you have question just ask me!
Sent from my GT-S5830 using XDA App
I think this guide is the same with fla.sh's guide.
devilsking said:
I think this guide is the same with fla.sh's guide.
Click to expand...
Click to collapse
Different, Fla.sh make guide for cooking his rom.
in this thread i tell you how to make your own custom rom.
with Phone device Samsung Galaxy Ace.
Univos said:
Different, Fla.sh make guide for cooking his rom.
in this thread i tell you how to make your own custom rom.
with Phone device Samsung Galaxy Ace.
Click to expand...
Click to collapse
ya ya. I see tks for your guide
devilsking said:
ya ya. I see tks for your guide
Click to expand...
Click to collapse
Please press thanks button, if i helped you
Sent from my GT-S5830 using XDA App
Univos said:
This guide tested by me, and i have get result from this.
Sent from my GT-S5830 using XDA App
Click to expand...
Click to collapse
Now that you're awesome like fla.sh , I'll be quietly tucking in a corner thinking how young teenagers get their knowledge . XD jkjk
EmoBoiix3 said:
Now that you're awesome like fla.sh , I'll be quietly tucking in a corner thinking how young teenagers get their knowledge . XD jkjk
Click to expand...
Click to collapse
Just kept reading, ask people, don't feel has a lot of knowledge, kept countinue to learn
Sent from my GT-S5830 using XDA App
EmoBoiix3 said:
Now that you're awesome like fla.sh , I'll be quietly tucking in a corner thinking how young teenagers get their knowledge . XD jkjk
Click to expand...
Click to collapse
Maybe this holiday i will developt a simple custom rom.
Sent from my GT-S5830 using XDA App
Univos said:
Maybe this holiday i will developt a simple custom rom.
Sent from my GT-S5830 using XDA App
Click to expand...
Click to collapse
I am thinking about a kid with two or more different XDA ID.
ketut.kumajaya said:
I am thinking about a kid with two or more different XDA ID.
Click to expand...
Click to collapse
No, the real name Fla.sh is "Aver..." my real name is "iz..." we are student of junior high school at surabaya. I'm "Aver..." friend.
Sent from my GT-S5830 using XDA App
Univos said:
No, the real name Fla.sh is "Aver..." my real name is "iz..." we are student of junior high school at surabaya. I'm "Aver..." friend.
Sent from my GT-S5830 using XDA App
Click to expand...
Click to collapse
I'm swear.
Sent from my GT-S5830 using XDA App
ketut.kumajaya said:
I am thinking about a kid with two or more different XDA ID.
Click to expand...
Click to collapse
ROFLAMO
Jukirdolly said:
ROFLAMO
Click to expand...
Click to collapse
??????
Sent from my GT-S5830 using XDA App

[BUILD][6.0.1][CAF][LA.HB.1.3.1] How to build Marshmallow using Arch Linux

System Requirements
Arch Linux x86-64
Oxygen OS(extracted image or installed)
adb installed and drivers setup
non-root user
sudo setup for your user (you can install packages as root as a workaround)
40GB free storage
4GB+ ram
Required Packages
First off you're gonna want to make sure you're completely up to date and fetch the packages required to build, with the command below.
Code:
#sudo pacman -Syyu gcc-multilib git gnupg flex bison gperf sdl wxgtk squashfs-tools curl ncurses zlib schedtool perl-switch zip unzip libxslt python2-virtualenv bc lib32-zlib lib32-ncurses lib32-readline jdk7-openjdk rsync maven repo
Then you're going to need to fetch some apps from the AUR. First add their GPG key.
Code:
#gpg --keyserver pgp.mit.edu --recv-keys C52048C0C0748FEE227D47A2702353E0F7E48EDB
Now you can fetch them with a tool like yaourt or manually install the two packages.
lib32-ncurses5-compat-libs
ncurses5-compat-libs
Code:
#yaourt --aur lib32-ncurses5-compat-libs ncurses5-compat-libs
Setting up build enviroment and syncing
This part will assume you're building in a folder called "android" in your home directory, and requires the above packages to be installed.
Run these commands to install repo in a folder called "bin" in your home directory. Then for a single terminal session set the new "bin" folder as a binary folder in bash.
Code:
#mkdir ~/bin
#export PATH=~/bin:$PATH
#curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
#chmod a+x ~/bin/repo
Make a folder to store and build android, then enter it.
Code:
#mkdir ~/android
#cd ~/android
Setup a virtual python 2.7 enviroment in your "android" folder as repo doesn't work with 3+.
Code:
#virtualenv2 venv
#ln -s /usr/lib/python2.7/* ~/android/venv/lib/python2.7/
#source venv/bin/activate
Now it's time to sync the sourcecode with your python 2.7 and repo setup. The following code will sync CAF android 6.0.1 from oneplus. The "4" can be removed or replaced with any whole number becides zero depending on your connection speed. You may omit the "-c" if you have problems syncing or need more than the defined branches.
Code:
#repo init -u https://github.com/OnePlusOSS/android.git -b oneplus3T/6.0.1
#repo sync -j4 -c
You can also use my repo if you prefer. I'm working on improving the mess oneplus gave us.
Code:
#repo init -u https://github.com/droidman/android.git -b oneplus3T/6.0.1
#repo sync -j4 -c
Compile Your Build
Assuming your in your virtual python 2.7 and followed the first part of the guide, set openjdk 7 as your active java.
Code:
#export JAVA_HOME=/usr/lib/jvm/java-7-openjdk
Fix broken provided glib.
Code:
cp /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld
If you're rooted and have adb installed, you may want to fetch your prebuilt files from the latest marshallow Oxygen OS or caf based rom. You may also extract them from a Oxygen OS system image but build will not complete without prebuilts.
Code:
#cp ~/android/.repo/manifests/pull_library.sh ~/android/pull.sh
#sh pull.sh
Intialize the enviroment and select a platform. You may build "msm8996-userdebug" or "msm8996-user".
Code:
#source build/envsetup.sh
#lunch msm8996-userdebug
Time to build! Find the number of threads on your cpu and set 1-2x that as "x". You may also omit "OTAackage" if you prefer to have fastboot/twrp flashable images instead of a zip, (system.img, boot.img, etc).
Code:
#make -jx OTApackage
Your compiled files and flashable zip or images will be located in "~/android/out/target/product/msm8996".
How to rebuild!
Cd into directory, sync repo, and setup enviroment.
Code:
#export PATH=~/bin:$PATH
#export JAVA_HOME=/usr/lib/jvm/java-7-openjdk
#cd ~/android
#source venv/bin/activate
#repo sync -j4 -c
#source build/envsetup.sh
#lunch msm8996-userdebug
Clean the out directory.
Code:
#make clobber
Build. (setup to make a recovery flashable zip with a 8 thread processor.)
Code:
#make -j16 otapackage
Thanks for the clean guide
Very nice and thanks for posting it. If you'd rather use whatever you've got installed on a box or VM (to pick one out of a hat, U16.04) , just google "how to build marshmallow {from your distro}". (where you fill in your distro's name & version (opt)).
For example, initial parts of "this page(see link)" might be good for 16.04 LTS users :: http://forum.xda-developers.com/chef-central/android/guide-how-to-setup-ubuntu-16-04-lts-t3363669
All the commands following the basic setup of development environment in the OP "should" work on any distro, starting with the fetch from git. Also, thanks for your personal github code.
Anyway, good job. Cheers.
I've synced your git version of oneplus' git. The problem I've having and not getting past looks like this: Oops, I guess I lost the clipboard from the VM. It was basically as if it hasn't got the dashd prebuilt or blob or whatever it was looking for. I grabbed the prebuilts via my phone running 3.5.3 which seemed to work fine.
Is your current github code building without trouble for you? I should probably re-sync. Thanks.
hachamacha said:
I've synced your git version of oneplus' git. The problem I've having and not getting past looks like this: Oops, I guess I lost the clipboard from the VM. It was basically as if it hasn't got the dashd prebuilt or blob or whatever it was looking for. I grabbed the prebuilts via my phone running 3.5.3 which seemed to work fine.
Is your current github code building without trouble for you? I should probably re-sync. Thanks.
Click to expand...
Click to collapse
The prebuilt script is currently broken, i manually copied over the files that failed with a file manager. You can also mount a system.img from a compiled oxygenOS, Oneplus Open Source or AOOP as ext4 to manually copy over the files too!
namanjr said:
The prebuilt script is currently broken, i manually copied over the files that failed with a file manager. You can also mount a system.img from a compiled oxygenOS, Oneplus Open Source or AOOP as ext4 to manually copy over the files too!
Click to expand...
Click to collapse
Oh cool. I can do that (the system.img). My question then is "where are the files on in the mounted system.img" and "do they go to "prebuilts" at top level or to "vendor" (which level, since I see vendor repeat two levels down)?
Thanks.
hachamacha said:
Oh cool. I can do that (the system.img). My question then is "where are the files on in the mounted system.img" and "do they go to "prebuilts" at top level or to "vendor" (which level, since I see vendor repeat two levels down)?
Thanks.
Click to expand...
Click to collapse
I just extracted the entire root of the system.img to "SOURCECODE/vendor/oneplus", easier than manually going through to see what files to copy over!
namanjr said:
I just extracted the entire root of the system.img to "SOURCECODE/vendor/oneplus", easier than manually going through to see what files to copy over!
Click to expand...
Click to collapse
Great. Thanks so much for the help. I'll give that a shot next.
---------- Post added at 11:01 AM ---------- Previous post was at 10:25 AM ----------
hachamacha said:
Great. Thanks so much for the help. I'll give that a shot next.
Click to expand...
Click to collapse
OK, that worked. I just had to , for some reason, use the samsung simg2img (sparse to full) util in order to mount it as ext4/loop.
Thanks again.
edit: solved
Now that I can do a make -j {target}, I've got another question:
The target OTApackage (or is it otapackage) doesn't appear to be a valid choice for me. I get a "Target doesn't exist" error if I use make -j{N} otapackage (or OTApackage). I'd like very much to be able to create the install .zip rather than have to collect & bundle all the bits & pieces. I've tried with the original OnePlus .git and your .git as well.
Thanks much.
hachamacha said:
Now that I can do a make -j {target}, I've got another question:
The target OTApackage (or is it otapackage) doesn't appear to be a valid choice for me. I get a "Target doesn't exist" error if I use make -j{N} otapackage (or OTApackage). I'd like very much to be able to create the install .zip rather than have to collect & bundle all the bits & pieces. I've tried with the original OnePlus .git and your .git as well.
Thanks much.
Click to expand...
Click to collapse
Did you setup the enviroment and run lunch? It's all lowercase! Can you post the error it gives?
namanjr said:
Did you setup the enviroment and run lunch? It's all lowercase! Can you post the error it gives?
Click to expand...
Click to collapse
Oh yeah: On the same VM, I can build versions of CM, no troubles. I've got OpenJava 7 JDK and all the right stuff. I ran lunch (It's something like either #25 or 26 on the menu, and no problems with any of that.
After quite awhile, it comes back with the "no rule to build target otapackage (whatever it was)" . I'll run a build right now and get the exact error:
Jeez! Of course, this is the time it picks to just go right past where it usually gets the error. I'm pretty sure I know what happened. I was using it as you'd printed it in the guide ^^, OTApackage, which in a case sensitive system , doesn't mean a thing. I'll post again if it dies 2 hours down the line. I should move this operation to my Linux box with SSD's but it's in use at the moment.
Thanks again.
edit: Lunch output ::
$lunch msm8996-userdebug
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=msm8996
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a53
HOST_ARCH=x86_64
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-51-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_BUILD_TYPE=release
BUILD_ID=MXB48T
OUT_DIR=out
Click to expand...
Click to collapse
Damn. I just realized you had this covered as well, but I missed it first time around.
My compile finally blew out about 1/2 way through with a libart.so build error, so I did this (before I re-read your guide):
Code:
$ln -s prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/bin/ld /usr/bin/ld.gold
And we're off to the next error! ;
I believe someone has already mentioned a problem with dashd not being found, im getting the "no rule to make target..." error regarding dashd, tried to pull /sbin/dashd but the file doesn't exist. What can I do
{
"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"
}
hamzahrmalik said:
I believe someone has already mentioned a problem with dashd not being found, im getting the "no rule to make target..." error regarding dashd, tried to pull /sbin/dashd but the file doesn't exist. What can I do
Click to expand...
Click to collapse
Did you unpack system.img from 3.5.3 (you can check the disaster recovery thread in q&a here) and then copy the entire contents into $source/vendor/oneplus? Before I had just used a cable and adb enabled in Linux and I died at dashd as well. After I got the system.img prebuilts, it was fine.
Note: My experience:: System.img wasn't mountable as a $mount -t ext4 -o loop ... device , not recognized as that type file, so I found simg2img (For whatever reason, Samsung uses "sparse" image files and apparently so does OP) to modify system.img to a normal non-sparse system.img and then mount -t ext4 -o loop ./system.img /{mountpoint} worked fine and I copied from there to ./vendor/OnePlus/ (however it's spelled , it's the only "oneplus" folder under vendor.
hachamacha said:
Did you unpack system.img from 3.5.3 (you can check the disaster recovery thread in q&a here) and then copy the entire contents into $source/vendor/oneplus? Before I had just used a cable and adb enabled in Linux and I died at dashd as well. After I got the system.img prebuilts, it was fine.
Note: My experience:: System.img wasn't mountable as a $mount -t ext4 -o loop ... device , not recognized as that type file, so I found simg2img (For whatever reason, Samsung uses "sparse" image files and apparently so does OP) to modify system.img to a normal non-sparse system.img and then mount -t ext4 -o loop ./system.img /{mountpoint} worked fine and I copied from there to ./vendor/OnePlus/ (however it's spelled , it's the only "oneplus" folder under vendor.
Click to expand...
Click to collapse
Thanks. Can't find the thread you are referring to, so I just downloaded a 3.5.3 rom zip and I'll see what I can find
Sent from my ONEPLUS A3003 using Tapatalk
hamzahrmalik said:
Thanks. Can't find the thread you are referring to, so I just downloaded a 3.5.3 rom zip and I'll see what I can find
Sent from my ONEPLUS A3003 using Tapatalk
Click to expand...
Click to collapse
Sorry: I couldn't find it for a moment either. Here it is and if you get the .zip file in the thread that the OP user has on a torrent, then you can just unzip and use any of the 3.5.3 .img files. The other .zip files all use the newer .zip style of patching every file from things like system.img.new, etc.
http://forum.xda-developers.com/oneplus-3t/help/oneplus-3t-factory-restore-utility-t3511287
That's the thread.
hachamacha said:
Sorry: I couldn't find it for a moment either. Here it is and if you get the .zip file in the thread that the OP user has on a torrent, then you can just unzip and use any of the 3.5.3 .img files. The other .zip files all use the newer .zip style of patching every file from things like system.img.new, etc.
http://forum.xda-developers.com/oneplus-3t/help/oneplus-3t-factory-restore-utility-t3511287
That's the thread.
Click to expand...
Click to collapse
Finally got that downloaded. How do i mount? I tried mount -t ext4 -o loop ./system.img but that doesnt work. You said something about covnerting to non-sparse, how do i do that?
Thanks
hamzahrmalik said:
Finally got that downloaded. How do i mount? I tried mount -t ext4 -o loop ./system.img but that doesnt work. You said something about covnerting to non-sparse, how do i do that?
Thanks
Click to expand...
Click to collapse
There's a linux util called simg2img (or I think it means (sparse image to full image). Then you can do the mount you just tried above. It fails on the 'sparse' image. I'm not sure why the hell OP is using Samsung's sparse image but maybe it's more common than I know. I just happened upon it and it was installed on my version of Ubuntu from when I was building CMNN.N versions for other phones.
I can upload it if you like (or try). OK: I booted linux and zipped it so unzip simg2img.zip >> /usr/bin (or whatever you're using as an executable path).
hachamacha said:
There's a linux util called simg2img (or I think it means (sparse image to full image). Then you can do the mount you just tried above. It fails on the 'sparse' image. I'm not sure why the hell OP is using Samsung's sparse image but maybe it's more common than I know. I just happened upon it and it was installed on my version of Ubuntu from when I was building CMNN.N versions for other phones.
I can upload it if you like (or try). OK: I booted linux and zipped it so unzip simg2img.zip >> /usr/bin (or whatever you're using as an executable path).
Click to expand...
Click to collapse
Thank you very much, I'll give that a go
Sent from my ONEPLUS A3003 using Tapatalk
I'm curious as to what 'builders' think is the best solution (assuming you have this problem, or this type of problem on other modules) :
Problem:: (can't build libart.so) (sorry, don't have the error anymore but it has to do with ./prebuilts/*/*/.../*/ld not pointing to a version that is in sync with what's going on to the tree.
A solution(s): ln -s /usr/bin/ld.gold ./prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.15-4.8/x86_64-linux/ld
(why?) - I found this as a workaround in a) the original OP, b) the changesets for the problem in CM jerritt. Also setting env var "WITHOUT_HOST_CLANG=TRUE". I have yet to find a decent answer for why this might be working.
Currently: I can build the thing, but there are ~23 or so occurrences of ./ld in the ./prebuilts tree. Is that really the best solution , changing each of these things to be soft pointers to /usr/bin/ld.gold?
If anyone has a better answer (or a real answer), would love to hear it. Yes, it builds, but the reason this seems so hokey is because if you did, for example, a "make clobber" before a build to clean out the trash, you'd be back at square one. Of course, you could make it part of a script..
edit: gerritt refs: (they are quite "old" so the problems been around in CM for quite awhile. We're just building stock here.
https://review.cyanogenmod.org/#/c/120824/
https://android-review.googlesource.com/#/c/223100/
Click to expand...
Click to collapse
edit2: Return of --version or -v from /usr/bin/ld, ld.gold to see the difference:
Code:
/usr/bin/ld -v
GNU ld (GNU Binutils for Ubuntu) 2.26.1
[email protected]:~/sandbox/op3t$ /usr/bin/ld.gold -v
GNU gold (GNU Binutils for Ubuntu 2.26.1) 1.11
Edit 3: Explanation of ld.gold:
http://llvm.org/docs/GoldPlugin.html
Click to expand...
Click to collapse

Categories

Resources