Xiaomi MIUI Official Forum

Moderator

My Brain... Trembles!!!

Rank: 7Rank: 7Rank: 7

Credits
21684
Device
Mi 5
MIUI Version
7.6.8
Online time
634 Hours
Send PM

Mi BoxMi In-Ear HeadphonesMi KeyMi BandXiaomi 6 LaunchI Love MIUIMIUI 6MIUI 2015Fantastic!FlashholicAwesome!MIUI 7MIUI 8Mi 3Mi NoteRooster Year of 2017MIUI HalloweenMIUI Fan from MalaysiaMIUI Fan From PhilippinesHappy Singles' DayMIUI Fan From Indonesia1900K Forum MembersMIUI Fan From Singapore300K Forum Members3500K Forum Members1st AnniversaryDiwali Thanksgiving Day1 Million Forum MembersMerry ChristmasMIUI 100 Million UsersMIUI 6th AnniversaryMIUI 300 WeeksMIUI Lucky FridayMIUI Fan from TurkeyMIUI World TourFan MIUI PhilippinesHappy Valentine's Day2014 ChristmasMIUI 4th AnniversaryAlpaca Mi Bunny Gamer Mi BunnyI Love Mi BunnyMIUI ReviewScroll Of WisdomHumor MasterMIUI FB FollowerMIUI FollowerMIUI Global Forum 2014MIUI Android 4.4 KitKatInbox ZeroUpdates LoverForum Contest LoverStar Of IconsAndroid GuruDie-hard MIUI FanYouth PledgeMost Active MIUIer

[Tips & Tutorials] What the TECH?!!! #1 - Android File Permissions (and why should you care?)

[ Promote]
2456 25 |
15:02, Nov-26-2014 | From PC
|
|
Go to reply no.
This post was edited by iakwbos at 15:15, Nov-26-2014

Hi Guys! I've decided to do a series of threads discussing the techs behind our beloved Android Phones, so without further ado, this is WHAT THE TECH?!! Issue NO. 1

What the TECH template.jpg

Have you encountered some of these *gibberish*?
"set your permissions to chmod 755?"
"check if the file is executable?"
"set your permissions to rw-r-r?"


So what the TECH are these?

The Android Ecosystem is just Awesome. We all agree that countless forums like this one exist because we all want customization. MIUI was born 4 years ago because of that same mindset: User customization. We want more. That's why there's a plethora of Custom ROMs and App Ports and Xposed modules out there because of the openness of the Android Platform.

This is only possible because Android is using the open-source LINUX underneath. And still underneath it, is the grand-daddy of it all, UNIX.

LINUX? UNIX? What the TECH are you talking about?


unix.JPG


So wait? what the TECH is UNIX? Unix is an Operating System (OS) developed in the early 1970-1980.
Albeit it's age, it is where some of our modern OS'es are based upon like Linux, and even Apple's OSX and iOS.

What the TECH has UNIX have to do with the Android File System?

Since basically, Android is based from linux, and linux from UNIX, UNIX-based OSes, such as Android, files and folders stored in the physical drive and the system has a set of permissions associated with it which dictates who is allowed to do what with the file.

Let's break it into sections, shall we?:

In any unix-based OS, there are 3 types of people who can take control of files and folders inside the system:
OGO
O stands for Owner, G for Group, and O for Others.

Basically, YOU are the OWNER, and the users who are members of the file group is the GROUP, and those who are neither the owner or member of the group are under the OTHERS.

With those people in mind, there are 4 basic things they can do to a file or folder:
RWX-
R stands for Read, basically letting you read the file or folder, but not edit it.
W is for Write, which lets you write and delete files and folders.
X is for Execute, which lets you run the file if it's an executable script.
- is for Not Allowed. Preventing Access to any file or folder


Now, what the TECH is this: rw-r--r--?

permission gib.JPG

WHY THE TECH DO I HAVE TO BE AWARE OF THESE?

We're basically talking about customization here, am i right? Whether you are Making or flashing Custom Roms, or changing System fonts or icons, or even activating Xposed Modules in your device, it AWLAYS involves changing permissions inside the system.

For example, for you to be able to run a System App to your device, you have to push your APK to /system/app/ with rw-r-r permission which enable the device to run the app. Setting incorrect permissions can mess up your phone, bootloop it, and worse BRICK it.


So, How The TECH can I make use of this?

There are two ways:

1. Most Root file managers let you do this, given that your device is ROOTED. (The easier way)

Screenshot_2014-11-26-14-39-24.png

For your convenience, Here are some of those I personally use:

Rom Toolbox (lite and Pro)
Root Explorer
Cabinet Beta (where I took the screenshot above)
ES File Explorer
Amaze FIle Manager
and so much more...

2. Using Terminal Emulator in your phone, or ADB from your PC (For the more Advanced Users)

Pre-requisite:
Your phone is ROOTED
Terminal Emulator (for your phone only)
Minimal ADB & Fastboot (Download Here) for your PC

Some useful ADB guides  HERE (Credits to @DoxMAzz)

Why the TECH should you know about it?

Without proper knowledge of these permissions when modifying your Android Device, you can endanger bootlooping your phone (like putting system libs in system with wrong permission), and worse brick your phone.

Now You know what the TECH is Android/UNIX permissions all about.

~~~~~~~

Shameless Advertisement:
CHECK OUT WHAT THE TECH?!! ISSUE #2 SOON! Until then, stay awesome guys!




Favorite1 Share

Rated by 5 people   Experience Reason  

fredie271 + 1 Fantastic!
Inkorporated + 5 Fantastic!
Shuddhahnik + 2 Great!
ussmrg + 4 Great!
Iyengar + 8 Excellent

Experience +20  View Rating Log

Supreme Member

It has Begun

Rank: 7Rank: 7Rank: 7

Credits
32157
Device
Mi 5
MIUI Version
7.4.20
Online time
1069 Hours
Send PM

Mi KeyMi BoxMi Power BankMi In-Ear HeadphonesMi WiFi RouterMi BandMIUI 6I Love MIUIAwesome!Fantastic!FlashholicMIUI 2015MIUI 7Mi TVXiaomi Mi 4Mi PadMi 3Redmi 1SRedmiRedmi NoteRedmi 3Mi NoteRedmi Note 2Mi 4cMi 4iRedmi 22014 ChristmasThanksgiving DayFan Of MIUI BangladeshHappy Singles' DayFan Of  MIUI AzerbaijanDiwali MIUI 4th AnniversaryHappy DiwaliHappy Valentine's DayMIUI Halloween300K Forum Members600K Forum Members900K Forum MembersFan of MIUI Myanmar1 Million Forum MembersSingapore Birthday800K Forum Members700K Forum Members500K Forum MembersXiaomi 5th AnniversaryMalaysia AnniversaryMIUI 5th AnniversaryMIUI 100 Million UsersMIUI Fan from IndiaMIUI Fan From IndonesiaFan Of MIUI IndiaMIUI Fan From BrazilMIUI V5 Review1st AnniversaryFan Of MIUI Ex-Yu MIUI Fan from MalaysiaHilal Ramadan MIUI Fan From PhilippinesMIUI 50 Million UsersMIUI Fan From SingaporeMIUI Fan from TurkeyI Love Mi BunnySummer Mi BunnyAlpaca Mi Bunny Gamer Mi BunnyMost Active MIUIerMIUI Medals CollectorMi Bunny Game Master MIUI FollowerMIUI Android 4.4 KitKatMIUI Photography GuruAndroid GuruStar Of IconsMaster Of TechnologyDie-hard MIUI FanOTA FeedbackRingtone MasterRingtone Star Super ModeratorPioneer of MIUI English Forum MIUI Ice Bucket ChallengeForum Contest LoverMIUI G+ FollowerMIUI Twitter FollowerMIUI FB FollowerAndroid ElfMi TalentMIUI Global Forum 2014Mi Lover MedalScroll Of WisdomDebate MasterRingtone TalentUpdates LoverYouth PledgeRedmi Quiz MasterInbox ZeroHumor Master

15:14, Nov-26-2014 | From PC
|
techies love this

Comment

iakwbos haha, I bet they do!  15:15, Nov-26-2014
TRUE WARRIOR WILL NEVER GIVE UP!

