Using adnl burn mode with Khadas VIM4 and other modern amlogic SoCs? - Android Stick & Console AMLogic based Computers

Modern amlogic SoCs seem to have done away with v2 usbburning mode (aml v2 factory burn) using the worldcup drivers with the command line "update" utility and the GUI usb burning tool. The reference u-boot code for these new SoCs does not seem to have the possibility to use the legacy v2 usbburning mode code.
This is apparent in the soon-to-be-released Khadas VIM4, as well as all presently released amlogic designs using the S905X4, including askey's sti6220d315, sei's SEI800 series, and videostrong's ka2, amongst others. It is also the case for all recently released devices using the S905Y4 SoC, like sdmc's dv6071z and sei's SEI700 series.
The replacement for v2 usbburning mode in these devices is adnl (amlogic DNL protocol);
Code:
adnl - use Amlogic DNL protocol
Amlogic DNL protocol appears to use ordinary fastboot/adb style drivers. But the ordinary fastboot host-side tool is not sufficient in order to fully utilize amlogic DNL protocol. Khadas has posted a linux adnl host-side tool binary on github.
Khadas also has posted a win32 adnl host-side tool binary package, aml_dnl-win32.zip. The help screen and some usage examples are shown below:
Code:
adnl.exe -h
Amlogic DNL protocol tool V[2.6.3] at Aug 20 2021
usage: adnl [ -s <specific para> ] <command> <command para>
commands:
devices List all connected dnl devices
getvar <variable> Display a BL1/BL2/BL33 variable.
if not supported, this does nothing.
setvar <variable> <value> Set a BL1 <variable> with <value>.
setkey <keyPath> Set a BL1 <variable> with <value>.
oem/cmd <cmd> Send a BL33 string<cmd>.
download <FilePath> [<size> <offset>]
Download file to RAM[, with <size>bytes from <offset>]
run boot code in RAM, after cmd 'download'.
bl1_boot -f <bootloaderPath> BL1 download and boot bl2.
bl2_boot -f <bootloaderPath> BL2 download and boot TPL.
partition <-p partName> <-f imgPath> [<-m media>] [<-t imgType>] [-v vryFile]
@media: mem/store/key, default store
@imgType: sparse/normal, default normal
upload <-p partName> <-f dumpFilePath> <-z dumpSz [K|M|G]> [<-m media>] [<-o offset>]
@media: mem/store/key, default store
@offset: start offset in part @partname, default 0
reboot [mode] Reboot device [into supported mode].
other options:
-s <specific para> specify a USB device, command 'devices' to get specific para
-h, --help show this message.
Beyond the help screen, documentation for (or examples using) the amlogic DNL protocol host-side tool is pretty sparse. Although It seems that most of the functionality that is in the old worldcup host-side tool is also present in the adnl host-side tool.
I've found only this single post that referenced using the windows binary, which included these images:
{
"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"
}

Related

Can't list amazfit stratos with fastboot from OS X Mojave

Hello,
I am trying to install the PACEField ROM on my Amazfit A1609 (Chinese version) but I can't list the watch in fastboot in order to boot on the temp root boot image.
Commands:
Code:
$ ./adb devices
List of devices attached
2b9e2c22 device
Code:
$./adb shell reboot bootloader
The watch reboot and displays the Fastboot screen
Code:
$./fastboot devices
Nothing listed and
Code:
$ ./fastboot getvar all
< waiting for any device >
Stays on "waiting for any device" (with and without sudo).
Details
ADB/Fastboot version:
I use ADB and fastboot from the Android SDK :
Code:
./adb --version
Android Debug Bridge version 1.0.40
Version 4986621
Code:
./fastboot --version
fastboot version 28.0.1-4986621
Android file transfer displays an error message (can't access device storage)
{
"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"
}
I use the original USB cable
I am on a the last MBP with USB C port so the watch is connected through a dongle (the HooToo's one).
I have seen that windows users have to install some drivers in order to get fastboot access. Is there any drivers available for OS X ?
What are the others possible problems ? Is there any other way to install the ROM without fastboot getting full access ?
Fastboot is broken on macOS since High Sierra and it doesn't seem that Google is bothered enough to fix it... The last version that works somehow for me is version 1.0.36 from this repo:
https://android.izzysoft.de/downloads
Somehow because it may hang after 1 or 2 commands, so you must restart the watch manually and start again.

Deleted all Bootable & Other partitions, how to connect mobile?

I wanted to upgrade from android 9 to android 10.
Adb and fastboot were installed. The phone was enabled with USB Developermode and OEM change mode.
I entered the following commands;
# adb devices (then I saw my phone)
# fastboot devices
and then
# fastboot flash boot twrp-3.4.0-0-twrp.img
After that, "something" was left on the screen in small print that could not be read .... then I pressed the power button until the image disappeared and nothing happened.
After that, the phone can no longer be connected to the computer. The computer will no longer see the phone when im enter the command
# adb devices
My phone is CUBOT P30 ...Is it possible to restore or throw it straight in the trash!
SORRY my bad english.
@IFFI76
As long as you can interact with phone's bootloader you should be able to re-flash phone's Stock ROM.
The related command sequence would be
Code:
fastboot devices
fastboot flash-all <PATH_TO_STOCK_ROM_IMAGE>
fastboot reboot
Thank you for answering!
I don't understand exactly what you mean now!?
I personally believe I can't communicate with the bootloader...
I use debian distro and this is the output of my terminal;
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools# adb devices
List of devices attached
* daemon not running; starting now at tcp:5037
* daemon started successfully
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools# adb devices
List of devices attached
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools#
indicates that the device list is empty!
@IFFI76
Wondering why you stubbornly want to make an ADB connection, what in your case is absolutely pointless? Check whether you can establish a Fastboot connection.
Okay, I tried to do that now
I connected the mobile phone to the computer via usb and then below is the output of my terminal.
[email protected]:~
$ cd /home/iffi/Downloads/ADB-fastboot/platform-tools/
[email protected]:~/Downloads/ADB-fastboot/platform-tools
$ fastboot devices
[email protected]:~/Downloads/ADB-fastboot/platform-tools
$ sudo su
[sudo] password for iffi:
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools# fastboot devices
[email protected]:/home/iffi/Downloads/ADB-fastboot/platform-tools#
Looks like I can't connect to my phone and the bootloader is DELETED!
PLATFORM-TOOLS the contents of the directory are as follows
{
"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"
}
I suppose your phone became e-waste.

[Driver + Guide] Termux + RaspberryPi headless on OOS 11 / Serial Connection

This thread is about on how to connect your OnePlus7 to an USB Serial device in order to use it headless.
Disclaimer
I am not responsible for any damage that may occure by following any instruction from here.
Dependencies:
Root. On OOS11 we don't lose anything by doing so... here is my guide
Kernel with version msm-4.14.190 (OOS 11.0.1.1 and older 11 OOS) (You can get your version in Settings -> Status -> Kernel-Version or type uname -r into a terminal emu)
Download
msm-4.14.190 serial module
Install and use
Install a custom kernel using 4.14.190. I've used blue_spark and installed it with franco kernel manager cause TWRP is not there yet. I paid it with the money i did not spend on Coffe2Go during the pandemic (Why? Because the modules compiled by me are not signed and the default kernel compiled by OnePlus does not allow them to be loaded)
Install Busybox for Android NDK in Magisk
Install Termux from F-Droid (Highly recommend F-Droid cause i had problems with the PlayStore version because the releases there are behind)
Load the drivers in Termux with su
insmod /sdcard/usbserial.ko
insmod /sdcard/ftdi_sio.ko or insmod /sdcard/ch341.ko depending on your serial converter chip
(After a reboot this needs to be done again)
(Unload: Currently only a reboot unloads the drivers. There is however no need for it)
Connect with microcom -s 115200 /dev/ttyUSB0
Replace 115200 with the speed you need
Fixing the terminal size
When connected, your terminal will be too small. We need to tell which size we need. So outside your serial type stty size. First number are the rows, secondly the columns. Then in your serial adopt them with stty rows * columns *. You could of course create a script that reads this value and sends the command automatic when connecting.
Baud speed
Support up to 1 Mbp/s (1000000 as baud argument) *as far as i know. I had problems using more. At baud speeds higher than 4 Mbp/s (4000000) also Microcom does not accept it.
Also great
You could now connect a bluetooth keyboard or make a hotspot (Internet access not needed) and / or start an ssh server. Then you could connect to it with another device like an iPad or any ssh capable device.
Raspberry + Serial connection example
On Raspberry boot/config add enable_uart=1
Make sure the jumper is set to 3.3V
Connect:
GND (Raspi) -> GNU (FTDI)
Tx (Raspi) -> Rx (FTDI)
Rx (Raspi) -> Tx (FTDI)
Connect the Serial converter to your phone (using USB-C adapter)
{
"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"
}
Source
https://github.com/trueToastedCode/android_kernel_oneplus7_sm8150

Doogee S88 pro - <waiting for device> during fastboot commands

Hello everyone!
This is my first post here so I hope everything I try to explain is according to the rules as far as I read it.
I need to root my Doogee S88 pro mobile since I need test and develop some AR stuff. The standard apps are not accesible by the playstore so I need to bypass that. For doing that I need to root my phone (this is what I read at least).
So... I installed the doggee usb drivers from their website for my phone, usb debugging is activated and OEM is activated as well. I downloaded the most recen platform tools and the usb-cable should be fine since I find the phone with
Code:
adb devices
I execute the following commands:
Code:
adb devices
adb reboot bootloader
fastboot devices
I get the small Fastboot text in the lower left corner. Then if I try to execute
Code:
fastboot flashing unlock
or
fastboot flashing unlock-critical
I only get back <waiting for device>
As said I installed the usb drivers provided by doogee. But: In the device manager I can see the following:
{
"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"
}
Also I periodically (every 10 seconds) hear the sound as if a usb-device is disconnected. Afterwards the device manager refreshes the list.
So... it is a driver issue? I tried updating the drivers but picking manually the folder where driver files are located leads to no result. Automatic search as well. If it is a driver issue - where can I get the appropriate driver files? Thank you for any hint.
Get the Google USB Driver | Android Studio | Android Developers
The Google USB Driver is required to perform adb debugging on Windows with Google devices.
developer.android.com
Unfortunately that didnt help either. Dunno... What I did was: I switched to my Lnux OS and over there it worked out of the box (only needed to install adb and fastboot from repositories).

General Extend WSA by 428 Linux commands

To my knowledge Windows Subsystem for Android ( WSA ) is not created to run apps from the Amazon store only, but is configured for testing via ADB, will say run Linux commands in an Android shell, too.
WSA ( what at time of this writing is running Android 12 ) has merged Landley's Toybox v0.8.4, a bag of over 200 Linux command line applets - I have not really counted them.
A typical Linux distribution provides 428 command line applets - the SU incorporated. I have uploaded .ZIP ( 263 MB ) what contains them all here to:
428-cmds
MediaFire is a simple to use free service that lets you put all your photos, documents, music, and video in a single place so you can access them anywhere and share them everywhere.
www.mediafire.com
If you are interested in this project, too, then it's on you to download and extract the .ZIP and push the 428 files onto Android, preferredly to /storage/emulated/0/428-cmds, and make them executable.
Example .BAT-file - assumed .ZIP got extracted into D:\428-cmds folder & ADB is installed on PC
Code:
adb connect 127.0.0.1:58526
adb devices
adb shell "cd /sdcard & mkdir -p -m06755 428-cmds 2>/dev/null"
adb push "D:\428-cmds" "/sdcard/428-cmds/"
adb shell "SM='getenforce';setenforce 0;cd /sdcard/428-cmds;CMDS='$(find .-name "*" -maxdepth 1 -type f 2>&1 | grep -i -v denied)';while read x;do chmod 06755 "$x" & chown root:shell "$x";done; << "$CMDS";chcon "$x" u:object_r:su_exec:s0;setenforce "$SM";"
{
"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"
}
Note:
The 428 commands provided all are ELF32 binaries, so 32-bit:
That doesn't have to stop you from using them on a x86_64 PC because a 64-bit CPU can handle 32-bit commands.
Hmm... Great Work
I am getting an error on the last command.
/system/bin/sh: here document '$CMDS' unclosed
I tried the method in your toybox thread but it doesn't connect to wsa.
I think it is looking on the wrong port from the looks of the script. I am just trying to get root. I updated my rooted build of wsa and it no longer would load. i have tried different ones making sure to remove the one from the microsoft store first. Installing the one from the microsoft store by installing the amazon store gets wsa working again but without root and without my userdata.vhdx that I backed up. Any help would be appreciated. Thanks

Categories

Resources