- Change Device Name on Android for WiFi / Bluetooth / Hotspot
- Change Android Device Name from Settings
- Changing Bluetooth Name
- Change WiFi Direct Name on Android
- Change WiFi Hotspot Name on Android
- Как правильно идентифицировать Android-устройства
- Зачем нужна идентификация
- Основные способы идентификации
- Использование аппаратных идентификаторов
- Генерация UUID с первым запуском
- Использование идентификаторов, предоставляемых системой
- Создание цифрового отпечатка (fingerprint) устройства
- Какой метод выбрать
- How to Change Device Name on Android (WiFi and Bluetooth)
- Change Device Name on Android
- Change Device Name via ADB Command
- Changing WiFi Hotspot Name
- Change Bluetooth Name on Android
- Changing Wi-Fi Direct Name
- Change Device Name on Google Play Store
Change Device Name on Android for WiFi / Bluetooth / Hotspot
In this tutorial, we’ll see how we can change Android device name under device settings. Besides, we’ll also be describing the way to change WiFi Direct and Hotspot network name and the Bluetooth connection name for Android devices.
Wi-Fi and Bluetooth are the most used modes of connectivity features on smartphones for sharing internet data and transferring files from one device to another. If you scan for a Wi-Fi or Bluetooth connection with your Android phone or tablet, you will see either a generic or customized name of the detected devices. If you are new to Android, this little tutorial will help you assign a customized name for your Android phone or tablet that will be shown when other devices scan for yours. Let’s see how we can change device name for WiFi, Bluetooth, mobile hotspot or tethering.
There is nothing twisted about setting up a device name for WiFi and Bluetooth connection and that’s why I call it a beginner’s guide. If you are a smart Android user, please do not cross beyond this point. All options are already existing under phone settings, I will just be telling you how to dig into it.
Change Android Device Name from Settings
The easiest way to change the device name of your Android device is by doing it from the About phone screen itself. Open Settings on your phone or tablet, scroll to About phone or device and tap on it. On the next screen, tap on Device Name, and then type the desired name for your device in the text field and select OK.
Change Android Device Name – OnePlus 6
Please Note: If you have a Samsung Galaxy device, you need to change the device name only and your Bluetooth name and WiFi Direct name will be automatically set. Go to Settings> About Phone and tap the Edit option under the device name. Type your custom device name and select Done.
Change Android Device Name – Samsung Galaxy S9+
Changing Bluetooth Name
- To be able to edit the settings for Bluetooth, you will have to turn it on first. Bluetooth can also be enabled by tapping on the slider from Settings> Bluetooth.
- Open Settings on your Android device and tap on Bluetooth option.
- Tap the Device name and enter the new name for your phone or tablet and tap OK. On OnePlus devices, you’ll be able to see the Device name after selecting Pair new device option. On some Android devices other you need to tap the 3-dot vertical menu icon to see the device rename option.
Change Bluetooth Name on Android
Change WiFi Direct Name on Android
Assigning the desired device name is pretty much the same as that of Bluetooth. Let’s see how you can do it.
- Again, to edit WiFi settings, you will have to enable it first. Go to your device’s Settings panel and tap on the toggle slider to enable it
- Next, tap on the “Wi-Fi” text to see the configuration screen.
- Tap on “Wi-Fi Direct”, or launch options menu to see the “Wi-Fi Direct” option (for AOSP) and then tap on it.
- Now tap on the 3-vertical-dot menu icon to see the “Rename Phone” or “Rename Device” option.
- Type in the preferred name in the text box and select OK to save it.
Change WiFi Direct Name on Android
Change WiFi Hotspot Name on Android
If you want to customize your Android phone’s name for WiFi hotspot and tethering, go to Settings> Mobile/Wi-Fi Hotspot and Tethering and turn it on. Then tap the Hotspot name option and type the name you want to show. On some Android phones, you need to tap the 3-dot menu icon and select Configure Mobile Hotspot option to replace the existing name with a name of your choice.
Change WiFi Hotspot Name on Android
So here ends our easy tutorial, if it really is, for beginners. We just hope it helps to change your Android device name. Bluetooth name, Hotspot name, and WiFi Direct name. For more useful tips and tricks for Android devices, do not forget to take a tour of our useful tutorials. Cheers!
Источник
Как правильно идентифицировать Android-устройства
Всем привет! Если вам нужно создать уникальный и стабильный идентификатор Android-устройства для использования внутри приложения, то вы наверняка заметили тот хаос, который присутствует в документации и в ответах на stackoverflow. Давайте рассмотрим, как решить эту задачу в 2020 году. О том, где взять идентификатор, стойкий к переустановкам вашего приложения, и какие могут быть сложности в будущем — в этом кратком обзоре. Поехали!
Зачем нужна идентификация
В последнее время обсуждения конфиденциальности пользовательских данных стремительно набирают популярность. Возможно, это спровоцировано ростом выручки рекламных гигантов. Возможно, под этими обсуждениями скрывается обеспокоенность монополиями, которые идентифицируют пользователей и их устройства. Так, Apple, борясь со слежкой и ограничивая всем разработчикам использование IDFA, в то же самое время нисколько не ограничивает его себе. Что можно сказать точно: процесс идентификации пользователя приложения для разработчиков усложнился.
В задачах, опирающихся на идентификацию, встречаются: аналитика возвратов, персонализация контента и рекламы, предотвращение мошенничества.
Среди последних можно выделить несколько актуальных проблем:
Общие аккаунты в сервисах с платной подпиской или уникальным платным контентом. Только представьте сколько теряют сервисы вроде Netflix или Coursera от того, что пользователи заводят один аккаунт на нескольких человек.
Обе проблемы ведут либо к потере выручки, либо к репутационным потерям. Надежность их решения напрямую зависит от надежности идентификации устройств.
Основные способы идентификации
Использование аппаратных идентификаторов
Устаревший и нежизнеспособный в настоящее время способ. Google хорошо поработала над тем, чтобы закрыть доступ к ним, поскольку они не меняются даже после сброса к заводским настройкам. Среди таких идентификаторов:
В настоящее время они недоступны без явного запроса разрешений. Более того, если приложению нужно ими пользоваться, оно может не попасть в Play Market. Оно должно основным функционалом опираться на эти разрешения, иначе будут трудности с прохождением ревью. Поэтому сейчас эта опция доступна приложениям для работы со звонками или голосовым ассистентам.
Такие идентификаторы не меняются после сброса к заводским настройкам, и здесь кроется неочевидный недостаток: люди могут продавать свои устройства, и в таком случае идентификатор будет указывать на другого человека.
Генерация UUID с первым запуском
Данный способ схож с использованием cookie: создаем файл со сгенерированной строкой, сохраняем его в песочнице нашего приложения (например с помощью SharedPreferences), и используем как идентификатор. Недостаток тот же, что и у cookie — вся песочница удаляется вместе с приложением. Еще она может быть очищена пользователем явно из настроек.
При наличии у приложения разрешений к хранилищу вне песочницы можно сохранить идентификатор где-то на устройстве и постараться поискать его после переустановки. Будет ли в тот момент нужное разрешение у приложения — неизвестно. Этот идентификатор можно использовать как идентификатор установки приложения (app instance ID).
Использование идентификаторов, предоставляемых системой
В документации для разработчиков представлен идентификатор ANDROID_ID. Он уникален для каждой комбинации устройства, пользователя, и ключа, которым подписано приложение. До Android 8.0 идентификатор был общим для всех приложений, после — уникален только в рамках ключа подписи. Этот вариант в целом годится для идентификации пользователей в своих приложениях (которые подписаны вашим сертификатом).
Существует и менее известный способ получить идентификатор общий для всех приложений, независимо от сертификата подписи. При первичной настройке устройства (или после сброса к заводским) сервисы Google генерируют идентификатор. Вы не найдете о нем никакой информации в документации, но тем не менее можете попробовать код ниже, он будет работать (по состоянию на конец 2020 года).
Добавляем строчку в файл манифеста нужного модуля:
И вот так достаем идентификатор:
В коде происходит следующее: мы делаем запрос к данным из определенного ContentProvider-a, что поставляется с сервисами Google. Вполне возможно, что Google закроет к нему доступ простым обновлением сервисов. И это даже не обновление самой операционки, а пакета внутри нее, т.е. доступ закроется с обычным обновлением приложений из Play Market.
Но это не самое плохое. Самый большой недостаток в том, что такие фреймворки, как Xposed, позволяют с помощью расширений в пару кликов подменить как ANDROID_ID, так и GSF_ID. Подменить локально сохраненный идентификатор из предыдущего способа сложнее, поскольку это предполагает как минимум базовое изучение работы приложения.
Приложение Device ID Changer в связке с Xposed позволяет подменять практически любой идентификатор. В бесплатной версии — только ANDROID_ID
Создание цифрового отпечатка (fingerprint) устройства
Идея device-fingerprinting не новая, и активно используется в вебе. У самой популярной библиотеки для создания отпечатка — FingerprintJS — 13 тысяч звезд на GitHub. Она позволяет идентифицировать пользователя без использования cookie.
Рассмотрим идею на примере (цифры взяты приблизительные для иллюстрации).
Возьмем ежедневную аудиторию какого-нибудь Android-приложения. Допустим она составляет 4 миллиона. Сколько среди них устройств марки Samsung? Гораздо меньше, примерно 600 тысяч. А сколько среди устройств Samsung таких, что находятся под управлением Android 9? Уже около 150 тысяч. Выделим среди последних такие, что используют сканер отпечатков пальцев? Это множество устройств еще меньше, ведь у многих планшетов нет сканера отпечатков пальцев, а современные модели опираются на распознавание лица. Получим 25000 устройств. Добавляя больше условий и получая больше информации, можно добиться множеств малых размеров. В идеальном случае — с единственным элементом внутри, что и позволит идентифицировать пользователя. Чем больше пользователей можно различить, тем выше энтропия этой информации.
Среди основных источников информации в Android, доступных без пользовательских разрешений, можно выделить аппаратное обеспечение, прошивку, некоторые настройки устройства, установленные приложения и другие.
Обычно всю добытую информацию хешируют, получая цифровой отпечаток. Его и можно использовать в качестве идентификатора.
Из достоинств метода — его независимость от приложения (в отличие от ANDROID_ID), поскольку при одинаковых показаниях с источников отпечатки будут одинаковыми. Отсюда же вытекает первый недостаток — разные устройства с некоторой вероятностью могут иметь одинаковый отпечаток.
Еще одна особенность отпечатка — не все источники информации стабильны. Например, установленные приложения дадут много энтропии. Возьмите устройство друга, и проверьте, одинаков ли у вас набор приложений. Скорее всего — нет, к тому же приложения могут устанавливаться и удаляться почти каждый день.
Таким образом, метод будет работать при правильном соотношении стабильности и уникальности источников энтропии.
Какой метод выбрать
Итак, мы рассмотрели доступные способы идентификации. Какой же выбрать? Как и в большинстве инженерных задач, единственного правильного решения не существует. Все зависит от ваших требований к идентификатору и от требований к безопасности приложения.
Разумный вариант — использовать сторонние решения с открытыми исходниками. В этом случае за изменениями в политике конфиденциальности будет следить сообщество, вовремя поставляя нужные изменения. За столько лет существования проблемы до сих пор нет популярной библиотеки для ее решения, как это есть для веба. Но среди того, что можно найти на android-arsenal, можно выделить две, обе с открытым исходным кодом.
Android-device-identification — библиотека для получения идентификатора. Судя по коду класса, ответственного за идентификацию, используются аппаратные идентификаторы, ANDROID_ID, и цифровой отпечаток полей из класса Build. Увы, проект уже 2 года как не поддерживается, и в настоящий момент скорее неактуален. Но, возможно, у него еще будет развитие.
Fingerprint-android — совсем новая библиотека. Предоставляет 2 метода: getDeviceId и getFingerprint. Первый опирается на GSF_ID и ANDROID_ID, а второй отдает отпечаток, основанный на информации с аппаратного обеспечения, прошивки и некоторых стабильных настроек устройства. Какая точность у метода getFingerprint — пока неясно. Несмотря на это библиотека начинает набирать популярность. Она проста в интеграции, написана на Kotlin, и не несет за собой никаких зависимостей.
В случае, когда импортирование сторонних зависимостей нежелательно, подойдет вариант с использованием ANDROID_ID и GSF_ID. Но стоит следить за изменениями в обновлениях Android, чтобы быть готовым к моменту, когда доступ к ним будет ограничен.
Если у вас есть вопросы или дополнения — делитесь ими в комментариях. А на этом все, спасибо за внимание!
Источник
How to Change Device Name on Android (WiFi and Bluetooth)
Your Android device’s name works as a hostname while connecting to other devices via WiFi. A personalized device name for WiFi, Hotspot, or Bluetooth connection makes it easy to recognize a device in the list of other connected devices. By default, all Android devices come with a generic name and so it’s a good idea to give your device a unique name. Here is how to change the device name on Android for wired and wireless connections. Moreover, we’ll also see how we can change the device name in the Google Play Store.
Personally, I prefer to see a personalized name for all my devices whether it be my PC, laptop, smartphone, or WiFi router. If you own an Android smartphone or a tablet device, follow the instructions below to change the following:
- Android device name
- Bluetooth name
- WiFi Direct name
- Mobile hotspot name
- Device name in the Play Store
Changing the device name automatically changes the names for Bluetooth and WiFi Hotspot connections. However, it’s possible to set one name for your Android device and a different Bluetooth name and hotspot name. Having given a custom name to your device, you can easily recognize your device in the list of available wireless networks and Bluetooth devices. Thankfully, changing the device name is not so complicated as turning off Talkback on Android devices.
Change Device Name on Android
If you want to personalize the device name of your Android phone or tablet, the easiest way is to do it via Settings.
- Open the Settings app on your Android device.
- Scroll down to About phone or About device and tap it.
- Now tap the Device name option.
- Type the desired name and select OK.
If you own a Samsung Galaxy phone or Tab, the steps to change the device name are almost the same.
Go to Settings > About phone and tap the Edit button. Type the device name you want and tap Done.
It doesn’t matter whether you own a device from OnePlus, Realme, Oppo, Vivo, Nokia, Lenovo, Huawei, etc., you just need to navigate to Settings > About phone > Device name, tap the current device name and assign a name. Once you change the name using the method given above, it’ll show the custom name for all wired and wireless connections.
Android device names on Samsung TV
Android device name on Windows PC
Change Device Name via ADB Command
While changing the Android device name via Settings is very easy, there’s still another way you should try. You must be familiar with ADB commands and you can change your Android phone’s name using ADB as instructed below.
- Download the latest Android SDK Platform-tools and set them up on your computer.
- Install the latest Android USB driver on your computer.
- Open the platform-tools folder and launch the command prompt window. There are 2 ways to do that.
- Place the mouse pointer at an empty place in the folder window, do a right-click on the mouse and select the Open PowerShell window here option.
- Just type “cmd” in the folder window address bar and hit the Enter key.
- When the command prompt window is launched, connect your device to the PC.
- Go to your phone’s Settings > Developer options and enable USB Debugging.
- Now type the following command in the command prompt window and press the Enter key.
- If you get an alphanumeric value in the cmd window, it shows that your phone is connected properly.
- Now, execute the command below to get the current name of your Android device.
- You’ll see the name of your device in the command prompt window. In my case, it displayed my device’s name “ Technastic Galaxy Note 10+ “.
- Now type or paste the following command and hit the Enter key. Don’t forget to replace the device name the command with the name you want for your device.
- The screenshot attached below will help you understand all the steps clearly.
- Now, navigate to Settings > About phone and you’ll find that the device name has been changed.
Here is a huge list of ADB Shell commands that you must check out to learn more.
Changing WiFi Hotspot Name
Usually, I use my Android phone’s hotspot to binge-watch Netflix and Prime Video shows on my Smart TV and surf the web on my laptop during commutes. It’s a good idea to give a device a personalized name for convenience. In case you just want to change the hotspot name of your Android device, below are the steps.
- Open Settings on your Android phone.
- Samsung Galaxy devices: Tap Connections >Mobile Hotspot and Tethering.
- OnePlus phones: Tap Mobile/Wi-Fi Hotspot and Tethering.
- Xiaomi Redmi phones: Tap Portable Hotspot under SIM cards and mobile networks.
- Samsung Galaxy devices: Tap Connections >Mobile Hotspot and Tethering.
- To change the hotspot name on Android devices from different OEMs follow the steps below.
- Samsung devices: You need to enable the mobile hotspot before you can change its settings. Tap Mobile Hotspot and Tethering as shown below. Tap the current device name and rename it. Select the Save option.
Hotspot name on Samsung
Xiaomi devices: Tap the Set up portable hotspot > SSID, type the desired portable hotspot name and tap the OK icon.
Hotspot name on Xiaomi and Redmi
OnePlus devices: Select Wi-Fi hotspot, type the name for the hotspot network, and select OK.
Hotspot name on OnePlus phones
Change Bluetooth Name on Android
As I mentioned above, you can set different device names for Bluetooth and WiFi connections while keeping a different device name on Android. Below is how you can change the Bluetooth name for an Android device.
Note: You must turn on Bluetooth on your device before you can edit its settings.
- Open the Settings app on your Android device.
- Tap Bluetooth and turn it on. Alternatively, you can open the Quick Settings panel by sliding down the status bar and tap and hold the Bluetooth icon.
- Tap Device name and type the Bluetooth name for your device.
- If you own a OnePlus phone, you need to select Pair new device to access the Device name option.
- On Samsung Galaxy devices, you don’t have the option to change the Bluetooth name. Samsung devices automatically take your device name as the Bluetooth name.
- If you own a OnePlus phone, you need to select Pair new device to access the Device name option.
Changing Wi-Fi Direct Name
Wi-Fi Direct is a faster way than Bluetooth for sharing files over a wireless network. If you want to set the Wi-Fi Direct name for your device, here’s how to do it.
- Turn on WiFi on your device first.
- Open Android Settings on your device and tap on Wi-Fi.
- Now do as described below.
- Xiaomi phones: Select Additional settings and tap on Wi-Fi Direct. You need to tap Device name and enter the name you want.
Wi-Fi Direct settings
- Xiaomi phones: Select Additional settings and tap on Wi-Fi Direct. You need to tap Device name and enter the name you want.
Wi-Fi Direct name
Change Device Name on Google Play Store
Every Android phone has the Google Play Store apps installed out-of-the-box. All Android devices registered with the same Gmail ID are shown on your Google account dashboard.
If you want your Google Play Store and Google Dashboard to show a personalized name for your Android devices, follow the steps given below.
- Open the Google Play Store settings page on your desktop or mobile browser.
- You’ll see the list of your devices.
- Tap or click the Edit button in front of the device name and rename the device.
- After that, tap the Update icon.
That’s it! You have successfully changed the device name for your Android phone. Next time you try to install an app from the Google Play Store (web), you’ll be asked to choose a device with the name you assigned.
It’s time to wind up my tutorial here. I hope now you’ll be able to change not only the device name on your Android but also the Bluetooth name, Hotspot name, and WiFi Direct name. In case you still have any questions, please drop us a comment.
Источник