Resize system and install GAPPS with android6 image.

Discuss Android on the Wandboard, as well as app development for or on the Wandboard.

Resize system and install GAPPS with android6 image.

Postby freed » Sun Mar 26, 2017 8:52 pm

The flashcard script from the README.pdf does not work for me. Since I could not find a matching sfdisk.

But the easiest way is to "dd" the following image.
Download the image from here:
http://download.wandboard.org/wandboard ... 160428.zip

A) Create bootable sd-card
Dump image to the sd-card.
Take care to select the proper device. In general /dev/sd[a..z] is your sd-card. Here I write "/dev/sdX" rename this to your sd-card device.
Code: Select all
dd if=wandboard-all-android-6.0.1-sdcard-20160428.zip of=/dev/sdX bs=4M

Unfortunately the system partition of the image is too small to install the GAPPS. So this is what I did:

B) Backup
Once the image is on the sd-card, backup all partitions.
Code: Select all
sudo dd if=/dev/sdX1 of=wb6_p1_boot.img bs=4k     # not needed later on, but to be sure
sudo dd if=/dev/sdX2 of=wb6_p2_recover.img bs=4k # not needed later on, but to be sure
sudo dd if=/dev/sdX4 of=wb6_p4_data.img bs=4k
sudo dd if=/dev/sdX5 of=wb6_p5_system.img bs=4k
sudo dd if=/dev/sdX6 of=wb6_p6_cache.img bs=4k
sudo dd if=/dev/sdX7 of=wb6_p7_device.img bs=4k


C) Repartition
For the next step you need to be familiar with a tool like fdisk or (g)parted:
1. Than delete all partitions except of p1(boot), p2(recovery) and the extended.
2. Enlarge the extended partitions to at least 2GB.
3. Create a new ext4 primary partition and label the partition data from the end of the extended partition of the end of your sd-card.
4. Create a new ext4 logical partition and label the partition system. The size should be at least 1GB better 2GB.
5. Create a new ext4 logical partition and label the partition cache. The size should be at least 512MB better 1GB.
6. Create a new ext4 logical partition and label the partition device. The size should be at least 16MB.

D) Write back the backup images:
Code: Select all
sudo dd of=/dev/sdX4 if=wb6_p4_data.img bs=4k
sudo dd of=/dev/sdX5 if=wb6_p5_system.img bs=4k
sudo dd of=/dev/sdX6 if=wb6_p6_cache.img bs=4k
sudo dd of=/dev/sdX7 if=wb6_p7_device.img bs=4k


E) Resize the file system to the maximum of the partition:
Code: Select all
sudo resize2fs -p /dev/sdd4
sudo resize2fs -p /dev/sdd5
sudo resize2fs -p /dev/sdd6
sudo resize2fs -p /dev/sdd7


F) Download the open gapps, from here:
http://opengapps.org
Select arm, android 6, pico

G) Extract the gapps and copy the files into the system partition (p5) of your sd-card.
Change the name of the downloaded gapps tar archive file. Install lzip if not already installed. Call the extract_gapps.sh script.
Copy the extraced files to the sd-card.
Code: Select all
cd gapps/sys
cp -arv * /media/YOURUSER/system

Remove no longer used PacketInstaller
Code: Select all
rm -rf /media/YOURUSER/system/priv-app/PackageInstaller


H) First boot
Insert the sd-card and boot your wandboard.
You will see some failures that the Setup and PlayStore could bot be loaded. Do not care go ahead with the next step to set the permissions.

I) Fix permissions
Since the adb via TCP is not enabled you have to connect to the serial port of your wandboard /dev/ttyXXX, 115400,8,n,1
Code: Select all
pm grant com.google.android.gms android.permission.ACCESS_COARSE_LOCATION
pm grant com.google.android.gms android.permission.ACCESS_FINE_LOCATION
pm grant com.google.android.setupwizard android.permission.READ_PHONE_STATE
pm grant com.google.android.setupwizard android.permission.READ_CONTACTS
Attachments
extract_gapps.sh
(1.28 KiB) Downloaded 10 times
freed
 
Posts: 1
Joined: Sun Mar 26, 2017 6:46 pm

Return to Software - Android

Who is online

Users browsing this forum: Baidu [Spider] and 15 guests

cron