yashsingh1/xdaforums huggingface dataset:
[HD2 Android NAND Development] dansta34:
Mate your a legend no more modding the android policy jar and roise and such a simple fix something me and carl1961 looked at but must of overlooked you done good mate hope you dont mind me putting this in our rom's thanks a million
[HD2 Android NAND Development] hands9998:
Hmm... I got this problem too.

but this problem have situation screen off call

screen on call power botton work.
[HD2 Android NAND Development] hands9998:
Problem!!!

the end/power button does not work to hang up during a call.

but this problem occur using end botton in sceen off call

Using end botton in sceen on call is work
[HD2 Android NAND Development] dude0316:
OMG thanks a million. Works almost perfect. Cheers
[HD2 Android NAND Development] dharvey4651:
In my ROM I have 2 issues>

Can't wake up device with power key - Keypad lights up but only the other 3 buttons will wake up the device. The power key will not.

Can't use power key to end call - On-screen controls still work fine.
[HD2 Android NAND Development] hands9998:
yep I know these problem.

I think this problem is keemapping settings error.
[HD2 Android NAND Development] kinghunki:
Thank you very much !
[HD2 Android NAND Development] caedanne:
Did you try to add 116 POWER WAKE?
[HD2 Android NAND Development] hands9998:
Yes, 116 POWER WAKE already exist.

please view your qwerty.kl
[HD2 Android NAND Development] stouph52:
also works on your runny v1.3 ;) :D
[HD2 Android NAND Development] chrisrj28:
Thanks, this doors work but like others my power key does not end calls. I also noticed that I can't wake up my device with power, the backlight comes on but I have top press another button for the screen
[HD2 Android NAND Development] caedanne:
Sorry i'm with MIUI rom so I can't test it,

Can you try:

key 158 BACK WAKE_DROPPED

key 230 SOFT_RIGHT WAKE

key 60 SOFT_RIGHT WAKE

key 107 POWER WAKE

key 62 ENDCALL WAKE_DROPPED

key 229 MENU WAKE_DROPPED

key 139 MENU WAKE_DROPPED

key 59 MENU WAKE_DROPPED

key 127 SEARCH WAKE_DROPPED

key 217 SEARCH WAKE_DROPPED

key 228 POUND

key 227 STAR

key 231 CALL WAKE_DROPPED

key 61 CALL WAKE_DROPPED

key 232 DPAD_CENTER WAKE_DROPPED

key 108 DPAD_DOWN WAKE_DROPPED

key 103 DPAD_UP WAKE_DROPPED

key 102 HOME WAKE

key 105 DPAD_LEFT WAKE_DROPPED

key 106 DPAD_RIGHT WAKE_DROPPED

key 115 VOLUME_UP WAKE

key 114 VOLUME_DOWN WAKE

key 116 END_CALL WAKE_DROPPED

key 212 CAMERA

"

Give some feedback ;)

Hope it works
[HD2 Android NAND Development] Stickman89:
Woah really how did this get missed btw, people who have come from windows mobile devices and have been contributing to any sort of porting to android will know about this. Since we used these to remap the key functions, I put the first fully functional key mapping for our old android port on the HTC Elf using this method. Also Kaiser and Blackstone fun fun...

Oh btw people from the HTC Hero and that remember me, good news you've got something coming your way for the HD2 and DHD very soon ;)

Best Regards,

ST1Cl<^^aN
[HD2 Android NAND Development] caedanne:
Agreed... I think everybody assumes the error in services.jar file...
[HD2 Android NAND Development] Cheech1976:
I played around with the fix this evening and tried to simply exchange the endcall with the power.

The build i am using had the power menu working the first time only, after changing the lines accordingly i was able to activate the screen with the end button one time, but not a second time.

key 107 power wake

key 116 endcall wake_dropped

is what i used, and now, as already mentioned, the end key activates the screen only once (that would mean i can end the call in screen off mode once, didn´t test that) and the power menu works every time.

Since i am using Button Saviour anyway, i thought maybe i can try to use the back button to end a call, but i didn´t try that yet.

Edit: I just saw that these two lines state the same as the miui settings caedanne posted.
[HD2 Android NAND Development] :
Thanks for this! This makes a lot of sense since a lot of newer phones have dedicated power buttons.. Thanks again!
[HD2 Android NAND Development] Cheech1976:
I reverted back to the "original" qwerty.kl and changed the map of the "menu" key

from

to

I thought the Menu key was the key i would miss the least and with the app button saviour i can always enter that menu if i really need to.

Since this menu key is only a shortcut to some entries in the Settings menu, i think i can live with that the most.

The result is, that by long pressing the menu key the power menu will appear (every time) and by short pressing it, the display will be turned off.

So i can use the end key to a) awake the phone and (more importantly) b)end the call by pressing it.
[HD2 Android NAND Development] hands9998:
I'm try your solution but this solution is fail.

this solution's bugs equal my fix
[HD2 Android NAND Development] ketzazu:
It appears all the time!
[HD2 Android NAND Development] Kameirus:
can you share your version please

Thanks
[HD2 Android NAND Development] mlkjuggalo:
just installed and works just fine screen wakes just fine with the power/end call key and now i can power down the phone with out hot boot :)

thanks :):)
[HD2 Android NAND Development] mccmjoon76:
Some feedback on this amazing fix :D

I like the small Bugs :eek:

When u make or receive call u can press 'End' key to off screen the call won't be cancel by doing this ...Specially to guys like using speaker during call ..

Ha ha .. no need go to main screen 'during call' and off screen by using widget :)

Thanks hands9998 well done :D
[HD2 Android NAND Development] sbryan12144:
Agreed. I prefer to lock my phone during a call just to make sure my face doesn't press the end call button on accident. Technically, this is how it should work. DHD doesn't end call when pressing lock button, so good job man :)
[HD2 Android NAND Development] Cheech1976:
Sorry for not replying right away, i forgot to subscribe this thread and didn´t follow :D

Here is the qwerty.kl with which i have remapped the menu button to get access to the APM.

Edit: Didn´t upload due to the extension, just remove the .txt extension and you´re ready to go.
[HD2 Android NAND Development] mccmjoon76:
HTC Should add this feature on Native Phone he he ...:D
[HD2 Android NAND Development] TheAgent1982:
ReDO the fix...

Can you make zip file update to redo the fix, back to original, please?

I need to check somethings...

Thanks!
[HD2 Android NAND Development] Cheech1976:
You can edit the qwerty.kl file with a rooted explorer and change the line back to what it was (change 107 POWER ... back to 107 ENDCALL ...).

The file is in /system/usr/keylayout/
[HD2 Android NAND Development] Dunc001:
Does anyone know what the edit would be to have longpress back key (or menu key) to open the notifications (pull status bar down)?
[HD2 Android NAND Development] Ty5982:
hi,don't wanna come across as being daft,but im using RCMix3D Runny v4.0 rom and the power button works fine,i can't believe it myself,not had it for nearly a year lol,and its not the version where it only works once per boot,it works all the time,as for using root explorer,edit the file in system/user/keylayout/qwerty mine reads..........

key 107 power wake_dropped

key 62 end call wake_dropped

key 116 power wake............this might be factory settings,i'm not sure,but my power button works without any probs
[HD2 Android NAND Development] Cheech1976:
That´s because this fix is implemented in that rom.

Check the first post, hands9988 stated he changed the line with key 107 from endcall to power.
[HD2 Android NAND Development] dreamenvoy:
reboot is not a big deal for me
[HD2 Android NAND Development] bojanbl:
Does anyone have qwerty.kl or point to me what to do to make it so that long press of home button opens APM. I used to use End call key to actually end call...

Thanks!
[HD2 Android NAND Development] micelf01:
confused

All,

Im not clear. If I apply this patch, can I use the phone down key to end the call
[HD2 Android NAND Development] bojanbl:
No you cannot end call with hardware end call key if you apply this patch...