Moderator

Rank: 7Rank: 7Rank: 7

Credits
36702
Device
Mi 4i
MIUI Version
7.6.8
Online time
2512 Hours
Send PM

Mi In-Ear HeadphonesMi Band 2Mijia Story TellerMi HomeMi BoxMi HeadphonesMi BandMi WiFi RouterMi VRXiaomi 7th AnniversaryMIUI 2016Fantastic!MIUI 2015MIUI 6Awesome!I Love MIUIFlashholicMIUI 7Mi PadRedmiMi 1Mi 4iMi 3Xiaomi Mi 42014 ChristmasHappy Singles' DayThanksgiving DayMIUI Forum AppFan Of  MIUI AzerbaijanAtaturk Mourning300K Forum MembersMIUI 3rd Anniversary100k Forum MembersMIUI 20 Million Users1st Anniversary90000 Forum MembersMIUI English Forum 2013MIUI 30 Million UsersFan Of MIUI IndiaFan Of MIUI Ex-Yu MIUI Fan From PhilippinesMIUI Fan From IndonesiaMIUI HalloweenMIUI Fan From BrazilFan Of MIUI BangladeshI Love 20162100K Forum MembersMIUI 100 Million Users1 Million Forum MembersHappy Diwali1 Million Forum App InstallsMIUI Lucky FridaySuper SaturdaySuper Sunday3500K Forum MembersSuper MondayDiwali Super ThursdayMIUI Fan From SingaporeMIUI 4th Anniversary500K Forum MembersMIUI 50 Million Users700K Forum Members600K Forum MembersMIUI 5th AnniversaryXiaomi 5th Anniversary800K Forum MembersHappy Valentine's DaySummer Mi BunnyAlpaca Mi Bunny Gamer Mi BunnyI Love Mi BunnyMIUI Beta TeamMIUI ReviewMIUI Beta Team VIPStar Of IconsMIUI ExpertStar Bug FinderAndroid GuruMIUI Android 4.4 KitKatMIUI Medals CollectorForum Contest LoverMIUI G+ FollowerMi TalentMIUI Twitter FollowerMIUI FB FollowerAndroid ElfMIUI Translation ContributorDebate MasterMi Story TellerMIUI Ice Bucket ChallengeMIUI KingStar Of TechnologyMi Lover MedalMIUI Global Forum 2014Youth PledgeBest ArticleMr. DependableStar Of  MIUI Beta TeamSenior Beta TesterSuper ModeratorMIUI FollowerPioneer of MIUI English Forum OTA FeedbackMIUI Community VIPDie-hard MIUI FanUpdates Lover

15:27, Nov-26-2014 | From PC
|
Nice one... Let me know if you want to work along with me if you're interested to write articles.

Comment

iakwbos yeah, sure! definitely! i'd like that.  15:32, Nov-26-2014
Retired

MIUI Translation Team

Credits
669
Device
Mi 5 Pro
MIUI Version
7.6.15
Online time
143 Hours
Send PM

Mi WiFi RouterMIUI 6FlashholicRedmi 1SMi 3Fan Of MIUI India300K Forum MembersMIUI Beta TeamOTA FeedbackMIUI FollowerAndroid GuruPioneer of MIUI English Forum MIUI Global Forum 2014Die-hard MIUI Fan

16:34, Nov-26-2014 | Via mobile
|
can't wait for the next issue :)

Comment

iakwbos thanks for the excitement bro!  16:37, Nov-26-2014

Elite Member

Work for tomorrow

Rank: 6Rank: 6

Credits
15945
Device
Mi 3
MIUI Version
7.6.8
Online time
614 Hours
Send PM

Mi HeadphonesMi Power Bank 10000MAH Mi BoxMijia Story TellerMi WiFi RouterMi Selfie StickMagic CubeMi BandMi HomeMi Power BankMi VRMi In-Ear HeadphonesMi KeyMi Band 2Xiaomi 6 LaunchXiaomi 7th AnniversaryMIUI 7MIUI 2016MarshmallowMIUI 8MIUI 2015FlashholicMIUI Devices ContestMIUI 6Fantastic!I Love MIUIAwesome!Mi 4cMi 4iRedmi 2Xiaomi Mi 4RedmiRedmi Note 2Mi PadMi 3Redmi 1SMi TVMIUI Fan From PhilippinesHappy DiwaliMIUI Fan From Indonesia300K Forum MembersMIUI 5th AnniversaryDiwali Fan Of MIUI India700K Forum MembersPuzzle MasterMIUI Fan from MalaysiaMIUI HalloweenFan Of MIUI Bangladesh800K Forum MembersFan Of  MIUI Azerbaijan2014 ChristmasMIUI Fan from TurkeyThanksgiving Day1st AnniversaryAtaturk MourningHappy Valentine's DayMIUI Fan From Brazil600K Forum MembersXiaomi 5th Anniversary500K Forum MembersMIUI 100 Million UsersHappy New YearHappy Singles' Day1 Million Forum MembersMIUI Monthly TalkRooster Year of 20173 Million Forum App InstallsMIUI Lucky Friday1 Million Forum App InstallsFan Of MIUI RussiaPokemon Master MedalHilal Ramadan MIUI Fan From SingaporeSingapore BirthdayMIUI 2017MIUI 4th AnniversarySuper ThursdaySuper Wednesday3500K Forum MembersFan Of MIUI UkraineSuper SundayMIUI Happy MedalSuper FridaySurge S1Rocket to Future2100K Forum MembersI Love 2016MIUI Fan From NepalMIUI World TourMid-Autumn Festival1700K Forum MembersOlympics MedalMIUI 6th Anniversary900K Forum MembersMerry ChristmasMIUI 50 Million Users1500K Forum MembersMIUI 300 WeeksMIUI Forum AppFan Of MIUI PolandMIUI Fan from India1900K Forum MembersFan Of MIUI Italy1800K Forum MembersI Love Mi BunnyMiPopAlpaca Mi Bunny Summer Mi BunnyGamer Mi BunnyMIUI Device TeamMIUI ReviewMIUI Beta TeamMIUI FollowerMIUI Medals CollectorMost Active MIUIerHumor MasterAndroid GuruStar Of IconsScroll Of WisdomMi Lover MedalStar Of TechnologyTechnology GuruRingtone Star Mi Bunny Game Master App TalentApp TalentMIUI KingMost Popular Forum UserMi Story TellerMaster Of TechnologyMIUI ExpertMi TalentMIUI G+ FollowerYouth PledgeInbox ZeroUpdates LoverOTA FeedbackDie-hard MIUI FanMIUI Android 4.4 KitKatForum Contest LoverMIUI Twitter FollowerDebate MasterAndroid ElfMIUI Global Forum 2014MIUI FB FollowerPioneer of MIUI English Forum

19:47, Nov-26-2014 | From PC
|
great work bro ... very informatic
Love MiUi

Elite Member

Rank: 6Rank: 6

Credits
9364
Device
Mi 3
MIUI Version
7.6.8
Online time
320 Hours
Send PM

Mi KeyMi BandMi In-Ear HeadphonesMi BoxFantastic!MIUI 2016Awesome!MIUI 2015MIUI 6I Love MIUIFlashholicMi 3Mi TVRedmiRedmi 1SRedmi NoteFan Of MIUI IndiaThanksgiving DayMIUI Fan From Indonesia1st AnniversaryMIUI Fan From SingaporeMIUI Fan From PhilippinesMIUI Fan from IndiaMIUI 4th AnniversaryDiwali MIUI 50 Million UsersMIUI Fan from MalaysiaAtaturk MourningHappy DiwaliFan Of MIUI Ex-Yu Happy Singles' DayFan Of MIUI BangladeshFan Of  MIUI AzerbaijanMIUI Halloween2014 Christmas300K Forum MembersHappy Valentine's DayMIUI Fan from TurkeyAlpaca Mi Bunny I Love Mi BunnyMiPopGamer Mi BunnySummer Mi BunnyMIUI News TeamPioneer of MIUI English Forum Android ElfInbox ZeroYouth PledgeStar MIUI News Team MemberAndroid GuruUpdates LoverHumor MasterStar Of IconsMIUI FB FollowerForum Contest LoverMIUI FollowerDie-hard MIUI FanMIUI Global Forum 2014Redmi Quiz MasterMIUI Android 4.4 KitKatOTA FeedbackMi Bunny Game Master

