Are you just running 8.1 on your devices or do you have A11?
I guess what Iām trying to get at is after installing, there are a tonne of settings and other bits to install still for my liking and setup. If I could recreate this so itās as much of a one step install, that would be amazing. Not sure how much can be done though?
Not sure how you can do this as the settings are stored in /data/app
, but /data/
is created during the first boot.
Ah ok. Will just have to go through the steps.
Might be able to copy the settings back in a second step, /data
is writable.
so something like this might work;
# on the device you want to copy
adb shell
su
tar cvf /sdcard/Download/MySettings.tar /data/app
exit
adb pull /sdcard/Download/MySettings.tar
.
#on the new device
adb push /path/to/MySettings.tar /sdcard/Download
adb shell
su
cd /
tar xvf /sdcard/Download/MySettings.tar
exit
If I have time Iāll try it tomorrow.
ETA: Might actually be in /data/data
https://xdaforums.com/t/solved-how-to-manually-move-application-data-files-to-new-phone.4618619/
General question:
On my test device, Iāve been trying to get A11 installed with no luck and have been going backwards and forwards with different stock (teams) builds and then back to A8.1 etc. Iāve been struggling with this device hanging on the logo, whether it the Lenovo or HA logo after flashing and wiping/factory reset. Probably something in there still thatās causing the problem.
What could be causing the problem?
Thanks.
In which direction? Am I supposed this before the screen is off or after?
Thanks Mike! This worked to fix recovery, but I have a different problem now where it just hangs at the logo after a reset. Iām going to reflash and see if it helps, thanks again
After updating recovery and re-flashing, itās good to go nowā¦ Thanks again Mike!
Can anyone tell me what Iām doing wrong?
Assuming you have python3 installed, I would suggest you try running this:
pip3 install docopt
Thinking about this a bit more, is there a log thatās accessible on the device that might point to the issue?
When I wrote that I was using Windows 10. Then I gave up and yesterday I figured Iād try putting Linux Mint on a flash drive and starting from there. Iāve gotten much farther, but despite 3 different attempts I canāt quite get things to work. Ive flashed the device and got to the splash screen, but now Iām getting stuck on the ADB calls. Iām going to start over today with a fresh brain and a more careful reading of this post and all the troubleshooting guides
Do you have ADB installed?
adb logcat
from your host
Thank you.
I finally got it working! I think all the troubles I had on Linux were related to running Mint off a USB that was too small. There wasnāt enough space to fully un-zip the rom file (and I tried to ignore the error), so it pushed an incomplete package onto the device.
I did a full install of Linux-Lite on that same flash drive (itās a 64 gig drive, in case anyone is wondering) and followed stevemannās notes. The Linux install ran pretty slowly, but everything worked and there was enough room for all the files lol.
@stevemann , one minor note on your Linux notes: thereās a typo where you put ādownladsā instead of ādownloadsā in the path.
Thank you to everyone involved for all the hard work you put into this. Once I got my hardware situation figured out I was able to get all 3 of my ThinkSmarts flashed and online in about an hour. As you can probably tell, Iām the sort of guy who needs everything spelled out for me, so itās a credit to all of you that I was able to make that happen.
@staceydodds and @Mike_27 I read somewhere that this sort of thing goes much more smoothly on Linux than on Windows, so I made a Linux bootable USB drive and worked from there. Once I made that switch, this problem went away. I think youāre right, though, that I installed python instead of python3.
After poking around some, I found some interesting things ā¦
I think I might be able to pull this off with the unused space in /resource
, adb backup
, and a couple shell scripts ā¦
Hereās a teaser which sets device_provisioned=1
, user_setup_complete=1
, creates a user editable init.local.rc which runs after BOOT_COMPLETED
.
It also attempts to enable, Developer Options, but that part is kind of sketchy at the moment ā¦
CD-18781Y:/ # cat /vendor/bin/init.qti.vendor.testscripts.sh
#!/vendor/bin/sh
# Copyright (c) 2015,2017 The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of The Linux Foundation nor
# the names of its contributors may be used to endorse or promote
# products derived from this software without specific prior written
# permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# this is the file for test teams to trigger their test setup.
# This is going to use vendor shell utilties.
#
#
# All the output files will be created under root privilege. Please use
# "adb root" before pulling the generated files.
PATH=$PATH:/system/bin;
# Lets see what we have environment wise ...
/vendor/bin/env > /data/local/tmp/vendor-env.txt;
echo "\n" >> /data/local/tmp/vendor-env.txt;
# Create /data/local/init.local.rc for basic rc.local behavior.
if ! [ -f /data/local/init.local.rc ]; then
if [ -f /resource/init.local.rc ]; then
$(cp /resource/init.local.rc /data/local/);
echo "created initial init.local.rc" >> /data/local/tmp/vendor-env.txt;
fi
else
echo "init.local.rc -> exists" >> /data/local/tmp/vendor-env.txt;
if ! [ $(md5sum -b /resource/init.local.rc) = $(md5sum -b /data/local/init.local.rc) ]; then
echo "init.local.rc -> is different" >> /data/local/tmp/vendor-env.txt;
$(cp /resource/init.local.rc /data/local/);
else
echo "init.local.rc -> the same" >> /data/local/tmp/vendor-env.txt;
fi
fi
# A symbolic link to /system/bin/settings needs to be in /vendor/bin.
# We cannot create it here, so we need to do it manualy in the vendor image.
# ln -s /system/bin/settings settings
# lrwxrwxrwx 1 root root 20 2024-04-14 15:29 /vendor/bin/settings -> /system/bin/settings
SETTINGS=$(which settings);
if ! [ -L ${SETTINGS} ] && [ -e ${SETTINGS} ]; then
echo "/vendor/bin/settings -> missing" >> /data/local/tmp/vendor-env.txt;
else
echo "/vendor/bin/settings -> exists" >> /data/local/tmp/vendor-env.txt;
## adb shell settings put global device_provisioned 1
PROVISIONED=$(${SETTINGS} get global device_provisioned);
echo "PROVISIONED -> "${PROVISIONED} >> /data/local/tmp/vendor-env.txt;
if [ "${PROVISIONED}" = "0" ]; then
$(${SETTINGS} put global device_provisioned 1);
PROVISIONED=$(${SETTINGS} get global device_provisioned);
echo "PROVISIONED -> "${PROVISIONED} >> /data/local/tmp/vendor-env.txt;
sleep 1;
fi
# adb shell settings put secure user_setup_complete 1
COMPLETE=$(${SETTINGS} get secure user_setup_complete);
echo "USER SETUP COMPLETE -> "${COMPLETE} >> /data/local/tmp/vendor-env.txt
if [ "${COMPLETE}" = "0" ]; then
$(${SETTINGS} put secure user_setup_complete 1);
COMPLETE=$(${SETTINGS} get secure user_setup_complete);
echo "USER SETUP COMPLETE -> "$COMPLETE >> /data/local/tmp/vendor-env.txt;
sleep 1;
fi
# lets try to enable developer mode ...
if [ ${PROVISIONED} = "1" ] && [ ${COMPLETE} = "1" ]; then
DEVELOPMENT="/data/user_de/0/com.android.settings/shared_prefs";
if ! [ -f ${DEVELOPMENT}/development.xml ]; then
if ! [ -d ${DEVELOPMENT} ]; then
$(mkdir ${DEVELOPMENT});
$(chown system:system ${DEVELOPMENT});
$(chmod 771 ${DEVELOPMENT});
fi
PREFERENCES="/vendor/developer";
$(cp ${PREFERENCES}/*.xml ${DEVELOPMENT}/);
$(chown system:system ${DEVELOPMENT}/*.xml);
$(chmod 660 ${DEVELOPMENT}/*.xml);
sleep 1
# start and stop the settings app so Developer options shows.
# am also needs a link to /system/bin/am
# ls -l /vendor/bin/am
# lrwxrwxrwx 1 root root 14 2024-04-14 20:44 /vendor/bin/am -> /system/bin/am
$(am start -n com.android.settings/.Settings);
sleep 1
$(am force-stop com.android.settings);
fi
fi
fi
# Run /data/local/init.local.rc
if [ -f /data/local/init.local.rc ]; then
chmod 755 /data/local/init.local.rc;
$(/data/local/init.local.rc);
fi
###
CD-18781Y:/ #
I just used the latest builds from the first post and have a similar issue.
Additionally it seems I cannot enable developer mode by tapping the build number either. Never seen that one before.
you forgot to do;
adb shell settings put global device_provisioned 1
adb shell settings put secure user_setup_complete 1