Tutorial ROKCHIP2918 ADB UBUNTU LINUX AND ROOT - Android Software/Hacking General [Developers Only]

1-Preparing the environment.
sudo add-apt-repository ppa: nilarimogard/webupd8
sudo apt-get update
sudo apt-get install-android-tools-tools adb-fastboot android
Those three commands install ADB TOOLS, for Ubuntu 12.04 and earlier versions.
2-Each manufacturer has its ID development.
This, in principle, we can solve in a simple way Ubuntu. We need to add a line in the file / etc / udev / rules.d.
The line to add to the file depends on the manufacturer and model of the device. We can find the Vendor ID and Product ID of the device running (after having connected to USB, of course):
$ lsusb
This will be returned
*
Bus 002 Device 021: ID 2207:0000
(This is an example of what we can give back, by brand and manufacturer)
This indicates that the Vendor ID is "2207" and the Product ID is "0000".
3-Let's do it step by step:
Enable USB debugging and unknown sources on the Android.
Go to Settings -> Security and check the Unknown sources checkbox, then go to Options and development USB debugging enabled.
Connects via USB to Ubuntu Android.
Create / edit a file in / etc / udev / rules.d called 51-android.rules:
$ sudo gedit / etc/udev/rules.d/51-android.rules
Add the following line and save it
SUBSYSTEMS == "usb", ATTRS {idVendor} == "....", MODE = "0666", GROUP = "plugdev"
***IMPORTANT: Place the idVendor ATTRS {idVendor} == "HERE"***
4-Restart udev
$ sudo restart udev
At this point adb and should recognize our device, but it is not. This is because the version of adb included in the Android SDK does not "understand" our Vendor ID (not a salesman "officially recognized").
To fix this do the following:
Create / edit a file in $ HOME / .android called adb_usb.ini:
$ gedit $ HOME / .android / adb_usb.ini
Add the following content and save it
# ANDROID 3RD PARTY USB VENDOR ID LIST - DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0 × 2207
************************************************** *****************************
At this point gave me a problem, which was solved in a way a little strange. The following file $ gedit $ HOME / .android / adb_usb.ini
has to look like:
# ANDROID 3RD PARTY USB VENDOR ID LIST - DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0 × 2207
# ANDROID 3RD PARTY USB VENDOR ID LIST - DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0 × 2207
It was the way it worked for me and found the tablet.
************************************************** *******************************
5-At this point adb and should recognize our device:
$ adb devices
List of devices attached
0123456789ABCDEF device
Although sometimes you need to stop and start the adb server:
$ adb kill-server
$ adb start-server
************************************************** *********************************
Or maybe we should use this other method to stop the deamon
************************************************** *********************************
Reinitiate the 'deamon', as follows:
$ sudo stop udevd
It is likely that in the process of detention remains in standby, so the terminal will show nothing after entering the command.
Do not panic, simply: Restart our machine.
After restarting our team, we will ensure that our tablet has enabled debug mode, for that we can address
Settings >> Applications >> Development
And check the option 'USB debugging'
Once marked, we connect our tablet via cable / USB, open a terminal command:
$ adb devices
Automatically our deamon 'udevd' ripped, since previously we had stopped. And if all goes well, it should show you a list of connected devices, with their ID's.
6-Now that our team recognizes our device we root him:
Superuser unloaded tool (ICS compatible version and with our platform ARM, MIPS, ROKCHIP, ALLWINNER, etc.) and extract the application "Superuser.apk" and binary "your" in, for example, / tmp.
Su and Superuser installed:
$. / adb remount
$. / adb push / tmp / su / system / bin / su
2568 KB / s (22364 bytes in 0.008s)
$. / adb push / tmp / su / system / xbin / su
2843 KB / s (22364 bytes in 0.007s)
$. / Adb push / tmp / Superuser.apk / system / app / Superuser.apk
4593 KB / s (843503 bytes in 0.179s)
$. / adb shell chown 0.0 / system / xbin / su
$. / adb shell chmod 6775 / system / xbin / su
$. / adb shell chown 0.0 / system / bin / su
$. / adb shell chmod 6775 / system / bin / su
$. / adb remount
remount succeeded
$. / adb reboot
We hope to restart the tablet and go!
Sources:
http://rubensa.wordpress.com/2012/05/21/energy-sistem-i828-hd-ics-4-0-3-rooting/
http://www.htcmania.com/showthread.php?t=469742

