element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RIoTboard
  • Products
  • Dev Tools
  • Single-Board Computers
  • RIoTboard
  • More
  • Cancel
RIoTboard
Blog Rooting Android for the RIoTBoard
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RIoTboard to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: radiatortwo
  • Date Created: 24 May 2014 1:38 PM Date Created
  • Views 2640 views
  • Likes 1 like
  • Comments 10 comments
  • android
  • riotboard
  • root
Related
Recommended

Rooting Android for the RIoTBoard

radiatortwo
radiatortwo
24 May 2014

I´m not an Android developer. I´m using my RIoTBoard mainly with a Debian Linux distribution.

but because I am rooting all of my Android devices, I thought why not root the RIoTBoard as well. Just for fun.

It´s still an Android development board however and someone might need it.

 

And boy was that a journey. But I made it and here is how I did it.

(This was tested with the Downloadable Image you get here at Element14 and also with the image compiled with development configuration with build-type "eng")

 

What you need before you can start:

I´m assuming since you´re using the RIoTBoard as a development platform, that you have the Android SDK installed and adb is configured.

If not. Well you don´t need to download the whole SDK. When using Windows you can use the "15 seconds adb installer" from a thread at XDA Developers. (Google it)

It also has the needed drivers integrated. Just choose yes when asked to install it. Also I suggest to install adb and fastboot globally when asked.

Also don´t forget to activate USB debugging inside the Android Developer Options. (Look here at part 2 and 3 on how to do that. How to Install Netflix Streaming on the RIoTBoard)

 

Next thing needed is the zip file attached to this blog post.

Inside the zip file are the scripts, the su binary and a SuperSu.apk. I tried using SuperUser but i only got it working with this version of SuperSu.

Also i integrated a terminal app to test root in the end.

Extract all the files into a folder.

 

Also you´ll need a connection to the UART serial port with putty or similar.

 

Now let´s start this.

Open a cmd window inside the folder you extracted the files to and execute the following commands.

 

adb push su /data/local/tmp
adb push SuperSu.apk /data/local/tmp
adb push 99SuperSUDaemon /data/local/tmp
adb push install-recovery.sh /data/local/tmp
adb install terminal.apk

 

Installing the terminal app is optional. But with that you can test if root is working.

 

Next switch to your UART connection terminal and execute the following commands.

(You have to be root to execute the commands. So look if you are connected as root@riot_6solo)

 

mount -w -o remount /dev/block/mmcblk0p5 /system

mkdir /system/etc/init.d
mkdir /system/bin/.ext

cp /data/local/tmp/su /system/bin/.ext/.su
cp /data/local/tmp/su /system/xbin/daemonsu
cp /data/local/tmp/su /system/xbin/su
cp /data/local/tmp/SuperSu.apk /system/app/SuperSu.apk
cp /data/local/tmp/99SuperSUDaemon /system/etc/init.d/99SuperSUDaemon
cp /data/local/tmp/install-recovery.sh /system/etc/install-recovery.sh
echo 1 > /system/etc/.installed_su_daemon

chmod 0777 /system/bin/.ext
chmod 06755 /system/bin/.ext/.su
chmod 06755 /system/xbin/su
chmod 0755 /system/xbin/daemonsu
chmod 0755 /system/etc/install-recovery.sh
chmod 0755 /system/etc/init.d/99SuperSUDaemon
chmod 0644 /system/app/SuperSu.apk
chmod 0644 /system/etc/.installed_su_daemon

 

What does all this stuff do?

Well it remounts the system partition so you can write to it.

After that it creates two folders and copies all the files needed into the right folders.

The su binary will be copied 3 times. One as execution file, one to run as a daemon, and one as some sort of backup inside the bin folder if the app won´t search for it in the xbin folder.

The two script files are only needed to execute the SuperSu daemon from the su binary.

And in the end the permissions are set, so the scripts and files are accessible in Android.

 

Now you need to restart the board. You can just type the "reboot" command to do this.

 

When Android starts again, open the terminal emulator from the apps.

Then just type the command "su" and press enter.

 

You should get a SuperSu question to grant the terminal app access to root.

Tap on Grant and there you go.

You are root inside Android.

 

image

Attachments:
RIoTBoard_root.zip
  • Sign in to reply

Top Comments

  • radiatortwo
    radiatortwo over 11 years ago in reply to toonamo +2
    Make sure you remounted the system partition with write permissions before changing the permissions of the files. mount -w -o remount /dev/block/mmcblk0p5 /system The permissions should look like this…
Parents
  • toonamo
    toonamo over 11 years ago

    after following the instructions i get

    u0_a40@riot_6solo:/ $ su

    /system/bin/sh: su: can't execute: Permission denied

     

    permissions are:

    root@riot_6solo:/system/bin/.ext # ls -l .su

    -rw------- root     root       104800 2014-08-05 17:07 .su

     

    130|root@riot_6solo:/system/bin/.ext # ls -l /system/xbin/daemonsu

    -rw------- root     root       104800 2014-08-05 17:07 daemonsu

     

    root@riot_6solo:/system/bin/.ext # ls -l /system/xbin/su

    -rw------- root     root       104800 2014-08-05 17:07 su

     

    any thoughts on to a piece i am missing?

     

    Android 4.3

    3.0.35-06429-g55e239f

    Build 1.0.0-rc2

     

    update: tried to change permissions to 755. doesn't seem to help

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • radiatortwo
    radiatortwo over 11 years ago in reply to toonamo

    Make sure you remounted the system partition with write permissions before changing the permissions of the files.

    mount -w -o remount /dev/block/mmcblk0p5 /system

     

    The permissions should look like this:

     

    /system/bin/.ext
    -rwxrwxrwx 1 root root
    
    /system/bin/.ext/.su
    /system/xbin/su
    -rwsr-sr-x 1 root root
    
    /system/xbin/daemonsu  
    /system/etc/install-recovery.sh  
    /system/etc/init.d/99SuperSUDaemon
    -rwxr-xr-x 1 root root
    
    /system/app/SuperSu.apk  
    /system/etc/.installed_su_daemon
    -rw-r--r-- 1 root root

     


    If you can´t set permissions on the files then you don´t have permissions to do that.

    Normally if you´re root and the partition is remounted with write permissions it should work though.


    Also you should set the permissions of "/system/bin/.ext/.su" and "/system/xbin/su" to 06755 not 0755.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Comment
  • radiatortwo
    radiatortwo over 11 years ago in reply to toonamo

    Make sure you remounted the system partition with write permissions before changing the permissions of the files.

    mount -w -o remount /dev/block/mmcblk0p5 /system

     

    The permissions should look like this:

     

    /system/bin/.ext
    -rwxrwxrwx 1 root root
    
    /system/bin/.ext/.su
    /system/xbin/su
    -rwsr-sr-x 1 root root
    
    /system/xbin/daemonsu  
    /system/etc/install-recovery.sh  
    /system/etc/init.d/99SuperSUDaemon
    -rwxr-xr-x 1 root root
    
    /system/app/SuperSu.apk  
    /system/etc/.installed_su_daemon
    -rw-r--r-- 1 root root

     


    If you can´t set permissions on the files then you don´t have permissions to do that.

    Normally if you´re root and the partition is remounted with write permissions it should work though.


    Also you should set the permissions of "/system/bin/.ext/.su" and "/system/xbin/su" to 06755 not 0755.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • More
    • Cancel
Children
  • toonamo
    toonamo over 11 years ago in reply to radiatortwo

    those permissions were the trick. I can now su from the terminal emulator

     

    the first time (after reboot when the correct permissions were applied), the terminal emulator locked up after displaying ...

    init: untracked pid 3588 exited

    init: untracked pid 3662 exited

    init: untracked pid 3658 exited

    (that was from the debug terminal not the terminal emulator)

     

    However i reboot once more and everything appears to be working. I now have a SuperSU app in my applications that allows me to configure su access to the terminal emulator.

     

    Thank you for all your help!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • radiatortwo
    radiatortwo over 11 years ago in reply to toonamo

    I get this messages with "init:untracked pid xxxx exited" on the UART connection too.

    But then I just press Enter and I can go on.

    Seems to be normal messages on the serial port.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mrpipes3
    mrpipes3 over 7 years ago in reply to radiatortwo

    Can you use GooglePlay with the image provided by Element14? admin@

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube