1

What is the best way to access the Android system partition
via USB of any device with Linux (not rooted device)
Need to change some files in the system folders...

2
  • As I said in my other comment: Try adb.
    – GiantTree
    Commented Aug 11, 2015 at 17:20
  • 5
    If you're not rooted you can't do this. /system is read only and you can't remount without root. Commented Aug 11, 2015 at 18:21

1 Answer 1

3

The best way is relative and dependant on not just hardware but also your desire to modify and or automate. For one-shot tasks I'd suggest adb & for special projects and automation I'd suggest Casual or Xposed. For messing with stuff I probably shouldn't, I'd definitely start with Xposed if I were you because the settings can be non-permanent.

To help future answer attempts try giving us a bit more info on your setup; Linux distro & CPU 32/64 bit, Android model & OS/Kernel versions if added to your OP will help better narrow down the best answer quickly. Additionally while looking into ADB you may wish to also look to the C.A.S.U.A.L. project as the tools there may allow for shortcutting lots of the driver and SDK installation hunting time down as well as enabling custom scripts that fire when you plugin your Android; very simple to understand language and very powerful under the hood.

ADB The Android Debugging Bridge will be the command line interpreter that you'll want to become familiar with. Commands are not hard to understand; push and pull files or directories is fairly straightforward. Mounting the directory as read/write and remembering to reset those permissions correctly can sometimes lead to trouble; make backups first with pull & try not to push where you shouldn't. 'Android SDK Tools' is the software suite that you'll usually need running on Linux to make use of push & pull commands.

Be sure in your Android's settings that you've got USB debugging enabled; sometimes this needs to be revealed by repeatedly tapping 'Build number' within the 'About device' section and then pressing the back button and the 'Developer options' should have become visible in your Android's settings screen.

Installing the necessary drivers and software packages is Android device and Linux distro specific. Some Android's drivers are not available online for Linux and require much work, others are happy enough to talk to a PC that your distribution may already be capable of basic file read/copy operations of protected file systems but unable to push without the Android SDK.

Installing the Android SDK Tools is a whole different can'o'worms when both Linux distro and Android version has to be taken into account. The route I would take would be booting a pentesting distro and installing to that anything missing for Android USB hacking as the tools that these distros offer may give you options to make full backups any time an Android device is plugged into it as well as run tailored exploits that keeps your Android's system synced with the wishes you have.

Depending on the files you're trying to modify you may run into issues with checks run by other apps or you may need a special compiler to be sure you don't brick it by killing your radio's firmware... backups don't really help there or if you mess with the bits that read your power button such that... most call that a 'brick' I call it 'spare parts' when I get a device that really doesn't respond. As stated in the beginning of this response best is relative to what you're trying to accomplish and on what hardware you're rocking. Lastly when embarking on a Modding expedition it's a good idea to know how much a refurbished model will cost, two Android devices that I've come to really enjoy boot-looping is less than $40 to have shipped (even less for ones that work but don't have a screen) and the refurbished devices I use during testing phases of development while my main device holds the most stable modifications only after I've repeatedly boot-looped the refurbs. This method has allowed me to mess with parts of the Android system, locally at times, without to much fear of perma-bricking something that I've invested data into.


All of the above being stated if you're not opposed to root then the Xposed module loader and their documentation on how to make your own module for Xposed may be useful for making modifications on the fly that automatically revert (ie not load mods on boot) settings if a bad shutdown happened last. The framework allows for modification of nearly every process of your device, often without the need to reboot to see settings take effect, so it is not for the faint of heart... used correctly though you can hide root (SU) permissions access from the rest of the Android system, root? what root? and used incorrectly it can hide it's own presence while slurping a victim's dastructrueta. Though the same feature also allows for covert data collection after device theft as well as faking the shutdown so really this yet again comes down to user's wishes for their device's features or functions and what syntax structure you feel comfortable tackling first.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .