Lenovo Smart Clock (Bootloader/AVB unlock, Firmware, Region Changer, Kernel Source)

Search This thread

modelvincent

New member
Sep 27, 2008
4
0
Hi,

I've send this message because i've been able to unlock my SmartClock 1, install Nova launcher on it and install some app (opera, youtube musice Vance, etc).
It start to be pretty usefull, but I as there is no back button, i'm pretty stuck and need to have a keyboard just to press back...

I would like to install a back button or a swipe, i've tried a lot of differents app but i'm systematically stuck with the accessibility approbation, because as there i'snt accessibility menu I can't validate it, and have tried a lot of command through ADB but haven't been able to succeed.

Do you know a app that could make the back button in root mode for example, or the commands that could give the correct rights to a back button app?

To managed to install a launcher, I've followed the following tutorial:

but instead of installing Awtrix, i've installed Nova Launcher
 

modelvincent

New member
Sep 27, 2008
4
0
Hi,

I've send this message because i've been able to unlock my SmartClock 1, install Nova launcher on it and install some app (opera, youtube musice Vance, etc).
It start to be pretty usefull, but I as there is no back button, i'm pretty stuck and need to have a keyboard just to press back...

I would like to install a back button or a swipe, i've tried a lot of differents app but i'm systematically stuck with the accessibility approbation, because as there i'snt accessibility menu I can't validate it, and have tried a lot of command through ADB but haven't been able to succeed.

Do you know a app that could make the back button in root mode for example, or the commands that could give the correct rights to a back button app?

To managed to install a launcher, I've followed the following tutorial:

but instead of installing Awtrix, i've installed Nova Launcher
 

Attachments

  • 16822612227288262287797916568286.jpg
    16822612227288262287797916568286.jpg
    4 MB · Views: 114
  • 16822612404116039890675032070644.jpg
    16822612404116039890675032070644.jpg
    3.8 MB · Views: 111

lyonzy

Member
Nov 5, 2009
26
4
I've only done it on the Smart Display (Ivy) but I used Taskbar:

And ran this to give it permissions:
adb shell settings put secure enabled_accessibility_services com.farmerbb.taskbar/com.farmerbb.taskbar.service.PowerMenuService

There's an option buried in the settings to turn on back/home/switcher soft buttons. There's also Virtual SoftKeys:

But I couldnt get it to recognise that I'd made it the accessibility service with ADB.
 

modelvincent

New member
Sep 27, 2008
4
0
YEEEEESSSSSS !!! that was exactly what I was looking for thank you very much !

I've been able to install Taskbar and added the return and home button in the parameters.

My last attempts are now:
- to find a way to start an opera shortcut directly in full screen mode for my home assistant home page
- to find a way to connect my smartclock in bluetooth to my Marshall speacker in BT, the integrated BT module allows only to connect a device to the smartclock, not to connect smartclock to other device, but I hope that a BT usb key could perhaps do the job? What are you thinking about that, I dream or it could be possible?
 

lyonzy

Member
Nov 5, 2009
26
4
I'll be honest I haven't had much of a play with Bluetooth on the Ivy - the debug build I'm using has no settings UI so I don't know how to operate it :D
 
  • Like
Reactions: modelvincent

lyonzy

Member
Nov 5, 2009
26
4
So I've had a bunch more luck with this device today thanks to that video (even though I don't speak french :D).

Some discoveries for anyone here and/or who might visit here later:
  • The key part of getting ADB is that special cable with the OTG wire connected. For me it worked fine in fastboot mode too
  • The user builds are easier to use than the debug builds - I kept getting an exception in TypeFace.java with the Debug build (on the Ivy) but not in the user build for either Cube or Ivy
  • Root isn't super hard to get on the user builds, particularly with the image from Awtrix's video - although the Cube doesn't like doing things like `adb root` or `adb disable-verity` when it does on the Ivy which is strange but not a big deal
  • There's a better way to disable updates than adding to the hosts file - Awtrix's method was blocking the entirety of `storage.googleapis.com` which I'd think might well block a bunch of the web as well. Instead, move or delete `/system/bin/update_engine` and `/system/bin/update_engine_client`. You'll notice in logcat something in the boot process errors out without those files and that's the end of it (and you'll get Muzei working if you're using that :) )
 

lyonzy

Member
Nov 5, 2009
26
4
FYI to get the volume buttons working I had to alter the com.google.assistant.core APK Smali code with APKLab and remove some calls to the Brillo UpdateService (it was throwing NullPointerExceptions). It's symlinked from /system to the /oem partition which is fiddly to write to so I removed the symlink and just put the modified APK in the same spot on /system.
 
FYI to get the volume buttons working I had to alter the com.google.assistant.core APK Smali code with APKLab and remove some calls to the Brillo UpdateService (it was throwing NullPointerExceptions). It's symlinked from /system to the /oem partition which is fiddly to write to so I removed the symlink and just put the modified APK in the same spot on /system.
I wonder if you could share the apk file, so that I could get my Lenovo Smart Clock's volume buttons working when I get a modded ROM on it.
 

lyonzy

Member
Nov 5, 2009
26
4
Sure this is it. IIRC you have to copy it over the one in /system/priv-app/com.google.assistant.core/app.apk.
 

Attachments

  • com.google.assistant.core-mod.apk
    1.5 MB · Views: 22

kirtide13

Member
Jul 11, 2013
8
0
I decided to give this a go and followed the tutorial in the video below, however realising not having the cable I instead want to reflash the stock firmware provided in the OP.
To managed to install a launcher, I've followed the following tutorial:
It appears to flash fine, however attempting to re-lock AVB results in the clock not being able to boot. I have confirmed this since the device always boots to fastboot, and inputing "fastboot getvar all" shows both slot A and B are un-bootable.
5. To relock AVB in the future run the following command:
Code:
fastboot oem at-lock-vboot!
I tried this command both with and without the "!", unsure if it was a mistype, but still no change. Is there something else missing thats required to make it boot stock again?

Also in regards to this odd cable required for accessing ADB, how does this work? From what I've seen from the video and read online plus the pastebin linked in the video it appears to be a wire from SSRX+ to 5v (purple to red), is this a specific thing with this clock/android?
 

lyonzy

Member
Nov 5, 2009
26
4
Can't answer your fastboot questions but as for the cable I think it has something to do with OTG (maybe forcing the device to be a guest not a host? or at least activating USB). It is something specific to this device - I haven't seen it anywhere else before. I didn't find it too hard to make the cable with a soldering iron and it indeed was the only way I managed to get ADB.
 

kirtide13

Member
Jul 11, 2013
8
0
Can't answer your fastboot questions but as for the cable I think it has something to do with OTG (maybe forcing the device to be a guest not a host? or at least activating USB). It is something specific to this device - I haven't seen it anywhere else before. I didn't find it too hard to make the cable with a soldering iron and it indeed was the only way I managed to get ADB.
For the cable are we pulling 5v high from the PC side or the clocks USB 5v, or does it not matter? The clock doesn't seem to connect and I've made sure to pull high on purple, unless its reversed?
 

lyonzy

Member
Nov 5, 2009
26
4
I'll be honest I can't exactly remember which one I did but it may not matter if high is high? This was the pinout I used (shamelessly screengrabbed from the AWTRIX youtube video :D)
image.png
 
  • Like
Reactions: kirtide13

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I'll be honest I can't exactly remember which one I did but it may not matter if high is high? This was the pinout I used (shamelessly screengrabbed from the AWTRIX youtube video :D)
    image.png
  • 10
    How to Bootloader Unlock (Part 1 of 2):
    1. You will need a USB A to USB A cable (Example here)
    2. You will need fastboot drivers on your PC
    3. Unplug your clock
    4. Plug the USB A to A cable into your computer and clock
    5. Hold the volume + button and plug in the power cord
    6. Keep holding volume + for about 20-30 seconds (It is slow to boot to fastboot)
    7. On your computer in a terminal run, fastboot flashing unlock
    Part 1 of unlocking is now done

    AVB/DM-Verity Unlock (Part 2 of 2)
    Unlocking the bootloader really does not give a lot to us because all the partitions are still being verified and the device will not boot if they don't match. Normally doing this on an Android Things device is not possible due to their Private key unlock system. But due to a leak, the private key for the Lenovo Smart Clock is available. Word of warning doing this causes the stock android things not to boot only the factory firmware located on Slot A will boot. Consistently if you don't AVB unlock the factory firmware on Slot A doesn't boot :p If you have already set up your device once the factory firmware is deleted and currently there is not a way to get it back (Hopefully will change soon).

    If you are coming from part 1 you can start right away, if not you need to reboot to fastboot again.
    1. Extract the downloaded AVB Unlock zip
    2. Run this command in terminal
    Code:
    at_auth_unlock.exe cube_unlock_credentials_v2.zip
    3. Wait till it finishes
    4. Keep in mind the stock system does not boot properly with AVB off (It is weird some UI elements work but the boot animation never goes away)
    5. To relock AVB in the future run the following command:
    Code:
    fastboot oem at-lock-vboot!


    Downloads:
    Stock Shipping fastboot firmware:
    Here

    AVB Unlock tool:
    Here

    Factory partition changer (Locale changer):
    Here

    Google released kernel source:
    https://github.com/deadman96385/android_kernel_lenovo_mt8167s

    Dump of stock partitions for easy viewing:
    https://github.com/deadman96385/things_mt8167s_som_dump

    Credit to @deletescape for the leak of the AVB Unlock Key, Stock firmware, region changer
    8
    Screenshots of the stock android things on Slot A if you don't setup the device :

    JF0wVSt.jpg
    IM6eUF3.jpg

    0DaW1xg.jpg
    glIBkRl.jpg

    hnqaweg.jpg
    SjKvgtF.jpg

    XOGPOSl.jpg


    TWRP (Coming Soon)
    5
    Hello.
    To anybody interested in the efforts related to this device, I have collected all of the current progress in one place.

    Also if you have a smart clock and are interested in helping out, feel free to contact me.
    2
    Excited to see what you manage to do with this!
    1
    Thanks a lot, I buy the last device in a shop and it was blocked in demo mode. I have used the "UpdateFactory_US.bat" script file on my device (from "Cube-Change-Locale" archive) and then I was able to get out of the demo mode and configure the device as a new one ! Thanks for that !