yashsingh1/xdaforums huggingface dataset:
[LG Nitro HD] Malnilion:
PMad,

I think you're confused about how to flash these CWM images. You can't simply "replace the mmcblk0p13 file" because it's not actually a file at all. It's a device mapping that's generated at boot. The only way to flash files over it is the dd command which replaces the contents of the block/partition with the image provided; or, you can mount the block/partition to a directory with the mount command and manually edit the contents in that manner. This is probably how we would have to flash the update.zip that sksm has provided.

We know mmcblk0p13 is the recovery partition, we just don't have a CWM that loads properly yet.
[LG Nitro HD] bytecode64:
Ok ive posted the whole device source folder for cwm , and also boarconfig.mk, tried various builds but all i get is a blank screen , probably some issue with boardconfig , hope developers with a nitro can contribute to it

EDIT,

was looking into kernel source code , found:

bootmsg_bytes_pos = (pMisc_part->dfirstsec*512);

printk(KERN_INFO"writing block\n");

bootmsg_size= sizeof("boot-recovery");

fota_reboot_result = lge_write_block(bootmsg_bytes_pos, "boot-recovery", bootmsg_size);

if ( fota_reboot_result != bootmsg_size )
{
printk(KERN_INFO"%s: write block fail\n", __func__);
return -1;
}

it seems bootloader needs a flag (like in LG Thrill 4g) to boot into recovery in misc partition.

if someone can comeup with code to add the above to /misc partition , include it in /prebuilt/setuprecovery
[LG Nitro HD] schwin97:
Looks like we need to put the string "boot-recovery" into the misc partition, at mmcblk0p25. And this needs to be written starting at dfirstsec*512 location in the partiion. I am guessing that means it wants to be offset by 512, but am not sure?

Any thoughts?

UPDATE: Odd, but my misc partition already has boot-recovery in it. Here is my misc partition...

dd if=/dev/block/mmcblk0p25 bs=512

boot-recovery recovery

--wipe_data

UPDATE: Everything was spaced, but I didn't use the code tags...
[LG Nitro HD] repherb:
@pokechapp: I guess you missed the post where Malnilion and I have come up with a permanent unbricking solution?? And if you will notice, i DID get some threads stickied once things got rolling along in them and will continue with this thread as well being stickied. We are all working together, it's some newbies that are starting threads without searching and they are being caught and deleted, which is why we have chrisd1a1 as our MOD and he is doing his job very well, i might add.

Please be patient :D , we are all as excited as you but please bear in mind, there was not a lot of cohesion between us at first with this thread/model and we didn't even have anyone as a Dev until last week. Heck, _I_ just stepped up as a Dev/Guinea Pig/Alpha Tester/whatever the Hell you want to call me and now that it has gathered a following, things will get sorted.
[LG Nitro HD] bytecode64:
ok peeps , it seems that LG is using CodeAurora (Android Optimized for QualComm chipsets) , https://www.codeaurora.org) , that's why my cwm was not working as expected , it has different structure, so it will take some time for me to understand the structure of this code aurora :(
[LG Nitro HD] aquariuz23:
Nice finding....at least now we know where to probe around, although it might bring us back to square one.
[LG Nitro HD] schwin97:
Looking in the source it looks like the FACTORY RESET string is put at the 7MB mark within the misc partition. I found this be digging through the kernel source as well - in lg_diag_testmode.c

lge_mmc_scan_partitions();
pMisc_part = lge_mmc_find_partition_by_name("misc");
factoryreset_bytes_pos_in_emmc = (pMisc_part->dfirstsec*512)+PTN_FRST_PERSIST_POSITION_IN_MISC_PARTITION;

The FACTORY RESET string is equal to "FACT_RESET_" followed by a number and carriage return. The number is from the following enumeration:

typedef enum{
FACTORY_RESET_START = 0,
FACTORY_RESET_INITIAL = 1,
FACTORY_RESET_ARM9_END = 2,
FACTORY_RESET_COLD_BOOT_START = 3,
FACTORY_RESET_COLD_BOOT_END = 5,
FACTORY_RESET_HOME_SCREEN_END = 6,
FACTORY_RESET_NA = 7,
}test_mode_factory_reset_status_type;

Testing this could be difficult as I am not totally sure how to use 'dd' to write to the offset denoted by PTN_FRST_PERSIST_POSITION_IN_MISC_PARTITION (which I believe is 512*2048*7, or 7MB's into the misc partition). I am also not totally sure what will happen if we write 'FACT_RESET_0' - if it will just boot into recovery, or if it will perform a true factory reset?
[LG Nitro HD] bytecode64:
By default the bootloader sends the -- wipe flag to the recovery init which would result into format , to prevent this , i have defined conf option in boardconfig.mk to ignore this flag ,

But the issue is before that point , ie the init wont load due to the fact that LG is using modified version of android (for qcom chipsets) , right now im syncing Codeaurora for msm8660 chipset , will try to compile the factor recovery before i port cwm
[LG Nitro HD] bytecode64:
dont know why im getting a feeling that bootloader is locked :s , even if i re flash the stock recovery with some modifications results into black screen and reboots :s
[LG Nitro HD] gte460z:
Is there an easy way to write just a hello world printout for the recovery (instead of the full CWM) to check if the bootloader is unlocked? Unfortunately I am the wrong type of Engineer to help with coding...
[LG Nitro HD] bytecode64:
i did reflash the stock recover with just commenting out the format lines , flashed it on my friends nitro (through fastboot and dd) same black screen and reboots

what im thinking is that the bootloader is checking the checksum of the partition ,
[LG Nitro HD] PMad:
If the bootloader is locked and you can use fastboot, you can try

fastboot oem unlock

to unlock the bootloader... But im thinking its probably not going to be that simple...
[LG Nitro HD] Malnilion:
I know we're playing with fire potentially, but is the bootloader in any place where we can dump it and examine its contents? We can worry about flashing it later if that proves necessary.

Messing with the bootloader gives me the heebie jeebies as it's one surefire way to brick the device if done incorrectly.
[LG Nitro HD] bytecode64:
Yes i already did that ,
[LG Nitro HD] alaskan84:
Got my ATT Nitro HD about 2 weeks ago.....following this thread;)
[LG Nitro HD] hem.acharya:
Getting nitro in some days and keeping tab on the developments to use custom aosp roms. Thank you all
[LG Nitro HD] Malnilion:
So, let's say CWM happens to be unachievable until we get the bootloader figured out.

I volunteer to flash any roms you come up with, bytecode64, because I know how to restore my phone if it doesn't boot lol
[LG Nitro HD] repherb:
I second that malnilion!! bytecode64, count me in for alpha/beta testing!!

And whatever state you can't get out of with your phone malnilion, i will get you out of :)

<Breaks out the diamond-bit chainsaw as the half-dead phone cringes in fear>

Revvvvvvvvvv Revvvvvvvvvvv Revvvvvvvvvvv!! MUAHAHAHAhahahahahaaaaaaa...........
[LG Nitro HD] aquariuz23:
u n that chainsaw reherb :p u must be a psycho...poor phone lol
[LG Nitro HD] PMad:
Any updates? And need any help with coding CWM?
[LG Nitro HD] bytecode64:
---------------------------------
[LG Nitro HD] dbjungle:
I'm willing to do some testing as well.
[LG Nitro HD] Malnilion:
@bytecode64,

I downloaded your img before you removed it, but I haven't flashed it. Did you figure something out? Or are you having second thoughts about providing a recovery image to people that will factory reset their phones? lol
[LG Nitro HD] schwin97:
Downloaded and flashed the image - didn't boot into recovery, but did do a factory reset... Ran just as advertised... :)
[LG Nitro HD] Malnilion:
Good, so that means that the bootloader doesn't CRC check the recovery partition. I guess we dig deeper into CWM. I really wish sksm would post again. He provided some excitement and then disappeared lol
[LG Nitro HD] bytecode64:
Well then good news , Here is the Summary of my Findings , after looking into each and every file of kernel source containing Korean names and LGE footprint

