[Q] Binaries - Nexus 4 Q&A, Help & Troubleshooting

This is beginner talking. I was looking for a Factory images for my Nexus 4 and I saw on Google Developers's website that there are some Binaries for Nexus Devices (NFC,Graphics, GSM, WIFI....) and now I'm curious about what can I do with them ( *.sh file)?
Can I flash them separately module by module in case that I need one, or it is just enough to flash a Factory image. Are they correlated? Thanks!

A factory image contains everything you need. The OS, kernel, drivers etc. It's basically a complete image of how the phone would look if you buy it.
Sent from my Nexus 4 using xda app-developers app

volvoxxda said:
This is beginner talking. I was looking for a Factory images for my Nexus 4 and I saw on Google Developers's website that there are some Binaries for Nexus Devices (NFC,Graphics, GSM, WIFI....) and now I'm curious about what can I do with them ( *.sh file)?
Can I flash them separately module by module in case that I need one, or it is just enough to flash a Factory image. Are they correlated? Thanks!
Click to expand...
Click to collapse
Binaries are nothing but the specific hardware drivers. Its of no use to you unless you plan on compiling a ROM.
*.sh files are linux files, they are used to extract the drivers/binaries to a folder in you source code folder.

sandy-achar said:
Binaries are nothing but the specific hardware drivers. Its of no use to you unless you plan on compiling a ROM.
*.sh files are linux files, they are used to extract the drivers/binaries to a folder in you source code folder.
Click to expand...
Click to collapse
Thanks guys, that was helpful! :good: Maybe this is beginning of something revolutionary (regarding me -> compiling ROM) :laugh:

Related

[GUIDE][GSM/4G] Basic ROM Porting to the Nexus S

.
This will not be the prettiest post until I have most of the bulk written out. Over time I will refine and improve, but for now I need to get it on paper.
-= READ THIS =-
-= I am not responsible for bricked devices. I know what I am doing when it comes to porting, and am giving you exact details on how to port. These methods have a very small chance of bricking, but if anything happens and you come crying to me, I will laugh at you. Follow this thread carefully and you will have little to no issues. =-
Before we begin, the most important part of android developing is to have Ubuntu (or preferred linux distro) installed on either a separate machine, or dual boot in windows. Most scripts that aid in developing can only be run under linux. A simple installer for dual booting Ubuntu/windows can be found here: http://www.ubuntu.com/download/ubuntu/windows-installer.
You also NEED adb installed, along with necessary Nexus S drivers, and have a basic knowledge of adb commands (I will cover a few). (You will need to install the Android SDK and download the platform-tools addon. This is where adb is located. There are guides online telling how to download these. If you need help, ask and I will include in the OP.) I dual boot Windows and Ubuntu, so I have my adb commands installed on my windows partition. This probably isn't the best way to do it, feel free to install adb under whichever OS you prefer. For this guide, I will be referring to using adb under Windows 7. The most common command needed while porting is simple:
adb logcat
Write this down somewhere if you cannot remember it. I have typed this command over 5000 times, it is used to debug system errors (bootloops, rom not booting, apps not working, etc).
I will also be referring to the "Android Kitchen" throughout this guide, mainly when working with boot.img's. In order to understand it more thoroughly, spend some time reading the first page. Link to Android Kitchen is below.
-= Useful Links =-
Be thankful, I saved you the time of googling
Nexus S adb drivers
Android Kitchen
Android SDK
7zip
Click to expand...
Click to collapse
-= Basics =-
The normal Android ROM consists of 3 main parts;
Boot.img – This is where the kernel and ramdisk are compressed. The ramdisk is what initiates the ROM’s main functions, such as Bluetooth, Wifi, and network connectivity information. The main file to pay attention to while porting is in the ramdisk, called the init.rc. It is a simple text file, and can be editied according to the ROM. A “how to” on unpacking/editing/repacking this file will be later in the guide.
System Folder – This folder contains all of the libs, configuration files, apps, and everything else that is the ROM itself. In this folder is where most of the changes are made, since most libs/framework pieces are device specific. This folder is the main cause of bootloops, and non-booting ports. I will try to explain most of my knowledge on what libs control what part of the phone. Almost all of the fixes for camera, sound, wifi, etc will be made somewhere within this folder. Unzip a ROM and dig around this folder for a bit, understand what folder contains what files, they are somewhat self-explanatory (Apps, framework, libs). This folder will become your best friend, learn to love it.
META-INF Folder – This folder holds all of the initial installer scripts; such as when you flash the ROM in a custom recovery. It is what tells your phone to install the ROM and what files to install. This script controls mount points, important system links, and in some occasions special commands. You can also edit this file to include any custom text you want users to see while flashing your rom. This file is device specific, and should ALWAYS be replaced when porting. Flashing a ROM with the wrong updater-script can either:
a) Corrupt partitions
b) Abort Installation (very frustrating with large ROM’s)
c) Rare occasion, brick your device
Bottom line is, pay very close attention to what exactly is in your custom built ROM before you flash it.
I decided this will be a good preface post. Read here for basic information you need to know BEFORE porting.
Here We GO
In order to port ROM's to the Nexus S, you will need a "base" to pull your files from. In order to port a ROM to the Nexus S, we will need a Nexus S ROM to start with, hence the "base". This base is normally CM7 or Stock Gingerbread, and can also be CM9 - Stock ICS. The base you pull from needs to match with the version of ROM you are porting.
1) Is the ROM I'm porting Ice Cream Sandwhich, or Gingerbread?
-This is very important. Most files are incompatible between versions, so make sure you know for sure, which version your port is going to be.
a) If the ROM you are trying to port is based on Gingerbread, download this ROM as a base to pull from (device specific):
CM7 GSM
CM7 4G​
b) If the ROM you are trying to port is based on Ice Cream Sandwhich, Download this ROM as a base to pull from (device specific):
IMM76D GSM
IMM76D 4G
Click to expand...
Click to collapse
2) Download the ROM you are going to port. Place this ROM on your desktop, along with the matching base.
3) Unzip both ROM's (port, and base) using preferred archive utility. Extracted ROM's will be in folders with matching name of the zip, DO NOT mix these up; be very organized with your base and the ROM you are porting.
4) Take a look in your newly unzipped ROM's, they should look exactly as I explained in the first post. We will be starting with the System folder of the ROM you are porting, replacing our needed files.
4a) Click into the System folder; you will see many folders inside. The first one we start with is the lib folder. Click inside; you will now be in the directory /system/lib
4b) In this directory is where all of the libs are located; these are crucial to the ROM. Replacing these without knowing what you are doing will result in a ROM that will not boot.
4c) At the top, you will notice 5 main folders; bluez-plugin, egl, hw, modules, soundfx. The ones that we care about are egl and hw. The egl folder contains the graphics drivers for the specific device, and the hw controls lights, gps, and other hardware features. In the ROM you are porting, delete both of these folders. (egl and hw)
4d) At this point, navigate to your base ROM (Nexus S ROM). Select both the egl and hw folders, and drag them to the lib folder of the current ROM you are porting. Your lib folder will now contain 5 folders again. Moving on.
4e) Navigate to your base ROM folder, into /system/lib again. Select these libs and drag-drop into your current ROM you are porting (this step varies between ICS and GB);
-= Gingerbread =-
-libaudio.so
-libaudiopolicy.so } these libs control audio
-libaudioflinger.so
-libril.so
-libsecril-client.so } these libs control network
-libreference-ril.so
-libs3cjpeg.so
-libFLAC.so } these libs are required for media
-= ICS =-
-libaudioflinger.so (may cause issues with booting in some ports)
-libaudioutils.so } once again, these libs are for audio
-libtinyalsa.so
-libril.so
-libsecril-client.so } these libs control network
-libreference-ril.so
-libs3cjpeg.so
That should be it for the lib folder for now. Exit /system/lib, and return to the main branch of the system folder /system.
Click to expand...
Click to collapse
5) Once we are back into the root of the system folder (/system), observe the two folders towards the bottom; usr and vendor.
usr - contains files that relate to touchscreen, softkeys, keyboard, and other hardware buttons.
vendor - mostly nexus specific, contains additional network libs, graphics, hw, and extra configuration files.
5a) In the ROM you are porting, delete both of these folders. They are of no use, since they are specific to devices.
5b) Copy both the usr and vendor folders from your base ROM, to the current port's system folder. As you can see, there is a lot of copy and paste from our Nexus ROMS to the ports, although we keep the important folders that pertain to the ROM itself.
Click to expand...
Click to collapse
6) Navigate back to the /system folder. You should see a folder named etc. Click into it.
6a) The etc folder is a wonderful place; it is one of the most used folders in the ROM. Observe a few of the folders inside. In our base ROM, you will see a few folders that are pretty self explanatory (wifi, permissions, init.d)
TO BE CONTINUED - I'M TIRED AND HAVE TEST ALL DAY TOMORROW AND WEDENSDAY. I WILL UPDATE WHEN I FIND TIME IN BETWEEN
and also this one. Just in case.
I like this already
Sent from my tweaked aosp Sensation
Swamp spreading your knowledge is 10x more beneficial to the community than releasing a ROM. Thanks man.
Sent from my Nexus S 4G using Tapatalk 2
dreamsforgotten said:
Swamp spreading your knowledge is 10x more beneficial to the community than releasing a ROM. Thanks man.
Sent from my Nexus S 4G using Tapatalk 2
Click to expand...
Click to collapse
+1 on the fishing lessons. Goblin your contribution is appreciated.
You without me is like Harold Melvin without the Blue Notes....
Thanks for this. Will attempt working on some of your ROMs like the Epic Touch one.
Sent from my Nexus S 4G using xda premium
This needs a kick
Sent from my Sensation using XDA
great start, can't wait to read the rest!
I've been super busy this last week, had no time for anything really. I'll finish writing this up, there are so many parts that need to be covered, I guess "simple porting" isn't all that simple to explain
I am just impatient to get this entire guide!! Thanks you
I will take my pain with patience.. haha..
waiting for the second part!!
Looking forward to the rest of the guide! Much appreciated swamp!
I will be following this thread closely. I haven't so much as coded a hello world in years but once this guide is complete, it may serve as the segue to get me started again. Waiting with baited breath.
Does this guide work with any rom port? Or is this Nexus S specific?
sivarticus85 said:
Does this guide work with any rom port? Or is this Nexus S specific?
Click to expand...
Click to collapse
I was actually going to add this to the op. The files I have included are nexus specific, but the actual process should work on tons of other devices.. There are a few areas that are nexus specific, such as build.prop edits and vendor folder, but other than that you should be able to follow this for other devices.
Or do you mean nexus s roms? This guide is kind of general porting; more of the basics. With htc sense and fancy roms like that, there will be more edits that need to be done, etc.
swamp goblin said:
I was actually going to add this to the op. The files I have included are nexus specific, but the actual process should work on tons of other devices.. There are a few areas that are nexus specific, such as build.prop edits and vendor folder, but other than that you should be able to follow this for other devices.
Or do you mean nexus s roms? This guide is kind of general porting; more of the basics. With htc sense and fancy roms like that, there will be more edits that need to be done, etc.
Click to expand...
Click to collapse
Well I own a Photon, another member pointed me here because I wanna learn how to port. My intention is to port HTC Sense to it, and learn something new in the process. I'm using the Photon-specific CM7 as a base, and the Energy Rom from the Sensation as my rom port. Since both run GB and are qHD devices, I figured these would be good starting points.
Thank you very much for your guide.
sivarticus85 said:
Well I own a Photon, another member pointed me here because I wanna learn how to port. My intention is to port HTC Sense to it, and learn something new in the process. I'm using the Photon-specific CM7 as a base, and the Energy Rom from the Sensation as my rom port. Since both run GB and are qHD devices, I figured these would be good starting points.
Click to expand...
Click to collapse
Yeah, you're set up perfectly. I am pretty sure you could follow this guide, although there may be some photon specific libs that have to be added..
swamp goblin said:
Yeah, you're set up perfectly. I am pretty sure you could follow this guide, although there may be some photon specific libs that have to be added..
Click to expand...
Click to collapse
Ok cool. I'm pretty sure it'll be a while before I ever get this port running, so in the meantime I'll be brushing up on what makes my phone tick, and for you to finish your little guide here.
I knew my EVO inside and out almost, so I'm hoping the Photon is easy to learn too. The file system for both is pretty similar, with the exception of Sense-specific files of course.

[DISCUSSION][DEV] TWRP for X8

Okay guys. So over the past few days I've tried to compile KXP (AOKP for X8, if you didn't know) and failed.....thrice. The main aim behind this was to get
a) AOKP m6 for X8
b) TWRP running on our device
Now a) is still resulting in failures but b)....well, let's just say it can still be worked on. So this is what I've done so far:
I compiled a CWM version (without compiling KXP) just to get the environment ready for building TWRP. Next I edited the BoardConfig.mk to include these lines under a heading of #twrp like this
#twrp
DEVICE_RESOLUTION := 320x480 (the device resolution)
RECOVERY_GRAPHICS_USE_LINELENGTH := true (this line is supposed to improve graphics on some devices)
TW_NO_BATT_PERCENT := true (this line prevents battery percentage display in the recovery GUI)
TW_NO_REBOOT_BOOTLOADER := true (self-explanatory; we can't reboot into bootloader, can we?)
TW_NO_REBOOT_RECOVERY := true (this option never worked for me and so I removed it)
I sent the binary (obtained by typing make -j# recovery after copying the TWRP repo to the bootable/recovery directory) to feherneoh (the dualboot dude) and asked him to use it in a kernel, changing nothing else but the recovery binary. He said the phone didn't even boot.
Now I've noticed there are a couple of other libs and files built with TWRP. And also there's another recovery binary in /out/target/product/shakira/symbol/system/bin.
What I'm trying to do is compile a kernel with this binary. So far feherneoh's failed. And I'm pretty sure there's something else that needs to be done. I know about the recovery GUI images; I will place them in the res folder and try again but I'm pretty sure it will fail.
So i'm asking experienced X8-ians to help me out, especially devs like Daveee10, Rohin, nAa, alfsamsung, djnilse....the list doesn't end.
Looking forward to replies.
This is what lead dev of TWRP, Dees_Troy had to say:
Re: Compiling TWRP for X8
Originally Posted by sgt. meow
Dear Sir,
I have started a TWRP-porting project for the X8. I have compiled the binary (make -j# recovery) using the following flags:
#twrp
DEVICE_RESOLUTION := 320x480
RECOVERY_GRAPHICS_USE_LINELENGTH := true
TW_NO_BATT_PERCENT := true
TW_NO_REBOOT_BOOTLOADER := true
TW_NO_REBOOT_RECOVERY := true
I haven't tested it myself. However I sent a fellow member (with experience in this field) the binary (from /out/target/product/shakira/system/bin) and asked him to integrate it with a working kernel, changing nothing else but the recovery binary. He said the phone didn't boot up. I believe the images from the /bootable/recovery/gui/devices/320x480/res/images have to be placed in the kernel too, in order to get it working. I am very new to this and would greatly appreciate if you helped me with the following:
What files are related to the TWRP recovery?
What has to be done to integrate it with a kernel?
What files need to be edited?
Do the libs built along with TWRP need to be installed on the phone?
Thanking you and the rest of Team WIN in advance
sgt. meow
Click to expand...
Click to collapse
Generally speaking, the actual recovery files would be in out/target/product/shakira/recovery/root. What you have to have for integrating into your kernel build will depend a little bit on how your kernel ramdisk(s) are packed. You'll need, at the very least, the etc (for the recovery.fstab), sbin (binaries and libs), and the res (theme and zip signature keys) folders. Recovery usually gets its own init.rc so you'll have to do whatever you need to do to get the recovery/root/init.rc integrated into your kernel or at the very least, modify an exising init.rc so that recovery gets the LD_LIBRARY_PATH value as covered in the guide.
Here's the link to a zip I uploaded: http://www.mediafire.com/?ad374fp01274e3z
It contains the output files when TWRP is compiled as a binary (in the "TWRP(binary files)" folder) and the ramdisk-recovery.cpio when TWRP is compiled as an image by issuing make -j# recoveryimag (in the "TWRP(image files)" folder).
Note: The binary didn't build the res images. They had to be taken from the gui folder of the bootable/recovery directory. However the images were there when TWRP was compiled as an image in the ramdisk-recovery.cpio.
Note 2: This is compiled using jb-wip branch. The first binary and image was compiled using master branch. I later found out that I was supposed to use the jb-wip branch instead of the master branch.
Well you should make it to compile with rom together. When its built then u will get "ramdisk-recovery.img" or zip... inside this one you will have all needed binaries and images. Then just open kernel ramdisk and replace those binaries. There are lot more needed binaries than just "recovery".
But first you must compile everything
Sent from my mind using fingers
You mean like make -j# recoveryimage.
sgt. meow said:
You mean like make -j# recoveryimage.
Click to expand...
Click to collapse
Try with brunch
Sent from my X8 using xda app-developers app
Problem with brunch is I run into some errors while compiling the ROM (which stop the building) so I won't get any end product. I tried recoveryimage and got a lot of ramdisk-***.img's and cpio's and what-nots.
sgt. meow said:
Problem with brunch is I run into some errors while compiling the ROM (which stop the building) so I won't get any end product. I tried recoveryimage and got a lot of ramdisk-***.img's and cpio's and what-nots.
Click to expand...
Click to collapse
Thats good too now extract ramdisk-recovery.img if you have it
Sent from my X8 using xda app-developers app
sgt. meow said:
Problem with brunch is I run into some errors while compiling the ROM (which stop the building) so I won't get any end product. I tried recoveryimage and got a lot of ramdisk-***.img's and cpio's and what-nots.
Click to expand...
Click to collapse
The brunch not help Tried a lot of variant (compile only the recovery/compile with rom/millions of different settings/etc...) The phone start the recovery, but not work (the best result is only a flickering image). Earlier I consulted with Daveee10, but he have same results.
I couldn't extract ramdisk-recovery.img but I extracted ramdisk-recovery.cpio and I get a lot of files in the sbin directory like recovery, sdparted, fix_permissions.sh, adbd and a lot of libs. In the etc directory there is a recovery.fstab.
pilu1978 said:
The brunch not help Tried a lot of variant (compile only the recovery/compile with rom/millions of different settings/etc...) The phone start the recovery, but not work (the best result is only a flickering image). Earlier I consulted with Daveee10, but he have same results.
Click to expand...
Click to collapse
Then we are missing some files or there are wrong configurations...
Sent from my X8 using xda app-developers app
How did you try pilu1978? I mean where did you place the libs and the binary?
sgt. meow said:
I couldn't extract ramdisk-recovery.img but I extracted ramdisk-recovery.cpio and I get a lot of files in the sbin directory like recovery, sdparted, fix_permissions.sh, adbd and a lot of libs. In the etc directory there is a recovery.fstab.
Click to expand...
Click to collapse
Now replace all the files in ramdisk with these new ones
Sent from my X8 using xda app-developers app
It won't work. I'm pretty sure about it.
EDIT: Okay apparently it is the right way. Sorry Xmaster8. Lesson learned.
Xmaster8 said:
Now replace all the files in ramdisk with these new ones
Sent from my X8 using xda app-developers app
Click to expand...
Click to collapse
Yes. I examined a disassembled recovery binary from other phone (what is working correctly), the recovery depends on these binaries:
libz.so, libc.so, libstlport.so, liblog.so, libcutils.so, libstdc++.so and linker. These binaries needed in the ramdisk.
But should these be in the sbin?
sgt. meow said:
But should these be in the sbin?
Click to expand...
Click to collapse
Yes, you can place here. Or any other place, but need to add the path in init.rc. For example:
export PATH /sbin
EDIT: I forgot, libm.so also needed
One more thing. Should I try this with ICS or JB?
sgt. meow said:
One more thing. Should I try this with ICS or JB?
Click to expand...
Click to collapse
If you built with ics source tree then ics and if jb then jb
Sent from my X8 using xda app-developers app
sgt. meow said:
One more thing. Should I try this with ICS or JB?
Click to expand...
Click to collapse
I tried with cm7 For my own goal the ICS/JB is too slow/unstable. But Daveee10 working on twrp with his own JB project, looks like he have same results with CM11 than me with CM7. I think the problem source is not the CM version, maybe something missing from the device specific files.

Dev help needed- make stock image rooted and flashable

As the title states, I am looking for a straight forward tutorial on how to take a factory image and make it rooted and flashable. The image is currently a tgz. I unzipped and it had recovery and bootloader as well as a few other img's, but those 2 will need to be deleted correct?
Sent from my HTC One X using xda app-developers app
dan.kels.r said:
As the title states, I am looking for a straight forward tutorial on how to take a factory image and make it rooted and flashable. The image is currently a tgz. I unzipped and it had recovery and bootloader as well as a few other img's, but those 2 will need to be deleted correct?
Sent from my HTC One X using xda app-developers app
Click to expand...
Click to collapse
There's a flash-all batch file in the (latest) factory image from Google. If you have Android SDK installed, I imagine running the batch file "should" just work (only thing needed on your end is to put the tablet in bootloader mode, and to make sure the driver is installed, which can also be acquired from Android SDK).
If the batch file doesn't run adb or fastboot on it's own even with the SDK installed, you might have to add the SDK's executable folder to PATH. There's a guide somewhere that explains it pretty well.
The above applies to Windows though. OS X and Linux would run the flash-all.sh file, but I have no idea on what's needed on either OS for the script to work.
Thanks for the reply. I am tracking that i have to run the .sh for linux. but what i want to accomplish is basically making it a stock rooted rom i can flash through custom recovery.
espionage724 said:
There's a flash-all batch file in the (latest) factory image from Google. If you have Android SDK installed, I imagine running the batch file "should" just work (only thing needed on your end is to put the tablet in bootloader mode, and to make sure the driver is installed, which can also be acquired from Android SDK).
If the batch file doesn't run adb or fastboot on it's own even with the SDK installed, you might have to add the SDK's executable folder to PATH. There's a guide somewhere that explains it pretty well.
The above applies to Windows though. OS X and Linux would run the flash-all.sh file, but I have no idea on what's needed on either OS for the script to work.
Click to expand...
Click to collapse

[LOLLIPOP] Xperia AOSP Project

hi all
we have included this device in open devices project
you can check news about project on
http://developer.sonymobile.com/knowledge-base/open-source/open-devices/
feel free to fork, build, fix and push back
Br
J
jerpelea said:
hi all
we have open up gits for Xperia Z,Z1,Z2 devices
http://developer.sonymobile.com/201...-aosp-for-xperia-on-github-video-open-source/
feel free to fork, build and push back
J
XDA:DevDB Information
Xperia AOSP Project, ROM for the Sony Xperia Z1
Contributors
jerpelea
Version Information
Status: Testing
Created 2014-10-16
Last Updated 2014-10-16
Click to expand...
Click to collapse
WHooop Whooop WHHHHOOOOP!! :victory::victory::highfive::fingers-crossed::good::cyclops::victory:
Thank you jerpelea!!!! :victory:
ps; sorry for OT, Just so SUPER excited by this news!!!!!
would this lead to a better generation of AOSP roms for Z1? with good battery and camera functionality?
jerpelea said:
hi all
we have open up gits for Xperia Z,Z1,Z2 devices
http://developer.sonymobile.com/201...-aosp-for-xperia-on-github-video-open-source/
feel free to fork, build and push back
J
XDA:DevDB Information
Xperia AOSP Project, ROM for the Sony Xperia Z1
Contributors
jerpelea
Version Information
Status: Testing
Created 2014-10-16
Last Updated 2014-10-16
Click to expand...
Click to collapse
Like the guy above me asked. How does the camera react on this one? Same functionality? Or loss of important parts like bionz etc..
Very Nice
Read somewhere that modem and camera are disabled.
So we can't know how the camera react at this moment.
Thank you very much! Will such devices as amami, togari etc. be added too?
Attention: "For example, the camera is not working and the modem is not enabled, which means you cannot make phone calls."
Von meinem Sony Xperia Z1 gesendet. Mit Hirn.
Please @jerpelea can you put up a tut for building this! :crying:
I have downloded the source, and setup the build environment like you said on github but having issues with the final out directory.
It builds 100%, no issues whatsover, but mkbootimg fails to build the boot.img and it doesnt build the system.img :crying: I only have the userdata.img, kernel, and a system folder (others as well but these three are the important ones, oh theres also the ramdisk.img as well)
I have tried compiling the system folder using mkfs.yaffs2 to a system.img file and that flashes fine, userdata.img flashes too but the kernel I have tried a few combos and I can flash the boot.img file using files I have compiled before but it never boots. Its hard to see whats going on because I think the system folder never flashes properly so I dont have access to adb or anything. Its hard to trouble shoot this as well because it "bricks" my device everytime and its time consuming getting it up and running again. The build.prop looks fine and all folders in system folder look spot on but I am clearly missing something. I tried the fastboot flashall as well but that didtnt do anything, it gives me an error saying something about it must be an OUT_DIRECTORY... or something (yes I have tried it from the out/target/product/honami/ directory but same error, I think its because its looking for a system.img file..)
Please can you give me a kick in the right direction? I have been pulling my hair out trying to flash this but its a no go.
Desperately want to get it up and running (I am prepared to even go a few days without the radio just to test it and I can live without the camera as well)
PS: Sorry for being such a noob!
NanoSurfer said:
Please @jerpelea can you put up a tut for building this! :crying:
I have downloded the source, and setup the build environment like you said on github but having issues with the final out directory.
It builds 100%, no issues whatsover, but mkbootimg fails to build the boot.img and it doesnt build the system.img :crying: I only have the userdata.img, kernel, and a system folder (others as well but these three are the important ones, oh theres also the ramdisk.img as well)
I have tried compiling the system folder using mkfs.yaffs2 to a system.img file and that flashes fine, userdata.img flashes too but the kernel I have tried a few combos and I can flash the boot.img file using files I have compiled before but it never boots. Its hard to see whats going on because I think the system folder never flashes properly so I dont have access to adb or anything. Its hard to trouble shoot this as well because it "bricks" my device everytime and its time consuming getting it up and running again. The build.prop looks fine and all folders in system folder look spot on but I am clearly missing something. I tried the fastboot flashall as well but that didtnt do anything, it gives me an error saying something about it must be an OUT_DIRECTORY... or something (yes I have tried it from the out/target/product/honami/ directory but same error, I think its because its looking for a system.img file..)
Please can you give me a kick in the right direction? I have been pulling my hair out trying to flash this but its a no go.
Desperately want to get it up and running (I am prepared to even go a few days without the radio just to test it and I can live without the camera as well)
PS: Sorry for being such a noob!
Click to expand...
Click to collapse
Sent from my GT-I9505 using XDA Free mobile app
Try using the new mkqcdtbootimg repo for kernel building, put it in system/extra. I've compiled successfully with aosp l-preview branch. Haven't tested the compiled rom though
krabappel2548 said:
Sent from my GT-I9505 using XDA Free mobile app
Try using the new mkqcdtbootimg repo for kernel building, put it in system/extra. I've compiled successfully with aosp l-preview branch. Haven't tested the compiled rom though
Click to expand...
Click to collapse
Thank you Sir!!! Yes! :highfive: That makes perfect sense! *doh* :silly: (i feel silly now)
Will try that. Really appreciate it!!! Thank you for the heads up and responding :good:
@NanoSurfer did you manage to build boot.img after copying the repo source to system/extras/ ? I wasn't able to Let me know if you did. I must be doing something wrong
tejaswi.rohit said:
@NanoSurfer did you manage to build boot.img after copying the repo source to system/extras/ ? I wasn't able to Let me know if you did. I must be doing something wrong
Click to expand...
Click to collapse
Hey bro
Nope. I put mkqcdtbootimg in my /bin folder so I could execute it from anywhere but it still wouldnt work (by the way, you have to compile mkqcdtbootimg using "make mkqcdtbootimg", wish someone told me that before ). So I compiled the kernel seperately and got a boot.img, put that in /out folder and tried fastboot flashall, nope no go. Useless.
I cannot make a system.img during compile time! I managed to make a system.img though by executing "make snod". I tried flasing that, with my userdata.img, boot.img, system.img. NOPE ,ALWAYS BRICKS!!!! Arrrgh!!!! Wtf?? Btw fastboot flashall simply does not work.
Anyway, I wish I knew how @jerpelea did it because I have tried EVERYTHING! Im super frustrated by this because it seems there is either
a) critical stuff missing to succesfully build.
b) information is way to vague.
Ive wasted a lot of time on this and Im getting tired of having to recover my phone everytime. So do yourself a favour bro and rather leave this until a proper tut is posted or someone can explain the steps in more detail.
Cheers
NanoSurfer said:
Hey bro
Nope. I put mkqcdtbootimg in my /bin folder so I could execute it from anywhere but it still wouldnt work (by the way, you have to compile mkqcdtbootimg using "make mkqcdtbootimg", wish someone told me that before ). So I compiled the kernel seperately and got a boot.img, put that in /out folder and tried fastboot flashall, nope no go. Useless. ............
Cheers
Click to expand...
Click to collapse
@NanoSurfer I compiled the ROM successfully and flashed it too. It booted up just fine. This is what I did.
I downloaded the sources of mkqcdtbootimg and then extracted the openssl libraries from Android Source and placed it in the mkqcdtbootimg source folder (place it inside libdtd folder too, not sure of the exact folder name)and typed "make". Initially I had an error regarding some linker error got it fixed by installing this package libssl-dev I'm running Ubuntu 14.04. Ok, so that resulted me in a mkqcdtbootimg executable. What I realized what while compile the compiler is calling mkbootimg when mkqcdtbootimg isn't there, so I renamed mkqcdtbootimg executable to mkbootimg and placed it in out/host/linux-x86/bin . I replaced the original mkbootimg.
Once I did that my compilation went smooth. I got all the required images in the out folder. I tried fastboot flashall that didn't work for me either. So these are the partitions are flashed manually.
1. userdata
2. cache
3. system
4. boot
5. recovery
Crossed my fingers and typed "fastboot reboot" and BAM! it booted right to the home screen
P.S. I have a Xperia Z2. I downloaded the Android Source for 4.4.4_r2 but the blobs seem to be for 4.4.2 as of now at least for Z2 so I had some issues regarding sensors. Going to change my branch and compile again. But other than that the ROM was smooth as silk
Don't give up
tejaswi.rohit said:
@NanoSurfer I compiled the ROM successfully and flashed it too. It booted up just fine. This is what I did.
I downloaded the sources of mkqcdtbootimg and then extracted the openssl libraries from Android Source and placed it in the mkqcdtbootimg source folder (place it inside libdtd folder too, not sure of the exact folder name)and typed "make". Initially I had an error regarding some linker error got it fixed by installing this package libssl-dev I'm running Ubuntu 14.04. Ok, so that resulted me in a mkqcdtbootimg executable. What I realized what while compile the compiler is calling mkbootimg when mkqcdtbootimg isn't there, so I renamed mkqcdtbootimg executable to mkbootimg and placed it in out/host/linux-x86/bin . I replaced the original mkbootimg.
Once I did that my compilation went smooth. I got all the required images in the out folder. I tried fastboot flashall that didn't work for me either. So these are the partitions are flashed manually.
1. userdata
2. cache
3. system
4. boot
5. recovery
Crossed my fingers and typed "fastboot reboot" and BAM! it booted right to the home screen
P.S. I have a Xperia Z2. I downloaded the Android Source for 4.4.4_r2 but the blobs seem to be for 4.4.2 as of now at least for Z2 so I had some issues regarding sensors. Going to change my branch and compile again. But other than that the ROM was smooth as silk
Don't give up
Click to expand...
Click to collapse
Ahhhhhh dude!!! A 1000 thanks to you mate!!! :highfive: YESSS VICTORY! :victory: She works... FINALLY :victory:
Man THANK YOU!!! I love you bro! :laugh: You made my day :good:
And a SPECIAL thanks to @jerpelea!!!!! Flip it was painful trying to figure this out but finally I've got it. I owe you @tejaswi.rohit
NanoSurfer said:
Ahhhhhh dude!!! A 1000 thanks to you mate!!! :highfive: YESSS VICTORY! :victory: She works... FINALLY :victory:
Man THANK YOU!!! I love you bro! :laugh: You made my day :good:
And a SPECIAL thanks to @jerpelea!!!!! Flip it was painful trying to figure this out but finally I've got it. I owe you @tejaswi.rohit
Click to expand...
Click to collapse
Congratulations @NanoSurfer Glad I could help How's the build ? Do you face any issues regarding screen brightness,rotation, sound and mobile network ? Those were the problems I had on my 4.4.4 build
tejaswi.rohit said:
Congratulations @NanoSurfer Glad I could help How's the build ? Do you face any issues regarding screen brightness,rotation, sound and mobile network ? Those were the problems I had on my 4.4.4 build
Click to expand...
Click to collapse
Same issues as you here are the problems I found:
1) mobile network broken
2) wifi not working
3) screen rotation not working
4) sound not working
5) brightness slider has no affect
6) internal storage showing as about 70mb
7) phone resets when restarted (like it does a factory wipe)
8) camera broken
9) Bluetooth broken
I managed to get the sound working though by flashing the aosp kernel from Sony's github I think I can fix wifi as well because I compiled the prima module, but I couldn't push it to system/lib as adb wouldn't allow it (read only file system) I'm still trying to figure out how to compile that module inline.
I think a lot of the problems are kernel related.
Interestingly tho, the performance is way better than I expected! Graphics and scrolling are very smooth.
Busy working on the issues. Will let you if I make any breakthroughs
I think I fixed the sound, just busy doing another build to test a few more things...
I'm struggling though to get the sim to work :crying: Also trying to fix wifi but I'm crossing fingers that the build I'm doing at the moment fixes that :fingers-crossed:
By the way, I was wrong previously about a few things, the data partition is actually displaying 100% correct and it doesn't reset after each boot. However, this was happening to me after I flashed a boot.img I compiled, I think maybe because I used a stock ramdisk Im just guessing but I don't know why. The kernel it builds with works just fine. If the next build is ok, I will post my device config files for others to play around with...
krabappel2548 said:
Sent from my GT-I9505 using XDA Free mobile app
Try using the new mkqcdtbootimg repo for kernel building, put it in system/extra. I've compiled successfully with aosp l-preview branch. Haven't tested the compiled rom though
Click to expand...
Click to collapse
working on the guide
br
J
to be able to build kernel you need
cd build && git cherry-pick 612e2cd0e8c79bc6ab46d13cd96c01d1be382139 && cd ..
before building
br
J
tejaswi.rohit said:
@NanoSurfer I compiled the ROM successfully and flashed it too. It booted up just fine. This is what I did.
I downloaded the sources of mkqcdtbootimg and then extracted the openssl libraries from Android Source and placed it in the mkqcdtbootimg source folder (place it inside libdtd folder too, not sure of the exact folder name)and typed "make". Initially I had an error regarding some linker error got it fixed by installing this package libssl-dev I'm running Ubuntu 14.04. Ok, so that resulted me in a mkqcdtbootimg executable. What I realized what while compile the compiler is calling mkbootimg when mkqcdtbootimg isn't there, so I renamed mkqcdtbootimg executable to mkbootimg and placed it in out/host/linux-x86/bin . I replaced the original mkbootimg.
Once I did that my compilation went smooth. I got all the required images in the out folder. I tried fastboot flashall that didn't work for me either. So these are the partitions are flashed manually.
1. userdata
2. cache
3. system
4. boot
5. recovery
Crossed my fingers and typed "fastboot reboot" and BAM! it booted right to the home screen
P.S. I have a Xperia Z2. I downloaded the Android Source for 4.4.4_r2 but the blobs seem to be for 4.4.2 as of now at least for Z2 so I had some issues regarding sensors. Going to change my branch and compile again. But other than that the ROM was smooth as silk
Don't give up
Click to expand...
Click to collapse

[Utility] Android Image Kitchen & Flasher APK

Hi all , I'm new here and I would like to present to you this simple application which backup, edit, repack and flash kernel.img or recovery img with a single click.
This apk need root.
All credit of unpak/repack tools used in my apk are to @osm0sis
atoxyd said:
Hi all , I'm new here and I would like to present to you this simple application which backup, edit, repack and flash kernel.img or recovery img with a single click.
This apk need root.
Click to expand...
Click to collapse
can I use this on snapdragon 615 stock kernel
Sent from my 6045X using Tapatalk
Yes, you can try
tested on htc desire 816, cm13
unpacks and repacks kernel and ramdisk successfully, but didn't extract or repack the dtbs (device tables image, kernel 3.4) so the repacked image won't boot.
Well I use in my apk AIK.mobile tools proposed by osm0sis.
atoxyd said:
Well I use in my apk AIK.mobile tools proposed by osm0sis.
Click to expand...
Click to collapse
https://github.com/osm0sis/AnyKernel2/ ?
from http://forum.xda-developers.com/showthread.php?t=2670512
bigsupersquid said:
tested on htc desire 816, cm13
unpacks and repacks kernel and ramdisk successfully, but didn't extract or repack the dtbs (device tables image, kernel 3.4) so the repacked image won't boot.
Click to expand...
Click to collapse
Hi, I test it on cm13 and I unpack recovery.img for HTC desire 816, I think it work fine.
If the apk didn't work properly that's means the boot image doesn't not following Google's standard format so you'll need to find other tools to unpack and edit your image.
atoxyd said:
Hi, I test it on cm13 and I unpack recovery.img for HTC desire 816, I think it work fine.
If the apk didn't work properly that's means the boot image doesn't not following Google's standard format so you'll need to find other tools to unpack and edit your image.
Click to expand...
Click to collapse
I can unpack, edit, and repack successfully.
but, it wont boot.
I used official twrp 3.0.0-0 recovery.img and cm13 boot.img both, tried without editing.
just unpack/repack/flash.
boots straight into hboot, which is what happens if I build a boot.img or recovery.img without dtbs.
I pointed to the anykernel2 link because I know its scripting handles dtbs.
the whole kernel device table thing is new to me, and so far only on this device, so I'm not very savvy with dtb work. been lucky enough that it was preconfigured in the build system for cm.
nero curin said:
can I use this on snapdragon 615 stock kernel
Sent from my 6045X using Tapatalk
Click to expand...
Click to collapse
Hi, did my apk work for you?
atoxyd said:
Hi, did my apk work for you?
Click to expand...
Click to collapse
only unpacking and repacking,didnt help on my device but yet again nothing else helps me compile kernel for this idol 3 so i guess this app works just not for me, bad luck :/
Sent from my 6045X using Tapatalk
Well, this is a beta version of my apk, only for testing, I use @osm0sis tools ,this doesn't mean that you have bad luck my friend, this is due to the limitation of @osm0sis tools, but I will find another way to make it universal apk. Okay
atoxyd said:
Well, this is a beta version of my apk, only for testing, I use @osm0sis tools ,this doesn't mean that you have bad luck my friend, this is due to the limitation of @osm0sis tools, but I will find another way to make it universal apk. Okay
Click to expand...
Click to collapse
The scope of my tools is for Google's Android image standard as defined in the bootimg.h header from AOSP/CM. My tool forks have the widest support available for images which are standards compliant, supporting all commonly used ramdisk compression formats.
Supporting Sony's ELF, MTK's labeled and Samsung's headerless image formats along with the standard images (not to mention Samsung's and others' various deviations based on the standard header) and having the script/app differentiate between them would be a very large and difficult undertaking indeed. If that's your plan then I wish you the best of luck in your efforts.
hey, ran more tests.
no issues with the dtb or other functions either.
backup and flash functions working fine too.
here, for your devices.xml
Code:
<!-- Desire 816 a5 (710C) added by bigsupersquid -->
<device>
<model>710C</model>
<kernel>/dev/block/mmcblk0p40</kernel>
<recovery>/dev/block/mmcblk0p41</recovery>
<cache>/dev/block/mmcblk0p42</cache>
</device>
thanks for your work.
eagerly awaiting your open source as well
atoxyd said:
Hi all , I'm new here and I would like to present to you this simple application which backup, edit, repack and flash kernel.img or recovery img with a single click.
This apk need root.
All credit of unpak/repack tools used in my apk are to @osm0sis
Click to expand...
Click to collapse
Thank you for adding the appropriate credit back to your post. Patching, cross-compiling and scripting has taken significant work. :good:
The only other thing that I'd ask is that you do not use the name of Android Image Kitchen or AIK in the title of your app. I'd like to suggest maybe "Image Editor and Flasher" as a snappy alternative?
bigsupersquid said:
hey, ran more tests.
no issues with the dtb or other functions either.
backup and flash functions working fine too.
here, for your devices.xml
Code:
<!-- Desire 816 a5 (710C) added by bigsupersquid -->
<device>
<model>710C</model>
<kernel>/dev/block/mmcblk0p40</kernel>
<recovery>/dev/block/mmcblk0p41</recovery>
<cache>/dev/block/mmcblk0p42</cache>
</device>
thanks for your work.
eagerly awaiting your open source as well
Click to expand...
Click to collapse
Thank you my friend , you are the only one who supported me , and from the beginning.
atoxyd said:
Thank you my friend , you are the only one who supported me , and from the beginning.
Click to expand...
Click to collapse
it's a useful project, definitely worth a little testing and feedback.
besides, i remember what a pain it was getting my xda account eligible for posting the project i was all gung-ho about sharing (optimus v boot from sd card if i remember correctly)
sharing is cool, but a lot of the feedback tends to be annoying when there's no logs or other usable information, just "it's broken" or "can you implement for me on device XYZ."
bigsupersquid said:
I can unpack, edit, and repack successfully.
but, it wont boot.
I used official twrp 3.0.0-0 recovery.img and cm13 boot.img both, tried without editing.
just unpack/repack/flash.
boots straight into hboot, which is what happens if I build a boot.img or recovery.img without dtbs.
I pointed to the anykernel2 link because I know its scripting handles dtbs.
the whole kernel device table thing is new to me, and so far only on this device, so I'm not very savvy with dtb work. been lucky enough that it was preconfigured in the build system for cm.
Click to expand...
Click to collapse
Did you have an unlocked bootloader ?
nothing changed on the device, unlocked and still s-on, I'm not sure what went wrong the first try.
PEBKAC error probably
(problem exists between keyboard and chair)
I release AIK&Flasher v2 , I use @xiaolu unpack/repack tools.
atoxyd said:
I release AIK&Flasher v2 , I use @xiaolu unpack/repack tools.
Click to expand...
Click to collapse
Please use a different name for your app as I have requested.

Categories

Resources