android app root or system privileges -
i trying build android app can access /data dir (for example) without parsing output of command ran on shell after doing su.
i mean, after researching lot, , looking in code of root explorers, when need root perms parsing output of command after doing su.
what want doing like:
file file = new file("/data"); file[] files = file.listfiles();// list array of file (int = 0; < files.length; i++) { file fileitem = files[i]; system.out.println("file name: "+fileitem.getname().tostring()) { }
for achieving think application process must running root begining of execution.
i tried run app shell after doing su way:
$su #am start -n com.example.test/.ui.activity
but same after looking @ output of ps command see application running user "u0_a110" , not root.
also tried parameter --user 0 , --user 1000, same results... think dalvik virtual machine drops privileges parent process.
i tried convert app system app moving /system/priv-app same results, ( running user of app not root , not system )
may with:
android:shareduserid="android.uid.system"
in manifest application runs user system @ least, tried run way app , placed in /system/priv-app , phone didn't finish booting.
i think error because app needs signed system key manufacturer.
its possible run android app root or @ least system ?
i know if cross compile linux app arm (or architecture of phone) , run app in shell root, app have root access, but, way? want achieve android java app.
as far know, there's no way java app achive this. assign system uid app , sign platform certification, still can't gain root privilege. idea of systemuid access system level apis such controlling airplane mode, getting framebuffer, force-stopping package etc, not controlling filesystem root privilege.
Comments
Post a Comment