Related

[Q] ROOT Panasonic Eluga V P-06D

Hello everyone ... I am new here
I have this Docomo Panasonic Eluga V P-06D .... practically I need to unlock the SIM but I found this possible solution to ROOT - Docomo Panasonic Eluga P-07D here [japanese language]:
手順メモ(先日やった記憶なので間違いあるかも)くれぐれも自己責任で
root取得をめざす方はAndroid SDKはわかっていると思うので省略。
① PanasonicのADBドライバを入手 インストール
② goroh_kun氏作成のキットを入手
左上のp07dunlock.zipと書いてあるすぐ下の[file]をクリックしてダウンロード
③ p07dunlock.zipの中にあるReadme.txtに書いてある事柄をすべて実行
手順書内の
(9) tomoyo解除
>adb shell
$cat /data/local/tmp/p07dgetroot > /tmp/xsh
$ls -l /tmp/xsh
-rw-rw-rw- shell shell xsh
無線LANをON/OFF/ONする
$ls -l /tmp/xsh
-rwsr-sr-x root root xsh
$/tmp/xsh
/tmp/xsh
/tmp/.mem fd=3
read ret = 256
write ret = 256
この段階で、tomoyoが解除できている
$rm /tmp/xsh
$cat /data/local/tmp/xsh > /tmp/xsh
無線LANをON/OFF/ONする
$ls -l /tmp/xsh
-rwsr-sr-x root root xsh
$/tmp/xsh
ここで、root権限のシェルが立ち上がるので、色々な動作ができる。suのインストールも可能
↑の最後までくると
[email protected]:/ $ /tmp/xsh
$(precmd)[email protected]$HOSTNAME:${PWD:-?} $
こういった表記になればroot権限ありのShellになっているのでまずは成功。
ここまで来れない場合はFactory Resetなりを考えよう。
④ su busybox superuser.apkの設置
ダウンロードkey:p07d
上記をダウンロードしておく
⑤ インストール前にsystemを読み書きできるよう設定
$ mount -o remount,rw /system /system (shellから操作している場合$はつけなくてよい)
パーミッション変更
$ chmod 777 /system/app/
$ chmod 777 /system/bin/
$ chmod 777 /system/xbin/
⑥ ④でダウンロードした su busybox superuser.apkを送り込む
別窓でコマンドプロンプトをひらき
adb push Superuser.apk /system/app/
adb push su /system/bin/
adb push busybox /system/xbin/
前のshellの窓に戻り
chown root.root /system/bin/su
su所有者を管理者に設定
chmod 6755 /system/bin/su
suの実行権限付与
chmod 644 /system/app/Superuser.apk
Superuser.apk の実行権限付与
chown root.shell /system/xbin/busybox
busybox の所有者を Shellにする
chmod 755 /system/xbin/busybox
busybox の実行権限付与
⑦ ⑤で設定したパーミッションを戻す
$ chmod 755 /system/app/
$ chmod 755 /system/bin/
$ chmod 755 /system/xbin/
これでroot checkerなどでroot accessができたとなれば完了。
ちなみに端末を再起動するたびにroot権がきれるので
Android Terminal Emulator などで
------------------------------
(9) tomoyo解除
>adb shell
$cat /data/local/tmp/p07dgetroot > /tmp/xsh
$ls -l /tmp/xsh
-rw-rw-rw- shell shell xsh
無線LANをON/OFF/ONする
$ls -l /tmp/xsh
-rwsr-sr-x root root xsh
$/tmp/xsh
/tmp/xsh
/tmp/.mem fd=3
read ret = 256
write ret = 256
この段階で、tomoyoが解除できている
--------------------------------
をしてTomoyoだけ解除しなければならないが、うまくやればいちいち手入力しなくても端末立ち上げてターミナルでコマンドを自動入力することも可能なのでいい方法を考えよう。
これで使いもしないのに裏で動いているdocomoアプリを粛清することができるようになった。
ちなみに再起動してTomoyo解除前にVideoストアをやってみましたが
やはり「端末が不正変更されています」とでて視聴はできず。
というわけで今月で解約。
Is there any possibility that this ROOT method to be compatible with Docomo Panasonic Eluga P-06D?
I have the link for those interested but i cannot post it yet.
I'd love to hear good things from you !!!!!
PS: I translated with Google translate README.TXT included in this tutorial
goroh_kun
2012/10/18
experimental version released & tomoyo get root privileges in p-07d
things to do
(1) adb restore p-07d.ab
Press OK certification will appear on the screen
(2) You can verify that: after
(3) restore is finished
> Adb shell
$ Cd / data / data / com.android.settings / a /
$ Ls-l-d
****drwxrwxrwx system system a
***? a directory that exists and is world readable, writable to
$ Ls-l
***? up to file00 ~ file99 directory exists
Once removed until file00 ~ file99 (4)
> Adb shell
$ Cd / data / data / com.android.settings /
$ Rm-r a / *
It permissions to 777 (5) / persist
More (4)
$ While:; do ln-s / persist a/file99; done
While doing this, in a separate command line
adb restore p-07d.ab
Run to complete the restore
After you have finished, exit the adb shell
Check the permissions on the (6) / persist
> Adb shell
$ Ls-l-d / persist
drwxrwxrwx system system persist
Execute the following command (7)
> Adb push init.cne.rc / data / local / tmp
> Adb push p07dgetroot / data / local / tmp
> Adb push xsh / data / local / tmp /
> Adb push libQ.so / persist
> Adb shell rm / persist / init.cne.rc
> Adb shell ln-s / data / local / tmp / init.cne.rc / persist / init.cne.rc
> Adb reboot
? / persist directory should only put a symbolic link to the / persist because no recovery will be restored at startup,
Was changed to put in / data / local / tmp is basically
================================================== ==
(Ensure that you have become a LD_PRELOAD = / presist / libQ.so) confirmation that the environment variable has changed after the move again (8)
> Adb shell
$ Echo $ LD_PRELOAD
/ Presist / libQ.so
Release (9) tomoyo
> Adb shell
$ Cat / data/local/tmp/p07dgetroot> / tmp / xsh
$ Ls-l / tmp / xsh
-Rw-rw-rw-shell shell xsh
The ON / OFF / ON the wireless LAN
$ Ls-l / tmp / xsh
-Rwsr-sr-x root root xsh
$ / Tmp / xsh
/ Tmp / xsh
/ Tmp / .mem fd = 3
read ret = 256
write ret = 256
At this stage, tomoyo is can be released
$ Rm / tmp / xsh
$ Cat / data / local / tmp / xsh> / tmp / xsh
The ON / OFF / ON the wireless LAN
$ Ls-l / tmp / xsh
-Rwsr-sr-x root root xsh
$ / Tmp / xsh
Here, the shell of the root authority to rise, I can operate a variety. can also be installed in the su
Panasonic p-06d
I'm new around here and I don't really understand what u said in the post , but I have the same phone , and I would love to know how to unlock the sim.. some said that I should reinstall my android on it , but I have no idea how to do that or where to get it. So if u find something please update here cuz i would love to unlock my phone:good:
Me too
diablotor said:
I'm new around here and I don't really understand what u said in the post , but I have the same phone , and I would love to know how to unlock the sim.. some said that I should reinstall my android on it , but I have no idea how to do that or where to get it. So if u find something please update here cuz i would love to unlock my phone:good:
Click to expand...
Click to collapse
First of all please excuse my english.
In previous post i said that i have found some japanese guy who managed to ROOT Panasonic Eluga P-07D [NTT Docomo]. It isn't our phone but is very similar. I posted the way he did all the things. I didn't find a way to SIM unlock the phone that is what i am looking for too but once ROOTED i presume it is much easier to unlock. Anyway i am still searching and if i will find something i will post here. Regards

[Q] TV BOX B351 android B351 rk31sdk

Hi can anyone please help with this Tv Box Quad-Core-Android-4-2-Rockchip-RK3188-Mini-PC-Smart- tv box works great the problem is some software need this box to be rooted i no how to connect to a pc shows up as a drive with folders here is the spec
* Android Device Brand rk31sdk
* Android Device Name PC Smart TV BOX Media Player
* Android Device Model B351 rk31sdk
* Android Version 4.2
* Build Number rk31sdk-eng 4.22 JDQ39/eng.linking.20140114.142223eng/test-keys
This is to help anyone with a similar device and I'll be brief;
First Install The Windows Drivers (you know, so you can actually talk to it)
i.e. from here... http://www.cnx-software.com/2013/11/08/simplified-method-to-install-rockchip-usb-drivers-in-windows-xp78/
If you have two Micro USB ports, work out which one is the power only v's the switchable USB guest / host one.
In setting, enable USB debug & then enable USB "connect to PC"
Windows should now detect and load the drivers for the device.
When the device is rebooted, you'll need to re-enable the "connect to PC" setting each time.
I found this package online that works for root but they left out of the script to copy the Super User App to the device. http://www.cnx-software.com/2013/03/19/how-to-root-rockchip-rk3188-mini-pcs/
The Archive Contains these files you'll need;
binary "su"
binary "SuperSU.apk"
binary "busybox"
binary "RootExplorer.apk"
It also contains the standard adb application
"TPSparkyRoot.bat" [modified] should contain;
Code:
@echo off
CD /D "%~dp0"
echo *---* VonDroid.com N101 II Root Tool based on work by sunnydavid *---*
echo --- Plug in your device, make sure debugging is enabled in Developer Options
echo --- This script will now copy files over to your N101 II
echo.
adb shell mv /data/local/tmp /data/local/tmp.bak
adb shell ln -s /data /data/local/tmp
adb reboot
echo --- Reboot 1/3 - Press Space Bar once the device has rebooted
pause
adb shell rm /data/local.prop > nul
adb shell "echo \"ro.kernel.qemu=1\" > /data/local.prop"
adb reboot
echo --- Reboot 2/3 - Press Space Bar once the device has rebooted
pause
adb shell id
echo --- If the ID shows as 0/root then continue, otherwise CTRL+C to cancel and start over
pause
adb remount
adb push su /system/bin/su
adb shell chown root.shell /system/bin/su
adb shell chmod 6755 /system/bin/su
adb push busybox /system/bin/busybox
adb shell chown root.shell /system/bin/busybox
adb shell chmod 0755 /system/bin/busybox
echo --- Installing SuperSU
adb push SuperSU.apk /system/app/SuperSU.apk
adb shell chown root.root /system/app/SuperSU.apk
adb shell chmod 0644 /system/app/SuperSU.apk
adb push RootExplorer.apk /system/app/RootExplorer.apk
adb shell chown root.root /system/app/RootExplorer.apk
adb shell chmod 0644 /system/app/RootExplorer.apk
echo Completing Root
adb shell rm /data/local.prop
adb shell rm /data/local/tmp
adb shell mv /data/local/tmp.bak /data/local/tmp
adb reboot
echo echo --- Reboot 3/3 - Your N101 II should now be rooted
pause
echo on
aboxy said:
Hi can anyone please help with this Tv Box Quad-Core-Android-4-2-Rockchip-RK3188-Mini-PC-Smart- tv box works great the problem is some software need this box to be rooted i no how to connect to a pc shows up as a drive with folders here is the spec
* Android Device Brand rk31sdk
* Android Device Name PC Smart TV BOX Media Player
* Android Device Model B351 rk31sdk
* Android Version 4.2
* Build Number rk31sdk-eng 4.22 JDQ39/eng.linking.20140114.142223eng/test-keys
Click to expand...
Click to collapse
Did you find rom for this version ? searching for Build Number rk31sdk-eng 4.22 JDQ39
Gonna try this now have the exact same model no.
Sent from my GT-I9505 using XDA Free mobile app

