**MUST READ** Frequently Asked Questions for Motorola Moto G5 [Updated : 2017/10/30]

matmutant

Senior Member
Mar 17, 2011
3,379
4,741
0
~/
andrux-and-me.blogspot.com
[SIZE=+3]Frequently Asked Questions[/SIZE]
[SIZE=+2] Motorola Moto G5

[/SIZE]


Read Before Asking Please

[SIZE=+1]This a short list of frequently asked questions in this device forum and the answers often given as a response. It should serve as a starting point for gathering knowledge and finding solutions to many common problems. Please only post in this thread with feedback on how to improve this document. Do not post "Thank you" type responses. If you have additional questions or require more help, try to find an existing thread or create your own. Do not use this as a general help thread.[/SIZE]

To Browse quickly the FAQ and find what you need, Ctrl+F is the key feature ;)
You may search in Motorola help topics too

Table of content :

Refer to :

THIS FAQ IS MADE FOR Moto G 5 editions
 
Last edited:
  • Like
Reactions: btwdeeh

matmutant

Senior Member
Mar 17, 2011
3,379
4,741
0
~/
andrux-and-me.blogspot.com
FAQ

this a work in progress, this FAQ will be updated based on your questions and needs.

[SIZE=+1]Q1: What device(s) does this FAQ cover?[/SIZE]
This FAQ covers the Moto G5​

[SIZE=+1]Q2: How to access bootloader / fastboot mode[/SIZE]
- Via ADB :
Code:
adb reboot bootloader
- The hard(ware) way :
  1. With the phone powered off, press the VOL DOWN KEY for 2-3 seconds then POWER key then release.
  2. The device will display different BOOT OPTIONS
  3. Use the VOL DOWN Key to SCROLL to Recovery and VOL UP Key to select
.​

[SIZE=+1]Q3: How to unlock Bootloader[/SIZE]
Boot to fastboot and follow the guide in the post below or Motorola guide on lenovo/motorla's website​

[SIZE=+1]Q4: How do i get adb and fastboot drivers ?[/SIZE]
For windows, follow this guide or this one
although, it seems Motorola Device Manager works ok for win7x86-32 (but not for win7x64-64?) i cannot answer this i'm under linux
other USB drivers if first method failed, source
For Linux, get fastboot files here also, adb and fastboot can be installed using repos for ubuntu-based distros packages needed are : android-tools-adb and android-tools-fastboot (android-tools-fsutils may be useful too)
eg:
Code:
sudo apt-get install android-tools-fastboot

[SIZE=+1]Q5: How to root my device?[/SIZE]
Follow @TheFixItMan's guide

[SIZE=+1]Q6: How to access recovery?[/SIZE]
  1. using terminal, if the device is already rooted
    Code:
    su
    reboot recovery
  2. via adb
    Code:
    adb reboot recovery
  3. via bootloader
    boot to bootloader (see Q11) and select recovery (use Use the VOL DOWN Key to SCROLL to Recovery and VOL UP Key to select)
  4. via external app

[SIZE=+1]Q7: How to force reboot my frozen device?[/SIZE]
  • Press and hold the Power button for 10 - 20 seconds, the device will restart and go through the boot-up sequence [source]
  • (VOL DOWN hold + a quick tap on POWER should force reboot when in bootloader) [source]

[SIZE=+1]Q8: How to charge my device and extend battery life?[/SIZE]
[SIZE=+1]Q9: What to do if my battery is fully discharged and not re-charging?[/SIZE]
Motorola said:
If your battery is completely discharged, it may take several minutes for the device to begin charging. The battery needs to charge to a minimum voltage before the system can boot up, and this may take a few moments to achieve.
lenovo's tip

[SIZE=+1]Q10: Does rooting/unlocking your phone invalidate its warranty? (In EU)[/SIZE]
In short: No. Just the fact that you modified or changed the software of your device, is not a sufficient reason to void your statutory warranty. As long as you have bought the device as a consumer in the European Union.
[source]​

[SIZE=+1]Q11: Which Firmware should I flash?[/SIZE]
After a quick search, here is what shows up: you may or may not flash any MotoG5 variant (Stock, Amazon, XT1677) firmware as long as you choose the right one. here is a comparison of firmware I could get for 25.135.33.
If you have information that proves the above wrong, please provide ASAP.​

[SIZE=+1]Q12: I broke my (stock) ROM, what should I do?[/SIZE]
  1. Restore your NAND (TWRP) backup as is
  2. Restore a specific part of your NAND backup in case the full restore is also broken
  3. Flash system dump available for you specific device (if any)
  4. Install custom ROM

[SIZE=+1]Q35: How do I get my old sms back to my new device?[/SIZE]
Here is a method using no third part app (but needs root and adb; at the bottom of that post is linked another interesting method)​

[SIZE=+1]Q35: [?][/SIZE]
[...]​

[SIZE=+1]Q35: [?][/SIZE]
[...]​

[SIZE=+1]Q35: [?][/SIZE]
[...]​
*​


This FAQ is part of a Recognized Contributor Group Initiative. Please look for a similar FAQ thread when visiting another device forum.
A special thanks to everyone who contributed to the production of this FAQ
 
Last edited:
  • Like
Reactions: btwdeeh

matmutant

Senior Member
Mar 17, 2011
3,379
4,741
0
~/
andrux-and-me.blogspot.com
some usefull lines of commands for any user wanting to know what's going on:

requirements :
  • On Windows : install Moto G drivers and
  • On Linux : set your rules following that guide (3. Set up your system to detect your device.) : add to /etc/udev/rules.d/51-android.rules the following code
    Code:
    #motog normal mode
    SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}==”2e82″, MODE="0666"
    #motog debug mode
    SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}==”2e76″, MODE="0666"
    #motog sideload mode
    SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", MODE="0666"
    #motog fastboot mode
    SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}==”2e80″, MODE="0666"
    For specific access by one group of users, add GROUP="[groupname]"

______________________________
______________________________
______________________________

Let's start ! :
  • in terminal, just type the lines,
  • in ADB, add "adb" before the commands
  • if you want not to display the output in terminal, specify the path :
    Code:
    command > /where_you_want_your_output_to_be_stored/name_you_want_for_the_log


to know if KSM is really turned on : KSM means Kernel Samepage Merging, may not exist on Moto G stock or custom roms
Code:
cat /sys/kernel/mm/ksm/run
to know what modules are running :
Code:
lsmod
install an app from terminal :
Code:
pm install /sdcard/app1.apk
from adb :
Code:
adb install /home/user/app1.apk
(if your .apk is located there :p)

your kernel crashed?
Code:
cat /proc/last_kmsg
ex : from adb, and stored in /home/user/last_kmsg1
Code:
adb cat /proc/last_kmsg > /home/user/last_kmsg1
an app crashed, you want to know why?
Code:
logcat
ex : from adb and stored in /home/user/myfirstlogever
Code:
adb logcat > /home/user/myfirstlogever
don't have an USB cable ?or adb "other the air" :
connect to your home wifi network (both device and pc)
in settings/dev options/ enable adb on TCP/IP
Code:
adb connect xxx.xxx.xxx.xxx:5555
(the IP is the one displayed in the option you choose previously :)
and then, since it is connected, catch the log :
Code:
adb logcat > /home/user/myfirstlogever
All commands and syntax used for ADB can be found here
__________________


More is coming ;)
enjoy !
 
Last edited:

matmutant

Senior Member
Mar 17, 2011
3,379
4,741
0
~/
andrux-and-me.blogspot.com
Unlocking BL

Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* I am not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed.
* YOU are choosing to make these modifications, and if
* you point the finger at me for messing up your device, I will laugh at you.
*/
>>> Unlocking Bootloader will overwrite any data stored on your device, backup your files before proceeding <<<


0- Enabling your device to be unlocked: Enable the Developer option
  • Go to: Settings>About Phone> Build Number
    tap multiple times on that line until you get 'You are now a Developer"
  • Go to Developer option in Settings, find and enable 'OEM Unlock' by sliding the button. A warning will appear. Read It.

