Hovatek Forum DEVELOPMENT Android HELP Compiling ROM AOSP Android 6 for LGX20F
Can't login? Please, reset your password.
Hovatek is recruiting! Apply Now


HELP Compiling ROM AOSP Android 6 for LGX20F

HELP Compiling ROM AOSP Android 6 for LGX20F

tormenta1026
tormenta1026
tormenta1026
Junior Member
21
29-11-2018, 11:32 PM
#1



Hello since a few days ago I am trying to compile a rom aosp using the code provided by LG for my LGX240F device.

In the file (X240_X240AR_X240DS_X240DSF_X240F_X240H_X240I_X240K_X240Y_X240YK_Android_MOS_v10c.rar) are the following instructions I followed them to the letter and get the following files.

Code:

1. Android build
 - Download original android source code ( android-6.0.0_r1  ) from http://source.android.com
   ( $repo init -u https://android.googlesource.com/platform/manifest -b android-6.0.0_r1
     $repo sync -cdq -j12 --no-tags
     $repo start android-6.0.0_r1 --all
   )

 - Untar opensource packages of X240_Marshmallow_Android.tar.gz into downloaded android source directory
      a) tar -xvzf  X240_Marshmallow_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 aosp_hammerhead-userdebug
   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
       a) tar -xvzf X240_Marshmallow_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-3.18
   b) mkdir out
   c) make ARCH=arm64 CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- lv3_defconfig
   d) make ARCH=arm64 CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-android- -j4

   * "-j4" : The number, 4, is the number of multiple jobs to be invoked simultaneously.
 - After build, you can find the build image(Image.gz) at out/arch/arm/boot/zImage-dtb


recovery.img (9.78MB)
userdata.img (134MB)
cache.img (13MB)
ramdisk-recovery.img (1.70MB)
ramdisk.img (889KB)
boot.img (8.94MB)
system.img (348MB)
Image.gz (7.11MB Kernel)

When flashing the ROM with FlashTool only shows the LG logo and the device is restarted constantly, but as I understand it is because I still have to make my boot.img file with the kernel that I have compiled, but I can not find any tutorial that guides me to I would greatly appreciate your help.

System.img seems to me that it is a small file, but I have done it twice and it always weighs the same I guess it will be fine another curiosity is that when I flash the file userdata.img it gives me an error.
X3non
X3non
X3non
Recognized Contributor
22,062
30-11-2018, 10:08 AM
#2
(29-11-2018, 11:32 PM)tormenta1026 ...
System.img seems to me that it is a small file, but I have done it twice and it always weighs the same I guess it will be fine another curiosity is that when I flash the file userdata.img it gives me an error.

Extract ramdisk.img using 7zip
Extract image.gz (kernel) using 7zip
You might be able to get boot.img using those two. Attach a screenshot of the contents here
This post was last modified: 30-11-2018, 10:09 AM by X3non.
tormenta1026
tormenta1026
tormenta1026
Junior Member
21
01-12-2018, 05:51 PM
#3
(30-11-2018, 10:08 AM)X3non
(29-11-2018, 11:32 PM)tormenta1026 ...
System.img seems to me that it is a small file, but I have done it twice and it always weighs the same I guess it will be fine another curiosity is that when I flash the file userdata.img it gives me an error.

Extract ramdisk.img using 7zip
Extract image.gz (kernel) using 7zip
You might be able to get boot.img using those two. Attach a screenshot of the contents here

When decompressing ramdisk.img I get another file with the same name but without extension when unzipping it, these files were left.

[Image: 725848880e80026d9ac0e9d2335d7444a334cd92...ad8f24.jpg]

When decompressing Image.gz I get another file with the same name without extension but I am not able to unzip it with 7zip, it does not detect it as a compressed file, I will search in what form I can extract it.
freshtyt
freshtyt
freshtyt
Senior Member
2,949
01-12-2018, 10:04 PM
#4
(01-12-2018, 05:51 PM)tormenta1026 ...
detect it as a compressed file, I will search in what form I can extract it.

this is the list of files you have
recovery.img (9.78MB)
userdata.img (134MB)
cache.img (13MB)
ramdisk-recovery.img (1.70MB)
ramdisk.img (889KB)
boot.img (8.94MB)
system.img (348MB)
Image.gz (7.11MB Kernel)

from the list of files you have there already, there's boot.img. you don't need to create another one
try factory resetting the phone in recovery then see if it boots to homescreen if it doesn't boot to homescreen then it's likely there's something wrong with the system.img you have
This post was last modified: 01-12-2018, 10:05 PM by freshtyt.
tormenta1026
tormenta1026
tormenta1026
Junior Member
21
03-12-2018, 05:00 PM
#5



(01-12-2018, 10:04 PM)freshtyt
(01-12-2018, 05:51 PM)tormenta1026 ...
detect it as a compressed file, I will search in what form I can extract it.

this is the list of files you have
recovery.img (9.78MB)
userdata.img (134MB)
cache.img (13MB)
ramdisk-recovery.img (1.70MB)
ramdisk.img (889KB)
boot.img (8.94MB)
system.img (348MB)
Image.gz (7.11MB Kernel)

from the list of files you have there already, there's boot.img. you don't need to create another one
try factory resetting the phone in recovery then see if it boots to homescreen if it doesn't boot to homescreen then it's likely there's something wrong with the system.img you have

I can not enter Recovery mode when I upload those files.

Also I think it is necessary to make my boot with the kernel provided by LG if I accepted the one I created the compilation of aosp to put the other instructions?

Edit:

I try to flash the ones I get from compiling aosp and even I only have bootloop.
This post was last modified: 04-12-2018, 03:41 AM by tormenta1026.
Users browsing this thread:
 1 Guest(s)
Users browsing this thread:
 1 Guest(s)
YtWhTl
live chat
whatsapp telegram instagram