03:29, Dec-02-2014 | From PC
|
Great writing!..and also i love the presentation style...you have really worked hard on it!...Thanks!

Comment

iakwbos Thanks for the support mate!  07:56, Dec-02-2014

Diamond Member

Rank: 5Rank: 5

Credits
1476
Device
Mi 3
MIUI Version
6.8.11
Online time
89 Hours
Send PM

Mi KeyMi BoxI Love MIUIMIUI 2015Awesome!MIUI 8MIUI 6Mi TVFan Of MIUI India300K Forum MembersHappy DiwaliHappy Singles' DayDiwali MIUI 4th AnniversaryThanksgiving DayI Love Mi BunnyMIUI Beta TeamDie-hard MIUI FanMi TalentAndroid GuruMost Active MIUIer

22:54, Dec-02-2014 | From PC
|
Love this series want more every week

Comment

iakwbos Thanks for the support!  23:51, Dec-02-2014
“The world wasn't made for us, we were made for the world.”

Elite Member

Rank: 6Rank: 6

Credits
12971
Device
Mi 4
MIUI Version
0
Online time
161 Hours
Send PM

Mi KeyMi Air PurifierMagic CubeMi Band 2Mi HeadphonesYeelight Bedside LampMi HomeUnlock MedalMi  BunnyMi VR HeadsetYi Action CameraMi Power Bank 10000MAH Mi Power StripMijia Mi Bunny RobotMi Selfie StickMi Yi CameraMi Water PurifierMijia VR Play 2Mi WiFi Router MiniMi VRXiaomi 6 LaunchMijia Electric ScooterMi BandMi In-Ear HeadphonesMi WiFi RouterMi Power BankMi MIXMi WiFiXiaomi 7th AnniversaryFantastic!MIUI 2015I Love MIUIMIUI 2016MIUI 7MIUI 6MarshmallowAwesome!FlashholicMIUI 8MIUI Devices ContestMi PadRedmi Note 2Xiaomi Mi 4Redmi 2Mi 4cMi 4iRedmi 1SRedmi NoteMi TVMIUI Halloween900K Forum Members300K Forum Members2014 Christmas5 Million Forum App Installs1300K Forum MembersHappy Holi Medal800K Forum MembersThanksgiving DayDiwali Fan of MIUI MyanmarMIUI Drawing TalentXiaomi 6th Anniversary1 Million Forum MembersMIUI Fan From PhilippinesMerry ChristmasFan Of MIUI PolandHappy New Year5 Million Forum PostsMIUI 5th AnniversaryFan Of MIUI IndiaFan Of MIUI UkraineHappy Valentine's DayMIUI 100 Million UsersFan Of MIUI AustraliaFan Of  MIUI AzerbaijanMIUI 4th AnniversaryMIUI Happy MedalMIUI Fan from India3500K Forum Members500K Forum MembersMIUI Font LoverRocket to FutureSuper Saturday700K Forum MembersHilal Ramadan MIUI Fan From IndonesiaSuper SundayMIUI Fan from Malaysia600K Forum MembersMIUI Fan From SingaporeMIUI Fan from TurkeyFan Of MIUI RussiaWomen's Day MedalHappy DiwaliFan Of MIUI SpainFan Of MIUI ItalyMIUI World Tour1400K Forum MembersMIUI Forum AppMalaysia AnniversarySuper WednesdayMIUI 300 WeeksMi Live MedalMid-Autumn FestivalSurge S1MIUI Weekly PollMIUI 20171 Million Forum App InstallsRooster Year of 2017MIUI Monthly Talk3 Million Forum App InstallsFan Of MIUI BulgariaI Love 2016MIUI Marathon MedalFan Of MIUI BangladeshSuper Tuesday2100K Forum MembersSuper MondayOlympics Medal1500K Forum MembersMIUI 6th AnniversarySuper ThursdayMIUI Fan From NepalMIUI Fan From BrazilPokemon Master MedalMIUI Fan From VietnamPuzzle Master10 Million Forum Posts3 Million Forum MembersFan Of MIUI GreeceUEFA EURO MedalFan Of MIUI FranceMiPopSummer Mi BunnyAlpaca Mi Bunny Gamer Mi BunnyI Love Mi BunnyMIUI ReviewMIUI Global Forum 2014Most Popular Forum UserMi Lover MedalRedmi Quiz MasterMaster Of TechnologyApp TalentPioneer of MIUI English Forum Technology GuruMr. DependableMIUI FollowerMIUI Twitter FollowerMIUI ExpertDie-hard MIUI FanApp TalentAndroid ElfForum Contest LoverOTA FeedbackInbox ZeroAndroid GuruUpdates LoverMi TalentStar Of TechnologyHumor MasterYouth PledgeMi Bunny Game Master MIUI Android 4.4 KitKatMIUI G+ FollowerWallpaper ExpertRingtone Star App StarMIUI KingJuly 19 MyanmarMi Story TellerMIUI Medals CollectorScroll Of WisdomDebate MasterMIUI FB Follower

