[Android Q&A, Help & Troubleshooting] wezhosking:
Hacking the A806 with Linux/adb

After reading Peter's adventures with the A806 and my daughter giving up on the phone because of Nagware/Spamware (and getting another Lenovo phone :( ) I thought I would give it a small look at from a android/Linux look.

I wanted to keep it fairly bog standard (with the standard google stuff ).

I installed all of the Google packages manually.

I used Peter's AOSP boot.img and did the following :

cd AOSP/

fastboot flash boot boot.img

adb push su /mnt/media_rw/sdcard0/su

adb shell

setenforce Permissive

getenforce

# Check SE Linux stuff is turned off.

/storage/sdcard0/su

chattr -a /system/xbin/su

mount -o remount,rw /system

# I had to create some space at this stage, as /system was full - removed some garbage manually

cp /storage/sdcard0/su /system/xbin/su

and ran the following shell script from my ubuntu 16.04 box :

#!/bin/bash

#

# Remove packages on machine not it use

#

adb shell 'pm list packages'

adb shell 'pm list packages'

adb shell 'pm disable com.lenovo.safecenter'

adb shell 'pm disable com.lenovo.safecenter'

adb shell 'pm disable com.lenovo.safecenter'

adb shell 'pm disable com.lenovo.lsf.device'

adb shell 'pm disable com.lenovo.lesnapshot'

adb shell 'pm disable com.lenovo.simsettings'

#adb shell 'pm disable com.lenovo.themecenter'

adb shell 'pm disable com.lenovo.lsf'

adb shell 'pm disable com.lenovo.lsf.pay.phone'

adb shell 'pm disable com.lenovo.lenovosmartscene'

adb shell 'pm disable com.lenovo.widetouch'

adb shell 'pm disable com.lenovo.fm'

adb shell 'pm disable com.lenovo.android.settings.tether'

adb shell 'pm disable com.lenovo.frameworks.singlehand'

#adb shell 'pm disable lenovo'

adb shell 'pm disable com.sms.sys.manager'

adb shell 'pm disable com.lenovo.recorder'

adb shell 'pm disable com.lenovo.onekeylock'

adb shell 'pm disable com.lenovo.clearBuildInSDcard'

adb shell 'pm disable com.lenovo.powercenter'

adb shell 'pm disable com.lenovo.weatherserver'

adb shell 'pm disable com.lenovo.scgmtk'

adb shell 'pm disable com.lenovo.factorymode'

adb shell 'pm disable com.lenovo.ue.service'

adb shell 'pm disable com.lenovo.lenovoweathertheme'

adb shell 'pm disable com.lenovo.weather.theme.plus'

adb shell 'pm disable com.lenovo.gesture'

adb shell 'pm disable com.lenovo.secretcode'

adb shell 'pm disable com.lenovo.launcher.launcherextend'

adb shell 'pm disable com.lenovo.videoplayer'

adb shell 'pm disable com.lenovo.hotknot'

adb shell 'pm disable com.lenovo.lenovosearch'

adb shell 'pm disable com.lenovo.optimize'

adb shell 'pm disable com.lenovo.music'

adb shell 'pm disable com.lenovo.updateassist'

adb shell 'pm disable com.lenovo.ideawallpaper'

adb shell 'pm disable com.lenovo.PlayersTutorial'

adb shell 'pm disable com.lenovo.launcher'

adb shell 'pm disable com.lenovo.defautpackage'

adb shell 'pm disable com.lenovo.weatherwallpaper'

adb shell 'pm disable com.lenovo.deskclock'

adb shell 'pm disable com.lenovo.calendar'

adb shell 'pm disable com.lenovo.wifiswitch'

adb shell 'pm disable com.lenovo.email'

adb shell 'pm disable com.lenovo.smartrotation'

adb shell 'pm disable com.lenovo.lewea'

adb shell 'pm disable com.lenovo.systemuiplus'

adb shell 'pm disable com.lenovo.ideafriend'

adb shell 'pm disable com.lenovo.activityo'

adb shell 'pm disable com.lenovo.smartstandby'

adb shell 'pm disable com.lenovo.safecenter'

adb shell 'pm disable com.android.wallpaper'

adb shell 'pm disable com.android.dreams.basic'

adb shell 'pm disable com.android.galaxy4'

adb shell 'pm disable com.android.noisefield'

adb shell 'pm disable com.android.wallpaper.holospiral'

adb shell 'pm disable com.android.magicsmoke'

adb shell 'pm disable com.android.musicvis'

adb shell 'pm disable com.android.musicfx'

adb shell 'pm disable com.android.phasebeam'

adb shell 'pm disable com.android.dreams.phototable'

#adb shell 'pm disable com.android'

#

-----------

In order to see what was causing the pop-up thats were still happenning, I used :

adb logcat

and waited for the pop up to appear, it was the sms manager

So I added :

adb shell 'pm disable com.sms.sys.manager'

into the script .

Hope this helps