Benjamin-Loison / android

0 stars 0 forks source link

Install open-source equivalents for a Xiaomi Mi A3 user #78

Open Benjamin-Loison opened 3 weeks ago

Benjamin-Loison commented 3 weeks ago

Following #25 the manually installed apps are what to focus on.

Benjamin-Loison commented 3 weeks ago

Related to Benjamin_Loison/AuroraStore/issues/14.

Benjamin-Loison commented 3 weeks ago

The Stack Overflow answer 53634311 may help.

adb shell pm list packages -3
adb shell pm list packages -3 -i
Benjamin-Loison commented 3 weeks ago
# Based on OverClock3000 `/home/benjamin/notifications/notifyOnPlayStoreAppUpdate.py`.

import requests
import re
import json
from lxml import html

apps = '''package:fr.doctolib.www  installer=com.aurora.store
package:com.termux.api  installer=com.google.android.packageinstaller
...'''.splitlines()

# Source: https://github.com/JoMingyu/google-play-scraper
class Regex:
    SCRIPT = re.compile('AF_initDataCallback[\\s\\S]*?<\\/script')
    KEY = re.compile("(ds:.*?)'")
    VALUE = re.compile('data:([\\s\\S]*?), sideChannel: {}}\\);<\\/')

def parseDom(dom, keys):
    matches = Regex.SCRIPT.findall(dom)
    for match in matches:
        keyMatch = Regex.KEY.findall(match)
        if keyMatch and keyMatch[0] == 'ds:5':
            valueMatch = Regex.VALUE.findall(match)[0]
            value = json.loads(valueMatch)
            value = value[1][2]
            for key in keys:
                if value is None or key >= len(value):
                    return
                value = value[key]
            return value

for app in apps:
    app, appInstaller = re.match('package:([a-z._]+)  installer=([a-z.]+)', app).groups()
    if appInstaller != 'com.android.vending':
        continue
    if 'error' in requests.get(f'https://f-droid.org/api/v1/packages/{app}').json():
        url = f'https://play.google.com/store/apps/details?id={app}'
        content = requests.get(url).text
        tree = html.fromstring(content)
        name = tree.xpath("//h1[@itemprop='name']")
        if tree.xpath('//title')[0].text_content() == 'Not Found':
            continue
        appName = name[0].text_content()
        print(f'{appName} ({app}, {appInstaller})')
        #print(appName)
Benjamin-Loison commented 3 weeks ago
adb shell pm list packages -3 -i | grep com.android.vending
    if appInstaller != 'com.android.vending':
        continue

Uninstalled:

Google Play Music Google TV

Disabled:

Google Lens Google

I checked all pre-installed apps for these cases.

Maybe could find an alternative to Calculator.

Benjamin-Loison commented 3 weeks ago

Available on Play Store but not F-Droid:

Doctolib - Your health partner: not available on Fennec? WhatsApp Messenger: see Benjamin_Loison/WhatsApp/issues/6 SNCF Connect: Trains & routes: not available on Fennec? Pinterest: not available on Fennec? komoot - hike, bike & run: open-source alternative? Wikipedia: Komoot Signal Private Messenger: see Benjamin-Loison/Signal-Android/issues/19 Microsoft Outlook: K-9 is not fine? Voice Recorder & Audio Editor: open-source alternative? Graphics are maybe important for this one. It has ads. Google Fit: Activity Tracking: like this one, why? Citymapper: open-source alternative? CamSam - Speed Camera Alerts: open-source alternative? Airbnb: not available on Fennec? Messenger: not available on Fennec? Google Keep - Notes and Lists: open-source alternative? Microsoft Authenticator: no alternative like KeePassDX? CamScanner- scanner, PDF maker: open-source alternative? MapFactor Navigator: open-source alternative? Organic Maps? Dictionary Linguee: is offline that much important? Otherwise available on Fennec. Related to Linguee_webscraper/issues/4 Google News - Daily Headlines: open-source alternative? Open-source alternative? https://news.google.com/home Microsoft Teams: not available on Fennec?

Concerning those possibly available on Fennec the issue is maybe receving notifications. Concerning Doctolib, Pinterest and Airbnb I confirm that for the moment until now no relevant notifications.

Secret ones:

-----BEGIN PGP MESSAGE-----

hF4DTQa9Wom5MBgSAQdAVWePyBWsF7+jGCsVWsnquJ9D2SGmBNx8Y9MKqnhB4XIw
2O04ekAQPV4FJ8WKjg7F/ReAuKILqbEbd4ma7GnhN+btcI6gfepWH8bHg150m4mG
0mwBqKFmXQ5e/xpWqWUpcYwBpYfCEb8ELJdPDaAAEi4nQLU5xyBYodaZz5ltj+s6
kJBWjSboMseDwc8EbmYKaSib/4ogimoZ6Bxpfw1Ms5jZBXQZ1iDUb7updBMZ7SWK
YivyyYr1HL+Sb3NAa2M=
=Y+DF
-----END PGP MESSAGE-----

Which ones have ads?

Benjamin-Loison commented 3 weeks ago

I verified that I have accounts for all easily creatable accounts.