You can look HERE
[HD2 Android NAND Development] Stephen:
Is it possible to remap the qwerty.kl using the windows button? This seems to be the button I use the least. It would be nice to be able to use the end key to end a call and then use the windows button to power off.
[HD2 Android NAND Development] bojanbl:
Yes it is, look for few pages before how to do that...
[HD2 Android NAND Development] Stephen:
Awsome works exactly the way I want it to cheers :)
[HD2 Android NAND Development] Stephen:
Is it possible to remap the keys so that the answer call (button on left hand side) powers off the phone? I tried menu but found I needed it for other things. I never use the answer button at all so if I could have it as Power off and then have the power off key as call end and screen off that would be awsome!
[HD2 Android NAND Development] sbryan12144:
yeah man. it's possible
[HD2 Android NAND Development] Stephen:
Could you let me know the key layout and I will edit the qwerty.kl file!
[HD2 Android NAND Development] light_n_roses:
Hi !

have you made any package for this ? I would like to use your idea!
[HD2 Android NAND Development] msavic123:
Alittle help please

I tried editing qwerty.kl, to try and enable all of these features with end key:

Turn ON screen

Turn OFF screen + lock

Power menu, multiple times

and hang up.

Hang up is not all that important, i never do it with hw key.

But i am used to turning screen with END key, and it's annoying that it don't work.

Can somebody please help, as i am stuck.

I will post this qwerty.kl, which has power menu working, but cant turn screen on.

Just give suggestiong on what to change.

BTW, i use DesireHD 2.3.3 sense rom.

Cheers!
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
Partition information

===== PARTITION INFORMATION =====
ID : GANG (0x0)
DEVICE : MMC
FIRST UNIT : 0
NO. UNITS : 0
=================================
ID : BOOT (0x1)
DEVICE : MMC
FIRST UNIT : 0
NO. UNITS : 0
=================================
ID : EFS (0x4)
DEVICE : MMC
FIRST UNIT : 8192
NO. UNITS : 40960
=================================
ID : SBL1 (0x2)
DEVICE : MMC
FIRST UNIT : 49152
NO. UNITS : 2560
=================================
ID : SBL2 (0x3)
DEVICE : MMC
FIRST UNIT : 53248
NO. UNITS : 2560
=================================
ID : PARAM (0x5)
DEVICE : MMC
FIRST UNIT : 57344
NO. UNITS : 16384
=================================
ID : KERNEL (0x6)
DEVICE : MMC
FIRST UNIT : 73728
NO. UNITS : 16384
=================================
ID : RECOVERY (0x7)
DEVICE : MMC
FIRST UNIT : 90112
NO. UNITS : 16384
=================================
ID : CACHE (0x8)
DEVICE : MMC
FIRST UNIT : 106496
NO. UNITS : 512000
=================================
ID : MODEM (0x9)
DEVICE : MMC
FIRST UNIT : 618496
NO. UNITS : 32768
=================================
ID : FACTORYFS (0xa)
DEVICE : MMC
FIRST UNIT : 651264
NO. UNITS : 1048576
=================================
ID : DATAFS (0xb)
DEVICE : MMC
FIRST UNIT : 1699840
NO. UNITS : 4194304
=================================
ID : UMS (0xc)
DEVICE : MMC
FIRST UNIT : 5894144
NO. UNITS : 23826432
=================================
ID : HIDDEN (0xd)
DEVICE : MMC
FIRST UNIT : 29720576
NO. UNITS : 1048576
=================================
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
SBL Commands

Following commands are supported:
* movichk
* setenv
* saveenv
* printenv
* help
* reset
* boot
* kernel
* loadpart
* loadkernel
* erasepart
* format
* open
* close
* eraseall
* showpart
* addpart
* delpart
* savepart
* nkernel
* nandread
* nandwrite
* usb
* crc
* log
* sud
* upload
* emmc
* keyread
* readadc
* mmctest
* usb_read
* usb_write
* fuelgauge

There's some new ones in this 3.1 version of Samsung SBL

* crc

* log

* sud

* upload

* emmc

I think Upload allows a dump of all partitions. Also, Keyread allows testing of button presses, Volume - =0 Volume + = 1, Power = 2
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
I couldn't get a FULL debug log in the time I had, but I managed to get some kernel output.

