1
00:00:00,400 --> 00:00:01,850
Hi again! In the next videos

2
00:00:01,900 --> 00:00:09,210
I'm very happy to show you how to make an AP Kay file out of the Python file that we already have.

3
00:00:09,510 --> 00:00:11,670
That we already built in the previous lectures.

4
00:00:12,160 --> 00:00:19,800
Now on APK file is a file that can be installed in Android phone so that the app is usable on mobile.

5
00:00:20,280 --> 00:00:22,500
Currently we only have a dot py file.

6
00:00:22,710 --> 00:00:23,640
So we have the dot,

7
00:00:23,760 --> 00:00:27,720
we have the main.py file and the design.kv file.

8
00:00:28,110 --> 00:00:32,460
And we also have a bunch of extra files such as this hoverable.py file.

9
00:00:33,000 --> 00:00:35,250
And this png files as well.

10
00:00:36,120 --> 00:00:39,480
And the database which is stored in the users.json file.

11
00:00:39,870 --> 00:00:46,620
So all these files will be bundled in one APK file. In order to make an APK file

12
00:00:46,890 --> 00:00:49,830
we need to use a library called Billdozer.

13
00:00:50,430 --> 00:00:54,210
It's a Python library which we can install with pip Anaconda.

14
00:00:54,840 --> 00:01:03,840
The problem is that making APK files on Windows or Mac operating systems, it's very hard not to say

15
00:01:03,840 --> 00:01:04,620
impossible.

16
00:01:04,740 --> 00:01:09,600
The best thing we can do is to use a Linux operating system such as Ubuntu.

17
00:01:11,190 --> 00:01:18,600
But I'm not going to ask you to wipe out your Windows operating system or your MAC Os and install

18
00:01:18,600 --> 00:01:19,710
Linux on your computer.

19
00:01:20,030 --> 00:01:27,030
No, we are going to use a virtual machine, which is the software that you can install on Mac OS or

20
00:01:27,030 --> 00:01:27,450
Windows.

21
00:01:27,810 --> 00:01:32,070
And inside that software, that software will behave like a computer.

22
00:01:32,370 --> 00:01:33,660
But it's a virtual computer.

23
00:01:33,660 --> 00:01:34,320
It's a software.

24
00:01:34,490 --> 00:01:39,990
So inside that software, you can install operating system such as Linux, Windows or Mac.

25
00:01:40,140 --> 00:01:44,570
So in this lecture, I'm going to show you how to install VirtualBox.

26
00:01:44,790 --> 00:01:47,950
This instalation is easy, whether you are on Windows or Mac.

27
00:01:48,540 --> 00:01:50,580
So just go to a virtualbox.org.

28
00:01:51,880 --> 00:01:56,830
And click on the download button and click in one of the links.

29
00:01:57,070 --> 00:02:02,440
So if you are on Windows, it means that the host operating system is the windows.

30
00:02:02,710 --> 00:02:04,390
So Windows will host

31
00:02:04,480 --> 00:02:07,000
the Ubuntu Linux system.

32
00:02:08,750 --> 00:02:13,870
I am currently on a Windows machine, so I'm going to click on Windows hosts, so that will give me

33
00:02:13,870 --> 00:02:18,580
the executable file or Virtual Box. Once the file downloads

34
00:02:19,750 --> 00:02:22,210
Go ahead and double click to install it.

35
00:02:27,570 --> 00:02:33,240
I don't want to shortcut on the desktop or on the quick launch bar, but feel free to leave those options

36
00:02:33,300 --> 00:02:33,960
as checked.

37
00:02:34,470 --> 00:02:35,080
Yes.

38
00:02:35,610 --> 00:02:38,010
We need internet in that virtual box.

39
00:02:38,040 --> 00:02:39,840
In that virtual machine.

40
00:02:40,090 --> 00:02:41,010
A virtual computer.

41
00:02:41,570 --> 00:02:42,300
So install.

42
00:02:49,590 --> 00:02:51,030
I'd go for install again.

43
00:02:55,670 --> 00:02:59,240
Finish and or Oracle Virtual Box will launch now.

44
00:02:59,270 --> 00:03:03,020
Expected it to take a while, and here it is.

45
00:03:03,410 --> 00:03:04,800
So the interface is quite simple.

46
00:03:04,820 --> 00:03:06,530
We have some buttons here.

47
00:03:06,770 --> 00:03:08,660
We are interested in the new button.

48
00:03:09,710 --> 00:03:14,240
But first, before I do that, you need to go to ubuntu.com.

49
00:03:16,170 --> 00:03:16,840
And download

50
00:03:17,100 --> 00:03:22,800
an Ubuntu operating system, so go to the download button, go to desktop.

51
00:03:23,190 --> 00:03:24,130
There are two versions

52
00:03:24,150 --> 00:03:24,470
now

53
00:03:24,490 --> 00:03:28,400
but this is the stable version, the one with green button.

54
00:03:28,770 --> 00:03:30,120
So I'm going to download that.

55
00:03:31,200 --> 00:03:35,280
Expect this to take a while because it's around two gigabytes.

56
00:03:35,490 --> 00:03:37,080
Yeah, that's quite a lot of data.

57
00:03:37,830 --> 00:03:45,600
Once you download that file, go again to Oracle Virtual Books and go to New, give a name.

58
00:03:46,440 --> 00:03:52,410
I'm going to call it Ubuntu, and you'll see that this dropdown lists are automatically updated.

59
00:03:52,650 --> 00:03:54,380
So you want to select a Linux here.

60
00:03:54,990 --> 00:04:00,170
We are installing a Linus operating system and Ubuntu 64 bit.

61
00:04:00,540 --> 00:04:03,630
That's at least what I downloaded from Ubuntu.com.

62
00:04:03,730 --> 00:04:04,150
That's cool.

63
00:04:04,230 --> 00:04:10,170
But your system will automatically detect the architecture of the program.

64
00:04:11,240 --> 00:04:15,390
So I'm going to click next. Now the memory size.

65
00:04:15,660 --> 00:04:23,700
This says that the recommended size is one gigabyte for 4 RAM, but I'll say you should go for higher,

66
00:04:24,630 --> 00:04:26,580
which is at least 4 gigabytes.

67
00:04:27,000 --> 00:04:32,610
If you don't have much RAM on your computer, on your physical computer, maybe you should go for

68
00:04:32,610 --> 00:04:36,570
less and see how Ubuntu will work with that much memory.

69
00:04:38,130 --> 00:04:39,270
But so this is the idea.

70
00:04:39,630 --> 00:04:46,320
3000 megabytes is the ram size on this Windows computer that I'm using and I'm giving four

71
00:04:46,320 --> 00:04:50,580
gigabytes to the virtual Linux computer.

72
00:04:51,180 --> 00:04:55,890
So that would be the maximum size four gigabytes of RAM for Linux.

73
00:04:56,340 --> 00:04:57,090
Click on next.

74
00:04:57,630 --> 00:04:58,380
Create a virtual

75
00:04:58,440 --> 00:05:01,350
hard disk now, create.

76
00:05:02,820 --> 00:05:03,970
You want a VDI.

77
00:05:03,970 --> 00:05:05,670
So click next.

78
00:05:06,330 --> 00:05:08,250
Dynamically allocated is fine.

79
00:05:09,450 --> 00:05:12,030
This again is up to you out.

80
00:05:12,080 --> 00:05:14,730
I would recommend 20 gigabytes.

81
00:05:14,760 --> 00:05:15,600
If you have them.

82
00:05:17,610 --> 00:05:21,120
So around 20 gigabytes but give it at least 10.

83
00:05:21,510 --> 00:05:26,550
Or if you don't have much space in your hard disk in your computer, then you should opt for less like

84
00:05:26,550 --> 00:05:33,180
five gigabytes and see how things work. Normally if you run out of space or out of RAM.

85
00:05:33,570 --> 00:05:40,230
You should get some Pop-Up Windows from Virtual Box telling you that the space is not enough.

86
00:05:40,440 --> 00:05:45,090
But the more space, the better. Click on create.

87
00:05:46,690 --> 00:05:50,010
And so now we have created a layer here.

88
00:05:50,340 --> 00:05:52,050
You want to go to start.

89
00:05:56,210 --> 00:05:59,360
And this will ask you to select a start up disk.

90
00:06:00,040 --> 00:06:08,450
And so you want to go to this folder here and then locate the ISO file that you downloaded from Ubuntu

91
00:06:08,450 --> 00:06:09,080
dot com.

