ADB remount - permission denied - Xperia Play Android Development

OK - small issue here.
It seems that you cant remount the system using the commandshell.
While you can do "su" to get super user permission when you are in the "adb shell" they get lost after closing the session and trying to mount system using the "adb remount" command.
Anyone else with the same problem?

as Bin4ry said:
Yes it's normal.
The ro.secure is set in default.prop which is part of kernel.img (boot.img) so we need to change the ramdisk for that! I only modded the system.img -> so no unsecure shell.
Edit this has been fixed by [email protected]
GScript Insecure ADB Install:
Link: Click here to download
Instructions:
1) if you already use gscript skip to step 3
2) install gscript from market, create a folder on sdcard called gscript
3) extract files from archive to gscript folder on sdcard
4) load gscript press menu, select add script, then select load script
5) Select "install modaco insecure adb.sh"
6) MAKE SURE SU is ticked, then run script
7) Enjoy adb remount
8) THANK PAUL AT MODACO
WARNING: AS PAUL HAS ADVISED THIS MAY BRICK YOUR DEVICE... Maybe.. Although I would think flashing a system.img from fastboot would repair.
WARNING: RECOMMENDED ONLY FOR UNLOCKED BOOTLOADER

Related

[Tutorial] Root Without Unlocking (Alternative way for all ROMs Vodafone,Korean,US)

