Lenovo ThinkSmart

From Notebook
Jump to navigation Jump to search

Installation[edit]

1. Go into your home directory
cd /~


2. Install git and python if you don’t have them installed already
sudo install git
sudo install python3


3. Run the following commands to prepare the required binaries and the EDL tool
sudo apt install adb fastboot python3-dev python3-pip liblzma-dev git
sudo apt purge modemmanager
git clone https://github.com/bkerler/edl
cd edl
git submodule update --init --recursive
pip3 install -r requirements.txt
sudo cp Drivers/51-edl.rules /etc/udev/rules.d
sudo cp Drivers/50-android.rules /etc/udev/rules.d
python3 setup.py build
sudo python3 setup.py install
Note: What is the EDL tool?
The EDL (Emergency Download) tool is a special mode of operation for Qualcomm MSM based devices The EDL mode itself implements the Qualcomm Sahara protocol, which accepts an OEM-digitally-signed programmer over USB. The programmer implements the Firehose protocol which allows the host PC to send commands to write into the onboard storage (eMMC, UFS).


4. Download the file
kingston-ha-rom.7z


5. Move the kingston-ha-rom.7z zip file to a temporary folder, extract all of the archived files. Next, delete the 7z file then move the contents of the temp folder to the edl directory that was created by cloning the git repository.
mkdir temp
cd temp
mv ~/Downlads/kingston-ha-rom.7z . 
7z x -o./ kingston-ha-rom.7z
rm *.7z
cd ~/edl
mv ~/temp/* .

You should see three new folders in the ~/edl folder:

bin
extras
flash


6. Before you flash the ThinkSmart device

The default boot screen is vertical, if you want to change that, you need to do it before flashing the device, by renaming splash.bin to splash.bin.vert and splash.bin.horiz to splash.bin (see Extras & Notes in OP).
(I don’t know which splash.bin needed changing, so I did both.)

cd ~/edl/flash
mv splash.bin splash.bin.vert && mv splash.bin.horiz splash.bin
cd ~/edl/Drivers/flash
mv splash.bin splash.bin.vert && mv splash.bin.horiz splash.bin


7. Flash the ThinkSmart device

cd into the edl/ directory and run the EDL command:

cd ~/edl
./edl qfil ~/edl/bin/rawprogram.xml ~/edl/bin/patch0.xml ~/edl/flash --loader=~/edl/bin/prog_emmc_firehose_8953_ddr.mbn

The terminal will show marching dots (…) as it is looking for a connection to an Android device.


8. Connect the Lenovo device via USB C

The USB-C connector is behind a rubber plug on the bottom.

9. Press both volume buttons and connect the power to the device.

I recommend using a switched outlet strip because you will be powering the device off and on a few more times. After a few seconds the terminal will show the device is connected and the flashing is proceeding. (You can release the volume buttons now).


10. When the flash finishes, remove power cable or switch the power strip off.


11. Put the device into the recovery mode.

Power the device with the volume-up button pressed. The buttons aren’t labeled, but volume-up is the center button.


12. Select “Wipe data/factory reset”, then Select “Reboot Now”


13. Finish up user provisioning

Once you see the Lock Screen, run these ADB commands to finish up user provisioning:

adb shell settings put secure user_setup_complete 1
adb shell settings put global device_provisioned 1


14. (Optional but recommended)

Install and start the virtualsoftkey app

~/edl$ adb install extras/virtualsoftkeys.apk

This gives you three navigation buttons at the bottom of the screen: Back, Home and History. .###(I think you have to reboot to make the navbar active)

VirtualSoftkey settings:
From the home page, tap the VirtualSoftkey app icon.

I set the navbar to hide after 5 seconds. To get it back, swipe up from the bottom of the screen. To hide it before the timeout, swipe down on the navbar itself.


15. Configure your wifi

Settings > Network & Internet


16. Install the HA app from the Aurora Store

.### I got a page full of errors when I installed the HA app. but upon reboot, the Home Assistant app was on the home page and it does work.

Problems I encountered:[edit]

I never saw this:

In Aurora setup, choose ‘Aurora Services’ when asked for an installer. The first time I ran Aurora Store, I signed on with my Google account and was presented with the Aurora Store. There was no “Aurora Services”.


Transfer over the included wallpaper and install a gallery app, so you can set it:

  adb push extras/wallpaper.png /sdcard/Downloads/
  adb: error: failed to get feature set: no devices/emulators found
  adb install extras/gallery.apk
  error: no devices/emulators found
  error: no devices/emulators found
  Performing Streamed Install
  adb: connect error for write: no devices/emulators found

Then after the first boot (and provisioning) adb root && adb remount This did not work for me, the terminal just hangs. This worked:

~/edl$ adb shell
CD-18781Y:/ $ su
CD-18781Y:/ # mount -o rw,remount /system
CD-18781Y:/ # exit
CD-18781Y:/ $ exit

.### Other issues:

~/edl$ adb shell mv /system/media/bootanimation.zip /system/media/bootanimation.zip.vert
  mv: bad '/system/media/bootanimation.zip': Permission denied
~/edl$ adb shell mv /system/media/bootanimation.zip.horiz /system/media/bootanimation.zip
  mv: bad '/system/media/bootanimation.zip.horiz': No such file or directory

auto load the HA client app on boot

Wallpanel (GitHub - TheTimeWalker/wallpanel-android: WallPanel is an Android application for Web Based Dashboards and Home Automation Platforms) has an option for start on boot
WallPanel wouldn’t install from github. No error messages, it just hangs.

I just installed it from the Aurora Store.




(TOP)