No homescreen button in B2G emulator - firefox-os

I build the code for b2g and gaia via downloading the latest from mozilla repo.
Once the build is done.. when I launched there is not home button visible. Please help me regarding this...

The Firefox OS Simulator[1] is a Firefox plugin which launches B2G Desktop and provides a simulated home button, B2G Desktop builds alone do not have this. But you can just use the home button on your keyboard!
https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/

In B2G desktop you can emulate home button with FN+LEFT (OSX) or HOME (Windows).

Related

can I use chrome://inspect to inspect android studio emulator

I have a mobile app apk file and want to run it through the android studio emulator and inspect network requests with chrome//inspect. To debug webview in the app.
But when I go to chrome//inspect. I can see the emulator but not inspect link.
I am not sure why the inspect link doesn't appear and whether I could inspect the emulator in the first place.
Suggesting me alternative ways to debug webview on Macbook will also be appreciated.
PC: Macbook 16 pro / MacOS Ventura 13.0.1
I don't have the source code of the app, Only apk file.
Thank you for your help!

I try to make android studio (emulator) work with vs-code but have an error "avdmanager is missing from the Android SDK"

This is my PATH
export ANDROID_SDK_ROOT=/mnt/sda1/DevTools/sdk/
export ANDROID_HOME=$ANDROID_SDK_ROOT
export PATH=${PATH}:/mnt/sda1/DevTools/sdk/platform-tools
I try many cases, but still this error!
Try :
flutter doctor --android-licenses
if something wrong, try to locate android sdk path.
flutter config --android-sdk {path}
Mine :
flutter config --android-sdk C:\Android\Sdk
This worked for me. If you have sdkmanager, avdmanager and emulator, and you have them in your PATH environmental variable, then
Download a system image:
sdkmanager "system-images;android-30;google_apis_playstore;x86_64"
(you can find available packages with sdkmanager --list --verbose)
Create a new virtual device with
avdmanager create avd --name MyAndroidDevice --package "system-images;android-30;google_apis_playstore;x86_64"
Start the emulator
emulator -avd MyAndroidDevice
Now restart VSCode and open your Flutter project. The new device should be at the bottom right corner or you should be able to choose it by clicking on "No device".
For me, I had to restart my VS Code for the installation of Android SDK be reflected upon it.
I know this is an old question but setting my $PATH variable in ~/.bashrc (I'm on Ubuntu 20.04) did not work for me.
I needed to setup Android Emulator for VScode, because I wanted to run my flutter app, which seems to be the same issue as OP had.
Instead of setting the $PATH directly you can actually use Flutter in the terminal to do it.
If you run "flutter config" in the terminal you get something like:
Configure Flutter settings.
To remove a setting, configure it to an empty string.
The Flutter tool anonymously reports feature usage statistics and basic crash reports to help
improve Flutter tools over time. See Google's privacy policy:
https://www.google.com/intl/en/policies/privacy/
....
Run "flutter help" to see global options.
Settings:
android-sdk: <my_path_to_android_tools>
Analytics reporting is currently enabled.
You can then see the $PATH that is currently set with flutter under:
Settings:
android-sdk: <my_path_to_android_tools>
Mine was incorrect so I changed it to the current one with the command:
flutter config --android-sdk <my_path_to_android_tools>
Afterwards I restarted VScode and when it was finished loading I could now press the "device" button in the right hand corner and then select emulator that I had already created. I used one of the above answers to install the emulator itself.
It took a while to launch the emulator the first time due to installing some dependencies but it did work!
I tried this and works:
from terminal run flutter config --enable-android. You will get Setting "enable-android" value to "true".
after that open android studio, set up virtual devices first if you haven't. Open Android Studio -> Configure -> AVD Manager -> Create Your Virtual Device
Go back to your VS Code, open command Palette (Ctrl+P or cmd+P, then type >), or from View -> Command palette... -> Flutter: Select Device -> choose your android device
I faced the same issue and solved it running flutter doctor from the terminal, in VS Code. In my case, I had the android sdk located in a custom location (D drive), the reason why it wasn't found automatically. The "doctor" told me to run flutter config --android-sdk <my-sdk-custom-location>. Running it and restarting the IDE made the trick. Hopefully this helps someone facing the same problem.

Mobile device recognised by ADB or by Chrome dev tools but not by both

My android device is recognized by ADB but not by Chrome development tools. If I kill the ADB server, then the device is recognized by Chrome dev tools.
I cannot use Chrome for remote debugging.
ADB was installed through Android Studio
My Mac environment:
ADB: Android Debug Bridge version 1.0.39
Version 0.0.1-4500957
Installed as /Users/xxx/Library/Android/sdk/platform-tools/adb
Chrome: Version 66.0.3359.181 (Official Build) (64-bit)
By trying adb kill-server the device is visible in Chrome
Whenever I execute adb start-server, and then adb devices the result is:
List of devices attached
ECPBBCB6C3105088 device
I'm struggling with this for some time. Any suggestions?
That can happen only if two software with two adb.exe are working.
I first got the problem, When I tried using KingoROOT Software which had it's own ADB Tools in its installation path and, I was trying to launch ADB from SDK path.
Only, one instance of ADB will work.
If you try to use the adb.exe which is used by Chrome Dev Tools, it will work.
What you can try is, if you're on Windows, first open Chrome Dev Tools then, open task manager, check Show Processes For All Users, then find the adb.exe started by Chrome Dev Tools. Give a right-click and goto Open File Location.
Hope it helps.

Android Studio DDMS can't open /data folder in an emulator phone

I recently created an Emulator device with Android Studioļ¼Œbut only to find that I can't open the /data/data folder to get the sqlite db file.The folder just can't open,I have tried to use shell scirpt to chmod the /data directory,but it says the su command not found.
The Emulator
Can't open!
Is there anyone has the same problem? Or I have to root the Emulator?
But it's an Emulator! I just think it's kind of inconvenient to root a Emulator!
Update
Can't remember whether it's from Android Studio 3.0 or later but if you have downloaded AS 3.3+, you'll find the tab on bottom right corner called Device File Explorer, which lets you to see and easily get the data of your app without rooting.
Opening as Administrator didn't help but rooting the phone did worked, and no I'm not lowering my SDK version.
Open cmd and go to C:\Users\{User}\AppData\Local\Android\Sdk\platform-tools or to the folder location and type cmd at the address bar.
Whether you're super user or not can be determined by $:
C:\{User}\...\platform-tools>adb shell
generic_x86:/ $ exit
To have su/root privileges type adb root and exit:
C:\{User}\...\platform-tools>adb root
generic_x86:/ # exit
Next run the Android Device Monitor to extract the data.
To turn off root type adb unroot.
Even after running Android Studio as administrator if you can't access data/data folder, try using API 23 or lower for you emulator device.
Using Android Studio 3.1.2 and DDMS is no longer available under the Tool options. Instead Android Studio has the "Device File Explorer" tab available on the bottom right (I know why put it there).
Click on the "Device File Explorer" tab and select the Android Device you want to explore. To actually access the files, make sure USB Debugging is turned on in the AVD.
If that doesn't work, you'll need to use Terminal panel.
Change the folder permission through adb shell (using chmod command)
Pull the file using
"adb pull". See example:
C:\Users\B\AppData\Local\Android\sdk\platform-tools> adb pull /data/data/com.example.b.expensewatcher/databases/myexpenses.db
/data/data/com.example.b.expensewatcher/databases/myexpenses.db: 1 file pulled. 3.3 MB/s (24576 bytes in 0.007s)
For more details on changing folder permissions see: https://www.dev2qa.com/android-device-monitor-cannot-open-data-folder-resolve-method/
open DDMS with administrator previlledges. Had same issue and it solved it.
Fastest means to doing this is opening android studio with administrator previledges and opening DDMS from there.
otherwise, have a look at this link Android device monitor
Instead of rooting your android phone, you can access the data folder from android studio by opening 'device file explorer' which is to the bottom right corner of your IDE.
Open 'data>data>packagename>databases' you can save the database files but this will be in the encrypted form. You can directly access it from the file explorer on your PC.
Install DB Browser for SQLite and select option 'open database.'
Connect your android device and enable 'File Transfer'. Go to the directory where your android studio has been installed i.e., in my case documents. Then,
C:\Users\prana\Documents\AndroidStudio\DeviceExplorer\xiaomi-redmi_note_4-164594b\data\data\com.android.packagename\databases
You can find your databases here.
Hope it helps!
Use adb to root the emulator device. Once that is done, you will have permission to access the data\data folder
adb shell
su
The adb tool will be present in Users\\AppData\Local\Android\sdk1\platform-tools
Open cmd, change directory to above folder and enter the above code
Restart Android device monitor (if needed)

Running Program with Emulator, "Local SDK Path not set!"

When I run my program with the emulator on Android Studio I get an error as follows
Local SDK Path Not Set
When i checked this in my project structure my SDK path is
C:\Android\sdk
and this is the same in my SDK Manager. I'm new to Android Studio and am curious of why my emulator loads, but does not run my program.Any help in this regard will be appreciated
In the menu Run > Edit Configurations if you have the deployment target as "Emulator" with no preferred device selected you may run into this issue. Instead, choose deployment target as "Open Select Deployment Target Dialog". This will let you select from any installed emulator or a device connected by USB. Make sure to hit "Apply" before closing the Edit Configurations menu.
Edit Configurations with Emulator but no Emulator
Edit Configurations with Open Select Deployment Target Dialog
I ran in to the same problem after synchronizing gradle. All I had to do was turn the emulator off and on again to fix the problem.
Make sure you are connected to the internet (so Android Studio and Gradle can actually complete their tasks) and perform a Gradle sync ('Sync Project with Gradle Files').
If you still have the error after gradle sync, then set your ANDROID_HOME environment variable.
On macOS, once you know the location of the android SDK, open a terminal window and enter the following:
export ANDROID_HOME={YOUR_PATH}
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
source ~/.bash_profile

Resources