Mod Edit: Unstickied, placed link in wiki:http://forum.xda-developers.com/wiki/index.php?title=Nexus_One Thanks ​
This is an alternative approach of rooting the Nexus without touching the bootloader.
-no downgrade neccessary
-no battery modification neccessary
-no messing around with SD card slot
-you don't even have to open your phone...
Working and confirmed for ALL ROMs, including European Vodafone EPF30/FRF91, Korean FRF91, AT&T/T-Mo Stock including FRF91
-------
Credits:
-------
- The Android Exploid Crew:
http://c-skills.blogspot.com/2010/07/android-trickery.html
- Amon_RA
- cyanogen
-------
Notes:
-------
- The exploit wasn't found by me (see credits), I just implemented it as a proof of concept for the Nexus One
- Basically this method should work on all currently known ROM versions.
- I tested it on EPF30, Korean FRF91, Vodafone FRF91, US Stock FRF91.
- As usual when doing this kind of stuff: DO THIS AT YOUR OWN RISK.
- It could even work on other Android devices as long as their system partition is at
/dev/block/mtdblock3/ with yaffs2 file system and there is still some space left on the system partition (without any changes).
-------
Prerequisites:
-------
- Locked Nexus One
- Latest Android SDK incl. USB drivers
- Working ADB
- The file "freenexus.zip"
edit:
get it here:
http://multiupload.com/MVT98F5HBY
or
http://dl.dropbox.com/u/1327667/freenexus.zip
MD5: 947C20222056D7C070733E7FCF85CF15
-------
Step-by-step guide:
-------
1. install android sdk & USB drivers
2. extract the content of the zip file into the tools directory of SDK (i.e. \android-sdk-windows\tools)
-> For all Newbies: Take care that you extract the files directly to the tools folder and don't create a new subdirectory freenexus within tools!!! If you did, delete the folder and extract again!!! Check twice that there is no FOLDER freenexus in your tools directory before you continue!!!
3. open a command prompt (Windows: Start, Run, "cmd", OK; Linux: Terminal)
4. change to SDK tools directory (i.e. cd \android-sdk-windows\tools)
5. connect Nexus to USB and check if debugging mode is activated
(Settings/Application/Development/USB Debugging)
6. run "adb devices" in shell and see if there is a device listed. if not back to step 5 or reinstall USB-drivers
7a. for Windows: run "freenexus.bat" in command shell (this copies the neccessary files to /data/local/tmp)
7b. for Linux or manual installation: run the following commands
Code:
adb push freenexus /data/local/tmp/freenexus
adb push Superuser.apk /data/local/tmp/Superuser.apk
adb push su /data/local/tmp/su
adb push busybox /data/local/tmp/busybox
adb shell chmod 755 /data/local/tmp/freenexus
adb shell chmod 755 /data/local/tmp/busybox
8. run the following commands:
Code:
adb shell
(you should see a "$" prompt now)
cd /data/local/tmp
9. on your phone go to a screen where you can easily toggle wifi (widget or settings/wireless)
10. be prepared to toggle wifi immediately after you execute the next step
11. run
Code:
./freenexus
12. toggle wifi on
13. you should see something like that:
[*] Android local root exploid (C) The Android Exploid Crew
[*] Modified by ak for HTC Nexus One
[+] Using basedir=/sqlite_stmt_journals, path=/data/local/tmp/freenexus
[+] opening NETLINK_KOBJECT_UEVENT socket
[+] sending add message ...
[*] Try to invoke hotplug now, clicking at the wireless
[*] settings, plugin USB key etc.
[*] You succeeded if you find /system/bin/rootshell.
[*] GUI might hang/restart meanwhile so be patient.
13b) if you get "permission denied" error, you have most likely not followed the big red newbie hint after point 2. check this by entering "ls -l", if you see a "drwxr-xr-x" and not "-rwxr-xr-x" in front of the line where freenexus is listed you did not follow properly. Search the posts in the thread on how to correct this.
14. run
Code:
rootshell
15. if you succeeded you will be asked for a password, if not try again from step 10
16. enter the password "freenexus"
17. now you should see a "#" as a prompt -> you are root now
18. run the following commands:
Code:
./busybox cp busybox /system/bin
chmod 4755 /system/bin/busybox
busybox cp Superuser.apk /system/app
busybox cp su /system/bin
chmod 4755 /system/bin/su
rm /system/bin/rootshell
exit
exit
19. Check if you keep root rights:
Code:
adb shell
su
20. after you executed the su command the Superuser app on your device should ask you for allowance
21. you should see the "#" prompt again, if you didn't get that try su again
22. done
-------
Comments:
-------
- General
If you are not planning to wipe your data partition (what you probably will do when installing CM6 first time) you should think about deleting all the temp files still lying in /data/local/tmp (for safety reasons and to have more space on /data):
Code:
adb shell
cd /data/local/tmp
rm busybox
rm su
rm Superuser.apk
rm freenexus
rm flash_image (will only exist if you executed the steps below in recovery section)
- Installation of Custom Recovery
If you only want root rights you are done here. If you want to install custom ROMs you have to install
a custom recovery first. Easiest way would be to download "ROM Manager" from the market. There are plenty of tutorials on how to install custom recovery/ROM at xda.
Edit: It is safer to install the recovery manually. In this case or for those of you running into problems with installing custom recovery with ROM Manager (doesn't stick) you can continue with
these steps (without remount of system partition, now tested successfully):
1) Download recovery-RA-nexus-v1.7.0.1.img to the root directory of your SD-Card
- Note: UnMount your SD-Card after copying these files, but keep your phone plugged in
- or don't mount SD-Card at all and push the file via adb to /sdcard
2) Save file "flash_image" to sdk tools directory:
3) In your terminal run
Code:
adb push flash_image /data/local/tmp/flash_image
adb shell
su
- At this point, it will hang until you choose "Allow" on your phone with the SuperUser app pop-up
- $ should now be replaced with #
5) run the following commands:
Code:
[COLOR="Red"]mount -o rw,remount /dev/block/mtdblock3 /system[/COLOR]
cd /data/local/tmp
chmod 755 flash_image
[COLOR="Red"]./flash_image recovery /sdcard/recovery-RA-nexus-v1.7.0.1.img[/COLOR]
rm /system/etc/install-recovery.sh
rm /system/recovery-from-boot.p
(and if everything worked fine:)
rm flash_image
Alternatively you can continue with step 9 and then steps 16-24 from the old rooting method tutorial
to manually install Amon_RA's recovery. You will also need the file flash_image for that (link taken from HBOOT thread).
- HBOOT
If you rooted from a Korean Rom or have installed the latest Vodafone Rom via PASSIMG you probably have
HBOOT 0.35 which makes it currently difficult to install Cyanogenmod (there is an assertion failure in the install script, at least with CM6 RC1/2. Maybe future versions of CM6 will include HBOOT 0.35 in the script) or other custom ROMs. (You are still on 0.33 if you just installed the Vodafone OTA Update)
There is a tutorial to revert HBOOT here:
http://forum.xda-developers.com/showthread.php?t=726258
Instead of using the EPF30 image you can also use any other PASSIMG file (at least if it has HBOOT 0.33,
otherwise this step wouldn't make sense...)
Note that when flashing a PASSIMG with a different HBOOT version there is a reboot after the HBOOT has been flashed, then after reboot the PASSIMG will be loaded again and the rest of the image will be flashed.
To check HBOOT and Radio version: press and hold trackball while turning on the phone. To exit select Reboot with Vol+/- and press Power button.
Caution:
After you have reverted your HBOOT, you have lost your root rights and you are back on stock recovery.
But you can (or have to) repeat the above procedure to get root rights back.
Edit:
The downgrading also downgrades your radio!!! Before installing CM6 you have to flash a Froyo Radio!
Latest one can be found here:
http://forum.xda-developers.com/showthread.php?t=723839
-------
Troubleshooting:
-------
After trying to flash a custom ROM with ROM Manager one user wasn't able to boot the phone normally and also no longer able to boot to recovery. In this rare case try to download a compatible PASSIMG file:
For example EPF30 (Europe Vodafone 2.1)
http://shipped-roms.com/shipped/Pas...ogle_WWE_1.14.1700.1_EPF30_release_signed.zip
or FRF91 (Europe Vodafone 2.2):
http://shipped-roms.com/shipped/Pas...on_VF_2.15.151.5_R_FRF91_MFG_Shipment_ROM.zip (<-this one is currently a zip in zip. You have to extract it once to get the working PASSIMG.zip)
(Appropriate US-PASSIMGs can also be found on shipped-roms.com, most likely EPE76)
Rename the file to PASSIMG.zip (case sensitive, Windows users take care that the file isn't called PASSIMG.zip.zip hidden extension)
Copy it to main folder of SD card.
Boot phone into Bootloader mode (press and hold trackball when turning on the phone, until fastboot mode starts)
Select Bootloader mode by pressing power button.
The bootloader should then start to analyse the PASSIMG.zip and ask you afterwards to install it.
You're phone (not your SD) will be completely wiped after the procedure but should work again (and can be rooted again...)
sweet!! been waiting for this! will try it tomorrow as soon as i wake up! will report back then!
edit: i cant download freenexus.zip maybe use another hoster?
file section edited.
Great tutorial ! Waiting for some feedbacks
(file link doesn't work)
dolomiti7 said:
file section edited.
Click to expand...
Click to collapse
On the left I can see just an empty folder named "SmartDrive"
link doesn't work
dolomiti7 said:
-> after clicking on "Smartdrive Gastzugang starten" you might get an error message, but after klicking ok on the error message
you should be able to access the folder "nexus" on the left side of the window anyway
Click to expand...
Click to collapse
No way! Can't do anything even after i press ok on the error message
if you click on that there should be a subfolder "nexus" that should be clickable too. at least it works here... anyway. someone wants to upload the file to a hoster? rapidshare... contact me
for the early adaptors (will only work 10 times):
rapidshare.com/files/409266634/freenexus.zip
MD5: 947C20222056D7C070733E7FCF85CF15
multiple download sites!:
http://www.multiupload.com/MVT98F5HBY
or here:
http://dl.dropbox.com/u/1327667/freenexus.zip
thank you. added the link.
This worked flawlessly.
Massive thanks.
Hi, I have a Italian Vodafone Nexus One with FRF91, i have followed all the steps and now in my apps there is Superuser Permission with green light. It means that i have root rights? Can I install Cyanogen Mod now? Thanks, excuse my English.
Worked perfectly on a stock AT&T N1 with FRF91. Thanks!
Excellent tutorial step by step...great work!
Can i change the password at the end?
So once gaining root, I can flash a custom recovery with rom manager without braking/unlocking the boot loader?
@fc_themaster:
if the superuser app popped up at step 19/20 then you have root rights. you can try to install ROM Manager from the market and install a custom recovery with that porgram. it also needs root rights so superuser should pop up again at that point.
@PSeeCO: you don't need to change a password. the password was only used for the temporary rootshell which you (hopefully) deletetd with the command "rm /system/bin/rootshell" in step 18. From that point on root rights are controlled via the Superuser app. If you install an already rooted custom ROM it is obsolete anyway.
@jivemaster: yes, we can! just use ROM Manager from the market to install custom recovery.
dolomiti7 said:
@PSeeCO: you don't need to change a password. the password was only used for the temporary rootshell which you (hopefully) deletetd with the command "rm /system/bin/rootshell" in step 18. From that point on root rights are controlled via the Superuser app. If you install an already rooted custom ROM it is obsolete anyway.
Click to expand...
Click to collapse
Perfect, thank you so much!

[TUTORIAL] Easy method to change framework-res.apk with shell script

I created script to change framework-res.apk
--New-- Script with safer operation uploaded.
Requirements
-rooted
-busybox installed
1-copy framework-res.apk that you want to replace to the root of your sdcard (make sure it's in root)
2-extract reframe.zip(attachment) to root of your sdcard
in adb shell, use this command:
Code:
su
cd /sdcard
sh reframe.sh
your phone will reboot. and done! your framework-res.apk replaced safely.
Original framework-res.apk backed up as framework-res.apk.orig in /sdcard
Is there any method to get back original framework from SDCard, and paste it to /system, when my phone doesn't want to boot?
hugerth said:
Is there any method to get back original framework from SDCard, and paste it to /system, when my phone doesn't want to boot?
Click to expand...
Click to collapse
Use xrecovery..
Sent from my E15i using XDA App
Can't install... ok... I reflash 1.6 and root it again, install 2.1 and xRecovery for the future...
hugerth said:
Can't install... ok... I reflash 1.6 and root it again, install 2.1 and xRecovery for the future...
Click to expand...
Click to collapse
ops.if you have working rootshell, you can replace it using rootshell. but, since you've go back to 1.6, it doesn't matter. just install xrecovery in the future, quite useful.
Now I have system back (after about 2h) with working xRecovery and... God!.. why I haven't noticed it before...
i wanna ask how to recover the framework-res.apk from the xrecovery??
mount /system and use adb push
edit: new script. revised operation
D:\adb>adb remount
remount failed: Operation not permitted
any help here? I need to replace the framework
nm, forgot to chmod 06777 /system/framework
Thank you for you work. I hope to see this work Just rebooted my phone after applying your script.
propc said:
I created script to change framework-res.apk
--New-- Script with safer operation uploaded.
Requirements
-rooted
-busybox installed
1-copy framework-res.apk that you want to replace to the root of your sdcard (make sure it's in root)
2-extract reframe.zip(attachment) to root of your sdcard
in adb shell, use this command:
Code:
su
cd /sdcard
sh reframe.sh
your phone will reboot. and done! your framework-res.apk replaced safely.
Original framework-res.apk backed up as framework-res.apk.orig in /sdcard
Click to expand...
Click to collapse
Can u tell me where to find the adb shell
Sent from my E15i using XDA App
Use Super One Click, it comes with adb. Copy cmd.exe to SOC folder. Now start cmd, now type 'adb shell' (click enter) and then the other commands.
Sent from my E15i using Tapatalk
you can always change a framework by installer from available theme
mzmz83 said:
Use Super One Click, it comes with adb. Copy cmd.exe to SOC folder. Now start cmd, now type 'adb shell' (click enter) and then the other commands.
Sent from my E15i using Tapatalk
Click to expand...
Click to collapse
This is what I see when I open superoneclick t shows Root, shell Root, Unroot, allow non market apps....
Now in superoneclick folder that it comes in when u open it this is what u see
Superuser.apk
Superoneclick
Su
Sqlite3
Regeagainsttecage
Bushels
Addbwinusbapi
Adbwinapi
Ashland
Adblinux
Adb. Application
But when I try to open adb app it does not open a screen comes up then it closes so there is where am stuck at:-( :-( can u help me out from there??????
Sent from my E15i using XDA App
adb won't stay open if you click it, it will just flash out on the screen.
it was supposed to be somekind of a "bridge" for the cmd and the phone...
correct me if i'm wrong please...
You have to copy cmd.exe to the SuperOneClick folder, then you have to open the cmd.exe, not the superonecklick.exe.
I'm trying to replace framework and when I type in shell I got:
cd /sdcard
#
sh reframe.sh
sh: Can't open reframe.sh
#
oubsty, Thanks you
Boshe said:
I'm trying to replace framework and when I type in shell I got:
cd /sdcard
#
sh reframe.sh
sh: Can't open reframe.sh
#
Click to expand...
Click to collapse
I think it works if your phone is charged by your laptop/computer only. You do not allow it to connect. I mean you can not reach SDCard through Total Commander, etc. only charging.
Help
# sh reframe.sh
sh reframe.sh
sh: Cannot open reframe.sh
#
any ideas
got SuperOneClick 1.5.5 ( busybox )
root explorer ( only thing in superuser )
SE's PC companion running in background [ keeps asking for mount, but is ignored ]
got Android full SDK installed - drivers, ADB, 'the works'
root'd succesfully -(( WORLD-1-8_2.0.1.A.0.47 )) White-DarkBlue / Pink
4Gb Kingston HC4 sdc4/4gb 18 - un partitioned.
I wish to remove some bloat, and change to a custom theme.
{EDIT} - how to access recovery mode?, got customization = home-back-back-home-back-home-home-back
Dalvik Debug Monitor won't run, adb error2
thanks in advance.

[Q] init.d support for stock rom P500

Hi, I just read some tips about using script for enhancing performance.
It says that the script must be places in system/etc/init.d
But in stock rom P500 (GB 2.3.3 v20G) I can't find folder init.d
The questions:
1. Is the stock rom already support init.d script execution?
2. If yes, will it works just by creating folder init.d and place script there?
3. If not, how to enable support init.d for Optimus One, stock ROM rooted?
I search this forum and find some guide about init.d support in other phone models, will it works on Optimus One too, or perhaps it needs particular way to do it?
1. No
2. If you have init.d support in rom.
3. Only way to do it is cook a custom rom through kitchen to add init.d support
terratrix said:
1. No
2. If you have init.d support in rom.
3. Only way to do it is cook a custom rom through kitchen to add init.d support
Click to expand...
Click to collapse
3. answer is some wrong:
you doesnt need to cook a custom rom, you only need the adb (android debug bridge) to "speak" with your phone:
0.) on your phone download busybox from market
1.) install android sdk on your computer
2.) install LG usb drivers on your computer
3.) open a console (on windows use the "cmd" command)
4.) remount "root" to read/write (type following commands in the cmd)
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk1 /
exit
5.) retrive the init.rc file from your device: (type the command in the cmd)
Code:
adb pull /init.rc C:\users\XXXXX\Desktop\init.rc
6.) open the init.rc file and add the busybox command to execute scripts in the /system/etc/init.d folder
after the lines that does mkdirs etc but BEFORE zygote starts (this stars the whole android)...
Code:
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
7.) close and save the file, push it back to your device, than reboot:
Code:
adb push XXXX\XXXX\init.rc /init.rc
now you can use the init.d folder as in CyanogenMod / other custom roms.
andy572 said:
3. answer is some wrong:
you doesnt need to cook a custom rom, you only need the adb (android debug bridge) to "speak" with your phone:
0.) on your phone download busybox from market
1.) install android sdk on your computer
2.) install LG usb drivers on your computer
3.) open a console (on windows use the "cmd" command)
4.) remount "root" to read/write (type following commands in the cmd)
Code:
adb shell
mount -o remount,rw /dev/block/mmcblk1 /
exit
5.) retrive the init.rc file from your device: (type the command in the cmd)
Code:
adb pull /init.rc C:\users\XXXXX\Desktop\init.rc
6.) open the init.rc file and add the busybox command to execute scripts in the /system/etc/init.d folder
after the lines that does mkdirs etc but BEFORE zygote starts (this stars the whole android)...
Code:
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
7.) close and save the file, push it back to your device:
Code:
adb push XXXX\XXXX\init.rc /init.rc
now you can use the init.d folder as in CyanogenMod / other custom roms.
Click to expand...
Click to collapse
Ah thanks for correcting my answer ^^
Dear Andy,
Thanks 4 the procrdure, however i wanted to ask you whether there is any tool to check that the scripts in the init.d folder r getting executed?
andy572 said:
.....guide...
Click to expand...
Click to collapse
That works? I mean init.rc is in ramdisk in boot partition, and gets unpacked on boot, so any changes in / are lost on reboot - at least that is what was told to me.
Kanad said:
Dear Andy,
Thanks 4 the procrdure, however i wanted to ask you whether there is any tool to check that the scripts in the init.d folder r getting executed?
Click to expand...
Click to collapse
Option 1 - run logcat during boot (Trough ADB, type logcat in adb shell, a little simpler if using Droid Explorer)
Option 2 - Run a script that changes something that was previously different. Try installing the supercharger (with different from normal minfree values), rebooting and running the script again to make sure the minfree values are modified. If so, init.d is working and vice versa.
andy572 said:
6.) open the init.rc file and add the busybox command to execute scripts in the /system/etc/init.d folder
after the lines that does mkdirs etc but BEFORE zygote starts (this stars the whole android)...
Code:
service userinit /system/xbin/busybox run-parts /system/etc/init.d
oneshot
Click to expand...
Click to collapse
I go directly to this step, using root explorer on phone (not using PC+ADB)
But after reboot, init.rc i've already edited before has been restored again to original value, as said by Tasssadar.
Maybe I should do it using PC+ADB instead of direct edit on phone?
optimuswhite said:
I go directly to this step, using root explorer on phone (not using PC+ADB)
But after reboot, init.rc i've already edited before has been restored again to original value, as said by Tasssadar.
Maybe I should do it using PC+ADB instead of direct edit on phone?
Click to expand...
Click to collapse
you are trying to modify a running system, sure - you have to do such things
in the boot.img file and have to re-flash it. there is no way to modify a running
system, sorry for misunderstanding.
andy572 said:
you are trying to modify a running system, sure - you have to do such things
in the boot.img file and have to re-flash it. there is no way to modify a running
system, sorry for misunderstanding.
Click to expand...
Click to collapse
I see.
so, is someone can guide me how to deal with boot.img on stock rom?
optimuswhite said:
I see.
so, is someone can guide me how to deal with boot.img on stock rom?
Click to expand...
Click to collapse
go to your recovery, make a backup of your current system and connect the
phone via usb to your computer and copy the rom from the phone to your computer.
then, use the htc kitchen to modify the created rom / or the boot.img

Eclipse Android - add superuser permission

Hi, i'm trying to access /system/app/ so i can put apps in there, since i couldt figure out how to install apk files form Eclipse. I'm running Eclipse with the SDK installed, any help or example would be awesome. Thanks
/system is typically read-only (is on every android I know of). On many (most?) devices, the partition containing /system is also write-locked in the eMMC firmware. User apps should be installed into the /data partition.
What do you mean by installing from eclipse? Eclipse uses adb to push the package to the device and launch the package installer.
Please use the Q&A Forum for questions Thanks
Moving to Q&A
There are two ways that may be of help that I know of.
ADB Install:
1. In your Android SDK manager you should have a tool called ADB (Google how to add it to your system path to make life easier)
2. Navigate to your apk file you are trying to install and shift right click in the windows explorer windo and select Open Command line here.
3. then using command line (Console) type in:
Code:
adb install nameofapphere.apk
Note: If the app has spaces in the installer name either take out the spaces or add quotes to the command line as shown below.
Code:
adb install "name of app here.apk"
Second choice is gaining command line root and remounting the system directory with rw permissions.
1. Gain console root access.
2. in console type in:
Code:
adb shell
Note if you see $ you are not in root and # if you are in root.
3. (Please double check)
Code:
mount -o remount,rw /dev/null /system
This will remount your system drive so you have read/write access to it.
4. Push the file to /system/app
5. Set the permissions you want for the application
JavaChips said:
There are two ways that may be of help that I know of.
ADB Install:
1. In your Android SDK manager you should have a tool called ADB (Google how to add it to your system path to make life easier)
2. Navigate to your apk file you are trying to install and shift right click in the windows explorer windo and select Open Command line here.
3. then using command line (Console) type in:
Code:
adb install nameofapphere.apk
Note: If the app has spaces in the installer name either take out the spaces or add quotes to the command line as shown below.
Code:
adb install "name of app here.apk"
Second choice is gaining command line root and remounting the system directory with rw permissions.
1. Gain console root access.
2. in console type in:
Code:
adb shell
Note if you see $ you are not in root and # if you are in root.
3. (Please double check)
Code:
mount -o remount,rw /dev/null /system
This will remount your system drive so you have read/write access to it.
4. Push the file to /system/app
5. Set the permissions you want for the application
Click to expand...
Click to collapse
What i mean i'm writing an app in eclipse. And i have a listview with the apk's, i want when the user clicks on the items, it gets installed. Any ideas?
spxc said:
What i mean i'm writing an app in eclipse. And i have a listview with the apk's, i want when the user clicks on the items, it gets installed. Any ideas?
Click to expand...
Click to collapse
Why did this thread get moved. Took me forever to find it.
Anyway, it seems you want to programmatically install an APK from within an android app, is that correct? Just launch an intent with the package installer as a target:
Code:
Intent installIntent = new Intent(Intent.ACTION_VIEW);
installIntent.setDataAndType("/path/to/my/apk","application/vnd.android.package-archive");
startActivity(installIntent);
Moderator: this is definitely development related. Why was it moved to Q&A?
Gene Poole said:
Code:
Intent installIntent = new Intent(Intent.ACTION_VIEW);
installIntent.setDataAndType("/path/to/my/apk","application/vnd.android.package-archive");
startActivity(installIntent);
Moderator: this is definitely development related. Why was it moved to Q&A?
Click to expand...
Click to collapse
I'll agree, and secondly I think it was moved to Q&A because the original question was asked in a way that was not clear to it's intents.
So yeah, just pointing the apks to be run by the package installer via intent will launch the installer and install the app selected.