92
00:06:11,280 --> 00:06:15,280
So that's one there. Click on start.

93
00:06:17,250 --> 00:06:19,980
Now, this window here is kind of small.

94
00:06:22,510 --> 00:06:30,710
But you can go to machine and settings, go to display and here in the scale factor

95
00:06:31,060 --> 00:06:34,090
you might want to increase this to 300 percent.

96
00:06:35,030 --> 00:06:35,780
Click on OK.

97
00:06:36,320 --> 00:06:38,590
And now you see the screen is a bit bigger.

98
00:06:39,520 --> 00:06:41,470
So this is the next screen that we got.

99
00:06:41,950 --> 00:06:44,200
You want to go to install Ubuntu.

100
00:06:47,280 --> 00:06:49,050
I'd go for English here and English

101
00:06:49,130 --> 00:06:50,760
there for the keyboard layout.

102
00:06:52,970 --> 00:06:54,500
These settings are fine.

103
00:06:57,360 --> 00:07:02,820
Then you want to select erase disk and install Ubuntu and that will simply delete all the reprograms

104
00:07:02,820 --> 00:07:05,580
your photos and your computer, everything you have you ever had.

105
00:07:06,060 --> 00:07:06,570
I'm just kidding.

106
00:07:07,740 --> 00:07:13,680
This is only about the programs you have inside of Virtual Box which we don't have any.

107
00:07:14,040 --> 00:07:19,710
So this would be the case if you were overwriting an existing operating system that you already had

108
00:07:19,740 --> 00:07:21,240
inside this virtual box.

109
00:07:21,540 --> 00:07:27,570
So it has nothing to do with your programs in your main operating system, which would be Windows or

110
00:07:28,080 --> 00:07:28,800
Mac OS.

111
00:07:29,390 --> 00:07:30,480
So just go to install now.

112
00:07:30,480 --> 00:07:35,340
Continue, select your time zone now.

113
00:07:37,820 --> 00:07:39,470
Select a name for the computer.

114
00:07:39,980 --> 00:07:44,180
I'd just go for logging automatically without providing a password.

115
00:07:44,240 --> 00:07:47,600
However, you need to choose a password.

116
00:07:51,730 --> 00:07:52,550
Click continue.

117
00:07:54,460 --> 00:07:58,640
And so that will take a while now until the files are installed.

118
00:07:58,850 --> 00:08:04,960
So onto Ubuntu is installed in this Virtual machine, in this Virtual Box.

119
00:08:10,430 --> 00:08:15,430
My installation was completed and the prompt is asking me to restart, so I'm going to click on 

120
00:08:15,430 --> 00:08:22,020
Restart Now that will restart the Linux operating system, not the host operating system, which is

121
00:08:22,050 --> 00:08:23,370
Windows in my case.

122
00:08:23,860 --> 00:08:29,470
So it's just restarting Ubuntu inside Virtual Box, there seems to be an error.

123
00:08:32,840 --> 00:08:36,440
I just pressed enter and things seems to be working.

124
00:08:40,820 --> 00:08:43,970
So this is Ubutu, if you want to see the start up guide.

125
00:08:45,480 --> 00:08:46,470
Just click on next.

126
00:08:48,330 --> 00:08:55,650
And done, now you might want to go to Oracle Virtual Box, so the Visual Box interface and then

127
00:08:55,650 --> 00:09:05,940
go to machine and settings and then go to General Advanced and you may want to enable this Shared Clipboard

128
00:09:05,970 --> 00:09:08,180
and drag and drop options.

129
00:09:08,430 --> 00:09:15,270
I set them as bi-directional, which means that you can copy files from your hosts operating system.

130
00:09:15,540 --> 00:09:20,040
So from Windows or Mac to Linux to Ubuntu and vice versa.

131
00:09:20,340 --> 00:09:22,980
However, I have noticed that this doesn't work.

132
00:09:28,410 --> 00:09:32,210
If you get this prompt, it means that there are some updates for Ubuntu.

133
00:09:32,850 --> 00:09:34,950
But I'm just going to close this window.

134
00:09:35,160 --> 00:09:41,040
So I would assume that the option of copy pasting files between the systems doesn't work.

135
00:09:41,460 --> 00:09:47,370
So I'm going to show you what you can do to get files from your Windows, from your host operating system

136
00:09:47,820 --> 00:09:51,300
to your Linux, to your Ubuntu operating system.

137
00:09:52,650 --> 00:10:00,750
So this is the folder where I have all the files that I need for this APK file for the mobile

138
00:10:00,990 --> 00:10:02,400
version of the program.

139
00:10:02,820 --> 00:10:04,780
So it's everything we went through

140
00:10:04,800 --> 00:10:10,800
plus this Kivy buildozer installer sh file.

141
00:10:11,070 --> 00:10:16,950
This is a file that you can download from the resources and I'm going to show you what that file is

142
00:10:16,950 --> 00:10:17,250
for.

143
00:10:18,090 --> 00:10:20,410
For now, I'm just going to use Dropbox.

144
00:10:20,640 --> 00:10:25,350
So I have the project files already in my Dropbox on Windows.

145
00:10:26,610 --> 00:10:29,100
So the folder is this one here.

146
00:10:29,790 --> 00:10:30,300
Teaching.

147
00:10:30,570 --> 00:10:32,160
Teaching has all the files.

148
00:10:33,430 --> 00:10:33,660
All right.

149
00:10:34,320 --> 00:10:35,190
So I'm going to.

150
00:10:36,810 --> 00:10:37,110
Right

151
00:10:37,110 --> 00:10:39,600
Click and copy Dropbox Link.

152
00:10:40,080 --> 00:10:41,250
So this is on Windows.

153
00:10:41,310 --> 00:10:42,350
It's not on Linux.

154
00:10:42,570 --> 00:10:43,980
It's outside Virtual Box.

155
00:10:44,730 --> 00:10:49,800
Another way to do this would be to use this service.

156
00:10:49,830 --> 00:10:50,560
Gofile.io.

157
00:10:50,740 --> 00:10:56,640
That allows you to upload a file and that will give you a link.

158
00:10:56,970 --> 00:10:57,940
And so that the link

159
00:10:58,050 --> 00:10:58,860
you can use.

160
00:10:58,950 --> 00:11:03,290
You can put that link inside the Linux because there is a browser there.

161
00:11:03,390 --> 00:11:05,100
You have Firefox inside of Linux.

162
00:11:08,500 --> 00:11:13,900
But since we can not copy and paste, we're going to have to manually type that link.

163
00:11:14,230 --> 00:11:24,000
So in my case, I'm going to use Dropbox and I'm going to use bitly.com to shorten the URL

164
00:11:24,100 --> 00:11:25,570
that I created.

165
00:11:30,030 --> 00:11:31,530
So that's the URL there.

166
00:11:37,670 --> 00:11:41,550
And enter, that's your URL in the browser of your Linux operating system.

167
00:11:44,870 --> 00:11:50,410
If you don't want to go through this file sharing, you can just use this URL to get my files

168
00:11:50,600 --> 00:11:56,630
so you can download the files directly from your Linux system using the browser.

169
00:12:01,690 --> 00:12:04,180
Go to more direct download.

170
00:12:07,840 --> 00:12:10,600
Save file, okay.

171
00:12:11,840 --> 00:12:18,650
The files should have now been downloaded and you can find them in the Files, Downloads.

172
00:12:19,940 --> 00:12:20,190
Right

173
00:12:20,190 --> 00:12:21,780
click on the downloaded zip file.

174
00:12:22,460 --> 00:12:24,360
Go to Extract to.

175
00:12:25,290 --> 00:12:32,220
You want to select the Desktop, but click on this New Folder icon there to create a folder, let's

176
00:12:32,220 --> 00:12:37,320
say project1, create and select.

177
00:12:39,580 --> 00:12:45,970
So now we see this project, one folder here and there is the teaching folder inside.

178
00:12:46,900 --> 00:12:48,370
And these are the files.

179
00:12:49,120 --> 00:12:50,770
So let's end this video here.

180
00:12:50,860 --> 00:12:58,360
This was how to install Virtual Box and how to set up Linux inside Visual Box and how to get the files

181
00:12:58,390 --> 00:13:00,220
inside that Linux operating system.

182
00:13:00,430 --> 00:13:07,480
So now we are ready to create a mobile executable file that will run on Android.

183
00:13:08,260 --> 00:13:09,700
So let's do that in the next video.