- How the recovery system Works:

1) when phone is started with vol down + power (and the user confirms to factory reset) the bootloader writes the flag FACT_RESET_3 in misc partition , black screen appears and reboots.

2) The real recovery mode starts here , when bootloader checks the flag of FACT_RESET_3 , instead of normal boot (ie second stage bootloader) , the bootloader boots the recovery partition (and writing the boot-recovery ....... recovery --wipde_data to /misc partition ,which is then passed to init of recovery)

4) when recovery is finished (ie in stock mode , format) the FACT_RESET_3 is replaced by FACT_RESET_6

- The partition structure

The blank sectors of recovery partition are FF instead of 00 (Hex , dont know why)

- The blink of LG Logos when you boot

the first logo you see is that of the bootloader , and when it blinks this means that the init.rc is being executed (from partition)

I tried replicating the above findings in my recovery image , and was able to boot to recovery mode , although i could'nt see the blink , it rebooted after that.

Right now im syncing the codeaurora repo , codeaurora servers were having some issues , its slow, when its done ill give it a shot

And before trying any recovery image do a "cat /dev/zero > /dev/bloc/mmcblk0p25" to reset boot commands
[LG Nitro HD] Malnilion:
I can confirm that the blink separates the bootloader from the partition image init. When I was on the SU640 rom, the second LG logo screen was different and said LG Optimus and had a reddish loading bar at the bottom.

This is good info, man, you've made great progress by figuring this all out. Do you have any idea what process happens when you issue the reboot recovery command? If I were to guess what happens with the default recovery image, I'd say it looks in the misc partition and sees that the FACT_RESET_3 flag has not been set and then gracefully reboots back to the system (thus why we see the recovery screen for a split sec before it reboots). Does this sound right?
[LG Nitro HD] repherb:
I can corroborate Malnilion's findings as it happened with me when i flashed the SU640 .kdz as well.

I wonder.... could the FACT_RESET_3 and FACT_RESET_6 flags be only 2 of other FACT_RESET_X flags than can be set??
[LG Nitro HD] sukudos:
It is similar to LG Revolution 4G (LG VS910)

http://wiki.rootzwiki.com/LG_Revolution_Software_Breakdown

the LG Revolution 4G (LG VS910) recovery and CyanogenMod source

https://github.com/thecubed/android_device_lge_revolution

Maybe you can get some inspiration from it.
[LG Nitro HD] repherb:
WOW! nice find sukudos!! That should speed things along nicely!
[LG Nitro HD] gte460z:
So I guess its safe to assume the bootloader is unlocked.
[LG Nitro HD] SolidHelix:
wow after that, I was expecting activity to boost in this thread...not stop completely...
[LG Nitro HD] keenz:
Not a coder myself :) Not much I can do. hah
[LG Nitro HD] repherb:
the silence is deafening i tell you... ooooooo can you hear that?? it's coders working... tikatap tikatap on the keyboards.....
[LG Nitro HD] bytecode64:
Finally caught that son of a biatch :

[ 2.071220] VFS: Cannot open root device "(null)" or unknown-block(0,0)
[ 2.071318] Please append a correct "root=" boot option; here are the available partitions:
[ 2.071543] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 2.071758] Kernel Version: Linux version 2.6.35.11 (bytecode@debian) (gcc version 4.4.3 (GCC) ) #3 SMP PREEMPT Fri Jan 6 16:03:49 EST 2012
[ 2.072020] g_mdm_status_change_counter = 0[<c0107f1c>] (unwind_backtrace+0x0/0x164) from [<c07a9a6c>] (panic+0x1ac/0x26c)

like cwm in one inch away once i figure out what to do about above :S

Complete Log:

http://pastebin.com/BAer8Qp1

Will compile the kernel tomorrow with root cmd line , hope it works
[LG Nitro HD] PMad:
[ 2.071220] VFS: Cannot open root device "(null)" or unknown-block(0,0)
[ 2.071318] Please append a correct "root=" boot option; here are the available partitions:

I think thats your key. Gotta pass the correct "root=" boot option to get it to boot from the recovery partition!

I dont know where you would find it, but nothing is currently being passed, which is why it says it cannot open root device "(null)".. Wherever that is, gotta put in the recovery partition!

Did you get this log from a normal boot, or when trying to boot recovery? Hopefully when trying to boot recovery.
[LG Nitro HD] scott0:
KICKASS!!!!!1
[LG Nitro HD] bytecode64:
Its Recovery mode boot log, ive compiled custom kernel (you can see bytecode@debian) ,packed it up with initrd for some testing
[LG Nitro HD] schwin97:
Give us a link please...
[LG Nitro HD] bytecode64:
And here we Go :(

http://www.youtube.com/watch?v=h3l0U8gQxng

Im not good at C , i need someone good at c to work on graphics.c
[LG Nitro HD] repherb:
It's okay bytecode, you got it loaded and i am sure the resolution issue is a simple issue for you. Thank you so much, you are doing a wonderful job!
[LG Nitro HD] dbjungle:
So it looks like it's working, but the graphics are messed up due to the Nitro's display. Is that accurate?
[LG Nitro HD] repherb:
that's why he posted the video..................
[LG Nitro HD] Machzelet:
I don't understand, is it not the same CWM in all of 2-cores LG devices? If not, what is the difference?
[LG Nitro HD] bytecode64:
What i can do in the mean time is Build a desktop UI for performing basic tasks like backing up and restoring system flashing etc , that will perform the taks via adb
[LG Nitro HD] repherb:
It's not the same code, as bytecode64 mentioned earlier on in this thread, this phone uses a different file structure and also a different version of the OS designed for the Qualcomm chipset in this particular unit called CodeAurora.
[LG Nitro HD] schwin97:
How about posting the code so the rest of us can tinker with the code and help figure this out?

Nice work by the way!
[LG Nitro HD] bytecode64:
Yes ill be posting the recovery.img and the source soon , regarding the screen issue , the issue is that this device has a 720p IPS display , the default graphics.c file in my opinion is not compatible with it. even for the recovery.img , i used initramfs instead of initrd which is used on most LG devices
[LG Nitro HD] Malnilion:
Holy smokes, this is awesome news. Is there any way you could coordinate with johnnyfever (the guy who started this thread: http://xdaforums.com/showthread.php?t=1429550)?
[LG Nitro HD] dbjungle:
I agree, awesome news indeed. This phone is largely the same as the LG Revolution on Verizon right? Have any devs figured anything out for it? I'll see what I can find out.
[LG Nitro HD] repherb:
The P930 is NOT largely the same as the LG Revolution, only the bootloader loads the same as sukudos pointed out. Nothing else about the revolution compares, or is identical to, the P930.
[LG Nitro HD] chiensibut:
does this mean we going to get CWM soon or never?
[LG Nitro HD] dalamchops:
think we already have it. Just can't see it w/ the messed up screen.
[LG Nitro HD] aquariuz23:
I like your negativity sir lol! :D ohhh I kid I kid :P hehe.
[LG Nitro HD] repherb:
It means we will see what bytecode64 comes up with. If he is reaching out to another coder to help him then the prospects are good that we will see a CWM for this superphone sooner than later!

Keep this in mind too: Once we have a working CWM for this superphone, then custom ROMs will follow shortly as coders can safely restore and flash without worries of screwing the phone up permanently so they can experiment, push the envelope, and show off the true potential of this phones' abilities.
[LG Nitro HD] aquariuz23:
Well, correct me if I am wrong, but CWM aside, don't we still need to figure out if the bootloader is unlocked right? Oh.....wait....being able to have CWM means it is unlocked correct?! :D

Also, a little offtrack here, but I remember back in the Atrix all this talk about Deodexing the phone. Well, why aren't we doing the same here with the Nitro? I haven't heard anyone mention about deodexing. Just wondering why :)
[LG Nitro HD] Malnilion:
Nobody's gonna try deodexing the rom without CWM to restore :)

Good things are coming, I swear. If I have to learn how to do them myself, I will lol
[LG Nitro HD] aquariuz23:
LOL true, I forgot about that. It's been so long -_-
[LG Nitro HD] bytecode64:
delay , as im preparing for my exams :S , i did added some tools and tweaking to the init script , now accessible via adb to backup restore and perform some simple tasks via commad line , system,sdcard,internal storage is now accessible , UI is the only thing left now :s. ill be posting (hopefully) the updated reovery.img and source today

EDIT:

Patching the graphics.c , it seems that the swap framebuffer support is not enabled for kernel , so ill give the patched graphics.c a try before uploading the source and scrambled recovery
[LG Nitro HD] gte460z:
Sounds exciting Bytecode! Backup and restore via ADB would be using zips right (basically using CWM from command line)? If so, that sounds awesome! Hopefully your graphics patch does the trick!
[LG Nitro HD] dbjungle:
You're amazing man. I appreciate your efforts so much.
[LG Nitro HD] Malnilion:
This is awesome :-) I would flash even this incomplete CWM just so I don't have to worry about needing to flash the SU640 rom ever again lol

