[Tutorial] How to run Android projects from plain ARM linux, whitout installing Android (including startup scripts) by ivanviso

View this thread on steempeak.com
· @ivanviso ·
$21.40
[Tutorial] How to run Android projects from plain ARM linux, whitout installing Android (including startup scripts)
http://boincoid.sourceforge.net/boincoid%20banner.jpg

While everything done can be perfectly done in a dev board, it will probably save headaches doing it on a x86 computer.

The first thing we will need for this is an android system suitable for our system. this will work just right : 

https://www.odroid.in/mirror/dn.odroid.com/S905/Android/ODROID-C2/daily-odroidc2-eng-s905_6.0.1_master-92-v4.0.tar.gz . 

We download it and extract it. 

Now we need to uncompress the android system image. Fortunately, we have a tool for that, unfortunately, it is not on the repositories of many distributions. Ubuntu and Debian have one, Archlinux has it on the AUR, and for the rest of them you have this git repository : https://github.com/anestisb/android-simg2img

Once we have it ready we can apply it to our rootsystem.img, running it as : simg2img rootsystem.img rootsystem.ext4 . And now we can access it's data, as it's just a regular loop device. 

So we create a directory  : mkdir androidimg 

And we mount it : mount -t ext4 -o loop rootsystem.ext4 androidimg

We do now need to copy these files to our dev board, so just plug any pen drive, sd and copy those files from the folder to it. 

Assuming you have already copied that folder to your dev board and are now operating from it . 

What it's now needed it's to create a chroot script.  

So we create a file called setup-chroot.sh and we add these lines : 

cd androidimg/
mount -o /etc/resolv.conf etc/resolv.conf
mount -t proc /proc proc/
mount --rbind /sys sys/
mount --rbind /dev dev/

and we move it to /usr/local/bin

Now we move on installing the android version of boinc. You could cross compile it yourself, but the easiest way its to download it from this link : https://boinc.berkeley.edu/dl/boinc_7.4.53.apk 

And we extract it with unzip boinc_7.4.53.apk . And we pick the executables from arm64-v8a and we move them to androidimg/boinc .

We could now run it without problem, but it would be a lot more comfortable to automate it on boot. 

So we go to /usr/lib/systemd/system/ 

and we create the file chroot-boinc.service

[Unit]
Description=chroot boinc service

[Service]
RootDirectory=/androidimg
ExecStartPre=/usr/local/bin/setup-chroot.sh
ExecStart=/boinc/boinc
RootDirectoryStartOnly=yes

So it will chroot into it every time it boots, and starts the boinc client. 


To control the boinc client we will need to use boinccmd in the directory.  So we do

chroot /androidimg 

cd boinc

and now we can run boinccmd to pass the commands that we wish.

What most people will want is to synchronize with grcpool. 

boinccmd --join_acct_mgr grcpool.com username password

(add the projects in grcpool.com) 

boinccmd --quit_acct_mgr

boinccmd --join_acct_mgr grcpool.com username password 

for not having to wait for it to synchronize. 



