yashsingh1/xdaforums huggingface dataset:
[Miscellaneous Android Development] milaq:
awesome, good to hear that it works fine on the ku5400. i think it should also work on the su540.

thanks for all the work you put into uboot and self-signing.

i would love to try it but i have a few questions prior wrecking my b/l ;)

am i assuming correctly that /dev/block/mmcblk0p1 and /dev/block/mmcblk0p2 are xloader and uboot accessible from within android?

if i dumped these partitions (clk) would i be able to reflash those via usb4omap fastboot ("fastboot flash xloader")?

does the boot.img we would need to supply with the rom needs to be signed with ifttool?

what would happen to lg's usb download mode (volume-up while booting)?

p940-aboot.2nd is xloader, p940-u-boot_fastboot.bin is uboot for fastboot booting, p940-u-boot-signed.bin is uboot to be flashed to nand permanently - is this correct?

the partition names for xloader and uboot would be actually "xloader" and "uboot" even for the prada 3.0 (p940, su540, ku5400)?

i hope i didnt overwhelm you with questions. i just want be 100% sure about what i am doing.

thanks and much appreciated,

cheers
[Miscellaneous Android Development] wkpark:
I guess so,

you can check partition informatition by the following command

(KU5400 ICS case)

ls -l /dev/block/platform/omap/omap_hsmmc.1/by-name
lrwxrwxrwx root root 2012-11-26 03:20 boot -> /dev/block/mmcblk0p3
lrwxrwxrwx root root 2012-11-26 03:20 cache -> /dev/block/mmcblk0p12
lrwxrwxrwx root root 2012-11-26 03:20 divxkey -> /dev/block/mmcblk0p5
lrwxrwxrwx root root 2012-11-26 03:20 fat -> /dev/block/mmcblk0p13
lrwxrwxrwx root root 2012-11-26 03:20 fota -> /dev/block/mmcblk0p8
lrwxrwxrwx root root 2012-11-26 03:20 misc -> /dev/block/mmcblk0p6
lrwxrwxrwx root root 2012-11-26 03:20 mlt -> /dev/block/mmcblk0p15
lrwxrwxrwx root root 2012-11-26 03:20 nv -> /dev/block/mmcblk0p7
lrwxrwxrwx root root 2012-11-26 03:20 persist -> /dev/block/mmcblk0p14
lrwxrwxrwx root root 2012-11-26 03:20 recovery -> /dev/block/mmcblk0p4
lrwxrwxrwx root root 2012-11-26 03:20 reserved -> /dev/block/mmcblk0p9
lrwxrwxrwx root root 2012-11-26 03:20 system -> /dev/block/mmcblk0p10
lrwxrwxrwx root root 2012-11-26 03:20 u -> /dev/block/mmcblk0p2
lrwxrwxrwx root root 2012-11-26 03:20 userdata -> /dev/block/mmcblk0p11
lrwxrwxrwx root root 2012-11-26 03:20 x -> /dev/block/mmcblk0p1

sure. but the partition names are "x-loader" and "u-boot" and you can flash these like as following

fastboot flash x-loader x-loader.dump.bin.orig
fastboot flash u-boot u-boot.dump.bin.orig

I don't know ifttool option to make boot.img signed correctly but the boot.img can be singed by the following method

sh mkimg.sh my-kernel my-ramdisk.gz

and you will get the signed boot.img named "out.img"

(mkimg.sh script can be obtained at http://xdaforums.com/showpost.php?p=33799345&postcount=29)

same as the original LK bootloader. you will get into the S/W download mode

- aboot.2nd is only for the omap4boot to load unsigned u-boot_fastboot.bin

- original LK 2nd-bootloader (u-boot partition) will be replaced by the p940-u-boot-signed.bin by "fastboot flash u-boot"

- original LK 1st-bootloader (x-loader partition) is not changed. we don't have to change the x-loader part. (but P920/SU760/SU870 cases, xloader part need to be resigned)

x-loader and u-boot

you don't have to worry about that. P940 is almost unbrickable now :)
[Miscellaneous Android Development] milaq:
ahh, okay :)

