[ADB]How to whitelist a specific RSA fingerprint to connect via ADB? - Other Tools & General Discussion

Hi all,
Not sure if this is the correct subforum to post this (@mod please help to move if necessary )
I'm new to Android and I'm curious if this is possible? As adb commands would prompt a RSA fingerprint pop up on the Android device, is it possible that I could edit the source code of adbd and ensure that only a specific fingerprint is accepted to establish an ADB connection from a computer to the Android ?
So far , I have read through the source code of the master source code of adb from Google but I can't find the specific file to insert a if condition to limit only 1 specific RSA fingerprint allowed to connect from the client to the daemon installed on the Android device.
Or is there a method of restricting RSA fingerprinting without editing the source code?
I really do appreciate any help in this topic. Thanks !

Related

[Q] [HELP] Regarding client server app

I am trying to develop a client - server application. I have a few questions regarding the complete dev process. I am using Nexus 7 GPe with android 4.4.2 (not rooted)
Please help me with the following question.
1) How can I take logs without connecting my device to the ADB as android 4.4.2 has a restriction and the logcat applications cannot read the logs because of that?
2) If I connect the device to ADB and try to run my code, I get a permission denied error while reading a file that is stored at "/mnt/shell/emulated/0/Movies", how can I resolve that
3) To use the code on an emulator, I used to re-direct ports. Will I have to do the same while debugging the code on the device? Also, if yes, how can I redir or open ports for TCP/UDP connections through my application on the device.
Thanks in advance

which encryption method is used for encrypting android id on android debug bridge adb

When I connect my device to adb over usb using this command
example> adb device
pressing enter i get the following encrypted 16 characters
df23582e162esfd2 device
What are they and is it generated by windows or adb and what libraries/encryption method is used by adb/win for displaying those characters.
Where it is temporarily stored. Is theirs a log file/temp file where I can find it.
How they are generated and why are they even in encrypted form.
I am also trying to find out which encryption model/method is used for displaying these 16 characters.
is their any way from which I can access adb android debug bridge libraries+documentation.
Your help will really be appreciated.
Regards,

[Resolved] How to successfully root PTCL Charji Wingle R660 and enable security and NAT features

Goal has been successfully achieved by a little bit of research and careful experimentation. Got to the middle of this post to find the complete solution.
I have a 4g Router Model: R660 also called 4g Wingle. The manufacturer is unknown as there is no branding on the device. But some say it is a GadgetIT product. I have scoured the internet and I cannot find the vendor named GadgetIT. But that is a separate discussion.
Main Goal: My main goal is to enable Virtual Server/Port forwarding in the device. The UI available when the device is connected is available at 192.168.1.1 with credentials admin/admin and Looks like this:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
This device is marketed by ISP PTCL as CHARJI EVO . The users of PTCL charji on this forum might say that port forwarding is not possible in this device but I disagree. and I have evidence to support otherwise but again that is a separate discussion.
What I have found so far?
I am able to telnet to this device at 192.168.1.1 via admin/admin credentials. Here is what I get.:
Version
LNX.LE.4.1-41009-9x35
But admin is not root. There is a separate user called root which obviously has a different password. I have tried all common router password (not sure what all will constitute...but i have tried many).
The goal here is to root this device so that I can perform the necessary changes such as the following:
As you might have guessed by now, that i cannot unless I am root which I am not.
So I need your help guys. Here are other interesting things to look at:
I could edit mobileap_cfg.xml but I cannot because the file is readonly and I was unable to chmod it to 777 with an error message "Operation not permitted" indicating that I am not root and I can not make that happen.
The second thing i would like to do is to enable SNMP monitoring which I cannot do from the main interface because the vendor hid the option.
Lastly, enable firewall.
Interestingly, all these options are available in a tab called "Security" which the vendor has hidden from the configuration interface available at 192.168.1.1
So I am inviting the expert comments of all hackers that can help me make get it sorted out. Ideally, it would be awesome to have these options enabled from the UI (I am willing to hack, root this device and modify firmware if needed) to get this done.
This can potentially help millions of PTCL Charji Users who cannot run any kind of server using this device (including game servers) and any kind of listening services (sockets or WEB or FTP) r those who would like use torrents but suffer from terrible low download speeds on torrents because of not being able to open ports for incoming connections that significantly raise download speeds for torrent.
More details:
mobileap_cfg.xml ownership and permissions:
Appreciate your help. Waiting to hear helpful responses soon. Successfully rooted without any busy box.
Solution Achieved successfully- See Steps & detail as follows:
I was able to switch device to bootloader mode and was able to change root password and now I am able to switch to root mode when logged in via admin using telnet. I have successfully change the DMZ but i have yet to observe its effects. If it works, I will work on changing other values as well.
Detail:
The device closely resembles D-Link DWR 901 But mind you, it is NOT DWR 901. Even thought the radio matches, if you flash the firmware from DWR 901 (which will be successful), the device will NOT work. Since there is no available source of the original firmware of the device, the device will be of no use anymore. So do not do it.
Similary D-Link's DWM 222 is also similar to this device (only that DWM 222) is a 3G modem. I downloaded both firmwares and found out upon extraction of these firmwares, that it contains the following files.
Files that you actually need are present in this archive -
WARNING
Use at your own RISK!!. Flashing this directly to your Charji will brick you Charji device. So just follow the procedure I described and do not try to flash it directly otherwise it will render your device unable to connect even though everything will look all right in the software. The device will never connect again...ever!
https://www.dropbox.com/s/hqa2m4499pyrj3z/R660A-Donot-Flash-it-On-Charji-It-Will-Brick-Your-device.7z?dl=0
There is a file called dl.exe which can turn the device into download mode assumung you have the PTCL Charji Wingle R660 plugged into the USB port.
After that running adb devices command will list all the devices.
After that you need to run the following commands
Code:
adb shell
passwd
The adb shell command will take you to the shell.
The passwd command executed from shell will tell you to enter a new password for root user
You will have to provide a secure password for it to be accepted.
After that, it will update the root password.
exit the shell using the exit or quit command or simply close the command prompt.
Now, you can telnet to the device using the command
Code:
telnet 192.168.1.1
Login with username admin and password admin (if these are your credentials to access the router page, Use your credentials. Mine were admin/admin)
The issue the following command to switch to root mode
Code:
su
It will ask for root password. Enter the password you set using the adb shell you had used before. and viola. You will turn to root mode.
You you have two ways to fix the NAT/DMZ problem.
Either you can directly use the vi editor (my OpenEmbedded Linux OS installed on the device has only vi support) to edit the file mobileap_cfg.xml and update DMZ value and port forwarding values.
or you can enable the security tab by editing the menu.js file which is located in /WEBSERVER/www/ directory. Now I had a PTCL Charji R660. If you have a different device, your files will be located elsewhere with different sets of issues.
You can do whatever you want!
Older Updates
Update# 02:
DMZ is now working !!
Update# 03
Successfuly unlocked the hidden security tab but still untested. Will test it shortly.
Update # 04
Successfully unlocked Wizard
Update# 05
NAT Rules persisting and working, tested by download torrents and using CanYouSeeMe.ORG
Torrents Downloads working on max available speeds
Reserved 1
Reserved for additional instructions etc
Reserved 2
Good find but instructions are really ambiguous and unclear. What are you supposed to do with dl.exe? run it, stare at it, run it and press enter????
You are just trapping people into bricking their devices with this instruction.
Yes I am bad at providing instructions.
dl.exe once run, turns the charji into bootloader mode and then it is possible to run adb shell and adb commands.
Hope this helps. I will update the article to be more descriptive in future sometime. Don't have time right now.
Regards.
timematcher said:
dl.exe once run, turns the charji into bootloader mode and then it is possible to run adb shell and adb commands.
Click to expand...
Click to collapse
Ok you are still not being clear. What do you mean by run once? currently dl.exe shows
Code:
Welcome to use OnekeyUpdate Tool.
The Software to be updated:Desktop
Press 'Enter' to update or 'Q' to quit.
on opening. Should I press Enter?
Sorry about being rude in first comment. I am really angry right now over this device right now, what kind of stupidity is not allowing user to port forward.
raza1080p said:
Ok you are still not being clear. What do you mean by run once? currently dl.exe shows
Code:
Welcome to use OnekeyUpdate Tool.
The Software to be updated:Desktop
Press 'Enter' to update or 'Q' to quit.
on opening. Should I press Enter?
Sorry about being rude in first comment. I am really angry right now over this device right now, what kind of stupidity is not allowing user to port forward.
Click to expand...
Click to collapse
When you click Enter, it will say "Waiting for device...." and then "found"
That is the point the device will appear in device manager (on windows) as well. and Now is the time to run adb shell and corresponding commands in my first article.
Important thing to note is that if you have never rooted any android (or linux) based device/phone/tablet, I suggest you read more about running adb.
The goal of my article was the following:
1. reset root password on the OpenEmbedded Linux variant on teh charji wingle device
2. Login via Telnet to 192.168.1.1 (Charji web console) using admin/admin (default credentials of Charji)
3. change to root mode using su command
4. Be able to change the xml files ( i mentioned in the first post) that allow the user to create the firewall rules and virtual server entries.
Now at this point I did not know that the person who whitelabelled Charji wingle for PTCL simply had disabled the relevant code in menu.js that enabled the Virtual server entries and firewall entries and DMZ fields (that allow pot forwarding, open firewall or simply set an ip address for DMZ that opens everything to a single IP on charji local network).
Once I found out, I was really happy and now I created the virtual server entries for torrent which was my main problem.
Thanks to Dr.hack who created a proper tutorial on his blog based on information in this article in a more streamlined manner.
Dr. Hack's Blog, Root-hack-ptcl-charji-evo-nat/
thank you for the tutorial.I am trying it on a charji cloud R500A. when dl.exe finds the device it goes to "6% Downloading hex image" .Am i suppose to wait at this point?
And will i be able to use other sim on the the device after the root?
Tarar said:
thank you for the tutorial.I am trying it on a charji cloud R500A. when dl.exe finds the device it goes to "6% Downloading hex image" .Am i suppose to wait at this point?
And will i be able to use other sim on the the device after the root?
Click to expand...
Click to collapse
First things first!, Are you trying to flash the image from the firmware link I gave? You should really not do that!
The link i gave is only provided for firmware modding experts. It is not the firmware of Charji. So if you flash it, it will brick your device and it will become useless.
What you really need to use is th dl.exe file , copy it into a separate folder with no other stuff in it.
If you run it from the same folder, it will brick your device by flashing a firmware which will not work for your Charji. CHarji will never connect after that!
dl.exe must be run to turn the device into booloader mode, After that you have to run adb shell commands and make the necessary changes to reset the root user password.
I don't know if it will allow you to use another SIM or not. PTCL devices are usually NOT network locked. But again, this is not a tutorial for allowing the users to use another sim. It merely allows the user unlock Virtual Server, Firewall, DMZ settings and similar features which are hidden by PTCL.
And there is no such thing as "Telenet". Telnet is a client application in windows which is not installed by default. You will have to install Telnet Client from "Add Remove programs" in Windows. It is needed to access the device using the telnet protocol. Do some research on Telnet.
timematcher said:
First things first!, Are you trying to flash the image from the firmware link I gave? You should really not do that!
The link i gave is only provided for firmware modding experts. It is not the firmware of Charji. So if you flash it, it will brick your device and it will become useless.
What you really need to use is th dl.exe file , copy it into a separate folder with no other stuff in it.
If you run it from the same folder, it will brick your device by flashing a firmware which will not work for your Charji. CHarji will never connect after that!
dl.exe must be run to turn the device into booloader mode, After that you have to run adb shell commands and make the necessary changes to reset the root user password.
I don't know if it will allow you to use another SIM or not. PTCL devices are usually NOT network locked. But again, this is not a tutorial for allowing the users to use another sim. It merely allows the user unlock Virtual Server, Firewall, DMZ settings and similar features which are hidden by PTCL.
And there is no such thing as "Telenet". Telnet is a client application in windows which is not installed by default. You will have to install Telnet Client from "Add Remove programs" in Windows. It is needed to access the device using the telnet protocol. Do some research on Telnet.
Click to expand...
Click to collapse
Thank you so very much for the details.
Yeah i found out about telnet commands.but i was using the dl.exe in the same folder.i guess that's why adb devices wasn't able to find my device.
Luckily it didn't install that firmware.
I have bricked my device by accidentally runing the gui.exe and i was dont know that it will flash new firmware. is there any way to get back ?:crying:
If you are able to switch to fastboot mode and you have the original software in the right format, then you should be able to flash the new firmaware using the utilities provided in the original post. The only way I think. I will try to see if I can create an image for my Charji R660 but I can not promise anything.
Note that I bricked first of mine and I took it to the people who upgrade firmware of the device and they were unable to fix it. and I got a new one by being sneaky (and playing dubm) about it.
Or if you want to learn, maybe start experimenting a little bit but I think you will need the original firmware.
timematcher said:
When you click Enter, it will say "Waiting for device...." and then "found"
That is the point the device will appear in device manager (on windows) as well. and Now is the time to run adb shell and corresponding commands in my first article.
Important thing to note is that if you have never rooted any android (or linux) based device/phone/tablet, I suggest you read more about running adb.
The goal of my article was the following:
1. reset root password on the OpenEmbedded Linux variant on teh charji wingle device
2. Login via Telnet to 192.168.1.1 (Charji web console) using admin/admin (default credentials of Charji)
3. change to root mode using su command
4. Be able to change the xml files ( i mentioned in the first post) that allow the user to create the firewall rules and virtual server entries.
Now at this point I did not know that the person who whitelabelled Charji wingle for PTCL simply had disabled the relevant code in menu.js that enabled the Virtual server entries and firewall entries and DMZ fields (that allow pot forwarding, open firewall or simply set an ip address for DMZ that opens everything to a single IP on charji local network).
Once I found out, I was really happy and now I created the virtual server entries for torrent which was my main problem.
Thanks to Dr.hack who created a proper tutorial on his blog based on information in this article in a more streamlined manner.
Dr. Hack's Blog, Root-hack-ptcl-charji-evo-nat/
Click to expand...
Click to collapse
Hi dear friend how are you? I need original webui of PTCL Charji device For Huawei Ec8372u-876 device please can you share the link or any guidance for this
saqi755 said:
Hi dear friend how are you? I need original webui of PTCL Charji device For Huawei Ec8372u-876 device please can you share the link or any guidance for this
Click to expand...
Click to collapse
Or any other links of non modified original Loced Huawei firmware and Webui
Huawei Ec8372u-876 is a very good device compared to sh!t devices offered by PTCL before.
Here is what I have found on the web.
Its probably an unlocking solution and not a locked file.
I am in no way responsible for the quality of the file or the steps as I dont have this device and I can not test it before posting.
Please use these are your own risk. I at least downloaded the file and executed on local PC.
but that is pretty much it. Please use at your own risk.
PTCL Evo Charji Cloud
E5377u-872
How to Unlock Evo Charji E5377u-872
1: Battery Should be 100% Charged
2: Data Cable
3: A Pin
4. Unlocked file
Click to expand...
Click to collapse
Code:
www.mediafire.com/file/6td2bh12b4l6g9o/PTCL_charji_E5377u-872-www.hispeedsolution.com.exe/file
Process>>
1. Remove the battery from the device
2. Press & Hold Power Button + Reset Button on the same time after 5 seconds device will boot into download mode.
3. Connect to PC
4. Wait for drivers
5. After the drivers installed go to device manager & note down the port # namely appplication UI interface.
6. Run the *.exe file & enter the port # (E.g 19 or 20 or etc etc)
7. Let it flash the device, it will take about 5 minutes, after the flashing let the device reboot. Your device will stuck on the Huawei screen, Don't worry wait for 3 minutes then remove the battery insert any Sim card & turn on the device.
8. Your device is successfully unlocked on all network Sim.
9. Connect the device to PC & set up accordingly.
Click to expand...
Click to collapse
timematcher said:
Huawei Ec8372u-876 is a very good device compared to sh!t devices offered by PTCL before.
Here is what I have found on the web.
Its probably an unlocking solution and not a locked file.
I am in no way responsible for the quality of the file or the steps as I dont have this device and I can not test it before posting.
Please use these are your own risk. I at least downloaded the file and executed on local PC.
View attachment 5369881
but that is pretty much it. Please use at your own risk.
Code:
www.mediafire.com/file/6td2bh12b4l6g9o/PTCL_charji_E5377u-872-www.hispeedsolution.com.exe/file
Click to expand...
Click to collapse
Thanks for your cooperation but I need file for Ec8372u-876 this file is not working on this please check this again this is not a device with battery
Let me look into it.
timematcher said:
timematcher said:
Can we use other networks 4G in this device?
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Please reply if possible
sparking111 said:
Please reply if possible
Click to expand...
Click to collapse
Huawei 4G wingle should support other networks/SIMs once rooted.
I had a E8372h-608 4G wingle which was network locked to Telenor. After flashing it with network-neutral, universal firmware from huawei, it works for Ufone, Telenor, Warid/Jazz after appropriate AP configuration within the device UI.
Does that answer your query?

[TOOL][WIN/LIN/MAC] MiUnlockTool - Unlock bootloader of xiaomi devices on mac & linux

[TOOL][WIN/LIN/MAC] MiUnlockTool - Unlock bootloader of xiaomi devices on mac & linux
Ciao xda users, I'm here to introduce a new tool of mine, MiUnlockTool.
MiUnlockTool is an unofficial tool used to unlock bootloader on Xiaomi devices. This tool is copied from the original windows MiFlashUnlock tool and works the same way. The main feature of this tool is compatibility with linux and mac operating system (and windows too).
If you want more information about the tool and the story behind you can read below, if you just want the download link, here it is:
DOWNLOAD LINK
Requirements: java (javafx for gui if not included in your jdk/jre)
Usage:
- Download and extract the zip file
- If you don't have it, install java
- On windows:
-- open MiFlashUnlock.bat for graphical interface or:
-- open a cmd windows and cd into extracted dir and use "MiUnlockTool.bat username password" command for command-line usage
- On linux:
-- open a terminal window and cd into extracted dir and use "sudo ./MiUnlockTool.sh" command for gui interface or "sudo ./MiUnlockTool.sh username password" for command-line
- On mac:
-- open (double click) MiFlashUnlock.command for graphical interface or
-- open a terminal window and cd into extracted dir and use "./MiFlashUnlock.command username password" for command-line
- Attach your locked device in fastboot mode.
- If you are using gui just follow what you see on your screen
- If you are using command line version remember that there is no confirmation request before unlock and no check if the bootloader is already unlocked.
Possible errors:
- If you get a permission related error on linux or mac when launching the tool, open a terminal and cd into extracted dir and use "chmod 777 MiUnlockTool.sh" (or MiUnlockTool.command on mac) to set the executable permission.
- If your device isn't recognized:
-- On windows: install adb drivers
-- On linux/mac trying launching the tool with sudo (sudo ./MiUnlockTool.sh on linux or sudo ./MiUnlockTool.command on mac)
- Other problems launching the tool: try running "java -jar bin/MiUnlockTool.jar" command
- If you get some errors with javafx class not found stuff when you try to launch the gui, then you are missing javafx library. See openjfx package on linux.
- Any other problem: provide feedback in the comments.
Additional info: original MiFlashUnlock tool is just a bridge between fastboot, you (and your account login credentials) and xiaomi server: the tool gets device info from the device and send them to the server together with the account login token, the server checks wherever you satisfy all their requirements (account authorized, account associated with device in developer settings etc) and if everything is okay the server reply with the unlock key for your device instance (every time you reboot your phone you need a new key). Then the tool send the key to the device with a custom build of fastboot and if the key is right then the device is unlocked, else it reboots. After I discovered all the process behind the original unlock tool (and all the security encryption techniques) I decided to replicate it with a java (cross-platform) tool which embeds a custom fastboot version and replicates what the original tool does. That's a simple explaination of how my tool works (obviously it's more complicated than that).
This tool requires all of what is required by the original tool (an authorized xiaomi account binded to the device through developer options for three days if I remember correctly).
FAQs:
- Is this tool safe to use?
Yes, the main part is communication between tool and server, a safe thing. Also the unlock procedure itself is safe: or the key is correct or it is not. In both cases the device will not be damage.
- How did you find out how to replicate the original tool?
Thank you for your question. It's been a bit difficult since the original tool has been obfuscated and virtualized (protected against reverse engeneering) with a powerful protector: VMProtect. I've spent some time to reverse it (and custom fastboot too) and I finally did it. I will not explain in details how I did it.
- Is this tool more powerful than the original on? why should I use it on Windows?
Absolutely not, my tool is worst than the original one (it will have more bugs and on windows it doesn't manage drivers for example), that's why you should NOT use it on Windows. I made it work even with Windows because it was very simple to do. You can use it one Windows just to test it if you like, but I recommend using the better original tool MiFlashUnlock.
- Wow, you did a tool already done by developers paid by xiaomi, who is paying for the effort you put into this?
No one, I try to help people and getting appreciation for my work is a bit of a reward to me, but if you want to show your gratitude even more and support me as a developer you can make a donation, I will appreciate that even more (donation link below)
- I have to put my xiaomi account credentials, should I trust this?
I'm the developer of XiaoMiTool, I hope that a little bit of my reputation together with the hopefully good early feedback of reckless users on this tool is enough. If you are more a geek you can track the traffic and see that the only server connected are xiaomi and miui.
- I wanted too see the source of this tool but I see it is a bit obfuscated, why?
Xiaomi clearly doesn't wanted people to see how MiFlashUnlock works (since they obfuscated it a lot), I don't want to disrespect xiaomi decision by releasing the source plain, so I decided to obfuscated it a bit just to make it a bit harder to see (even if my tool is 100 times easier to reverse than the original)
- Can I share this tool?
Of course yes, but I would like you to share it using the xiaomitool.com link (not mega.nz one) so that if I release an update new people will get that and not the old version (there is no tool update enginge built in).
- You're english is not wonderful...
I know, hopefully it is understandable enough
Feedback.
I love feedback, feedback is the best you can do to help me improving this tool. I have not time to answer everybody's questions but I generally read feedback and do my best to make the tool work. If the tool worked or if the tool didn't worked you can write it in the comments, adding additional information like what error you get, what screen you see when the tool get stuck or even what you tried to solve the problem are precious to me. I have not all of xiaomi devices, I fully ested my tool only with two devices (a redmi 4x and a mi note 2) and only on two operating systems (linux and windows), so any new combination could lead to new errors or problems. Please include also your operating system when leaving feedback. Sometimes there are problems on gui which are not on command-line version, so if the tools fails launching or when using gui I suggest trying the command-line version.
Donation: free software is great from users prospective, but developers who spend hours of their time and don't get money for it are more unhappy to develop further free tools, so if you liked the tools and it saved you from the need to do 5000 kilometers to get a windows pc, or from the need to download a virtual machine image with your 32kB internet connection, you can show your gratitude by offering me a tasty, cold beer by clicking the link below
DONATION LINK
Download: you missed the download link at the top? Here it is again:
DOWNLOAD LINK
Fully obfuscated tool. Maybe bloatware or password hijacker
Problems with mi unlock on ubuntu system
Dear,
I tried to run this miunlock on my linux pc and it did not work. I installed the javafx using "sudo apt install openjfx" . After I ran "sudo ./*.sh". The program open, but when I put my email and password, it does not connect with the xiaomi server. I tried to access using facebook login and I have the same problem. How can I solve this problem? Do you have any idea?
Thanks
Danillo
The program does not find the phone connected. But "sudo fastboot reboot" work
---------- Post added at 12:03 PM ---------- Previous post was at 11:51 AM ----------
dpvalverde said:
Dear,
I tried to run this miunlock on my linux pc and it did not work. I installed the javafx using "sudo apt install openjfx" . After I ran "sudo ./*.sh". The program open, but when I put my email and password, it does not connect with the xiaomi server. I tried to access using facebook login and I have the same problem. How can I solve this problem? Do you have any idea?
Thanks
Danillo
Click to expand...
Click to collapse
Reinstall certs
disconnects phone on checking bootloader status with an error message on top left corner of phone "press any key to shutdown"
and stays stuck after reconnecting in fastboot mode when reading device info.
How to install it on manjaro arch Linux. did u keep it in AUR.?
Status : Success unlock bootloader
Device : Redmi 4X
Waiting Time : 72hours
Thx for the tool . love3 ??????
worked a treat.
had been struggling to use the mi tool for windows and my device was not being detected.
this took me barely a minute to unlock.
Waiting for a fastboot device...
Well, the communication with the 'net seems to work as intended but that is where it stops:
Code:
[18:01:15][INFO ] Starting login procedure
[18:01:24][INFO ] Login procedure succeeded
[18:01:25][INFO ] Checking account unlock permission
[18:01:27][INFO ] Unlock permission confirmed
[18:01:27][INFO ] Waiting for a fastboot device
Using the fastboot command line works for the same user account so this won't be solved by running the tool as root. The device reports itself as 18d1:d00d Google Inc. and shows up clearly when using the fastboot command line tool:
Code:
$ fastboot devices
deadbeef fastboot
(no, my device ID is not deadbeef)
Tried OpenJDK 10 and 9, Oracle JRE 8, no difference.
Digging deeper using strace shows the problem: the 'special' fastboot command you include (in bin/MiUnlockTool_res) is a 64-bit executable while I'm running the tool on a 32-bit machine. Substituting the provided tool for a link to the version already present on this machine makes the command progress to the error:
Code:
$ java -jar bin/MiUnlockTool.jar '[email protected]' 'mysupersecretpassword'
[18:19:25][INFO ] Starting login procedure
[18:19:36][INFO ] Login procedure succeeded
[18:19:36][INFO ] Checking account unlock permission
[18:19:39][INFO ] Unlock permission confirmed
[18:19:39][INFO ] Waiting for a fastboot device
[18:19:39][INFO ] Device connected: deadbeef
[18:19:39][INFO ] Obtaining device info...
[18:19:40][INFO ] Device info obtained
[18:19:40][INFO ] Checking if unlock will erase data and server message
[18:19:42][INFO ] Unlock procedure will erase userdata
[18:19:42][INFO ] Server message: An unlocked device is an easy target for malware which may damage your device or cause financial loss.
[18:19:42][INFO ] Querying unlock server for unlock key
[18:19:48][ERROR ] Unlock request replied with error code 20036
[18:19:48][ERROR ] Error meaning: After %d hours of trying to unlock the device
I guess I have to wait, how long I do not know as this is not shown in either mode (command line or GUI).
Anyway, you might want to add a 32-bit fastboot command or just tell users to install a native version and use that.
@YetAnotherForumUser
I see the same error message when I tried to unlock MI 8 (global version bought yesterday in official Xiaomi store in Poland). I tried official Xiaomi tools on Windows 10, but without any success (verify failed at 50%).
I'm using it on a Linux laptop, I get "buffer overflow detected" after "starting final unlock procedure" and then it fails
i have this 2 errors on linux tring to unlocking my redmi note 5 [20:59:38][ERROR ] Unlock request replied with error code 20036
[20:59:38][ERROR ] Error meaning: After %d hours of trying to unlock the device
After waiting 360 hours I was able to unlock my Mi 8 with this tool on my Ubuntu! With official MiFlashUnlock tool I wasn't able to unlock this device on Windows 10. Thanks a lot!
YetAnotherForumUser said:
Code:
...
[18:19:48][ERROR ] Unlock request replied with error code 20036
[18:19:48][ERROR ] Error meaning: After %d hours of trying to unlock the device
I guess I have to wait, how long I do not know as this is not shown in either mode (command line or GUI).
Click to expand...
Click to collapse
After about 13 days - I only tried twice in between - the thing is now unlocked. I needed to run the tool on a 64-bit machine as the 32-bit fastboot crashed (with a message in the lines of "* buffer overflow detected *"), possibly due to the longish argument used in the unlocking procedure.
YetAnotherForumUser said:
After about 13 days - I only tried twice in between - the thing is now unlocked. I needed to run the tool on a 64-bit machine as the 32-bit fastboot crashed (with a message in the lines of "* buffer overflow detected *"), possibly due to the longish argument used in the unlocking procedure.
Click to expand...
Click to collapse
I also used 64-bit OS -> Ubuntu 18.04 x64. It would be nice to see amount hours instead of %d, however it's just a minor bug. This tool is the best choice for Linux, MacOS and event Windows 10 users.
Hey guys,
Although I've unlocked & rooted other Android's in the past, this is my first time with a Xiaomi device. I've tried running the tool, and appear to get the "Error meaning: After %d hours of trying to unlock the device" error. Am I right in thinking this is just a bug in terms of the hours displayed, and that I will just need to wait the 15 or so days before I can unlock the device? At what point does that 15 days begin?
Also, once unlocked, what is the best way to flash a ROM? ADB via Terminal?
Looking to flash the Global MIUI over the Chinese one I currrently have.
Thanks!
Help. Can not connect to my phone in fastboot when using this tool. But the MiUnlock is still connected
huynhkhoa said:
Help. Can not connect to my phone in fastboot when using this tool. But the MiUnlock is still connected
Click to expand...
Click to collapse
Windows or linux ?
naik2902 said:
Windows or linux ?
Click to expand...
Click to collapse
window bro, please help me :crying:
huynhkhoa said:
window bro, please help me :crying:
Click to expand...
Click to collapse
Why r u not using original miunlock tool for windows ?
Did u enable oem unlock, usb debugging?
Installed fastboot drivers
Use fastboot devices command to check if u r device connected to pc.
Did u bind ur account to miunlock status in developer option?

[APP][NON-ROOT] Termux-ADB - debug one Android device from another connected by USB-OTG

Run adb in Termux without root permissions!​This is a launcher for adb which enables debugging of one Android device from another via USB cable. It should work with any USB-C male-to-male cable or the corresponding OTG adapter + cable in case of micro USB.
https://github.com/nohajc/termux-adb
Motivation​Termux has had the android-tools package for some time now but it only works properly if you root your device (due to missing filesystem permissions). This is because Android has its own API for accessing USB peripherals which is incompatible with Linux. Termux already exposes this API using the termux-usb utility (part of Termux API) but this is not enough to make programs like adb work out of the box.
Usually you would have to modify any application which accesses USB devices but there's actually another way.
When you start adb using termux-adb, it will use termux-usb in the background for device discovery and then essentially feed the device information into adb by intercepting some libc calls and emulating usb device files as they would appear on any linux machine (bypassing the file permission problem entirely).
At this point the program is in its early stages and therefore highly experimental. I tested it on two Android devices so far and I can't give any guarantees it will work for everyone. But you can try.
That is great work! It works fine in my honor handset!
When will you share the new release with multiple ADB device support?
Appreciate for your fantastic tool !
It's definitely on my TODO list but now I'm also dealing with the fact it doesn't work on some devices.
So, I don't have an exact timeline but I'll keep this thread up to date.
Version 0.2 released today: https://github.com/nohajc/termux-adb/releases/tag/v0.2.0
@Stanton1011 It supports multiple devices now.
Thank you. If you're wanting feedback, there seems to be a lot of lag getting it to connect at first but it does work and once it's connected no issues. The fastboot however has much more lagging and will say simultaneously that commands succeeded and failed (but just seem to fail). But adb works fine on moto g pure running android 11, moto g pure on Android 12, TCL Obama phone type android 12, Samsung a11 android 10.
Thanks for the report. I'm aware of the lag. It's mainly caused by how Termux handles USB access in general but it could be improved if fastboot ran in the background (same as adb).
As for the commands failing, I'll look into it. Which particular fastboot commands you tried?
nohajc said:
Version 0.2 released today: https://github.com/nohajc/termux-adb/releases/tag/v0.2.0
@Stanton1011 It supports multiple devices now.
Click to expand...
Click to collapse
Thank you so much, I will have a try and let you know the result.
The following problem is solved by Pkg upgrade.
I find a error for it ,please help!
CANNOT LINK EXECUTABLE "./termux-adb": cannot locate symbol "_ZN6google8protobuf8internal14ArenaStringPtr3SetIJEEEvRKNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS0_5ArenaE" referenced by "/data/data/com.termux/files/home/termux-adb"...
I have a handset with the root permission only for ADB, but Termux(or any android APP) can not obtain the root permission. Could you tell a way to use the adb in termux, I know I can user your github project Termux-adb as what you did before., but I also need a alternative way. I have the root permission of ADB command(by PC). Can I modify some folder permission to achieve the same affect?

Categories

Resources