Best of luck on your exams!
[LG Nitro HD] aimhelix:
I feel so guilty just waiting and watching in the sideline :( I wish I knew more stuff or even understood code, but alas, I'm a designer. Come the day I may do my part in makin' it look pretty.. then I'd be glad to help!
[LG Nitro HD] repherb:
Tinker,tailor, soldier, DESIGNER?? WTH?!?!? LOLOLOL!!!!!
[LG Nitro HD] chiensibut:
I want this so bad man, i wish i could help too, my major is to be a programmer I hope 1 day i'll be able helping out with stuff like this
[LG Nitro HD] PMad:
Did you get anyone to help with graphics.c? If not, PM me and I can help. I'm not super good with C, but I can do quite a bit, including some graphics, so I might be able to get it where it needs to be.
[LG Nitro HD] aquariuz23:
I love it when we all come together n try to help make things possible :) Always a heart-warming view. Hopefully we can make this work; it's just like that last deadbolt on the door that will open up to unimaginable possibilities.
[LG Nitro HD] bytecode64:
managed to get rid of frame buffer error but still its scrambled :'(

Here is the graphics.c

http://pastebin.com/dYe8eiu6

More detail on Hardware:

Size: 720x1280
Logical Density: 2.0
Font Scaling Factor: 2.0
Pixels Per Inch X: 326.57144
Pixels Per Inch Y: 328.40405

Renderer: Adreno (TM) 220
Version: OpenGL ES-CM 1.1
Vendor: Qualcomm
Max Texture Size: 4096x4096
Max Texture Units: 2
Extensions:
GL_AMD_compressed_ATC_texture
GL_AMD_performance_monitor
GL_APPLE_texture_2D_limited_npot
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_format_BGRA8888
GL_EXT_texture_type_2_10_10_10_REV
GL_OES_blend_equation_separate
GL_OES_blend_func_separate
GL_OES_blend_subtract
GL_OES_compressed_ETC1_RGB8_texture
GL_OES_compressed_paletted_texture
GL_OES_depth_texture
GL_OES_draw_texture
GL_OES_EGL_image
GL_OES_EGL_image_external
GL_OES_framebuffer_object
GL_OES_matrix_palette
GL_OES_packed_depth_stencil
GL_OES_point_size_array
GL_OES_point_sprite
GL_OES_read_format
GL_OES_rgb8_rgba8
GL_OES_stencil_wrap
GL_OES_texture_cube_map
GL_OES_texture_env_crossbar
GL_OES_texture_float
GL_OES_texture_half_float
GL_OES_texture_half_float_linear
GL_OES_texture_npot
GL_OES_texture_mirrored_repeat
GL_QCOM_binning_control
GL_QCOM_extended_get
GL_QCOM_tiled_rendering
GL_AMD_compressed_3DC_texture
[LG Nitro HD] bmxant:
I'd love to mess around with the code, but it would have to be on the device itself, correct?

