Using Virtualbox on Linux Mint to load a custom ROM onto an Android Tablet

Questions about virtualization software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
tkocou
Level 2
Level 2
Posts: 82
Joined: Mon Jul 30, 2012 6:25 pm

Using Virtualbox on Linux Mint to load a custom ROM onto an Android Tablet

Post by tkocou »

I purchased a Samsung Galaxy Tab S2 Android tablet and became disgusted with the bloatware from Samsung. So, I embarked on a mission to replace the existing Samsung version of Android with a leaner version. After many searches on the DuckDuckGo search engine, I came up with 2 possibilities - either load Odin software on a Windows computer or use the latest version of Fedora Linux. I'm not about to give up my Linux Mint, so VirtualBox to the rescue. Unfortunately, the VirtualBox apps in the Linux Mint repository are too old for my purpose, so I downloaded the latest versions of VirtualBox, VirtualBox Extensions (for advanced USB support) and VirtualBox Guest iso for all the nice tweaks to the guest VM.
http://download.virtualbox.org/virtualbox/5.1.14/ (as of this writing)

The latest version of Fedora Linux Workstation https://getfedora.org/en/workstation/ was downloaded from the Fedora site and then loaded into a new VM.

I set up a shared folder https://help.ubuntu.com/community/Virtu ... redFolders and activated the USB support viewtopic.php?f=231&t=222144&p=1168345& ... d#p1168345

I then searched for the latest recovery ROM https://twrp.me/Devices/ (I recommend the version 3.0.2 image) and custom ROM https://www.androidfilehost.com/?w=devices&page=1 for my tablet. The recovery ROM may come as an archived file. Use the Archive Manager program to unpack the file.

With the files on my Linux Mint host, i copied the TWRP image to the shared folder as that image will be installed on to the tablet first. The tablet has a removable micro-SD card. The micro-SD card was removed, the custom ROM image was copied from Linux Mint to the micro-SD card using a USB adapter for micro-SD cards. Depending on the size of the image, copying the file can take upwards of 15-20 minutes. I use the gkrellm app from the Linux Mint repository to keep track of the state of the file transfer.

To install the VirtualBox Extensions file, simply right click on the file and select the top line labeled "Open with Oracle Vm VirtualBox".

The Fedora Linux VM settings had the optical drive pointed to the VirtualBox Guest iso image and the VM was started.

After installing the Guest Additions, I tested the USB support by plugging in the tablet to my Linux Mint host. If everything is properly configured, when you click on the Devices menu at the top of the VM window, the tablet should appear in the list of USB devices. Then I checked the shared folder accessabliity. You should see the TWRP recovery ROM image which was copied to the shared folder on the Linux Mint host. If neither (or one) of these options are not working, most likely the permissions are not correct (or did you forget to re-install the SD card?). Please remember that this situation is Linux running on top of Linux, so don't forget to check the permissions of the guest VM as well as the host.

Once I had these two options working in the Fedora Linux VM, I loaded heimdall from the Fedora repository. The tablet was disconnected from the Linux Mint host and placed into ODIN mode http://www.technewscentral.co.uk/enter- ... s3/id_7924. The article references a Samsung phone, but the same key combination work on the tablet.

With the tablet set into ODIN mode, I plugged the tablet into the Linux Mint host. Opening up the VirtualBox Manager program, I selected the Fedora VM settings, opened the USB menu, clicked on the USB symbol with the plus sign (rightmost colum of the menu) and checkmarked the SAMSUNG Gadget Serial device. With this device added to the VM, the VM will automatically mount a tablet which has been placed into ODIN mode simplifying the ability to talk to the hardware. Feel free to reboot the VM.

To reboot a Samsung tablet from ODIN mode, use POWER, VOLUME UP and VOLUME DOWN buttons and hold down the buttons until the screen goes blank.

Installing the recovery ROM from the shared folder using heimdall was a simple matter of following these instructions: https://github.com/Benjamin-Dobell/Heimdall/issues/209 - "Ctrl-F" and search on "Fedora". You are looking for the post on Jun 26, 2015. (3rd match)

Once the recovery ROM is installed, simply reboot into the recovery mode and load your custom ROM. Here are some general purpose instructions on using the recovery TWRP ROM: http://www.androidtipsandhacks.com/root ... n-android/

Tips:
When attempting to install a custom ROM, if the recovery mode ROM tells you something like "E:failed to verify whole-file signature", the error message is telling you that the custom ROM which you selected was not meant for the Android device which you have.

Due to copyright issues, many custom ROMs do not include the basic Android apps. So you probably will need to download the Gapps archive for your version of ROM: http://www.teamandroid.com/gapps/ Use the recovery mode to load the Gapps archive after you have installed the custom ROM.

Have fun getting rid of bloatware on Android devices. :D
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 21.1 Cinnamon
Locked

Return to “Virtual Machines”