LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-29-2017, 08:11 PM   #1
Daniel9999
LQ Newbie
 
Registered: Dec 2017
Posts: 4

Rep: Reputation: Disabled
Angry ADB remount failed


Hai friends,
having linux mint 17 and have installed android NDK and its require package like JDK...., adb connection is working and can goto shell or su,even execute dirty cow script on bring me to shell automatically. I just need to adb remount in order to push file (superuser.apk,su,busybox) to /system of my mtk 6737T phone but keep fail or permission denied or no such directory or file or even in su prompt but failed~(return with no root !!)

Have attempt many command from google search in adb,shell,su for few weeks already. Please help.
Thank in advance.
Daniel
 
Old 12-29-2017, 09:57 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,475

Rep: Reputation: 994Reputation: 994Reputation: 994Reputation: 994Reputation: 994Reputation: 994Reputation: 994Reputation: 994
Try this: https://www.howtogeek.com/125769/how...ridge-utility/
 
Old 12-30-2017, 04:03 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,677
Blog Entries: 7

Rep: Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393
please show us the commands you entered and the output you received.
use code tags for code.
 
Old 12-30-2017, 05:33 AM   #4
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 28
Are you aware of that many manufacturers, including SAMSUNG do not stick to the ADB / FASTBOOT standard. Only a subset is supported.

When you want ADB and fastboot to be working you have to buy a Google nexus or equivalent product from Google. There is a new program for a new supported list of devices. Consider these devices are only a few.

--

Are you sure your hardware supports those advanced commands? MY SAMSUNG SM-T580 does not support these advanced commands. I have 2 nexus 4 phones. one nexus 7 2012 tablet (which has a hardware defect now). So I know how to work with these commands. So I can see the difference between good manufacturer and bad manufacturer who does not stick to the standard.


Are you sure your mediatek processor supports root? (and afaik mediatek is not supported by custom roms. )

--

It seems this is a processor and not a phone!

https://www.mediatek.com/products/smartphones/mt6737

Can you provide the phone buyers link and not a link to a processor please?

--

adb remount only works and is supported by a few phones which stick to the google adb / fastboot thing. and these are google nexus XY, few motorola moto xy,...

--

go to xda developers or similar sites and search for your phone model and not for your cpu model!

--

Side note: Samsungs shipped ANDROID on SM-T580 is loosely based on android. only a small subset is even supported. That'S why I call it FAKE android. Any not native google device is FAKE android. You can not have full functionality out of a fake android device. And mediatek is bad in this regard, you get what you pay for, especially with mediatek and rockchip based one devices
 
Old 12-30-2017, 05:41 AM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 17,066

Rep: Reputation: 2594Reputation: 2594Reputation: 2594Reputation: 2594Reputation: 2594Reputation: 2594Reputation: 2594Reputation: 2594Reputation: 2594Reputation: 2594Reputation: 2594
Hmm - @_roman_ is not backward in offering an opinion.
Here I have to agree - I specifically chose to buy Nexus (5 and 6P in my case) so I could confidently flash a custom ROM and re-flash a factory image in need. Both work fine. I was considering the initial OPPO offering, but desisted.
BTW you don't need the full SDK just to use ABD for push type functions.

In the past I have tried to flash a Samsung cheap music phone and managed to brick it - had to use the proprietary tool to get it back. Then tossed it in the bin.
 
Old 12-30-2017, 06:24 AM   #6
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 28
Quote:
Originally Posted by syg00 View Post
BTW you don't need the full SDK just to use ABD for push type functions.
Quote:
I just need to adb remount in order to push file (superuser.apk,su,busybox) to /system of my mtk 6737T phone but keep fail or permission denied or no such directory or file or even in su prompt but failed~(return with no root !!)
@ post

when you look at what the topic poster wrote.

It is obvious that he wants to enable root on the phone.

But root needs a proper firmware (which may just refers to a proper recovery) which only google nexus supports. Maybe a few others but they are a few.

Yes you can adb push / pull files for e.g. SAMSUNG SM-T580, but not in every folder. Because some folders can not be accessed. Which is also basically than broken because of lack of permission. the poster may be able to "push files" (means to copy in android language) to the folder /SDCARD.
But as a lack of permissions, and because it is designed like that the poster can not copy to certain special system folders.

"even in su prompt but failed~(return with no root !!)" indicates the poster has no glue about the UNIX alike workings for such. FAKE android is not android and is not any Xnix. and fake android is not like MSDOS where you can write everywhere, do every nonsense and expect it to work.

And as i said go to xda developers or similar with the phone name and model. not with the cpu. most likely there exists a windows only binary (which I would be suspicious) to use to get root maybe done.

--

--

I also think this time

I made in previous post clear the difference between fake and real android. I gave examples to make it obvious.
I stated that buying MEDIATEK and rockchip based devices is bad. Except which was not said when there is full open sources for hard- and software, which is afaik not the case. anyway rockchip does not even know how the calender works (calender bug! one extra day in month november, says all).
I stated that android remount is a special firmware feature only supported by google nexus similar products with real android, and not fake android.
I stated that root is only supported on certain platforms, and most likely not on mediatek.
I asked for details regarding which phone model.
I also asked if the phone supports those advanced features of real android. Hinting out with the question the obvious that the phone is a cheap chinese one which has old firmware, old android, is fake android and very problematic for daily use.
I also gave a decent example for three well known devices. 2 google based and one brand new from samsung. SM-T580 is afaik ~1 year old or so on the market. It'S from SAMSUNG, the company which sells a lot of different devices, pulls out every few days a new devices regardless if it makes sense or not.
I stated that cpu does not matter as the phone matters. It'S obvious: Root is different for every phone. It does not depends on the cpu model or cpu name.
I wanted to point in the right direction. Previous post before myself indicated like, that it has to be a linux issue. But I hint it in the right direction with high doubts, which may be correct anyway, it is the user issue to assume FAKE android is like real android and those should work.

--

With any gnu linux and the adb package you may be able to push&pull (copy) files (any kind including directories (up to discussion now, what a file is)) to certain user writeable folders, most likely folder /sdcard. You may be able to delete only a few user created files. Like videos and photos.

Assuming you use a distro which is a bit maintained.

--

I had once to fix a bricked nexus 4 phone. Even google (or LG who made the phone as subcontractor) provided scripts did not work out of the box. Luckily I was able to read scripts and do it manually a bit differently.

The "partitions" are for every device in another fashion. Partitions refer to sections in this case of the flash chips. How it is setup depends on the manufacturer. It is more hacking some microcontroller board as working with a computer. Somewhere down the road you have the Xnix look alike shell with a subset of commands. which tools the manufacturer uses is also his choice. and how he uses it.
Samsung e.g. it seems uses some ODIN named software / or protocol.

--

Below is off topic:

rant about SM-T580 from SAMSUNG: 4 months old security patchset. Does only sometimes uses public WIFI for example IKEA and other hotspots. Nexus 4 in my pocket works flawless except i broke the digitizer on both phones. Samsung has a heavily Software issue: e.g. camera software bad, wifi bad (sometimes connection), no basic functionality, device can not be turned off easily, no uninstall option for 8GB of bloat on a 16GB device, you loose guarantee when you want to root it. And samsung supports are idiots for SAMSUNG austria. I have german e-mails as proof, but I doubt I'm allowed to post here. SAMSUNG also does not respond to questions regaarding which SD cards my SM-T580 spports. After beeing rude several times I finally got an answer on which SD Card (which is wrong) is supported. SAMSUNG says SD cards up to 128gb supported. Thats just wrong because mechanically they may look like mini-sd cards which are not SD-CARDS electrically or mechanically. I had a camera for 100 euros with SD Cards. I know how a sdcard works and look like. I know the specs. please use wikipedia or the specification, but somewhere around 4GB is the biggest SD-Card protocol wise supported. And size wise it is a mini sd-card size look alike. There are different electrical & protocol standards for SD & mini - SD card look alike flash based memories. Only because it looks like a SD card or mini sd-cards does not means it is one. i checked amazon, and there is a huge jungle. as samsung is not able to provivde a proper datasheet (which any proper company can usually for any diode, retifier, mainboard, mouse, television and so on. Or at least answer in let's say two weeks without asking again). And i will not buy sevearl sd cards and unbox it and return it to amazon. I want ot know before, which speeds are supported, which type. So i just know that is the fastest one, this is the right choice, this is too fast and my device can not write that fast. SAMSUNG products are made for idiots. When you want to turn it off, you have to unlock the screen with the screen lock pattern. than you have to press the power off button, than you have to touch a huge button on the screen, and than again. it's obvious some guys complained, hey my device is always turned off, so they made it that way. I said, can I please get the usual turn off feature back. Samsung answer was no, I should have informed myself before I had bought SAMSUNG device. Considering there is no information on SAMSUNG Austria or SAMSUNG homepage which flash based memory is supported I highly doubt I could have done that beforehand. I also asked how i can turn of certain animations. Samsung austria support said it was not possible. It is possible,but it is very time consuming and I will not tell how i did it. Samsung does not even know his own devices. or the guys answering do not know, which is the same at the end of the day. you ask, you get a stupid answer or no answer.

BTW if you want to counter argue on SM-T580 go ahead, but than proof it to me please.

edit: removed certain words. Cleanup text

Last edited by _roman_; 12-30-2017 at 06:25 AM.
 
Old 01-03-2018, 09:01 AM   #7
Daniel9999
LQ Newbie
 
Registered: Dec 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
please show us the commands you entered and the output you received.
use code tags for code.
Thank for your kind attention and would appreciate your help.
Regards.

====The input======
@pause
@echo --- STARTING ----
@echo --- Starting ADB ---
@files\adb wait-for-device
@echo --- Generating /tmp ---
@files\adb shell "cd /data/local && mkdir tmp"
@echo --- Cleaning ---
@files\adb shell "cd /data/local/tmp/ && rm *"
@files\adb wait-for-device
@echo --- DEVICE FOUND
@echo --- Installing Busybox 1.22.1 ---
@files\adb push files\busybox /data/local/tmp/.
@echo --- Correcting Permissions
@files\adb shell "chmod 755 /data/local/tmp/busybox"
@echo --- Re-Mounting /system
@files\adb shell "/data/local/tmp/busybox mount -o remount,rw /system"
@echo --- Checking Free Space /system
@files\adb push files\makespace /data/local/tmp/.
@files\adb shell "chmod 777 /data/local/tmp/makespace"
@files\adb shell "./data/local/tmp/makespace"
@echo --- Copying Files ---
@files\adb shell "dd if=/data/local/tmp/busybox of=/system/xbin/busybox"
@echo --- Correcting Ownership
@files\adb shell "chown root.shell /system/xbin/busybox"
@echo --- Correcting Permissions
@files\adb shell "chmod 04755 /system/xbin/busybox"
@echo --- Installing
@files\adb shell "/system/xbin/busybox --install -s /system/xbin"
@files\adb shell "rm -r /data/local/tmp/busybox"
@echo --- SU Binary ---
@files\adb push files\su /system/bin/su
@echo --- Correcting Ownership ---
@files\adb shell "chown root.shell /system/bin/su"
@echo --- Correcting Permissions ---
@files\adb shell "chmod 06755 /system/bin/su"
@echo --- Correcting Symlinks ---
@files\adb shell "rm /system/xbin/su"
@files\adb shell "ln -s /system/bin/su /system/xbin/su"

@echo --- Superuser.apk
@files\adb push files\Superuser.apk /system/app/.
@echo --- Cleaning ---
@files\adb shell "cd /data/local/tmp/; rm *"
@echo --- Rebooting ---
@files\adb reboot
@echo ALL DONE


============The Output========
--- STARTING ----
Starting ADB

--- Generating /tmp ---
mkdir: 'tmp': File exists
--- Cleaning /data/local/tmp/
rm: zzz: Is a directory

--- Installing Busybox 1.22.1 Bionic ---
2685 KB/s (538200 bytes in 0.195s)
--- Fixing Permissions ---
--- Re-mounting /system
mount: mounting /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system on /system failed: Permission denied
--- Checking free space /system
--- Pushing Makespace to Device ---
9 KB/s (396 bytes in 0.042s)
--- Fixing Permissions ---
--- Executing ---
df: /mnt/runtime/default/emulated: Permission denied
df: /mnt/runtime/read/emulated: Permission denied
df: /mnt/runtime/write/emulated: Permission denied
df: /mnt/media_rw/0677-1F14: Permission denied
df: /mnt/runtime/default/0677-1F14: Permission denied
df: /mnt/runtime/read/0677-1F14: Permission denied
df: /mnt/runtime/write/0677-1F14: Permission denied
--- Free space on /system :
97% bytes
test: 97%: bad number
--- NOT enough free space on /system!!!
--- making free space by removing Google Maps
--- Copying Necessary Files
dd: /system/xbin/busybox: Read-only file system
--- Fixing Ownership ---
chown: /system/xbin/busybox: No such file or directory
--- Finishing Up ---
chmod: /system/xbin/busybox: No such file or directory
--- Installing ---
/system/bin/sh: /system/xbin/busybox: not found

--- Pushing SU binary ---
failed to copy './files/su' to '/system/bin/su': Read-only file system
--- Fixing Ownership ---
chown: /system/bin/su: No such file or directory
--- Fixing Permissions ---
chmod: /system/bin/su: No such file or directory
--- Correcting Symlink ---
rm: /system/xbin/su: No such file or directory
ln: cannot create symbolic link from '/system/bin/su' to '/system/xbin/su': Read-only file system

--- Superuser.apk ---
failed to copy './files/Superuser.apk' to '/system/app/./Superuser.apk': Read-only file system

--- Cleaning /data/local/tmp/
rm: zzz: Is a directory
--- Rebooting ---
Done
 
Old 01-03-2018, 10:20 AM   #8
jsbjsb001
Senior Member
 
Registered: Mar 2009
Location: Earth? I would say I hope so but I'm not so sure about that... I could just be a figment of your imagination too.
Distribution: CentOS at the time of this writing, but some others over the years too...
Posts: 1,958

Rep: Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888Reputation: 888
Quote:
Originally Posted by Daniel9999 View Post
Thank for your kind attention and would appreciate your help.
Regards.

...
============The Output========
--- STARTING ----
Starting ADB

--- Generating /tmp ---
mkdir: 'tmp': File exists
--- Cleaning /data/local/tmp/
rm: zzz: Is a directory

--- Installing Busybox 1.22.1 Bionic ---
2685 KB/s (538200 bytes in 0.195s)
--- Fixing Permissions ---
--- Re-mounting /system
mount: mounting /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system on /system failed: Permission denied
--- Checking free space /system
--- Pushing Makespace to Device ---
9 KB/s (396 bytes in 0.042s)
--- Fixing Permissions ---
--- Executing ---
df: /mnt/runtime/default/emulated: Permission denied
df: /mnt/runtime/read/emulated: Permission denied
df: /mnt/runtime/write/emulated: Permission denied
df: /mnt/media_rw/0677-1F14: Permission denied
df: /mnt/runtime/default/0677-1F14: Permission denied
df: /mnt/runtime/read/0677-1F14: Permission denied
df: /mnt/runtime/write/0677-1F14: Permission denied

--- Free space on /system :
97% bytes
test: 97%: bad number
--- NOT enough free space on /system!!!
--- making free space by removing Google Maps
--- Copying Necessary Files
dd: /system/xbin/busybox: Read-only file system
--- Fixing Ownership ---
chown: /system/xbin/busybox: No such file or directory
--- Finishing Up ---
chmod: /system/xbin/busybox: No such file or directory
--- Installing ---
/system/bin/sh: /system/xbin/busybox: not found

--- Pushing SU binary ---
failed to copy './files/su' to '/system/bin/su': Read-only file system
--- Fixing Ownership ---
chown: /system/bin/su: No such file or directory
--- Fixing Permissions ---
chmod: /system/bin/su: No such file or directory
--- Correcting Symlink ---
rm: /system/xbin/su: No such file or directory
ln: cannot create symbolic link from '/system/bin/su' to '/system/xbin/su': Read-only file system

--- Superuser.apk ---
failed to copy './files/Superuser.apk' to '/system/app/./Superuser.apk': Read-only file system

--- Cleaning /data/local/tmp/
rm: zzz: Is a directory
--- Rebooting ---
Done
Daniel9999,

Please in future, use CODE tags so it's easier to read. I've highlighted the parts of your output in bold, to pay attention to.

From what I'm seeing, your user account does not have permission to write to the device and there is not enough free space left on it.
 
Old 01-03-2018, 04:14 PM   #9
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: gentoo / linux mint
Posts: 433

Rep: Reputation: 28
Quote:
mount: mounting /dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system on /system failed: Permission denied
Which is as probably said, a lockdown by the firmware

I would not bother going further when you can not write to the "device" in generic terms spoken

No comment on that nonsense
Quote:
@files\adb shell "dd if=/data/local/tmp/busybox of=/system/xbin/busybox
--

Summary, lessons learnt: When you are not allowed to write than you are not allowed to write. Regardless on what you try

hint: And as said mediatek is not supported because of reason x,y,z several times discussed here and there. I would be surprised that this has changed in recent months!
 
Old 01-04-2018, 03:28 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,677
Blog Entries: 7

Rep: Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393
Daniel999, is this the "dirty cow script" you were refering to?
because entering adb commands manually looks different.

i assume that this "dirty cow script" promises to do some magic for you, and "doesn't work".
so let's take a step back and ask, what are you really trying to achieve here?
 
Old 01-05-2018, 11:11 AM   #11
Daniel9999
LQ Newbie
 
Registered: Dec 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
Daniel999, is this the "dirty cow script" you were refering to?
because entering adb commands manually looks different.

i assume that this "dirty cow script" promises to do some magic for you, and "doesn't work".
so let's take a step back and ask, what are you really trying to achieve here?
Thank to all advice. i am trying to root my mtk6737T android 6.1 phone with unlock bootloader
 
Old 01-05-2018, 11:14 AM   #12
Daniel9999
LQ Newbie
 
Registered: Dec 2017
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
Daniel999, is this the "dirty cow script" you were refering to?
because entering adb commands manually looks different.

i assume that this "dirty cow script" promises to do some magic for you, and "doesn't work".
so let's take a step back and ask, what are you really trying to achieve here?
Thank to all advice. i am trying to root my mtk6737T android 6.1 phone with unlock bootloader.

By the way ,what commands to issue in order to know my android phone each partition physical_start_addr(such as 0x880000 ) and partition_size.

Thank again.
 
Old 01-06-2018, 04:03 AM   #13
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 9,677
Blog Entries: 7

Rep: Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393Reputation: 2393
you really need to look on https://forum.xda-developers.com/ .
first find your device, then find rooting instructions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Potential Exploit? Potential Backdoor? Strange code in '/usr/android/adb' Package: android-tools-adb slicktrail Linux - Security 1 12-05-2016 05:05 AM
ADB on Slackware Synderesis Slackware 6 05-21-2012 02:56 AM
Need Help Following This ADB Tutorial. macattack Linux - Mobile 2 03-20-2012 05:14 PM
Kernel 2.6.33 failed to boot (Cannot remount read-only fs) Geriao Slackware 10 03-15-2010 06:26 AM
"errors=remount-ro" auto fsck, then remount-rw possible? Sepero Linux - Hardware 0 03-28-2007 03:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration