As of May 26th this method might not work reliability for you.Try it, but don't get your hopes up.
If you want to help with finding new, oppoless, unlock methods, go here: https://forum.xda-developers.com/t/...t-unlocking-fastboot-on-oppo-devices.4490041/
UPDATE:There's info that from now on it can take up to 7 working days for your application to get checked!
Hello there!
If you'd like to submit an application to Deeptest successfully, here's a step-by-step guide:
prereqs:
Install https://strawberryperl.com/ on Windows. If you're using a Debian-esque system, you can use the command `apt-get install libwww-perl libcrypt-rijndael-perl`.
Download deeptesting-junk.pl [from here https://github.com/turistu/rmx3474-rooting/blob/main/deeptesting-junk.pl]
Obtain shell access (e.g., ADB shell, Termux failsafe, an app from the Play Store, etc.).
On Windows, run `chcp 65001` in your command prompt. This sets the console to UTF-8 encoding, allowing you to see Chinese text correctly in case of errors.
Now, execute the command getprop in your chosen shell and look for the following information:
ro.build.version.oplusrom [V13.0.0 on a13 RUI4]
ro.build.version.sdk [your Android version, in SDK format, e.g., 13 → 33]
run
Code:
perl deeptesting-junk.pl pcb 0xSSSSSSSS imei IIIIIIIIIIIIIII cmd applyLkUnlock otaVersion ro.build.version.ota os_version ro.build.version.oplusrom android_version ro.build.version.sdk
where SSSSSSSS is your Serial number (prefixed with 0x), IIIIIIIIIIIIII is the first IMEI. replace ro.* placeholders with actual values.
or alternatively
Open deeptesting-junk.pl in a text editor and locate %cfg.
put ro.build.version.oplusrom in os_version
put ro.build.version.sdk in android_version
run
Code:
perl deeptesting-junk.pl pcb 0xSSSSSSSS imei IIIIIIIIIIIIIII cmd applyLkUnlock
where S is your Serial prefixed with 0x and I is the first IMEI
Note regarding the model, rpmodel and oatVersion fields:
It's fine to leave them as is, but if that doesn't work, try putting RMX3081 in both model and rpmodel and the result of getprop ro.build.version.ota in otaVersion.
Before reapplying with different values, don't forget to close your application by running the same command from before, but with applyLkUnlock replaced by closeApply
Either way, the console should return {"resultCode":0,"msg":"SUCCESS"}
Now, open Deeptest and submit your application. You may need to wait for approval. After that, you can unlock your device as usual.
If you're not sure which Deeptest apk to install, try this one: https://forum.xda-developers.com/t/unlock-bootloader-help.4425415/post-86777721
Reminder:
Code:
* Unlocking your bootloader voids your warranty!!!
* I am not responsible for any damages that may occur to your phone!!!
All credit to https://github.com/turistu/rmx3474-rooting !
Please let me know if this method works for you.
melontini said:
Based on {Mod edit: Link removed! Oswald Boelcke, Senior Moderator}
I have no clue who made the original script, if you know, please tell me and I'll update the post.
Click to expand...
Click to collapse
@melontini Welcome to XDA! I hope you've always an enjoyable time here.
I've removed the link to 4pda from your post! 4pda is not only another phone related website (and not at all affiliated with xda-developers) but also well known for the distribution of malware and warez. Links or references to 4pda are not accepted on XDA at all.
XDA Forum Rules (excerpt):
...
6. Do not post or request warez.
If a piece of software requires you to pay to use it, then pay for it. We do not accept warez nor do we permit members to request, post, promote or describe ways in which warez, cracks, serial codes or other means of avoiding payment, can be obtained or used. This is a site of developers, i.e. the sort of people who create such software. When you cheat a software developer, you cheat us as a community.
(...)
11. Don’t post with the intention of selling something.
Don’t use XDA to advertise your product or service. Proprietors of for-pay products or services, may use XDA to get feedback, provide beta access, or a free version of their product for XDA users and to offer support, but not to post with the intention of selling. This includes promoting sites similar / substantially similar to XDA-Developers.com.
Do not post press releases, announcements, links to trial software or commercial services, unless you’re posting an exclusive release for XDA-Developers.com.
Encouraging members to participate in forum activities on other phone related sites is prohibited.
Off-site downloads are permitted if the site is non-commercial and does not require registration.
Off-site downloads from sites requiring registration are NOT encouraged but may be permitted if both of the following conditions are met:
A) The site belongs to a member of XDA-Developers with at least 1500 posts and 2 years membership, who actively maintains an XDA-Developers support thread(s) / posts, related to the download.
B) The site is a relatively small, personal website without commercial advertising / links (i.e. not a competitor forum-based site with purposes and aims similar to those of XDA-Developers.com.)
...
Click to expand...
Click to collapse
Please refrain from sharing of such links or references in future! Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator
A little update. I've got magisk working. Integrity & safetynet pass with zygisk & safetynetfix. LSPosed works fine.
Seems you don't need to change model in the PL file. In this cese i've got error like "this device not support deeptest" (it was chinese so I used google translator for it)
Any way it ssems working!
Simplest way I think is change config part in the PL script
For example my config part:
Spoiler: Check it here
Perl:
my %cfg = (
cmd => 'acquireClientStatus',
url => 'https://lkf.realmemobile.com/realme/v1/',
# lkf. if oppo.version.exp feature, lk. otherwise
# these are used to build the json POST data
model => 'RMX3461',
# ro.product.name [RMX3474EEA]
pcb => '0xSSSSSSSS',
# the serial number with 0x prepended [0x????????]
# ro.vold.serialno
# /proc/oppoVersion/serialID
# /proc/oplusVersion/serialID **
imei => '868853052000000',
# the first IMEI
otaVersion => 'RMX3081_11.F.03_3030_202304132230',
# ro.build.version.ota [RMX3474_11.?.??_????_202?????????]
clientStatus => 'i:0',
adbDvice => '',
# ro.oppo.operator []
# these are used to build the O_NETON: ... HTTP header
client_id => '000000000000000',
sso_id => 0,
rpmodel => 'RMX3461', # ro.product.model [RMX3474]
os_version => 'V13.0.0', # ro.build_bak.version.opporom
rom_version => '', # ro.build_bak.display.id
android_version => 33, # Build.VERSION_SDK_INT [31]
key_version => '1.0.3',
network_type => 'WIFI',
version_name => '1.0.1',
);
My serial and imei hidden so fill you data here
And after it just run
Code:
perl deeptesting-junk.pl cmd applyLkUnlock
Wait few minutes and check deeptest app or run:
Code:
perl deeptesting-junk.pl cmd checkApproveResult
You should see something like:
Code:
{"resultCode":0,"msg":"SUCCESS","data":{"unlockCode":"a82ae20(... long-long code was here....)534"}}
PS I can't loose all my data. I have to prepare backups and etc
So I didn't confirm unlock but I hope it should work
PS This script (or oppo/realme servers) returns error on chinese so use google translator and run once command below in console (should work on win 10/11). It will change code page to utf-8
Code:
chcp 65001
Klajnor said:
Seems you don't need to change model in the PL file. In this cese i've got error like "this device not support deeptest" (it was chinese so I used google translator for it)
Any way it ssems working!
Simplest way I think is change config part in the PL script
For example my config part:
Spoiler: Check it here
Perl:
my %cfg = (
cmd => 'acquireClientStatus',
url => 'https://lkf.realmemobile.com/realme/v1/',
# lkf. if oppo.version.exp feature, lk. otherwise
# these are used to build the json POST data
model => 'RMX3461',
# ro.product.name [RMX3474EEA]
pcb => '0xSSSSSSSS',
# the serial number with 0x prepended [0x????????]
# ro.vold.serialno
# /proc/oppoVersion/serialID
# /proc/oplusVersion/serialID **
imei => '868853052000000',
# the first IMEI
otaVersion => 'RMX3081_11.F.03_3030_202304132230',
# ro.build.version.ota [RMX3474_11.?.??_????_202?????????]
clientStatus => 'i:0',
adbDvice => '',
# ro.oppo.operator []
# these are used to build the O_NETON: ... HTTP header
client_id => '000000000000000',
sso_id => 0,
rpmodel => 'RMX3461', # ro.product.model [RMX3474]
os_version => 'V13.0.0', # ro.build_bak.version.opporom
rom_version => '', # ro.build_bak.display.id
android_version => 33, # Build.VERSION_SDK_INT [31]
key_version => '1.0.3',
network_type => 'WIFI',
version_name => '1.0.1',
);
My serial and imei hidden so fill you data here
And after it just run
Code:
perl deeptesting-junk.pl cmd applyLkUnlock
Wait few minutes and check deeptest app or run:
Code:
perl deeptesting-junk.pl cmd checkApproveResult
You should see something like:
Code:
{"resultCode":0,"msg":"SUCCESS","data":{"unlockCode":"a82ae20(... long-long code was here....)534"}}
PS I can't loose all my data. I have to prepare backups and etc
So I didn't confirm unlock but I hope it should work
PS This script (or oppo/realme servers) returns error on chinese so use google translator and run once command below in console (should work on win 10/11). It will change code page to utf-8
Code:
chcp 65001
Click to expand...
Click to collapse
Thank you for checking. I'll update the guide.
I've also checked what I sent to the server and I had the model set to RMX3081 (without postfixes).
melontini said:
I had the model set to RMX3081 (without postfixes).
Click to expand...
Click to collapse
I tried "RMX3081RU" and got error "model not supported..."
Probably server check only black-list and probably unlock code is not depends on it
{"resultCode":-1003,"msg":"申请不成功,30天内不能重复申请"}
The application was unsuccessfull, You canot apply again whitin 30 days
Have tried it, new start bootloader info, but bootloader still locked ...
Try to run
Code:
perl deeptesting-junk.pl cmd closeApply
And then try to applyLkUnlock again
domain is not configured.
perl deeptesting-junk.pl cmd closeApply
post(https://lkf.realmemobile.com/realme/v1/closeApply): 404 Not Found
StratOS_HTC said:
domain is not configured.
perl deeptesting-junk.pl cmd closeApply
post(https://lkf.realmemobile.com/realme/v1/closeApply): 404 Not Found
Click to expand...
Click to collapse
Uh, I think they just shut down the unlock servers. Amazing...
Update, everything is back online.
See updated post.
Update 2, should be working again!
StratOS_HTC said:
domain is not configured.
perl deeptesting-junk.pl cmd closeApply
post(https://lkf.realmemobile.com/realme/v1/closeApply): 404 Not Found
Click to expand...
Click to collapse
Have you tried resubmitting? Turistu says that the script's working again.
melontini said:
Have you tried resubmitting? Turistu says that the script's working again.
Click to expand...
Click to collapse
I too would like to know if it's reworking for anybody at all. I'm on GT2, but we're on the same boat. My post from the GT2 forum :
Script is working, deep testing app is successfully approved, but the "Start deep testing" button doesn't work as intended, it reboot the phone, show a fastboot message for a split second, and boot to the OS. Fastboot reboot bootloader/fastboot does the same. After reboot, OEM Unlock is automatically activated tho, so it's still doing something.
I've successfully unlocked another GT2 (EU) two days before they did their server "upgrade", so there is definitly something wrong/patched, or maybe the upgrade isn't done yet.
Lightning- said:
I too would like to know if it's reworking for anybody at all. I'm on GT2, but we're on the same boat. My post from the GT2 forum :
Script is working, deep testing app is successfully approved, but the "Start deep testing" button doesn't work as intended, it reboot the phone, show a fastboot message for a split second, and boot to the OS. Fastboot reboot bootloader/fastboot does the same. After reboot, OEM Unlock is automatically activated tho, so it's still doing something.
I've successfully unlocked another GT2 (EU) two days before they did their server "upgrade", so there is definitly something wrong/patched, or maybe the upgrade isn't done yet.
Click to expand...
Click to collapse
Deeptesting does 3 things when you press that button. It calls OplusExSystemService, which calls an engineering framework, which writes the unlock code into (oppo/oplus)reserve1 at a specific address; sets oem unlock to true using persistent_data_block service; reloads the phone into the bootloader.
If it boots you out of fastboot even after a successful application, this means they changed/broke their key generation algorithm and fastboot can't verify it.
I really hope this is just a bug.
Lightning- said:
I too would like to know if it's reworking for anybody at all. I'm on GT2, but we're on the same boat. My post from the GT2 forum :
Script is working, deep testing app is successfully approved, but the "Start deep testing" button doesn't work as intended, it reboot the phone, show a fastboot message for a split second, and boot to the OS. Fastboot reboot bootloader/fastboot does the same. After reboot, OEM Unlock is automatically activated tho, so it's still doing something.
I've successfully unlocked another GT2 (EU) two days before they did their server "upgrade", so there is definitly something wrong/patched, or maybe the upgrade isn't done yet.
Click to expand...
Click to collapse
Another thing you can try is, request your key using script's checkApproveResult and check that the key is 528 chars long and the last 16 digits are your serial in hex.
melontini said:
A little update. I've got magisk working. Integrity & safetynet pass with zygisk & safetynetfix. LSPosed works fine.
Click to expand...
Click to collapse
Hey my realme 8 pro (rm ui 4.0) has unlocked bootloader...
How can i flash magisk...Can you guide me on that?
melontini said:
Another thing you can try is, request your key using script's checkApproveResult and check that the key is 522 chars long and the last 10 digits are your serial in hex.
Click to expand...
Click to collapse
Total chars from unlockCode is 632 long, not a good start. Last 10 digits give me different serial. Mine is "6f02XXXX", with checkApproveResult it give me "8a79XXXX" after being converted to hex. Cannot find my serial even if I search it in decimal.
melontini said:
Another thing you can try is, request your key using script's checkApproveResult and check that the key is 522 chars long and the last 10 digits are your serial in hex.
Click to expand...
Click to collapse
It's rather 256 (the sig or whatever) + 8 (the serial no) = 264 which hex-encoded should have a length of 528 not 522.
Before and after I use "Start deep testing" :
Related
Can someone help me out ?
I need to send 150 SMS to our group but the Android limit is 100 per hour.
I found a solution here
http://www.mail-archive.com/[email protected]/msg63883.html
but really don't know how to work with sqlite. Can anyone give me a step by step manual to remove the period check and increase the number of SMS messages allowed per period ?
Thanks in advance
Why did the mods move this? This is more android development than the live wallpaper request. This at least modifys things at the OS level. Sorry ass mods.
Have you tried multiple programs? I dont even have 100 contacts to test this.
I'm no dev. but I do believe if your phone is rooted, you should be able to simply do adb pull, make the changes, then push the file back?
Leme' know if that works, just a thought
Well, I have the answer from Christopher
Like I mentioned, needing to remove the check is probably indicative that there's a better way to do things, but that answer pretty much covered the steps:
1. Obtain a device that has root access
2. Enter the device shell (the "adb shell" command) 3. Use the command line tools to alter the settings database 4. Reboot
For more details, check Google or try asking on StackOverflow.com as it's an official Android support channel.
Click to expand...
Click to collapse
Trying now
lol if you dont like the mods here...try androidoverdrive.com. they are pretty helpful there. I'm also interested in seeing if you get this to work.
I got it to work! Heres how(taken from link above):
Open Command Terminal and enter the following:
adb shell
sqlite3 /data/data/com.android.providers.settings/databases/settings.db
Then you'll see: sqlite>
Then enter the following to alter the limit
INSERT INTO gservices (name, value) VALUES('sms_outgoing_check_max_count', 101);
(change 101 to your new limit)
I didnt try altering the limit so I hope it works for you guys.. but I can confirm this next one works. It completely turns off the limit altogether.
To turn off the limit enter:
INSERT INTO gservices (name, value) VALUES('sms_outgoing_check_interval_ms', 0);
It worked right away for me.. (SMS Bomber >)) Id reboot to be safe.
could anyone help me out? i get "sqlite3 permission denied" when i try to access the db i'm positive i'm doing something wrong because i am new at this.... i plug the phone in, open cmd prompt, cd to the tools on my hd... typed in what was listed and that error came up let me know...! thx
skanndelus said:
could anyone help me out? i get "sqlite3 permission denied" when i try to access the db i'm positive i'm doing something wrong because i am new at this.... i plug the phone in, open cmd prompt, cd to the tools on my hd... typed in what was listed and that error came up let me know...! thx
Click to expand...
Click to collapse
type
adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
then sqite3 and so on...
Ok, I"m having trouble doing this on my EVO.
Here's what I've done so far:
1. Rooted with UnrEVOked
2. Installed SDK,
3. Added to path,
4. turned on usb debugging
5. connected with usb, drives did install
6. tested with adb devices, serial showed up
7. adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount: Operation not permitted
8. sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite3: permission denied
DancinDirk said:
Ok, I"m having trouble doing this on my EVO.
Here's what I've done so far:
1. Rooted with UnrEVOked
2. Installed SDK,
3. Added to path,
4. turned on usb debugging
5. connected with usb, drives did install
6. tested with adb devices, serial showed up
7. adb shell
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount: Operation not permitted
8. sqlite3 /data/data/com.android.providers.settings/databases/settings.db
sqlite3: permission denied
Click to expand...
Click to collapse
Are you sure you have superuser access then? Go into terminal and type in "su" and tell me what you get.
Had a long day... how do I get into terminal?
DancinDirk said:
Had a long day... how do I get into terminal?
Click to expand...
Click to collapse
Your going to need to download it from market=p. Since the evo doesn't have a keyboard though you might need to use something like better terminal which lets you use a virtual keyboard.
When I try:
INSERT INTO gservices('sms_outgoing_check_interval_ms', 0);
SQL error: near "0": syntax error
I am using a rooted HTC (Sprint) Hero running the Aolysuis 2.1 rom.
Disregard everyone. Apperently you have to enter that whole command as written. I thought maybe he was giving a general syntax structure and then provoding us with specific values....that is what it looked like to me but no
INSERT INTO gservices (name, value) VALUES ('sms_outgoing_check_interval_ms', 0);
is the whole command...kind of silly looking if you ask me.
dsMA said:
Disregard everyone. Apperently you have to enter that whole command as written. I thought maybe he was giving a general syntax structure and then provoding us with specific values....that is what it looked like to me but no
INSERT INTO gservices (name, value) VALUES ('sms_outgoing_check_interval_ms', 0);
is the whole command...kind of silly looking if you ask me.
Click to expand...
Click to collapse
May look silly, but that's how Structured Query Language is written. Don't be intimidated or embarrassed by the mistake, no worries!
Also, I have added this how-to guide on my website, located in my signature. OP, excellent find and great guide.
any idea why I'm having to repeat this process every couple of days?
mejorguille said:
Are you sure you have superuser access then? Go into terminal and type in "su" and tell me what you get.
Click to expand...
Click to collapse
I have tried everything from the steps above to just typing
C:\Users\Israel David>cde C:\android-sdk-windows\tools
'cde' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Israel David>cd C:\android-sdk-windows\tools
C:\android-sdk-windows\tools>sqlite3 /data/data/com.android.providers.settings/d
atabases/settings.db sqlite3 /data/data/com.android.providers.settings/databases
/settings.db
sqlite3: Error: too many options: "/data/data/com.android.providers.settings/dat
abases/settings.db"
Use -help for a list of options.
C:\android-sdk-windows\tools>sqlite3 /data/data/com.android.providers.settings/d
atabases/settings.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> INSERT INTO gservices (name, Value)
...> VALUES('sms_outgoing_check_interval_ms',0);
Error: unable to open database "/data/data/com.android.providers.settings/databa
ses/settings.db": unable to open database file
SECOND WAY ......
C:\android-sdk-windows\tools>sqlite3 /data/data/com.android.providers.settings/d
atabases/settings.db
SQLite version 3.6.22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> INSERT INTO gservices (name, value) VALUES('sms_outgoing_check_interval_
ms',0);
Error: unable to open database "/data/data/com.android.providers.settings/databa
ses/settings.db": unable to open database file
IN BOTH WAY THEY SAY UNABLE TO OPEN DATABASE FILE AND I DO HAVE ROOT ACCESS I HAVE CHECKED
I am using a Sprint Hero! Flash 2.1 ROM I need to find a way to erase the LIMIT because I have 4 groups with over 200 people that receive daily txts and I have tried using Command Prompt and Terminal and on Command Prompt it says that sqlite3: not found and on Terminal adb: not found or permission denied
I have su permission
Just tried to do this on my newly updated 2.2 evo (OMJ build) and I got
SQL Error: no such table: gservices
Has this hack/fix changed in 2.2 or did they remove the limit?
I cant get SQLite3 to work at all:
sh-3.2# sqlite3
sh: sqlite3: command not found
Everytime I try to install the LGMobile Support Tool it won't go any further on the progress bar than just above the 'ob' of LGMobile.
Has anyone else had this issue and managed to resolve it - i know there was a thread back in may but nothing since then
I've tried both on a windows7 x64 and windows xp sp3 machines
regards
this is just a quick update and may help others who end up having same issues - the reason the app freeses during install is because it accesses the internet on port 9002 - once you allow this port outbound on your router/firewall the installation will work fine.
Do not remove the setting otherwise you can't run the app after it's installed as it connects to internet again..
regards
Mine didn't install on win 7 64 bit
Xp sp2 was totally fine
Sent from my LG-P990 using XDA App
Hi i have same problem,but i don´t know how to allow 9002 port a tried to look for tutorials on google but i didn´t find anything that works and i still cant istall lg mobile support tool
What router do you have Branding/model?
internet explorer
sani340 said:
Hi i have same problem,but i don´t know how to allow 9002 port a tried to look for tutorials on google but i didn´t find anything that works and i still cant istall lg mobile support tool
Click to expand...
Click to collapse
hi, i had the same problem and was able to install the update tool on internet explorer instead of google chrome. thought it might be helfull
the thread is written solved but we actually needs step by step guide.
how?????
walkerx said:
Everytime I try to install the LGMobile Support Tool it won't go any further on the progress bar than just above the 'ob' of LGMobile.
this is just a quick update and may help others who end up having same issues - the reason the app freeses during install is because it accesses the internet on port 9002 - once you allow this port outbound on your router/firewall the installation will work fine.
Do not remove the setting otherwise you can't run the app after it's installed as it connects to internet again..
regards
Click to expand...
Click to collapse
HOW do you do that??????
wee2000 said:
the thread is written solved but we actually needs step by step guide.
Click to expand...
Click to collapse
Yes, how did you solve this??
I would like to say some really bad word for the OP, as this kind of behavior is the worst!!!
F YOU MAN!
there is nothing worse than presenting the problem, and telling after that: "ok I solved it, move on ..." << well youare a douche. biggest one there is.
Change hosts file
Hi there all, I had the same problem and solve it while going to hosts file C:\Windows\System32\drivers\etc
Open up hosts file with notepad and delete any line that does not have hashtag "#" in front.
So it should look something like this :
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for
# Windows.
#
# This file contains the mappings of IP addresses to host
# names. Each # entry should be #
# kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding
# host name. # The IP address
# and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on
# individual # lines or following
# the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
#
#
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Save it, File --> Save ot Ctrl+S and close. Double click on B2CAppSetup.exe and let me know if it worked for you.
Cheers
Unable to Install the LG MOBILE SUPPORT TOOL
Klindic said:
Hi there all, I had the same problem and solve it while going to hosts file C:\Windows\System32\drivers\etc
Open up hosts file with notepad and delete any line that does not have hashtag "#" in front.
So it should look something like this :
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for
# Windows.
#
# This file contains the mappings of IP addresses to host
# names. Each # entry should be #
# kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding
# host name. # The IP address
# and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on
# individual # lines or following
# the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
#
#
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
Save it, File --> Save ot Ctrl+S and close. Double click on B2CAppSetup.exe and let me know if it worked for you.
Cheers
Click to expand...
Click to collapse
The above method didn't work for me. Please help suggest an alternate method or another OS build where this might work.
I know it's old post but today i have problem installing lg mobile support tool.
i install lg pc suite first and then voila lg mobile support tool installed.
Igoritza said:
I would like to say some really bad word for the OP, as this kind of behavior is the worst!!!
F YOU MAN!
there is nothing worse than presenting the problem, and telling after that: "ok I solved it, move on ..." << well youare a douche. biggest one there is.
Click to expand...
Click to collapse
WTF are you *****ing about??? He thinks he solved the problem by allowing port 9xxx (it is not the solution, but all the same...) and now you would like someone to solve it for you at your home on your own router?!?!?
F U man!! what else would you like???
in your windows explorer, right click on the downloaded setup file named "LGMobileSupportTool" and go to file properties. In the attributes section, check Unblock. You must have administrator privileges. Run the file as admin.
Hi guys, in my case it was caused by running LG Bridge app on the background so go to tray and kill this app then installer of support tool was able to finish loading.
Hello everyone
I am more than aware that this is a very old thread, so let me explain myself a bit.
Basically, i have an old optimus l7 ii (wrong phone for this thread, ik but where else am i going to ask) that i want to update to kitkat from jb. to do that, i have to install this tool for the cse flash in lg flash tool 2014 to work. problem is the exact same one as in the original post, except none of the methods mentioned here worked for me. not opening port 9002,editing the hosts file, closing lg bridge, running it as admin, nothing at all. i think the reason why it doesn't work might be because the servers needed for the installer to work are down (what with lg now having shut down their mobile division and everything). still though, i need some way for this to actually work (if there is one even at this point)
How to obtain bootloader unlock code for any Huawei Phone/Tablet
Hello,
for first, sorry for my bad english, I'm from Czech Republic.
In this topic, I'll show you, how to get bootloader unlock code by official way.
(tested on Huawei Ascend P7).
------------------------------------------------------
You will need:
Huawei Phone/Tab
Huawei ID (easy login with Facebook or create now account)
Product model, Serial number, IMEI, Product ID (I'll show you how obtain this info later)
------------------------------------------------------
Gathering information about you phone/tab (PM, SN, EMEI, PID):
1) Product model
a) Take your phone/tablet
b) Go to options
c) Scroll down to section "About phone"
d) Note your Model number (first line) - HUAWEI P7-L10, etc.
2) Serial Number
a) Look on the phone box (see image below)
3) IMEI
a) Look on the phone box (see image below)
4) Product ID
a) Open your dialer
b) Call *#*#1357946#*#*
c) PID will show on your screen
---------------------------------------------------------------
Putting info to Huawei Bootloader Unlock Site:
a) Open this page: h t t p://emui.huawei.com/en/plugin.php?id=unlock&mod=detail (delete spaces in HTTP)
b) Log in to Huawei ID, if you already not
c) Set product type (phone or tab)
d) Put PM, SN, IMEI and PID to right boxes
e) Solve Captcha
f) Press Submit
g) The unlock code appears under captcha (red text, something like: Your unlocking password is:87XXXXXXXXXX5492)
And that's it, you have your bootloader unlock code!
IMAGE OF BOX (IMEI AND SN):
h t t p://s15.postimg.org/8vytgqte3/IMG_20150822_161516.jpg (delete spaces in HTTP)
Thanks, I try to do today. My English is to bad to. [emoji14]
Enviado desde mi HUAWEI P7-L10 mediante Tapatalk
Does anyone know why there isnt an option for the p7-L00?
Oob1e said:
Does anyone know why there isnt an option for the p7-L00?
Click to expand...
Click to collapse
I found this post h t t p://forum.xda-developers.com/showpost.php?p=62162312&postcount=32
Which outlined what to do.
Doesnt give me an unlock code sadly
Hello guys, unfortunately didn't work for me
After I've submitted all the information i got this message: Sorry you must use a phone account to submit this application
What????
I'm stuck with the same phrase and no success
Alsaya said:
I'm stuck with the same phrase and no success
Click to expand...
Click to collapse
I also had the same problem.. Solved it by logging in using my facebook account! Hope this works for you
Lankern98 said:
I also had the same problem.. Solved it by logging in using my facebook account! Hope this works for you
Click to expand...
Click to collapse
I was unable to log in with Facebook account, just stuck at login page after Facebook authentication. Weired !
Purpose
What is the purpose of this thing?(Unlocking Bootloader) Anyone please? thank you.
I cant get it
Hello, you sent an email to [email protected] with all information for models L10 and L21, i tried it a few times, but i didnt get any answer. Can you help me ? The L-21 phone is from T-Mobile
Quick update for everyone stuck in the Need phone account!
I miss placed my box and only had the phone to work with! I was trying with the serial number that I found in Settings -> About -> Status, but that is just wrong... Also registering account with my email Kept on saying just that error!
As suggested in this thread, I Logged in using Facebook and then it showed me My Serial Number and EMEI do not match;
then I went digging into service menu and found the Actual serial number.
Dial: *#*#2846579#*#*
It will present you with the service menu, then go to Option: 2. Veneer Informations > 4. Other info
You will see your Serial number AND EMEI number there...
Hope this helps
It requests a Phone account.
Facebook login gives a logging error.
How do you get this working?
Another question is,
what is AT LOCK and FASTBOOT LOCK ?
(found them with the Dial: *#*#2846579#*#* provided by rjeevan)
Thanks
You are my hero!
......... it showed me My Serial Number and EMEI do not match; ......
Dial: *#*#2846579#*#*
It will present you with the service menu, then go to Option: 2. Veneer Informations > 4. Other info
You will see your Serial number AND EMEI number there...
Pajke said:
Hello,
for first, sorry for my bad english, I'm from Czech Republic.
In this topic, I'll show you, how to get bootloader unlock code by official way.
(tested on Huawei Ascend P7).
------------------------------------------------------
You will need:
Huawei Phone/Tab
Huawei ID (easy login with Facebook or create now account)
Product model, Serial number, IMEI, Product ID (I'll show you how obtain this info later)
------------------------------------------------------
Gathering information about you phone/tab (PM, SN, EMEI, PID):
1) Product model
a) Take your phone/tablet
b) Go to options
c) Scroll down to section "About phone"
d) Note your Model number (first line) - HUAWEI P7-L10, etc.
2) Serial Number
a) Look on the phone box (see image below)
3) IMEI
a) Look on the phone box (see image below)
4) Product ID
a) Open your dialer
b) Call *#*#1357946#*#*
c) PID will show on your screen
---------------------------------------------------------------
Putting info to Huawei Bootloader Unlock Site:
a) Open this page: h t t p://emui.huawei.com/en/plugin.php?id=unlock&mod=detail (delete spaces in HTTP)
b) Log in to Huawei ID, if you already not
c) Set product type (phone or tab)
d) Put PM, SN, IMEI and PID to right boxes
e) Solve Captcha
f) Press Submit
g) The unlock code appears under captcha (red text, something like: Your unlocking password is:87XXXXXXXXXX5492)
And that's it, you have your bootloader unlock code!
IMAGE OF BOX (IMEI AND SN):
h t t p://s15.postimg.org/8vytgqte3/IMG_20150822_161516.jpg (delete spaces in HTTP)
Click to expand...
Click to collapse
it says that i havent used my account on my phone in 14 days....wat should i do? i cant get the code
Thank You
The guide is great. Now I just have to follow the 2nd guide to unlock the bootloader via the guide at h t t p s://emui.huawei.com/en/plugin/unlock/step
:highfive:
From the XDA Downloadmirror: dl-xda.xposed.info/framework/sdk22/arm/ i have downloaded this files:
xposed-v83-sdk22-arm.zip
xposed-v83-sdk22-arm.zip.asc
and
xposed-v84-sdk22-arm.zip
xposed-v84-sdk22-arm.zip.asc
sereral times, and with different desktop-pc's
every time with the same bad result:
As I use GPG in a Terminal on my Linux system to confirm verification zip.asc file with the associated .zip file,
GPG says: "...Can't check signature: No public key"
Maybe my entry not have been correct (I have previously never used GPG) or the files on the xda-Server are really corrupt?
Here i shows the syntax of my entry i my Linux Terminal:
$ gpg --verify xposed-v84-sdk22-arm.zip.asc xposed-v84-sdk22-arm.zip
Every time it gets the same bad result:
gpg: Signature made Tue 03 Mai 2016 22:58:30 CEST using RSA key ID 852109AA
gpg: Can't check signature: No public key
In my Opinion XDA must have a Public(?)Key (Server?) in addition to those used .asc files - like e.g. Torproject:
"The Tor Browser team signs the Tor Browsers. Import its key (0x4E2C6E8793298290) by starting cmd.exe and typing"
after this, the line with the syntax:
" gpg --verify C:\...torbrowser-install-5....exe.asc C:\...torbrowser-install-5....exe.asc"
Perhaps GPG need this Key first to work properly?
If it is so, then where hosts xda a key that i need to Import first? I search a long time on xda, and i can't find this!
I've moved your thread to the Xposed forum. Should get some good help here
Maybe you can get more info from here:
https://github.com/rovo89/Xposed/issues/89
I had mentioned the fingerprint when I announced that files are now signed, now I also added that information to the first post: http://forum.xda-developers.com/showthread.php?t=3034811
Hi There,
i cant belive that it is mee falling over this problem nearly one jear later. I am absolutely not able to find the key 852109AA.
This is the key the xposed-v87-sdk22-arm.zip is signed with. I only get No public key found message.
Help is apreciated.
Am I to stupid to find it? or is there anythig what i miss here.
Hi all!
I have an asus memo pad me176cx. I did some stuff with it and now it seems bricked, but not fully (as I hope...).
But I am not very experienced user with android, so I have a few adjacent questions to define myself in root concepts.
On general - I tried to install debian linux on my tablet. Looking ahead - i managed to run installer. But in order...
My actions before i got brick.
I got an issue similar to this one after updates. There i saw that tablet has a kind of uefi. And i decided to run debian. Prepared usb-installer, connected that one and keyboard via OTG by hub(i have one with led indicator). I pressed F2 and power button on tablet, and saw uefi. There did boot override -> UEFI jet flash. And debian installer ran succesfully.
But after about a minute on-hub led becomes dark, as did flash led. Kbd was not working. At that moment i was on network config step and decided to reboot tablet. Power button about 10sec - and all over again. But after a while - same issue. It would not be nice if flash comes down while packages copying - I thought. And... Of cause boot into uefi to search some otg-power-options (btw i got same behaviour with otg in uefi and was forced to make changes quickly or reboot).
I don`t remember what option exactly i changed, but i have only hw buttons on tablet working. No otg at all (led is always dark now, no flash none kbd works), no touchscreen (i have twrp installed and checked there).
Finally, what works.
I can press vol+ - vol- - pwr, then see "Fastboot startnig... #1 #2 #3" on display - and get into some mode, called DNX (as i googled).
Code:
fastboot devices
shows my tablet. But i can flash only osloader partition. Other way - error, unsupported operation. Also i can command
Code:
fastboot boot droidboot.img
and get into bootloader. This case at the bottom of screen shown "Waiting for fastboot cmd...". But
Code:
fastboot devices
shows notheng. Any other fastboot commands stuck on "wating for any device...". But with vol-buttons i can choose recovery mode, then press power and get into twrp and look on "Swipe to allow filesystem modification". But as far as touchscreen dows not work (as otg-keyboard) - i can`t do anything else. adbd seems not started yet, as
Code:
adb devices
shows nothing (or micro-usb plug simply disabled with uefi). And that is all, i can`t do anything else...
In fine, my questions are:
Mode started by "vol+ - vol- - pwr" - does it DNX or fastboot? How to find out what commnds i can run there? (At the moment I know 2 only: flash osloader and boot). Why flash ESP, erase, even get [some_var] does not work here? Is there a way to re-flash or reset uefi settings from this mode?
Or any other ways to reset uefi? (as possible without microwave...)
Also, what difference between osloader and bootloader? I suggest that osloader is a partition and bootloader is a program placed in that partition. But what exactly i do with command "fastboot flash osloader efilinux.efi"?
Sorry for lot of text, but I actualy don`t know how this modes called and got confused. Any help would be appriciated.
Anyway, thanks a lot!
mk3pq28 said:
I don`t remember what option exactly i changed, but i have only hw buttons on tablet working. No otg at all (led is always dark now, no flash none kbd works), no touchscreen (i have twrp installed and checked there).
Click to expand...
Click to collapse
I think I've seen some option that changes the way USB OTG is set up. By changing it you have probably disabled USB OTG entirely now... :/
mk3pq28 said:
Mode started by "vol+ - vol- - pwr" - does it DNX or fastboot?
Click to expand...
Click to collapse
DNX
mk3pq28 said:
How to find out what commnds i can run there? (At the moment I know 2 only: flash osloader and boot). Why flash ESP, erase, even get [some_var] does not work here?
Click to expand...
Click to collapse
DNX is not a full fastboot implementation. It runs in the firmware, somewhere during early UEFI initialization. It's mostly designed for recovery when the (Android) bootloader is no longer working. The two commands you know are the only ones I'm aware of, sorry :/
mk3pq28 said:
Is there a way to re-flash or reset uefi settings from this mode?
Or any other ways to reset uefi? (as possible without microwave...)
Click to expand...
Click to collapse
I can imagine that it is possible but I have to admit that I don't know how. For example there is Intel® Platform Flash Tool Lite that allows re-flashing pretty much all of the device, but I'm not sure where you'd get the factory files. At the moment, I don't have any suggestions how to solve your problem... :/
mk3pq28 said:
Also, what difference between osloader and bootloader? I suggest that osloader is a partition and bootloader is a program placed in that partition. But what exactly i do with command "fastboot flash osloader efilinux.efi"?
Click to expand...
Click to collapse
osloader refers to the EFI application that is started. efilinux.efi is an Android bootloader for UEFI. In this case it's not actually written persistently somewhere, it is just loaded into RAM and then executed.
lambdadroid,
first of all - thanks a lot for your participating!
So, after your clarification I made a few suggestions.
lambdadroid said:
I can imagine that it is possible but I have to admit that I don't know how. For example there is Intel® Platform Flash Tool Lite that allows re-flashing pretty much all of the device, but I'm not sure where you'd get the factory files.
Click to expand...
Click to collapse
First one. I installed it and downloaded service firmware. Flash tool found my tablet and showed some info:
Plaform: Intel Corporation
Hardware: Intel Android AD
Status: DNX_OS
Connected on port: 0/1 (number of usb port, i think)
DnX SN: Baytrail<some>
Then i selected service firmware and flash tool showed me flash.xml in "flash file" field. Everything looks normal at the moment, until i pressed flash)
The only one record appeared in log below: "Failed to reboot the device. Flash failed". And i don`t know someshing else i can make here.
I am new here and can`t post links to outside, but i googled some more meaningful examples of log by my error. And as i understood chain of commands - flash tool does exactly same as i did. I.e. flashes osloader in dnx mode, then boots in fastboot and flashes another partitions there. Correct me if i`m wrong but it does not seems for my case, unfortunately
And the second one, more complex.
I had googled a lot about uefi and it`s settings location. I found out that "settings" made in uefi are stored in memory called NVRAM. It is non-volatile and can not be reset by battery disconnected (yes, i tried that, ofc). But there should be a flag called NVRAM_IS_VALID. And once it gets disabled - uefi is forced to reset all the settings to defaults next boot time. I`m not sure, but looks like my solution!
And I can suggest two ways of setting this flag.
lambdadroid said:
osloader refers to the EFI application that is started. efilinux.efi is an Android bootloader for UEFI.
Click to expand...
Click to collapse
First one - uefi shell. If i can replace bootloader, may it be a shell? I downloaded one from github (a link should be here ) but have no success yet. It`s size about 930kb, but my working one bootloader - is 2mb. And when i make flash - nothing happens:
Code:
# fastboot flash osloader Shell.efi
target didn't report max-download-size
sending 'osloader' (929 KB)...
Nothing more. Maybe there should be some special kind of uefi-shell for android? Or I can`t flash nothing but bootloder into osloader partition at all? But even if i`m succeed - i`m not sure that uefi would not disable otg before shell get running.
So my second and the last sugesstion. It`s fully theoretical, but... I need to write a custom efi app (.efi files are kind of applications for uefi, written in c, right?) that would be flashed into osloader and should disable NVRAM_IS_VALID flag (ohh, does that flag exists at all?...). Does it possible?
Anyway, thanks a lot for any help!
mk3pq28 said:
I installed it and downloaded service firmware. Flash tool found my tablet and showed some info:
Plaform: Intel Corporation
Hardware: Intel Android AD
Status: DNX_OS
Connected on port: 0/1 (number of usb port, i think)
DnX SN: Baytrail<some>
Then i selected service firmware and flash tool showed me flash.xml in "flash file" field. Everything looks normal at the moment, until i pressed flash)
The only one record appeared in log below: "Failed to reboot the device. Flash failed". And i don`t know someshing else i can make here.
I am new here and can`t post links to outside, but i googled some more meaningful examples of log by my error. And as i understood chain of commands - flash tool does exactly same as i did. I.e. flashes osloader in dnx mode, then boots in fastboot and flashes another partitions there. Correct me if i`m wrong but it does not seems for my case, unfortunately
Click to expand...
Click to collapse
Okay, yeah, that's very well possible. I've never used that tool and don't know what it does.
mk3pq28 said:
I had googled a lot about uefi and it`s settings location. I found out that "settings" made in uefi are stored in memory called NVRAM. It is non-volatile and can not be reset by battery disconnected (yes, i tried that, ofc). But there should be a flag called NVRAM_IS_VALID. And once it gets disabled - uefi is forced to reset all the settings to defaults next boot time. I`m not sure, but looks like my solution!
Click to expand...
Click to collapse
It makes sense that the settings are stored in the NVRAM. But that's about all I can comment on; I'm not sure if that flag exists on this tablet or even if it will reset to the correct results.
mk3pq28 said:
uefi shell. If i can replace bootloader, may it be a shell? I downloaded one from github (a link should be here ) but have no success yet. It`s size about 930kb, but my working one bootloader - is 2mb. And when i make flash - nothing happens:
Code:
# fastboot flash osloader Shell.efi
target didn't report max-download-size
sending 'osloader' (929 KB)...
Nothing more. Maybe there should be some special kind of uefi-shell for android? Or I can`t flash nothing but bootloder into osloader partition at all? But even if i`m succeed - i`m not sure that uefi would not disable otg before shell get running.
Click to expand...
Click to collapse
You may need to run "fastboot boot droidboot.img" (or any other image) too to have Fastboot run the EFI application. The Shell application will then likely ignore the additional boot image. However, as you mention, I believe that OTG will get disabled before the shell is running. The UEFI shell application is no different from the UEFI Setup as far as OTG is concerned. So if you are unable to enter the setup with F2 then the UEFI shell will probably not work either. So even if the Shell starts, I doubt that you will be able to run commands.
And no, there is no special kind of UEFI Shell for Android. This is all unrelated to Android actually.
mk3pq28 said:
It`s fully theoretical, but... I need to write a custom efi app (.efi files are kind of applications for uefi, written in c, right?) that would be flashed into osloader and should disable NVRAM_IS_VALID flag (ohh, does that flag exists at all?...). Does it possible?
Click to expand...
Click to collapse
That's actually something I considered suggesting yesterday. I decided against it because it's obviously not trivial and I'm not sure if EFI applications can actually access that flag or BIOS settings in general... However, I can assist you with how to write EFI applications in general. They are usually written in C and then compiled using some funky compiler flags and tools to .efi.
An example for a very simple EFI application is "bootstrap.efi" that is used in me176c-boot. The source for it is available at https://github.com/me176c-dev/me176c-boot/tree/master/bootstrap
In me176c-boot it runs as first EFI application and checks if the tablet was booted due to charger insertion; if yes then it sets an EFI variable. I'm not sure if the flag you mention is exposed as an EFI variable. However, persistent EFI variables are also stored in the NVRAM, so that might be something to look at. It's built using Meson (see meson.build). The build script might be of help to you.
lambdadroid said:
That's actually something I considered suggesting yesterday. I decided against it because it's obviously not trivial and I'm not sure if EFI applications can actually access that flag or BIOS settings in general...
Click to expand...
Click to collapse
But I don`t see any other kind of solution.
lambdadroid said:
It makes sense that the settings are stored in the NVRAM. But that's about all I can comment on; I'm not sure if that flag exists on this tablet or even if it will reset to the correct results.
Click to expand...
Click to collapse
I think it won`t get worse anyway, so...
Thanks a lot for your general information about efi. I took that and was able to get started. I did some experiments and had interesting results. Little notice - i`m on debian.
At first
I had installed gnu-efi and mason. Also googled "Hello world" in efi-style. I still cant post links to outside but the code is below. Looking ahead - had no result with one Print because it was closed very fast so i added a loop.
Code:
#include <efi.h>
#include <efilib.h>
EFI_STATUS
EFIAPI
efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
InitializeLib(ImageHandle, SystemTable);
for (int i = 0; i < 5000; ++i)
{
Print(L"B It works!!!\r\n");
}
return EFI_SUCCESS;
}
Looks simple.
Also i took your meson.build and replaced file names with mine. But i got a few conpilation errors so i had removed some keys from target. Here it is:
Code:
project('tutorial', 'c')
arch = host_machine.cpu_family()
efi_include_dir = '/usr/include/efi'
efi_include = include_directories(
efi_include_dir,
join_paths(efi_include_dir, arch),
is_system: true
)
efi_lds = '/usr/lib/elf_' + arch + '_efi.lds'
efi_crt = '/usr/lib/crt0-efi-' + arch + '.o'
bootstrap_lib = shared_library('bootstrap',
'hello_efi.c',
include_directories: [efi_include],
objects: [efi_crt],
link_args: [
'-T', efi_lds,
'-nostdlib',
'-z', 'nocombreloc',
'-Wl,-Bsymbolic',
'-lefi', '-lgnuefi'
]
)
objcopy = find_program('objcopy')
custom_target('bootstrap.efi',
output: 'bootstrap.efi',
input: bootstrap_lib,
command: [objcopy,
'--target=efi-app-' + arch,
'-j', '.text',
'-j', '.sdata',
'-j', '.data',
'-j', '.dynamic',
'-j', '.dynsym',
'-j', '.rel',
'-j', '.rela',
'-j', '.reloc',
'@[email protected]', '@[email protected]'
],
install: true,
install_dir: ''
)
hello_efi.c contains source code from above.
This is my first meson build so if yoy see some obvious mistakes or excess options - i would be much appreciated if you point on them.
At second
I created builddir, commanded "meson" and "ninja" and got such output:
Code:
[1/3] Compiling c object '[email protected]/hello_efi.c.o'
../hello_efi.c: In function ‘efi_main’:
../hello_efi.c:13:9: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types]
Print(L"B It works!!!\r\n");
^~~~~~~~~~~~~~~~~~~~
In file included from ../hello_efi.c:2:0:
/usr/include/efi/efilib.h:404:1: note: expected ‘CHAR16 * {aka short unsigned int *}’ but argument is of type ‘int *’
Print (
^~~~~
[3/3] 'Generating bootstrap.efi with a custom command.'
I am not very familiar with C and can`t get rid of warning to print my message properly. As far as Print requires CHAR16 pointer only first symbol is printed. How to properly get and array of CHAR16 from "a string"?
Anyway, it`s a bite of success.
And at third, final
I was very happy and connected tab (in DNX, ofc) with pc and commaned: "fastboot flash osloader bootstrap.efi".
Code:
target didn't report max-download-size
sending 'osloader' (44 KB)...
And nothing more. Command is still running untill tablet reboot. But!
I have another ont efilinux.efi was downloaded from somewhere. And it flashes correctly! The only difference is on size: 44KB vs 2MB.
I did some research with dd-util and found one interesting thing. It is allowed to flash osloader partition in dnx mode with completely any binary data within (nearly) 1MB .. 20MB. In this case "fastboot flash osloader ..." says OK twice and finishes properly.
So, my flow after compilation have a such look (2057216 - is a size of my working example efilinux.efi)
Code:
$ dd if=/dev/zero of=container.efi count=2057216 iflag=count_bytes
$ dd if=bootstrap.efi of=container.efi conv=nocreat,notrunc
# fastboot flash osloader container.efi
# fastboot boot droidboot.img
... and i have a char 'B' on screen printed 5000 times. I think it`s another one bite of success
But i can`t find any docs for efi.h (efilib.h). Which capabilities they provides? What is set of functinos?
There is another example with
Code:
uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, L"Hello World!\n");"
but it is not obvious how to work with uefi services in this way.
I googled that most of uefi settings are stored in "Setup" variable. I think it may be useful at least to print them. But don`t know how, yet.
I will google it further but in general i don`t know what is the next step should be.
Also i have an idea to use such trick to flash efi-shell. But didn`t tried yet.
mk3pq28 said:
At first
I had installed gnu-efi and mason. Also googled "Hello world" in efi-style. I still cant post links to outside but the code is below. Looking ahead - had no result with one Print because it was closed very fast so i added a loop.
Code:
#include <efi.h>
#include <efilib.h>
EFI_STATUS
EFIAPI
efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
InitializeLib(ImageHandle, SystemTable);
for (int i = 0; i < 5000; ++i)
{
Print(L"B It works!!!\r\n");
}
return EFI_SUCCESS;
}
Looks simple.
Also i took your meson.build and replaced file names with mine. But i got a few conpilation errors so i had removed some keys from target. Here it is:
Code:
project('tutorial', 'c')
arch = host_machine.cpu_family()
efi_include_dir = '/usr/include/efi'
efi_include = include_directories(
efi_include_dir,
join_paths(efi_include_dir, arch),
is_system: true
)
efi_lds = '/usr/lib/elf_' + arch + '_efi.lds'
efi_crt = '/usr/lib/crt0-efi-' + arch + '.o'
bootstrap_lib = shared_library('bootstrap',
'hello_efi.c',
include_directories: [efi_include],
objects: [efi_crt],
link_args: [
'-T', efi_lds,
'-nostdlib',
'-z', 'nocombreloc',
'-Wl,-Bsymbolic',
'-lefi', '-lgnuefi'
]
)
objcopy = find_program('objcopy')
custom_target('bootstrap.efi',
output: 'bootstrap.efi',
input: bootstrap_lib,
command: [objcopy,
'--target=efi-app-' + arch,
'-j', '.text',
'-j', '.sdata',
'-j', '.data',
'-j', '.dynamic',
'-j', '.dynsym',
'-j', '.rel',
'-j', '.rela',
'-j', '.reloc',
'@[email protected]', '@[email protected]'
],
install: true,
install_dir: ''
)
hello_efi.c contains source code from above.
This is my first meson build so if yoy see some obvious mistakes or excess options - i would be much appreciated if you point on them.
At second
I created builddir, commanded "meson" and "ninja" and got such output:
Code:
[1/3] Compiling c object '[email protected]/hello_efi.c.o'
../hello_efi.c: In function ‘efi_main’:
../hello_efi.c:13:9: warning: passing argument 1 of ‘Print’ from incompatible pointer type [-Wincompatible-pointer-types]
Print(L"B It works!!!\r\n");
^~~~~~~~~~~~~~~~~~~~
In file included from ../hello_efi.c:2:0:
/usr/include/efi/efilib.h:404:1: note: expected ‘CHAR16 * {aka short unsigned int *}’ but argument is of type ‘int *’
Print (
^~~~~
[3/3] 'Generating bootstrap.efi with a custom command.'
I am not very familiar with C and can`t get rid of warning to print my message properly. As far as Print requires CHAR16 pointer only first symbol is printed. How to properly get and array of CHAR16 from "a string"?
Anyway, it`s a bite of success.
Click to expand...
Click to collapse
I believe the compiler argument that avoids this error is -fshort-wchar, but you seem to have removed all c_args: https://github.com/me176c-dev/me176c-boot/blob/master/bootstrap/meson.build#L33 All of these compiler arguments have a purpose, can you check which one is causing errors exactly and post the error here?
mk3pq28 said:
And at third, final
I was very happy and connected tab (in DNX, ofc) with pc and commaned: "fastboot flash osloader bootstrap.efi".
Code:
target didn't report max-download-size
sending 'osloader' (44 KB)...
And nothing more. Command is still running untill tablet reboot. But!
I have another ont efilinux.efi was downloaded from somewhere. And it flashes correctly! The only difference is on size: 44KB vs 2MB.
I did some research with dd-util and found one interesting thing. It is allowed to flash osloader partition in dnx mode with completely any binary data within (nearly) 1MB .. 20MB. In this case "fastboot flash osloader ..." says OK twice and finishes properly.
So, my flow after compilation have a such look (2057216 - is a size of my working example efilinux.efi)
Code:
$ dd if=/dev/zero of=container.efi count=2057216 iflag=count_bytes
$ dd if=bootstrap.efi of=container.efi conv=nocreat,notrunc
# fastboot flash osloader container.efi
# fastboot boot droidboot.img
Click to expand...
Click to collapse
That's weird, the size shouldn't matter at all. But it doesn't really matter, as long as it works.
mk3pq28 said:
But i can`t find any docs for efi.h (efilib.h). Which capabilities they provides? What is set of functinos?
There is another example with
Code:
uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, L"Hello World!\n");"
but it is not obvious how to work with uefi services in this way.
I googled that most of uefi settings are stored in "Setup" variable. I think it may be useful at least to print them. But don`t know how, yet.
I will google it further but in general i don`t know what is the next step should be.
Click to expand...
Click to collapse
Generally, the interface exposed by gnu-efi is according to the UEFI specification: http://www.uefi.org/sites/default/files/resources/UEFI Spec 2_7_A Sept 6.pdf
In there you can find a list of protocols you can use, e.g. search for the "OutputString" method used above.
uefi_call_wrapper is an implementation detail of gnu-efi, but basically it's uefi_call_wrapper(<method>, <number of parameters>, <parameters...>).
The main remaining question, and the one I can't really help you with is how you can reset your BIOS settings using the UEFI application API. Maybe something to look at first would be the "Variable Services" (see UEFI specification). Maybe you can change one of the EFI variables to restore the default BIOS settings.
lambdadroid said:
I believe the compiler argument that avoids this error is -fshort-wchar, but you seem to have removed all c_args: https://github.com/me176c-dev/me176c-boot/blob/master/bootstrap/meson.build#L33 All of these compiler arguments have a purpose, can you check which one is causing errors exactly and post the error here?
Click to expand...
Click to collapse
Yes, this key removed warning. Thanks.
lambdadroid said:
Generally, the interface exposed by gnu-efi is according to the UEFI specification: http://www.uefi.org/sites/default/files/resources/UEFI Spec 2_7_A Sept 6.pdf
In there you can find a list of protocols you can use, e.g. search for the "OutputString" method used above.
Click to expand...
Click to collapse
Exactly one i`m looking for. Thanks again!
Unfortunately there is nothing about NVRAM_IS_VALID there.
But there is a function called "ResetSystem()" (p.269). It should reset the entire platform as written in doc.
My code:
Code:
#include <efi.h>
#include <efilib.h>
EFI_STATUS
EFIAPI
#define SLEEP 100
efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
InitializeLib(ImageHandle, SystemTable);
for (int i = 0; i < SLEEP; ++i)
{
Print(L"It works!!! #%d", i);
uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, L"\r\n");
}
int res = uefi_call_wrapper(RT->ResetSystem, 4, EfiResetCold, EFI_SUCCESS, 0, NULL);
for (int i = 0; i < SLEEP; ++i) Print(L"%d\r\n", res);
return EFI_SUCCESS;
}
}
Yes, i`d noticed that "The ResetSystem() function does not return".
But i`m not sure that i call it properly.
When i run the code above - it prints the message 100 times, then screen blinks and the next message appears: "EFILINUX ERROR [start_boot_logic:498] No valid target found.
Fallbacking to MOS" in about 3 sec. Looks like there no reboot in this case because of the intel logo is not shown. I have no system on my tablet, but it`s another story.
The main point is there is no black screen with intel logo for about 15-20 sec as in case of normal boot.
In addition i tried to change call with:
Code:
uefi_call_wrapper(RT->ResetSystem, 4, L"Wrong_argument", EFI_SUCCESS, 0, NULL)
and it prints "968832152" return code. Does it fail somewhere before ResetSystem() or exactly inside?
So am i calling this function correctly?
mk3pq28 said:
Yes, this key removed warning. Thanks.
Exactly one i`m looking for. Thanks again!
Unfortunately there is nothing about NVRAM_IS_VALID there.
But there is a function called "ResetSystem()" (p.269). It should reset the entire platform as written in doc.
My code:
Code:
#include <efi.h>
#include <efilib.h>
EFI_STATUS
EFIAPI
#define SLEEP 100
efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable)
{
InitializeLib(ImageHandle, SystemTable);
for (int i = 0; i < SLEEP; ++i)
{
Print(L"It works!!! #%d", i);
uefi_call_wrapper(ST->ConOut->OutputString, 2, ST->ConOut, L"\r\n");
}
int res = uefi_call_wrapper(RT->ResetSystem, 4, EfiResetCold, EFI_SUCCESS, 0, NULL);
for (int i = 0; i < SLEEP; ++i) Print(L"%d\r\n", res);
return EFI_SUCCESS;
}
}
Yes, i`d noticed that "The ResetSystem() function does not return".
But i`m not sure that i call it properly.
When i run the code above - it prints the message 100 times, then screen blinks and the next message appears: "EFILINUX ERROR [start_boot_logic:498] No valid target found.
Fallbacking to MOS" in about 3 sec. Looks like there no reboot in this case because of the intel logo is not shown. I have no system on my tablet, but it`s another story.
The main point is there is no black screen with intel logo for about 15-20 sec as in case of normal boot.
In addition i tried to change call with:
Code:
uefi_call_wrapper(RT->ResetSystem, 4, L"Wrong_argument", EFI_SUCCESS, 0, NULL)
and it prints "968832152" return code. Does it fail somewhere before ResetSystem() or exactly inside?
So am i calling this function correctly?
Click to expand...
Click to collapse
I'm afraid ResetSystem() is not what you are looking for: ResetSystem() is only used to reboot the system, it does not "reset" any settings. So the screen flashes and you see that message because the tablet is restarted normally. (The bootloader you are using displays an error if you reboot without setting a "reboot target").
So you need to find some other method, or entirely different solution unfortunately. I just did a bit of research myself, but unfortunately didn't find anything of help..