FORUMS
Remove All Ads from XDA

Android Studio with root and Google Play (or even OpenGApps). Not possible?

2 posts
Thanks Meter: 0
 
By altjx, Junior Member on 27th June 2019, 04:44 PM
Post Reply Email Thread
HI guys, I have spent the past week going through hell and back trying to get an Android image to support Google Play. Installing an image using a Google API image in Android Studio is the easy part, but now I cannot get OpenGApps to install and stay installed. Last week I was able to get it working for some time, but now when I start my image, Google Play is no longer installed, so now I'm back in square one. Of course using an image with Google Play already doesn't allow me to establish root with
Code:
adb root
, so I've learned (from research at least) to just use Google API image..

I ran into a bash script on GitHub, named opengapps_installer.sh (can't post external links yet), last week when trying to go through this process, and here's what I'm facing. Part of the instructions have you copy over a system image from "${ANDROID_HOME}/${IMAGE_SYSDIR}/system.img" over to "${HOME}/.android/avd/${AVD}.avd/system.img", where $ANDROID_HOME is /Users/myuser/Library/Android/sdk, $IMAGE_SYSDIR is system-images/android-28/google_apis/x86/, and $AVD is Pixel_2_API_28, so the full command looks like this:

Code:
cp "/Users/myuser/Library/Android/sdk/system-images/android-28/google_apis/x86/system.img" "~/.android/avd/Pixel_2_API_28.avd/system.img"
and
Code:
cp "/Users/myuser/Library/Android/sdk/system-images/android-28/google_apis/x86/encryptionkey.img" "~/.android/avd/${AVD}.avd/encryptionkey.img"
While this part works just fine, the next part doesn't, which requires me to use e2fsck, which presents me with the following error:

Code:
$ "${ANDROID_HOME}/emulator/bin64/e2fsck" "${HOME}/.android/avd/${AVD}.avd/system.img"                     8:30AM/06.27
e2fsck 1.42.13 (17-May-2015)
ext2fs_open2: Bad magic number in super-block
/Users/myuser/Library/Android/sdk/emulator/bin64/e2fsck: Superblock invalid, trying backup blocks...
/Users/myuser/Library/Android/sdk/emulator/bin64/e2fsck: Bad magic number in super-block while trying to open /Users/myuser/.android/avd/Pixel_2_API_28.avd/system.img

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>
I have absolutely no idea why I'm getting this error and cannot find anything online to help explain what this means and what I need to do to resolve it. I feel like there should be a much easier way to get an Android image with Google Play and root access in an emulator, but I have not had much luck in the past week.

Any help would be greatly appreciated. Thank!
 
 
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes