[ADB|NoRoot] HIDE Nav/Status bars WITHOUT screen awaken Bug & [MENU] button - Sony Cross-Device General

Whether you enjoy LMT pie or dislike squary navbar, you may have already tried (with infamous screen awaken BUG) [ adb shell settings put global policy_control immersive.full=*] because of need for interactive com.sonymobile.lockscreen.otp to be excluded :
· Hide Status Bar only type:
Code:
adb shell settings put global policy_control immersive.status=apps,[B]-"com.sonymobile.lockscreen.otp"[/B]
· Hide Navigation Bar only type:
Code:
adb shell settings put global policy_control immersive.navigation=apps,[B]-"com.sonymobile.lockscreen.otp"[/B]
· Hide Both Bars type:
Code:
adb shell settings put global policy_control immersive.full=apps,[B]-"com.sonymobile.lockscreen.otp"[/B]
· Back to normal/default state:
Code:
[B][U]adb shell settings put global policy_control null*[/U][/B]
For info, light swiping down upper-screen, or up end-screen, will display Nav/Status for few seconds.
BE AWARE that a very few apps, like topmodel 3CToolBox(ccc71.at.free) or specifics /Settings/Display/NightLight/Schedule (com.android.settings), can also be StatusBar "dependent", so as example, add them :
Code:
adb shell settings put global policy_control immersive.full=apps,[B]-"com.sonymobile.lockscreen.otp"[/B],-"ccc71.at.free",-"com.android.settings"
You can also reduce NavBar height with :
Code:
adb shell wm overscan 0,0,0,[B]-15[/B]
· Back to normal/default state:
Code:
adb shell wm overscan 0,0,0,0
primorigin: @Rashad83​
Excluding the Home app can also be useful, and [MENU] button can be added to the right corner; copy attached console.png to /sdcard (source: twrp).
- Add [menu] icon to right nav bar (use 120 keycode for Screenshot): first "space,..." can also be used for left corner with any other keycode.
Code:
settings put secure sysui_nav_bar "space,back;home;recent,key([B]82[/B]:file:///storage/emulated/0/console.png)"
· Back to normal/default state:
Code:
settings put secure sysui_nav_bar "space,back;home;recent,space"
primorigin: https://www.xda-developers.com/nav-...ck-nougat-all-along-and-it-never-needed-root/​
Nota : please, if you have an other Xperia device than XZ1x, do report if working ok (& label_Id of culprit screenlock apk, if different), thanks.
btw: conversely to many, official (Xperia missing) Sony audio Recorder has real Stereo ability.

Related

Windows batch script for wireless ADB with shell, logcat, and bugreport

I made a batch shell script for using wireless ADB in windows. It is simpler to use than opening CMD.exe, then CDing to the platform-tools directory and changing the ADB port, so I figured I'd post it. Just paste it into notepad, change the IP address to the correct one for your phone, and save as a .BAT file.
Code:
@ECHO OFF
cd "C:\Program Files (x86)\Android\android-sdk\platform-tools"
adb.exe connect [xxx.xxx.xxx.xxx:xxxx]
CLS
CHOICE /N /C:1234 /M "Press 1 for a realtime Android log, Press 2 for a shell prompt, press 3 for a bug report, or Press 4 for a command prompt."
IF ERRORLEVEL ==4 GOTO FOUR
IF ERRORLEVEL ==3 GOTO THREE
IF ERRORLEVEL ==2 GOTO TWO
IF ERRORLEVEL ==1 GOTO ONE
GOTO END
:FOUR
ECHO At the command prompt, type ADB for a list of possible commands.
GOTO END
:THREE
ECHO Enjoy your android bugs:
adb bugreport
GOTO END
:TWO
ECHO Welcome to the Android shell. Type "exit" and hit Enter to exit to command prompt.
adb shell
GOTO END
:ONE
adb logcat
GOTO END
:END
ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cmd
Also, please let me know if you have any suggestions for my script.
Have you used UKE? It has wireless ADB built in to the phone. Never used wireless ADB personally, I'm a wired guy.
Don't you mean it's a Cyanogenmod feature and not a U.K.E feature?

Ad Blocking on ZTE Open

Until there are ad blocking apps for FFOS it needs a DIY method.
I'll assume you know how to use adb and have it set up on your machine. I'll also assume you have rooted your phone following the instructions here.
I use Linux so my commands may be a bit off in places.
1. Collect a suitable hosts file. I used the one on my Android phone but this one seems to update regularly http://winhelp2002.mvps.org/hosts.txt
2. Save the file as 'hosts' to a known location on your PC.
3. Open a shell window (command window) on your PC and check adb works.
Code:
adb devices
should return roamer2. If not, on your phone, go to settings > More Information > Developer - and check Remote Debugging.
4. In the shell window - change directory to where you have saved the hosts file. then type:-
Code:
adb push hosts /sdcard/
5. When that completes type:-
Code:
adb shell
you'll see $ prompt
Code:
su
If you are rooted correctly you'll see # prompt
Code:
mount -o remount,rw /system
Mounts the system folder for read / write permissions.
Code:
cat /system/etc/hosts
Should show just '127.0.0.1 localhost'
Save this if you want as hosts.old
Code:
busybox mv /system/etc/hosts /system/etc/hosts.old
Now replace the hosts file with the new one:-
Code:
busybox mv /sdcard/hosts /system/etc/hosts
To check your hosts file has been replaced type
Code:
cat /system/etc/hosts
And lots of domain names will whiz past.
All done.

Problem with Tasker (execute shell script)

Hi,
I try to run a shell script from tasker.
But it won't get executed.
this is an example:
06.46.49/E Run Shell: ->
06.46.49/E Run Shell: ->
06.46.49/Shell runBackground /data/test/test.sh root: true timeout: -1
06.46.49/Shell start process-thread ID 136
06.46.49/E add wait type Shell2 time 2147483647
06.46.49/E add wait type Shell2 done
does anyone has a solution?
ok got it, I had to put "su -c sh" in front of my script

Unlock Bootloader in Lenovo Moto G5

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Downloads
Steps To Unlock Bootloader
First, enable the Developer option in your setting Go to Settings>About Phone> tap in Built Number multiple times un till the toast You are a developer now appears.
Now Go to Developer option it will appear in Settings and find and enable OEM Unlock by sliding the button. A warning will appear just Confirm that.
Turn Off Your smartphone.
Press Volume Button and Power button simultaneously and hold it for few seconds. This will boot your device into fast boot mode.
Now Open the ADB Tool Folder and Go to SDK> Platform Tools and right click pressing the Shift Key on your Keyboard and select Open Command here.
Connect your device via USB cable ( good quality cable suggested for uninterrupted use).
Type the command adb device you will see a serial number in the comment prompt screen if not then you missed some step.
Now go to website Click here. Read the information given if you wish and click on Next button to proceed next step.
You the Page will ask you to sign incomplete the process by signing with you Motorolla account or Google Account.
Now go the Command Prompt and type fastboot oem get_unlock_data.
Now a new serial code will appear in your command prompt screen you have to copy the entire code.
Now open this link and paste the code in the tool. then select the entire code and paste that code in point 6 on Moto require Unlock Tool Website.
Now Click on the I Agree Button a Get Unlock Code will appear on the screen.
Click on the Button.
An Unlock Code will appear.
Now again go to the Command Prompt screen and type fast oem unlock ************. “*****” will replace your unique key.
A warning screen will appear in command just retype the same command and hit enter.
Done!!!
but... WHY?
Done. Thanks for the instructions
Is it possible to relock the bootloader after unlocking for model XT1675
what should I do if the message with the unlock code never reached to my mail?
lazasanchez1 said:
what should I do if the message with the unlock code never reached to my mail?
Click to expand...
Click to collapse
Check junk mail
Resend code
Start again
Use different email from another provider
Thank's alot for the response, the mail came 1 hour later
When I type adb device I the following,
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Minimal ADB and Fastboot>adb device
Android Debug Bridge version 1.0.36
Revision 0e9850346394-android
-a - directs adb to listen on all interfaces for a c
onnection
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <specific device> - directs command to the device or emulator with
the given
serial number or qualifier. Overrides ANDROID_S
ERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
-H - Name of adb server host (default: localhost)
-P - Port of adb server (default: 5037)
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devic
es.
device commands:
adb push <local>... <remote>
- copy files/dirs to device
adb pull [-a] <remote>... <local>
- copy files/dirs from device
(-a preserves file timestamp and mode)
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
adb shell [-e escape] [-n] [-Tt] [-x] [command]
- run remote shell command (interactive shell if
no command given)
(-e: choose escape character, or "none"; defaul
t '~')
(-n: don't read from stdin)
(-T: disable PTY allocation)
(-t: force PTY allocation)
(-x: disable remote exit codes and stdout/stder
r separation)
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward --list - list all forward socket connections.
the format is a list of lines with the followin
g format:
<serial> " " <local> " " <remote> "\n"
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb forward --no-rebind <local> <remote>
- same as 'adb forward <local> <remote>' but fail
s
if <local> is already forwarded
adb forward --remove <local> - remove a specific forward socket connection
adb forward --remove-all - remove all forward socket connections
adb reverse --list - list all reverse socket connections from device
adb reverse <remote> <local> - reverse socket connections
reverse specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
adb reverse --no-rebind <remote> <local>
- same as 'adb reverse <remote> <local>' but fail
s
if <remote> is already reversed.
adb reverse --remove <remote>
- remove a specific reversed socket connection
adb reverse --remove-all - remove all reversed socket connections from dev
ice
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-lrtsdg] <file>
- push this package file to the device and instal
l it
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade (debuggable p
ackages only))
(-g: grant all runtime permissions)
adb install-multiple [-lrtsdpg] <file...>
- push this package file to the device and instal
l it
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade (debuggable p
ackages only))
(-p: partial application install)
(-g: grant all runtime permissions)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport [<path>] - return all information from the device that sho
uld be included in a zipped bug report.
If <path> is a file, the bug report will be sav
ed as that file.
If <path> is a directory, the bug report will b
e saved in that directory with the name provided by the device.
If <path> is omitted, the bug report will be sa
ved in the current directory with the name provided by the device.
NOTE: if the device does not support zipped bug
reports, the bug report will be output on stdout.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all]
[-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is wr
itten
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks
themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any insta
lled apk expansion
(aka .obb) files associated with each applic
ation; the default
is noobb.)
(-shared|-noshared enable/disable backup of the
device's
shared storage / SD card contents; the defau
lt is noshared.)
(-all means to back up all installed applicatio
ns)
(-system|-nosystem toggles whether -all automat
ically includes
system applications; the default is to inclu
de system apps)
(<packages...> is the list of applications to b
e backed up. If
the -all or -shared flags are passed, then t
he package
list is optional. Applications explicitly g
iven on the
command line will be included even if -nosys
tem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup
archive
adb disable-verity - disable dm-verity checking on USERDEBUG builds
adb enable-verity - re-enable dm-verity checking on USERDEBUG build
s
adb keygen <file> - generate adb public/private key. The private ke
y is stored in <file>,
and the public key is stored in <file>.pub. Any
existing files
are overwritten.
adb help - show this help message
adb version - show version num
scripting:
adb wait-for[-<transport>]-<state>
- wait for device to be in the given state:
device, recovery, sideload, or bootloader
Transport is: usb, local or any [default=any]
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb remount - remounts the /system, /vendor (if present) and
/oem (if present) partitions on the device read-write
adb reboot [bootloader|recovery]
- reboots the device, optionally into the bootloa
der or recovery program.
adb reboot sideload - reboots the device into the sideload mode in re
covery program (adb root required).
adb reboot sideload-auto-reboot
- reboots into the sideload mode, then reboots au
tomatically after the sideload regardless of the result.
adb sideload <file> - sideloads the given package
adb root - restarts the adbd daemon with root permissions
adb unroot - restarts the adbd daemon without root permissio
ns
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, /system, /vendor (if present), /oem (if pre
sent) and /data partitions will be updated.
- If it is "system", "vendor", "oem" or "data", only the corresponding partiti
on
is updated.
internal debugging:
adb reconnect Kick current connection from host side and make
it reconnect.
adb reconnect device Kick current connection from device side and ma
ke it reconnect.
environment variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.
C:\Program Files (x86)\Minimal ADB and Fastboot>
and if i type the get unlock data command i get waiting for any device, does anyone know what the problem could be as i have the drivers installed from the Motorola site
sorry about the big post
EDIT, PROBLEM FOUND MY DRIVERS ARE NOT INSTALLED PROPERLY
plewis1981 said:
When I type adb device I the following,
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Program Files (x86)\Minimal ADB and Fastboot>adb device
Android Debug Bridge version 1.0.36
Revision 0e9850346394-android
-a - directs adb to listen on all interfaces for a c
onnection
-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <specific device> - directs command to the device or emulator with
the given
serial number or qualifier. Overrides ANDROID_S
ERIAL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.
If -p is not specified, the ANDROID_PRODUCT_OUT
environment variable is used, which must
be an absolute path.
-H - Name of adb server host (default: localhost)
-P - Port of adb server (default: 5037)
devices [-l] - list all connected devices
('-l' will also list device qualifiers)
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this command with no additional arguments
will disconnect from all connected TCP/IP devic
es.
device commands:
adb push <local>... <remote>
- copy files/dirs to device
adb pull [-a] <remote>... <local>
- copy files/dirs from device
(-a preserves file timestamp and mode)
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
adb shell [-e escape] [-n] [-Tt] [-x] [command]
- run remote shell command (interactive shell if
no command given)
(-e: choose escape character, or "none"; defaul
t '~')
(-n: don't read from stdin)
(-T: disable PTY allocation)
(-t: force PTY allocation)
(-x: disable remote exit codes and stdout/stder
r separation)
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward --list - list all forward socket connections.
the format is a list of lines with the followin
g format:
<serial> " " <local> " " <remote> "\n"
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb forward --no-rebind <local> <remote>
- same as 'adb forward <local> <remote>' but fail
s
if <local> is already forwarded
adb forward --remove <local> - remove a specific forward socket connection
adb forward --remove-all - remove all forward socket connections
adb reverse --list - list all reverse socket connections from device
adb reverse <remote> <local> - reverse socket connections
reverse specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
adb reverse --no-rebind <remote> <local>
- same as 'adb reverse <remote> <local>' but fail
s
if <remote> is already reversed.
adb reverse --remove <remote>
- remove a specific reversed socket connection
adb reverse --remove-all - remove all reversed socket connections from dev
ice
adb jdwp - list PIDs of processes hosting a JDWP transport
adb install [-lrtsdg] <file>
- push this package file to the device and instal
l it
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade (debuggable p
ackages only))
(-g: grant all runtime permissions)
adb install-multiple [-lrtsdpg] <file...>
- push this package file to the device and instal
l it
(-l: forward lock application)
(-r: replace existing application)
(-t: allow test packages)
(-s: install application on sdcard)
(-d: allow version code downgrade (debuggable p
ackages only))
(-p: partial application install)
(-g: grant all runtime permissions)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport [<path>] - return all information from the device that sho
uld be included in a zipped bug report.
If <path> is a file, the bug report will be sav
ed as that file.
If <path> is a directory, the bug report will b
e saved in that directory with the name provided by the device.
If <path> is omitted, the bug report will be sa
ved in the current directory with the name provided by the device.
NOTE: if the device does not support zipped bug
reports, the bug report will be output on stdout.
adb backup [-f <file>] [-apk|-noapk] [-obb|-noobb] [-shared|-noshared] [-all]
[-system|-nosystem] [<packages...>]
- write an archive of the device's data to <file>
.
If no -f option is supplied then the data is wr
itten
to "backup.ab" in the current directory.
(-apk|-noapk enable/disable backup of the .apks
themselves
in the archive; the default is noapk.)
(-obb|-noobb enable/disable backup of any insta
lled apk expansion
(aka .obb) files associated with each applic
ation; the default
is noobb.)
(-shared|-noshared enable/disable backup of the
device's
shared storage / SD card contents; the defau
lt is noshared.)
(-all means to back up all installed applicatio
ns)
(-system|-nosystem toggles whether -all automat
ically includes
system applications; the default is to inclu
de system apps)
(<packages...> is the list of applications to b
e backed up. If
the -all or -shared flags are passed, then t
he package
list is optional. Applications explicitly g
iven on the
command line will be included even if -nosys
tem would
ordinarily cause them to be omitted.)
adb restore <file> - restore device contents from the <file> backup
archive
adb disable-verity - disable dm-verity checking on USERDEBUG builds
adb enable-verity - re-enable dm-verity checking on USERDEBUG build
s
adb keygen <file> - generate adb public/private key. The private ke
y is stored in <file>,
and the public key is stored in <file>.pub. Any
existing files
are overwritten.
adb help - show this help message
adb version - show version num
scripting:
adb wait-for[-<transport>]-<state>
- wait for device to be in the given state:
device, recovery, sideload, or bootloader
Transport is: usb, local or any [default=any]
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb get-devpath - prints: <device-path>
adb remount - remounts the /system, /vendor (if present) and
/oem (if present) partitions on the device read-write
adb reboot [bootloader|recovery]
- reboots the device, optionally into the bootloa
der or recovery program.
adb reboot sideload - reboots the device into the sideload mode in re
covery program (adb root required).
adb reboot sideload-auto-reboot
- reboots into the sideload mode, then reboots au
tomatically after the sideload regardless of the result.
adb sideload <file> - sideloads the given package
adb root - restarts the adbd daemon with root permissions
adb unroot - restarts the adbd daemon without root permissio
ns
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns
adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:
- If <directory> is not specified, /system, /vendor (if present), /oem (if pre
sent) and /data partitions will be updated.
- If it is "system", "vendor", "oem" or "data", only the corresponding partiti
on
is updated.
internal debugging:
adb reconnect Kick current connection from host side and make
it reconnect.
adb reconnect device Kick current connection from device side and ma
ke it reconnect.
environment variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.
C:\Program Files (x86)\Minimal ADB and Fastboot>
and if i type the get unlock data command i get waiting for any device, does anyone know what the problem could be as i have the drivers installed from the Motorola site
sorry about the big post
EDIT, PROBLEM FOUND MY DRIVERS ARE NOT INSTALLED PROPERLY
Click to expand...
Click to collapse
You got that because you typed the command wrong
You typed adb device
It should be adb devices
You missed the s
TheFixItMan said:
You got that because you typed the command wrong
You typed adb device
It should be adb devices
You missed the s
Click to expand...
Click to collapse
Thanks, I also had yellow icon on fastboot cedric in my device manager, had to unplug my phone a few times to get them gone, got my unlock data now just waiting for my code
with windows 10 x64 adb devices always gives me a bunch of red error lines of wrong commands,
last motorola was an razr i and from that time i remember motorola and windows 10 never have been good friends, still that or what to do?(
punkrockfan said:
with windows 10 x64 adb devices always gives me a bunch of red error lines of wrong commands,
last motorola was an razr i and from that time i remember motorola and windows 10 never have been good friends, still that or what to do?(
Click to expand...
Click to collapse
Works perfectly fine for me
Here is my adb/fastboot folder
https://forum.xda-developers.com/attachment.php?attachmentid=4238479&d=1502448621
I suggest adding the folder to the windows environmental variables then you can run the adb command from any window you launch CMD/terminal from & you won't have to navigate to the adb folder
Note if you using the power shell in Windows 10 with fastboot you may have to type ./fastboot
yep powershell was the issue, running cmd works fine, thx
punkrockfan said:
yep powershell was the issue, running cmd works fine, thx
Click to expand...
Click to collapse
If you want to use powershell add the folder to the environmental values in Windows (control panel system environmental values)
And start the commands with a ./ if it says unknown batch operation
Got my G5 today and tried to unlock its bootloader. Motorola USB drivers installed, adbdriver and latest windows ADB Tools extracted.
Following this guide (maybe a mod could correct the wrong "adb devices" command in the first post) running adb devices in my adb folder via CMD I get
Code:
List of devices attached
* daemon not running. starting it now at tcp:5037 *
*daemon started successfully *
followed by two two emty lines as output. Repeating the command adb devices the same, just two emty lines.
Serial Number can also be found when entering fastboot screen on the phone itself anyway, no? That's where I see it between
Code:
Product/Variant: cedric XT1676 16GB P5
Serial Number: AA12345678XX
CPU: MSM8937
According Motorola serial number and that step is not even needed.
Running the fastboot oem get_unlock_data command "the returned string will be used to retrieve your unlock key". This is how this string is supposed to look like:
Code:
$ fastboot oem get_unlock_data
(bootloader) 0A40040192024205#4C4D3556313230
(bootloader) 30373731363031303332323239#BD00
(bootloader) 8A672BA4746C2CE02328A2AC0C39F95
(bootloader) 1A3E5#1F53280002000000000000000
(bootloader) 0000000
instead I get like this (using dummy code from above):
Code:
(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
...
(bootloader) 0A40040192024205# (16 characters as above, fine)
(bootloader) 30373731363031303332323239111111111111# (40 characters instead of [B]27 up to and incl # +4 more = 31[/B])
(bootloader) 8A672BA4746C2CE02328A2AC0C39F9511111111# (same here, 40 characters is my output instead of [B]31[/B])
(bootloader) 1A3E51F532800020000000000000000 (32 characters instead of [B]31[/B])
OKAY [ 0,107s]
finished. total time: 0,108s
Put it into the Unlock Data Scrub, just in case, but get a "your device does not qualify for bootloader unlocking".
No SIM Card(s) have been inserted yet nor did any connection to the internet took place.
Anyone got an idea what's wrong?
No_Signal said:
Got my G5 today and tried to unlock its bootloader. Motorola USB drivers installed, adbdriver and latest windows ADB Tools extracted.
Following this guide (maybe a mod could correct the wrong "adb devices" command in the first post) running adb devices in my adb folder via CMD I get
Code:
List of devices attached
* daemon not running. starting it now at tcp:5037 *
*daemon started successfully *
followed by two two emty lines as output. Repeating the command adb devices the same, just two emty lines.
Serial Number can also be found when entering fastboot screen on the phone itself anyway, no? That's where I see it between
Code:
Product/Variant: cedric XT1676 16GB P5
Serial Number: AA12345678XX
CPU: MSM8937
According Motorola serial number and that step is not even needed.
Running the fastboot oem get_unlock_data command "the returned string will be used to retrieve your unlock key". This is how this string is supposed to look like:
Code:
$ fastboot oem get_unlock_data
(bootloader) 0A40040192024205#4C4D3556313230
(bootloader) 30373731363031303332323239#BD00
(bootloader) 8A672BA4746C2CE02328A2AC0C39F95
(bootloader) 1A3E5#1F53280002000000000000000
(bootloader) 0000000
instead I get like this (using dummy code from above):
Code:
(bootloader) slot-count: not found
(bootloader) slot-suffixes: not found
(bootloader) slot-suffixes: not found
...
(bootloader) 0A40040192024205# (16 characters as above, fine)
(bootloader) 30373731363031303332323239111111111111# (40 characters instead of [B]27 up to and incl # +4 more = 31[/B])
(bootloader) 8A672BA4746C2CE02328A2AC0C39F9511111111# (same here, 40 characters is my output instead of [B]31[/B])
(bootloader) 1A3E5#1F5328000200000000000000# (32 characters instead of [B]31[/B])
OKAY [ 0,107s]
finished. total time: 0,108s
Put it into the Unlock Data Scrub, just in case, but get a "your device does not qualify for bootloader unlocking".
Anyone got an idea what's wrong?
Click to expand...
Click to collapse
All the outputs look correct to me
Either
1 - you haven't entered the code correctly - copy it into a text editor first & tidy up any spaces before copying it to website
2 - you are using a amazon variant which cannot be unlocked
There is a typo it should be adb devices
Follow the instructions on the Motorola boot loader unlock site especially the part how to copy & past codes from terminal window as some codes you need to remove the line brakes so
123
456
789
Becomes 123456789 and of course you need to remove the (bootloader) parts too so it's just the code on a single line
TheFixItMan said:
All the outputs look correct to me
Either
1 - you haven't entered the code correctly - copy it into a text editor first & tidy up any spaces before copying it to website
2 - you are using a amazon variant which cannot be unlocked
There is a typo it should be adb devices
Follow the instructions on the Motorola boot loader unlock site especially the part how to copy & past codes from terminal window as some codes you need to remove the line brakes so
123
456
789
Becomes 123456789 and of course you need to remove the (bootloader) parts too so it's just the code on a single line
Click to expand...
Click to collapse
Had to correct the last line I wrote in my post at first, those 32 characters don't have any # in it.
I'm wondering why I have more characters than the number in Motorola's example - this can't be wrong? Also four lines instead of five.
I made sure controlling it several times that the code is correct, manually and by using also Data Scrub, just in case.
The phone itself is a retail one, also says so under Android -> Phone status -> Software Channel -> reteu.
Wouldn't want to start the phone/use it with all that google crap on it. AFWall+ with Googles IP Range is just a workaround.
A Replicant ROM will be great for the future.
No_Signal said:
Had to correct the last line I wrote in my post at first, those 32 characters don't have any # in it.
I'm wondering why I have more characters than the number in Motorola's example - this can't be wrong? Also four lines instead of five.
I made sure controlling it several times that the code is correct, manually and by using also Data Scrub, just in case.
The phone itself is a retail one, also says so under Android -> Phone status -> Software Channel -> reteu.
Wouldn't want to start the phone/use it with all that google crap on it. AFWall+ with Googles IP Range is just a workaround.
A Replicant ROM will be great for the future.
Click to expand...
Click to collapse
I also assume you have installed the Motorola drivers & have enabled usb debugging and are using the adb & fastboot from the Android sdk which you have installed from
https://developer.android.com/studio/index.html
I can't offer anymore advice
TheFixItMan said:
I also assume you have installed the Motorola drivers & have enabled usb debugging and are using the adb & fastboot from the Android sdk which you have installed from
https://developer.android.com/studio/index.html
I can't offer anymore advice
Click to expand...
Click to collapse
Yes, those are the ones I used.
Got it work now! I did a clean ADB install in a VM and got it working there! :good:
@Suman117
Thank you for your guide. But would you mind correcting your first post, so other users don't run into the same disturbances I did?
I suggest to change the order of the steps, just after Step 2: before turning the smartphone off, go ahead with Step 5, 6 and 7. Step 7 should read "adb devices", not "adb device", as some other readers have mentioned already. First, this is useful to grant adb authoration (at the phones display). Second, when the phone is in fastboot mode, the command is "fastboot devices", not "adb devices".
So basically: New Step 2a: Type "adb devices" and grant permission.
Correction for step 7: "fastboot devices"
Suman117 said:
First, enable the Developer option in your setting Go to Settings>About Phone> tap in Built Number multiple times un till the toast You are a developer now appears.
Now Go to Developer option it will appear in Settings and find and enable OEM Unlock by sliding the button. A warning will appear just Confirm that.
Turn Off Your smartphone.
Press Volume Button and Power button simultaneously and hold it for few seconds. This will boot your device into fast boot mode.
Now Open the ADB Tool Folder and Go to SDK> Platform Tools and right click pressing the Shift Key on your Keyboard and select Open Command here.
Connect your device via USB cable ( good quality cable suggested for uninterrupted use).
Type the command adb device you will see a serial number in the comment prompt screen if not then you missed some step.
Now go to website Click here. Read the information given if you wish and click on Next button to proceed next step.
You the Page will ask you to sign incomplete the process by signing with you Motorolla account or Google Account.
Now go the Command Prompt and type fastboot oem get_unlock_data.
Now a new serial code will appear in your command prompt screen you have to copy the entire code.
Now open this link and paste the code in the tool. then select the entire code and paste that code in point 6 on Moto require Unlock Tool Website.
Now Click on the I Agree Button a Get Unlock Code will appear on the screen.
Click on the Button.
An Unlock Code will appear.
Now again go to the Command Prompt screen and type fast oem unlock ************. “*****” will replace your unique key.
A warning screen will appear in command just retype the same command and hit enter.
Done!!!
Click to expand...
Click to collapse
Thank you!

[SOLVED][NST/G] USB debugging puzzle

Yes, another puzzle
How ADB works is supposed to be baked into init.rc in uRamdisk. I can see something like this in the scripts for NookManager, although there is no indication that ADB is set up for TCP, just that an unsecure connection via ADB is enabled:
Code:
sed -i \
-e's/^ro.secure=1/ro.secure=0/' \
-e's/^persist.service.adb.enable=0/persist.service.adb.enable=1/' \
/tmp/ramdisk/default.prop
# Verify that the patched lines exist in default.prop
grep -q '^ro.secure=0' /tmp/ramdisk/default.prop && \
grep -q '^persist.service.adb.enable=1' /tmp/ramdisk/default.prop && \
PROP_PATCHED=1
[ -f /tmp/ramdisk/init.rc.orig ] || cp /tmp/ramdisk/default.prop /tmp/ramdisk/init.rc.orig
# Comment out the " disabled" line after "service adb"
# Comment out the "on property:persist.service.adb*" blocks entirely
sed -i \
-e '/^service adbd/{ N s/\(service adbd.*\n\) /\1#MOD# / }' \
-e '/^on property:persist.service.adb.enable/{ N s/^\(.*\)\n \(.*\)/#MOD#\1\n#MOD# \2/}' \
/tmp/ramdisk/init.rc
# Verify that the patched lines exist in init.rc
grep -q '#MOD#on property:persist' /tmp/ramdisk/init.rc && \
grep -q '#MOD# disabled' /tmp/ramdisk/init.rc && \
INIT_PATCHED=1
My last item in the new Developer Settings section of a revamped Settings app is USB debugging. In the hidden Development section of the original Settings app there is a checkbox option for USB debugging, but it does not seem to do anything--at least not consistently. But I have had ADB over USB working on and off for the past few days. I just can't narrow down the conditions.
To my knowledge there are two places where changes occur if USB debugging is checked. One is in the "secure" section of settings.db. There a value for adb_enable is either 0 or 1. Checking USB debugging changes the value to 1. Also, in data/property/persist.service.adb.enable, there is a value of either 0 or 1. Checking USB debugging changes the value to 1.
Of course, these could just be artifacts for other changes that I have not detected.
What is certain is that I have managed to restart ADB by "adb usb" on occasion, after meddling with various things, and it has worked. The setting (whatever it is) persists until a reboot. ADB via WiFi still works (not at the same time, of course).
But I can't seem to get at the key to what makes it work and what does not.
Suggestions?
Progress...kinda
OK, so now I have a reproducible result. I'm using ADB Konnect for WiFi but I suspect other similar apps will do. Here's the sequence:
1. Connect to WiFi
2. Start ADB Konnect (turn it ON)
3. From the command console or however you do it, connect to the NST via ADB (using the device IP address)
4. Once connected type 'adb usb'
(should say restarting)
5. Stop/turn OFF ADB Konnect
6. Connect device to PC with USB cable
7. Type 'adb devices'
You should see your device (some long number string) as connected. This access to USB debugging should persist until a reboot or power cycle.
But HOW? And can all the folderol around this process be trimmed back or (better) converted into a series of shell commands?
Got it!!!!
Easy-peasy....when you know what to do:
Code:
adb shell
#setprop service.adb.tcp.port -1
#stop adbd
#start adbd
This starts USB debugging and still allows ADB via WiFi when wanted. The setting persists until a reboot or power cycle. And...it can all be done by a series of shell commands hidden behind a simple screen tap
@nmyshkin
Oops, late to this party.
adb first looks for service.adb.tcp.port, then for persist.adb.tcp.port
Code:
setprop persist.adb.tcp.port 5555
Renate NST said:
@nmyshkin
Oops, late to this party.
adb first looks for service.adb.tcp.port, then for persist.adb.tcp.port
Code:
setprop persist.adb.tcp.port 5555
Click to expand...
Click to collapse
Yes, this is the default state the device is left in by rooting via NookManager. The good news is that by setting the port to -1 (and restarting adbd), you can use adb via USB as desired while WiFi apps like ADBKonnect will also continue to work--at least until a reboot or power cycle (which for an NST can be a long time!).
Erm, maybe I didn't make my point or maybe you got it.
If you want persistency (and be able to switch modes) don't set service.adb.tcp.port to anything.
Make sure it's not set in init.rc or any other .rc
Use only persist.adb.tcp.port
Setting it to zero (or a negative number) will make adb use only USB
Of course, not having this set either will set it to USB also.
Me, I don't use adb over WiFI.
It would be to easy to forget about it and then connect to some random WiFi which hackers would portscan.

Categories

Resources