Starting kernel at 0x40008000...
Uncompressing Linux... done, booting the kernel.
[ 0.000000] s3c_register_clksrc: clock armclk has no registers set
[ 0.000000] mout_audss: bad source 0
[ 0.000000] mem infor: bank0 start-> 0x40000000, bank0 size-> 0x10000000[30;89H[ 0.000000] bank1 start-> 0x50000000, bank1 size-> 0x10000000
[ 0.000000] CMA reserve : pmem, addr is 0x4fc00000, size is 0x400000
[ 0.000000] CMA reserve : pmem_gpu1, addr is 0x4f800000, size is 0x400000
[ 0.000000] CMA reserve : pmem_adsp, addr is 0x4f47c000, size is 0x384000
[ 0.000000] CMA reserve : fimd, addr is 0x4f17c000, size is 0x300000
[ 0.000000] CMA reserve : mfc0, addr is 0x4cd7c000, size is 0x2400000
[ 0.000000] CMA reserve : mfc1, addr is 0x4a97c000, size is 0x2400000
[ 0.000000] CMA reserve : fimc0, addr is 0x4a47c000, size is 0x500000
[ 0.000000] CMA reserve : fimc1, addr is 0x4967c000, size is 0xe00000
[ 0.000000] CMA reserve : fimc2, addr is 0x47e7c000, size is 0x1800000
[ 0.000000] CMA reserve : fimc3, addr is 0x4777c000, size is 0x700000
[ 0.000000] CMA reserve : srp, addr is 0x4767c000, size is 0x100000
[ 0.000000] CMA reserve : jpeg, addr is 0x4627c000, size is 0x1400000
[ 0.000000] CMA reserve : fimg2d, addr is 0x45a7c000, size is 0x800000
[ 0.000000] CMA reserve : (null), addr is 0x45a7c000, size is 0x0
[ 0.000000] (sec_debug_set_upload_magic) 66262564
[ 0.000000] (sec_debug_set_upload_cause) cafebabe
[ 0.121650] s5pv310_subrev: 1
[ 0.166379] ram_console: invalid start 0 or end 0
[ 0.251103] max8997 5-0066: max8997_irq_init: fail to read PMIC ID(-6)
[ 0.648050] [TSP] family = 0x81, variant = 0x1, version = 0x10, build = 170
[AT&T Samsung Galaxy S II SGH-I777] othermark:
Would be interesting to see the logs from a boot with the flash counter incremented (yellow triangle) to see if it's logged and what it's keying on.
[AT&T Samsung Galaxy S II SGH-I777] anilkuj:
Hi Adam,

Nice to see u here on this forum , hope to see some of your great work here on S II.
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
This is only possible using UART.

Download Mode without having to accept wipe!

Upload Mode

Stock PARAMS.lfs
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
You can reset the counter via UART
[AT&T Samsung Galaxy S II SGH-I777] agh1701:
What ROM did you dump JH7/KJ1/KJ2 ?
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Jig will reset it too - or will UART reset it even on the J2 bootloaders?
[AT&T Samsung Galaxy S II SGH-I777] pokey9000:
Can you flash back the J1 bootloader with ODIN? I'm willing to try this.
[AT&T Samsung Galaxy S II SGH-I777] UGART3:
Another big player from the captivate scene......I feel more comfortable fashing the SGS2 now that AdamOutler is in the house to help clean up the mess lol
[AT&T Samsung Galaxy S II SGH-I777] pokey9000:
Yay, I'm the first dumbass to brick his I777. Kids, don't run the "emmc" command.

FWIW, when USB is connected and battery plugged in, I get this device:

Bus 001 Device 011: ID 04e8:1234 Samsung Electronics Co., Ltd

Which ModeDetect says is Unbrickable Debug mode...
[AT&T Samsung Galaxy S II SGH-I777] XorZone:
Ah, I thought for a second I miss clicked forum and came to captivate one.

Happy to see you here, hope you will get your own attsgs2.

Thanks for spending time and sharing findings!
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
Yeah. So, you should try the SMDK Upload Tool.. this is good. this means you've established that UnBrickable Mod is possible on this device.

Now I need one for teardown.

Is it dead bricked? remove the battery and hold power for 10 seconds, then put back in the battery and hold it for 10 seconds. should turn on normally.
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
emmc usually means external MMC... try making a boot disk using the Fusing Tool. I bet it will work.
[AT&T Samsung Galaxy S II SGH-I777] pokey9000:
I'm not sure what I'd put on the card to tell if it worked...
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
That's what happens when it tries to upload a larger file then memory can handle.

The HIBL is a Hummingbird Interceptor BootLoader. We could use a Exynos interceptor bootloader.

Let me contact Rebellos and get him in here. That polish Hairy Potter can probly wave his magic wand over a memory dump and have it doing the hokey-pokey. He is busy and recovering from a serious loss while trying to get his device into the mode which your device is in currently... he could probly use some donations.

We will need someone with a working device to do a memory dump...
[AT&T Samsung Galaxy S II SGH-I777] Rebellos:
1a) I need few different bootloader images from I9100 and similiar SGS2 series models (I777 or whatever is it called for eg.), can you guys post these here?

