[KERNEL][WIP]Auto-build kernel vainilla. - Samsung Galaxy SL i9003

KERNEL i9003
Version 2.6.35.7 under construction
I created a github with the kernel vainilla(Samsung-sources1).I added a script for easy creation and self-packaged in a tar (ODIN).
github url --->https://github.com/vurrut/kernel_i9003
Requirements:
Ubuntu 10.04 or higher
Build intructions:
Get source intructions(in terminal):
Code:
wget [url]http://dl.dropbox.com/u/962863/gbuild.sh[/url]
sudo chmod 0777 gbuild.sh
./gbuild.sh
Alternate metod:
Code:
mkdir ~/kernel_i9003
cd ~/kernel_i9003
sudo apt-get install git git-core
git clone git://github.com/vurrut/kernel_i9003.git
./build.sh
important! no change de directory (kernel_i9003)
Output
In out folder:
-GT-I9003_PDA.tar (flash with ODIN)
For subsequent builds:
Code:
cd ~/kernel_i9003
./build.sh
Info:
In the "out-folder" ramdisk directory is located(this is based on KPM, if you want you can change it to another version)
In this directory you can add app,su binary,recovery, busybox...
I hope your suggestions for improvements.
If anyone is interested, Pm me to give permission in github.
__________________
My devices:
Samsung galaxy s i9003-->stock KPM
Htc Hero-->CyanogenMOD 7.1.0
Advent Vega--Vegacomb 3.2 by Teamnewco
SmartQ V7--->in a box
Follow me on twitter @ivan_calvo
If you like my works press the THANKS button.

Change log:
initial(10/11/2011):
-Create build.sh
-added toolchain arm-eabi-4.4.0
-adeed script with mkbootimg(Create image tar in out folder)
-added kpm ramdisk to mkbootimg

Where I can find the 4 files you've mentioned in the second post?
EDIT: Ok I've found them

Nice work buddy

Great work, welcome to our family.
Sent from my GT-I9003 using Tapatalk

since u made some changes over the one u posted on facebook.....do i have to sync again?(low bandhwith!)
here is a error
Code:
[email protected]:~/kernel_i9003# wget http://dl.dropbox.com/u/962863/gbuild.sh
--2011-11-11 13:58:45-- http://dl.dropbox.com/u/962863/gbuild.sh
Resolving dl.dropbox.com...
184.73.223.62, 107.20.151.179, 107.20.230.29, ...
Connecting to dl.dropbox.com|184.73.223.62|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 177 [text/x-sh]
Saving to: `gbuild.sh'
100%[======================================>] 177 --.-K/s in 0s
2011-11-11 13:58:46 (8.28 MB/s) - `gbuild.sh' saved [177/177]
[email protected]:~/kernel_i9003# ./gbuild.sh
bash: ./gbuild.sh: Permission denied
[email protected]:~/kernel_i9003#

[email protected]:~/kernel_i9003# ./gbuild.sh
bash: ./gbuild.sh: Permission denied
sudo chmod 0777 gbuild.sh ---I forget!!

vurrut said:
[email protected]:~/kernel_i9003# ./gbuild.sh
bash: ./gbuild.sh: Permission denied
sudo chmod 0777 gbuild.sh ---I forget!!
Click to expand...
Click to collapse
I get this message.
[email protected]:~$ cd samkern
[email protected]:~/samkern$ wget http://dl.dropbox.com/u/962863/gbuild.sh
--2011-11-11 15:22:20-- http://dl.dropbox.com/u/962863/gbuild.sh
Resolving dl.dropbox.com... failed: Name or service not known.
wget: unable to resolve host address `dl.dropbox.com'
[email protected]:~/samkern$

ganeshbiyer said:
I get this message.
[email protected]:~$ cd samkern
[email protected]:~/samkern$ wget http://dl.dropbox.com/u/962863/gbuild.sh
--2011-11-11 15:22:20-- http://dl.dropbox.com/u/962863/gbuild.sh
Resolving dl.dropbox.com... failed: Name or service not known.
wget: unable to resolve host address `dl.dropbox.com'
[email protected]:~/samkern$
Click to expand...
Click to collapse
did u first clone the repo?

mmm.work to me!
i pos a alternate metod, gbuild is a simply script.
[email protected]:~$ wget http://dl.dropbox.com/u/962863/gbuild.sh
--2011-11-11 10:41:55-- http://dl.dropbox.com/u/962863/gbuild.sh
Resolviendo dl.dropbox.com... 107.20.170.126, 107.22.243.22, 50.16.185.216, ...
Conectando a dl.dropbox.com|107.20.170.126|:80... conectado.
Petición HTTP enviada, esperando respuesta... 200 OK
Longitud: 177 [text/x-sh]
Guardando en: «gbuild.sh»
100%[======================================>] 177 --.-K/s en 0s
2011-11-11 10:41:55 (13,6 MB/s) - «gbuild.sh» guardado [177/177]

sakindia123 said:
did u first clone the repo?
Click to expand...
Click to collapse
Yes I Have.
What does this
wget http://dl.dropbox.com/u/962863/gbuild.sh
do.

ganeshbiyer said:
Yes I Have.
What does this
wget http://dl.dropbox.com/u/962863/gbuild.sh
do.
Click to expand...
Click to collapse
it will clone the script to ur machine....dont forget to place it in /blah/blah/kernel_i9003 !

ganeshbiyer said:
Yes I Have.
What does this
wget http://dl.dropbox.com/u/962863/gbuild.sh
do.
Click to expand...
Click to collapse
gbuild.sh is a simply script with this:
Code:
#!/bin/bash
mkdir ~/kernel_i9003
cd ~/kernel_i9003
sudo apt-get install git git-core
git clone git://github.com/vurrut/kernel_i9003.git
./build.sh
to simplify things! but I have not done it!

ganeshbiyer said:
Yes I Have.
What does this
wget http://dl.dropbox.com/u/962863/gbuild.sh
do.
Click to expand...
Click to collapse
u don't know these commands ? wget [ur url here] will download the file on ur machine

simmer14 said:
u don't know these commands ? wget [ur url here] will download the file on ur machine
Click to expand...
Click to collapse
I know what this command is supposed to do.
U should see my earlier post before u write

ganeshbiyer said:
I know what this command is supposed to do.
U should see my earlier post before u write
Click to expand...
Click to collapse
ohh u did'nt saw the 2nd page but just by looking at your post i thought that u don't know what that command is used for
anyways no hard feelings bro

some suggestionsafter wip is removed!)
1)Replace kpm ramdisk with kpn
2)i forgot!
Also,while compiling zImage,there were quite a few errors...hopefully u will look into those

