User Tools

Site Tools


doc:appunti:hardware:gretel_a7

This is an old revision of the document!


Gretel A7 Android Phone

Features

CPU MediaTek MT6580 / ARM Cortex-A7 1.3 GHz Quad-Core (no 64bit)
RAM 1 Gb
Flash 16 Gb
Display 720×1280 pixels
Battery Replaceable 3.8V 2000 mAh
LED Red/green LEDS under the Home key
Camera 8 Mpixel
Android 6.0 Marshmallow
Telephony 3G/2G

Latest System Software

Actually I'm running my Gretel A7 with the following configuration:

  • TWRP Recovery 3.0.2 - We use version 3.0.2 because we had problems with newer 3.2.1, see below. NOTICE: When you flash the recovery image, do not reboot normally, otherwise the partition will be overwritten. From poweroff, reboot instead into Select Boot Mode Menu and choose Recovery.
  • Stock ROM 20170908 - We found on the net the archive Y8303.YX.A7.Gretel.B1B8.6.0.V01.07.20170908.rar. Beware that this stock ROM contains a trojanized launcher! See below. It features Android 6.0, with security patch level August 5, 2015.
  • SuperSU v2.82 build number 20170528234214 - Needed to gain root privileges and replace the launcher.
  • Rootless Pixel Launcher 3.9.1 - Downloaded from F-Droid repository, replaces the trojanized default launcher.
Numero modello A7
Versione di Android 6.0
Livello patch di sicurezza Android 5 agosto 2016
Versione banda base MOLY.WR8.W1449.MD.WG.MP.V59.P4, 2016/09/05 16:45
Versione kernel 3.18.19
xsh@joyatel07 #2
Fri Sep 8 12:20:34 CST 2017
Numero build Y8303.YX.A7.Gretel.B1B8.6.0.V01.07.20170908

Factory Installed Malware: com.ibingo.launcher3 and Wireless Update

After several months spent trying to get rid of pop-up messages, automatic install of unwanted apps, browser starting automatically with advertising pages, it seems that I have found the culprit: the phone comes factory installed with the launcher and the wireless update app which are customized (trojanized) versions of the Android stock apps. It is not simple to remove theese apps and the launcher must be replaced with with another one (I choosed Apex Launcher). Root privileges are required and I had to operate on the command line. Read below…

  • /system/priv-app/Launcher3_G_yisheng_A47_201705191558
    Launcher3-com.ibingo.launcher3-Launcher3_G_WVGA_FWVGA_4.4.X.0.1.5_Ibingo-60170519.apk
    Reported as malware by Dr.Web.
  • /system/priv-app/SystemFota
    Aggiornamento wireless-com.fota.wirelessupdate-4.5.1-14.apk
    Reported as malware by F-Secure.

Google Play Protect: Harmful com.android.service

Sul telefonino Gretel A7 con Android 6 è comparso il messaggio di Google Play Protect che segnala:

Disattiva app dannosa com.android.service potrebbe danneggiare il dispositivo.

In inglese il messaggio dovrebbe essere: Disable harmful app com.android.service can damage your device.

Secondo alcuni report potrebbe addirittura trattarsi del Trojan-Spy:Android/Tramp.A. Per il momento si è acconsentito alla disattivazione dell'app.

Per vedere tale app in ImpostazioniApp, è necessario attivare l'opzione Mostra sistema dal menu. Essendo una app di sistema non è possibile disinstallarla senza i permessi root.

App dannosa: launcher

Nei primi mesi del 2018 il programma Google Play Protect ha individuato un'altra App dannosa, chiamata launcher. Play Protect dichiara che Questa app è falsa. Può danneggiare il tuo dispositivo e rubare i tuoi dati.

Nell'elenco delle app di sistema se ne trovano due quasi omonime:

  • launcher-com.vsen.assault-370.001.20180117.01-370.apk (segnalata come malware da Google Play Protect e Dr.Web)
  • launcher-com.flame.vividn-39.0-39.apk (non segnalata)

Si è dato il permesso al Play Protect di rimuovere l'app incriminata.

Altro malware e app non desiderate

Per l'individuazione di malware si sono utilizzati anche i seguenti servizi on-line, dove è possibile caricare dei file .apk per sottoporli a scansione antivirus:

Queste le directory dove cercare le app installate/sospette:

  • /system/priv-app/
  • /system/app/
  • /data/app/
  • /system/vendor/operator/app/

Dopo aver rimosso le due app segnalate da Google Play Protect, sono continuati i comportamenti indesiderati da parte del telefono, come la comparsa improvvisa di pop-up pubblicitari. Tra le app sospette si segnala

  • attps-com.nefed.bafic-36.20180207.01-36.apk (malware per DrWeb)
  • Shell-com.internal.lock-4.5.0-450.apk (malware per F-Secure)

La prima è stata trovata elencata tra quelle che hanno consumato batteria, la seconda aveva attivo il permesso di Spostamento su altre app.

Le attività malevole sono continuate (installazione di nuove app, pop-up, richieste di permessi root), rimosse anche le seguenti app:

  • Devices-com.ressor.swing-36.001.20180523.01-36.apk (malware per Ikarus, DrWeb, ecc.)
  • Devices-com.whist.blowe-37.001.20180511.01-37.apk (malware per Ikarus, DrWeb, ecc.)
  • Devices-com.whist.blowe-52.001.20180610.01-52.apk (malware per AVG, ecc.)
  • Omacp-com.vesouse.recome-37.001.20180529.01-37.apk (malware per DrWeb, ecc.)

La rimozione della app di cui sopra non è stata sufficiente. Quindi si è provveduto anche a rimuovere:

  • Launcher3-com.ibingo.launcher3-Launcher3_G_WVGA_FWVGA_4.4.X.0.1.5_Ibingo-60170519.apk (cartella /system/priv-app/Launcher3_G_yisheng_A47_201705191558). Classificato come malware da AVG e DrWeb, ecc.). ATTENZIONE! Questa app è il launcher predefinito! Prima di rimuoverlo è necessario installarne un altro (ad esempio Rootless Pixel Launcher da F-Droid) e renderlo predefinito da ImpostazioniHome Page.
  • com.whatsapp (cartella /system/vendor/operator/app/whatsapp)
  • com.facebook.katana (cartella /system/vendor/operator/app/facebook)

Procedura generale per rimuovere le app di sistema e nascoste

Uno degli effetti malevoli riscontrati è l'installazione automatica di app non desiderate, per vedere quali app hanno il permesso di farlo si è consultato il file /data/system/packages.xml cercando la stringa android.permission.INSTALL_PACKAGES. Purtroppo sono in molte le app con questo permesso.

Alcune app risultando di sistema e non è possibile disinstallarle (ImpostazioniAppMenu, Mostra Sistema). Altre app non risultano nell'elenco, neanche attivando Mostra Sistema. È il caso di com.whatsapp e com.facebook.katana

La disinstallazione fallisce anche da riga di comando con i permessi di root:

su
pm uninstall com.whatsapp
Failure [DELETE_FAILED_INTERNAL_ERROR]

La procedura utilzzata in generale in questi casi è:

  1. Con la App Back-up e ripristino si è fatta una copia della applicazione prima di rimuoverla. Bisogna abilitare nella app di backup il menu ImpostazioniMostra app di sistema. Alcune app non risultano comunque visibili neanche in questo caso.
  2. Recuperate dal telefonito tali archivi, ad esempio usando adb pull. La cartella in cui cercare è /sdcard/App_Backup_Restore/archived/.
  3. Se la app risulta da ImpostazioniApp ed è possibile rimuoverla, procedere alla rimozione. Altrimenti provare almeno a disattivarla e/o terminarla.
  4. Per le app che non è possibile rimuovere da interfaccia grafica è necessario agire da riga di comando con i privilegi di root:
    1. Montare /system in lettura scrittura: mount -o remount,rw /system
    2. Rimuovere la cartella che contiene la app
    3. Riavviare il telefono
    4. Verificare il file /data/system/packages.xml: i riferimenti alle app rimosse dovrebbero scomparire automaticamente dopo il reboot.

Modalità Sviluppatore e Debug USB

Anzitutto attivare la modalità sviluppatore: da ImpostazioniInfo sul telefono; fare tap diverse volte sulla voce Numero build finché compare il messaggio Ora sei uno sviluppatore.

Nel menu Impostazioni compare anche Opzioni sviluppatore, tra le quali è possibile attivare Debug USB.

OEM unlocking

Once enabled the Developer options (see above) you can also enable:

  • Settings App ⇒ Developer options ⇒ OEM unlocking

This will enable the oem unlock command into fastboot mode (see below), and then you will able to flash custom ROM images. This is required e.g. to flash a custom Recovery image which is capable to load SuperSU binaries to get root privileges.

Special Boot Modes

Besides the normal Android system, this phone can be booted (started) into alternative modes:

  • Select Boot Mode Menu
  • Fastboot mode
  • Recovery
  • Factory mode

Select Boot Mode Menu

Poweroff the phone. While pressing Volume UP, press the Power button until the menu appears. Quick release all the buttoons:

Select Boot Mode:
[VOLUME_UP to select.  VOLUME_DOWN is OK.]

[Recover     Mode]         <<==
[Fastboot    Mode]
[Normal      Mode]

Fastboot mode

È possibile entrare in modo Fastboot dal Select Boot Mode Menu (vedi sopra) oppure usando la Android shell installata su un PC. In questo caso si impartisce il comando adb reboot bootloader. Il telefono si riavvia e sullo schermo tutto nero compare la scritta:

=> FASTBOOT mode...

In questa modalità è possibile effettuare lo sblocco del bootloader (verificare di aver prima attivato l'apposita opzione nella App Impostazioni, vedi sopra). Collegando il telefono col cavetto USB e utilizzando gli Android platform-tools installati su un PC, si esegue con i privilegi di root:

# fastboot oem unlock
(bootloader) Start unlock flow
...

Sul telefono compare il messaggio di warning perché verranno cancellati tutti i dati utente! Si conferma con Volume UP.

Dopo l'oem unlock sarà finalmente possibile il flash di una Recovery custom, ad esempio la TWRP. L'operazione si esegue sempre in Fastboot mode econ l'ausilio degli Android platfrom-tools.

L'operazione di flash fallisce se non si è sbloccato il bootloader (oem unlock). Ecco cosa succede in tal caso:

# fastboot flash recovery /home/user/recovery.img 
target reported max download size of 134217728 bytes
sending 'recovery' (12944 KB)...
OKAY [  0.448s]
writing 'recovery'...
FAILED (remote: download for partition 'recovery' is not allowed
)

FIXME Il flash della Recovery TWRP con questo metodo non ha funzionato! La procedura apparentemente funziona senza errori, ma effettuando in successione un reboot normale e quindi un reboot recovery (entrambi eseguiti da Android tools su PC), ci troviamo nuovamente con la Recovery stock originale! Lo stesso problema è stato riscontrato facendo il flash con il programma Linux SP Flash Tool v5.1728. È come se durante il reboot qualcosa facesse il ripristino della recovery stock, tant'è vero che eseguendo la rilettura della partizione recovery con il programma SP Flash Tool (operazione Readback), in effetti troviamo la recovery stock (si è verificato scompattando la ramdisk estratta dall'immagine stessa, con gli opportuni tool).

Recovery

Attivato il recovery mode con il metodo visto sopra, oppure da Android shell con il comando adb reboot recovery. Il telefono si riavvia, compare l'icona del robottino verde rotto con la scritta No command.

Per far comparire il menu della Android Recovery: mentre si preme il pulsante Power, premere Volume UP.

Android Recovery
Gretel/full_joyasz6580_we_m/joyasz6580_
6.0/MRA58K/1495784183
user/dev-keys
Use volume up/down and power.

Factory mode

In maniera simile al Download mode dei telefoni Samsung, questo modello ha il Factory mode, lo si attiva con questa procedura:

  • Spengere il telefono
  • Premere Volume Down + Home + Power per 10 secondi

Problem on Flashing the TWRP Recovery

I followed the instructions found into two posts, one from www.androidweblog.com, and the other from www.getdroidtips.com. I had a very strange problem, here there are my two posts about it:

Hi. I tried flashing the TWRP Recovery using a GNU/Linux PC
using two methods: via the fastboot utility from the
paltform-tools of the Android SDK, and via the SP Flash Tool
program for Linux O.S. Both methods seems to work: the messages
confirm the flashing was performed well. But when I boot in
recovery mode, I get always the stock recovery (icon of died
Droid, then Power + Volume UP to bring the stock Android
Recovery, not the TWRP one). Some hints?
Finally I succeded into flashing the TWRP recovery! It seems
that the trick is to reboot into recovery mode after TWRP
flashing, WITHOUT ever booting in normal mode! It seems that if
you boot in normal mode after TWRP flash, something restore the
stock Recovery.

So the procedure is: poweroff the phone, execute SP Flash Tool
(I used the GNU/Linux 64 bit version), load the scatter file and
the TWRP recovery.img, click the Download button, connect the
phone with the USB cable: the flashing starts automatically and
succeed in a few seconds. Unplug the USB cable, start in Select
Boot Mode Menu (pressing Volume UP and Power for some seconds).
Then boot directly in recovery.

Once started TWRP recovery, I installed the SuperSU. After a
couple of reboots required by SuperSU, I have a rooted phone
with TWRP installed permanently on it.

Flashing the TWRP Recovery and gain root privileges

Before flashing the TWRP recovery image, you need to complete some steps:

  • Enable the Developer options, from SettingsAbout phone, tap several times over Build number.
  • Enable Debug USB debugging in SettingsDeveloper options.
  • Enable OEM unlocking in SettingsDeveloper options.
  • Execute oem unlock in fastboot mode (requires the Platform-tools installed on the PC and the USB cable).

We run everything on a GNU/Linux box, the required pieces of software are:

  • The TWRP recovery.img, expressly compiled for the Gretel A7. Do not use images build for other phones!
  • The scatter file for the Gretel A7. We found it into the TWRP archive. You can find it also into the stock ROM archive. You need the file expressly derived from this device, otherwise you risk to flash the image into the wrong place and brick the phone!
  • The SuperSU archive. The first thing you want to do, once started into TWRP recovery, is to install SuperSU to gain root privileges. This is the original download link.
  • The Platform-tools. We used them just to execute the oem unlock command. They are available via Android SDK download or as Debian packages adb and fastboot.It should be possibile to use them also to actually flash the recovery.img, but we failed. We had to use the SP Flash Tool program instead.
  • The SP Flash Tool for GNU/Linux. Despite the claim on their site, the 32 bit version does not exists (the archive contains actually a 64 bit version). We used the 64 bit version 5.1520.00.100.

Abbiamo accennato sopra al problema avuto durante il flash della Recovery TWRP: in pratica al reboot successivo pare che qualcosa rimetta a posto l'immagine originale, come se il flash non avesse funzionato. Dopo numerosi tentativi abbiamo eseguito con successo una procedura che ha consentito l'esecuzione di TWRP ed ottenere i permessi di root con l'installazione di SuperSU.

  1. Copiato il file UPDATE-SuperSU-v2.82-20170528234214.zip nella cartella Download del telefono. In questo modo alla prima esecuzione di TWRP possiamo installare SuperSU, senza dover fare un reboot.
  2. Spento il telefono e scollegato il cavetto USB.
  3. Eseguito il programma SP Flash Tool v5.1520 per GNU/Linux 64 bit (eseguire lo script flash_tool.sh oppure direttamente il binario flash_tool).
    1. Dal tab Download cliccare Scatter-loading ed aprire il file MT6580_Android_scatter.txt. Abbiamo utilizzato quello trovato in un archivio con il backup completo della ROM originale del Gretel A7.
    2. Sulla riga della partizione recovery si clicca su Location e si indica il file recovery.img contenuto nell'archivio della TWRP. Abbiamo usato una versione 3.0.2 by Jemmini.
    3. Click sul pulsante Download.
    4. Collegare il telefono spento al cavetto USB, dopo pochi secondi il processo di flash parte automaticamente, senza premere alcun bottone. Attendere pochi secondi fino a vedere il dialog-box di OK dal programma (cerchio verde).
  4. Scollegare il cavetto USB ed avviare il Select Boot Mode Menu: tenere premuto il tasto Volume UP e quindi premere Power per qualche secondo. Dal menu scegliere direttamente Recovery.
  5. Dal menu di TWRP eseguire Install e quindi indicare il file SuperSU copiato nel primo passaggio.

ATTENZIONE :!: Sembra che il trucco per la riuscita stia proprio nel penultimo passaggio descritto: non si deve fare un reboot normale, ma andare direttamente alla Recovery appena flashata!

Dopo aver fatto questa operazione pare che la recovery TWRP resti installata in maniera permanente, non si è capito se sia stato risolutivo l'installazione di SuperSU.

Flashing TWRP and root using the Linux Command Line

This is my second attempt into flashing the TWRP recovery, using just the GNU/Linux command line and the Android Platform Tools. This is the short recipe:

  • Enable the Developer options, from SettingsAbout phone, tap several times over Build number.
  • Enable Debug USB debugging in SettingsDeveloper options.
  • Enable OEM unlocking in SettingsDeveloper options.
  • Connect the USB cable
  • adb reboot bootloader
  • fastboot oem unlock
  • Reboot and let the system do the wipe out.
  • adb push UPDATE-SuperSU-v2.82-20170528234214.zip /sdcard/Download/UPDATE-SuperSU-v2.82-20170528234214.zip
  • adb reboot bootloader
  • fastboot flash recovery recovery.img
  • Power off by removeing the battery.
  • Volume UP + Power, boot into TWRP Recovery and install SuperSU.

SP Flash Tool

Scaricare l'eseguibile per GNU/Linux da https://spflashtool.com/download/. ATTENZIONE: in data 2018-07-04 la versione 5.1752 era distribuita in un file ZIP protetto da password, con password sconosciuta. Usata la versione 5.1744. Il binario precompilato dipende da libpng12, che non è presente nell'archivio ZIP, per fortuna esiste un libpng12-0 per Debian Jessie che si è installato anche su Debian Stretch.

Backup di una partizione del telefono

  1. Scollegare il cavetto USB e spengere il telefono e togliere la batteria.
  2. Scompattato l'archivio ZIP, rendere eseguibile e lanciare lo scrtip flash_tool.sh. Sono necessari i privilegi di root.
  3. Dal tab Readback cliccare Add.
  4. Fare doppio click sulla riga aggiunta e quindi specificare le informazioni che si trovano nel file scatter:
    1. Il nome del file da salvare, es. logo.bin
    2. Region dal file scatter: region
    3. Start Address dal file scatter: linear_start_addr oppure physical_start_addr?
    4. Length dal file scatter: partition_size
  5. Click sul pulsante Read Back.
  6. Collegare il telefono spento al cavetto USB, il salvataggio del file dal telefono al computer partirà automaticamente dopo pochi secondi.

Upload dell'immagine di una partizione

  1. Dal tab Download cliccare Scatter-loading File - Choose ed aprire il file MT6580_Android_scatter.txt. Abbiamo utilizzato quello trovato in un archivio con il backup completo della ROM originale del Gretel A7.

Backing up the NVRAM

This phone (as many others based on the MediaTek chipset) stores some vital and unique data (IMEI code, MAC address, Bluetooth address, etc) into the NVRAM partition. It is advisable to backup it just in case something goes wrong. If you accidentally flash the NVRAM with wrong data, you can risk to have phone unable to operate on your provider network, due a bad IMEI, etc. Every single device have unique codes, so don't share your NVRAM data with other devices.

  1. First of all you need the scatter file of the Gretel A7 phone. I used the file MT6580_Android_scatter.txt found into the Y8303.YX_.A7.Gretel.B1B8.6.0.V01.07.20170526.rar archive (it is supposed to be the official ROM, but don't trust this too much). Open it with a text editor and search the partition_name: nvram section. Take note of physical_start_addr and partition_size, you will need them later.
  2. Start the SP Flash Tool program. We used version 5.1916 for GNU/Linux: just unpack the zip archive, chmod 755 the flash_tool.sh script and execute it with root privileges (requires the libpng12-0 package).
  3. Click the Download tab, Scatter-loading file, and choose the scatter file MT6580_Android_scatter.txt.
  4. Click the Readback tab and the Add Button.
    • Double click the new line that appears in the table, input a filename (e.g. nvram.img) into a directory.
    • Choose Region: EMMC_USER, fill Start Address and Length with the values you read from the scatter file.
  5. Click the Read Back button.
  6. Power off the phone and connect it with the USB cable. The download of the NVRAM partition should start automatically, SP Flash Tools will display a pop-up informing you that the saving is complete.

Installing the XenonHD Custom ROM

FIXME WARNING! The XenonHD_Gretel_A7.zip archive we found (md5sum b0d5c42c17015d95e965e74df56fee96) has some major problems. Notabily the GPS does not work and it miss the soft keys (the latter may be can be fixed by editing /system/build.prop, see below).

We have found an unofficial XenonHD custom ROM for the Gretel A7, it is not famous as the LineageOS, but we are searching something to upgrade Android and to wipe-out completely the original trojanized operating system. So we followed the instruction on the page How To Install Android 7.1.2 Nougat On Gretel A7 and got the ROM archive from this Yandex Disk.

So the procedure is the following:

  1. Download the XenonHD_Gretel_A7.zip archive.
  2. Download the Google Apps from the Open GApps Project site (Platform ARM, Android 7.1, Variant mini). The file I obtained was named open_gapps-arm-7.1-mini-20190927.zip.
  3. Copy both files to the /sdcard/ directory of the phone.
  4. The TWRP Recovery 3.0.2 were already installed on the Gretel.

Please NOTICE that TWRP 3.2.1 has a bug, when installing the GApps it fails with the error:

ERROR 64: Wrong architecture to set-up Open GApps' pre-boundled busybox

So stay with TWRP 3.0.2 or downgrade to that version.

  1. Connect the phone to the PC and run adb reboot recovery on the PC.
  2. In TWRP choose Wipe (Wipes Data, Cache, and Dalvik)
    • Swipe to Factory Reset, then go back and Reboot to Recovery again. Do Not Install TWRP app, if requested.
  3. Again in TWRP choose Install (Install zip is the default)
    • Browse to XenonHD_Gretel_A7.zip, No Zip signature verification, No Reboot after installation is complete.
    • Swipe to confirm Flash.
    • The phone will auto-reboot
  4. The phone will boot into XenonHD, about 5 minutes required.
  5. Start TWRP recovery again executing adb reboot recovery from the PC.
  6. in TWRP choose Install
    • Browse to open_gapps-arm-7.1-mini-20190927.zip, No Zip signature verification.
    • Swipe to confirm Flash.

Installing Stock ROM 20170908 (with trojan launcher)

On the internet we found the file Y8303.YX.A7.Gretel.B1B8.6.0.V01.07.20170908.rar (md5sum decb53fef12c13c30a8759fc55f5dfa4). It seems an offical Gretel ROM, but it has some malware inside the launcher. We flashed that ROM using SP Flash Tool 5.1916 downloading all the partitions to the phone; after some hours unwanted icons popped-up on the home screen (icon labels were Tarot and Funny).

  1. Power-off the phone. Using SP Flash Tool from a PC, flash the partitions: preloader, lk, boot, recovery, logo, secro, system, cache and userdata from stock ROM archive. This will erase all user data and settings on the phone.
  2. Reboot into normal system and enable USB debugging:
    • SettingsAbout phone, tap 7 times on Build number.
    • SettingsDeveloper options, enable OEM unlocking and USB debugging.
  3. Upload SuperSU and Rootless Pixel Launcher from the PC to /sdcard/ directory, using adb push.
  4. Power-off the phone and flash TWRP recovery image with SP Flash Tool. Boot in Select Boot Mode Menu with Volume UP+Power, then choose Recovery.
  5. From TWRP Recovery, install SuperSU.
  6. Reboot into system, install Rootless Pixel Launcher from the file manager; from SettingsHome, make it the default.
  7. From the PC, run adb shell and remove the trojanized launcher using root privileges. See below.

We checked the apk file found into the /system/priv-app/Launcher3_G_Develop_yisheng_A47_201709071813/ directory against some on-line checking services (notably Dr. Web), and it was marked as infected with Android.Ibingo.1.origin.

So we downloaded and installed an alternative launcher from F-Droid: Rootless Pixel Launcher and made it the default from SettingsHome. Then - using root privileges, we uninstalled the trojanized launcher.

mount -o remount,rw /system
rm -r /system/priv-app/Launcher3_G_Develop_yisheng_A47_201709071813
mount -o remount,ro /system
rm -r /sdcard/.com.yinshengA47.launcher3/

We did not trust either the app WirelessUpdate, it was not reported as infected (it was indeed in ROM release 2017-05-19), but we don't trust updates from people which distribute infected apps! The app to be removed is:

  • Name: WirelessUpdate
  • Package: com.fota.wirelessupdate
  • Folder: /system/priv-app/SystemFota/
  • Menu Entry: Settings ⇒ About phone ⇒ WirelessUpdate

Using root privileges we executed:

mount -o remount,rw /system
rm -r /system/priv-app/SystemFota/
mount -o remount,ro /system
reboot

After the reboot we confirmed that the Settings menu entry was gone.

We removed alto the unwanted WhatsApp and Facebook apps:

pm uninstall com.facebook.katana
pm uninstall com.whatsapp
mount -o remount,rw /system
rm -r /system/vendor/operator/app/facebook/
rm -r /system/vendor/operator/app/whatsapp/
mount -o remount,ro /system

NOTICE: If you enable a Google account, you will find a new application installed into /data/app/com.google.android.gms-1/, do not remove it because it is the Google Play Services required to access the Play Store, etc.

Immersive Mode

:!: NOTICE: No need to install a dedicated app to have Immersive Mode for one App, just use the command settings put global from an adb shell, as explained below!

Questo smartphone Android ha il solo pulsante fisico Home, i pulsanti indietro e menu sono virtuali ed occupano la parte bassa dello schermo. La cosa è noiosa per i programmi che avrebbero vantaggio ad usare tutto lo schermo, come un programma di navigazione GPS.

Esistono una soluzione software che abilita la modalità full screen immersiva, ad esempio l'App GMD Full Screen Immersive Mode. Con questa app installata sarà possibile controllare la presenza della barra di stato in alto e dei pulsanti software in basso, facendoli scomparire quando non sono desiderato.

Tale App ha bisogno dell'autorizzazione per lo spostamento su altre app, questo permesso viene gestito direttamente da ImpostazioniAppSettings (icona ingranaggio) → Spostamento su altre app. Vengono evidenziate le app che richiedono tale permesso ed è possibile autorizzarle o revocere il permesso.

Force one App in Immersive Mode

To force one single app to run in full screen immersive mode just use the following command line from a PC connected to the USB debug:

adb shell settings put global policy_control immersive.full=net.osmand.plus

In this exampled we configured net.osmand.plus to run in full immersive mode hiding the Status Bar at the top of the screen and hiding the Android Navigation Bar (Soft Keys) at the bottom.

Beside the immersive.full you can use the immersive.status setting if you want to keep the top Status Bar and the immersive.navigation if you want to keep the Navigation Bar only.

The setting takes effect immediately, even if the app is running! The setting will survive the phone reboot, you can confirm from an adb shell:

settings get global policy_control
immersive.full=net.osmand.plus

To delete the settings:

settings delete global policy_control

If you want to set the immersive mode for two application you have to use a comma separated syntax: immersive.full=com.package.one,com.package.two.

Disable Soft Keys

Instead of using the Full Screen Immersive Mode as seen above, we can disable (hide) the Android soft keys altogether. Just mount -o remount,rw /system and edit the /system/build.prop file changing the value of qemu.hw.mainkeys from zero to 1. You have to reboot the phone to see the effect.

# Disable the NAV bar (soft keys)
qemu.hw.mainkeys=1

Beware that some applications or some system menu requires the back button to fully operate, you may find yourself stuck in some app.

Web References

doc/appunti/hardware/gretel_a7.1571137010.txt.gz · Last modified: 2019/10/15 12:56 by niccolo