Request to Deveopers only!!! - XPERIA X8 General

Hi Devs!!!!
I am a Software Engineer and i have a pretty good knowledge of C & Java.
But the problem is that i don't know anything about Linux, how to cook roms or what should be used to open files such as splboot, miniloader...
if any body could help me out with this i think i'd be useful in contributing to the success of our MISSION FREE XPERIA X8...
I need to know exactly how these things work so that i could start with development. Though i get less time in weekdays as I am working but i can definitely work upon these things in weekends and would love to help in any sort possible.
Any kind of explanation, links would be useful..
Thanks!!!

To work with Linux kernel: you need a Linux distro, some development packages, and Linux source
To work with Android source: you may want to start with Android Open Source Project, download the SDK, NDK. There is also instruction to get the source, build, and test. Later, look at the modifications provided by CyanogenMod, or VillianROM, or CodeAurora.
Good luck

Thanks buddy...i hope these links would help me..

hey doixanh!!!
i downloaded jdk, git.tar.gz, python.tar.gz
but i am unable to use it....i was reading the documentation on Android Open Source on how to use it but it doesn't seem to be helpful.
The command that i am trying is ::
repo init -u git://android.git.kernel.org/platform/manifest.git
and m getting the followinig error ::
Traceback (most recent call last):
File "/home/mohit/bin/repo", line 603, in <module>
main(sys.argv[1:])
File "/home/mohit/bin/repo", line 570, in main
_Init(args)
File "/home/mohit/bin/repo", line 184, in _Init
_CheckGitVersion()
File "/home/mohit/bin/repo", line 213, in _CheckGitVersion
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
File "/usr/lib/python2.6/subprocess.py", line 623, in __init__
errread, errwrite)
File "/usr/lib/python2.6/subprocess.py", line 1141, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
--------------------------------------------
i am completly new to linux and so i'd be glad if u can help me out in getting started...
awaiting your reply..
Thanks

hey doixanh!!
i am stuck at a point...need your help to go further.
i downloaded the android kitchen yesterday but didn't find much use of it.(plz tell me if i am wrong)
i followed the steps mentioned on the Android Source website and it said to check out the source from git hub using the $ repo sync command.. i did that but it started downloading everything from there which i think we don't require...so now i want to know what all sources do i need to checkout from git hub so that i can work upon those.,,also if you could tell me how to open and modify .ko files(these are the kernel files i guess) i want to have a look into these files and see how things work in our device.
also what other things that i would need, plz let me know so that i can download them...as per now i have python 2.7, JDK 6, android kitchen, and android sdk...Is there any thing else that i would require..

Related

Thoughts on native binutils

I did an extensive search to try and find if anyone built binutils to run native on android and came up empty. I did, however, find someone who claims to have gotten Fortran to compile and run on android (specificimpulses.blogspot.com/2011/01/my-android-speaks-fortran-yours-can-too.html) He seems to have problems at the linker phase. I was wondering what people thought about the possibility. I would like to mess around with arm assembler on my android device whilst out and about...
So this is awesome, I set the build and the host environment to arm-android-eabi and I magickally got out i686-elf binaries that run on my linux workstation...amazing! I didn't know that cirrus made a processor with the smarts to automagically execute arm-android-eabi target code when presented with it...
../binutils-2.19.1/configure --prefix=/opt/compilers/gcc/native-android --build=arm-android-eabi --host=arm-android-eabi --target=arm-android-eabi --with-sysroot=../android-ndk-r5/platforms/android-8/arch-arm
So in addition to that I tried to wipe my path clean and point only to the binutils and gcc under the ndk-toolchain directory but it gave me the infamous 'cannot create working executable'....wow? ya think, config?
Anyone know how to turn off the test for building working executables when cross compiling, or perhaps to point in the configure script options where to find crti.o which is what was missing at the link phase?
Strike that, I mean Via. my workstation uses a via processor, not that that is important here...
Success! Well, in as much as I was able to compile binaries of some of the binutils and run them on my g-tab. I haven't tried to assemble a piece of code and link it yet. What I did was use the info in android-ndk-r5/docs/STANDALONE-TOOLCHAIN.html
which suggested that I run:
$NDK/build/tools/make-standalone-toolchain.sh --platform=android-5 --install-dir=/tmp/my-android-toolchain
which created a standalone toolchain self enclosed. I then set path carefully so I was pointing to the toolchain directory's bins. Then I ran configure using
../binutils-2.19.1/configure --prefix=/root/android --host=arm-android-eabi --target=arm-android-eabi
and made a few comments to code--real hacks like casting &stat.time to a time_t * and changing #ifdef tests to force inclusion of the correct code. I also had to link:
ln -s /root/my-android-toolchain/bin/arm-linux-androideabi-ar /root/my-android-toolchain/arm-android-eabi-ar
just because I was tired and didn't want to f**k with the compile script to get it to point to the correct set of toolchain binaries. In the end, I copied over nm-new, ld-new, as-new, and strip-new to my gtab and ran them and got errors that I expected like:
as-new aa.s
Error: can't open aa.s for reading: No such file or directory. Indicating that at least gas was running native on my gtab...
Of course, that is a first tiny step....
Btb, I had to unzip into the /data directory on android for the executables to run. Ran them in a terminal emulator...

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 ^_^

[Q] Question on Building

Hey guys, I downloaded the LG D800 lollipop source files from the opensource LG site, and I was trying to build it.
From my understanding, the instructions.
Code:
1. Android build
- Download original android source code ( Lollipop 5.0.1_r1 ) from http://source.android.com
- Untar opensource packages of LGD800_L_Android.tar.gz into downloaded android source directory
a) tar -xvzf LGD800_L_Android.tar.gz
- And, merge the source into the android source code
- Run following scripts to build android
a) source build/envsetup.sh
b) lunch 1
c) make -j4
- When you compile the android source code, you have to add google original prebuilt source(toolchain) into the android directory.
- After build, you can find output at out/target/product/generic
2. Kernel Build
- Uncompress using following command at the android directory
tar xvzf LGD800_L_Kernel.tar.gz
- When you compile the kernel source code, you have to add google original prebuilt source(toolchain) into the android directory.
- Run following scripts to build kernel
a) cd kernel
b) export PATH=$PATH:tools/lz4demo
c) make ARCH=arm CROSS_COMPILE=../prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- g2-att-perf_defconfig zImage -j4
* "-j4" : The number, 4, is the number of multiple jobs to be invoked simultaneously.
* lz4demo : More information can be found at "https://code.google.com/p/lz4/"
- After build, you can find the build image(zImage) at arch/arm/boot/
3. how to build chromium34_lge (vendor\lge\external\chromium34_lge\src),
please refer to README.txt at the folder mentioned above.
say to build the AOSP_ARM generic image.
I am building it now, and it did include the make files for the vendor directories. But I am wondering if this is actually going to work, and if it's missing anything?
If someone has ever done this before, and can accurately describe the process I would appreciate it.
I understand it as download android>extract the files to that directory and "Merge"(Overwrite?) the files, then run the envsetup, lunch for AOSP_ARM and make.
I don't understand what this line means "When you compile the android source code, you have to add google original prebuilt source(toolchain) into the android directory."
I also don't understand what the Chromium34_LGE thing is, and what it's for.
If anyone can shine some information on this, I would really appreciate it. Thanks!
Download site instructions, file size, and Linux knowledge
Silentwidow said:
Hey guys, I downloaded the LG D800 lollipop source files from the opensource LG site, and I was trying to build it.
- Download original android source code ( Lollipop 5.0.1_r1 ) from http://source.android.com
Click to expand...
Click to collapse
Go to http://opensource.lge.com, and search for LGD800. The downloaded file named LGD800_Lollipop_Android_D800_v30f.zip is a 633,894KB file containing LGD800_L_Android.tar.gz 505,244 KB and LGD800_L_Kernel.tar.gz 133,042 KB. When both are extracted the result is over 2GB of files and folders.
To build you'll need a Linux OS and be very knowledgeable with Linux commands and file structures.
As for a prebuilt, there is one buried in the folders at LGD800_L_Android.tar.gz\LGD800_L_Android.tar\android\vendor\lge\prebuilt\LGBackup\tar\LGBackup_tar.zip\
I don't know if there is another prebuilt in the LGD800_L_Kernel.tar.gz because I didn't look. Linux is far out of my reach, so I'll stay away from build scripts and makefiles...etc..

Help Please! Android C/C++: Where to find selinux/selinux.h and ctuils, properties.h

edited (solution): I forgot I had another thread on this same basic topic. You have to merge AOSP + Device Sources + Hardware Drives and set it up to build the sources.
https://forum.xda-developers.com/android/software/toolbox-c-struct-define-toolname-tool-s-t3568409
If I try to compile my own customize 'toolbox' binary for example, I can't find the headers anywhere in the toolchains or included headers. I can search them down from Google sources but I gave up after tools.h. I have a feeling this is NOT the way I am supposed to be doing it.
Is there a shared library on my device that I pull off to get these headers? (lib?????.so).. Where do I get headers for Android/log.h and cutils properties.h and selinux.h ??? Or are we not supposed to compile these binaries on a Ubuntu machine? (do I compile them on the device itself?)
ediit: (here's compiling it another way, obviously I can make a hack easily but working with Android is so much harder.)
arm-linux-gnueabi-gcc -static -march=armv8-a toolbox.c -o toolbox
toolbox.c:6:25: fatal error: android/log.h: No such file or directory
compilation terminated.
edit, solved i think
I think it's stand alone toolchain not defined. If that's not the answer, it's a fun answer so I'm playing with that. If I don't have the answer I will pass the question up, download sources and start trying to compile Android proper. (which is my new goal now, I want open source phone and I want to compile my own OS 100%, besides the closed sources, it's so exciting!!) ~so much for sleep

[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