[SOLVED] Unable to locate GRUB on Android x86 - Android Q&A, Help & Troubleshooting

Hello everyone,
Glad to be here! This is my first time posting on the forum, I apologise in advance if I inadvertently break any rules.
I have installed Android x86 9.0_r2 in a virtual machine using the virt-manager application (QEMU/KVM connection) on Ubuntu 22.04, and I installed it using the ISO and manually selecting the OS as Android x86 9.0. Upon booting, I see a Trusted GRUB 1.1.5 menu and I am able to boot Android x86.
However, my resolution is stuck in 1024x768, and I have to manually edit the GRUB entry and add 'vga=914' after the kernel option to boot with a resolution of 1920x1080.
I read some forum posts stating that the GRUB boot options are located in either a 'menu.lst' file or an 'Android.cfg' file, so I opened the terminal emulator and ran the following commands to find these files in the root directory or sub directories. I also searched for the GRUB directory directly.
su
find / -iname menu.lst -type file -mindepth 100
find / -iname android.cfg -type file -mindepth 100
find / -iname grub -type directory -mindepth 100
However, these commands did not yield any results. So I decided to use grep to try and find the statements present in the boot commands in any of the files present in the system. I decided to search for the statement "root=/dev/ram0", so I ran the following commands to run grep recursively and print the filename where the given text occurs, ignoring errors and binary files:
su
grep --exclude-dir /proc -sIrl "root=/dev/ram0" /
This search took too long, so I narrowed my search to the term "ram0" and checked individual directories instead. However, there were no readable text files containing the boot menu configuration.
Am I making a mistake in any of these commands? Where is the GRUB configuration file located? Please feel free to ask for any additional information to troubleshoot this problem.
Thank you in advance for your help and have a nice day.

kb_android_x86 said:
Hello everyone,
Glad to be here! This is my first time posting on the forum, I apologise in advance if I inadvertently break any rules.
Click to expand...
Click to collapse
Hello and good morning, @kb_android_x86
Welcome to XDA. I hope you'll always get the support you require.
However, prior to your next posting please read the guidances that are stuck on top of every forum like
[Read Before Posting]QUESTIONS DO NOT BELONG IN GENERAL
Hello Everybody, In order to attempt to keep this forum neat and tidy the moderation team is asking you to post your questions into the Questions and Answers (Q&A) forum and not into the General section. You can find the Q&A forum by clicking...
forum.xda-developers.com
and the others. I've moved your thread to Android Q&A.
Thanks for your cooperation!
Regards
Oswald Boelcke
Senior Moderator

Hello everyone,
I have found the solution to this problem.
To access the GRUB configuration files, you must boot Android x86 in Debug mode, and then type the following commands into the terminal:
mount -o remount rw /mnt
cd /mnt/grub
vi menu.lst
Then you can edit the GRUB configuration permanently. I am unsure why these files are hidden when booting Android x86 normally, even when I browse the filesystem with root privileges enables.

Related

Help: how to program a command for android

Maybe the title is confusing. I hope to develop a binary command, placed under /system/bin, for example, called "tester".
when I use adb shell to execute, such as
test -call 911,
and the phone will make a call to 911.
Anyone could give me an idea where should I start?
Thanks.
You can do either
am start -a android.intent.action.DIAL -d tel:911
or
am start -a android.intent.action.CALL -d tel:911
The first one will only show the dialer with the number specified whereas the second will actually make the call.
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A