15:42, Dec-31-2014 | From PC
|
Thanks for sharing!

Platinum Member

Rank: 4

Credits
2324
Device
Mi 3
MIUI Version
V8.2.10.0.MCFMIDL
Online time
220 Hours
Send PM

Mi BandMi WiFi RouterMagic CubeXiaomi 7th AnniversaryAwesome!I Love MIUIMIUI 2015Fantastic!FlashholicMIUI 6Mi 3Mi NoteRedmi 1SMi Note ProMi PadXiaomi Mi 4Mi TVRedmi NoteRedmi 2Diwali MIUI 100 Million Users300K Forum MembersThanksgiving DayHappy Valentine's DayFan Of MIUI IndiaMIUI Fan from IndiaFan Of  MIUI Azerbaijan500K Forum MembersMIUI Fan From BrazilFan Of MIUI BangladeshHilal Ramadan 600K Forum MembersMIUI Fan from Malaysia700K Forum Members1 Million Forum MembersMIUI 5th AnniversaryXiaomi 5th AnniversaryGamer Mi BunnyAlpaca Mi Bunny Summer Mi BunnyI Love Mi BunnyMIUI ReviewOTA FeedbackRingtone Star Debate MasterAndroid GuruMi TalentMIUI FB FollowerForum Contest LoverMIUI Global Forum 2014Die-hard MIUI FanScroll Of Wisdom

14:58, Jan-09-2015 | Via mobile
|
hi i rooted my device but now wgile unrooting i forgot to off permission

Platinum Member

Rank: 4

Credits
2324
Device
Mi 3
MIUI Version
V8.2.10.0.MCFMIDL
Online time
220 Hours
Send PM

Mi BandMi WiFi RouterMagic CubeXiaomi 7th AnniversaryAwesome!I Love MIUIMIUI 2015Fantastic!FlashholicMIUI 6Mi 3Mi NoteRedmi 1SMi Note ProMi PadXiaomi Mi 4Mi TVRedmi NoteRedmi 2Diwali MIUI 100 Million Users300K Forum MembersThanksgiving DayHappy Valentine's DayFan Of MIUI IndiaMIUI Fan from IndiaFan Of  MIUI Azerbaijan500K Forum MembersMIUI Fan From BrazilFan Of MIUI BangladeshHilal Ramadan 600K Forum MembersMIUI Fan from Malaysia700K Forum Members1 Million Forum MembersMIUI 5th AnniversaryXiaomi 5th AnniversaryGamer Mi BunnyAlpaca Mi Bunny Summer Mi BunnyI Love Mi BunnyMIUI ReviewOTA FeedbackRingtone Star Debate MasterAndroid GuruMi TalentMIUI FB FollowerForum Contest LoverMIUI Global Forum 2014Die-hard MIUI FanScroll Of Wisdom

14:58, Jan-09-2015 | Via mobile
|
hi i rooted my device but now wgile unrooting i forgot to off permission

Credits Management

Quick Reply Top Return to the list