thanks for explaining. will test later tonight.

keep up your awesome work mate

EDIT: alright, i made the step forward. let me share what happened.

booted into fastboot via omap4boot

flashed p940-u-boot-signed.bin to the u-boot partition

rebooted, lg logo popped up, was able to get into fastboot via holding volume-down and selecting fastboot. lg usb download mode was accessible via volume-up

signed a custom boot and recoveryimage with ifttool

flashed those via fastboot, stuck on lg logo (same via "fastboot boot boot.img")

also tried to boot to recovery via volume-down and choosing "recovery" -> black screen

reflashed stock clk bootloader dump i made before, recovery and boot images via fastboot (good thing i got a complete dump handy :P )

back to were i started off :)

maybe i made a mistake somewhere signing the images. i attached a custom signed recoveryimage. maybe (if you have a free moment, no haste :) ) you could have a look at it and sign it again in case i missed something. i could then try booting them again.

thanks and regards
[Miscellaneous Android Development] wkpark:
OK! goood!!

you dont have to sign the bootable images anymore. Please try to flash again with not signed boot.img and recovery.img

I will post detail later

anyway, you dont have to sign the bootable images anymore after flashing the signed new u-boot

thats the another reason why i ported the new u-boot.

and the attached singed recovery.img seems correctly signed.
[Miscellaneous Android Development] kgian2007:
Hello Milaq, I believe you receive feedback, I have a problem with gps I don' t get any satellites when using gps test and navigators don' t get any satellites too,I am from belgium,sorry for bad english
[Miscellaneous Android Development] milaq:
use this (https://play.google.com/store/apps/details?id=com.chartcross.gpstest) app to let your phone search for satellites under clear sky.

please post your logcat afterwards.

thx
[Miscellaneous Android Development] sorrowuk:
So with wkpark's new uboot etc we can have cm9 without using 2nd init ?

We can have our own kernel and load up cm9 directly ?
[Miscellaneous Android Development] kgian2007:
I did what you said gps test doesn't see any satellites
[Miscellaneous Android Development] milaq:
thanks mate, but i'll need a FULL logcat. the one you posted is missing the gps init.

would be best if you reboot your phone with gps disabled. then enable it and do that stuff again.

also, make sure you have a working data connection.
[Miscellaneous Android Development] kgian2007:
Ok I did it again hope it's correct
[Miscellaneous Android Development] wkpark:
And we can also change the kernel :)
[Miscellaneous Android Development] milaq:
:) thanks to the awesome work of wkpark we are nearing an unlocked bootloader.

well, there are still a few drawbacks:

booting an unsigned image works fine but it takes a long time before it inits (>30 seconds).

sometimes it doesnt boot at all - pulling the battery helps.

rebooting results in a dead state. pulling battery helps.

usb doesnt work; doesn't enumerate.

charging works but it takes an unusual delay of 2 up to 10 seconds before recognizing the charger.

this is what i've found so far.

wkpark, are these issues that can probably be solved?

also, the bootloader board name is "lgep940board".

mabye we could change it to just "p940" instead.

EDIT

one more (minor) thing: in fastboot, after flashing an image, it just locks up and you cannot flash another image. after a reboot everything works again. furthermore "fastboot reboot" results in a locked state (just as a normal "userspace" reboot)

furthermore i dumped the newly flashed uboot in userspace from mmcblkp02 and found out that there is the old bootloader data appended - after 0x003C550 (which would be the exact size of the flashed file - p940-u-boot-signed.bin) 72527 bytes of data get appended followed by the usual trailing zeros.

shouldn't "fastboot flash" erase the partition prior flashing?

could this be the culprit for the issues i am having?
[Miscellaneous Android Development] wkpark:
I dont have such issue

same issue of SU540

similar issue found

adb works fine for SU540/KU5400

I dont have this issue

lgep940board was "LGE P940 Board" found at /proc/cpuinfo

so you have to change your kernel or cmdline by adding "androidboot.hardware=p940"

or you can just add import /init.p940.rc on to of the init.rc (i guess you already know)

i didn't fix almost any functionality of the fastboot.

and p940/su540 does not use any NVDATA (I just disable all NVDATA functionality of p2(p940/su540/ku5400) from u-boot source)

I seems like almost all functions are works fine except warmboot etc.

---------- Post added at 07:55 PM ---------- Previous post was at 07:44 PM ----------

I made a small fix for the unsecureboot.

this fix use "ramdisk.gz" or "recovery.gz" that could be made by the mkbootfs.

it is more easy to fix ramdisk.gz rather than tarball for win32 users,

when tarball used, the permission is not correctly preserved under win32

but ramdisk.gz case we don't have to care about permission at all.

--- unsecureboot.orig 2008-02-29 03:33:46.000000000 +0900
+++ unsecureboot 2012-12-01 02:10:16.026686296 +0900
@@ -73,8 +73,14 @@
$BB rm /etc
$BB mkdir /etc

- $BB cp -fr /system/bootstrap/recovery.tar /
- $BB tar xf /recovery.tar
+ if $BB [ -f /system/bootstrap/recovery.gz ]; then
+ $BB zcat /system/bootstrap/recovery.gz | $BB cpio -iu
+ else
+ $BB tar xf /system/bootstrap/recovery.tar
+ $BB chmod 755 -R /
+ $BB chmod 750 /init /charger
+ $BB chmod 750 /*.rc
+ fi

if [ ! -z "$restart_adb" ]; then
$BB killall adbd
@@ -91,8 +97,14 @@
# normal mode
#
else
- $BB cp -fr /system/bootstrap/boot.tar /
- $BB tar xf /boot.tar
+ if $BB [ -f /system/bootstrap/ramdisk.gz ]; then
+ $BB zcat /system/bootstrap/ramdisk.gz | $BB cpio -iu
+ else
+ $BB tar xf /system/bootstrap/boot.tar
+ $BB chmod 755 -R /
+ $BB chmod 750 /init /charger
+ $BB chmod 750 /*.rc
+ fi

$BB killall ueventd
fi

cm9 patcher for SU540/KU5400 includes mkbootfs.exe / unpackbootimg.exe

http://d-h.st/wDK

mkbootfs.exe win32 binary ported by me. simply symlink function disabled
[Miscellaneous Android Development] milaq:
thanks for your feedback mate.

ah okay, thought the bl would just pass it. will change that in the kernel.

good point - tar is indeed a bit inconvinient in win32.

a few hours ago i worked out a simple signing method (based on your findings) for production use.

i utilise a signimg script which will sign any boot/recovery image thrown at it. this allows me to get red of 2nd-init entirely.

have a look at it here: https://github.com/milaq/android_device_lge_p940/commit/a4d81b3622b272660327b74f11701ed51ce05318

script only is here: https://github.com/milaq/android_device_lge_p940/blob/ics/releasetools/ifttool/signimg.sh

i will soon (tomorrow most probably) change from 2nd-init to normal (signed) boot for the recoveries and cyanogenmod.

if you have some time it would be awesome if you could push your sources to github (or just upload a zipped package or so).

thanks and good night
[Miscellaneous Android Development] sorrowuk:
Looking forward to cm9 without 2nd init :)

Also looking at the list most stuff seems to work. Do you think you can try compiling a cm10 version and see what works and what doesn't.
[Miscellaneous Android Development] milaq:
a full custom kernel will be included from tonights build on

this means no more 2nd-init and - most importantly - no recovery included in the system image. you need to install a full recovery from here (version 2.0 upwards):

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

reg. the kernel you can check out what i did so far here:

https://github.com/milaq/android_kernel_lge_p940/commits/ics

happy flashing,

cheers

EDIT: besides introducing new functionality the new kernel also fixes usb tethering
[Miscellaneous Android Development] hei1125:
Great!

Can you tell us when will you port CM10?

Thank you.
[Miscellaneous Android Development] saiz136:
Hi milaq,

I've been using a "reverse" tethering method since last week and so far so good! :thumbup:
[Miscellaneous Android Development] XperFD:
Hi Milaq,

Thank you very much for this great job. Out going calls were not possible on my P940 while connected to 3G network. This problem was there in stock GB as well as ICS. However after flashing your CM9 the problem is gone!!!!!!!!!. Now I can make out going calls on 3G network. Excellent job!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
[Miscellaneous Android Development] XperFD:
I am facing 2 problems:

1) Have problem with bluetooth audio. Bluetooth headset is pairing and connecting but audio is not routed to headset during calls. Is there any setting special to be done other than pairing in CM9??

2) Battery life is very poor when data connection is switched ON, but without any browsing, downloading etc.

Any suggestions/comments would be highly appreciated.
[Miscellaneous Android Development] milaq:
thanks for your feedback

1.) yeah audio is still a bit buggy, working on it.

2.) remember that the prada has a poor battery and the kernel is subpar when it comes to deepsleep, also working on it.
[Miscellaneous Android Development] XperFD:
Thanks Milaq, if you are aware of these problems, I know it wud be solved.
[Miscellaneous Android Development] XperFD:
Hi Milaq, I'm experiencing another problem. Occasionally the screen remains blank when there is an incoming call or incoming message. I can hear the phone ringing but can't answer it bcoz the screen is blank. If it is a message, the message notification tone will be heard and the front LEDs remain lit but the screen remains blank.The only way to restore phone to usable condition is by force shutdown(i.e keeping the power key pressed for around 10-15 seconds) and restarting it. I've experienced it in all the nightly builds tried, including the latest one (24-12-2012).

NB: I'm sticking on to CM9 bcoz I need tethering very badly.
[Miscellaneous Android Development] milaq:
if you experience this issue once more, a logcat would be awesome.

btw: fixed wifi tethering in cm10 yesterday

http://xdaforums.com/showpost.php?p=35911866&postcount=42
[Miscellaneous Android Development] killed:
Hi milaq,

The kernel of CM9/10 does not support call record two way

Here is my "CallRecoder by skvalex" application I'm using: https://play.google.com/store/apps/...sMSwxLDEsImNvbS5za3ZhbGV4LmNhbGxyZWNvcmRlciJd

When you fix it for support that from kernel?

Thanks!
[Miscellaneous Android Development] iulian vu:
I have a bug with internal sd card .When i connect the phone to PC via usb ,I can't see my folders in the internal sd card. There is a fix for this?
[Galaxy Note II Q&A, Help & Troubleshooting] Renz33:
Im having problems connecting to portable hotspot from my note 2 with my ipad and also my Samsung SIII.im able to connect via pc only.
[Galaxy Note II Q&A, Help & Troubleshooting] Renz33:
Can any1 confirm that my problem exist or do not exist?? At least some of u try n let me know pls
[Galaxy S III Themes and Apps] jcspecs:
Warning: Before using this program, please make sure it is in its own folder. There is a risk of losing files if it isn't. While I am working on a permanent fix, this approach is the current workaround.

I often update my firmware. Like many on here, I am some what of a flash-aholic.

I created this tool to assist in returning the mods and themes back on to a newly flashed device.

It works by combining several zips into one zip that can be flashed with ease.

It does this by combining the scripts into one, and adding all the files into one zip for the script to unpack. Please be aware that the zips must be compatible with your device.

It's very simple to use. Please give it a try and let me know how it goes:

Warning: Use this program at your own risk. If something goes wrong then it is your responsibility. If you use this program, then you accept that anything that does go wrong is your own responsibility.

Creating zips:

Download and extract the program.

Run the program.

Hit the settings button and set up an output directory or leave it as the default (program location).

Select the zips you wish to combine.

Add a name for the combined file.

Select advanced settings to apply any settings to the generation of the script.

Wait for them to load (the combine button will become usable).

Click combine button to join the zips into one zip.

The file will be put into a folder named Final Outputs within the output directory you have specified.

Wait for any processes to finish (windows should provide progress windows).

Click the sign button if you wish to sign the zip.

Using zips:

Copy the zip to the android device.

Boot into recovery (requires custom recovery).

Perform a Nandroid backup of your device (If you do not perform this step then it is your responsibility if something goes wrong)

Flash the combined zip file.

Please Note: This is a beta version of the software and, as such, may contain glitches and problems. Please advise me if anything goes wrong, and if it does, what happened and what files you were using so I can make it better.

Also, please be aware that this program requires .net 4.0 and the signing component requires the Java Runtime. Links to both can be found on the website.

Download Latest Version Here

Changelog.

Currently working on:

Unnecessary files (multiple boot.img for instance)
[Galaxy S III Themes and Apps] spirol:
This looks awesome ! :D

Backing up right away, and then I'll report back as fast as I can flash ;)
[Galaxy S III Themes and Apps] dikime:
Been doing the same thing manually, so this tool is a great time saver :)
[Galaxy S III Themes and Apps] spirol:
Okay, I've done a little testing :)

So far it seems to be working fairly good :)

Approach:

First I backed up (duh!)

Then I took the most wanted mods

- Inverted MMS, Calendar, Contacts (3 zips)

- MegaBassBeats

- NEAK 1.5K kernel

- Samsung App store

Used your tool to join the zips and I also signed it. Time to flash ;)

In recovery I started with formatting system and cache, and then I flashed newest Rootbox nightly + gapps + the combined zip file.

All the scripts ran through, but while installing NEAK kernel I get an error (Status 7). As it was the last file in the joined archive, I don't know if it would have kept going if there had been more files after the kernel :/

I flashed the original NEAK zip right after, and it went smooth.

Wiped cache+dalvik afterwards and it booted up just fine.

This tool is pure awesome and will save a lot of people a lot of time! :)

Thanks x1000, I will follow this thread closely as progress is done :good:
[Galaxy S III Themes and Apps] jcspecs:
Great! Thank you so much for the testing. I will have a look into the NEAK issue. Kernels might use a different command than standard packages, so something probably went wrong when adjusting the reference in the new script. The rest would not have continued after NEAK failed.
[Galaxy S III Themes and Apps] jcspecs:
Ok so the problem is that the kernel zips contain a boot.IMG and just flash that. The code in clockwork combiner at this point just grabs folders from zips, not files so error 7 popped up because it was referencing a nonexistent file. But I can fix that in no time.
[Galaxy S III Themes and Apps] jcspecs:
Latest version includes an auto update feature. Now fully working with no know problems.
[Galaxy S III Themes and Apps] spirol:
Tried out the latest version (1.3) and boot.img seems to go through just fine ;)

Tested with a compilation of:

NEAK 1.5K, MegaBassBeats, XXDLIB modem and an inverted calendar app.

and another one consisting of:

Siyah 1.6.8, GApps package, AwesomeBeatsV3 and XXDLIB modem.

Everything is working without any troubles, so I've voted for it to be featured on XDA Portal.

I also have a little feature request :)

It would be nice to have the option to add/remove cache/dalvik-wiping, so it doesn't wipe multiple times. This happens when I combine more apps containing those scripts. Not sure if this is what you mean by unnecessary code, or you mean the bloaty descriptions in some scripts :)

Also set it to auto-update, so we'll see how it goes ;)

Avast! doesn't seem to like the program, as it opens new versions in a sandbox... Not that I'm worried, just reporting :)
[Galaxy S III Themes and Apps] jcspecs:
Tested with a compilation of:

NEAK 1.5K, MegaBassBeats, XXDLIB modem and an inverted calendar app.

and another one consisting of:

Siyah 1.6.8, GApps package, AwesomeBeatsV3 and XXDLIB modem.[/QUOTE]

Great, very glad to hear.

Wow thank you!

Ok, I can remove all but the final cache/dalvik wipe?

Also I can remove all non necessary code if you like (all ui_print lines, except the ones telling you which mod it's applying), I was going to remove my bloaty signature and add small gentlemanly one at the bottom anyway.

Great, let me know how the auto-update goes. Been testing it out on my PC, but that's never the true test.

Probably because it is manipulating files. I'll look into it.
[Galaxy S III Themes and Apps] jcspecs:
I should be able to do this with generalised dalvik wiping:

delete_recursive("/data/dalvik-cache");

But I don't really want to mess with specific dalvik-wiping:

delete("/data/dalvik-cache/system@app@SystemUI.apk@classes.dex");

However, I can add on option to perform full dalvik-cache and/or factory reset.
[Galaxy S III Themes and Apps] jcspecs:
Found and fixed. Sorry about that. Forgot a -1.

1.4 and 1.5 were the same except an aesthetic fix so both would have given the error.
[Galaxy S III Themes and Apps] danarama:
This looks great. Can I assume its not been tested with vrtheme yet?

Can't wait to try it
[Galaxy S III Themes and Apps] spirol:
Afaik it hasn't been tested with vrtheme yet :)
[Galaxy S III Themes and Apps] jcspecs:
Should work fine with vrtheme. Will patch that update and ionic.zip file first thing in the morning.
[Galaxy S III Themes and Apps] jcspecs:
I used it to apply raubkatze's center clock mod plus variations no problem. AFAIK these are vrtheme. It should work fine with them as it just copies the vrtheme folders into the new update.zip as

-vrtheme

-vrtheme1

-vrtheme2

then changes the script references to flash them one at a time.
[Galaxy S III Themes and Apps] jcspecs:
Either is fine. Posting here keeps the thread refreshed though.
[Galaxy S III Themes and Apps] danarama:
Awesome, thanks guys
[Galaxy S III Themes and Apps] jcspecs:
Give it a try and let me know if there are any issues.
[Galaxy S III Themes and Apps] rumz82:
Im having the same issues here. Please can you advise? Thanks in advance.
[Galaxy S III Themes and Apps] kirvad:
you're the best! very useful tool
[Galaxy S III Themes and Apps] jcspecs:
Are you using version 1.7? If so, make sure that the Ionic.zip.dll is in the same folder as the application. Otherwise, update to 1.7.
[Galaxy S III Themes and Apps] rumz82:
That was on 1.6. Didn't realise there was 1.7.

I will download 1.7 and report back if it works or not.

Thanks for the heads up.
[Galaxy S III Themes and Apps] spirol:
1.7 works great :)

I'm getting an error (status 6), when flashing archives with kernels in them. Both NEAK and Siyah.

But the rest is going through fine, in archives without kernels.

All apps, themes, soundmods and modems I tested with works :)

I noticed that there is no notification in the script informing about dalvik-cache wipe, if it has been chosen. It's just a minor thing, and I'm sure people would know it anyway.

Absolutely the best release yet!

A little tip for other users - you can set the final output folder to your dropbox folder on your pc, for easy transfer to the device. ;)

Edit: Ohh, and it doesn't get picked up by Avast! anymore :D
[Galaxy S III Themes and Apps] jcspecs:
OK will double check what the cause of that is. I think avast was set off by calls to shell32.dll which isn't used anymore as it uses a third party zip library now.

I can add wipe notifications setting if you like.
[Galaxy S III Themes and Apps] spirol:
Nahh, don't bother ;) It's just a minor thing hat doesn't really have any impact of the outcome. Also, if you use the wipe option for the combo-archive, you would already be aware of it :)
[Galaxy S III Themes and Apps] jcspecs:
I did it anyway. It's only 4 lines of code. Working on the error 6 problem. Will pm you a beta. Also working on improving the updates including dependency checking and missing dependency auto download. Also working on improving the update process. Are least making it sleeker for me to implement.