Android system.img Development - Touch CDMA General

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.

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!

Getting Android source in Eclipse on Windows 7 [solved]

Hi all, I'm just starting getting into App development and I want to attach the Android source code into Eclipse so that I can reference it locally. Is there anyone here who has experience doing this on Windows who is willing to walk me through it?
Alternatively, I'll go it on my own if someone could help me get past this one roadblock. Thus far I've installed Python and msysGit (and updated my PATH variable accordingly) so that I can use git and repo. Something isn't working however and repo runs into an error that I can't seem to figure out. I'm contemplating uninstalling all that and starting from scratch with Cygwin.
Here's a tutorial on setting up Eclipse on windows (albeit over a year old so no guarantees) link
personally I would dual boot linux... it was a breeze setting it up and there's plenty of tutorials for that.
You could install ubuntu (i think) side by side with win7 using wubi, as if it were a program or something. That way you're not messing with partitions.
I already have Eclipse set up. This is not the problem. I'm having trouble downloading the Android source code - NOT the SDK - on my Windows PC. Specifically, I always run into errors when I try to use "repo init -u blah blah" as instructed on the android source page. If someone has successfully done this on Windows, I'd like someone to give me some guidance, because either I'm doing something wrong or my setup is not correct.
Right now I'm trying to use Cygwin (basically creates a linux environment inside Windows). The last time I tried using repo, I got this:
EDIT: Code removed. I found a solution, outlined below, for anyone else who wants to get the Android source into Eclipse.
Okay, I got the source code, it was actually pretty easy to do, and I didn't even need repo to do it . For those who may find this useful, here's how.
0. It is assumed you have already installed both Eclipse and the Android SDK. If you don't have those yet, download them and set those up. If you aren't on Windows but still want to know how to get the source and import it into Eclipse, you can skip step 1.
1. Install Cygwin on your computer. During the installation, you will be presented with a package explorer and you can choose specific packages to install. Choose whatever you like, but make sure to include automake, bison, curl, flex, gcc, git, gnupg, python, zip, and an editor of your choice, like nano or vim (you can use the search field at the top to find these quickly).
This will basically give you a Linux shell on Windows whose root directory is something you've designated, like C:\cygwin.
2. A few more things to set up. Fire up Cygwin and make a bin folder in your home directory. Add this directory to your PATH variable, then cd into it.
Code:
mkdir ~/bin
PATH=~/bin:$PATH
cd bin
This blog post has code for a python script that will be used later. Make a new file using an editor of your choice. Copy the code and save the file as anything you want (I named it "pack.py"). When you're done, cd back to your home directory.
3. Downloading source. From your home directory (or a subdirectory if you wish), use git to clone the platform frameworks base into a new directory (here I've called it "android").
Code:
git clone http://android.git.kernel.org/platform/frameworks/base.git android
cd into that directory and examine the git tags.
Code:
cd android
git tag
You'll get a list of tags. Choose the one that matches the API level you want to build your project(s) in. I'm using API level 10, so I chose android-2.3.3_r1. That's what you're going to check out.
Code:
git checkout android-2.3.3_r1
4. Reorganizing the source code. You need to locate all the java source files and restructure everything into a directory structure that matches the package naming. Fortunately, that script from earlier does exactly this and then zips it up into a nice little package for you called "sources.zip".
Code:
python ~/bin/pack.py
5. Move this zip file to the proper SDK platform folder. Since I downloaded sources for API level 10, I want to move this zip file to
Code:
C:\android-sdk-windows\platforms\android-[B]10[/B]
You can do this with your regular old file explorer on Windows. Extract the contents into a subfolder named "sources".
6. Get Eclipse to recognize them. Open up a project (or start a new one) whose target is the API level you just did all that stuff for. In the package explorer, right-click the project root and click "Refresh". Now when you browse the class files under project-root/android 2.3.3/android.jar/whatever, you'll see actual source code instead of that nasty "Source not found" page.
Enjoy ^_^

GUIDE - Compile latest Dzo's 3.0.8 kernel (Aurora)

Ok, in this guide, we'll build our development environment so we can start compiling aurora's kernel (3.0.8) in ubuntu.
NOTES:
- Every command is to be used in the terminal (Applications-Accessories-Terminal).
- There are scripts you can use to automate stuff, I'll post them in the second post on this thread.
- Sorry, I won't guide you on how to install Ubuntu or Android SDK, there are guides on the web all over the place.
1 - First things first, here's what we need:
a) Ubuntu 10.04 LTS x64 (this is recommended by google, it might work in other ubuntu versions, but I didn't tried it). To download it, go to:
http://releases.ubuntu.com/lucid/
And select the 64-bit PC (AMD64) desktop CD version. Your processor must support 64bits (most modern ones support it, else, use the x86 iso, not tested though).
Install ubuntu, you can use dual-boot with windows. I won't post a guide to this, as it's very easy and there are guides all over the net.
b) Install android sdk, to use adb (this is optional, but you really should if you use adb).
Follow this guide:
http://forum.xda-developers.com/showthread.php?t=921169
Note: Eclipse is not needed
c) Install some tools that are needed, like git, compiler stuff etc (this is a single command, copy and paste everythin):
Code:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc abootimg
NOTE: If abootimg doesn't install (It didn't for me, for some reason) go in here, download and install the deb package.
d) Install the toolchain (it's a set of tools used to compile the kernel, I think. This takes a while):
Code:
git clone https://android.googlesource.com/platform/prebuilt
e) Download dzo's kernel from git and set the git branch to "master":
Code:
git clone https://github.com/dzo/kernel_huawei.git
git checkout master
2 - Getting to the fun stuff...
a) First, copy the boot.img attached to this post to your /home/kernel_huawei folder.
b) Set up the environment. Do this, in the terminal (must be done for each compilation session, I'll post scripts in the end, to automate this stuff):
Code:
cd kernel_huawei
export ARCH=arm
export CROSS_COMPILE=/home/username/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make u8800_defconfig
Note, replace /username/ in the third command with your username.
c) Compile. This takes like 10 minutes, depending on your pc:
Code:
make
TIP - Speedup compilation (thanks to Unrealized)
You can use
Code:
make -jx
to speed up the compilation.
ie, if you have 2 cores, use
Code:
make -j3
for 4
Code:
use -j5
3 - Create the boot.img. If you aren't already in the kernel_huawei folder, do this:
Code:
cd kernel_huawei
Then:
Code:
abootimg -u boot.img -k arch/arm/boot/zImage
After this, the boot.img in your kernel_huawei folder is updated. You can copy that to your phone.
_________________________________________
That's it. In the second post, I'll tell you how to check for latest version, check changelogs and scripts to automate stuff.
If you find any errors, please let me know.
ADDITIONAL STUFF
CHECK FOR UPDATES AND CHANGELOG's
In the terminal:
Code:
cd kernel_huawei
git pull
git log
SCRIPTS
To create a script, create an empty document (no extension), copy the commands and save it. Then right click it, go to "Properties-Permissions" and set it to execute.
To run the script, use the therminal and do:
Code:
cd /path/to/script/file/
./scriptfilename
OR, you can create a shortcut to the script in the panel, for example:
- Right click on the panel and select "Add to panel - Custom application launcher"
- Then, in type, select "Application in terminal"; give it any name, and then browse to the script file.
To run the script just click in the icon in the panel.
a) Automatically download the latest updated files and see what has changed, without compiling:
Code:
cd ~/kernel_huawei
git pull
git log
$SHELL
b) Automatically download the latest updated files, immediately compile and create a new boot.img in the kernel_huawei folder:
Code:
cd ~/kernel_huawei
git pull
export ARCH=arm
export CROSS_COMPILE=/home/username/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
make u8800_defconfig
make
abootimg -u boot.img -k arch/arm/boot/zImage
$SHELL
In this script, you must change the /username/ in the 4th command to your username.
Installing the kernel on the phone
a) Use adb to put the boot.img, (assuming it is on the kernel_huawei folder) in the phone and reboot the phone:
Code:
cd kernel_huawei
adb shell mount -o rw,remount /dev/block/mmcblk0p1 /.cust_backup
adb push boot.img /.cust_backup/image/boot.img
adb shell mount -o ro,remount /dev/block/mmcblk0p1 /.cust_backup
adb reboot
c) Manual installation:
- Copy the updated boot.img to your sdcard.
- Use root explorer (make sure it is set to show hidden files) and copy the boot.img to ./cust_backup/image, replace the original and reboot.
Thank you for this! gonna try it!
whats about pro?
well i dont get any of that... :\
can we use your upload with any rom?
thanks in advance for your replies..
birginioss said:
well i dont get any of that... :\
can we use your upload with any rom?
thanks in advance for your replies..
Click to expand...
Click to collapse
What do you mean? There's no upload here for any ROM... the files here are just for compiling Dzo kernel to use in Aurora... I suggest you ignore this thread if you don't know what this is all about
Sent from my U8800
Matoxas said:
whats about pro?
Click to expand...
Click to collapse
Sorry, this is only for Dzo kernel for Aurora, I know nothing about U8800 pro...
Sent from my U8800
Can you post latest 3.0.8 kernel so we can flash it over cwm. Thx
Sent from my U8800 using Tapatalk 2 Beta-5
boss_y said:
Can you post latest 3.0.8 kernel so we can flash it over cwm. Thx
Sent from my U8800 using Tapatalk 2 Beta-5
Click to expand...
Click to collapse
It's in Aurora's thread, search posts by Dzo, it's 3.0.8 v2...
Sent from my U8800
Thanks
Good Work!
fjsferreira said:
It's in Aurora's thread, search posts by Dzo, it's 3.0.8 v2...
Sent from my U8800
Click to expand...
Click to collapse
so there is a Zip that we can flash?
what are the adventages of this kernel?
Sent from my U8800 using XDA
Great stuff, thanks heaps for this. Finally understand how to compile kernels for this phone now.
levibuko said:
so there is a Zip that we can flash?
what are the adventages of this kernel?
Sent from my U8800 using XDA
Click to expand...
Click to collapse
Yes, Dzo posted the zip already. I suggest you search Aurora's thread and read about what 3,0 kernel does... 1 hint: you'll be amazed
Sent from my U8800
Matoxas said:
whats about pro?
Click to expand...
Click to collapse
just want to explain about the pro version. every kernel needs a defconfig, it's like a configuration while compiling a kernel. but, the pro version have a different defconfig so you must pull it first, the file is /proc/config.gz
about the source, we all know the kernel source of .35 kernel for u8800 and pro version are the same but the defconfig is different. so as fjsferreira said, this source isn't compatible for pro version. unless someone port the 3.0.8 source into the pro version. i don't know how to port the kernel, i just want to tell you what is needed to build a kernel
sorry for my bad english
fjsferreira said:
Yes, Dzo posted the zip already. I suggest you search Aurora's thread and read about what 3,0 kernel does... 1 hint: you'll be amazed
Sent from my U8800
Click to expand...
Click to collapse
i searched for a half hour but didnt find sth....
edit: found the zip
Sent from my U8800 using XDA
levibuko said:
i searched for a half hour but didnt find sth....
edit: found the zip
Sent from my U8800 using XDA
Click to expand...
Click to collapse
Make sure to use v2 with fixed USB storage...
Sent from my U8800
Here, kernel from today, changelog is "Make button backlight even brighter", pretty self explanatory... Again, don't go to aurora thread posting bugs regarding this kernel as it wasn't an "official" dzo release, please...
fjsferreira said:
Here, kernel from today, changelog is "Make button backlight even brighter", pretty self explanatory... Again, don't go to aurora thread posting bugs regarding this kernel as it wasn't an "official" dzo release, please...
Click to expand...
Click to collapse
Should we put this boot.img file while on pink screen.
I read the first page.But i can't see that ,where is the place of boot.img.
Sorry about this silly question
Thank you fjsferreira.
Mr.Moriarty said:
Should we put this boot.img file while on pink screen.
I read the first page.But i can't see that ,where is the place of boot.img.
Sorry about this silly question
Thank you fjsferreira.
Click to expand...
Click to collapse
Yes, if you have usb storage access in pink mode, you can put it in the "image" folder, or you can copy it directly with root explorer to ./cust_backup/image/ and then reboot. If you can't see that folder with root explorer, go to options and make sure it's set to show invisible files. It's in the root of filesystem, where /system/ and /etc/ folders are with all the others
Of course, in both cases, replace the original boot.img.
i have tryed the new kernel "Make button backlight even brighter" and the lights to turn on must change to autobright, but backlight are brighter...