Ask me any question you have.
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 119 others
properties (23)
post_id44,811,535
authorivanviso
permlinktutorial-how-to-run-android-projects-from-plain-arm-linux-whitout-installing-android-including-startup-scripts
categorygridcoin
json_metadata"{"links": ["https://www.odroid.in/mirror/dn.odroid.com/S905/Android/ODROID-C2/daily-odroidc2-eng-s905_6.0.1_master-92-v4.0.tar.gz", "https://github.com/anestisb/android-simg2img", "https://boinc.berkeley.edu/dl/boinc_7.4.53.apk"], "format": "markdown", "app": "steemit/0.1", "image": ["http://boincoid.sourceforge.net/boincoid%20banner.jpg"], "tags": ["gridcoin", "boinc", "android", "linux", "cryptocurrencies"]}"
created2018-04-22 09:52:45
last_update2018-04-22 09:52:45
depth0
children6
net_rshares3,210,727,272,345
last_payout2018-04-29 09:52:45
cashout_time1969-12-31 23:59:59
total_payout_value16.628 SBD
curator_payout_value4.767 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length2,848
author_reputation447,827,863,050
root_title"[Tutorial] How to run Android projects from plain ARM linux, whitout installing Android (including startup scripts)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (183)
@tomasbrod ·
$0.10
Wow, don't even need to mess with app_info files!
👍  ,
properties (23)
post_id44,813,451
authortomasbrod
permlinkre-ivanviso-tutorial-how-to-run-android-projects-from-plain-arm-linux-whitout-installing-android-including-startup-scripts-20180422t100953016z
categorygridcoin
json_metadata"{"app": "steemit/0.1", "tags": ["gridcoin"]}"
created2018-04-22 10:09:54
last_update2018-04-22 10:09:54
depth1
children0
net_rshares15,782,245,982
last_payout2018-04-29 10:09:54
cashout_time1969-12-31 23:59:59
total_payout_value0.084 SBD
curator_payout_value0.020 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length49
author_reputation868,738,140,464
root_title"[Tutorial] How to run Android projects from plain ARM linux, whitout installing Android (including startup scripts)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (2)
@jamezz ·
$0.04
You can solo you know , guides that seem to push people to use grcpool do not exist nor get created I guess..
👍  
properties (23)
post_id44,866,065
authorjamezz
permlinkre-ivanviso-tutorial-how-to-run-android-projects-from-plain-arm-linux-whitout-installing-android-including-startup-scripts-20180422t170126257z
categorygridcoin
json_metadata"{"app": "steemit/0.1", "tags": ["gridcoin"]}"
created2018-04-22 17:01:30
last_update2018-04-22 17:01:30
depth1
children1
net_rshares7,131,474,936
last_payout2018-04-29 17:01:30
cashout_time1969-12-31 23:59:59
total_payout_value0.036 SBD
curator_payout_value0.008 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length109
author_reputation-96,976,535,910
root_title"[Tutorial] How to run Android projects from plain ARM linux, whitout installing Android (including startup scripts)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@ivanviso ·
Yes im aware, but you have to understand that if someone doesnt know how to use boinccmd, they dont know how to solo crunch.
👍  
properties (23)
post_id44,877,224
authorivanviso
permlinkre-jamezz-re-ivanviso-tutorial-how-to-run-android-projects-from-plain-arm-linux-whitout-installing-android-including-startup-scripts-20180422t183228934z
categorygridcoin
json_metadata"{"app": "steemit/0.1", "tags": ["gridcoin"]}"
created2018-04-22 18:32:30
last_update2018-04-22 18:32:30
depth2
children0
net_rshares90,966,900
last_payout2018-04-29 18:32:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length124
author_reputation447,827,863,050
root_title"[Tutorial] How to run Android projects from plain ARM linux, whitout installing Android (including startup scripts)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@coltwlf ·
Hi, I vanviso very interesting tutorial. Although, I think you are assuming that anyone how follows it is very familiar with Linux systems. But, what about those new people who want to get into mining and do not know anything about Linux or android. There are some parts where you use the word "files" and you do not mention the name of the files. In the fifth paragraph you say "Now we need to uncompress the android system image. Fortunately, we have a tool for that" it would be very helpful to have the names of the tools and the commands to retrieve and the commands to use the tool. Always remember when you are doing a tutorial that not everyone is an advance user. Especially if you are the first person writing a tutorial on the topic, you want to give as much information as possible.
👍  
properties (23)
post_id44,877,870
authorcoltwlf
permlinkre-ivanviso-tutorial-how-to-run-android-projects-from-plain-arm-linux-whitout-installing-android-including-startup-scripts-20180422t183823907z
categorygridcoin
json_metadata"{"app": "steemit/0.1", "tags": ["gridcoin"]}"
created2018-04-22 18:38:24
last_update2018-04-22 18:38:24
depth1
children2
net_rshares590,887,815
last_payout2018-04-29 18:38:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length794
author_reputation3,715,352,290
root_title"[Tutorial] How to run Android projects from plain ARM linux, whitout installing Android (including startup scripts)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@ivanviso ·
$0.06
Yea. Honestly, i didn't expect it to get this level of attention, just wanted to infodump and go away. Will work on it harder with better formating, photos and possibly a direct link to a android tarball, skips a few steps.
👍  , ,
properties (23)
post_id44,878,457
authorivanviso
permlinkre-coltwlf-re-ivanviso-tutorial-how-to-run-android-projects-from-plain-arm-linux-whitout-installing-android-including-startup-scripts-20180422t184352644z
categorygridcoin
json_metadata"{"app": "steemit/0.1", "tags": ["gridcoin"]}"
created2018-04-22 18:43:54
last_update2018-04-22 18:43:54
depth2
children1
net_rshares9,321,271,257
last_payout2018-04-29 18:43:54
cashout_time1969-12-31 23:59:59
total_payout_value0.052 SBD
curator_payout_value0.008 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length223
author_reputation447,827,863,050
root_title"[Tutorial] How to run Android projects from plain ARM linux, whitout installing Android (including startup scripts)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (3)
@coltwlf ·
awesome. good info.
properties (22)
post_id44,882,054
authorcoltwlf
permlinkre-ivanviso-re-coltwlf-re-ivanviso-tutorial-how-to-run-android-projects-from-plain-arm-linux-whitout-installing-android-including-startup-scripts-20180422t191550378z
categorygridcoin
json_metadata"{"app": "steemit/0.1", "tags": ["gridcoin"]}"
created2018-04-22 19:15:51
last_update2018-04-22 19:15:51
depth3
children0
net_rshares0
last_payout2018-04-29 19:15:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length19
author_reputation3,715,352,290
root_title"[Tutorial] How to run Android projects from plain ARM linux, whitout installing Android (including startup scripts)"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000