Curtis1973
Android Expert
I'm working on my first CWM build from source. Wish me luck.
you can do this. and even if its a little glitchy,its still a step forward
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
I'm working on my first CWM build from source. Wish me luck.
Good luck. I'm still trying to clone the cm repository. I started this repo sync command last night and its still running 8 hours later.I'm working on my first CWM build from source. Wish me luck.
I'm working on my first CWM build from source. Wish me luck.
What are the features in Leslie's ROMs?
Harmonia is always pretty much stock, no bloat... "What Virgin should have released". That doesn't mean it is always based on stock, many roms have issues with mods, or lack Gapps, etc... I focus on being a complete rom (everything you need, nothing you don't).What are the features in Leslie's ROMs?
Leslie can't wait to get my hands on one of those roms and start tweaking around, always used yours as my base for the OV.
Also I've seen it before but your signature just about always makes me laugh, not a android developer but there have been many nights with a computer behind me lighting up the room with a reformatting screen for equivalent reasons.
I was seemingly down to the last step where the IMG gets built... and I got an error that said the IMG was too large (not due to disk space) and so it gets automatically deleted. Bummer. Sorry, guys. I'll take another shot later.
[COLOR=#1f1c1b][FONT=Monospace] (sectors) (bytes)[/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] device start size start size mount name[/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p1 1 1000 200 200000 2.00 MiB ? dbl.mbn [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p2 1001 1000 200200 200000 2.00 MiB ? osbl.mbn [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p3 2001 3800 400200 700000 7.00 MiB ? fota [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p4 5801 2 b00200 400 1.00 KiB ? EBR [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p5 8000 8000 1000000 1000000 16.00 MiB /persist persist [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p6 10000 74000 2000000 e800000 232.00 MiB /cache cache [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p7 84000 2000 10800000 400000 4.00 MiB ? Unknown [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p8 88000 c000 11000000 1800000 24.00 MiB ? Misc. [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p9 94000 4000 12800000 800000 8.00 MiB ? Boot [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p10 98000 2000 13000000 400000 4.00 MiB ? modem fs1 [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p11 9c000 2000 13800000 400000 4.00 MiB ? modem fs2 [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p12 a0000 b4000 14000000 16800000 360.00 MiB /system system [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p13 154000 1c4000 2a800000 38800000 904.00 MiB /data userdata [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p14 318000 4000 63000000 800000 8.00 MiB ? Recovery [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p15 31c000 3dc000 63800000 7b800000 1.93 GiB ? SD Card [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p16 6f8000 e000 df000000 1c00000 28.00 MiB ? amss.mbn [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p17 708000 2000 e1000000 400000 4.00 MiB ? appsbl [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p18 70c000 4000 e1800000 800000 8.00 MiB ? adsp [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p19 710000 e000 e2000000 1c00000 28.00 MiB ? amssbak [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p20 720000 4000 e4000000 800000 8.00 MiB ? adspbak [/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace] mmcblk0p21 724000 8000 e4800000 1000000 16.00 MiB /mpt mpt
[/FONT][/COLOR]
[COLOR=#1f1c1b][FONT=Monospace]USE_CAMERA_STUB := true
# inherit from the proprietary version
-include vendor/LGE/m3s_virgin_us/BoardConfigVendor.mk
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := unknown
TARGET_CPU_ABI := armeabi-v7a
TARGET_BOOTLOADER_BOARD_NAME := m3s_virgin_us
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom
BOARD_KERNEL_BASE := 0x00200000
BOARD_KERNEL_PAGESIZE := 4096
# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00800000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00800000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x16800000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x38800000
BOARD_FLASH_BLOCK_SIZE := 0x40000
TARGET_PREBUILT_KERNEL := device/LGE/m3s_virgin_us/kernel
BOARD_HAS_NO_SELECT_BUTTON := true
# Use this flag if the board has a ext4 partition larger than 2gb
#BOARD_HAS_LARGE_FILESYSTEM := true
[/FONT][/COLOR]
What are you using for the BoardConfig.mk? That file has some values that looks like they are the size of our partitions and things like that. Since we don't have a usable /proc/mtd, I wrote a little app to pull the information from the phone. It asks the kernel for the information, and it also reads the raw flash and determines that information itself and then compares the two to make sure they match. It created this output:
And using that output, I ended up with this BoardConfig.mk:Code:[COLOR=#1f1c1b][FONT=Monospace] (sectors) (bytes)[/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] device start size start size mount name[/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p1 1 1000 200 200000 2.00 MiB ? dbl.mbn [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p2 1001 1000 200200 200000 2.00 MiB ? osbl.mbn [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p3 2001 3800 400200 700000 7.00 MiB ? fota [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p4 5801 2 b00200 400 1.00 KiB ? EBR [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p5 8000 8000 1000000 1000000 16.00 MiB /persist persist [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p6 10000 74000 2000000 e800000 232.00 MiB /cache cache [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p7 84000 2000 10800000 400000 4.00 MiB ? Unknown [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p8 88000 c000 11000000 1800000 24.00 MiB ? Misc. [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p9 94000 4000 12800000 800000 8.00 MiB ? Boot [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p10 98000 2000 13000000 400000 4.00 MiB ? modem fs1 [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p11 9c000 2000 13800000 400000 4.00 MiB ? modem fs2 [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p12 a0000 b4000 14000000 16800000 360.00 MiB /system system [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p13 154000 1c4000 2a800000 38800000 904.00 MiB /data userdata [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p14 318000 4000 63000000 800000 8.00 MiB ? Recovery [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p15 31c000 3dc000 63800000 7b800000 1.93 GiB ? SD Card [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p16 6f8000 e000 df000000 1c00000 28.00 MiB ? amss.mbn [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p17 708000 2000 e1000000 400000 4.00 MiB ? appsbl [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p18 70c000 4000 e1800000 800000 8.00 MiB ? adsp [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p19 710000 e000 e2000000 1c00000 28.00 MiB ? amssbak [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p20 720000 4000 e4000000 800000 8.00 MiB ? adspbak [/FONT][/COLOR] [COLOR=#1f1c1b][FONT=Monospace] mmcblk0p21 724000 8000 e4800000 1000000 16.00 MiB /mpt mpt [/FONT][/COLOR]
It does, indeed build a recovery image. But I'm not willing to run it yet without rereading a bunch of stuff to make sure i did it right.Code:[COLOR=#1f1c1b][FONT=Monospace]USE_CAMERA_STUB := true # inherit from the proprietary version -include vendor/LGE/m3s_virgin_us/BoardConfigVendor.mk TARGET_NO_BOOTLOADER := true TARGET_BOARD_PLATFORM := unknown TARGET_CPU_ABI := armeabi-v7a TARGET_BOOTLOADER_BOARD_NAME := m3s_virgin_us BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom BOARD_KERNEL_BASE := 0x00200000 BOARD_KERNEL_PAGESIZE := 4096 # fix this up by examining /proc/mtd on a running device BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00800000 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00800000 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x16800000 BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x38800000 BOARD_FLASH_BLOCK_SIZE := 0x40000 TARGET_PREBUILT_KERNEL := device/LGE/m3s_virgin_us/kernel BOARD_HAS_NO_SELECT_BUTTON := true # Use this flag if the board has a ext4 partition larger than 2gb #BOARD_HAS_LARGE_FILESYSTEM := true [/FONT][/COLOR]
USE_CAMERA_STUB := true
# inherit from the proprietary version
-include vendor/lge/vm696/BoardConfigVendor.mk
TARGET_NO_BOOTLOADER := true
TARGET_BOARD_PLATFORM := unknown
TARGET_CPU_ABI := armeabi
TARGET_BOOTLOADER_BOARD_NAME := vm696
BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom
BOARD_KERNEL_BASE := 0x00200000
BOARD_KERNEL_PAGESIZE := 4096
# fix this up by examining /proc/mtd on a running device
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x00380000
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x00480000
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 0x08c60000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 0x105c0000
BOARD_FLASH_BLOCK_SIZE := 131072
TARGET_PREBUILT_KERNEL := device/lge/vm696/kernel
TARGET_RECOVERY_INITRC := device/lge/vm696/recovery/recovery.rc
#BOARD_HAS_NO_SELECT_BUTTON := true
# Use this flag if the board has a ext4 partition larger than 2gb
#BOARD_HAS_LARGE_FILESYSTEM := true
Did you un/re-pack the recovery before installing it? I'm not sure if it will be required, but I'm pretty sure it won't hurt anything. What I mean is to let the build process create whatever it wants to create, and then using the abootimg program to stick the CWM ramdisk into our stock recovery.
As far as the BoardConfig.mk goes, I believe the BOARD_XXXX_PARTITION_SIZE need to be matched to our layout. If they are too small, the recovery may not wipe the full data when it tries to clear data/cache. If the numbers are too big, it may write past the end of one partition and into another one.
desktop:~/android/cyanogenmod$ out/host/linux-x86/bin/mkbootimg --kernel out/target/product/vm696/stockrecoverykernel --ramdisk out/target/product/vm696/ramdisk-recovery.img --cmdline "androidboot.hardware=qcom" --base 0x00200000 --pagesize 4096 --output out/target/product/vm696/hybridrecovery.img
We also may need to change BOARD_KERNEL_BASE to 0x208000. That is what our stock recovery has for hdr->kernel_addr. I didn't see a place to set the ramdisk address, second address, or tags address yet. But in our stock recovery, we have these.
hdr->kernel_addr 208000
hdr->ramdisk_addr 1300000
hdr->second_size 0
hdr->second_addr 1100000
hdr->tags_addr 200100
hdr->page_size 1000
(all values in hex)
If I had to venture a guess, I would say that this is why the repacked recoveries were not booting that were tried months ago. And that would also be why the abootimg program works to replace the kernel and ramdisk. It doesn't modify the addresses.