[Q] Hangouts - UAProf Modification

Hello Everyone,
I'm usually more of a lurker and use XDA to gather info mostly, but I've been trying to get Hnagouts to work with MMS for a while. So my issue is that I am using Softbank Prepaid in Japan, and Softbank for whatever reason is VERY particular about what is allowed on their network. I have a Galaxy S4 GT-I9505 and have been able to get the stock Messaging app to work with the MMS settings by figuring out the backend way of changing the UAProf settings so that Softbank sees it as an iPhone, thus enabling the MMS. (to do this launch ADB (on computer) / Terminal Emulator (on Phone, I believe SU access is needed) then launch command:
Code:
am broadcast -a com.sec.android.app.mmsprovision
Now I've been wanting to integrate with Hangouts for a while, and the settings that are available on hangouts doesn't really let you do anything, worse of all it seems to bypass the settings of the system, so the backend way doesn't work as hangouts seems to report it's own UAProf settings and doesn't seem to let you customize much. Even the custom APN settings seem to miss some files that are normally found.
Recently I have searched and I found that someone had posted about it in Japanese, using their HTC One (M7).
As I am not a programmer and work in very basics with command codes I was hoping someone could help me to make sense of this. I've used Google Chrome to translate the page but I'm still not 100% what needs to be done before I attempt it.
Please note that none of this is my work and it all comes from: http://d.hatena.ne.jp/shimooka/20140212/1392176717
From what I can see he has found a way to change the UAProf settings so that Hangouts reports that it is an iPhone. I can see that it needs to use ADB, but does it also need Perl and Java? also what is this modifying? Or is this similar to what I've already done using the command above?
Code:
$ export PATH = / Path/to/jre7/bin :/ path / to / Android-sdk-windows / build-tools / 19 . 0 . 0 /: $ PATH
$
$ Adb Shell mount -a
$
$ # fetch Framework-Res.Apk
$ Adb pull / system / framework / framework-res.apk
$
$ # Backup
$ \ cp -pf -Res.Apk Framework Framework-Res.Apk_
$ Java -jar Apktool_2. 0 .0 B9.Jar D -Advance Framework-Res.Apk
$
$ # modify user-agent, Uaprofile in Resources
$ cp -P Framework-res/res/values/strings.Xml Strings.Org.Xml
$ Perl -I -P -s -e ' s # # Http://Www.Google.Com/oha/rdf/ua-profile-kila.Xml Http://Www.Apple.Com/mms/uaprof.Rdf # g ' Framework-res/res/values/strings.Xml
$ Perl -I -P -s -e ' s # <string Name="config_mms_user_agent"> CyanogenMod </ string> # <string Name="config_mms_user_agent"> IPhoneOS/3.0 (7A341) </ string> # g ' Framework- res / res / values ​​/ strings.xml
$ find. -iname \ *. BAK -delete
$
$ # install as 127.Apk
$ java -jar Apktool_2. 0 .0 B9.Jar if Framework-Res.Apk_
$
$ # build-Framework Res.Apk
$ java-jar Apktool_2. 0 .0 B9.Jar b-Advance Framework-res
$
$ # Update Resources.Arsc only
$ cp -P Framework-res/build/apk/resources.Arsc.
$ 7z u-tzip-mx0 framework-res.apk resources.arsc
$
$ # push Framework-Res.Apk
$ Adb push framework-res.apk / system / framework / framework-res.apk
$ Adb Shell chmod 644 / system / Framework / Framework-Res.Apk
$
Thanks for the insights!

Recovering mmssms.db via ADB on Xperia with broken screen

Hi Guys,
My phone's screen has broken and I can't see anything, although the touch still works. I have been able to connect it to the PC to take my music and photos off the internal storage, and my contacts are backed up to Google, but my texts are not and I'd like to recover them.
I've read that they normally reside in /data/data/com.android.providers.telephony/databases/mmssms.db and I should be able to pull this via ADB.
When the phone is booted to the OS it is not detected by ADB at all with 'error: device not found'. I thought USB debugging was on, but obviously not. I can boot to recovery (custom CWM) and now adb will connect to the device. However, when I try to pull the sms db I get 'No such file or directory'
Code:
[email protected] ~ $ sudo adb start-server
[sudo] password for james:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
[email protected] ~ $ adb shell
error: device not found
[email protected] ~ $ adb devices
List of devices attached
[email protected] ~ $ adb devices
List of devices attached
CB5122TH5B device
[email protected] ~ $ adb shell
~ # mkdir /mnt/sdcard/tmp
~ # cat /data/data/com.android.providers.telephony/databases/mmssms.db > /mnt/sdcard/tmp/mmssms.db
cat: can't open '/data/data/com.android.providers.telephony/databases/mmssms.db': No such file or directory
~ # su cat /data/data/com.android.providers.telephony/databases/mmssms.db > /mnt/sdcard/tmp/mmssms.db
cat: can't open '/data/data/com.android.providers.telephony/databases/mmssms.db': No such file or directory
/sbin/sh: su: not found
~ # exit
[email protected] ~ $ adb pull su /data/data/com.android.providers.telephony/databases/mmssms.db
remote object 'su' does not exist
~ # ls /data
~ #
It would appear the directory /data is empty but I bet that's because I don't have permissions to view the contents. I'm guessing this is also why su is not found.
Can anyone help me to get over this hurdle? Please bear in mind I'm not familiar with ADB and not great in a Linux shell either; the above commands took a bit of reading to find, but I do understand what they're trying to do.
My phone is a Sony Xperia T LT30p and is rooted running Xperiment 3.5 and Clockworkmod recovery 6.0.4.6 and I'm running ABD on Linux.
Any help would be appreciated! Cheers :good:

busybox ls --color and many other commands "Working"

have you got bored of your one Text colored terminal ?
when you look at the results you always are confused ?
well .. you came into the right thread
I'm here today to show you how to make every busybox command fully functional
I was trying to make this command work but no success
Code:
#ls --color=always
then i ended up making busybox fully functional
Note: you must have rooted device and custom recovery and SDK tools " incase you don't have adb.rar "and your phone developer mode and USB debugging checked .
go to your SDK tools press sheft and right mouse click and open cmd here
________________________________________________________________________
now .. lets get to it shall we ?
1 - reboot into recovery and connect your device in your PC
2 - type in these commands in your PC command prompt you opened in order :
Code:
# adb shell
# mount system
# cp /system/bin/sh /sdcard/Download/sh
#adb reboot
3 - reboot your device
4 - download this busybox app and start it
jrummy.busybox.installer
5 - you'll see in the app's INSTALLER icon a location /system/xbin
change it to /system/bin
6 - open app's settings "upper right corner beside the three dot's" and check all what's in the installer settings
7 - press back and click install " your phone will boot into recovery and install the busybox "
8 - after finishing the process your device will reboot normally but wait a minute !!! SU is not working anymore :crying:
9 - reboot your device again into recovery !! " I'll try to fix it for you "
10 - type in these commands in order :
Code:
#adb shell
#mount system
#cp /sdcard/Download/sh /system/bin/sh
#chmod 755 /system/bin/sh
#adb reboot
and we are done
look at the attachment below this is how your terminal will look like and error free
I'm sorry about this post
apparently I was kinda mistaken
I think what happens that lead to this is
when you write down the applet's name in terminal the device start to search inside bin file first .. if the applet was not found in bin .
the device will start to search on xbin file and maybe the whole storage for that command
so .. since there are some applets in bin are the same one in busybox and I was able to locate them "took me like an hour to do so"
and these applets are :
Code:
[COLOR="blue"]blkid
brctl
cat
chmod
chown
clear
cmp
cp
date
dd
df
dmesg
du
grep
gzip
hd
id
ifconfig
insmod
ionice
ip
kill
ln
ls
lsmod
lsof
mkdir
mke2fs
mknod
mkswap
mount
mv
netstat
nohup
ping
ping6
printenv
ps
readlink
reboot
renice
rm
rmdir
rmmod
route
sh
sleep
swapoff
swapon
sync
top
touch
tune2fs
umount
uptime[/COLOR]
there are a lot of difference in results between the factory applets and the busybox applets
if you want to see the difference install busybox in /system/xbin and in terminal type one of these applets above like this :
for busybox applets result :
Code:
busybox [I][COLOR="blue"]applet[/COLOR][/I]
for system applets result :
Code:
[I][COLOR="Blue"]applet[/COLOR][/I]
it might not be a new thing but for me it is
I just wanted to share that info for the ones who doesn't know
Edit : there is also one applet in system/xbin which is " nc "
thanks .

Categories

Resources