- Attempt to invoke virtual method java lang string android os storage volumeinfo android os storage
- GitLab A android Project information Project information Activity Labels Members Issues 822 Issues 822 List Boards Service Desk Milestones Iterations Requirements Monitor Monitor Incidents Analytics Analytics Value stream Insights Issue Activity Create a new issue Issue Boards Collapse sidebar Close sidebar Format as SD card as phone/adapted storage not working It is currently not possible to format an SD card as phone storage. The OS throws an error. I tried it with two of this SanDisk SD card, as it was reported to work. Later tried with a Transcend SD Card, with the same result. Expected Behavior When formatting an SD card as phone storage, it should do that. Current Behavior When formatting an SD card as phone storage, it throws an error Possible Solution Steps to Reproduce Add external SD Card into Fairphone 2 Go to Settings/Storage Click on SD Card and set it up Choose Phone storage It will go to 40% and then throw the error above /device FP2 /version lineage-17.1 /date 2020-04-21 /kernel 3.4.113-perf-g2b033bc /baseband 4437.1-FP2-0-08,4437.1-FP2-0-08 /mods None Источник Formatting micro sd cards fails #3 Comments odomiel commented Jan 3, 2019 If you try to format a micro sd card as an internal memory, the memory app crashes with the following error message: attempt to invoke virtual method ‘java.lang.String android.os.storage.VolumeInfo.getID()’ on a null object reference excuse me for my miserable english. The text was updated successfully, but these errors were encountered: golden-guy commented Jul 31, 2019 Fixed with weekly 20190728 — for the second time. mattx2 commented Mar 29, 2020 Sorry I don’t understand. Weekly 20190728 ? How was this issue fixed? Entropy512 commented Mar 29, 2020 Who knows. Either way, github repos are not the appropriate place to report an Omni issue and have never been. It used to be Jira, I believe it still is, definitely not here. oddsito commented Feb 21, 2021 I am no expert but I found a solution for this error tested in OmniROM, AOSP ROM Android 8.1 and LOS 16 to 17: Attempt to invoke virtual method ‘java.lang.String android.os.storage.VolumeInfo.getId()’ on a null object reference. I think the problem here is that —> no matter what we do, in some roms/kernels like Omni, AOSP, LOS, etc, The sdcard will always be forced to boot only in portable mode because of System Encription settings to force «Use SD card as virtual fuse format && do not mount » In other words no matter what we do, when formatting it as internal through the Android options it will fail regardless if the card is l2fs, ext4 — or fat32 etc. The solution would be to create a card that is formated as virtual ext4 or virtual fat32 (vfat32 or vext4 format) from inside the Android. I haven’t yet discovered how to do this through ADB or Linux but I know it must be possible. (Another 2nd solution I haven’t found yet would be to unencrypted these sdcard barriers in the ROM / Kernel by flashing the boot file with a patched unencrypted sd card config , but that would be to much, I don’t want to risk flashing or wasting time creating something I don’t know. About ) The solution I found is. 1- have rooted phone 2- enable usb debugging 3- format sd card from Android options as portable . 4- format sdcard as fat32 or ext4. (Fat32 preferably- most recommended) 5) Check sdcard current format with app called disk info . Avoid NTFS format ( this could be the reason it’s not formatting as internal storage, Android doesn’t support NTFS as internal , and works bad with it as portable) Inside the app check the path of your sdcard. 6)Download app2sd from somewhere. 7)use the Partition tool ( as adoptable) inside to create 2nd partitions as vext4 8)Choose adoptable option and create 2nd Partition as ext4 ( it will actually create a virtual ext4 partition) 9)choose how much size in each Partition Partition 1 will be internal Partition 2 will be external. So give more than 50% size to 1st Partition this way you might avoid more problems 10)Press create, you’re done. Thank me from your prayers. Details —> go check storage & usb or use disk info to see your new expanded storage size with your new unmounted virtual disk and smile. This new Partition can only use installed apps, but you can’t browse it’s contents through your Android usb & storage options ( since it’s virtual and we’re tricking the fuse encryption config) If you actually want to browse this new virtual internal Partition and access it’s contents you will have to see the path through disk info APK and access it with root file manager like Total Commander. I can’t be more clearer than this. If somebody knows more please, you’re welcome to explain more. Also try chkdsk /f or /r in Windows or try the sd card as Internal in another phone to see if the problem is the card and not the Android. You can also try to unformat partition and reformat it again as fat32. With Minitool disk partition software. Источник question «Attempt to invoke virtual method ‘java.lang.String android.content.Context.getPackageName()’ on a null object reference» when authenticting user on Android Authenticating the user (using azure authentication provider) works fine. However, when the app is terminated and then launched, we are authenticating the user again and then we get the error Java.Lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.String android.content.Context.getPackageName()’ on a null object reference When trying to authenticate again right after, it crashes with the error message System.InvalidOperationException: Authentication is already in progress. What is the cause of the Java.Lang.NullPointerException error, do I need to create a new context for android when authenticating again? Any solutions for that error? @dai15002-7450 Try to use Android.App.Application.Context to replace this in AllInclusive.App.Client.LoginAsync() , If you get Java.Lang.NullPointerException error. please add breakpoint , if the provider cannot get the correct result. When replacing this with Android.App.Application.Context I get a (pretty clever) error: «Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?» Maybe it’s due to LoginAsync() that starts a new azure authentication window so somehow we pass a wrong context to another activity? Источник
- Format as SD card as phone/adapted storage not working
- Expected Behavior
- Current Behavior
- Possible Solution
- Steps to Reproduce
- Formatting micro sd cards fails #3
- Comments
- odomiel commented Jan 3, 2019
- golden-guy commented Jul 31, 2019
- mattx2 commented Mar 29, 2020
- Entropy512 commented Mar 29, 2020
- oddsito commented Feb 21, 2021
- question
- «Attempt to invoke virtual method ‘java.lang.String android.content.Context.getPackageName()’ on a null object reference» when authenticting user on Android
Attempt to invoke virtual method java lang string android os storage volumeinfo android os storage
Немного теории.
Папка LOST.DIR . Почему она заполняется?
Эта папка создается в случае, когда Android запускает File System ChecK (аналог Windows Chkdsk) и находит потерянные цепочки файлов. Эти файлы появляются, если вы вытаскиваете карту памяти в момент, когда на нее будет производится запись. Ведь Windows пытается записать файлы, используя механизм кэширования. Когда вы выдёргиваете кабель, содержимое кэша не успевает записаться на диск и данные в файле оказываются неполноценные. После того, как девайс отключён от компьютера, Android запускает сканирование карты и обнаруживает такие «битые» файлы, перемещая их остатки в директорию LOST.DIR.
Полезные ссылки:
1. FAQ по устройствам и Android OS — посмотрите в FAQ по Вашему аппарату, может там описаны рекомендуемые карты памяти для конкретной модели аппарата.
2. Посмотрите тему «Аксессуары» Вашего устройства. В ней тоже может быть собрана полезная информация по рабочим и не рабочим картам.
3. Затрудняетесь с выбором карты? Тогда смотрите здесь: Аксессуары для различных устройств, а так же много советов было здесь Хочу купить карту MicroSD 32гб. Посоветуйте., и здесь: Выбор флеш карты
Приступим к практике.
1. Всегда, перед отключением девайса от компьютера, выбирайте «Безопасное извлечение» , а далее, в самом устройстве «Отключить USB накопитель» (P.S. Может называться по другому, в зависимости от модели и прошивки аппарата).
2. Проверьте карту памяти при помощи приложения ScanDisk.
3. Проблема может крыться и в самой карте памяти. Попробуйте отформатировать ее и следуя совету выше, записывайте на нее файлы.
— Как форматировать:
- Полное форматирование с помощью телефона: Меню-Настройки-Память-Отключить карту памяти (Извлечь карту)-Очистить карту-Подключить SD-карту (П.С. названия и пути могут меняться, в зависимости от модели телефона);
- Форматирование с помощью компьютера с выбором разного размера кластера.
- Форматирование с использованием специального приложения SD Formatter или Hard Disk Low Level Format Tool. Так называемое «низкоуровневое» форматирование.
4. Попробуйте поменять кэш на карте памяти с помощью этого приложения: ® SD Speed Increase
5. Форматирование не помогает? Попробуйте заменить карту памяти на другую.
6. Записанные Вами файлы с компьютера видны а с устройства нет? Посмотрите, нет ли случайно в папке, в которую Вы их записали, файла .nomedia(файл скрытый). Если есть — удалите его.
Сообщение отредактировал Gridzilla — 14.08.18, 18:54
Проверьте папки с музыкой на наличие файла .nomedia или просто отформатируйте флеш-карту и перезалейте музыку.
Сообщение отредактировал Fury-Fox — 23.10.11, 03:53
Запустите через Rescan Media сканирование флешки
Сообщение отредактировал eeriesilence — 23.10.11, 18:40
Запустите через Rescan Media сканирование флешки
Сообщение отредактировал eeriesilence — Сегодня, 19:40
Еще есть вариант, что в папке с музыкой лежит файл «.nomedia». Его надо удалить.
P.s. этот файл можно увидеть через PC
Я обычно, от чужих глаз файлы храню.
Сообщение отредактировал Kwitty — 24.10.11, 14:53
armvolk, очистите данные программы «Хранение мультимедиа» и заново запустите штатный плеер.
Сообщение отредактировал Бодтэк — 24.10.11, 15:05
armvolk, очистите данные программы «Хранение мультимедиа» и заново запустите штатный плеер.
Сообщение отредактировал Бодтэк — Вчера, 16:05
Причина редактирования: Исправил ошибку.
Друг мой, ты просто красавчик. 🙂 все сделал,как ты сказал, заработало :-):-):-):-) как тут на сайте у вас тут принято рейтинг поднимать или что, научи, подниму 🙂
У меня такая же проблема ставь лучше Power amp и забудь свои проблемы.
Добавлено 16.11.2011, 19:01:
Лучше препрошиться сохранить данные с флешки и всё будет все нормально , пробуй.
Источник
GitLab - A android
- Project information
- Project information
- Activity
- Labels
- Members
- Issues 822
- Issues 822
- List
- Boards
- Service Desk
- Milestones
- Iterations
- Requirements
- Monitor
- Monitor
- Incidents
- Analytics
- Analytics
- Value stream
- Insights
- Issue
- Activity
- Create a new issue
- Issue Boards
- Project information
- Activity
- Labels
- Members
- Issues 822
- List
- Boards
- Service Desk
- Milestones
- Iterations
- Requirements
- Monitor
- Incidents
- Analytics
- Value stream
- Insights
- Issue
Collapse sidebar Close sidebar
Format as SD card as phone/adapted storage not working
It is currently not possible to format an SD card as phone storage. The OS throws an error. I tried it with two of this SanDisk SD card, as it was reported to work. Later tried with a Transcend SD Card, with the same result.
Expected Behavior
When formatting an SD card as phone storage, it should do that.
Current Behavior
When formatting an SD card as phone storage, it throws an error
Possible Solution
Steps to Reproduce
- Add external SD Card into Fairphone 2
- Go to Settings/Storage
- Click on SD Card and set it up
- Choose Phone storage
- It will go to 40% and then throw the error above
/device FP2 /version lineage-17.1 /date 2020-04-21 /kernel 3.4.113-perf-g2b033bc /baseband 4437.1-FP2-0-08,4437.1-FP2-0-08 /mods None
Источник
Formatting micro sd cards fails #3
Comments
odomiel commented Jan 3, 2019
If you try to format a micro sd card as an internal memory, the memory app crashes with the following error message:
attempt to invoke virtual
method ‘java.lang.String
android.os.storage.VolumeInfo.getID()’ on a
null object reference
excuse me for my miserable english.
The text was updated successfully, but these errors were encountered:
golden-guy commented Jul 31, 2019
Fixed with weekly 20190728 — for the second time.
mattx2 commented Mar 29, 2020
Sorry I don’t understand. Weekly 20190728 ?
How was this issue fixed?
Entropy512 commented Mar 29, 2020
Who knows. Either way, github repos are not the appropriate place to report an Omni issue and have never been. It used to be Jira, I believe it still is, definitely not here.
oddsito commented Feb 21, 2021
I am no expert but I found a solution for this error tested in OmniROM, AOSP ROM Android 8.1 and LOS 16 to 17:
Attempt to invoke virtual
method ‘java.lang.String
android.os.storage.VolumeInfo.getId()’ on
a null object reference.
I think the problem here is that —> no matter what we do, in some roms/kernels like Omni, AOSP, LOS, etc,
The sdcard will always be forced to boot only in portable mode because of System Encription settings to force «Use SD card as virtual fuse format && do not mount »
In other words no matter what we do, when formatting it as internal through the Android options it will fail regardless if the card is l2fs, ext4 — or fat32 etc.
The solution would be to create a card that is formated as virtual ext4 or virtual fat32 (vfat32 or vext4 format) from inside the Android.
I haven’t yet discovered how to do this through ADB or Linux but I know it must be possible.
(Another 2nd solution I haven’t found yet would be to unencrypted these sdcard barriers in the ROM / Kernel by flashing the boot file with a patched unencrypted sd card config , but that would be to much, I don’t want to risk flashing or wasting time creating something I don’t know. About )
The solution I found is.
1- have rooted phone
2- enable usb debugging
3- format sd card from Android options as portable .
4- format sdcard as fat32 or ext4.
(Fat32 preferably- most recommended)
5) Check sdcard current format with app called disk info .
Avoid NTFS format ( this could be the reason it’s not formatting as internal storage, Android doesn’t support NTFS as internal , and works bad with it as portable)
Inside the app check the path of your sdcard.
6)Download app2sd from somewhere.
7)use the Partition tool ( as adoptable) inside to create 2nd partitions as vext4
8)Choose adoptable option and create 2nd Partition as ext4 ( it will actually create a virtual ext4 partition)
9)choose how much size in each Partition
Partition 1 will be internal
Partition 2 will be external.
So give more than 50% size to 1st Partition this way you might avoid more problems
10)Press create, you’re done.
Thank me from your prayers.
Details —> go check storage & usb or use disk info to see your new expanded storage size with your new unmounted virtual disk and smile.
This new Partition can only use installed apps, but you can’t browse it’s contents through your Android usb & storage options ( since it’s virtual and we’re tricking the fuse encryption config)
If you actually want to browse this new virtual internal Partition and access it’s contents you will have to see the path through disk info APK and access it with root file manager like Total Commander.
I can’t be more clearer than this.
If somebody knows more please, you’re welcome to explain more.
Also try chkdsk /f or /r in Windows or try the sd card as Internal in another phone to see if the problem is the card and not the Android.
You can also try to unformat partition and reformat it again as fat32. With Minitool disk partition software.
Источник
question
«Attempt to invoke virtual method ‘java.lang.String android.content.Context.getPackageName()’ on a null object reference» when authenticting user on Android
Authenticating the user (using azure authentication provider) works fine. However, when the app is terminated and then launched, we are authenticating the user again and then we get the error Java.Lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.String android.content.Context.getPackageName()’ on a null object reference
When trying to authenticate again right after, it crashes with the error message System.InvalidOperationException: Authentication is already in progress.
What is the cause of the Java.Lang.NullPointerException error, do I need to create a new context for android when authenticating again? Any solutions for that error?
@dai15002-7450 Try to use Android.App.Application.Context to replace this in AllInclusive.App.Client.LoginAsync() , If you get Java.Lang.NullPointerException error. please add breakpoint , if the provider cannot get the correct result.
When replacing this with Android.App.Application.Context I get a (pretty clever) error:
«Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?»
Maybe it’s due to LoginAsync() that starts a new azure authentication window so somehow we pass a wrong context to another activity?
Источник