u might actually want to add latest modules which are compiled...
and if u want to use older modules atleast correct the CONFIG_LOCALVERSION to match the vermagic string for modules else modules wont be loaded and device might fail to boot...
also such scripts are only useful if u have confirmed that there was no issue while compiling...
initially u should just compile to check if there are any issues...
>>>
cp $HOME/kernel_i9003/out/config_old $HOME/kernel_i9003/.config
<<<
thats not the "correct" way...
u should use:
make device_defconfig
another thing:
>>>
echo ' Compile kernel'
make
<<<
this is going to be so slow... use atleast -j4 on single core machine.... on my dual core i3 i use -j8
also we generally dont put such stuff in kernel source folder...
generally we keep:
kernel/
out/
toolchains/
another tip: use toolchains from CM repo, both 4.4.0 & 4.4.3 work
P.S.: ur boot.img build script is copied from Skin's script... atleast keep the original "credits" intact

CAN SOMEONE teach me how to un-cpio the zImage?i tried the script available @xda wiki but it doesnt work!!
plz help

sakindia123 said:
CAN SOMEONE teach me how to un-cpio the zImage?i tried the script available @xda wiki but it doesnt work!!
plz help
Click to expand...
Click to collapse
the zImage is compressed kernel... u cant get anything out of it...
u can however get ramdisk (initramfs) [which is (generally) cpio.gz file] out of boot.img
find unpack-bootimg.pl on xda

Related

[Guide] - How to compile the CDMA kernel source and Flash it to your phone (Updated)

You should do a nandroid backup and reboot your phone before trying to flash anything to your phone. This how to involves flashing directly to mtd2, if you don't know what you are doing then please use one of the custom roms available in the Sticky Wiki.
#### Update One Fixed scripts
#### Update Two Added instructions to compile and install the wlan.ko module
#### Update Three Fixed get-CDMAHero-source.sh typo
#### Update Four Added Instructions for Jaunty repo's for Ubunut 9.10
First off i would like to give credit to all the people who have made information and scripts available. I used bits and peices of info and tools written by and or made available by these people.
Armin Coralic http://blog.coralic.nl for creating some nice scripts and making them available
chuckhriczko for helping me out in the middle of the night.
LoxDev for creating a wonderfull how to about creating img's and zip's
tkirkton for helping out with enabling legacy jaunty repos to install java 1.5
Second I am writing this How To, so a complete newbie would be able to understand.
REQUIREMENTS....
Ubuntu Desktop 9.04 or better 32bit (cause thats what i used)
Android SDK (Needed to push and pull files as well as shell access to the phone. You will need to set this up by following the instructions found at http://www.android.com)
Legacy repo's enabled in apt to allow java 1.5 to install
Root access. I ran all commands below as root
I created a dir called "heroc" in my /root directory.
Download zip file below and unzip it in the heroc dir that you should have created.
STEPS
.5 Enable Legacy Repo's to allow java 1.5 to install (below is a cut from tkirktons post on page 7)
Code:
in Ubuntu 9.10, the Java 1.5 package doesn't even list. Here's what I had to do to get it to load:
1. Access a repository from the previous build (9.04 Jaunty will work: commands to put into /etc/apt/sources.list -
deb [URL]http://mirrors.us.kernel.org/ubuntu[/URL] jaunty main restricted universe multiverse
deb [URL]http://mirrors.us.kernel.org/ubuntu[/URL] jaunty-backports main restricted universe multiverse
deb [URL]http://mirrors.us.kernel.org/ubuntu[/URL] jaunty-security main restricted universe multiverse
deb [URL]http://mirrors.us.kernel.org/ubuntu[/URL] jaunty-updates main restricted universe multiverse
2. Set the max age higher than the default. This can be accomplished by editing the /etc/apt/apt.conf.d/20archive. Here's what my lines in that file look like:
APT::Archives:MaxAge "2880";
APT::Archives:MinAge "2";
APT::Archives:MaxSize "1000";
Making these two changes should work...although I have the Intrepid, Hardy and Dapper repositories in mine as well (didn't know which one would work, so I overkilled it).
Run the script again after making the changes and let me know if it works.
.
to update just run
Code:
# apt-get update
1. Create your work environment by running createandroidRepo.sh. This will take some time depending on your internet connection. Make sure you are in the heroc dir.
Code:
# unzip Scripts.zip
# chmod a+x *
# ./createAndroidRepo.sh
This will create a dir call my android and setup all the files and programs needed to compile the kernel. This will take some time to complete.
2. You need to download the source using the get-CDMAHero-source.sh
Code:
# ./get-CDMAHero-source.sh
This will download the source, and extract it to its own directory.
3. you will need to have your .config file handy for the next steps. If you don't have it then you will need to get it by doing the following
Code:
# adb pull /proc/config.gz /root/heroc/config.gz
# gunzip config.gz
The first command will pull the gzipped config from your phone and place it into the heroc dir. the second command will extract the file as "config"
4. This is where it gets fun. We now have everything downloaded and are going to start the process of compiling our kernel.
Code:
# cd heroc_ef05d31a
# export ARCH=arm
# export CROSS_COMPILE=arm-eabi-
# export PATH=$PATH:~/heroc/myandroid/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin
# make menuconfig
After you run "make menuconfig" it will bring up a the config menu for our kernel. Go to the bottom and select "Load an alternate configuration file". It will then prompt you to select the config file you want to use. You will need to point it to where you have the config file. So type in "/root/heroc/config"
After you have loaded the config file you can edit what ever you want. however if you don't know what do disable or enable then i wouldn't mess around to much.
Next you will need to save your config file. Choose "Save an alternate configuration file", and save it as "/root/heroc/heroc_ef05d31a/.config"
You can now exit menuconfig
5. Time To Compile the kernel and wlan.ko module
Code:
# make
# export KERNEL_DIR=/root/heroc/heroc_ef05d31a/
# cd myandroid/system/wlan/ti/sta_dk_4_0_4_32/
# make
The kernel will take some time. go grab a drink and have a snack. If all goes well you should end up with a zImage file in "~/heroc//arch/arm/boot/". After the kernel is compiled you need to compile the wlan.ko module by executing the last three commands
6. Next we need to copy the zImage back to the heroc dir
Code:
# cp /root/heroc/heroc_ef05d31a/arch/arm/boot/zImage /root/heroc/zImage
7. Ok so now we need to get the boot image from our phone. We need this cause it has more than just the kernel. I contains the ramdisk image as well. and we need to take the boot image and decompress it and remove the old kernel and add our new compiled kernel, then recompress it to newboot.img
Code:
# adb shell
# cat /dev/mtd/mtd2 > /sdcard/mtd2.img
# exit
# adb pull /sdcard/mtd2.img /root/heroc/mtd2.img
# mv mtd2.img boot.img
The first two commands will open a terminal shell to your phone and copy the boot image to your sdcard. the last two commands will pull the the boot image from your phone, place it in your heroc dir and rename the file to boot.img
8. Now we will split apart the boot.img using some scripts.
Code:
# ./extract-kernel.pl boot.img
# ./extract-ramdisk.pl boot.img
# rm boot.img-kernel
# cp zImage boot.img-kernel
# ./mkbootfs boot.img-ramdisk | gzip > ramdisk-boot
# ./mkbootimg --kernel boot.img-kernel --ramdisk ramdisk-boot --cmdline "no_console_suspend=1 console=null" -o newBoot.img --base 0x19200000
The first command extracts the stock kernel from boot.img. The second command extracts the ramdisk from boot.img. The third command will delete the stock kernel. the fourth command renames our zImage to boot.img-kernel. The fifth command takes boot.img-ramdisk folder and zips it up into ramdisk-boot. The sixth comand takes our kernel (renamed to "boot.img-kernel") and ramdisk-boot and combines it back to form a new file called newboot.img.
9. Now we need to flash our "newboot.img" file to our phone. You should reboot your phone before flashing this will insure that you don't get any out of memory errors and will keep your phone from booting into fastboot (Thx Obelisk79).
Code:
# adb push newBoot.img /sdcard/newBoot.img
# adb shell
# cat /dev/zero > /dev/mtd/mtd2 (you may get an error here. don't worry about it)
# flash_image boot /sdcard/newBoot.img
# reboot
The first command will push your boot image to the phone. the second command will bring up shell access to your phone. the third command will zero out mtd2 and get it ready to write your image. the fourth command will flash boot(mtd2) with newboot.img. the last command will reboot your phone
10. After the phone reboots we need to get the wlan.ko file to the phone so that wireless will work
Code:
# adb push /root/myandroid/system/wlan/ti/sta_dk_4_0_4_32/wlan.ko /sdcard/wlan.ko
# adb shell
# mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
# cp /sdcard/wlan.ko /system/lib/modules/wlan.ko
# exit
Now you have a kernel that you compiles with everything work with the exception of power mgmt.
Just as soon as i figure out how to make an update.zip i will post instructions on how to do this
Added it to the CDMA Hero Guides wiki article.
gu1dry said:
Added it to the CDMA Hero Guides wiki article.
Click to expand...
Click to collapse
dang you beat me to it.
Not sure why, but had to run dos2unix on the the first script, not sure if it is all of them, but it was giving me the error
/bin/bash^M: bad interpreter: No such file or directory
Click to expand...
Click to collapse
dos2unix took care of the issue. Also Thanks for the guide, greatly appreciated!!!
make sure you run the script with the "./" , also you may need to chmod +x the files.
Is there a way to get this to run on the Emulator? I tried to specify the zImage after I compiled it but it won't boot when specifying it. Or will that not work for the HTC zImage?
Excellent guide. Can't wait to try it.
blehzz said:
Is there a way to get this to run on the Emulator? I tried to specify the zImage after I compiled it but it won't boot when specifying it. Or will that not work for the HTC zImage?
Click to expand...
Click to collapse
Check out this link
Check out this link
Click to expand...
Click to collapse
Thanks will have a look. Seems to be the Android kernel and not the HTC kernel though, but will read further into it
blehzz said:
Thanks will have a look. Seems to be the Android kernel and not the HTC kernel though, but will read further into it
Click to expand...
Click to collapse
not sure but i think this will work for you
Code:
# emulator -kernel /path/to/your/zImage
First script didn't work for me on ubuntu. Copying and pasting line by line works.
i'll repack the scripts again
not sure but i think this will work for you
Click to expand...
Click to collapse
that's what i tried... emulator never runs when i specify that zImage it built successfully.
Has anybody tried this yet with Ubuntu running under VMware on a PC running Windows? I know that (in theory) VMware's USB compatibility is spectacularly good (it somehow manages to give the guest OS direct ownership and control of the host PC's USB root hub), but up to now I've only tried it to run XP/32 under Vista/64 and Windows 7/64.
FYI, you can download VMware player for free (as in beer) and use it to run Ubuntu 9.04 with their complete blessing. Just make sure you download a guest OS that configures the hardware (memory, cpu, etc) the way you want it to be, because changing the hardware config is one of the few things you genuinely can't do with the free player. If someone here has the full version (and can find somewhere to host it so the bandwidth charges didn't eat him alive), he could even create an Ubuntu distro that's already set up and configured to build Android kernels for others here to download and use.
To use the first script: open up Synaptics, then download "tofromdos". Now, run "fromdos createAndroidRepo.sh", and it should work then
ROM?
Can someone post how to compile a kernel, and make a ROM, and put it all together in a update.zip? Would be really REALLY nice!
Jason(bikcmp)
Thanks for this guide I'm compiling a kernel right now Just a question, how do I change the kernel version name... like you did in that one screenshot?
bikcmp said:
Can someone post how to compile a kernel, and make a ROM, and put it all together in a update.zip? Would be really REALLY nice!
Jason(bikcmp)
Click to expand...
Click to collapse
Its coming
bikcmp said:
Can someone post how to compile a kernel, and make a ROM, and put it all together in a update.zip? Would be really REALLY nice!
Jason(bikcmp)
Click to expand...
Click to collapse
its in general options in menuconfig.

[HOWTO] Create your own AOSP 100% stock

EDIT: Just updated post 2 you probably want to read both this post and that post before trying to build.
you can skip the part of getting the official source and the cyanogen source by just doing
Code:
repo init -u git://github.com/CyanogenMod/android.git -b froyo
First some prereqs You must be using linux and building for an evo 4G aka htc_supersonic
Install the android SDK as instructed here: http://developer.android.com/sdk/installing.html
You will need JDK most linux distros have this in the respositorys.
Then just follow step 2 and make sure that you can run adb from any directory in terminal.
Now to the good stuff.
You will now need to open a terminal window and run the following as root
Code:
cd /usr/bin/; curl http://android.git.kernel.org/repo > repo; chmod a+x /usr/bin/repo
now as user do the following
Code:
mkdir ~/android
cd ~/andoid
repo init -u git://android.git.kernel.org/platform/manifest.git
repo sync
This can take FOREVER like 4-5 hours so you might want to let it go when you go to sleep.
Depending on how fast your computer is the following step can take a long time too
Code:
cd ~/andoid
make
This will build the source code for a generic device it should build everything correctly if you have all of the compilers and what not. If it fails just install the app that it is complaining about.
Now for the EVO specific stuff
Code:
cd ~/android/device/htc
git clone http://github.com/CyanogenMod/android_device_htc_supersonic.git supersonic
That will get the build files however you are going to have to edit them to get it to work.
~/android/device/htc/supersonic/BoardConfig.mk needs to be edited
Code:
TARGET_RECOVERY_UI_LIB := librecovery_ui_supersonic librecovery_ui_htc
TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_htc
should be
Code:
#TARGET_RECOVERY_UI_LIB := librecovery_ui_supersonic librecovery_ui_htc
#TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_htc
Some other files may have to be edited to your liking. Personaly I changed ADWLauncher to launcher2 and removed all of the cyanogen stuff.
Now to setup the build enviroment.
Code:
cd ~/android
cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_supersonic-eng
Now to do the building.
Code:
make CYANOGEN_WITH_GOOGLE=true otapackage ## if you want google apps (market etc.)
make otapackage ## 100% Open Source only!
By the way for some reason you have to inclued the otapackage even if you just want the .img files because otherwise it crashes at least for me.
Let me know if you encounter any problems and I will try to help.
UPDATES
Copy your ~android folder somewhere and replace ~/android in this tutorial with the directory that you copied it to. This will allow you to update the overlay when needed.
To add google files you will need to do this
Code:
cd ~/android/vendor/cyanogen
./get-google-files
This gets the htc files and I think taht it might be required.
Code:
cd ~/android/device/htc/supersonic
./extract-files.sh
To make a clean rom like mine do the following:
Edit the file ~/android/vendor/cyanogen/products/common.mk to your liking. I just changed the build name and rom version.
I added the files sysrw and sysro ad you can see in the file just put them in a directory and tell it where they are and where you want them. Also I commented out rommanager.apk as I don't like or use it. Also I use RA recovery so it wont work for me anyway.
Also edit the file ~/android/vendor/cyanogen/products/cyanogen_supersonic.mk
I chaged teh build number to the latest spring and removed the boot animation as I like the stock android one better (and it is faster).
YOU NEED TO do this if you want a keyboard...
edit ~/android/vendor/cyanogen/Android.mk and remove LatinIME!
Now we delete some files.
go to ~/android/packages/apps
delete any application that you don't want. You can optionally add program source code that you do want.
I deleted CM* and Protips
I also edited some code in Settings to remove Cyanogen stuff. Actually I took the stock android stuff an edited that with one little fix but I forgot what it was. Just try to build and it will tell you in an error message.
another reserved post
Really cool
Awesome! Thanks so much for posting this.
thanks dude!!
Thanks man.
question...
im having an issue with this step
Code:
cd ~/adnroid
cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_supersonic-eng
specifically (lets ignore the type in the instructions
Code:
$ cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
cp: cannot stat `./vendor/cyanogen/products/cyanogen_supersonic.mk': No such file or directory
$ find ~/android -name "cyanogen_supersonic.mk"
$ echo $?
0
anyone else having this issue?
So what is the difference between this and running CM6?
Will this avoid the market issues with CM6?
Once it's built, how do you get it installed on the phone?
Here is the link to cyanogens wiki how too......
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Supersonic
Anyway to do this on Windows 7? Another question, would this still work if I just ran Ubuntu from disk?
Thanks, will def.ly give this a try soon...
Sent from my PC36100 using Tapatalk
onicrom said:
question...
im having an issue with this step
Code:
cd ~/adnroid
cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
. build/envsetup.sh
lunch cyanogen_supersonic-eng
specifically (lets ignore the type in the instructions
Code:
$ cp ./vendor/cyanogen/products/cyanogen_supersonic.mk ./buildspec.mk
cp: cannot stat `./vendor/cyanogen/products/cyanogen_supersonic.mk': No such file or directory
$ find ~/android -name "cyanogen_supersonic.mk"
$ echo $?
0
anyone else having this issue?
Click to expand...
Click to collapse
there was a typo in my code I edited the post and it should work now.
cteneyck said:
Here is the link to cyanogens wiki how too......
http://wiki.cyanogenmod.com/index.php?title=Compile_CyanogenMod_for_Supersonic
Click to expand...
Click to collapse
So really, this is just CM6 built on your own Linux box?
Sent from my PC36100 using Tapatalk
Can this be done from ubuntu on a virtual machine?
And what's the difference between this and cm6 ?.....
how do you replace the adw launcher ?
how can you add additional applications?
onicrom said:
how do you replace the adw launcher ?
how can you add additional applications?
Click to expand...
Click to collapse
in vendor/cyanogen/products
replace this
Code:
#PRODUCT_PACKAGES += ADWLauncher
PRODUCT_PACKAGES += Launcher2
also all of the people asking what the differnece between this and cm is nothing unless you change the source files or add remove packages. they can be found in the packages directory.
Igotsanevo4g said:
Can this be done from ubuntu on a virtual machine?
And what's the difference between this and cm6 ?.....
Click to expand...
Click to collapse
yes you can do this in VM but i don;t know the exact steps to set that up just once you get into your linux VM follow the tutorial.
nice tut. thanks for this...sure it will help MANY
l33tlinuxh4x0r said:
in vendor/cyanogen/products
replace this
Code:
#PRODUCT_PACKAGES += ADWLauncher
PRODUCT_PACKAGES += Launcher2
also all of the people asking what the differnece between this and cm is nothing unless you change the source files or add remove packages. they can be found in the packages directory.
Click to expand...
Click to collapse
Thanks much

[DEV][WIP] Wanna learn to dev correctly?

Recently there has been some issues with people thinking they are developing when they are not. Now this isn't here to call out anyone. I am here for one simple reason. To teach people how to develop on android correctly. This is an initial post to stir up some interest.
Simply I wanted to try and setup a google+ webchat with questions or comments. How-tos. This can all be done through a google+ chat. If anyone is interested just hit me up on google+ and watch out for the invites it will be in about 2 weeks.
I will be updating this OP with tons of android tips and tricks I have picked up. Currently finshing the first draft in a few minutes.
Thanks!
============
Installing the android sdk and getting adb working.
NOTE: You will need to install java before this will work correctly.
Code:
wget http://dl.google.com/android/android-sdk_r12-linux_x86.tgz
tar xvf android-sdk_r12-linux_x86.tgz
mkdir $HOME/.sdk
mv android-sdk-linux_x86/ $HOME/.sdk/android-sdk/
echo "
#Android Paths
export PATH='$HOME/.sdk/android-sdk/tools/:$HOME/.sdk/android-sdk/platform-tools/:${PATH}'
#Adb Alias
alias start-adb='sudo $HOME/.sdk/android-sdk/platform-tools/./adb start-server'
alias kill-adb='sudo $HOME/.sdk/android-sdk/platform-tools/./adb kill-server'
" >> ~/.bashrc
rm android-sdk_r12-linux_x86.tgz
Now simply type in your terminal:
Code:
source ~/.bashrc
or restart your terminal session.
then type:
Code:
android
Working with Sense
Installing apktool
Apktool - http://code.google.com/p/android-apktool/
All apktool credits go to the apktool devs, I just use the tool!
NOTE: Install sdk using my sdk install guide in post 1.
Code:
wget http://android-apktool.googlecode.com/files/apktool1.4.1.tar.bz2
wget http://android-apktool.googlecode.com/files/apktool-install-linux-r04-brut1.tar.bz2
tar -jxvf apktool-install-linux-r04-brut1.tar.bz2
tar -jxvf apktool1.4.1.tar.bz2
mv apktool $HOME/.sdk/android-sdk/platform-tools
mv aapt $HOME/.sdk/android-sdk/platform-tools
mv apktool.jar $HOME/.sdk/android-sdk/platform-tools
rm apktool-install-linux-r04-brut1.tar.bz2
rm apktool1.4.1.tar.bz2
Now if your sdk is setup like mine and you placed it in this folding after following my sdk guide. apktool should now be installed on your system.
Using the apktool (quick overview)
You can simply do the "apktool if" to your framework resources. This is sense below.
Code:
apktool if framework-res.apk
apktool if com.htc.resources.apk
then decompile:
Code:
apktool d framework-res.apk
compile:
Code:
apktool b framework-res
batch decompile:
Code:
for x in $(ls |grep '.apk' |sort); do apktool d $x; echo Decompiled $x; done
batch compile:
Code:
for x in $(ls |grep -v '.apk' |sort); do apktool d $x; echo Compiled $x; done
Languages to look for when removing system languages from apks:
Code:
values-ar values-ar-rEG values-ar-rIL values-bg values-bg-rBG values-br values-ca-rES values-cs values-cs-rCZ values-da values-da-rDK values-de values-de-rAT values-de-rCH values-de-rDE values-de-rLI values-el values-el-rGR values-en-rAU values-en-rCA values-en-rGB values-en-rIE values-en-rIN values-en-rNZ values-en-rSG values-en-rUS values-en-rZA values-es values-es-rES values-es-rUS values-fi values-fi-rFI values-fr values-fr-rBE values-fr-rCA values-fr-rCH values-fr-rFR values-he-rIL values-hi-rIN values-hr values-hr-rHR values-hu values-hu-rHU values-id-rID values-it values-it-rCH values-it-rIT values-ja values-ja-rJP values-ko values-ko-rKR values-lt-rLT values-lv-rLV values-mcc204 values-mcc204-cs values-mcc204-da values-mcc204-de values-mcc204-el values-mcc204-es values-mcc204-es-rUS values-mcc204-fr values-mcc204-it values-mcc204-ja values-mcc204-ko values-mcc204-nl values-mcc204-pl values-mcc204-pt values-mcc204-pt-rPT values-mcc204-ru values-mcc204-sv values-mcc204-tr values-mcc204-zh-rCN values-mcc204-zh-rTW values-mcc230 values-mcc230-cs values-mcc230-da values-mcc230-de values-mcc230-el values-mcc230-es values-mcc230-es-rUS values-mcc230-fr values-mcc230-it values-mcc230-ja values-mcc230-ko values-mcc230-nl values-mcc230-pl values-mcc230-pt values-mcc230-pt-rPT values-mcc230-ru values-mcc230-sv values-mcc230-tr values-mcc230-zh-rCN values-mcc230-zh-rTW values-mcc232 values-mcc232-cs values-mcc232-da values-mcc232-de values-mcc232-el values-mcc232-es values-mcc232-es-rUS values-mcc232-fr values-mcc232-it values-mcc232-ja values-mcc232-ko values-mcc232-nl values-mcc232-pl values-mcc232-pt values-mcc232-pt-rPT values-mcc232-ru values-mcc232-sv values-mcc232-tr values-mcc232-zh-rCN values-mcc232-zh-rTW values-mcc234 values-mcc234-cs values-mcc234-da values-mcc234-de values-mcc234-el values-mcc234-es values-mcc234-es-rUS values-mcc234-fr values-mcc234-it values-mcc234-ja values-mcc234-ko values-mcc234-nl values-mcc234-pl values-mcc234-pt values-mcc234-pt-rPT values-mcc234-ru values-mcc234-sv values-mcc234-tr values-mcc234-zh-rCN values-mcc234-zh-rTW values-mcc260 values-mcc260-cs values-mcc260-da values-mcc260-de values-mcc260-el values-mcc260-es values-mcc260-es-rUS values-mcc260-fr values-mcc260-it values-mcc260-ja values-mcc260-ko values-mcc260-nl values-mcc260-pl values-mcc260-pt values-mcc260-pt-rPT values-mcc260-ru values-mcc260-sv values-mcc260-tr values-mcc260-zh-rCN values-mcc260-zh-rTW values-mcc262 values-mcc262-cs values-mcc262-da values-mcc262-de values-mcc262-el values-mcc262-es values-mcc262-es-rUS values-mcc262-fr values-mcc262-it values-mcc262-ja values-mcc262-ko values-mcc262-nl values-mcc262-pl values-mcc262-pt values-mcc262-pt-rPT values-mcc262-ru values-mcc262-sv values-mcc262-tr values-mcc262-zh-rCN values-mcc262-zh-rTW values-nb values-nb-rNO values-nl values-nl-rBE values-nl-rNL values-pl values-pl-rPL values-pt values-pt-rBR values-pt-rPT values-ro values-ro-rRO values-ru values-ru-rRU values-sk values-sk-rSK values-sl values-sl-rSI values-sr values-sr-rRS values-sv values-sv-rSE values-th values-th-rTH values-tl-rPH values-tr values-tr-rTR values-uk-rUA values-vi values-vi-rVN values-zh-rCN values-zh-rHK values-zh-rTW values-zh-rTW-hdpi values-cs-nokeys values-da-nokeys values-de-nokeys values-el-nokeys values-es-nokeys values-es-rUS-nokeys values-fr-nokeys values-it-nokeys values-ja-nokeys values-ko-nokeys values-nb-nokeys values-nl-nokeys values-pl-nokeys values-pt-nokeys values-pt-rPT-nokeys values-ru-nokeys values-sv-nokeys values-tr-nokeys values-zh-rCN-nokeys values-zh-rTW-nokeys values-lt values-ca values-uk values-lv values-tl values-in values-iw values-ms values-no values-rm values-fa values-sw values-zh-rMO values-mcc262-sk values-mcc262-tl values-mcc234-hr values-mcc234-hu values-mcc262-fi values-mcc234-tl values-mcc234-sr values-mcc234-lv values-mcc262-lv values-mcc234-bg values-mcc234-en-rGB values-mcc234-sl values-mcc262-nb values-mcc234-uk values-mcc262-en-rGB values-mcc262-vi values-mcc234-nb values-mcc262-uk values-mcc262-lt values-mcc262-sr values-mcc262-ar values-mcc262-bg values-mcc234-sk values-mcc262-ca values-mcc262-ro values-mcc234-vi values-mcc262-th values-mcc234-ar values-mcc234-ca values-mcc262-hu values-mcc234-fi values-mcc234-lt values-mcc262-hr values-mcc262-sl values-mcc234-th values-mcc234-ro values-mcc206-de values-mcc228-de values-mcc262-fa values-mcc295-de values-mcc262-rm values-mcc270-de values-mcc262-in values-mcc262-iw values-zh-rHK-land-hdpi values-zh-rCN-land-hdpi values-zh-rHK-hdpi values-zh-rTW-land-hdpi values-mcc214 values-mcc311 values-mcc310 values-mcc466 values-mcc310-mnc220 values-mcc310-mnc200 values-mcc310-mnc270 values-mcc890-mnc126 values-mcc214-mnc1 values-mcc310-mnc800 values-mcc234-mnc15-gb values-mcc310-mnc490 values-mcc204-mnc4 values-mcc310-mnc260 values-mcc250-mnc1 values-mcc204-mnc4-nl values-mcc214-mnc1-es values-mcc310-mnc230 values-mcc310-mnc26 values-mcc310-mnc210 values-mcc310-mnc330 values-mcc234-mnc15 values-mcc310-mnc170 values-mcc310-mnc280 values-mcc310-mnc290 values-mcc310-mnc660 values-mcc310-mnc160 values-mcc262-mnc2-de values-mcc310-mnc240 values-mcc310-mnc580 values-mcc310-mnc310 values-mcc310-mnc250 values-mcc262-mnc2 values-en-rSA values-mcc238-mnc6 values-mcc235-mnc94 values-mcc505-mnc6 values-mcc240-mnc2 values-mcc505-mnc3 values-zh-rCN-hdpi values-mcc234-mnc20 values-mcc272-mnc5 values-mcc232-mnc10 values-en-rUA values-en-rRU values-en-rUA-hdpi values-en-rRU-hdpi values-es-rMX values-zh-rCN-normal-port values-zh-rCN-normal-land values-ur values-ja-rEN values-et values-is values-nn values-tr-800x480 values-zz-rZZ values-mcc466-zz-rZZ values-mcc230-zz-rZZ values-mcc234-zz-rZZ values-mcc214-zz-rZZ values-mcc204-zz-rZZ values-mcc232-zz-rZZ values-mcc262-zz-rZZ values-mcc260-zz-rZZ values-en values-zh-rTW-finger values-de-keysexposed values-ru-keysexposed values-ja-finger values-zh-rTW-keyshidden values-de-keyshidden values-fr-keyshidden values-it-keysexposed values-ru-finger values-ja-keyshidden values-nl-finger values-pl-finger values-fr-finger values-de-finger values-ko-finger values-zh-rCN-keysexposed values-nl-keyshidden values-es-keyshidden values-ru-keyshidden values-zh-rCN-keyshidden values-cs-keysexposed values-cs-finger values-es-finger values-cs-keyshidden values-fr-keysexposed values-nl-keysexposed values-zh-rTW-keysexposed values-it-keyshidden values-it-finger values-pl-keyshidden values-ja-keysexposed values-pl-keysexposed values-ko-keyshidden values-es-keysexposed values-zh-rCN-finger values-ko-keysexposed values-zh values-he values-es-rCR values-es-rCL values-eu values-es-rSV values-es-rNI values-ln values-es-rAR values-gl values-es-rPY values-es-rBO values-es-rPE values-es-rVE values-hi values-mo
Dsixda Android Kitchen:
Dsixda Android Kitchen - https://github.com/dsixda/Android-Kitchen
Again all credit goes to the developers of this kitchen. I only simply use it!
There are two ways to install this kitchen.
- Download it here and unzip it - https://github.com/dsixda/Android-Kitchen/archives/master
- What I do is sync with his github using git.
Note: Make sure you have git installed.
Code:
sudo apt-get install git-core
Then simply clone there repo where ever you like locally.
Code:
git clone https://github.com/dsixda/Android-Kitchen.git
Note: This method is a way to use the latest code. Use at your own risk might be bugs. Don't report issues for versions not released yet!
Working with AOSP
Compiling SalvageMod
NOTE: Until kernel.org is up. This will not work at all!
Hey there, you are here because you want to be able to compile SalvageMod for your HTC Evo. There is one simple way to do so and its very easy. Here are the current versions of SalvageMod that you can compile.
* SalvageMod1.3 (Stable)
* gingerbread (Development)
Click to expand...
Click to collapse
Please note that the gingerbread branch is the same as our "nightly" or unstable branch. As other releases come available this page will be updated with those branches. Now its time for the fun stuff.
Let's make sure we have all the needed files to compile on [http://www.ubuntu.com Ubuntu 11.04].
Use this repo for java:
Code:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
32 bit install:
Code:
sudo apt-get install git-core gnupg flex bison gperf libsdl1.2-dev libesd0-dev libwxgtk2.6-dev squashfs-tools build-essential zip curl libncurses5-dev zlib1g-dev sun-java6-jdk pngcrush
64 bit users will need:
Code:
sudo apt-get install g++-multilib lib32z1-dev lib32ncurses5-dev lib32readline5-dev gcc-4.4-multilib g++-4.4-multilib
Now we create a development directory, it doesn't matter what the name is or where its at. For example I always do:
Code:
mkdir -p ~/Development/SalvageMod
Now you need to install repo:
Code:
sudo bash
curl http://android.git.kernel.org/repo > /usr/bin/repo
chmod a+x /usr/bin/repo
exit
Now go into the directory you just created. This is where we will initate the repo we want to use.
* *Remember those branches from before?*
* SalvageMod1.3 (Stable)
* gingerbread (Development)
Click to expand...
Click to collapse
Now initate the repo you want.
* Development
Code:
repo init -u https://github.com/SalvageMod/salvage.git -b gingerbread
Click to expand...
Click to collapse
* Stable
Code:
repo init -u https://github.com/SalvageMod/salvage.git -b SalvageMod1.3
Click to expand...
Click to collapse
Now sync it.
Code:
repo sync
Now it will do some things, could take a long time depending on your internet connection. Go grab a beer.
Now that it is done compiling there are only a few steps before you are on your way to a compiled SalvageMod rom.
Go into the supersonic(Htc Evo) device tree and run extract-files.sh
Code:
cd device/htc/supersonic
./extract-files.sh
Now you want to go back into the root of the build.
Code:
cd ../../..
Should look something like this:
Code:
[email protected]:~/Development/SalvageMod$ ls
bionic build dalvik device frameworks libcore ndk prebuilt system
bootable cts development external hardware Makefile packages sdk vendor
Once you are here we start to get everything together. Run these commands. Then you will use make to build the rom!
Code:
. build/envsetup.sh
lunch salvage_supersonic-userdebug
time make -j$(grep -ic ^processor /proc/cpuinfo) otapackage
That is about it! After this is completed go into the following folder to get your rom!
Code:
cd out/target/product/supersonic
well this means im getting a google +
Considering that i already follow you on Google+, I would definitely want to check this out Lithid. Thanx in advance man.
Thanks Lithid. We appreciate all you do to help us.
Sent from my supersonic using XDA App
What's your plus lith
Sent from my PC36100 using xda premium
I have been really wanting to start without a clue as to where to begin...can I get a Google+ invite?
Sent from my supersonic using XDA App
Me too
I would love to get in on this. send me a G+ invite - jtwalker1
I will forewarn you, I have not done any coding or programming since I learned in college which was many, many moons ago (think pre WWW days)
Thanks
James
renegade37918 said:
What's your plus lith
Sent from my PC36100 using xda premium
Click to expand...
Click to collapse
Plus is in the sig man.
I know basic linux and would like to learn..
What kind of skills would you consider a prerequisite for this? Would not want to be the slow kid in class slowing everyone else down.
Cool I forgot I was already following you lol
Sent from my PC36100 using XDA App
renegade37918 said:
What's your plus lith
Sent from my PC36100 using xda premium
Click to expand...
Click to collapse
its in his sig
lithid-cm said:
Recently there has been some issues with people thinking they are developing when they are not. Now this isn't here to call out anyone. I am here for one simple reason. To teach people how to develop on android correctly. This is an initial post to stir up some interest.
Simply I wanted to try and setup a google+ webchat with questions or comments. How-tos. This can all be done through a google+ chat. If anyone is interested just hit me up on google+ and watch out for the invites it will be in about 2 weeks.
I will be updating this OP with tons of android tips and tricks I have picked up. Currently finshing the first draft in a few minutes.
Thanks!
Click to expand...
Click to collapse
I'm down man I sent you a request on plus Andres luque
Thanks alot
corynat said:
What kind of skills would you consider a prerequisite for this? Would not want to be the slow kid in class slowing everyone else down.
Click to expand...
Click to collapse
I would say basic linux command line functions. Like changing directories, running scripts, listing files, copy and paste, and removing, and text editing.
lithid-cm said:
I would say basic linux command line functions. Like changing directories, running scripts, listing files, copy and paste, and removing, and text editing.
Click to expand...
Click to collapse
"running out to get basic linux for dummies" brb
This sounds cool but I suck with commands LOL.
Sent from my PC36100 using XDA App
DrDr3z85 said:
"running out to get basic linux for dummies" brb
Click to expand...
Click to collapse
Haha +1 that off to barnes and noble!
Thanks lith this is great and much needed will def hit you up on g+
Sent from my PC36100 using Tapatalk

[DEV][REF]▓Compile your own Kernel From The Samsung Sources:Quite easy to follow!▓

[DEV][REF]▓Compile your own Kernel From The Samsung Sources:Quite easy to follow!▓
I want this guide to be n00b friendly...so lets start!
1)Install Ubuntu 10.10 or later(virtual distro may work too!)
Use this for samsung devices:
Code:
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
2)Download the source code from opensource.samsung.com(easier) or sync the sources from the git repo(easy,but download the tarball as its even easier!)
3)Open terminal and download the the necessary tools:
For 32/64 bitsi use this)
Code:
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
For 64 bits ONLY:
Code:
ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
4)Download the code soucery toochain:Toolchain
ur machine is good to GO!
The Main Thing
Ok,so i assume u have set up your machine
Now,all of the files should be placed in ~/Downloads (for my convinience to explain!but u may put it anywhere)
extract the sources and everything else u downloaded....then go into the top directory
Code:
cd Kernel
u enter into the root of the kernel directory with this
then type :
Code:
gedit Makefile
The Make file will open.........look out for this and change CROSS_COMPILE= "your toolchain path" and EXTRAVERSION="current kernel version"
This will open up the Makefile in a gedit,and the changed values will correspond to wherever u placed your toolchain................the EXTRAVERSION refers to current sub-version of your linux kernel version on ur phone
Get the config from your phone..Type:
Code:
adb pull /proc/config.gz
This will fetch a working config from the current kernel on your phone....u can alternatively make a new one with "make menuconfig"
Then gunzip it and copy it to to ur kernel source root:
Code:
gunzip config.gz
rename to .config
Now,make the necessary changes in your source.When you are done,type:
Code:
make -jX
,where X=no.op cpu threads multiplied by 1 or 2.
Sit down and have a smoke!
The resulting kernel will be in Kernel/arch/arm/boot/zImage
Bind the zImage with the ramdisk with the help of unpacker-repacker tools by Skin1980 and voila!flash it as pda in odin
Happy Flashing!
Guide still to be full completed!
last one ffffffjjjj
Why using a tar archive when there is now a GIT repository for the sources?
Sine. said:
Why using a tar archive when there is now a GIT repository for the sources?
Click to expand...
Click to collapse
bcoz:
i want this guide to be n00b frienly...u cant expect them to sync sources when downloading a tarball is much simpler!
has anyone tried this guide?
i hoped it would help people
Pl post the link for Codesourcery tool chain. All links are reaching dead end.
edited OP with link
I get this message:
Firefox can't find the server at sourcery.mentor.com.
ganeshbiyer said:
I get this message:
Firefox can't find the server at sourcery.mentor.com.
Click to expand...
Click to collapse
strange............i m able to download it and so is shriomman
Could u upload to multiupload.com.
It will be easier to download from there.
Its is ok Now.
Downloading with Google Chrome.
Don't know what the problem is with firefox.
gedit makefile command gives me a blank window
btw @ sak- post in the op that u have to copy the kernel directory to the home page or else it wont b found right ? i copied ther by readin it from the source readme
edit- got this from google http://kibyegon.wordpress.com/2010/05/13/how-to-install-git-on-ubuntu-lucid-10-04/
!! when i use make command it shows error
[email protected]:~/Downloads/git-1.7.7.3$ make
GIT_VERSION = 1.7.7.3
* new build flags or prefix
CC daemon.o
In file included from daemon.c:1:0:
cache.h:19:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [daemon.o] Error 1
Source code For ICS released ???
http://source.android.com/
chack the news part
shriomman said:
gedit makefile command gives me a blank window
btw @ sak- post in the op that u have to copy the kernel directory to the home page or else it wont b found right ? i copied ther by readin it from the source readme
edit- got this from google http://kibyegon.wordpress.com/2010/05/13/how-to-install-git-on-ubuntu-lucid-10-04/
!! when i use make command it shows error
[email protected]:~/Downloads/git-1.7.7.3$ make
GIT_VERSION = 1.7.7.3
* new build flags or prefix
CC daemon.o
In file included from daemon.c:1:0:
cache.h:19:18: fatal error: zlib.h: No such file or directory
compilation terminated.
make: *** [daemon.o] Error 1
Click to expand...
Click to collapse
did u use the config and was path of toolchain correctly specified in makefile?
sakindia123 said:
did u use the config and was path of toolchain correctly specified in makefile?
Click to expand...
Click to collapse
aaaa... i dono :\ doesnt this thing have a remote assistance ?? :\
screenshot
check this out :\ i dono whats wrong there :|
shriomman said:
check this out :\ i dono whats wrong there :|
Click to expand...
Click to collapse
r u sure there's a makefile in Kernel?try opening it via the gui and check if it is empty
They are all silly mistakes, not knowing how to use linux. (Read some basic manual)
sudo gedit Makefile (Capitalization matters)
to install software from sources ... (git,...)
(install additional compilers .., typical (gcc. ..)
. / configure
make
good luck!
haha lol shriom................that was too stupid a mistake to be spotted!

[TUTORIAL] Find out which shared libs (.so) are missing

While porting features or ROMs from one Android device to another, some of us frequently encounter missing shared libs error. The process of finding missing shared libraries (.so files) might be a bit trivial, and time consuming. This tutorial is going to demonstrate a one-command way of finding all the dependencies of an executable, or another shared library.
FIRST TIME CONFIGURATION
Open up your terminal, type in:
Code:
$ echo 'readelf -d $1 | grep "\(NEEDED\)" | sed -r "s/.*\[(.*)\]/\1/"' | sudo tee -a /usr/local/bin/ldd-arm
$ sudo chmod +x /usr/local/bin/ldd-arm
[Member @_that told about this (better) way of performing this, without NDK and a more readable output. Thanks!]
FINDING MISSING LIBS
Basic usage is very easy. In your terminal:
$ ldd-arm PATH_TO_YOUR_EXECUTABLE_OR_LIBRARY
Click to expand...
Click to collapse
Say, for example, we want to find out the dependecies (which shared libraries are required) of my sensor HAL. I would type in terminal,
Code:
$ ldd-arm sensors.msm7x27a.so
And, I get the desired output!
Code:
liblog.so
libutils.so
libcutils.so
libhardware.so
libdl.so
libmemalloc.so
libc.so
libstdc++.so
libm.so
And that's how you can find out the libraries you are missing!
Nice tutorial Thanks a lot :fingers-crossed:
Wow. For the tutorial
Awesome tutorial! But are you sure
Code:
echo 'export PATH=$PATH:LOCATION_OF_NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin' > ~/.bashrc
shouldn't be
Code:
echo 'export PATH=$PATH:LOCATION_OF_NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin' >> ~/.bashrc
with >> instead of >? You don't want to override your complete ~/.bashrc, right?
dummie999 said:
Awesome tutorial! But are you sure echo
Code:
'export PATH=$PATH:LOCATION_OF_NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin' > ~/.bashrc
shouldn't be
Code:
echo 'export PATH=$PATH:LOCATION_OF_NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin' >> ~/.bashrc
with >> instead of >? You don't want to override your complete ~/.bashrc, right?
Click to expand...
Click to collapse
I just noticed the typo, thanks for pointing it out. Post updated.
Regards
In my experience, the native (amd64) readelf worked just as well with ARM binaries. I'm using this command line in my script:
Code:
readelf -d $1 | grep '\(NEEDED\)' | sed -r 's/.*\[(.*)\]/\1/'
The final sed leaves only the bare library names in the output.
In there any way to use this in windows?
LEGEND!
just the sort of thing i was looking for!
you should just make binary for this, the "lib dependancy viewer"
it should be called by something like
libdepv PATH/TO/LIB
---------- Post added at 10:24 PM ---------- Previous post was at 10:20 PM ----------
migui0401 said:
In there any way to use this in windows?
Click to expand...
Click to collapse
maybe adb shell with busybox installed..
Thanks @_that! Post updated
Sent from my Walton Primo H1 using XDA Free mobile app
good one indeed....ok now say how we can find for ported app's missing or shared libs and its dependency? is this also work?
Nice job
ricky310711 said:
you should just make binary for this, the "lib dependancy viewer"
it should be called by something like
libdepv PATH/TO/LIB
Click to expand...
Click to collapse
Why a binary? Rename the script to libdepv and you can call it already exactly like that.
jazzespresso said:
good one indeed....ok now say how we can find for ported app's missing or shared libs and its dependency? is this also work?
Click to expand...
Click to collapse
For finding native library dependencies of apks, you need to decompile them, search the smali files for invokes of "loadLibrary" and trace the argument back to the string constant (usually it's just a few lines above the loadLibrary call). Prepend "lib" to the string constant and append ".so", that's the name of the required native library.
An example could look like this:
Code:
const-string v0, "defcontainer_jni"
invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V
So we know that this app requires libdefcontainer_jni.so.
I'm using the latest r9d NDK and there are some ld* binaries, but no ldd-arm .
Also my NDK is "Linux 64-bit" so my prebuilt files are under:
$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/
While I'm at it, not all libraries or binaries are explicitly linked to their SO targets. I use dynamic loading in several of mine and so does android for HAL libraries. Best way to find these is by using "strings", assuming there's an explicit string in there, or at least a partial one.
tuxboy said:
While porting features or ROMs from one Android device to another, some of us frequently encounter missing shared libs error. The process of finding missing shared libraries (.so files) might be a bit trivial, and time consuming. This tutorial is going to demonstrate a one-command way of finding all the dependencies of an executable, or another shared library.
FIRST TIME CONFIGURATION
Open up your terminal, type in:
Code:
$ echo 'readelf -d $1 | grep "\(NEEDED\)" | sed -r "s/.*\[(.*)\]/\1/"' | sudo tee -a /usr/local/bin/ldd-arm
$ sudo chmod +x /usr/local/bin/ldd-arm
[Member @_that told about this (better) way of performing this, without NDK and a more readable output. Thanks!]
FINDING MISSING LIBS
Basic usage is very easy. In your terminal:
Say, for example, we want to find out the dependecies (which shared libraries are required) of my sensor HAL. I would type in terminal,
Code:
$ ldd-arm copybit.msm7x27a.so
And, I get the desired output!
Code:
liblog.so
libutils.so
libcutils.so
libhardware.so
libdl.so
libmemalloc.so
libc.so
libstdc++.so
libm.so
And that's how you can find out the libraries you are missing! If your device uses MIPS, just use the mipsel toolchain instead. (Don't forget to hit Thanks if this helps you!)
Click to expand...
Click to collapse
I love you so much.
Trying to work out bugs with M8VZW...this might just be what I needed.
mikereidis said:
I'm using the latest r9d NDK and there are some ld* binaries, but no ldd-arm .
Also my NDK is "Linux 64-bit" so my prebuilt files are under:
$NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/
Click to expand...
Click to collapse
ldd-arm is actually a little command we created at the very beginning of the post.
mikereidis said:
While I'm at it, not all libraries or binaries are explicitly linked to their SO targets. I use dynamic loading in several of mine and so does android for HAL libraries.
Click to expand...
Click to collapse
True.
Fabulous! Useful info indeed. Thanks a lot.
Sent from my Lenovo A369i using Tapatalk
tuxboy said:
ldd-arm is actually a little command we created at the very beginning of the post.
Click to expand...
Click to collapse
Ah, yes... readelf...
i was looking for something like this about 2 months ago
excellent thread
_that said:
In my experience, the native (amd64) readelf worked just as well with ARM binaries. I'm using this command line in my script:
Code:
readelf -d $1 | grep '\(NEEDED\)' | sed -r 's/.*\[(.*)\]/\1/'
The final sed leaves only the bare library names in the output.
Click to expand...
Click to collapse
Yep. Same here - my system readelf seems fine when used on ARM binaries for this purpose.
(fairly old trick, but the sed stuff makes it a lot nicer.)
Obviously another approach to this is to take the above command and paste it into a text editor, save it, and chmod +x it
Rather than use /usr/local/bin/ I use ~/bin and add it to my PATH
Can this be used to port apps? I am wanting to install some S5 apps on my Galaxy S4, but don't know what libs etc are needed. Could this be used to find out?

Categories

Resources