[HOW-TO / VIDEO / WIN-LIN-OSX] Extract System/Data files directly from a FTF

Good morning family!
It's my very first time posting in this subforum, but I think this tutorial was actually something needed, since all threads everyone can found while Googling are quite old (like, from the Xperia S times ), and also I'm quite tired of infinite threads like this and this, so...
Today I bring you an extensive and unified guide on how to extract ANY SYSTEM FILE from a FlashTool's Firmware (FTF), whether it's from the userdata.sin or from the system.sin.
Since this is going to be a guide for all OSes, there are some programs you'll need in general,
Latest version available of FlashTools (for SIN dumping purposes).
A reader tool for the extracted image, which can be:
An EXT4 reader / mounter.
An Unyaffs2, if you're using this guide for an old device (like the already mentioned Xperia S, and older).
Some cups of coffee, and lots of patience [IMPORTANT].
But, some of them will be platform specific, so the thread will split in:
2nd post: WINDOWS
3rd post: LINUX
4th post: OSX
Here you've a video tutorial showing the whole process for the 3 OSes:
If you're enjoying it, don't forget to press Thanks button and rate this thread!​
WINDOWS GUIDE
Step 1 - Extract the SIN we need
Using your favourite archive manager (WinRAR, 7-Zip, etc), open the FTF you want to extract the files from. (FYI: an FTF is just a Zip file with renamed extension)
Now copy/extract the SIN you want to unpack to a folder of your preference.
Step 2 - Dump the SIN
I'll take into account you already had installed Flashtools and Java JRE, in which case I highly encourage you to update both to the latest version available.
Now, open Flashtools. Click on Tools, Sin Editor. Hit the [...] and locate the SIN you previously extracted. Now, hit the [Extract Data] button. After a couple of minutes the bar should start running.
Once finished, you can have 2 kind of files: a .yaffs2 or a .ext4/.ext3/.ext2 file, which require different procedures on how to see it's contents.
Step 3.a - Convert the file to a readable format - UnYaffs2
If the file you get is a .yaffs2 format file, you're going to need to extract it. For doing so, you need this tool, which contains a executable and a cygwin dll.
Extract this .rar contents to the very same folder where you placed the SIN, and thus, where the .yaffs2 is located.
Now, while you're in that folder press the shift key in your keyboard, and while you keep pressing it, right click on a blank space in that folder. In the menu choose Open a Command Prompt here.
To end the proccess, type
Code:
unyaffs2.exe [COLOR="DarkOrchid"]<the-name-of-the-yaffs2>[/COLOR]
Where <the-name-of-the-yaffs2> you must type the file name of the yaffs2 (e.g. system.yaffs2)
The files will get extracted and you'll be able to pick the ones you need.
Step 3.b - Mount the image - Linux Reader
There're many many tools to mount a EXT format image in Windows, but in this case, I'll use the Diskinternals Linux Reader, since it's free and it's compatible with all 3 possible formats you can encounter: .ext4/.ext3/.ext2.
Download it from here and install it. (It must be this version, since newer ones are broken.)
Once done, you should be perfectly able to double-click-to-mount the EXT file Flashtools generated without any trouble.
LINUX GUIDE
Step 1 - Extract the SIN we need
Using your favourite archive manager (Ark, Peazip, etc), open the FTF you want to extract the files from. (FYI: an FTF is just a Zip file with renamed extension)
Now copy/extract the SIN you want to unpack to a folder of your preference.
Step 2 - Dump the SIN
I'll take into account you already had installed Flashtools and Java JRE, in which case I highly encourage you to update both to the latest version available.
Now, open Flashtools. Click on Tools, Sin Editor. Hit the [...] and locate the SIN you previously extracted. Now, hit the [Extract Data] button. After a couple of minutes the bar should start running.
Once finished, you can have 2 kind of files: a .yaffs2 or a .ext4/.ext3/.ext2 file, which require different procedures on how to see it's contents.
Step 3.a - Convert the file to a readable format - UnYaffs2
If the file you get is a .yaffs2 format file, you're going to need an extra tool to extract it. For doing so, you are going to need the unyaffs2 tool.
You can download a pre-compiled binary from here, or you can compile your own using GCC with the source code, the header and the code below inside a Terminal (Ctrl+Alt+T to open it).
Code:
gcc -o unyaffs unyaffs.c
Once you've a working UnYaffs2 binary, just copy it to the very same folder where you placed the SIN, and thus, where the .yaffs2 is located, and type in a Terminal (Ctrl+Alt+T to open it).
Code:
cd [COLOR="DarkOrchid"]<file-route-of-the-sin>[/COLOR]
./unyaffs2 [COLOR="Blue"]<the-name-of-the-yaffs2>[/COLOR]
Where <file-route-of-the-sin> is where the SIN was located, and where <the-name-of-the-yaffs2> you must type the file name of the yaffs2 (e.g. system.yaffs2)
The files will get extracted and you'll be able to pick the ones you need.
Step 3.b - Mount the image
Since we're already in Linux, mounting a EXT image is not that hard. Just mount it using this commands in a Terminal (Ctrl+Alt+T to open it).
Code:
cd [COLOR="DarkOrchid"]<file-route-of-the-sin>[/COLOR]
mkdir android
sudo mount -t ext[color="RED"]*[/color] -o loop <name-of-the-image> android/
Where <file-route-of-the-sin> is where the SIN was located, where <the-name-of-the-image> you must type the file name of the ext image (e.g. system.ext4), and finally, where ext*, replace * with the version number of the EXT image you're mounting, usually, ext4
Now, once finished, to unmount it, type in a Terminal.
Code:
sudo umount android
rm -fr android
OSX GUIDE
Step 1 - Extract the SIN we need
Using your favourite archive manager (UnRarX, ZipEg, etc), open the FTF you want to extract the files from. (FYI: an FTF is just a Zip file with renamed extension)
Now copy/extract the SIN you want to unpack to a folder of your preference.
Step 2 - Dump the SIN
I'll take into account you already had installed Flashtools and Java JRE, in which case I highly encourage you to update both to the latest version available.
Now, open Flashtools. Click on Tools, Sin Editor. Hit the [...] and locate the SIN you previously extracted. Now, hit the [Extract Data] button. After a couple of minutes the bar should start running.
Once finished, you can have 2 kind of files: a .yaffs2 or a .ext4/.ext3/.ext2 file, which require different procedures on how to see it's contents.
Step 3.a - Convert the file to a readable format - UnYaffs2
If the file you get is a .yaffs2 format file, you're going to need an extra tool to extract it. For doing so, you are going to need the unyaffs2 tool.
You can download a pre-compiled binary from here, or you can install your own using Brew. From a Terminal (Command+Space, then type in Terminal) type the following commands.
Code:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null #This is just to Install Brew for the first time. If you already have it, it's not needed.
brew install unyaffs
If you chose using the UnYaffs2 binary, copy it to the very same folder where you placed the SIN, and thus, where the .yaffs2 is located.
If you chose the Brew installation, just continue.
Now, type in a Terminal (Command+Space, then type in Terminal).
Code:
cd [COLOR="DarkOrchid"]<file-route-of-the-sin>[/COLOR]
unyaffs2 [COLOR="Blue"]<the-name-of-the-yaffs2>[/COLOR]
Where <file-route-of-the-sin> is where the SIN was located, and thus, where the yaffs2 file is located; and where <the-name-of-the-yaffs2> you must type the file name of the yaffs2 (e.g. system.yaffs2)
The files will get extracted and you'll be able to pick the ones you need.
Step 3.b - Mount the image - Ext4FUSE
There're many many tools to mount a EXT format image in OSX, but in this case, since we don't need RW access, but just RO, I'll use ext4fuse, since it's free and it's more than compatible with our needs.
To install it you'll need Brew. To get things ready, type the following commands in a Terminal (Command+Space, then type in Terminal).
Code:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null #This is just to Install Brew for the first time. If you already have it, it's not needed.
brew tap homebrew/fuse
brew install Caskroom/cask/osxfuse
brew install ext4fuse
If you're on OSX Yosemite, El Capitan, or Leopard, you may need an extra command to add yourself to the Operator group, so that you can have readonly permissions to the disks.
Use it only if you get an error while trying to access the mounted EXT image later.
Code:
sudo dscl . append /Groups/operator GroupMembership [COLOR="red"]<your-user>[/COLOR]
Where your user <your-user> is your username.
Now, to mount the ext4 image, type in a Terminal (Command+Space, then type in Terminal).
Code:
mkdir android
ext4fuse [COLOR="DarkOrchid"]<path-to-the-ext4-image>[/COLOR] android
Where <path-to-the-ext4-image> you must type in the full path where the SIN was located, and thus, where the EXT4 image is located.
Use this as reference.
Reserved
In case I need it
Great job! Keep up the good work!!
Well. great guide.
Just a note, Microsoft officially released Bash on Ubuntu on Windows yesterday. Try it. It's a full fledged Linux subsystem but unfortunately only available to Windows Insiders. It would be the best alternate to cygwin.
Boot.img
How can i extract the boot.img
or is this applicable to every single .sin file present in the .ftf file
serajr said:
Great job! Keep up the good work!!
Click to expand...
Click to collapse
Thank you, I appreciate your words
mfbcool said:
Well. great guide.
Just a note, Microsoft officially released Bash on Ubuntu on Windows yesterday. Try it. It's a full fledged Linux subsystem but unfortunately only available to Windows Insiders. It would be the best alternate to cygwin.
Click to expand...
Click to collapse
I know, I saw the demonstration in the //build/, but since it hasn't been released for all yet (I guess it'll be for Redstone 2?), I didn't saw it necessary to be included.
sandeep.sethi said:
How can i extract the boot.img
or is this applicable to every single .sin file present in the .ftf file
Click to expand...
Click to collapse
No, this is only applicable for system.sin, userdata.sin, cache.sin and probably modem.sin.
However, if many of you request it, I could try making another for the kernel (boot.img)... But remember, every device doesn't have the same way/method to unpack the kernel, so making a generic tutorial for all wouldn't be possible
No, this is only applicable for system.sin, userdata.sin, cache.sin and probably modem.sin.
However, if many of you request it, I could try making another for the kernel (boot.img)... But remember, every device doesn't have the same way/method to unpack the kernel, so making a generic tutorial for all wouldn't be possible
Click to expand...
Click to collapse
if u can provide the guide it would be very helpful :fingers-crossed: :fingers-crossed:
This thread got featured in XDA Portal, thank you guys!
I tried extracting Xperia Pro's system SIN (can't remember the exact name but the one with the largest file size) using the latest version of Flashtool but wasn't successful. Like it's not supported yet.