Thanks again!
[LG Nitro HD] Malnilion:
Somebody mentioned something about the resolution being slightly different than 720x1280 for the boot screen. I'll try to find that post.

Edit, it was schwin97 in this comment and he says the resolution should be 736x1280: http://xdaforums.com/showthread.php?p=21022116
[LG Nitro HD] schwin97:
the rle-encoded boot images are 736x1280. If that can be set, t would be my first test.
[LG Nitro HD] gte460z:
Exactly what I was thinking when I saw the 720x1280 (I remembered your post about it). Change it to 736x1280 (if possible) and hopefully we will be unscrambled!
[LG Nitro HD] V@no:
I don't know where you guys got the 736x1280 but my original boot animation images are 720x1280, and also /system/media/bootanimation.zip/desc.txt contains:

720 1280 24
p 1 0 part0
p 0 0 part1

[EDIT]

nvm, re-read the reference post.
[LG Nitro HD] PMad:
I believe the actual resolution of the screen is 1280x736 and not 1280x720. The reason its advertised as 720p HD is because the screen resolution is so close, so since HD is "in", they advertise it as 720p HD to capture more buyers. Use any screenshot app if your phone is rooted and check out the screenshot size, its 1280x736
[Android Software/Hacking General [Developers Only]] scrollock123:
Hello, is it possible to add new language to phone that is self translated ? if yes then could you also post tutorial link ? I searched but found only app translate which i dont need, i just want to translate main system (like Call = to my own language etc)

thanks anyway for reading it
[General Questions and Answers] snowburst92:
Im sure this has been asked before but I havn't found an exact answer. Is there a ROM for HTC Desire Ice Cream Sandwich 4.0 with camera working usb mass storage working etc etc you get the picture. Im not exactly a noob at all this stuff but i can't seem to find a ROM for it.:confused: and yes my HTC Desire IS rooted. also just out of curiosity where is that folder that all paid apps are stored in? well how to access it more to the point?

Uh how do you check if its rooted cuz an app says it isnt but i did it yesterday with revolution Oo

Well in HBOOT it says S-OFF and at the top Revolutionary highlighted in pink so I guess that means it IS rooted?:confused:
[General Questions and Answers] snowburst92:
bump bump bump
[General Questions and Answers] snowburst92:
well in terminal emulator putting "su" i get permission denied how do i log in with super user?
[General Questions and Answers] luxulus:
Hi!

I'm currently using what probably is the only one ICS image for Desire out there - in its repacked incarnation - found in

http://xdaforums.com/showthread.php?t=1403113

Camera does not work, I had a random reboot while calling my brother, and while the mount2sd script seems to work well enough (my SD card is appropriately partitioned with a 500MB sd-ext) I just cannot manage to install Aldiko.

Otherwise ICS looks quite cool :-) Its browser finally seems ok.

To access all of your stuff I strongly suggest to install Android SDK on a PC and connect to the phone via adb. It may take a while to learn how to do it but it's definitely worth it.

If I'm not mistaken, paid apps are with all other apps under /data/app, at least mine are.
[General Questions and Answers] snowburst92:
meh thx but not interested in ones with functions disabled. unless u can tell me why ics is better then ginger or how to renabled camera n stuff ill pass
[General Questions and Answers] Dark3n:
lol don't be so demanding, ics is barely out.

time will come and there will be fully working ics roms.

for now be happy that there even is a public ics rom for your device, for those who want to test it.

there is an app on the market called "root checker", guess what is does ;-).
[General Questions and Answers] luxulus:
Amen to that.

Also, there's no such thing as rooting without then installing 'superuser'. Look for it in the market.

(I would have posted a link, but I've been antispammed)
[General Questions and Answers] Dark3n:
https://market.android.com/details?id=com.noshufou.android.su

i believe this is what you meant
[General Questions and Answers] luxulus:
Yes thanks ;-)
[General Questions and Answers] snowburst92:
Allready know im rooted. And just was wondering if any were out n if desire will get one