1- Register to Motorola website

2- get your Device ID
  • Put your device in fastboot mode (power off, then press the power and volume down buttons simultaneously).
  • On your desktop, open a command prompt or terminal, and go to the directory where you installed the Android SDK tools (or make sure fastboot is in your $PATH)
  • At the prompt, type
Code:
$ fastboot oem get_unlock_data
  • The returned string will be used to retrieve your unlock key.
Example: On a Windows Desktop, the returned string format would be
Code:
$ fastboot oem get_unlock_data
 (bootloader) 0A40040192024205#4C4D3556313230
 (bootloader) 30373731363031303332323239#BD00
 (bootloader) 8A672BA4746C2CE02328A2AC0C39F95
 (bootloader) 1A3E5#1F53280002000000000000000
 (bootloader) 0000000
On a Mac OS Desktop, the returned string format would be
Code:
INFO0A40040192024205#4C4D3556313230
 INFO30373731363031303332323239#BD00
 INFO8A672BA4746C2CE02328A2AC0C39F95
 INFO1A3E5#1F53280002000000000000000
 INFO0000000

Paste together the 5 lines of output into one continuous string without (bootloader) or ‘INFO’ or white spaces. Your string needs to look like this:
Code:
0A40040192024205#4C4D355631323030373731363031303332323239#BD008A672BA4746C2CE02328A2AC0C39F951A3E5#1F532800020000000000000000000000
3- Unlock
  • Check if your device can be unlocked by pasting this string in the pecific field on the Motorola website, and clicking “Can my device be unlocked?”
  • NOTE: If your device is unlockable, a "REQUEST UNLOCK KEY" button will now appear at the bottom of that page.
  • after you got the code type the following :
    Code:
    fastboot oem unlock <code>
  • Device will request for confirmation, type the above again.
    and wait your device to reboot !


4- Enjoy ;)

not tested on this device -yet- :
5- to relock, (pointless, isn't it?)
First you'll need a stock firmware for your specific device [make sure the device number is the right one at least...]
Then follow these steps:
  1. Open the zip
  2. Find 'flashfile.xml'
  3. Make sure to check integrity of EACH img/bin files in the stock firmware zip before proceeding (to do that, look at the flashfile.xml)
    e.g.:
    Code:
        <step MD5="daae9a555a3789558ee44f9e1fddc8c5" filename="gpt.bin" operation="flash" partition="partition"/>
    check that gpt.bin MD5 is really daae9a555a3789558ee44f9e1fddc8c5 and has not been corrupted during download/unpacking
  4. Prepare your device (boot to fastboot) and start relocking:
    Code:
    fastboot oem lock begin
  5. Flash in the order:
    Code:
    mfastboot flash partition gpt.bin
    mfastboot flash motoboot motoboot.img
    mfastboot flash logo logo.bin
    mfastboot flash boot boot.img
    mfastboot flash recovery recovery.img
    mfastboot.exe flash system system.img_sparsechunk.0 // note that you may have more or less sparsechunks, FLASH THEM ALL
    mfastboot.exe flash system system.img_sparsechunk.1 // alternatively the files could be named system.img_sparsechunk[1-3] instead
    mfastboot.exe flash system system.img_sparsechunk.2
    mfastboot.exe flash system system.img_sparsechunk.3
    mfastboot flash modem NON-HLOS.bin
    mfastboot erase modemst1 
    mfastboot erase modemst2 
    mfastboot flash fsg fsg.mbn
    mfastboot erase cache
    mfastboot erase userdata
  6. Finish relocking:
    Code:
    mfastboot oem lock
  7. Done!
 
Last edited:
  • Like
Reactions: btwdeeh

Marie74

Member
Oct 22, 2017
9
2
0
Picture failed impossible

Hello
After installation 137 33 My moto g5 failed for take picture failed impossible for take picture i have nos xt1676 rom Cédric 137 75-4 Always no take picture ! Thanks.
 
  • Like
Reactions: btwdeeh