:: Re: [DNG] How well does "ADB" work?
Top Page
Delete this message
Reply to this message
Author: Peter Duffy
Date:  
To: dng
Subject: Re: [DNG] How well does "ADB" work?
I had an interesting experience with android and adb a few weeks ago.
I've got an old Sony Xperia Z tablet, and had hit the usual problem
where I couldn't upgrade an app because the version of android on the
tablet didn't support it, and I couldn't upgrade android because it
wasn't supported on the tablet. So I'd installed an alternative ROM -
LineageOS v.21.

I have a Muse headband - it's basically a primitive EEG device, used,
among other things, for meditation training. It connects - if one is
lucky - to an android or iOS device via bluetooth. I hadn't used it for
a long time, and finding it recently, decided to have another play with
it. It still worked - but only with the original version of the android
app (for some reason, it won't work with the current version of the app
or android - hence my sudden interest in bluetooth debugging). But the
original app won't work with LineageOS. So - I decided to try to put
back the original android ROM on the Sony tablet.

To cut a long story short - I ended up completely "bricking" the
tablet. When powered on, the only indication that something was
happening was that the LED on the side came on, and there was a slight
greyish tinge on the screen. Also, if I connected it to the computer
via USB, dmesg showed that it had detected it as an "SGP321" device,
which was correct. But neither adb or fastboot (another linux utility
for working with android) would recognise it (for adb to work, usb
debugging has to be enabled in android - obviously impossible given
that the screen was blank; for fastboot to work, the tablet has to be
booted into the recovery partition (I think that's right, anyway)).

After nearly a day (and night) of wrestling with this problem, I was on
the point of disposing of the tablet with the aid of a hammer. However,
I noticed something interesting: if I held down the power and volume-up
buttons for a while, the LED would flash white three times: if at that
point, I connected it to the computer, dmesg reported that the device
had been detected as "U1 Service". And even more interestingly, if at
that point I ran the flashboot utility (windows and linux utility for
flashing new ROMs to devices), it detected the tablet in "flash" mode,
and claimed that it was able to flash an image to it. I managed to find
a copy of the last "official" Sony android image (5.1) which had worked
on tablet, and flashed it: to my astonishment, it completed
successfully - but the tablet still only gave the grey screen when
booted. So I found an older official image (4.2) and flashed that
instead. Again, the flash worked - and the tablet booted successfully.
I seriously couldn't believe it: I was almost tempted to pinch myself. 

The overriding problem which I encountered (and I suspect everyone else
who crosses swords with android encounters) is the almost complete lack
of useful information. In a way, I can understand it: a mobile phone is
potentially a very vulnerable device - and given that people are
encouraged to use it for banking . . . But it's very frustrating:
trying to diagnose and fix android problems makes getting blood from a
stone positively trivial by comparison.  

adb is a very useful utility, enabling a lot of things to be done which
aren't possible by default on an android device (it's probably the
least harrowing way of transferring files between a computer and
android). To use it, usb debugging has to be enabled on the phone, and
there's a standard way of achieving this: settings -> about phone -
then tap 10 times (yes, really) on "build number". After that, android
should say that usb debugging is enabled, and if the device is
connected to the computer "adb devices" should show that it has
detected the device, and "adb shell" should start a shell on it. One
interesting variation is to do "adb root" before "adb shell" - if the
phone allows it, the shell will have root privileges (may be necessary
to enable adb root in the usb debugging options).

On Mon, 2026-04-20 at 08:23 +0200, al3xu5 via Dng wrote:
> Sun, 19 Apr 2026 05:22:36 -0400 - Walter Dnes
> <waltdnes@???>:
>
> >   I got a smartphone last fall, and I am sad to report that Android
> > is
> > adware.  [...]
>
> Android is adware... bloatware, malware, spyware, tracker...
>
>
> > My plan is to...
> >
> > - download+install "apk-analyzer" to my phone to get packages
> > listing
> > - "apt install adb" on my desktop
> > - remove some packages from the phone
> > - what's the exact syntax?
> >
> >   The removal command I've seen listed most often is...
> >
> > pm uninstall --user 0 com.android.cellbroadcastreceiver
> >
> > [...]
>
> Maybe you have already see those:
>
> https://xdaforums.com/t/guide-remove-google-play-services-from-android-without-root-via-adb-shell-more-privacy-for-your-malware-phone.4720085/
>
> https://www.xda-developers.com/uninstall-carrier-oem-bloatware-without-root-access/
>
> https://rugu.dev/en/blog/debloat-with-adb/
>
> To speedup the process you can use cat and xargs with a text file
> containing
> the list of apps to uninstall (and so have also a note of what you
> did,
> useful in case you need to reinstall some app).
>
> Anyway, uninstalling / disabling apps for a user do not "wipe" the
> apps from
> the phone...
>
> If you have a pixel phone (or, in the future, a motorola) then
> GrapheneOs
> <https://grapheneos.org/> is the best solution.
>
>
> Regards
> alexus
>
>
> _______________________________________________
> Dng mailing list
> Dng@???
> Manage your subscription:
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> Archive: https://lists.dyne.org/lurker/list/dng.en.html