1b) If you notice some weird files in ROM releases, like *.elf - post these too! These are very helpful in reversing stuff. Samsung released these for S8500 and S8530 bootloaders so here is also a chance.

2) If anybody has got rooted Exynos based device and some know-how about using SU functions - I need iROM dump.

The procedure should be 99% the same as in there http://blog.maurus.be/index.php/2011/01/samsung-i9000-irom-dump/

Just grab viewmem ARM binary http://blog.maurus.be/wp-content/uploads/viewmem and use script posted there. With small modification!

Instead of

try

if it doesnt work then try this

One/both of these should produce 64KB iROM image.

3) WANTED:

- newer manual than this one: https://dl.dropbox.com/u/36177984/SEC_Exynos4210_pulbic_manual_Ver.0.00.01.pdf (we don't know if it does exist)

- Exynos 4210 Application Notes

- Exynos 4210 Secure Booting Guide

And so on.

Thank you.

Don't fear the reaper.

//edit:

Also SGS2 series seems to be more unbrickable than SGS, I bet PBL has got functionality to boot from SD card. I don't see other reason why PBL would mount it before trying to look for SBL.

Disassembly will show.
[AT&T Samsung Galaxy S II SGH-I777] pokey9000:
I'm going to see about getting a replacement tomorrow as this is my daily driver. So I won't have it around to test anything. However, once I'm up and running again I'll try to get iROM dumped.

Meanwhile, tonight I'll see if I can fuse a 9100 PBL and SBL (they're supposed to be mostly compatible) to a microsd and test the external SD boot theory.

edit:

Hmm, looks like the fusing tool needs a monolithic PBL and SBL. My attention span for reading Google translated Korean forums is shot.

That's probably not necessary anyway, because I think the confusion here over "emmc" is due to the SGS2 using eMMC (embedded MMC) for the boot device as opposed to the i9000 which boots off of parallel oneNAND. The SGS2 is always booting off of MMC, it just happens that it's soldered down.
[AT&T Samsung Galaxy S II SGH-I777] Poulsen8r:
Taken from my GT-i9100T. Contains the output of both commands (first one did work though). Wish there was some better way I could help. I do know some Assembly, C and Verilog but I am no professional (I'm an Electronics Engineering student)

Good luck/work/etc
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Rebellos: I'll do those dumps on my I777 tomorrow morning or early afternoon.

I think you're right about SGS2 potentially being more brick-immune - an interesting thing is that our PIT seems to think the PBL is 0 bytes - so probably PBL actually resides elsewhere in a more "protected from damage" place.

Also: THANK YOU for that datasheet... Clock dividers documentation!!!!!
[AT&T Samsung Galaxy S II SGH-I777] ljwnow:
Hi Entropy....Sorry to trouble you here. I wonder if there is a stock i777 Odin flashable bootloader available...I am still using the i9100 old bootloader on my i777... Thank you!
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
I have sbl1/sbl2 dumps in my return-to-stock thread (buried in a post probably halfway through) - I haven't put them in the first post as they are dangerous and not a single person has flashed them yet. I do not know if dumps are directly flashable (dumps were not flashable on the Infuse), so all I will say is - they are dumps of the partitions that contain sbl1 and sbl2 from my phone. They are also not packaged in a .tar file.

Attempting to flash them may hardbrick you, or they may return you to an I777 bootloader. I don't know and I'm not testing on my own device.

They are at http://xdaforums.com/showpost.php?p=18376188&postcount=140
[AT&T Samsung Galaxy S II SGH-I777] ljwnow:
Thank you Entropy. Let me think about it whether to do it or not. I might do it....Fighting against myself now....:rolleyes:
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
You may wish to wait until the team of guys with JTAG recovery capability does more research...

If the current bootloader ain't broke, don't fix it.
[AT&T Samsung Galaxy S II SGH-I777] ljwnow:
I lost my balls this time... I will wait. Thank you Entropy!:p
[AT&T Samsung Galaxy S II SGH-I777] Rebellos:
Thank you all!

I need few SBL dumps more and IBL+PBL dumps also.

Repeating request for better Exynos4 manual - the one I have doesn't cover all SFRs (whole Power Managament Unit chapter is missing for example).

iROM seems to be very similiar to the one from S5PC110, however, they removed 90% of debug messages - much harder to disassemble with no helping strings. :(
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Dumps generated as follows attached:

viewmem 0x00000000 0x10000 > iromdump
viewmem 0x02000000 0x10000 > iromdump_mirror

These are from an SGH-I777

(man, that's annoying - XDA doesn't allow .tar.gz or .tar.bz2 attachments?)
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
Your mem dumps MD5 perfectly with the others. we have 4 confirmed memory dumps which are exactly equal.

These are the strings

[UART BOOT] Load boot binary and then press any key to download
[UART BOOT] Fail, Can not receive data ack
[UART BOOT] Fail, Can not connect to DNW

Unfortunately they do not display anything which relates to USB booting... This is not a concern though. It is not the same processor as the S5PC110. There may not be any message about USB OTG, only functionality..

Fortunately, we have UART as a booting option. the DNW utility can still be used. I never figured out how to use it before, but if it comes down to it, this will be an option.
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
Rebellos and I were talking. We need some more dumps.

from a terminal on your device, please execute the following..

get this binary into your /system/bin or /system/xbin folder http://blog.maurus.be/wp-content/uploads/viewmem then execute the following

viewmem 0x02020000 0x10000 > iram64
viewmem 0x02020000 0x20000 > iram128
viewmem 0x03000000 0x30000 > srpram

This will give us everything we need to get a UnBrickable Mod running for a i777.. or disprove it's possibility. Either way, this information is required.
[AT&T Samsung Galaxy S II SGH-I777] Poulsen8r:
Requested dumps from GT-i9100T (should be the same as i777, they are both Exynos)
[AT&T Samsung Galaxy S II SGH-I777] AdamOutler:
Awesome! Thanks!

Rebellos can interperate these better than I can, however he's out until tomorrow so I'll do what I can.

128k dump

???: 0-F64

???: 1394-2AF8

???: 3000-3330

???:33AE-42F0

String near 33AE SB20_CONTEX

String near 4164

bl: jump() verify_binary_integrity...\00\00fail
\00\00\00ok
\00Ibl: jump() jump!!!
\00\00\00\00Ibl: pbl_read_emmc441() read 8k
\00\00\00\00Ibl: pbl_read_emmc441() read 96k
\00\00\00Ibl: pbl_read_emmc441() read download info
\00Ibl: pbl_read_emmc441() endop

???:6BFB-6D00

???:73FF- 1FFE0

EOF

This rom dump is scarce on strings.

I can't really read much on the SRPRAM
[AT&T Samsung Galaxy S II SGH-I777] Entropy512:
Got all but the srpram - trying to read that caused the device to freeze. Attached is iram64 and iram128, along with a /proc/last_kmsg dump of the freeze.