[ROM][COMPILING][HELP]LMX210ULMA K8+ custom rom and kernel Q&A

I am in no way resposible for any negative effects to your device by trying any of this for yourself. Including bricking your device, divorce, nuclear meltdown, zombie apocalypse or any other malfeasance. Try at your own risk.
Hi guys
Im still a jr member here and learning but ive rooted a few phones and ported a twrp and now I want to build a custom kernel and ROM for my new phone the K8+ 2018 LMX210ULMA. I plan to do this all from the phone im building the ROM for using termux and Anlinux to install Ubuntu and all the proper build essentials. So lets get started!!!
First i have some questions and then ill note where i am in my project. Ive actually been working on this for a while using this and that thread but i have some questions i have never been able to find answers to. Like.......
1. Does the kernel source code need to be unpacked in the same folder as the device source code?
2. How can i build seperate modules like bootloader or recovery or anything else.
3. Is there a way for some one who has a locked network carrier device to build a kernel that is unlocked.
4. How do you find device, vendor and kernel trees for a device that hasnt been publicly built yet?
5. When installing dependency libraries to ubuntu what do i do when Ubuntu is unable to locate a package. For examle: lib32ncurses5-dev lib32z-dev and lib32esd1.0-dev
Ok now lets get to setting up the envrinonment or at least what i have so far.
A rooted phone is needed to get the job done as far as far as i know so you might want to work on that first. My particular phone variant doesnt seem to have a recovery option just yet due to some bit of hiding of hiding the fastboot mode but im hoping by compiling a custom ROM and Kernel i can alleviate that and help myself and all the other good folks that want to fully root thier phone and also learn to make thier own custom ROM.
So far im rooted using a temp root that utilizes an exploit called mtk-su. It gives basic root privilages and allowed me to make a couple changes to my build prop like adoptable storage and allow some changes here and there with out upsetting the system partition to much.
You will need adoptable storage storage for this to work as repo will need to unload ton of source code to your device so 32+ gigs of internal storage will be needed.
Im not going to go into the specifics of the two forementiined needs but a quick search should point you in the right direction and get you going.
1. Install termux and installed the basic packages in the welcome plus:
Code:
pkg install libandroid-support libandroid-support-static libandroid-shmem libandroid-shmem-static libusb libusb-static libccid
2. Install Anlinux and follow the instructions to build Ubuntu within the termux environment. Make sure to do it as root which is essential for this to work correctly.
3. Install a vnc viewer. I dont really use it. It would be nice to have a way to use a web browser with in it but so far no go.
4. Once you have Ubuntu built and started its time to install more dependecies. Yay!
Code:
apt-get install sudo
Code:
sudo apt-get install software-properties-common
Code:
sudo apt-get install bison build-essential curl ccache flex libncurses5-dev libsdl1.2-dev libxml2 libxml2-utils lzop pngcrush schedtool squashfs-tools xsltproc zip zlib1g-dev git-core make android-sdk gperf openjdk-8-jdk -y
So far i have been able to install all but 3 of the dependecies needed. Lib32ncurses5-dev lib32z1-dev and lib32esd0-dev any one knowing a work around or way to locate and install them please for the love of android speak up.
5. Now lets do some more setting up the build environment with repo. I have tp say repo is a pretty cool tool here but it has its problems. First the repo init command is sketchy and doesnt always work. I had a hard time with it at first. Second even though you tell it which manifest exactly you want to download it will download others as well and draw source code from every other build. This is a problem as it downloads every pre-built toolchain in the repisitory and almost every android repository in existance. They talk about the source code from repo taking up so much space well that is exactly why. Ive been compiling in C++ for years and i have never seen such a mess. But so be it. Maybe the android gods will straighten it out someday and make it easier and consume less space by only downloading the appropriate source code needed by your specific build.
This is the end of this post so i have to finish up on the next BRB
Ok im back. Hows going androids? I am not a robot! But a few of my friends might disagree with statement.
I left off and we were about to finish up the build environment and get repo started so lets do that and i will tell you about the first big snag in the project next to not being able to find those three dependency libraries stated above.
Here we go first we create a new bin folder just for compiling android in the HOME folder of your ubuntu operating system then we set its path, download the repo launcher and set up our scripts.
By the way i probably should have mentioned this earlier but i assume every body at this point has some command line experience and should know that you copy these comnands and paste them one at a time. Please do not copy a whole code block at one time and paste it to your terminal or your gonna have a bad time like when you pizza when you are supposed to french fry.
Code:
mkdir ~/bin
PATH=~/bin:$PATH
cd ~/bin
curl
i can't help you much but i hope you won't brick your device. it would be easier for Mediatek there you can always restore from SP Flash Tool. for Qualcomm your only chance is to put it into EDL mode/ Qualcomm HS-USB QDLoader 9008 Driver with test point and flash with QPST/ LGUP. I recommend to figure out how to unbrick before you start flashing lk
also maybe helpful this link for understanding boot chain
http://www.lieberbiber.de/2015/07/05/mediatek-details-little-kernel
Any body know why i when i try to finish my lil tutorial here i cant do any more code blocks?
it's a bug in forum. i can't even post ls -l
i don't know much about compiling but i would scan lk.bin for strings containing oem fastboot commands (if they still left somewhere), and then scan the whole source code for respective strings in order to find the required build tree
Um well the problem is that im not familiar with the source code components and there are soooooooo
many components and lil info and no common place so far but here to ask questions and where do i start my questions.
Like what is the bootloader source code called. I guess i could load it up in android studio and do a search of all strings that way.
Right now im trying to grasp why all of a sudden 3 lmx210 variants known to be easily bl unlockable are now not. Lg is pkaying dumb or thier drones arent equipped with the proper knowledge
idk download from opensource.lge.com and search for fastboot
Code:
grep -ir fastboot .
kernel-3.18/arch/arm/boot/compressed/sdhi-shmobile.c
kernel-3.18/arch/parisc/kernel/process.c
kernel-3.18/drivers/gpu/drm/i915/i915_params.c
kernel-3.18/drivers/gpu/drm/i915/intel_display.c
kernel-3.18/drivers/gpu/drm/i915/intel_fbdev.c
kernel-3.18/drivers/mfd/si476x-cmd.c
kernel-3.18/drivers/misc/mediatek/usb2jtag/Kconfig
kernel-3.18/drivers/net/ethernet/broadcom/tg3.c
kernel-3.18/include/linux/mfd/si476x-platform.h
btw why don't you cross-compile on linux machine, this would be probably easier as it seems it is well documented.
if one can help you re-enable fastboot in lk then its member @xyz`
Ok i want to do an experimental kernel build for my Alcatel tetra to try some things i hope to implement into my lmx210 build.
Can someone help me figure out to add a few of these options...'
Overclocked cpu or adjustable clock speed
Devtmpfs so i can fastboot other phones
power enabled otg
Loop device
Also which android kernel source should i download. Upstream or experimental or what. I just know i need a 4.4 + kernel
Alexcs.... Its an experimental issue with compiling on phone to see if there is a way to configure the system to allow for every thing needed to be able to do so. I cant always get to my pc and dont always have the option to dual boot or ubuntu. Some folks may not have access at all or only enough time to flash thier phone.
In this case the person compiling could build thier rom on thier device then take it and flash it when they can get to a pc
Ok i need some help here. pleeeeeeeaaaassee
i have been trying to compile a kernel for the Aristo 2 LMX210MA for three days and im about to lose it. My steps this far....
install ubuntu 18 on aristo 2
mkdir -p ~/kernel
cd ~/kernel
copied kernel source from storage and tar xvzf'd it
read the read me file for instruction and to get the name of the prebuilt tool chain. downloaded the toolchain and copied it to the /kernel/msm-3.18/android folder in ubuntu fs and tar xvzf`d it there as per read me file. made a few tweaks to the defconfig file. i wanted to build a devtmpfs and have full fs control over otg devices.
now i run these commands from msm-3.18 folder.........
mkdir -p out
make ARCH=arm O=./out cv1_lao_com-perf_defconfig
every thing goes fine til i run the next command and then it says no such file or directory for the androideabi-gcc file that is clearly in the tool chain and in the right place. and yes i set my path right i yell at the compiler on my phone.
make ARCH=arm O=./out CROSS_COMPILE=$(pwd)/root/kernel/kernel/msm-3.18/android/arm-linux-androideabi-4.9/bin/arm-linux-androideabi- KERNEL_COMPRESSION_SUFFIX=gz -j4
hello is there any one there. Any one at all
Ok i have been trying to compile a rom for months and i cant seem to get any where. I get errors about a freaking gcc wrapper and i have followed the advice i have seen on comoiling rom threads but i still get the errors. Its either that or the toolchains are crap.
Also have a question about compiling lg source code. When all is said and over with will it finish up as a kdz file? Im thinking it has too since thats the only way to flash thier firmware because they are locking up possibilities to unlock the bootloader.
I managed to compile my first kernel tonight. i know the zimage is the one i pack into my spkit image folder but dont know which of the split images to repkace
Ok i think it would be the only one in split image that matches the file type of zimage. I repacked it and flashed it via fast boot but both the repacked and magisk-patched.img return to fastboot upon booting
I wonder what could have gone wrong. The only things i changed were the config_mausb otg hotplug abd devtmpfs
Something i learned from reading the .config file in the out directory after doing the defconfig is that unless you compile your kernel on a pc first and remove a config there is no way to build android or a kernel on your device. Which explains months of aggravation and wonder. Yea they prohibit it but you can change the value and then do as you please

Categories

Resources