Minami M-750 stuck on boot - need expert help

Hi, I have been using Rom toolbox Lite for a while now and never had a problem, untill I got the "not so great" idea to change the heapsize in build.prop - after reboot the tablet is stuck on Loading - screenshot http://imageshack.com/a/img924/2306/BJbCT1.png
I have tried to reset, reset to factory default, to push back an old build.prop by ADB from prompt, tried the same from QtADB(0.8.0(newer 32bit not availble) - seems I have full access to all folders), even tried modifying the build.prop as root and start QtADB as root then copy it back - nothing has helped.
I have a complete backup(rom dump) made with uberizer, but since I'm not using windows anymore but instead Peach OSI(heavily modified Xubuntu). I'm not really sure what to do now.
My Minami M-750 DualCore A20(allwinner) tablets info is uploaded at specdevice long time ago as I were trying to find others with the same tablet:
http://specdevice.com/showspec.php?id=e5ba-9ce5-0033-c58700000000
It doesn't have custom Rom or custom recovery, but do have an option in recovery to update from external storage(where I can access internal sdcard and external sd) - update from ADB - update from cache.
Anyone have any suggestions?
With kind regards
JBJ
EDIT: Thanks to this article below the problem is now solved.
Note: Step 1 . instead of Eclipse ADT download SDK command line tools https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
Follow this guide on how to install the SDK: https://androidonlinux.wordpress.com/2013/05/12/setting-up-adb-on-linux/
Step 3. Open a Terminal and shoot this command: —–Note: The “Android” in the command is the folder in which we extracted the SDK in.
cd ~/Android/sdk/platform-tools/
Edit build.prop using ADB
by Louis Matthijssen · July 26, 2014
There are many reasons why you may like to edit your build.prop file. I always edit it in order to lower my DPI, resulting in a bigger looking screen.
You can edit it on the device itself using a file manager or a build.prop editor but it may be more convenient to edit the file using a PC.
Please note that your device has to be rooted to edit the build.prop file.
Download and unzip the Eclipse ADT
Make sure your device has USB debugging enabled
Open a command prompt or terminal and cd to the platform-tools directory:
cd C:\adt-bundle-windows\sdk\platform-tools
Check if your device is recognized:
If it’s not you may install the Google USB driver and try again
adb devices
The device may ask you if the computer is trusted, choose yes
Restart ADB as root:
adb root
Remount /system as rw (read-write):
adb remount
Download build.prop to your pc:
adb pull /system/build.prop
Now you can edit build.prop using your favorite editor
Important: use a plain text editor! I recommend Notepad++ for Windows and Geany for Linux
Upload build.prop to your device:
adb push build.prop /system/build.prop
Fix permissions:
adb shell chmod 644 /system/build.prop
Reboot your device:
adb reboot

Categories

Resources