[Q&A] [GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies

Q&A for [GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies
Some developers prefer that questions remain separate from their main development thread to help keep things organized. Placing your question within this thread will increase its chances of being answered by a member of the community or by the developer.
Before posting, please use the forum search and read through the discussion thread for [GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies. If you can't find an answer, post it here, being sure to give as much information as possible (firmware version, steps to reproduce, logcat if available) so that you can get help.
Thanks for understanding and for helping to keep XDA neat and tidy!
[Request Linux GUIDE][ADB]Easiest How to use adb, logcat, etc for noobs and newbies
Setting up ADB
Pre Requirements:-
PC(This is a windows guide, if asked I will add linux and mac guide later)
Java Runtime environment or Java Developing kit
Your Device Drivers
An Android Device
Click to expand...
Click to collapse
Code:
http://forum.xda-developers.com/showthread.php?t=2141817
If no one has asked for a Linux Guide - I will now ...
If the Linux Guide does exist...please pass the link...
imstanz said:
If no one has asked for a Linux Guide - I will now ...
Click to expand...
Click to collapse
You didn't specify the type of your distribution , so I make a quick set of instructions applicable for most Linux distribution with minor modification for Debian based etc etc ...
Downloading special linux SDK, Eclipse , setting sdk/tools directory to linux's $PATH with echo and export command is not required for this method to gain the basic functions of adb.
- Download the attachment and extract it inside your Desktop.
- Open terminal and change your directory to desktop :
Code:
[email protected]_name:~$ cd Desktop
Go to ADB_install and copy my file into /bin , then give it proper permissions>>
Code:
[email protected]_name:~/Desktop$ cd ADB_install
Code:
[email protected]_name:~/Desktop/ADB_install$ sudo cp adb /usr/bin
Type your password when is needed after sudo command
Code:
[email protected]_name:~/Desktop/ADB_install$ sudo chmod +x /usr/bin/adb
Phone settings > developer > USB Debugging ticked .
Connect your phone via your usb cable and type in linux terminal :
Code:
[email protected]_name:~$sudo adb devices
after initial services being established you should see something like :
i,e:
Code:
List of devices attached
0123456789ABCDEF device
ADB installed end of the story ,,
Still got issue try Disconnect and reconnect your device and also needed to run below commands on terminal for start/kill the process
adb kill-server
and afterwards
adb start-server
Hope I did help You
My Device is not Showing in CMD
Hey My Device is not Showing in CMD. When I Type "adb devices", it says: List of Connected Devices or something Like this and below of this line.. there is nothing, no Device name, or serial Number. My Device is Micromax Canvas A74. Running on 4.2 Jellybean and I want block Installing Adware on my Smartphone causing unwanted downloads and popups.
Please Help Me.

How to remount Android 12 GSI system rw by terminal?

Devices: Samsung A125F and Samsung A8 Star
Terminal commands that have been run: mount -o rw,remount / (but reports read only)
Why does Android 9+ default Android root system ro and that hard to be remounted rw?
And what patches will be helpful for doing so when terminal fails?
This also makes build.prop and fstab prevented to be written
Hi @hd_scania you can try my SystemRW / SuperRW featuring MakeRW script. Also keep in mind I am working on brand new version which will be released very soon!
To make it work in Android 12 you can simply open the file systemrw.sh with text editor and comment out line number 415 by adding comment symbol ( # ) in front. It should look like this #sdkCheck. Now save file and run script as usual. Please show me your log afterwards. Thanks. Good luck!
Wait a second you are running Android 9 ? Please keep in mind my script was designed for Android 10 and later!
In Android 9 and earlier by default you should be able to remount your partitions as rw without any problems as long as your device is rooted.
I instead flashed the VNDK edition of the Lineage 19.x GSI (i.e. I’m running Android 12, system rw/ro is ultimately GSI dependent), and now system becomes RW
hd_scania said:
Devices: Samsung A125F and Samsung A8 Star
Terminal commands that have been run: mount -o rw,remount / (but reports read only)
Why does Android 9+ default Android root system ro and that hard to be remounted rw?
And what patches will be helpful for doing so when terminal fails?
This also makes build.prop and fstab prevented to be written
Click to expand...
Click to collapse
@hd_scania
Prior to your next posting please read the guidances that are stuck on top of every forum like
Note: Questions go in Q&A Forum
If you are posting a Question Thread post it in the Q&A forum. Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum...
forum.xda-developers.com
and the others. I've moved the thread to Android Q&A as it didn't qualify for development.
Thanks for your cooperation.
Regards
Oswald Boelcke
Senior Moderator

[CLOSED][Q] Where are /system/build.prop and /vendor/build.prop stored on the ADB shell side on Lineage 19.x GSI’s?

[Q] Where are /system/build.prop and /vendor/build.prop stored on the ADB shell side on Lineage 19.x GSI’s?
https://stackoverflow.com/questions/71506755 Where to find /system/build.prop and /vendor/build.prop from my ADB shell on Lineage 19.x? I checked every similar guides, but their corresponding Android API’s are always pre-Treble :( I forgot to add...
forum.xda-developers.com
Code:
My device is a Samsung A125F starting with 10
Where to find /system/build.prop and /vendor/build.prop from my ADB shell on Lineage 19.x?
I also checked everything inside the ADB shell, there isn’t even a single file named build.prop, then i have no access to the ROM, but only access to TWRP, ADB, and Fastboot, so how to correct /system/build.prop and /vendor/build.prop without explicitly seeing their existence?
I fianlly checked every similar guides, but their corresponding Android API’s were always pre-Treble
I forgot to add emulator from the line ro.build.characteristics, when add this line becomes,
Code:
ro.build.characteristics=tablet,emulator
And without emulator on this line my GSI ROM is dead, that’s an GSI requiring one of the characteristics to be an emulator to function
hd_scania said:
[Q] Where are /system/build.prop and /vendor/build.prop stored on the ADB shell side on Lineage 19.x GSI’s?
https://stackoverflow.com/questions/71506755 Where to find /system/build.prop and /vendor/build.prop from my ADB shell on Lineage 19.x? I checked every similar guides, but their corresponding Android API’s are always pre-Treble :( I forgot to add...
forum.xda-developers.com
Code:
My device is a Samsung A125F starting with 10
Where to find /system/build.prop and /vendor/build.prop from my ADB shell on Lineage 19.x?
I also checked everything inside the ADB shell, there isn’t even a single file named build.prop, then i have no access to the ROM, but only access to TWRP, ADB, and Fastboot, so how to correct /system/build.prop and /vendor/build.prop without explicitly seeing their existence?
I fianlly checked every similar guides, but their corresponding Android API’s were always pre-Treble
I forgot to add emulator from the line ro.build.characteristics, when add this line becomes,
Code:
ro.build.characteristics=tablet,emulator
And without emulator on this line my GSI ROM is dead, that’s an GSI requiring one of the characteristics to be an emulator to function
Click to expand...
Click to collapse
@hd_scania
Prior to your next posting please read the guidances that are stuck on top of every forum like
Note: Questions go in Q&A Forum
If you are posting a Question Thread post it in the Q&A forum. Technical discussion of Android development and hacking. No noobs, please. Device-specific releases should go under the appropriate device forum...
forum.xda-developers.com
I've moved the thread to Android Q&A but also closed this thread as it's a duplicate of the one you've linked at the top of your OP.
Please review the XDA Forum Rules with special emphasis on rule no. 5 and post only ONCE!
Thanks for your cooperation.
Regards
Oswald Boelcke
Senior Moderator

Android persistent script backdoor

Hi,
I am using msfvenom, on Kali, to embed a payload in an app.
When the app launches it starts the backdoor reverse_tcp service which connects to my session.
Once I have a meterpreter session I try to run a shell script, in the background, to constantly try and reconnect when/if the app closes.
This is a method suggested in may places, e.g. Android persistent script
All the examples I found refer to a stand-alone payload, not an embedded one.
To run the embedded service you need to use
Code:
am startservice --user 0 ...
After uploading my script to the android, I try and run my script on a meterpreter session line this:
Code:
>shell
>sh persistent.sh
>CTRL + C
>ENETR
For testing I created a simple running script
Code:
#!/bin/bash
for i in `seq 100`
do
echo $i
let j=$i-1
oldFile="xtest$j"
newFile="xtest$i"
#echo $oldFile
if [ -f "$oldFile" ]; then
rm $oldFile
fi
am startservice --user 0 by.dustteam.hangman/.lnyec.Mhxvk
touch $newFile
sleep 5
done
As long as the app is running, I see that the script is running, however when I close the app the script terminates.
I am testing on android 10.
Can I, and if yes how, generate a persistent script to keep trying to establish a connection, or do this in any other way?
I need to do this remotely of course, assuming I do not have physical access to the android device.
Thanks
dandan21 said:
Can I, and if yes how, generate a persistent script to keep trying to establish a connection, or do this in any other way?
Click to expand...
Click to collapse
@dandan21
Prior to your next posting please read the guidances that are stuck on top of every forum like
[ATTN] : Read before posting - Any questions posted here will be MOVED or CLOSED
Please read the below before posting. Any questions not development related will be moved or closed. Forum Searching | Posting | The Basics: (Make sure you've read them before starting a new thread) Forum Rules Forum Search Google Forum...
forum.xda-developers.com
and the others. Your thread doesn't qualify for a development section. I've moved the thread to Android Q&A.
Thanks for your cooperation.
Regards
Oswald Boelcke
Senior Moderator

Categories

Resources